Class: OCI::IdentityDomains::Models::UserExtLocked
- Inherits:
-
Object
- Object
- OCI::IdentityDomains::Models::UserExtLocked
- Defined in:
- lib/oci/identity_domains/models/user_ext_locked.rb
Overview
A complex attribute that indicates an account is locked (blocking any new sessions).
SCIM++ Properties: - idcsCsvAttributeNameMappings: [[columnHeaderName:Locked, mapsTo:locked.on], [columnHeaderName:Locked Reason, mapsTo:locked.reason], [columnHeaderName:Locked Date, mapsTo:locked.lockDate]] - idcsSearchable: false - idcsAllowUpdatesInReadOnlyMode: true - multiValued: false - mutability: readWrite - required: false - returned: default - type: complex - uniqueness: none
Instance Attribute Summary collapse
-
#expired ⇒ BOOLEAN
Indicates whether the user password is expired.
-
#lock_date ⇒ String
The date and time that the current resource was locked.
-
#on ⇒ BOOLEAN
Indicates that the account is locked.
-
#reason ⇒ Integer
Indicates the reason for locking the account.
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 = {}) ⇒ UserExtLocked
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 = {}) ⇒ UserExtLocked
Initializes the object
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
# File 'lib/oci/identity_domains/models/user_ext_locked.rb', line 117 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.reason = attributes[:'reason'] if attributes[:'reason'] self.on = attributes[:'on'] unless attributes[:'on'].nil? self.lock_date = attributes[:'lockDate'] if attributes[:'lockDate'] raise 'You cannot provide both :lockDate and :lock_date' if attributes.key?(:'lockDate') && attributes.key?(:'lock_date') self.lock_date = attributes[:'lock_date'] if attributes[:'lock_date'] self.expired = attributes[:'expired'] unless attributes[:'expired'].nil? end |
Instance Attribute Details
#expired ⇒ BOOLEAN
Indicates whether the user password is expired. If this value is false, password expiry is still evaluated during user login.
Added In: 20.1.3
SCIM++ Properties: - caseExact: false - idcsSearchable: false - multiValued: false - mutability: readWrite - required: false - returned: request - type: boolean - uniqueness: none
81 82 83 |
# File 'lib/oci/identity_domains/models/user_ext_locked.rb', line 81 def expired @expired end |
#lock_date ⇒ String
The date and time that the current resource was locked.
SCIM++ Properties: - idcsSearchable: false - multiValued: false - mutability: readWrite - idcsRequiresWriteForAccessFlows: true - required: false - returned: default - type: dateTime - uniqueness: none
65 66 67 |
# File 'lib/oci/identity_domains/models/user_ext_locked.rb', line 65 def lock_date @lock_date end |
#on ⇒ BOOLEAN
Indicates that the account is locked.
SCIM++ Properties: - caseExact: false - idcsSearchable: true - multiValued: false - mutability: readWrite - idcsRequiresWriteForAccessFlows: true - idcsRequiresImmediateReadAfterWriteForAccessFlows: true - required: false - returned: default - type: boolean - uniqueness: none
51 52 53 |
# File 'lib/oci/identity_domains/models/user_ext_locked.rb', line 51 def on @on end |
#reason ⇒ Integer
Indicates the reason for locking the account. Valid values are: 0 - failed password login attempts, 1 - admin lock, 2 - failed reset password attempts, 3 - failed MFA login attempts, 4 - failed MFA login attempts for federated user, 5 - failed Database login attempts
SCIM++ Properties: - idcsSearchable: false - multiValued: false - mutability: readWrite - idcsRequiresWriteForAccessFlows: true - idcsRequiresImmediateReadAfterWriteForAccessFlows: true - required: false - returned: default - type: integer - uniqueness: none
35 36 37 |
# File 'lib/oci/identity_domains/models/user_ext_locked.rb', line 35 def reason @reason end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
84 85 86 87 88 89 90 91 92 93 |
# File 'lib/oci/identity_domains/models/user_ext_locked.rb', line 84 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'reason': :'reason', 'on': :'on', 'lock_date': :'lockDate', 'expired': :'expired' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
96 97 98 99 100 101 102 103 104 105 |
# File 'lib/oci/identity_domains/models/user_ext_locked.rb', line 96 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'reason': :'Integer', 'on': :'BOOLEAN', 'lock_date': :'String', 'expired': :'BOOLEAN' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
143 144 145 146 147 148 149 150 151 |
# File 'lib/oci/identity_domains/models/user_ext_locked.rb', line 143 def ==(other) return true if equal?(other) self.class == other.class && reason == other.reason && on == other.on && lock_date == other.lock_date && expired == other.expired end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 |
# File 'lib/oci/identity_domains/models/user_ext_locked.rb', line 176 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
156 157 158 |
# File 'lib/oci/identity_domains/models/user_ext_locked.rb', line 156 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
165 166 167 |
# File 'lib/oci/identity_domains/models/user_ext_locked.rb', line 165 def hash [reason, on, lock_date, expired].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
209 210 211 212 213 214 215 216 217 218 |
# File 'lib/oci/identity_domains/models/user_ext_locked.rb', line 209 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
203 204 205 |
# File 'lib/oci/identity_domains/models/user_ext_locked.rb', line 203 def to_s to_hash.to_s end |