Class: OCI::IdentityDataPlane::Models::BadUserStateAuthenticateUserResult

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/identity_data_plane/models/bad_user_state_authenticate_user_result.rb

Overview

BadUserStateAuthenticateUserResult model.

Constant Summary collapse

USER_STATE_ENUM =
[
  USER_STATE_USER_BLOCKED = 'USER_BLOCKED'.freeze,
  USER_STATE_USER_DISABLED = 'USER_DISABLED'.freeze,
  USER_STATE_ONE_TIME_PASSWORD_EXPIRED = 'ONE_TIME_PASSWORD_EXPIRED'.freeze,
  USER_STATE_PASSWORD_INVALID = 'PASSWORD_INVALID'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ BadUserStateAuthenticateUserResult

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :tenant_input (String)

    The value to assign to the #tenant_input property

  • :user_input (String)

    The value to assign to the #user_input property

  • :resolved_tenant_id (String)

    The value to assign to the #resolved_tenant_id property

  • :resolved_user_id (String)

    The value to assign to the #resolved_user_id property

  • :user_state (String)

    The value to assign to the #user_state property



75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/oci/identity_data_plane/models/bad_user_state_authenticate_user_result.rb', line 75

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

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

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

  self.user_input = attributes[:'userInput'] if attributes[:'userInput']

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

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

  self.resolved_tenant_id = attributes[:'resolvedTenantId'] if attributes[:'resolvedTenantId']

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

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

  self.resolved_user_id = attributes[:'resolvedUserId'] if attributes[:'resolvedUserId']

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

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

  self.user_state = attributes[:'userState'] if attributes[:'userState']

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

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

Instance Attribute Details

#resolved_tenant_idString

[Required] The resolved tenant id.

Returns:

  • (String)


28
29
30
# File 'lib/oci/identity_data_plane/models/bad_user_state_authenticate_user_result.rb', line 28

def resolved_tenant_id
  @resolved_tenant_id
end

#resolved_user_idString

[Required] The resolved user id.

Returns:

  • (String)


32
33
34
# File 'lib/oci/identity_data_plane/models/bad_user_state_authenticate_user_result.rb', line 32

def resolved_user_id
  @resolved_user_id
end

#tenant_inputString

[Required] The tenant name.

Returns:

  • (String)


20
21
22
# File 'lib/oci/identity_data_plane/models/bad_user_state_authenticate_user_result.rb', line 20

def tenant_input
  @tenant_input
end

#user_inputString

[Required] The user name.

Returns:

  • (String)


24
25
26
# File 'lib/oci/identity_data_plane/models/bad_user_state_authenticate_user_result.rb', line 24

def user_input
  @user_input
end

#user_stateString

[Required] The bad user state.

Returns:

  • (String)


36
37
38
# File 'lib/oci/identity_data_plane/models/bad_user_state_authenticate_user_result.rb', line 36

def user_state
  @user_state
end

Class Method Details

.attribute_mapObject

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



39
40
41
42
43
44
45
46
47
48
49
# File 'lib/oci/identity_data_plane/models/bad_user_state_authenticate_user_result.rb', line 39

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'tenant_input': :'tenantInput',
    'user_input': :'userInput',
    'resolved_tenant_id': :'resolvedTenantId',
    'resolved_user_id': :'resolvedUserId',
    'user_state': :'userState'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



52
53
54
55
56
57
58
59
60
61
62
# File 'lib/oci/identity_data_plane/models/bad_user_state_authenticate_user_result.rb', line 52

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'tenant_input': :'String',
    'user_input': :'String',
    'resolved_tenant_id': :'String',
    'resolved_user_id': :'String',
    'user_state': :'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



127
128
129
130
131
132
133
134
135
136
# File 'lib/oci/identity_data_plane/models/bad_user_state_authenticate_user_result.rb', line 127

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

  self.class == other.class &&
    tenant_input == other.tenant_input &&
    user_input == other.user_input &&
    resolved_tenant_id == other.resolved_tenant_id &&
    resolved_user_id == other.resolved_user_id &&
    user_state == other.user_state
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



161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
# File 'lib/oci/identity_data_plane/models/bad_user_state_authenticate_user_result.rb', line 161

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


141
142
143
# File 'lib/oci/identity_data_plane/models/bad_user_state_authenticate_user_result.rb', line 141

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



150
151
152
# File 'lib/oci/identity_data_plane/models/bad_user_state_authenticate_user_result.rb', line 150

def hash
  [tenant_input, user_input, resolved_tenant_id, resolved_user_id, user_state].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



194
195
196
197
198
199
200
201
202
203
# File 'lib/oci/identity_data_plane/models/bad_user_state_authenticate_user_result.rb', line 194

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



188
189
190
# File 'lib/oci/identity_data_plane/models/bad_user_state_authenticate_user_result.rb', line 188

def to_s
  to_hash.to_s
end