Class: OCI::IdentityDomains::Models::MyTrustedUserAgentTrustedFactors

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

Overview

Trusted 2FA Factors

Constant Summary collapse

CATEGORY_ENUM =
[
  CATEGORY_SAML = 'SAML'.freeze,
  CATEGORY_LOCAL = 'LOCAL'.freeze,
  CATEGORY_SOCIAL = 'SOCIAL'.freeze,
  CATEGORY_X509 = 'X509'.freeze,
  CATEGORY_THIRDPARTY = 'THIRDPARTY'.freeze,
  CATEGORY_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ MyTrustedUserAgentTrustedFactors

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :type (String)

    The value to assign to the #type property

  • :category (String)

    The value to assign to the #category property

  • :creation_time (String)

    The value to assign to the #creation_time property



103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# File 'lib/oci/identity_domains/models/my_trusted_user_agent_trusted_factors.rb', line 103

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

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

  self.creation_time = attributes[:'creationTime'] if attributes[:'creationTime']

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

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

Instance Attribute Details

#categoryString

Trusted Factor Type. Local, X509, SAML SOCIAL

Added In: 2111190457

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

Returns:

  • (String)


53
54
55
# File 'lib/oci/identity_domains/models/my_trusted_user_agent_trusted_factors.rb', line 53

def category
  @category
end

#creation_timeString

[Required] trust factor creation time

Added In: 19.2.1

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

Returns:

  • (String)


70
71
72
# File 'lib/oci/identity_domains/models/my_trusted_user_agent_trusted_factors.rb', line 70

def creation_time
  @creation_time
end

#typeString

[Required] Trusted Factor

Added In: 19.2.1

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

Returns:

  • (String)


36
37
38
# File 'lib/oci/identity_domains/models/my_trusted_user_agent_trusted_factors.rb', line 36

def type
  @type
end

Class Method Details

.attribute_mapObject

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



73
74
75
76
77
78
79
80
81
# File 'lib/oci/identity_domains/models/my_trusted_user_agent_trusted_factors.rb', line 73

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'type': :'type',
    'category': :'category',
    'creation_time': :'creationTime'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



84
85
86
87
88
89
90
91
92
# File 'lib/oci/identity_domains/models/my_trusted_user_agent_trusted_factors.rb', line 84

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'type': :'String',
    'category': :'String',
    'creation_time': :'String'
    # 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



140
141
142
143
144
145
146
147
# File 'lib/oci/identity_domains/models/my_trusted_user_agent_trusted_factors.rb', line 140

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

  self.class == other.class &&
    type == other.type &&
    category == other.category &&
    creation_time == other.creation_time
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



172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
# File 'lib/oci/identity_domains/models/my_trusted_user_agent_trusted_factors.rb', line 172

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


152
153
154
# File 'lib/oci/identity_domains/models/my_trusted_user_agent_trusted_factors.rb', line 152

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



161
162
163
# File 'lib/oci/identity_domains/models/my_trusted_user_agent_trusted_factors.rb', line 161

def hash
  [type, category, creation_time].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



205
206
207
208
209
210
211
212
213
214
# File 'lib/oci/identity_domains/models/my_trusted_user_agent_trusted_factors.rb', line 205

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



199
200
201
# File 'lib/oci/identity_domains/models/my_trusted_user_agent_trusted_factors.rb', line 199

def to_s
  to_hash.to_s
end