Class: Akeyless::SecureRemoteAccess

Inherits:
Object
  • Object
show all
Defined in:
lib/akeyless/models/secure_remote_access.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ SecureRemoteAccess

Initializes the object



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
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
288
289
# File 'lib/akeyless/models/secure_remote_access.rb', line 159

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::SecureRemoteAccess` 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 `Akeyless::SecureRemoteAccess`. 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?(:'account_id')
    self. = attributes[:'account_id']
  end

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

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

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

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

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

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

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

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

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

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

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

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

  if attributes.key?(:'host')
    if (value = attributes[:'host']).is_a?(Array)
      self.host = value
    end
  end

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Instance Attribute Details

#account_idObject

Returns the value of attribute account_id.



18
19
20
# File 'lib/akeyless/models/secure_remote_access.rb', line 18

def 
  @account_id
end

#allow_port_forwardingObject

Returns the value of attribute allow_port_forwarding.



20
21
22
# File 'lib/akeyless/models/secure_remote_access.rb', line 20

def allow_port_forwarding
  @allow_port_forwarding
end

#allow_providing_external_usernameObject

Returns the value of attribute allow_providing_external_username.



22
23
24
# File 'lib/akeyless/models/secure_remote_access.rb', line 22

def allow_providing_external_username
  @allow_providing_external_username
end

#bastion_apiObject

Returns the value of attribute bastion_api.



24
25
26
# File 'lib/akeyless/models/secure_remote_access.rb', line 24

def bastion_api
  @bastion_api
end

#bastion_issuerObject

Returns the value of attribute bastion_issuer.



26
27
28
# File 'lib/akeyless/models/secure_remote_access.rb', line 26

def bastion_issuer
  @bastion_issuer
end

#bastion_issuer_idObject

Returns the value of attribute bastion_issuer_id.



28
29
30
# File 'lib/akeyless/models/secure_remote_access.rb', line 28

def bastion_issuer_id
  @bastion_issuer_id
end

#bastion_sshObject

Returns the value of attribute bastion_ssh.



30
31
32
# File 'lib/akeyless/models/secure_remote_access.rb', line 30

def bastion_ssh
  @bastion_ssh
end

#categoryObject

Returns the value of attribute category.



32
33
34
# File 'lib/akeyless/models/secure_remote_access.rb', line 32

def category
  @category
end

#dashboard_urlObject

Returns the value of attribute dashboard_url.



34
35
36
# File 'lib/akeyless/models/secure_remote_access.rb', line 34

def dashboard_url
  @dashboard_url
end

#db_nameObject

Returns the value of attribute db_name.



36
37
38
# File 'lib/akeyless/models/secure_remote_access.rb', line 36

def db_name
  @db_name
end

#domainObject

Returns the value of attribute domain.



38
39
40
# File 'lib/akeyless/models/secure_remote_access.rb', line 38

def domain
  @domain
end

#enableObject

Returns the value of attribute enable.



40
41
42
# File 'lib/akeyless/models/secure_remote_access.rb', line 40

def enable
  @enable
end

#endpointObject

Returns the value of attribute endpoint.



42
43
44
# File 'lib/akeyless/models/secure_remote_access.rb', line 42

def endpoint
  @endpoint
end

#hostObject

Returns the value of attribute host.



44
45
46
# File 'lib/akeyless/models/secure_remote_access.rb', line 44

def host
  @host
end

#is_cliObject

Returns the value of attribute is_cli.



46
47
48
# File 'lib/akeyless/models/secure_remote_access.rb', line 46

def is_cli
  @is_cli
end

#is_webObject

Returns the value of attribute is_web.



48
49
50
# File 'lib/akeyless/models/secure_remote_access.rb', line 48

def is_web
  @is_web
end

#isolatedObject

Returns the value of attribute isolated.



50
51
52
# File 'lib/akeyless/models/secure_remote_access.rb', line 50

def isolated
  @isolated
end

#nativeObject

Returns the value of attribute native.



52
53
54
# File 'lib/akeyless/models/secure_remote_access.rb', line 52

def native
  @native
end

#rd_gateway_serverObject

Returns the value of attribute rd_gateway_server.



54
55
56
# File 'lib/akeyless/models/secure_remote_access.rb', line 54

def rd_gateway_server
  @rd_gateway_server
end

#rdp_userObject

Returns the value of attribute rdp_user.



56
57
58
# File 'lib/akeyless/models/secure_remote_access.rb', line 56

def rdp_user
  @rdp_user
end

#regionObject

Returns the value of attribute region.



58
59
60
# File 'lib/akeyless/models/secure_remote_access.rb', line 58

def region
  @region
end

#rotate_after_disconnectObject

Returns the value of attribute rotate_after_disconnect.



60
61
62
# File 'lib/akeyless/models/secure_remote_access.rb', line 60

def rotate_after_disconnect
  @rotate_after_disconnect
end

#schemaObject

Returns the value of attribute schema.



62
63
64
# File 'lib/akeyless/models/secure_remote_access.rb', line 62

def schema
  @schema
end

#ssh_passwordObject

Returns the value of attribute ssh_password.



64
65
66
# File 'lib/akeyless/models/secure_remote_access.rb', line 64

def ssh_password
  @ssh_password
end

#ssh_private_keyObject

Returns the value of attribute ssh_private_key.



66
67
68
# File 'lib/akeyless/models/secure_remote_access.rb', line 66

def ssh_private_key
  @ssh_private_key
end

#ssh_userObject

Returns the value of attribute ssh_user.



68
69
70
# File 'lib/akeyless/models/secure_remote_access.rb', line 68

def ssh_user
  @ssh_user
end

#urlObject

Returns the value of attribute url.



70
71
72
# File 'lib/akeyless/models/secure_remote_access.rb', line 70

def url
  @url
end

#use_internal_bastionObject

Returns the value of attribute use_internal_bastion.



72
73
74
# File 'lib/akeyless/models/secure_remote_access.rb', line 72

def use_internal_bastion
  @use_internal_bastion
end

#web_proxyObject

Returns the value of attribute web_proxy.



74
75
76
# File 'lib/akeyless/models/secure_remote_access.rb', line 74

def web_proxy
  @web_proxy
end

Class Method Details

._deserialize(type, value) ⇒ Object

Deserializes the data based on type



381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
# File 'lib/akeyless/models/secure_remote_access.rb', line 381

def self._deserialize(type, value)
  case type.to_sym
  when :Time
    Time.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
    # models (e.g. Pet) or oneOf
    klass = Akeyless.const_get(type)
    klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
  end
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



112
113
114
# File 'lib/akeyless/models/secure_remote_access.rb', line 112

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

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



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'lib/akeyless/models/secure_remote_access.rb', line 77

def self.attribute_map
  {
    :'account_id' => :'account_id',
    :'allow_port_forwarding' => :'allow_port_forwarding',
    :'allow_providing_external_username' => :'allow_providing_external_username',
    :'bastion_api' => :'bastion_api',
    :'bastion_issuer' => :'bastion_issuer',
    :'bastion_issuer_id' => :'bastion_issuer_id',
    :'bastion_ssh' => :'bastion_ssh',
    :'category' => :'category',
    :'dashboard_url' => :'dashboard_url',
    :'db_name' => :'db_name',
    :'domain' => :'domain',
    :'enable' => :'enable',
    :'endpoint' => :'endpoint',
    :'host' => :'host',
    :'is_cli' => :'is_cli',
    :'is_web' => :'is_web',
    :'isolated' => :'isolated',
    :'native' => :'native',
    :'rd_gateway_server' => :'rd_gateway_server',
    :'rdp_user' => :'rdp_user',
    :'region' => :'region',
    :'rotate_after_disconnect' => :'rotate_after_disconnect',
    :'schema' => :'schema',
    :'ssh_password' => :'ssh_password',
    :'ssh_private_key' => :'ssh_private_key',
    :'ssh_user' => :'ssh_user',
    :'url' => :'url',
    :'use_internal_bastion' => :'use_internal_bastion',
    :'web_proxy' => :'web_proxy'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash



357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
# File 'lib/akeyless/models/secure_remote_access.rb', line 357

def self.build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  attributes = attributes.transform_keys(&:to_sym)
  transformed_hash = {}
  openapi_types.each_pair do |key, type|
    if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
      transformed_hash["#{key}"] = nil
    elsif 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[attribute_map[key]].is_a?(Array)
        transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
      end
    elsif !attributes[attribute_map[key]].nil?
      transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
    end
  end
  new(transformed_hash)
end

.openapi_nullableObject

List of attributes with nullable: true



152
153
154
155
# File 'lib/akeyless/models/secure_remote_access.rb', line 152

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

.openapi_typesObject

Attribute type mapping.



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
# File 'lib/akeyless/models/secure_remote_access.rb', line 117

def self.openapi_types
  {
    :'account_id' => :'String',
    :'allow_port_forwarding' => :'Boolean',
    :'allow_providing_external_username' => :'Boolean',
    :'bastion_api' => :'String',
    :'bastion_issuer' => :'String',
    :'bastion_issuer_id' => :'Integer',
    :'bastion_ssh' => :'String',
    :'category' => :'String',
    :'dashboard_url' => :'String',
    :'db_name' => :'String',
    :'domain' => :'String',
    :'enable' => :'Boolean',
    :'endpoint' => :'String',
    :'host' => :'Array<String>',
    :'is_cli' => :'Boolean',
    :'is_web' => :'Boolean',
    :'isolated' => :'Boolean',
    :'native' => :'Boolean',
    :'rd_gateway_server' => :'String',
    :'rdp_user' => :'String',
    :'region' => :'String',
    :'rotate_after_disconnect' => :'Boolean',
    :'schema' => :'String',
    :'ssh_password' => :'Boolean',
    :'ssh_private_key' => :'Boolean',
    :'ssh_user' => :'String',
    :'url' => :'String',
    :'use_internal_bastion' => :'Boolean',
    :'web_proxy' => :'Boolean'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.



308
309
310
311
312
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
# File 'lib/akeyless/models/secure_remote_access.rb', line 308

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
       == o. &&
      allow_port_forwarding == o.allow_port_forwarding &&
      allow_providing_external_username == o.allow_providing_external_username &&
      bastion_api == o.bastion_api &&
      bastion_issuer == o.bastion_issuer &&
      bastion_issuer_id == o.bastion_issuer_id &&
      bastion_ssh == o.bastion_ssh &&
      category == o.category &&
      dashboard_url == o.dashboard_url &&
      db_name == o.db_name &&
      domain == o.domain &&
      enable == o.enable &&
      endpoint == o.endpoint &&
      host == o.host &&
      is_cli == o.is_cli &&
      is_web == o.is_web &&
      isolated == o.isolated &&
      native == o.native &&
      rd_gateway_server == o.rd_gateway_server &&
      rdp_user == o.rdp_user &&
      region == o.region &&
      rotate_after_disconnect == o.rotate_after_disconnect &&
      schema == o.schema &&
      ssh_password == o.ssh_password &&
      ssh_private_key == o.ssh_private_key &&
      ssh_user == o.ssh_user &&
      url == o.url &&
      use_internal_bastion == o.use_internal_bastion &&
      web_proxy == o.web_proxy
end

#_to_hash(value) ⇒ Hash

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



452
453
454
455
456
457
458
459
460
461
462
463
464
# File 'lib/akeyless/models/secure_remote_access.rb', line 452

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

#eql?(o) ⇒ Boolean

See Also:

  • `==` method


344
345
346
# File 'lib/akeyless/models/secure_remote_access.rb', line 344

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.



350
351
352
# File 'lib/akeyless/models/secure_remote_access.rb', line 350

def hash
  [, allow_port_forwarding, allow_providing_external_username, bastion_api, bastion_issuer, bastion_issuer_id, bastion_ssh, category, dashboard_url, db_name, domain, enable, endpoint, host, is_cli, is_web, isolated, native, rd_gateway_server, rdp_user, region, rotate_after_disconnect, schema, ssh_password, ssh_private_key, ssh_user, url, use_internal_bastion, web_proxy].hash
end

#list_invalid_propertiesObject

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



293
294
295
296
297
# File 'lib/akeyless/models/secure_remote_access.rb', line 293

def list_invalid_properties
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
  invalid_properties = Array.new
  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)



428
429
430
# File 'lib/akeyless/models/secure_remote_access.rb', line 428

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash



434
435
436
437
438
439
440
441
442
443
444
445
446
# File 'lib/akeyless/models/secure_remote_access.rb', line 434

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



422
423
424
# File 'lib/akeyless/models/secure_remote_access.rb', line 422

def to_s
  to_hash.to_s
end

#valid?Boolean

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



301
302
303
304
# File 'lib/akeyless/models/secure_remote_access.rb', line 301

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  true
end