Class: OCI::IdentityDomains::Models::AuthenticationFactorSettingsEndpointRestrictions

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

Overview

Settings that describe the set of restrictions that the system should apply to devices and trusted endpoints of a user

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ AuthenticationFactorSettingsEndpointRestrictions

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# File 'lib/oci/identity_domains/models/authentication_factor_settings_endpoint_restrictions.rb', line 130

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

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

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

  self.max_trusted_endpoints = attributes[:'maxTrustedEndpoints'] if attributes[:'maxTrustedEndpoints']

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

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

  self.max_endpoint_trust_duration_in_days = attributes[:'maxEndpointTrustDurationInDays'] if attributes[:'maxEndpointTrustDurationInDays']

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

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

  self.trusted_endpoints_enabled = attributes[:'trustedEndpointsEnabled'] unless attributes[:'trustedEndpointsEnabled'].nil?

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

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

  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']
end

Instance Attribute Details

#max_endpoint_trust_duration_in_daysInteger

[Required] Maximum number of days until an endpoint can be trusted

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

Returns:

  • (Integer)


63
64
65
# File 'lib/oci/identity_domains/models/authentication_factor_settings_endpoint_restrictions.rb', line 63

def max_endpoint_trust_duration_in_days
  @max_endpoint_trust_duration_in_days
end

#max_enrolled_devicesInteger

[Required] Maximum number of enrolled devices per user

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

Returns:

  • (Integer)


33
34
35
# File 'lib/oci/identity_domains/models/authentication_factor_settings_endpoint_restrictions.rb', line 33

def max_enrolled_devices
  @max_enrolled_devices
end

#max_incorrect_attemptsInteger

[Required] An integer that represents the maximum number of failed MFA logins before an account is locked

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

Returns:

  • (Integer)


91
92
93
# File 'lib/oci/identity_domains/models/authentication_factor_settings_endpoint_restrictions.rb', line 91

def max_incorrect_attempts
  @max_incorrect_attempts
end

#max_trusted_endpointsInteger

[Required] Max number of trusted endpoints per user

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

Returns:

  • (Integer)


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

def max_trusted_endpoints
  @max_trusted_endpoints
end

#trusted_endpoints_enabledBOOLEAN

[Required] Specify if trusted endpoints are enabled

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

Returns:

  • (BOOLEAN)


76
77
78
# File 'lib/oci/identity_domains/models/authentication_factor_settings_endpoint_restrictions.rb', line 76

def trusted_endpoints_enabled
  @trusted_endpoints_enabled
end

Class Method Details

.attribute_mapObject

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



94
95
96
97
98
99
100
101
102
103
104
# File 'lib/oci/identity_domains/models/authentication_factor_settings_endpoint_restrictions.rb', line 94

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'max_enrolled_devices': :'maxEnrolledDevices',
    'max_trusted_endpoints': :'maxTrustedEndpoints',
    'max_endpoint_trust_duration_in_days': :'maxEndpointTrustDurationInDays',
    'trusted_endpoints_enabled': :'trustedEndpointsEnabled',
    'max_incorrect_attempts': :'maxIncorrectAttempts'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



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

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'max_enrolled_devices': :'Integer',
    'max_trusted_endpoints': :'Integer',
    'max_endpoint_trust_duration_in_days': :'Integer',
    'trusted_endpoints_enabled': :'BOOLEAN',
    'max_incorrect_attempts': :'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



174
175
176
177
178
179
180
181
182
183
# File 'lib/oci/identity_domains/models/authentication_factor_settings_endpoint_restrictions.rb', line 174

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

  self.class == other.class &&
    max_enrolled_devices == other.max_enrolled_devices &&
    max_trusted_endpoints == other.max_trusted_endpoints &&
    max_endpoint_trust_duration_in_days == other.max_endpoint_trust_duration_in_days &&
    trusted_endpoints_enabled == other.trusted_endpoints_enabled &&
    max_incorrect_attempts == other.max_incorrect_attempts
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



208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
# File 'lib/oci/identity_domains/models/authentication_factor_settings_endpoint_restrictions.rb', line 208

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


188
189
190
# File 'lib/oci/identity_domains/models/authentication_factor_settings_endpoint_restrictions.rb', line 188

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



197
198
199
# File 'lib/oci/identity_domains/models/authentication_factor_settings_endpoint_restrictions.rb', line 197

def hash
  [max_enrolled_devices, max_trusted_endpoints, max_endpoint_trust_duration_in_days, trusted_endpoints_enabled, max_incorrect_attempts].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



241
242
243
244
245
246
247
248
249
250
# File 'lib/oci/identity_domains/models/authentication_factor_settings_endpoint_restrictions.rb', line 241

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



235
236
237
# File 'lib/oci/identity_domains/models/authentication_factor_settings_endpoint_restrictions.rb', line 235

def to_s
  to_hash.to_s
end