Class: OCI::DatabaseToolsRuntime::Models::UserCredential
- Inherits:
-
Object
- Object
- OCI::DatabaseToolsRuntime::Models::UserCredential
- Defined in:
- lib/oci/database_tools_runtime/models/user_credential.rb
Overview
Credential information
Constant Summary collapse
- KEY_TYPE_ENUM =
[ KEY_TYPE_CREDENTIAL_NAME = 'CREDENTIAL_NAME'.freeze, KEY_TYPE_PUBLIC_SYNONYM = 'PUBLIC_SYNONYM'.freeze, KEY_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#enabled ⇒ String
[Required] Indicates whether this credential is enabled (TRUE) or not (FALSE).
-
#key ⇒ String
[Required] Name of the credential.
-
#key_type ⇒ String
Indicates whether this refers to a public synonym or not.
-
#owner ⇒ String
[Required] Owner of the credential.
- #related_resource ⇒ OCI::DatabaseToolsRuntime::Models::CredentialRelatedResource
-
#user_name ⇒ String
[Required] Name of the user that will be used to log in to the remote database or the remote or local operating system.
-
#windows_domain ⇒ String
For a Windows target, the Windows domain to use when logging in.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ UserCredential
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ UserCredential
Initializes the object
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/oci/database_tools_runtime/models/user_credential.rb', line 88 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.key = attributes[:'key'] if attributes[:'key'] self.user_name = attributes[:'userName'] if attributes[:'userName'] raise 'You cannot provide both :userName and :user_name' if attributes.key?(:'userName') && attributes.key?(:'user_name') self.user_name = attributes[:'user_name'] if attributes[:'user_name'] self.windows_domain = attributes[:'windowsDomain'] if attributes[:'windowsDomain'] raise 'You cannot provide both :windowsDomain and :windows_domain' if attributes.key?(:'windowsDomain') && attributes.key?(:'windows_domain') self.windows_domain = attributes[:'windows_domain'] if attributes[:'windows_domain'] self.enabled = attributes[:'enabled'] if attributes[:'enabled'] self.key_type = attributes[:'keyType'] if attributes[:'keyType'] raise 'You cannot provide both :keyType and :key_type' if attributes.key?(:'keyType') && attributes.key?(:'key_type') self.key_type = attributes[:'key_type'] if attributes[:'key_type'] self.owner = attributes[:'owner'] if attributes[:'owner'] self. = attributes[:'relatedResource'] if attributes[:'relatedResource'] raise 'You cannot provide both :relatedResource and :related_resource' if attributes.key?(:'relatedResource') && attributes.key?(:'related_resource') self. = attributes[:'related_resource'] if attributes[:'related_resource'] end |
Instance Attribute Details
#enabled ⇒ String
[Required] Indicates whether this credential is enabled (TRUE) or not (FALSE)
32 33 34 |
# File 'lib/oci/database_tools_runtime/models/user_credential.rb', line 32 def enabled @enabled end |
#key ⇒ String
[Required] Name of the credential
20 21 22 |
# File 'lib/oci/database_tools_runtime/models/user_credential.rb', line 20 def key @key end |
#key_type ⇒ String
Indicates whether this refers to a public synonym or not.
36 37 38 |
# File 'lib/oci/database_tools_runtime/models/user_credential.rb', line 36 def key_type @key_type end |
#owner ⇒ String
[Required] Owner of the credential
40 41 42 |
# File 'lib/oci/database_tools_runtime/models/user_credential.rb', line 40 def owner @owner end |
#related_resource ⇒ OCI::DatabaseToolsRuntime::Models::CredentialRelatedResource
43 44 45 |
# File 'lib/oci/database_tools_runtime/models/user_credential.rb', line 43 def @related_resource end |
#user_name ⇒ String
[Required] Name of the user that will be used to log in to the remote database or the remote or local operating system
24 25 26 |
# File 'lib/oci/database_tools_runtime/models/user_credential.rb', line 24 def user_name @user_name end |
#windows_domain ⇒ String
For a Windows target, the Windows domain to use when logging in
28 29 30 |
# File 'lib/oci/database_tools_runtime/models/user_credential.rb', line 28 def windows_domain @windows_domain end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/oci/database_tools_runtime/models/user_credential.rb', line 46 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'key': :'key', 'user_name': :'userName', 'windows_domain': :'windowsDomain', 'enabled': :'enabled', 'key_type': :'keyType', 'owner': :'owner', 'related_resource': :'relatedResource' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/oci/database_tools_runtime/models/user_credential.rb', line 61 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'key': :'String', 'user_name': :'String', 'windows_domain': :'String', 'enabled': :'String', 'key_type': :'String', 'owner': :'String', 'related_resource': :'OCI::DatabaseToolsRuntime::Models::CredentialRelatedResource' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'lib/oci/database_tools_runtime/models/user_credential.rb', line 145 def ==(other) return true if equal?(other) self.class == other.class && key == other.key && user_name == other.user_name && windows_domain == other.windows_domain && enabled == other.enabled && key_type == other.key_type && owner == other.owner && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 |
# File 'lib/oci/database_tools_runtime/models/user_credential.rb', line 181 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
161 162 163 |
# File 'lib/oci/database_tools_runtime/models/user_credential.rb', line 161 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
170 171 172 |
# File 'lib/oci/database_tools_runtime/models/user_credential.rb', line 170 def hash [key, user_name, windows_domain, enabled, key_type, owner, ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
214 215 216 217 218 219 220 221 222 223 |
# File 'lib/oci/database_tools_runtime/models/user_credential.rb', line 214 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
208 209 210 |
# File 'lib/oci/database_tools_runtime/models/user_credential.rb', line 208 def to_s to_hash.to_s end |