Class: OCI::DataSafe::Models::UserSummary
- Inherits:
-
Object
- Object
- OCI::DataSafe::Models::UserSummary
- 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
-
#account_status ⇒ String
The status of the user account.
-
#admin_roles ⇒ Array<String>
The admin roles granted to the user.
-
#are_all_schemas_accessible ⇒ BOOLEAN
Indicates whether the user has access to all the schemas.
-
#authentication_type ⇒ String
The user authentication method.
-
#key ⇒ String
[Required] The unique user key.
-
#schema_list ⇒ Array<String>
The list of database schemas current user can access.
-
#target_id ⇒ String
[Required] The OCID of the target database.
-
#time_last_login ⇒ DateTime
The date and time the user last logged in, in the format defined by RFC3339.
-
#time_password_changed ⇒ DateTime
The date and time the user password was last changed, in the format defined by RFC3339.
-
#time_password_expiry ⇒ DateTime
The date and time the user's password will expire, in the format defined by RFC3339.
-
#time_user_created ⇒ DateTime
The date and time the user was created in the database, in the format defined by RFC3339.
-
#user_category ⇒ String
The user category based on the privileges and other details of the user.
-
#user_name ⇒ String
[Required] The database user name.
-
#user_profile ⇒ String
The user profile name.
-
#user_types ⇒ Array<String>
The user type, which can be a combination of the following:.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ UserSummary
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ UserSummary
Initializes the object
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.account_status = attributes[:'accountStatus'] if attributes[:'accountStatus'] raise 'You cannot provide both :accountStatus and :account_status' if attributes.key?(:'accountStatus') && attributes.key?(:'account_status') self.account_status = 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.time_last_login = 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.time_last_login = 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.user_profile = attributes[:'userProfile'] if attributes[:'userProfile'] raise 'You cannot provide both :userProfile and :user_profile' if attributes.key?(:'userProfile') && attributes.key?(:'user_profile') self.user_profile = 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_status ⇒ String
The status of the user account.
70 71 72 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 70 def account_status @account_status end |
#admin_roles ⇒ Array<String>
The admin roles granted to the user.
113 114 115 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 113 def admin_roles @admin_roles end |
#are_all_schemas_accessible ⇒ BOOLEAN
Indicates whether the user has access to all the schemas.
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_type ⇒ String
The user authentication method.
86 87 88 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 86 def authentication_type @authentication_type end |
#key ⇒ String
[Required] The unique user key. This is a system-generated identifier. Use ListUsers to get the user key for a user.
58 59 60 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 58 def key @key end |
#schema_list ⇒ Array<String>
The list of database schemas current user can access.
121 122 123 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 121 def schema_list @schema_list end |
#target_id ⇒ String
[Required] The OCID of the target database.
74 75 76 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 74 def target_id @target_id end |
#time_last_login ⇒ DateTime
The date and time the user last logged in, in the format defined by RFC3339.
78 79 80 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 78 def time_last_login @time_last_login end |
#time_password_changed ⇒ DateTime
The date and time the user password was last changed, in the format defined by RFC3339.
94 95 96 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 94 def time_password_changed @time_password_changed end |
#time_password_expiry ⇒ DateTime
The date and time the user's password will expire, in the format defined by RFC3339.
98 99 100 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 98 def time_password_expiry @time_password_expiry end |
#time_user_created ⇒ DateTime
The date and time the user was created in the database, in the format defined by RFC3339.
82 83 84 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 82 def time_user_created @time_user_created end |
#user_category ⇒ String
The user category based on the privileges and other details of the user.
66 67 68 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 66 def user_category @user_category end |
#user_name ⇒ String
[Required] The database user name.
62 63 64 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 62 def user_name @user_name end |
#user_profile ⇒ String
The user profile name.
90 91 92 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 90 def user_profile @user_profile end |
#user_types ⇒ Array<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.
109 110 111 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 109 def user_types @user_types end |
Class Method Details
.attribute_map ⇒ Object
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_types ⇒ Object
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.
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 && account_status == other.account_status && target_id == other.target_id && time_last_login == other.time_last_login && time_user_created == other.time_user_created && authentication_type == other.authentication_type && user_profile == other.user_profile && 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
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
393 394 395 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 393 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
402 403 404 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 402 def hash [key, user_name, user_category, account_status, target_id, time_last_login, time_user_created, authentication_type, user_profile, time_password_changed, time_password_expiry, user_types, admin_roles, are_all_schemas_accessible, schema_list].hash end |
#to_hash ⇒ 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_s ⇒ String
Returns the string representation 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 |