Class: OCI::IdentityDomains::Models::ExtensionUserCredentialsUser

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/identity_domains/models/extension_user_credentials_user.rb

Overview

User's credentials

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ExtensionUserCredentialsUser

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):



147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
# File 'lib/oci/identity_domains/models/extension_user_credentials_user.rb', line 147

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.db_credentials = attributes[:'dbCredentials'] if attributes[:'dbCredentials']

  raise 'You cannot provide both :dbCredentials and :db_credentials' if attributes.key?(:'dbCredentials') && attributes.key?(:'db_credentials')

  self.db_credentials = attributes[:'db_credentials'] if attributes[:'db_credentials']

  self.customer_secret_keys = attributes[:'customerSecretKeys'] if attributes[:'customerSecretKeys']

  raise 'You cannot provide both :customerSecretKeys and :customer_secret_keys' if attributes.key?(:'customerSecretKeys') && attributes.key?(:'customer_secret_keys')

  self.customer_secret_keys = attributes[:'customer_secret_keys'] if attributes[:'customer_secret_keys']

  self.auth_tokens = attributes[:'authTokens'] if attributes[:'authTokens']

  raise 'You cannot provide both :authTokens and :auth_tokens' if attributes.key?(:'authTokens') && attributes.key?(:'auth_tokens')

  self.auth_tokens = attributes[:'auth_tokens'] if attributes[:'auth_tokens']

  self.smtp_credentials = attributes[:'smtpCredentials'] if attributes[:'smtpCredentials']

  raise 'You cannot provide both :smtpCredentials and :smtp_credentials' if attributes.key?(:'smtpCredentials') && attributes.key?(:'smtp_credentials')

  self.smtp_credentials = attributes[:'smtp_credentials'] if attributes[:'smtp_credentials']

  self.api_keys = attributes[:'apiKeys'] if attributes[:'apiKeys']

  raise 'You cannot provide both :apiKeys and :api_keys' if attributes.key?(:'apiKeys') && attributes.key?(:'api_keys')

  self.api_keys = attributes[:'api_keys'] if attributes[:'api_keys']

  self.o_auth2_client_credentials = attributes[:'oAuth2ClientCredentials'] if attributes[:'oAuth2ClientCredentials']

  raise 'You cannot provide both :oAuth2ClientCredentials and :o_auth2_client_credentials' if attributes.key?(:'oAuth2ClientCredentials') && attributes.key?(:'o_auth2_client_credentials')

  self.o_auth2_client_credentials = attributes[:'o_auth2_client_credentials'] if attributes[:'o_auth2_client_credentials']
end

Instance Attribute Details

#api_keysArray<OCI::IdentityDomains::Models::UserExtApiKeys>

A list of API keys corresponding to user.

Added In: 2012271618

SCIM++ Properties: - idcsCompositeKey: [value] - idcsSearchable: true - multiValued: true - mutability: readOnly - required: false - returned: request - type: complex - uniqueness: none



89
90
91
# File 'lib/oci/identity_domains/models/extension_user_credentials_user.rb', line 89

def api_keys
  @api_keys
end

#auth_tokensArray<OCI::IdentityDomains::Models::UserExtAuthTokens>

A list of Auth tokens corresponding to user.

Added In: 2012271618

SCIM++ Properties: - idcsCompositeKey: [value] - idcsSearchable: true - multiValued: true - mutability: readOnly - required: false - returned: request - type: complex - uniqueness: none



57
58
59
# File 'lib/oci/identity_domains/models/extension_user_credentials_user.rb', line 57

def auth_tokens
  @auth_tokens
end

#customer_secret_keysArray<OCI::IdentityDomains::Models::UserExtCustomerSecretKeys>

A list of customer secret keys corresponding to user.

Added In: 2102181953

SCIM++ Properties: - idcsCompositeKey: [value] - idcsSearchable: true - multiValued: true - mutability: readOnly - required: false - returned: request - type: complex - uniqueness: none



41
42
43
# File 'lib/oci/identity_domains/models/extension_user_credentials_user.rb', line 41

def customer_secret_keys
  @customer_secret_keys
end

#db_credentialsArray<OCI::IdentityDomains::Models::UserExtDbCredentials>

A list of database credentials corresponding to user.

Added In: 2102181953

SCIM++ Properties: - idcsCompositeKey: [value] - idcsSearchable: true - multiValued: true - mutability: readOnly - required: false - returned: request - type: complex - uniqueness: none



25
26
27
# File 'lib/oci/identity_domains/models/extension_user_credentials_user.rb', line 25

def db_credentials
  @db_credentials
end

#o_auth2_client_credentialsArray<OCI::IdentityDomains::Models::UserExtOAuth2ClientCredentials>

A list of OAuth2 client credentials corresponding to a user.

Added In: 2012271618

SCIM++ Properties: - idcsCompositeKey: [value] - idcsSearchable: true - multiValued: true - mutability: readOnly - required: false - returned: request - type: complex - uniqueness: none



105
106
107
# File 'lib/oci/identity_domains/models/extension_user_credentials_user.rb', line 105

def o_auth2_client_credentials
  @o_auth2_client_credentials
end

#smtp_credentialsArray<OCI::IdentityDomains::Models::UserExtSmtpCredentials>

A list of SMTP credentials corresponding to user.

Added In: 2012271618

SCIM++ Properties: - idcsCompositeKey: [value] - idcsSearchable: true - multiValued: true - mutability: readOnly - required: false - returned: request - type: complex - uniqueness: none



73
74
75
# File 'lib/oci/identity_domains/models/extension_user_credentials_user.rb', line 73

def smtp_credentials
  @smtp_credentials
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



108
109
110
111
112
113
114
115
116
117
118
119
# File 'lib/oci/identity_domains/models/extension_user_credentials_user.rb', line 108

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'db_credentials': :'dbCredentials',
    'customer_secret_keys': :'customerSecretKeys',
    'auth_tokens': :'authTokens',
    'smtp_credentials': :'smtpCredentials',
    'api_keys': :'apiKeys',
    'o_auth2_client_credentials': :'oAuth2ClientCredentials'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



122
123
124
125
126
127
128
129
130
131
132
133
# File 'lib/oci/identity_domains/models/extension_user_credentials_user.rb', line 122

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'db_credentials': :'Array<OCI::IdentityDomains::Models::UserExtDbCredentials>',
    'customer_secret_keys': :'Array<OCI::IdentityDomains::Models::UserExtCustomerSecretKeys>',
    'auth_tokens': :'Array<OCI::IdentityDomains::Models::UserExtAuthTokens>',
    'smtp_credentials': :'Array<OCI::IdentityDomains::Models::UserExtSmtpCredentials>',
    'api_keys': :'Array<OCI::IdentityDomains::Models::UserExtApiKeys>',
    'o_auth2_client_credentials': :'Array<OCI::IdentityDomains::Models::UserExtOAuth2ClientCredentials>'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



197
198
199
200
201
202
203
204
205
206
207
# File 'lib/oci/identity_domains/models/extension_user_credentials_user.rb', line 197

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    db_credentials == other.db_credentials &&
    customer_secret_keys == other.customer_secret_keys &&
    auth_tokens == other.auth_tokens &&
    smtp_credentials == other.smtp_credentials &&
    api_keys == other.api_keys &&
    o_auth2_client_credentials == other.o_auth2_client_credentials
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
# File 'lib/oci/identity_domains/models/extension_user_credentials_user.rb', line 232

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

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


212
213
214
# File 'lib/oci/identity_domains/models/extension_user_credentials_user.rb', line 212

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



221
222
223
# File 'lib/oci/identity_domains/models/extension_user_credentials_user.rb', line 221

def hash
  [db_credentials, customer_secret_keys, auth_tokens, smtp_credentials, api_keys, o_auth2_client_credentials].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



265
266
267
268
269
270
271
272
273
274
# File 'lib/oci/identity_domains/models/extension_user_credentials_user.rb', line 265

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



259
260
261
# File 'lib/oci/identity_domains/models/extension_user_credentials_user.rb', line 259

def to_s
  to_hash.to_s
end