Class: OCI::DataSafe::Models::ProfileDetails

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

Overview

The details of a particular profile

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ProfileDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
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
# File 'lib/oci/data_safe/models/profile_details.rb', line 111

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

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

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

  self.connect_time = attributes[:'connectTime'] if attributes[:'connectTime']

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

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

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

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

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

  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_grace_time = attributes[:'passwordGraceTime'] if attributes[:'passwordGraceTime']

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

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

  self.password_life_time = attributes[:'passwordLifeTime'] if attributes[:'passwordLifeTime']

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

  self.password_life_time = attributes[:'password_life_time'] if attributes[:'password_life_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.password_reuse_time = attributes[:'passwordReuseTime'] if attributes[:'passwordReuseTime']

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

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

  self.password_reuse_max = attributes[:'passwordReuseMax'] if attributes[:'passwordReuseMax']

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

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

  self.password_verify_function = attributes[:'passwordVerifyFunction'] if attributes[:'passwordVerifyFunction']

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

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

Instance Attribute Details

#connect_timeString

The value of the CONNECT_TIME resource parameter.

Returns:

  • (String)


18
19
20
# File 'lib/oci/data_safe/models/profile_details.rb', line 18

def connect_time
  @connect_time
end

#failed_login_attemptsString

The value of the FAILED_LOGIN_ATTEMPTS password parameter.

Returns:

  • (String)


22
23
24
# File 'lib/oci/data_safe/models/profile_details.rb', line 22

def 
  @failed_login_attempts
end

#idle_timeString

The value of the IDLE_TIME resource parameter.

Returns:

  • (String)


26
27
28
# File 'lib/oci/data_safe/models/profile_details.rb', line 26

def idle_time
  @idle_time
end

#inactive_account_timeString

The value of the INACTIVE_ACCOUNT_TIME password parameter.

Returns:

  • (String)


30
31
32
# File 'lib/oci/data_safe/models/profile_details.rb', line 30

def 
  @inactive_account_time
end

#num_usersInteger

The number of users using this profile.

Returns:

  • (Integer)


14
15
16
# File 'lib/oci/data_safe/models/profile_details.rb', line 14

def num_users
  @num_users
end

#password_grace_timeString

The value of the PASSWORD_GRACE_TIME password parameter.

Returns:

  • (String)


34
35
36
# File 'lib/oci/data_safe/models/profile_details.rb', line 34

def password_grace_time
  @password_grace_time
end

#password_life_timeString

The value of the PASSWORD_LIFE_TIME password parameter.

Returns:

  • (String)


38
39
40
# File 'lib/oci/data_safe/models/profile_details.rb', line 38

def password_life_time
  @password_life_time
end

#password_lock_timeString

The value of the PASSWORD_LOCK_TIME password parameter.

Returns:

  • (String)


42
43
44
# File 'lib/oci/data_safe/models/profile_details.rb', line 42

def password_lock_time
  @password_lock_time
end

#password_reuse_maxString

The value of the PASSWORD_REUSE_MAX resource parameter.

Returns:

  • (String)


50
51
52
# File 'lib/oci/data_safe/models/profile_details.rb', line 50

def password_reuse_max
  @password_reuse_max
end

#password_reuse_timeString

The value of the PASSWORD_REUSE_TIME password parameter.

Returns:

  • (String)


46
47
48
# File 'lib/oci/data_safe/models/profile_details.rb', line 46

def password_reuse_time
  @password_reuse_time
end

#password_verify_functionString

The value of the PASSWORD_VERIFY_FUNCTION resource.

Returns:

  • (String)


54
55
56
# File 'lib/oci/data_safe/models/profile_details.rb', line 54

def password_verify_function
  @password_verify_function
end

Class Method Details

.attribute_mapObject

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



57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/oci/data_safe/models/profile_details.rb', line 57

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'num_users': :'numUsers',
    'connect_time': :'connectTime',
    'failed_login_attempts': :'failedLoginAttempts',
    'idle_time': :'idleTime',
    'inactive_account_time': :'inactiveAccountTime',
    'password_grace_time': :'passwordGraceTime',
    'password_life_time': :'passwordLifeTime',
    'password_lock_time': :'passwordLockTime',
    'password_reuse_time': :'passwordReuseTime',
    'password_reuse_max': :'passwordReuseMax',
    'password_verify_function': :'passwordVerifyFunction'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



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

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'num_users': :'Integer',
    'connect_time': :'String',
    'failed_login_attempts': :'String',
    'idle_time': :'String',
    'inactive_account_time': :'String',
    'password_grace_time': :'String',
    'password_life_time': :'String',
    'password_lock_time': :'String',
    'password_reuse_time': :'String',
    'password_reuse_max': :'String',
    'password_verify_function': :'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



191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
# File 'lib/oci/data_safe/models/profile_details.rb', line 191

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

  self.class == other.class &&
    num_users == other.num_users &&
    connect_time == other.connect_time &&
     == other. &&
    idle_time == other.idle_time &&
     == other. &&
    password_grace_time == other.password_grace_time &&
    password_life_time == other.password_life_time &&
    password_lock_time == other.password_lock_time &&
    password_reuse_time == other.password_reuse_time &&
    password_reuse_max == other.password_reuse_max &&
    password_verify_function == other.password_verify_function
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



231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
# File 'lib/oci/data_safe/models/profile_details.rb', line 231

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


211
212
213
# File 'lib/oci/data_safe/models/profile_details.rb', line 211

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



220
221
222
# File 'lib/oci/data_safe/models/profile_details.rb', line 220

def hash
  [num_users, connect_time, , idle_time, , password_grace_time, password_life_time, password_lock_time, password_reuse_time, password_reuse_max, password_verify_function].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



264
265
266
267
268
269
270
271
272
273
# File 'lib/oci/data_safe/models/profile_details.rb', line 264

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



258
259
260
# File 'lib/oci/data_safe/models/profile_details.rb', line 258

def to_s
  to_hash.to_s
end