Class: OCI::IdentityDomains::Models::AccountRecoverySetting

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

Overview

Account Recovery Settings

Constant Summary collapse

IDCS_PREVENTED_OPERATIONS_ENUM =
[
  IDCS_PREVENTED_OPERATIONS_REPLACE = 'replace'.freeze,
  IDCS_PREVENTED_OPERATIONS_UPDATE = 'update'.freeze,
  IDCS_PREVENTED_OPERATIONS_DELETE = 'delete'.freeze,
  IDCS_PREVENTED_OPERATIONS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
FACTORS_ENUM =
[
  FACTORS_EMAIL = 'email'.freeze,
  FACTORS_SMS = 'sms'.freeze,
  FACTORS_SECQUESTIONS = 'secquestions'.freeze,
  FACTORS_PUSH = 'push'.freeze,
  FACTORS_TOTP = 'totp'.freeze,
  FACTORS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ AccountRecoverySetting

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
# File 'lib/oci/identity_domains/models/account_recovery_setting.rb', line 306

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

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

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

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

  self.idcs_created_by = attributes[:'idcsCreatedBy'] if attributes[:'idcsCreatedBy']

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

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

  self.idcs_last_modified_by = attributes[:'idcsLastModifiedBy'] if attributes[:'idcsLastModifiedBy']

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

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

  self.idcs_prevented_operations = attributes[:'idcsPreventedOperations'] if attributes[:'idcsPreventedOperations']

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

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

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

  self.delete_in_progress = attributes[:'deleteInProgress'] unless attributes[:'deleteInProgress'].nil?

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

  self.delete_in_progress = attributes[:'delete_in_progress'] unless attributes[:'delete_in_progress'].nil?

  self.idcs_last_upgraded_in_release = attributes[:'idcsLastUpgradedInRelease'] if attributes[:'idcsLastUpgradedInRelease']

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

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

  self.domain_ocid = attributes[:'domainOcid'] if attributes[:'domainOcid']

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

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

  self.compartment_ocid = attributes[:'compartmentOcid'] if attributes[:'compartmentOcid']

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

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

  self.tenancy_ocid = attributes[:'tenancyOcid'] if attributes[:'tenancyOcid']

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

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

  self.external_id = attributes[:'externalId'] if attributes[:'externalId']

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

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

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

  self.max_incorrect_attempts = attributes[:'maxIncorrectAttempts'] if attributes[:'maxIncorrectAttempts']

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

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

  self.lockout_duration = attributes[:'lockoutDuration'] if attributes[:'lockoutDuration']

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

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

Instance Attribute Details

#compartment_ocidString

OCI Compartment Id (ocid) in which the resource lives.

SCIM++ Properties: - caseExact: false - idcsSearchable: false - multiValued: false - mutability: readOnly - required: false - returned: default - type: string - uniqueness: none

Returns:

  • (String)


160
161
162
# File 'lib/oci/identity_domains/models/account_recovery_setting.rb', line 160

def compartment_ocid
  @compartment_ocid
end

#delete_in_progressBOOLEAN

A boolean flag indicating this resource in the process of being deleted. Usually set to true when synchronous deletion of the resource would take too long.

SCIM++ Properties: - caseExact: false - idcsSearchable: true - multiValued: false - mutability: readOnly - required: false - returned: default - type: boolean - uniqueness: none

Returns:

  • (BOOLEAN)


118
119
120
# File 'lib/oci/identity_domains/models/account_recovery_setting.rb', line 118

def delete_in_progress
  @delete_in_progress
end

#domain_ocidString

OCI Domain Id (ocid) in which the resource lives.

SCIM++ Properties: - caseExact: false - idcsSearchable: false - multiValued: false - mutability: readOnly - required: false - returned: default - type: string - uniqueness: none

Returns:

  • (String)


146
147
148
# File 'lib/oci/identity_domains/models/account_recovery_setting.rb', line 146

def domain_ocid
  @domain_ocid
end

#external_idString

An identifier for the Resource as defined by the Service Consumer. The externalId may simplify identification of the Resource between Service Consumer and Service Provider by allowing the Consumer to refer to the Resource with its own identifier, obviating the need to store a local mapping between the local identifier of the Resource and the identifier used by the Service Provider. Each Resource MAY include a non-empty externalId value. The value of the externalId attribute is always issued by the Service Consumer and can never be specified by the Service Provider. The Service Provider MUST always interpret the externalId as scoped to the Service Consumer's tenant.

SCIM++ Properties: - caseExact: false - multiValued: false - mutability: readWrite - required: false - returned: default - type: string - uniqueness: none

Returns:

  • (String)


187
188
189
# File 'lib/oci/identity_domains/models/account_recovery_setting.rb', line 187

def external_id
  @external_id
end

#factorsArray<String>

[Required] The account recovery factor used (for example, email, mobile number (SMS), security questions, mobile application push or TOTP) to verify the identity of the user and reset the user's password.

SCIM++ Properties: - caseExact: true - idcsSearchable: true - multiValued: true - mutability: readWrite - required: true - returned: default - type: string - uniqueness: none

Returns:

  • (Array<String>)


201
202
203
# File 'lib/oci/identity_domains/models/account_recovery_setting.rb', line 201

def factors
  @factors
end

#idString

Unique identifier for the SCIM Resource as defined by the Service Provider. Each representation of the Resource MUST include a non-empty id value. This identifier MUST be unique across the Service Provider's entire set of Resources. It MUST be a stable, non-reassignable identifier that does not change when the same Resource is returned in subsequent requests. The value of the id attribute is always issued by the Service Provider and MUST never be specified by the Service Consumer. bulkId: is a reserved keyword and MUST NOT be used in the unique identifier.

SCIM++ Properties: - caseExact: false - idcsSearchable: true - multiValued: false - mutability: readOnly - required: false - returned: always - type: string - uniqueness: global

Returns:

  • (String)


40
41
42
# File 'lib/oci/identity_domains/models/account_recovery_setting.rb', line 40

def id
  @id
end

#idcs_created_byOCI::IdentityDomains::Models::IdcsCreatedBy



74
75
76
# File 'lib/oci/identity_domains/models/account_recovery_setting.rb', line 74

def idcs_created_by
  @idcs_created_by
end

#idcs_last_modified_byOCI::IdentityDomains::Models::IdcsLastModifiedBy



77
78
79
# File 'lib/oci/identity_domains/models/account_recovery_setting.rb', line 77

def idcs_last_modified_by
  @idcs_last_modified_by
end

#idcs_last_upgraded_in_releaseString

The release number when the resource was upgraded.

SCIM++ Properties: - caseExact: false - idcsSearchable: false - multiValued: false - mutability: readOnly - required: false - returned: request - type: string - uniqueness: none

Returns:

  • (String)


132
133
134
# File 'lib/oci/identity_domains/models/account_recovery_setting.rb', line 132

def idcs_last_upgraded_in_release
  @idcs_last_upgraded_in_release
end

#idcs_prevented_operationsArray<String>

Each value of this attribute specifies an operation that only an internal client may perform on this particular resource.

SCIM++ Properties: - idcsSearchable: false - multiValued: true - mutability: readOnly - required: false - returned: request - type: string - uniqueness: none

Returns:

  • (Array<String>)


90
91
92
# File 'lib/oci/identity_domains/models/account_recovery_setting.rb', line 90

def idcs_prevented_operations
  @idcs_prevented_operations
end

#lockout_durationInteger

[Required] Indicates how many minutes to disable account recovery for the user. The default value is 30 metric minutes.

SCIM++ Properties: - caseExact: false - multiValued: false - mutability: readWrite - required: true - returned: default - type: integer - uniqueness: none - idcsMinValue: 5 - idcsMaxValue: 9999

Returns:

  • (Integer)


231
232
233
# File 'lib/oci/identity_domains/models/account_recovery_setting.rb', line 231

def lockout_duration
  @lockout_duration
end

#max_incorrect_attemptsInteger

[Required] Indicates the maximum number of failed account recovery attempts allowed for the user.

SCIM++ Properties: - caseExact: false - multiValued: false - mutability: readWrite - required: true - returned: default - type: integer - uniqueness: none - idcsMinValue: 1 - idcsMaxValue: 99

Returns:

  • (Integer)


216
217
218
# File 'lib/oci/identity_domains/models/account_recovery_setting.rb', line 216

def max_incorrect_attempts
  @max_incorrect_attempts
end

#metaOCI::IdentityDomains::Models::Meta



71
72
73
# File 'lib/oci/identity_domains/models/account_recovery_setting.rb', line 71

def meta
  @meta
end

#ocidString

Unique OCI identifier for the SCIM Resource.

SCIM++ Properties: - caseExact: true - idcsSearchable: true - multiValued: false - mutability: immutable - required: false - returned: default - type: string - uniqueness: global

Returns:

  • (String)


54
55
56
# File 'lib/oci/identity_domains/models/account_recovery_setting.rb', line 54

def ocid
  @ocid
end

#schemasArray<String>

[Required] REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \“enterprise\” extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior.

SCIM++ Properties: - caseExact: false - idcsSearchable: false - multiValued: true - mutability: readWrite - required: true - returned: default - type: string - uniqueness: none

Returns:

  • (Array<String>)


68
69
70
# File 'lib/oci/identity_domains/models/account_recovery_setting.rb', line 68

def schemas
  @schemas
end

#tagsArray<OCI::IdentityDomains::Models::Tags>

A list of tags on this resource.

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



104
105
106
# File 'lib/oci/identity_domains/models/account_recovery_setting.rb', line 104

def tags
  @tags
end

#tenancy_ocidString

OCI Tenant Id (ocid) in which the resource lives.

SCIM++ Properties: - caseExact: false - idcsSearchable: false - multiValued: false - mutability: readOnly - required: false - returned: default - type: string - uniqueness: none

Returns:

  • (String)


174
175
176
# File 'lib/oci/identity_domains/models/account_recovery_setting.rb', line 174

def tenancy_ocid
  @tenancy_ocid
end

Class Method Details

.attribute_mapObject

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



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

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'ocid': :'ocid',
    'schemas': :'schemas',
    'meta': :'meta',
    'idcs_created_by': :'idcsCreatedBy',
    'idcs_last_modified_by': :'idcsLastModifiedBy',
    'idcs_prevented_operations': :'idcsPreventedOperations',
    'tags': :'tags',
    'delete_in_progress': :'deleteInProgress',
    'idcs_last_upgraded_in_release': :'idcsLastUpgradedInRelease',
    'domain_ocid': :'domainOcid',
    'compartment_ocid': :'compartmentOcid',
    'tenancy_ocid': :'tenancyOcid',
    'external_id': :'externalId',
    'factors': :'factors',
    'max_incorrect_attempts': :'maxIncorrectAttempts',
    'lockout_duration': :'lockoutDuration'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
# File 'lib/oci/identity_domains/models/account_recovery_setting.rb', line 259

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'ocid': :'String',
    'schemas': :'Array<String>',
    'meta': :'OCI::IdentityDomains::Models::Meta',
    'idcs_created_by': :'OCI::IdentityDomains::Models::IdcsCreatedBy',
    'idcs_last_modified_by': :'OCI::IdentityDomains::Models::IdcsLastModifiedBy',
    'idcs_prevented_operations': :'Array<String>',
    'tags': :'Array<OCI::IdentityDomains::Models::Tags>',
    'delete_in_progress': :'BOOLEAN',
    'idcs_last_upgraded_in_release': :'String',
    'domain_ocid': :'String',
    'compartment_ocid': :'String',
    'tenancy_ocid': :'String',
    'external_id': :'String',
    'factors': :'Array<String>',
    'max_incorrect_attempts': :'Integer',
    'lockout_duration': :'Integer'
    # 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



438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
# File 'lib/oci/identity_domains/models/account_recovery_setting.rb', line 438

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

  self.class == other.class &&
    id == other.id &&
    ocid == other.ocid &&
    schemas == other.schemas &&
    meta == other.meta &&
    idcs_created_by == other.idcs_created_by &&
    idcs_last_modified_by == other.idcs_last_modified_by &&
    idcs_prevented_operations == other.idcs_prevented_operations &&
    tags == other.tags &&
    delete_in_progress == other.delete_in_progress &&
    idcs_last_upgraded_in_release == other.idcs_last_upgraded_in_release &&
    domain_ocid == other.domain_ocid &&
    compartment_ocid == other.compartment_ocid &&
    tenancy_ocid == other.tenancy_ocid &&
    external_id == other.external_id &&
    factors == other.factors &&
    max_incorrect_attempts == other.max_incorrect_attempts &&
    lockout_duration == other.lockout_duration
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



484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
# File 'lib/oci/identity_domains/models/account_recovery_setting.rb', line 484

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


464
465
466
# File 'lib/oci/identity_domains/models/account_recovery_setting.rb', line 464

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



473
474
475
# File 'lib/oci/identity_domains/models/account_recovery_setting.rb', line 473

def hash
  [id, ocid, schemas, meta, idcs_created_by, idcs_last_modified_by, idcs_prevented_operations, tags, delete_in_progress, idcs_last_upgraded_in_release, domain_ocid, compartment_ocid, tenancy_ocid, external_id, factors, max_incorrect_attempts, lockout_duration].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



517
518
519
520
521
522
523
524
525
526
# File 'lib/oci/identity_domains/models/account_recovery_setting.rb', line 517

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



511
512
513
# File 'lib/oci/identity_domains/models/account_recovery_setting.rb', line 511

def to_s
  to_hash.to_s
end