Class: OCI::IdentityDataPlane::Models::CredentialAuthenticatorInfo
- Inherits:
-
Object
- Object
- OCI::IdentityDataPlane::Models::CredentialAuthenticatorInfo
- Defined in:
- lib/oci/identity_data_plane/models/credential_authenticator_info.rb
Overview
CredentialAuthenticatorInfo model.
Instance Attribute Summary collapse
-
#client_id ⇒ String
[Required] The id of the client.
-
#credential_identifier ⇒ String
[Required] The credential identifier.
-
#credential_list ⇒ Array<String>
[Required] The credential list.
-
#raw_credential ⇒ String
[Required] The raw credential.
-
#service ⇒ String
[Required] The name of the service that is making this authorization request.
-
#tenant_id ⇒ String
[Required] The id of the tenant.
-
#tenant_name ⇒ String
[Required] The name of the tenant.
-
#user_id ⇒ String
[Required] The id of the user.
-
#user_name ⇒ String
[Required] The name of the user.
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 = {}) ⇒ CredentialAuthenticatorInfo
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 = {}) ⇒ CredentialAuthenticatorInfo
Initializes the object
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 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'lib/oci/identity_data_plane/models/credential_authenticator_info.rb', line 96 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.raw_credential = attributes[:'rawCredential'] if attributes[:'rawCredential'] raise 'You cannot provide both :rawCredential and :raw_credential' if attributes.key?(:'rawCredential') && attributes.key?(:'raw_credential') self.raw_credential = attributes[:'raw_credential'] if attributes[:'raw_credential'] self.user_id = attributes[:'userId'] if attributes[:'userId'] raise 'You cannot provide both :userId and :user_id' if attributes.key?(:'userId') && attributes.key?(:'user_id') self.user_id = attributes[:'user_id'] if attributes[:'user_id'] self.tenant_id = attributes[:'tenantId'] if attributes[:'tenantId'] raise 'You cannot provide both :tenantId and :tenant_id' if attributes.key?(:'tenantId') && attributes.key?(:'tenant_id') self.tenant_id = attributes[:'tenant_id'] if attributes[:'tenant_id'] 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.tenant_name = attributes[:'tenantName'] if attributes[:'tenantName'] raise 'You cannot provide both :tenantName and :tenant_name' if attributes.key?(:'tenantName') && attributes.key?(:'tenant_name') self.tenant_name = attributes[:'tenant_name'] if attributes[:'tenant_name'] self.credential_identifier = attributes[:'credentialIdentifier'] if attributes[:'credentialIdentifier'] raise 'You cannot provide both :credentialIdentifier and :credential_identifier' if attributes.key?(:'credentialIdentifier') && attributes.key?(:'credential_identifier') self.credential_identifier = attributes[:'credential_identifier'] if attributes[:'credential_identifier'] self.credential_list = attributes[:'credentialList'] if attributes[:'credentialList'] raise 'You cannot provide both :credentialList and :credential_list' if attributes.key?(:'credentialList') && attributes.key?(:'credential_list') self.credential_list = attributes[:'credential_list'] if attributes[:'credential_list'] self.service = attributes[:'service'] if attributes[:'service'] self.client_id = attributes[:'clientId'] if attributes[:'clientId'] raise 'You cannot provide both :clientId and :client_id' if attributes.key?(:'clientId') && attributes.key?(:'client_id') self.client_id = attributes[:'client_id'] if attributes[:'client_id'] end |
Instance Attribute Details
#client_id ⇒ String
[Required] The id of the client.
45 46 47 |
# File 'lib/oci/identity_data_plane/models/credential_authenticator_info.rb', line 45 def client_id @client_id end |
#credential_identifier ⇒ String
[Required] The credential identifier.
33 34 35 |
# File 'lib/oci/identity_data_plane/models/credential_authenticator_info.rb', line 33 def credential_identifier @credential_identifier end |
#credential_list ⇒ Array<String>
[Required] The credential list.
37 38 39 |
# File 'lib/oci/identity_data_plane/models/credential_authenticator_info.rb', line 37 def credential_list @credential_list end |
#raw_credential ⇒ String
[Required] The raw credential.
13 14 15 |
# File 'lib/oci/identity_data_plane/models/credential_authenticator_info.rb', line 13 def raw_credential @raw_credential end |
#service ⇒ String
[Required] The name of the service that is making this authorization request.
41 42 43 |
# File 'lib/oci/identity_data_plane/models/credential_authenticator_info.rb', line 41 def service @service end |
#tenant_id ⇒ String
[Required] The id of the tenant.
21 22 23 |
# File 'lib/oci/identity_data_plane/models/credential_authenticator_info.rb', line 21 def tenant_id @tenant_id end |
#tenant_name ⇒ String
[Required] The name of the tenant.
29 30 31 |
# File 'lib/oci/identity_data_plane/models/credential_authenticator_info.rb', line 29 def tenant_name @tenant_name end |
#user_id ⇒ String
[Required] The id of the user.
17 18 19 |
# File 'lib/oci/identity_data_plane/models/credential_authenticator_info.rb', line 17 def user_id @user_id end |
#user_name ⇒ String
[Required] The name of the user.
25 26 27 |
# File 'lib/oci/identity_data_plane/models/credential_authenticator_info.rb', line 25 def user_name @user_name end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/oci/identity_data_plane/models/credential_authenticator_info.rb', line 48 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'raw_credential': :'rawCredential', 'user_id': :'userId', 'tenant_id': :'tenantId', 'user_name': :'userName', 'tenant_name': :'tenantName', 'credential_identifier': :'credentialIdentifier', 'credential_list': :'credentialList', 'service': :'service', 'client_id': :'clientId' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/oci/identity_data_plane/models/credential_authenticator_info.rb', line 65 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'raw_credential': :'String', 'user_id': :'String', 'tenant_id': :'String', 'user_name': :'String', 'tenant_name': :'String', 'credential_identifier': :'String', 'credential_list': :'Array<String>', 'service': :'String', 'client_id': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/oci/identity_data_plane/models/credential_authenticator_info.rb', line 160 def ==(other) return true if equal?(other) self.class == other.class && raw_credential == other.raw_credential && user_id == other.user_id && tenant_id == other.tenant_id && user_name == other.user_name && tenant_name == other.tenant_name && credential_identifier == other.credential_identifier && credential_list == other.credential_list && service == other.service && client_id == other.client_id end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 |
# File 'lib/oci/identity_data_plane/models/credential_authenticator_info.rb', line 198 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
178 179 180 |
# File 'lib/oci/identity_data_plane/models/credential_authenticator_info.rb', line 178 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
187 188 189 |
# File 'lib/oci/identity_data_plane/models/credential_authenticator_info.rb', line 187 def hash [raw_credential, user_id, tenant_id, user_name, tenant_name, credential_identifier, credential_list, service, client_id].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
231 232 233 234 235 236 237 238 239 240 |
# File 'lib/oci/identity_data_plane/models/credential_authenticator_info.rb', line 231 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
225 226 227 |
# File 'lib/oci/identity_data_plane/models/credential_authenticator_info.rb', line 225 def to_s to_hash.to_s end |