Class: OCI::DataSafe::Models::UserSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/data_safe/models/user_summary.rb

Overview

The summary of information about the database user. It includes details such as user type, account status, last login time, user creation time, authentication type, user profile, and time and date of the last password change. It also contains the user category derived from these user details, as well as granted privileges.

Constant Summary collapse

USER_CATEGORY_ENUM =
[
  USER_CATEGORY_CRITICAL = 'CRITICAL'.freeze,
  USER_CATEGORY_HIGH = 'HIGH'.freeze,
  USER_CATEGORY_MEDIUM = 'MEDIUM'.freeze,
  USER_CATEGORY_LOW = 'LOW'.freeze,
  USER_CATEGORY_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
ACCOUNT_STATUS_ENUM =
[
  ACCOUNT_STATUS_OPEN = 'OPEN'.freeze,
  ACCOUNT_STATUS_LOCKED = 'LOCKED'.freeze,
  ACCOUNT_STATUS_EXPIRED = 'EXPIRED'.freeze,
  ACCOUNT_STATUS_EXPIRED_AND_LOCKED = 'EXPIRED_AND_LOCKED'.freeze,
  ACCOUNT_STATUS_NONE = 'NONE'.freeze,
  ACCOUNT_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
AUTHENTICATION_TYPE_ENUM =
[
  AUTHENTICATION_TYPE_PASSWORD = 'PASSWORD'.freeze,
  AUTHENTICATION_TYPE_NONE = 'NONE'.freeze,
  AUTHENTICATION_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
USER_TYPES_ENUM =
[
  USER_TYPES_ADMIN_PRIVILEGED = 'ADMIN_PRIVILEGED'.freeze,
  USER_TYPES_APPLICATION = 'APPLICATION'.freeze,
  USER_TYPES_PRIVILEGED = 'PRIVILEGED'.freeze,
  USER_TYPES_SCHEMA = 'SCHEMA'.freeze,
  USER_TYPES_NON_PRIVILEGED = 'NON_PRIVILEGED'.freeze,
  USER_TYPES_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
ADMIN_ROLES_ENUM =
[
  ADMIN_ROLES_PDB_DBA = 'PDB_DBA'.freeze,
  ADMIN_ROLES_DBA = 'DBA'.freeze,
  ADMIN_ROLES_DV_ADMIN = 'DV_ADMIN'.freeze,
  ADMIN_ROLES_AUDIT_ADMIN = 'AUDIT_ADMIN'.freeze,
  ADMIN_ROLES_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ UserSummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :key (String)

    The value to assign to the #key property

  • :user_name (String)

    The value to assign to the #user_name property

  • :user_category (String)

    The value to assign to the #user_category property

  • :account_status (String)

    The value to assign to the #account_status property

  • :target_id (String)

    The value to assign to the #target_id property

  • :time_last_login (DateTime)

    The value to assign to the #time_last_login property

  • :time_user_created (DateTime)

    The value to assign to the #time_user_created property

  • :authentication_type (String)

    The value to assign to the #authentication_type property

  • :user_profile (String)

    The value to assign to the #user_profile property

  • :time_password_changed (DateTime)

    The value to assign to the #time_password_changed property

  • :user_types (Array<String>)

    The value to assign to the #user_types property

  • :admin_roles (Array<String>)

    The value to assign to the #admin_roles property

  • :are_all_schemas_accessible (BOOLEAN)

    The value to assign to the #are_all_schemas_accessible property

  • :schema_list (Array<String>)

    The value to assign to the #schema_list property



182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
# File 'lib/oci/data_safe/models/user_summary.rb', line 182

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

  self.user_name = attributes[:'userName'] if attributes[:'userName']

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

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

  self.user_category = attributes[:'userCategory'] if attributes[:'userCategory']

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

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

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

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

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

  self.target_id = attributes[:'targetId'] if attributes[:'targetId']

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

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

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

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

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

  self.time_user_created = attributes[:'timeUserCreated'] if attributes[:'timeUserCreated']

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

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

  self.authentication_type = attributes[:'authenticationType'] if attributes[:'authenticationType']

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

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

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

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

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

  self.time_password_changed = attributes[:'timePasswordChanged'] if attributes[:'timePasswordChanged']

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

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

  self.user_types = attributes[:'userTypes'] if attributes[:'userTypes']

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

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

  self.admin_roles = attributes[:'adminRoles'] if attributes[:'adminRoles']

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

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

  self.are_all_schemas_accessible = attributes[:'areAllSchemasAccessible'] unless attributes[:'areAllSchemasAccessible'].nil?

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

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

  self.schema_list = attributes[:'schemaList'] if attributes[:'schemaList']

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

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

Instance Attribute Details

#account_statusString

The status of the user account.

Returns:

  • (String)


69
70
71
# File 'lib/oci/data_safe/models/user_summary.rb', line 69

def 
  @account_status
end

#admin_rolesArray<String>

The admin roles granted to the user.

Returns:

  • (Array<String>)


108
109
110
# File 'lib/oci/data_safe/models/user_summary.rb', line 108

def admin_roles
  @admin_roles
end

#are_all_schemas_accessibleBOOLEAN

Indicates whether the user has access to all the schemas.

Returns:

  • (BOOLEAN)


112
113
114
# File 'lib/oci/data_safe/models/user_summary.rb', line 112

def are_all_schemas_accessible
  @are_all_schemas_accessible
end

#authentication_typeString

The user authentication method.

Returns:

  • (String)


85
86
87
# File 'lib/oci/data_safe/models/user_summary.rb', line 85

def authentication_type
  @authentication_type
end

#keyString

[Required] The unique user key. This is a system-generated identifier. Use ListUsers to get the user key for a user.

Returns:

  • (String)


57
58
59
# File 'lib/oci/data_safe/models/user_summary.rb', line 57

def key
  @key
end

#schema_listArray<String>

The list of database schemas current user can access.

Returns:

  • (Array<String>)


116
117
118
# File 'lib/oci/data_safe/models/user_summary.rb', line 116

def schema_list
  @schema_list
end

#target_idString

[Required] The OCID of the target database.

Returns:

  • (String)


73
74
75
# File 'lib/oci/data_safe/models/user_summary.rb', line 73

def target_id
  @target_id
end

#time_last_loginDateTime

The date and time the user last logged in, in the format defined by RFC3339.

Returns:

  • (DateTime)


77
78
79
# File 'lib/oci/data_safe/models/user_summary.rb', line 77

def 
  @time_last_login
end

#time_password_changedDateTime

The date and time the user password was last changed, in the format defined by RFC3339.

Returns:

  • (DateTime)


93
94
95
# File 'lib/oci/data_safe/models/user_summary.rb', line 93

def time_password_changed
  @time_password_changed
end

#time_user_createdDateTime

The date and time the user was created in the database, in the format defined by RFC3339.

Returns:

  • (DateTime)


81
82
83
# File 'lib/oci/data_safe/models/user_summary.rb', line 81

def time_user_created
  @time_user_created
end

#user_categoryString

The user category based on the privileges and other details of the user.

Returns:

  • (String)


65
66
67
# File 'lib/oci/data_safe/models/user_summary.rb', line 65

def user_category
  @user_category
end

#user_nameString

[Required] The database user name.

Returns:

  • (String)


61
62
63
# File 'lib/oci/data_safe/models/user_summary.rb', line 61

def user_name
  @user_name
end

#user_profileString

The user profile name.

Returns:

  • (String)


89
90
91
# File 'lib/oci/data_safe/models/user_summary.rb', line 89

def 
  @user_profile
end

#user_typesArray<String>

The user type, which can be a combination of the following:

'Admin Privileged': The user has administrative privileges. 'Application': The user is an Oracle E-Business Suite Applications (EBS) or Fusion Applications (FA) user. 'Privileged': The user is a privileged user. 'Schema': The user is EXPIRED & LOCKED / EXPIRED / LOCKED, or a schema-only account (authentication type is NONE). 'Non-privileged': The user is a non-privileged user.

Returns:

  • (Array<String>)


104
105
106
# File 'lib/oci/data_safe/models/user_summary.rb', line 104

def user_types
  @user_types
end

Class Method Details

.attribute_mapObject

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



119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# File 'lib/oci/data_safe/models/user_summary.rb', line 119

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'key': :'key',
    'user_name': :'userName',
    'user_category': :'userCategory',
    'account_status': :'accountStatus',
    'target_id': :'targetId',
    'time_last_login': :'timeLastLogin',
    'time_user_created': :'timeUserCreated',
    'authentication_type': :'authenticationType',
    'user_profile': :'userProfile',
    'time_password_changed': :'timePasswordChanged',
    'user_types': :'userTypes',
    'admin_roles': :'adminRoles',
    'are_all_schemas_accessible': :'areAllSchemasAccessible',
    'schema_list': :'schemaList'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# File 'lib/oci/data_safe/models/user_summary.rb', line 141

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'key': :'String',
    'user_name': :'String',
    'user_category': :'String',
    'account_status': :'String',
    'target_id': :'String',
    'time_last_login': :'DateTime',
    'time_user_created': :'DateTime',
    'authentication_type': :'String',
    'user_profile': :'String',
    'time_password_changed': :'DateTime',
    'user_types': :'Array<String>',
    'admin_roles': :'Array<String>',
    'are_all_schemas_accessible': :'BOOLEAN',
    'schema_list': :'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



355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
# File 'lib/oci/data_safe/models/user_summary.rb', line 355

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

  self.class == other.class &&
    key == other.key &&
    user_name == other.user_name &&
    user_category == other.user_category &&
     == other. &&
    target_id == other.target_id &&
     == other. &&
    time_user_created == other.time_user_created &&
    authentication_type == other.authentication_type &&
     == other. &&
    time_password_changed == other.time_password_changed &&
    user_types == other.user_types &&
    admin_roles == other.admin_roles &&
    are_all_schemas_accessible == other.are_all_schemas_accessible &&
    schema_list == other.schema_list
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



398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
# File 'lib/oci/data_safe/models/user_summary.rb', line 398

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


378
379
380
# File 'lib/oci/data_safe/models/user_summary.rb', line 378

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



387
388
389
# File 'lib/oci/data_safe/models/user_summary.rb', line 387

def hash
  [key, user_name, user_category, , target_id, , time_user_created, authentication_type, , time_password_changed, user_types, admin_roles, are_all_schemas_accessible, schema_list].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



431
432
433
434
435
436
437
438
439
440
# File 'lib/oci/data_safe/models/user_summary.rb', line 431

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



425
426
427
# File 'lib/oci/data_safe/models/user_summary.rb', line 425

def to_s
  to_hash.to_s
end