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 and the date and time of the expiration of the password. 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

  • :time_password_expiry (DateTime)

    The value to assign to the #time_password_expiry 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



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
268
269
270
271
272
273
274
275
276
277
278
279
280
281
# File 'lib/oci/data_safe/models/user_summary.rb', line 190

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

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

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

  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)


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

def 
  @account_status
end

#admin_rolesArray<String>

The admin roles granted to the user.

Returns:

  • (Array<String>)


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

def admin_roles
  @admin_roles
end

#are_all_schemas_accessibleBOOLEAN

Indicates whether the user has access to all the schemas.

Returns:

  • (BOOLEAN)


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

def are_all_schemas_accessible
  @are_all_schemas_accessible
end

#authentication_typeString

The user authentication method.

Returns:

  • (String)


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

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)


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

def key
  @key
end

#schema_listArray<String>

The list of database schemas current user can access.

Returns:

  • (Array<String>)


121
122
123
# File 'lib/oci/data_safe/models/user_summary.rb', line 121

def schema_list
  @schema_list
end

#target_idString

[Required] The OCID of the target database.

Returns:

  • (String)


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

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)


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

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)


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

def time_password_changed
  @time_password_changed
end

#time_password_expiryDateTime

The date and time the user's password will expire, in the format defined by RFC3339.

Returns:

  • (DateTime)


98
99
100
# File 'lib/oci/data_safe/models/user_summary.rb', line 98

def time_password_expiry
  @time_password_expiry
end

#time_user_createdDateTime

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

Returns:

  • (DateTime)


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

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)


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

def user_category
  @user_category
end

#user_nameString

[Required] The database user name.

Returns:

  • (String)


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

def user_name
  @user_name
end

#user_profileString

The user profile name.

Returns:

  • (String)


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

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>)


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

def user_types
  @user_types
end

Class Method Details

.attribute_mapObject

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



124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# File 'lib/oci/data_safe/models/user_summary.rb', line 124

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',
    'time_password_expiry': :'timePasswordExpiry',
    'user_types': :'userTypes',
    'admin_roles': :'adminRoles',
    'are_all_schemas_accessible': :'areAllSchemasAccessible',
    'schema_list': :'schemaList'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# File 'lib/oci/data_safe/models/user_summary.rb', line 147

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',
    'time_password_expiry': :'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



369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
# File 'lib/oci/data_safe/models/user_summary.rb', line 369

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 &&
    time_password_expiry == other.time_password_expiry &&
    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



413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
# File 'lib/oci/data_safe/models/user_summary.rb', line 413

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


393
394
395
# File 'lib/oci/data_safe/models/user_summary.rb', line 393

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



402
403
404
# File 'lib/oci/data_safe/models/user_summary.rb', line 402

def hash
  [key, user_name, user_category, , target_id, , time_user_created, authentication_type, , time_password_changed, time_password_expiry, 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



446
447
448
449
450
451
452
453
454
455
# File 'lib/oci/data_safe/models/user_summary.rb', line 446

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



440
441
442
# File 'lib/oci/data_safe/models/user_summary.rb', line 440

def to_s
  to_hash.to_s
end