Class: SwaggerClient::SharedCredentialAccount

Inherits:
Object
  • Object
show all
Defined in:
lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ SharedCredentialAccount

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
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
220
221
222
223
224
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb', line 124

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerClient::SharedCredentialAccount` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!self.class.attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerClient::SharedCredentialAccount`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

  if attributes.key?(:'authentication_type')
    self.authentication_type = attributes[:'authentication_type']
  end

  if attributes.key?(:'community_name')
    self.community_name = attributes[:'community_name']
  end

  if attributes.key?(:'database')
    self.database = attributes[:'database']
  end

  if attributes.key?(:'domain')
    self.domain = attributes[:'domain']
  end

  if attributes.key?(:'enumerate_sids')
    self.enumerate_sids = attributes[:'enumerate_sids']
  end

  if attributes.key?(:'notes_id_password')
    self.notes_id_password = attributes[:'notes_id_password']
  end

  if attributes.key?(:'ntlm_hash')
    self.ntlm_hash = attributes[:'ntlm_hash']
  end

  if attributes.key?(:'oracle_listener_password')
    self.oracle_listener_password = attributes[:'oracle_listener_password']
  end

  if attributes.key?(:'password')
    self.password = attributes[:'password']
  end

  if attributes.key?(:'pem_key')
    self.pem_key = attributes[:'pem_key']
  end

  if attributes.key?(:'permission_elevation')
    self.permission_elevation = attributes[:'permission_elevation']
  end

  if attributes.key?(:'permission_elevation_password')
    self.permission_elevation_password = attributes[:'permission_elevation_password']
  end

  if attributes.key?(:'permission_elevation_username')
    self.permission_elevation_username = attributes[:'permission_elevation_username']
  end

  if attributes.key?(:'privacy_password')
    self.privacy_password = attributes[:'privacy_password']
  end

  if attributes.key?(:'privacy_type')
    self.privacy_type = attributes[:'privacy_type']
  end

  if attributes.key?(:'private_key_password')
    self.private_key_password = attributes[:'private_key_password']
  end

  if attributes.key?(:'realm')
    self.realm = attributes[:'realm']
  end

  if attributes.key?(:'service')
    self.service = attributes[:'service']
  end

  if attributes.key?(:'service_name')
    self.service_name = attributes[:'service_name']
  end

  if attributes.key?(:'sid')
    self.sid = attributes[:'sid']
  end

  if attributes.key?(:'use_windows_authentication')
    self.use_windows_authentication = attributes[:'use_windows_authentication']
  end

  if attributes.key?(:'username')
    self.username = attributes[:'username']
  end
end

Instance Attribute Details

#authentication_typeObject

Returns the value of attribute authentication_type.



16
17
18
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb', line 16

def authentication_type
  @authentication_type
end

#community_nameObject

Returns the value of attribute community_name.



18
19
20
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb', line 18

def community_name
  @community_name
end

#databaseObject

Returns the value of attribute database.



20
21
22
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb', line 20

def database
  @database
end

#domainObject

Returns the value of attribute domain.



22
23
24
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb', line 22

def domain
  @domain
end

#enumerate_sidsObject

Returns the value of attribute enumerate_sids.



24
25
26
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb', line 24

def enumerate_sids
  @enumerate_sids
end

#notes_id_passwordObject

Returns the value of attribute notes_id_password.



26
27
28
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb', line 26

def notes_id_password
  @notes_id_password
end

#ntlm_hashObject

Returns the value of attribute ntlm_hash.



28
29
30
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb', line 28

def ntlm_hash
  @ntlm_hash
end

#oracle_listener_passwordObject

Returns the value of attribute oracle_listener_password.



30
31
32
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb', line 30

def oracle_listener_password
  @oracle_listener_password
end

#passwordObject

Returns the value of attribute password.



32
33
34
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb', line 32

def password
  @password
end

#pem_keyObject

Returns the value of attribute pem_key.



34
35
36
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb', line 34

def pem_key
  @pem_key
end

#permission_elevationObject

Returns the value of attribute permission_elevation.



36
37
38
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb', line 36

def permission_elevation
  @permission_elevation
end

#permission_elevation_passwordObject

Returns the value of attribute permission_elevation_password.



38
39
40
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb', line 38

def permission_elevation_password
  @permission_elevation_password
end

#permission_elevation_usernameObject

Returns the value of attribute permission_elevation_username.



40
41
42
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb', line 40

def permission_elevation_username
  @permission_elevation_username
end

#privacy_passwordObject

Returns the value of attribute privacy_password.



42
43
44
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb', line 42

def privacy_password
  @privacy_password
end

#privacy_typeObject

Returns the value of attribute privacy_type.



44
45
46
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb', line 44

def privacy_type
  @privacy_type
end

#private_key_passwordObject

Returns the value of attribute private_key_password.



46
47
48
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb', line 46

def private_key_password
  @private_key_password
end

#realmObject

Returns the value of attribute realm.



48
49
50
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb', line 48

def realm
  @realm
end

#serviceObject

Returns the value of attribute service.



50
51
52
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb', line 50

def service
  @service
end

#service_nameObject

Returns the value of attribute service_name.



52
53
54
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb', line 52

def service_name
  @service_name
end

#sidObject

Returns the value of attribute sid.



54
55
56
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb', line 54

def sid
  @sid
end

#use_windows_authenticationObject

Returns the value of attribute use_windows_authentication.



56
57
58
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb', line 56

def use_windows_authentication
  @use_windows_authentication
end

#usernameObject

Returns the value of attribute username.



58
59
60
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb', line 58

def username
  @username
end

Class Method Details

.attribute_mapObject

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



61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb', line 61

def self.attribute_map
  {
    :'authentication_type' => :'authenticationType',
    :'community_name' => :'communityName',
    :'database' => :'database',
    :'domain' => :'domain',
    :'enumerate_sids' => :'enumerateSids',
    :'notes_id_password' => :'notesIDPassword',
    :'ntlm_hash' => :'ntlmHash',
    :'oracle_listener_password' => :'oracleListenerPassword',
    :'password' => :'password',
    :'pem_key' => :'pemKey',
    :'permission_elevation' => :'permissionElevation',
    :'permission_elevation_password' => :'permissionElevationPassword',
    :'permission_elevation_username' => :'permissionElevationUsername',
    :'privacy_password' => :'privacyPassword',
    :'privacy_type' => :'privacyType',
    :'private_key_password' => :'privateKeyPassword',
    :'realm' => :'realm',
    :'service' => :'service',
    :'service_name' => :'serviceName',
    :'sid' => :'sid',
    :'use_windows_authentication' => :'useWindowsAuthentication',
    :'username' => :'username'
  }
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



283
284
285
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb', line 283

def self.build_from_hash(attributes)
  new.build_from_hash(attributes)
end

.openapi_nullableObject

List of attributes with nullable: true



117
118
119
120
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb', line 117

def self.openapi_nullable
  Set.new([
  ])
end

.openapi_typesObject

Attribute type mapping.



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb', line 89

def self.openapi_types
  {
    :'authentication_type' => :'Object',
    :'community_name' => :'Object',
    :'database' => :'Object',
    :'domain' => :'Object',
    :'enumerate_sids' => :'Object',
    :'notes_id_password' => :'Object',
    :'ntlm_hash' => :'Object',
    :'oracle_listener_password' => :'Object',
    :'password' => :'Object',
    :'pem_key' => :'Object',
    :'permission_elevation' => :'Object',
    :'permission_elevation_password' => :'Object',
    :'permission_elevation_username' => :'Object',
    :'privacy_password' => :'Object',
    :'privacy_type' => :'Object',
    :'private_key_password' => :'Object',
    :'realm' => :'Object',
    :'service' => :'Object',
    :'service_name' => :'Object',
    :'sid' => :'Object',
    :'use_windows_authentication' => :'Object',
    :'username' => :'Object'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



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
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb', line 241

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      authentication_type == o.authentication_type &&
      community_name == o.community_name &&
      database == o.database &&
      domain == o.domain &&
      enumerate_sids == o.enumerate_sids &&
      notes_id_password == o.notes_id_password &&
      ntlm_hash == o.ntlm_hash &&
      oracle_listener_password == o.oracle_listener_password &&
      password == o.password &&
      pem_key == o.pem_key &&
      permission_elevation == o.permission_elevation &&
      permission_elevation_password == o.permission_elevation_password &&
      permission_elevation_username == o.permission_elevation_username &&
      privacy_password == o.privacy_password &&
      privacy_type == o.privacy_type &&
      private_key_password == o.private_key_password &&
      realm == o.realm &&
      service == o.service &&
      service_name == o.service_name &&
      sid == o.sid &&
      use_windows_authentication == o.use_windows_authentication &&
      username == o.username
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb', line 313

def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    DateTime.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :Boolean
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    SwaggerClient.const_get(type).build_from_hash(value)
  end
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



382
383
384
385
386
387
388
389
390
391
392
393
394
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb', line 382

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
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



290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb', line 290

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.openapi_types.each_pair do |key, type|
    if type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
      self.send("#{key}=", nil)
    end
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


270
271
272
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb', line 270

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



276
277
278
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb', line 276

def hash
  [authentication_type, community_name, database, domain, enumerate_sids, notes_id_password, ntlm_hash, oracle_listener_password, password, pem_key, permission_elevation, permission_elevation_password, permission_elevation_username, privacy_password, privacy_type, private_key_password, realm, service, service_name, sid, use_windows_authentication, username].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



228
229
230
231
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb', line 228

def list_invalid_properties
  invalid_properties = Array.new
  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



358
359
360
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb', line 358

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



364
365
366
367
368
369
370
371
372
373
374
375
376
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb', line 364

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    if value.nil?
      is_nullable = self.class.openapi_nullable.include?(attr)
      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
    end

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



352
353
354
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb', line 352

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



235
236
237
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/shared_credential_account.rb', line 235

def valid?
  true
end