Class: OCI::IdentityDomains::Models::ExtensionDbUserUser

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

Overview

DB User extension

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ExtensionDbUserUser

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



128
129
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
# File 'lib/oci/identity_domains/models/extension_db_user_user.rb', line 128

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.is_db_user = attributes[:'isDbUser'] unless attributes[:'isDbUser'].nil?

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

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

  self.password_verifiers = attributes[:'passwordVerifiers'] if attributes[:'passwordVerifiers']

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

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

  self.domain_level_schema = attributes[:'domainLevelSchema'] if attributes[:'domainLevelSchema']

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

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

  self.instance_level_schema = attributes[:'instanceLevelSchema'] if attributes[:'instanceLevelSchema']

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

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

  self.db_global_roles = attributes[:'dbGlobalRoles'] if attributes[:'dbGlobalRoles']

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

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

Instance Attribute Details

#db_global_rolesArray<String>

DB global roles to which the user is granted access.

Added In: 18.2.2

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

Returns:

  • (Array<String>)


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

def db_global_roles
  @db_global_roles
end

#domain_level_schemaString

DB domain level schema to which the user is granted access.

Added In: 18.2.2

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

Returns:

  • (String)


57
58
59
# File 'lib/oci/identity_domains/models/extension_db_user_user.rb', line 57

def domain_level_schema
  @domain_level_schema
end

#instance_level_schemaString

DB instance level schema to which the user is granted access.

Added In: 18.2.2

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

Returns:

  • (String)


73
74
75
# File 'lib/oci/identity_domains/models/extension_db_user_user.rb', line 73

def instance_level_schema
  @instance_level_schema
end

#is_db_userBOOLEAN

If true, indicates this is a database user.

Added In: 18.2.2

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

Returns:

  • (BOOLEAN)


25
26
27
# File 'lib/oci/identity_domains/models/extension_db_user_user.rb', line 25

def is_db_user
  @is_db_user
end

#password_verifiersArray<OCI::IdentityDomains::Models::UserExtPasswordVerifiers>

Password Verifiers for DB User.

Added In: 18.2.2

SCIM++ Properties: - idcsCompositeKey: [type] - idcsSearchable: true - multiValued: true - mutability: readOnly - required: false - returned: request - type: complex - uniqueness: none



41
42
43
# File 'lib/oci/identity_domains/models/extension_db_user_user.rb', line 41

def password_verifiers
  @password_verifiers
end

Class Method Details

.attribute_mapObject

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



92
93
94
95
96
97
98
99
100
101
102
# File 'lib/oci/identity_domains/models/extension_db_user_user.rb', line 92

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'is_db_user': :'isDbUser',
    'password_verifiers': :'passwordVerifiers',
    'domain_level_schema': :'domainLevelSchema',
    'instance_level_schema': :'instanceLevelSchema',
    'db_global_roles': :'dbGlobalRoles'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



105
106
107
108
109
110
111
112
113
114
115
# File 'lib/oci/identity_domains/models/extension_db_user_user.rb', line 105

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'is_db_user': :'BOOLEAN',
    'password_verifiers': :'Array<OCI::IdentityDomains::Models::UserExtPasswordVerifiers>',
    'domain_level_schema': :'String',
    'instance_level_schema': :'String',
    'db_global_roles': :'Array<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



172
173
174
175
176
177
178
179
180
181
# File 'lib/oci/identity_domains/models/extension_db_user_user.rb', line 172

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

  self.class == other.class &&
    is_db_user == other.is_db_user &&
    password_verifiers == other.password_verifiers &&
    domain_level_schema == other.domain_level_schema &&
    instance_level_schema == other.instance_level_schema &&
    db_global_roles == other.db_global_roles
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



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

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


186
187
188
# File 'lib/oci/identity_domains/models/extension_db_user_user.rb', line 186

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



195
196
197
# File 'lib/oci/identity_domains/models/extension_db_user_user.rb', line 195

def hash
  [is_db_user, password_verifiers, domain_level_schema, instance_level_schema, db_global_roles].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



239
240
241
242
243
244
245
246
247
248
# File 'lib/oci/identity_domains/models/extension_db_user_user.rb', line 239

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



233
234
235
# File 'lib/oci/identity_domains/models/extension_db_user_user.rb', line 233

def to_s
  to_hash.to_s
end