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_OPEN_AND_IN_ROLLOVER = 'OPEN_AND_IN_ROLLOVER'.freeze, ACCOUNT_STATUS_EXPIRED_AND_IN_ROLLOVER = 'EXPIRED_AND_IN_ROLLOVER'.freeze, ACCOUNT_STATUS_LOCKED_AND_IN_ROLLOVER = 'LOCKED_AND_IN_ROLLOVER'.freeze, ACCOUNT_STATUS_EXPIRED_AND_LOCKED_AND_IN_ROLLOVER = 'EXPIRED_AND_LOCKED_AND_IN_ROLLOVER'.freeze, ACCOUNT_STATUS_LOCKED_TIMED_AND_IN_ROLLOVER = 'LOCKED_TIMED_AND_IN_ROLLOVER'.freeze, ACCOUNT_STATUS_EXPIRED_AND_LOCKED_TIMED_AND_IN_ROL = 'EXPIRED_AND_LOCKED_TIMED_AND_IN_ROL'.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
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 282 283 284 285 286 287 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 196 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.
76 77 78 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 76 def account_status @account_status end |
#admin_roles ⇒ Array<String>
The admin roles granted to the user.
119 120 121 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 119 def admin_roles @admin_roles end |
#are_all_schemas_accessible ⇒ BOOLEAN
Indicates whether the user has access to all the schemas.
123 124 125 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 123 def are_all_schemas_accessible @are_all_schemas_accessible end |
#authentication_type ⇒ String
The user authentication method.
92 93 94 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 92 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.
64 65 66 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 64 def key @key end |
#schema_list ⇒ Array<String>
The list of database schemas current user can access.
127 128 129 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 127 def schema_list @schema_list end |
#target_id ⇒ String
[Required] The OCID of the target database.
80 81 82 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 80 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.
84 85 86 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 84 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.
100 101 102 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 100 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.
104 105 106 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 104 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.
88 89 90 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 88 def time_user_created @time_user_created end |
#user_category ⇒ String
The user category based on the privileges and other details of the user.
72 73 74 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 72 def user_category @user_category end |
#user_name ⇒ String
[Required] The database user name.
68 69 70 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 68 def user_name @user_name end |
#user_profile ⇒ String
The user profile name.
96 97 98 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 96 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.
115 116 117 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 115 def user_types @user_types end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 130 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.
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 153 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.
375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 375 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
419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 419 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
399 400 401 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 399 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
408 409 410 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 408 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
452 453 454 455 456 457 458 459 460 461 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 452 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
446 447 448 |
# File 'lib/oci/data_safe/models/user_summary.rb', line 446 def to_s to_hash.to_s end |