Class: OCI::IdentityDomains::Models::ExtensionPasswordStateUser

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

Overview

This extension defines attributes used to manage account passwords within a Service Provider. The extension is typically applied to a User resource, but MAY be applied to other resources that use passwords.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ExtensionPasswordStateUser

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
# File 'lib/oci/identity_domains/models/extension_password_state_user.rb', line 155

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

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

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

  self.cant_change = attributes[:'cantChange'] unless attributes[:'cantChange'].nil?

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

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

  self.cant_expire = attributes[:'cantExpire'] unless attributes[:'cantExpire'].nil?

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

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

  self.must_change = attributes[:'mustChange'] unless attributes[:'mustChange'].nil?

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

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

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

  self.last_successful_validation_date = attributes[:'lastSuccessfulValidationDate'] if attributes[:'lastSuccessfulValidationDate']

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

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

  self.last_failed_validation_date = attributes[:'lastFailedValidationDate'] if attributes[:'lastFailedValidationDate']

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

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

  self.applicable_password_policy = attributes[:'applicablePasswordPolicy'] if attributes[:'applicablePasswordPolicy']

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

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

Instance Attribute Details

#applicable_password_policyOCI::IdentityDomains::Models::UserExtApplicablePasswordPolicy



107
108
109
# File 'lib/oci/identity_domains/models/extension_password_state_user.rb', line 107

def applicable_password_policy
  @applicable_password_policy
end

#cant_changeBOOLEAN

Indicates that the current password MAY NOT be changed and all other password expiry settings SHALL be ignored

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

Returns:

  • (BOOLEAN)


35
36
37
# File 'lib/oci/identity_domains/models/extension_password_state_user.rb', line 35

def cant_change
  @cant_change
end

#cant_expireBOOLEAN

Indicates that the password expiry policy will not be applied for the current Resource

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

Returns:

  • (BOOLEAN)


48
49
50
# File 'lib/oci/identity_domains/models/extension_password_state_user.rb', line 48

def cant_expire
  @cant_expire
end

#expiredBOOLEAN

Indicates that the password has expired

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

Returns:

  • (BOOLEAN)


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

def expired
  @expired
end

#last_failed_validation_dateString

A DateTime that specifies the date and time when last failed password validation was set

Added In: 2011192329

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

Returns:

  • (String)


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

def last_failed_validation_date
  @last_failed_validation_date
end

#last_successful_set_dateString

A DateTime that specifies the date and time when the current password was set

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

Returns:

  • (String)


22
23
24
# File 'lib/oci/identity_domains/models/extension_password_state_user.rb', line 22

def last_successful_set_date
  @last_successful_set_date
end

#last_successful_validation_dateString

A DateTime that specifies the date and time when last successful password validation was set

Added In: 2011192329

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

Returns:

  • (String)


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

def last_successful_validation_date
  @last_successful_validation_date
end

#must_changeBOOLEAN

Indicates that the subject password value MUST change on next login. If not changed, typically the account is locked. The value may be set indirectly when the subject's current password expires or directly set by an administrator.

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

Returns:

  • (BOOLEAN)


61
62
63
# File 'lib/oci/identity_domains/models/extension_password_state_user.rb', line 61

def must_change
  @must_change
end

Class Method Details

.attribute_mapObject

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



110
111
112
113
114
115
116
117
118
119
120
121
122
123
# File 'lib/oci/identity_domains/models/extension_password_state_user.rb', line 110

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'last_successful_set_date': :'lastSuccessfulSetDate',
    'cant_change': :'cantChange',
    'cant_expire': :'cantExpire',
    'must_change': :'mustChange',
    'expired': :'expired',
    'last_successful_validation_date': :'lastSuccessfulValidationDate',
    'last_failed_validation_date': :'lastFailedValidationDate',
    'applicable_password_policy': :'applicablePasswordPolicy'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



126
127
128
129
130
131
132
133
134
135
136
137
138
139
# File 'lib/oci/identity_domains/models/extension_password_state_user.rb', line 126

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'last_successful_set_date': :'String',
    'cant_change': :'BOOLEAN',
    'cant_expire': :'BOOLEAN',
    'must_change': :'BOOLEAN',
    'expired': :'BOOLEAN',
    'last_successful_validation_date': :'String',
    'last_failed_validation_date': :'String',
    'applicable_password_policy': :'OCI::IdentityDomains::Models::UserExtApplicablePasswordPolicy'
    # 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



213
214
215
216
217
218
219
220
221
222
223
224
225
# File 'lib/oci/identity_domains/models/extension_password_state_user.rb', line 213

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

  self.class == other.class &&
    last_successful_set_date == other.last_successful_set_date &&
    cant_change == other.cant_change &&
    cant_expire == other.cant_expire &&
    must_change == other.must_change &&
    expired == other.expired &&
    last_successful_validation_date == other.last_successful_validation_date &&
    last_failed_validation_date == other.last_failed_validation_date &&
    applicable_password_policy == other.applicable_password_policy
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



250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
# File 'lib/oci/identity_domains/models/extension_password_state_user.rb', line 250

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


230
231
232
# File 'lib/oci/identity_domains/models/extension_password_state_user.rb', line 230

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



239
240
241
# File 'lib/oci/identity_domains/models/extension_password_state_user.rb', line 239

def hash
  [last_successful_set_date, cant_change, cant_expire, must_change, expired, last_successful_validation_date, last_failed_validation_date, applicable_password_policy].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



283
284
285
286
287
288
289
290
291
292
# File 'lib/oci/identity_domains/models/extension_password_state_user.rb', line 283

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



277
278
279
# File 'lib/oci/identity_domains/models/extension_password_state_user.rb', line 277

def to_s
  to_hash.to_s
end