Class: OCI::DataSafe::Models::ProfileSummary

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

Overview

The summary of information about the user profiles. It includes details such as profile name, failed login attempts, sessions per user, inactive account time, password lock time, user created, target id, and the compartment id.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ProfileSummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :user_assessment_id (String)

    The value to assign to the #user_assessment_id property

  • :compartment_id (String)

    The value to assign to the #compartment_id property

  • :target_id (String)

    The value to assign to the #target_id property

  • :profile_name (String)

    The value to assign to the #profile_name property

  • :user_count (Integer)

    The value to assign to the #user_count property

  • :failed_login_attempts (String)

    The value to assign to the #failed_login_attempts property

  • :password_verification_function (String)

    The value to assign to the #password_verification_function property

  • :sessions_per_user (String)

    The value to assign to the #sessions_per_user property

  • :inactive_account_time (String)

    The value to assign to the #inactive_account_time property

  • :password_lock_time (String)

    The value to assign to the #password_lock_time property

  • :is_user_created (BOOLEAN)

    The value to assign to the #is_user_created property

  • :freeform_tags (Hash<String, String>)

    The value to assign to the #freeform_tags property

  • :defined_tags (Hash<String, Hash<String, Object>>)

    The value to assign to the #defined_tags property



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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
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
# File 'lib/oci/data_safe/models/profile_summary.rb', line 136

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

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

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

  self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']

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

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

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

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

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

  self.user_count = attributes[:'userCount'] if attributes[:'userCount']

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

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

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

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

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

  self.password_verification_function = attributes[:'passwordVerificationFunction'] if attributes[:'passwordVerificationFunction']

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

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

  self.sessions_per_user = attributes[:'sessionsPerUser'] if attributes[:'sessionsPerUser']

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

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

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

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

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

  self.password_lock_time = attributes[:'passwordLockTime'] if attributes[:'passwordLockTime']

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

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

  self.is_user_created = attributes[:'isUserCreated'] unless attributes[:'isUserCreated'].nil?

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

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

  self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']

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

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

  self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']

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

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

Instance Attribute Details

#compartment_idString

[Required] The OCID of the compartment that contains the user assessment.

Returns:

  • (String)


21
22
23
# File 'lib/oci/data_safe/models/profile_summary.rb', line 21

def compartment_id
  @compartment_id
end

#defined_tagsHash<String, Hash<String, Object>>

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags

Example: {\"Operations\": {\"CostCenter\": \"42\"}}

Returns:

  • (Hash<String, Hash<String, Object>>)


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

def defined_tags
  @defined_tags
end

#failed_login_attemptsString

Maximum times the user is allowed to fail login before the user account is locked.

Returns:

  • (String)


37
38
39
# File 'lib/oci/data_safe/models/profile_summary.rb', line 37

def 
  @failed_login_attempts
end

#freeform_tagsHash<String, String>

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags

Example: {\"Department\": \"Finance\"}

Returns:

  • (Hash<String, String>)


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

def freeform_tags
  @freeform_tags
end

#inactive_account_timeString

The permitted periods of continuous inactive time during a session, expressed in minutes. Long-running queries and other operations are not subjected to this limit.

Returns:

  • (String)


51
52
53
# File 'lib/oci/data_safe/models/profile_summary.rb', line 51

def 
  @inactive_account_time
end

#is_user_createdBOOLEAN

Represents if the profile is created by user.

Returns:

  • (BOOLEAN)


59
60
61
# File 'lib/oci/data_safe/models/profile_summary.rb', line 59

def is_user_created
  @is_user_created
end

#password_lock_timeString

Number of days the user account remains locked after failed login

Returns:

  • (String)


55
56
57
# File 'lib/oci/data_safe/models/profile_summary.rb', line 55

def password_lock_time
  @password_lock_time
end

#password_verification_functionString

PL/SQL that can be used for password verification.

Returns:

  • (String)


41
42
43
# File 'lib/oci/data_safe/models/profile_summary.rb', line 41

def password_verification_function
  @password_verification_function
end

#profile_nameString

The name of the profile.

Returns:

  • (String)


29
30
31
# File 'lib/oci/data_safe/models/profile_summary.rb', line 29

def profile_name
  @profile_name
end

#sessions_per_userString

The maximum number of sessions a user is allowed to create.

Returns:

  • (String)


45
46
47
# File 'lib/oci/data_safe/models/profile_summary.rb', line 45

def sessions_per_user
  @sessions_per_user
end

#target_idString

The OCID of the target database.

Returns:

  • (String)


25
26
27
# File 'lib/oci/data_safe/models/profile_summary.rb', line 25

def target_id
  @target_id
end

#user_assessment_idString

[Required] The OCID of the latest user assessment corresponding to the target under consideration. A compartment type assessment can also be passed to profiles from all the targets from the corresponding compartment.

Returns:

  • (String)


17
18
19
# File 'lib/oci/data_safe/models/profile_summary.rb', line 17

def user_assessment_id
  @user_assessment_id
end

#user_countInteger

The number of users having a given profile.

Returns:

  • (Integer)


33
34
35
# File 'lib/oci/data_safe/models/profile_summary.rb', line 33

def user_count
  @user_count
end

Class Method Details

.attribute_mapObject

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



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/oci/data_safe/models/profile_summary.rb', line 76

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'user_assessment_id': :'userAssessmentId',
    'compartment_id': :'compartmentId',
    'target_id': :'targetId',
    'profile_name': :'profileName',
    'user_count': :'userCount',
    'failed_login_attempts': :'failedLoginAttempts',
    'password_verification_function': :'passwordVerificationFunction',
    'sessions_per_user': :'sessionsPerUser',
    'inactive_account_time': :'inactiveAccountTime',
    'password_lock_time': :'passwordLockTime',
    'is_user_created': :'isUserCreated',
    'freeform_tags': :'freeformTags',
    'defined_tags': :'definedTags'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# File 'lib/oci/data_safe/models/profile_summary.rb', line 97

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'user_assessment_id': :'String',
    'compartment_id': :'String',
    'target_id': :'String',
    'profile_name': :'String',
    'user_count': :'Integer',
    'failed_login_attempts': :'String',
    'password_verification_function': :'String',
    'sessions_per_user': :'String',
    'inactive_account_time': :'String',
    'password_lock_time': :'String',
    'is_user_created': :'BOOLEAN',
    'freeform_tags': :'Hash<String, String>',
    'defined_tags': :'Hash<String, Hash<String, Object>>'
    # 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



228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
# File 'lib/oci/data_safe/models/profile_summary.rb', line 228

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

  self.class == other.class &&
    user_assessment_id == other.user_assessment_id &&
    compartment_id == other.compartment_id &&
    target_id == other.target_id &&
    profile_name == other.profile_name &&
    user_count == other.user_count &&
     == other. &&
    password_verification_function == other.password_verification_function &&
    sessions_per_user == other.sessions_per_user &&
     == other. &&
    password_lock_time == other.password_lock_time &&
    is_user_created == other.is_user_created &&
    freeform_tags == other.freeform_tags &&
    defined_tags == other.defined_tags
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



270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
# File 'lib/oci/data_safe/models/profile_summary.rb', line 270

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


250
251
252
# File 'lib/oci/data_safe/models/profile_summary.rb', line 250

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



259
260
261
# File 'lib/oci/data_safe/models/profile_summary.rb', line 259

def hash
  [user_assessment_id, compartment_id, target_id, profile_name, user_count, , password_verification_function, sessions_per_user, , password_lock_time, is_user_created, freeform_tags, defined_tags].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



303
304
305
306
307
308
309
310
311
312
# File 'lib/oci/data_safe/models/profile_summary.rb', line 303

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



297
298
299
# File 'lib/oci/data_safe/models/profile_summary.rb', line 297

def to_s
  to_hash.to_s
end