akeyless 3.2.8 → 3.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +25 -1
  3. data/docs/CreateESM.md +36 -0
  4. data/docs/CreateESMOutput.md +20 -0
  5. data/docs/CreateRotatedSecret.md +1 -1
  6. data/docs/CreateSSHCertIssuer.md +1 -1
  7. data/docs/CreateSecret.md +1 -1
  8. data/docs/CreateWindowsTarget.md +8 -4
  9. data/docs/DSProducerDetails.md +2 -0
  10. data/docs/DescribeItem.md +2 -0
  11. data/docs/EsmCreate.md +34 -0
  12. data/docs/EsmCreateSecretOutput.md +20 -0
  13. data/docs/EsmDelete.md +26 -0
  14. data/docs/EsmGet.md +26 -0
  15. data/docs/EsmGetSecretOutput.md +20 -0
  16. data/docs/EsmList.md +24 -0
  17. data/docs/EsmListSecretsOutput.md +18 -0
  18. data/docs/EsmUpdate.md +34 -0
  19. data/docs/EsmUpdateSecretOutput.md +20 -0
  20. data/docs/GatewayCreateProducerHanaDb.md +1 -1
  21. data/docs/GatewayCreateProducerMSSQL.md +1 -1
  22. data/docs/GatewayCreateProducerMongo.md +1 -1
  23. data/docs/GatewayCreateProducerMySQL.md +1 -1
  24. data/docs/GatewayCreateProducerOracleDb.md +1 -1
  25. data/docs/GatewayCreateProducerPostgreSQL.md +1 -1
  26. data/docs/GatewayCreateProducerRdp.md +1 -1
  27. data/docs/GatewayCreateProducerRedis.md +48 -0
  28. data/docs/GatewayCreateProducerRedisOutput.md +18 -0
  29. data/docs/GatewayCreateProducerRedshift.md +1 -1
  30. data/docs/GatewayUpdateProducerHanaDb.md +1 -1
  31. data/docs/GatewayUpdateProducerMSSQL.md +1 -1
  32. data/docs/GatewayUpdateProducerMongo.md +1 -1
  33. data/docs/GatewayUpdateProducerMySQL.md +1 -1
  34. data/docs/GatewayUpdateProducerOracleDb.md +1 -1
  35. data/docs/GatewayUpdateProducerPostgreSQL.md +1 -1
  36. data/docs/GatewayUpdateProducerRdp.md +1 -1
  37. data/docs/GatewayUpdateProducerRedis.md +50 -0
  38. data/docs/GatewayUpdateProducerRedisOutput.md +18 -0
  39. data/docs/GatewayUpdateProducerRedshift.md +1 -1
  40. data/docs/Item.md +2 -0
  41. data/docs/LastStatusInfo.md +3 -1
  42. data/docs/SecretInfo.md +36 -0
  43. data/docs/TargetTypeDetailsInput.md +4 -0
  44. data/docs/UpdateItem.md +1 -1
  45. data/docs/UpdateRotatedSecret.md +1 -1
  46. data/docs/UpdateSSHCertIssuer.md +1 -1
  47. data/docs/UpdateWindowsTarget.md +8 -4
  48. data/docs/V2Api.md +503 -2
  49. data/lib/akeyless/api/v2_api.rb +501 -0
  50. data/lib/akeyless/models/create_esm.rb +325 -0
  51. data/lib/akeyless/models/create_esm_output.rb +228 -0
  52. data/lib/akeyless/models/create_rotated_secret.rb +1 -1
  53. data/lib/akeyless/models/create_secret.rb +1 -1
  54. data/lib/akeyless/models/create_ssh_cert_issuer.rb +1 -1
  55. data/lib/akeyless/models/create_windows_target.rb +40 -3
  56. data/lib/akeyless/models/describe_item.rb +13 -1
  57. data/lib/akeyless/models/ds_producer_details.rb +12 -1
  58. data/lib/akeyless/models/esm_create.rb +320 -0
  59. data/lib/akeyless/models/esm_create_secret_output.rb +228 -0
  60. data/lib/akeyless/models/esm_delete.rb +273 -0
  61. data/lib/akeyless/models/esm_get.rb +273 -0
  62. data/lib/akeyless/models/esm_get_secret_output.rb +228 -0
  63. data/lib/akeyless/models/esm_list.rb +258 -0
  64. data/lib/akeyless/models/esm_list_secrets_output.rb +221 -0
  65. data/lib/akeyless/models/esm_update.rb +320 -0
  66. data/lib/akeyless/models/esm_update_secret_output.rb +228 -0
  67. data/lib/akeyless/models/gateway_create_producer_hana_db.rb +1 -1
  68. data/lib/akeyless/models/gateway_create_producer_mongo.rb +1 -1
  69. data/lib/akeyless/models/gateway_create_producer_mssql.rb +1 -1
  70. data/lib/akeyless/models/gateway_create_producer_my_sql.rb +1 -1
  71. data/lib/akeyless/models/gateway_create_producer_oracle_db.rb +1 -1
  72. data/lib/akeyless/models/gateway_create_producer_postgre_sql.rb +1 -1
  73. data/lib/akeyless/models/gateway_create_producer_rdp.rb +1 -1
  74. data/lib/akeyless/models/gateway_create_producer_redis.rb +388 -0
  75. data/lib/akeyless/models/gateway_create_producer_redis_output.rb +219 -0
  76. data/lib/akeyless/models/gateway_create_producer_redshift.rb +1 -1
  77. data/lib/akeyless/models/gateway_update_producer_hana_db.rb +1 -1
  78. data/lib/akeyless/models/gateway_update_producer_mongo.rb +1 -1
  79. data/lib/akeyless/models/gateway_update_producer_mssql.rb +1 -1
  80. data/lib/akeyless/models/gateway_update_producer_my_sql.rb +1 -1
  81. data/lib/akeyless/models/gateway_update_producer_oracle_db.rb +1 -1
  82. data/lib/akeyless/models/gateway_update_producer_postgre_sql.rb +1 -1
  83. data/lib/akeyless/models/gateway_update_producer_rdp.rb +1 -1
  84. data/lib/akeyless/models/gateway_update_producer_redis.rb +398 -0
  85. data/lib/akeyless/models/gateway_update_producer_redis_output.rb +219 -0
  86. data/lib/akeyless/models/gateway_update_producer_redshift.rb +1 -1
  87. data/lib/akeyless/models/item.rb +10 -1
  88. data/lib/akeyless/models/last_status_info.rb +14 -4
  89. data/lib/akeyless/models/secret_info.rb +302 -0
  90. data/lib/akeyless/models/target_type_details_input.rb +19 -1
  91. data/lib/akeyless/models/update_item.rb +1 -1
  92. data/lib/akeyless/models/update_rotated_secret.rb +1 -1
  93. data/lib/akeyless/models/update_ssh_cert_issuer.rb +1 -1
  94. data/lib/akeyless/models/update_windows_target.rb +40 -3
  95. data/lib/akeyless/version.rb +1 -1
  96. data/lib/akeyless.rb +16 -0
  97. data/spec/models/create_esm_output_spec.rb +40 -0
  98. data/spec/models/create_esm_spec.rb +88 -0
  99. data/spec/models/esm_create_secret_output_spec.rb +40 -0
  100. data/spec/models/esm_create_spec.rb +82 -0
  101. data/spec/models/esm_delete_spec.rb +58 -0
  102. data/spec/models/esm_get_secret_output_spec.rb +40 -0
  103. data/spec/models/esm_get_spec.rb +58 -0
  104. data/spec/models/esm_list_secrets_output_spec.rb +34 -0
  105. data/spec/models/esm_list_spec.rb +52 -0
  106. data/spec/models/esm_update_secret_output_spec.rb +40 -0
  107. data/spec/models/esm_update_spec.rb +82 -0
  108. data/spec/models/gateway_create_producer_redis_output_spec.rb +34 -0
  109. data/spec/models/gateway_create_producer_redis_spec.rb +124 -0
  110. data/spec/models/gateway_update_producer_redis_output_spec.rb +34 -0
  111. data/spec/models/gateway_update_producer_redis_spec.rb +130 -0
  112. data/spec/models/secret_info_spec.rb +88 -0
  113. metadata +647 -583
@@ -0,0 +1,398 @@
1
+ =begin
2
+ #Akeyless API
3
+
4
+ #The purpose of this application is to provide access to Akeyless API.
5
+
6
+ The version of the OpenAPI document: 2.0
7
+ Contact: support@akeyless.io
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.5.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Akeyless
17
+ # gatewayUpdateProducerRedis is a command that updates redis producer
18
+ class GatewayUpdateProducerRedis
19
+ # A JSON array list of redis ACL rules to attach to the created user. For available rules see the ACL CAT command https://redis.io/commands/acl-cat By default the user will have permissions to read all keys '[\"~*\", \"+@read\"]'
20
+ attr_accessor :acl_rules
21
+
22
+ # Protection from accidental deletion of this item [true/false]
23
+ attr_accessor :delete_protection
24
+
25
+ # Redis Host
26
+ attr_accessor :host
27
+
28
+ # Set output format to JSON
29
+ attr_accessor :json
30
+
31
+ # Producer name
32
+ attr_accessor :name
33
+
34
+ # Producer name
35
+ attr_accessor :new_name
36
+
37
+ # Redis Password
38
+ attr_accessor :password
39
+
40
+ # Redis Port
41
+ attr_accessor :port
42
+
43
+ # Dynamic producer encryption key
44
+ attr_accessor :producer_encryption_key_name
45
+
46
+ # Enable/Disable SSL [true/false]
47
+ attr_accessor :ssl
48
+
49
+ # SSL CA certificate in base64 encoding generated from a trusted Certificate Authority (CA)
50
+ attr_accessor :ssl_certificate
51
+
52
+ # Add tags attached to this object
53
+ attr_accessor :tags
54
+
55
+ # Target name
56
+ attr_accessor :target_name
57
+
58
+ # Authentication token (see `/auth` and `/configure`)
59
+ attr_accessor :token
60
+
61
+ # The universal identity token, Required only for universal_identity authentication
62
+ attr_accessor :uid_token
63
+
64
+ # User TTL
65
+ attr_accessor :user_ttl
66
+
67
+ # Redis Username
68
+ attr_accessor :username
69
+
70
+ # Attribute mapping from ruby-style variable name to JSON key.
71
+ def self.attribute_map
72
+ {
73
+ :'acl_rules' => :'acl-rules',
74
+ :'delete_protection' => :'delete_protection',
75
+ :'host' => :'host',
76
+ :'json' => :'json',
77
+ :'name' => :'name',
78
+ :'new_name' => :'new-name',
79
+ :'password' => :'password',
80
+ :'port' => :'port',
81
+ :'producer_encryption_key_name' => :'producer-encryption-key-name',
82
+ :'ssl' => :'ssl',
83
+ :'ssl_certificate' => :'ssl-certificate',
84
+ :'tags' => :'tags',
85
+ :'target_name' => :'target-name',
86
+ :'token' => :'token',
87
+ :'uid_token' => :'uid-token',
88
+ :'user_ttl' => :'user-ttl',
89
+ :'username' => :'username'
90
+ }
91
+ end
92
+
93
+ # Returns all the JSON keys this model knows about
94
+ def self.acceptable_attributes
95
+ attribute_map.values
96
+ end
97
+
98
+ # Attribute type mapping.
99
+ def self.openapi_types
100
+ {
101
+ :'acl_rules' => :'String',
102
+ :'delete_protection' => :'String',
103
+ :'host' => :'String',
104
+ :'json' => :'Boolean',
105
+ :'name' => :'String',
106
+ :'new_name' => :'String',
107
+ :'password' => :'String',
108
+ :'port' => :'String',
109
+ :'producer_encryption_key_name' => :'String',
110
+ :'ssl' => :'Boolean',
111
+ :'ssl_certificate' => :'String',
112
+ :'tags' => :'Array<String>',
113
+ :'target_name' => :'String',
114
+ :'token' => :'String',
115
+ :'uid_token' => :'String',
116
+ :'user_ttl' => :'String',
117
+ :'username' => :'String'
118
+ }
119
+ end
120
+
121
+ # List of attributes with nullable: true
122
+ def self.openapi_nullable
123
+ Set.new([
124
+ ])
125
+ end
126
+
127
+ # Initializes the object
128
+ # @param [Hash] attributes Model attributes in the form of hash
129
+ def initialize(attributes = {})
130
+ if (!attributes.is_a?(Hash))
131
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::GatewayUpdateProducerRedis` initialize method"
132
+ end
133
+
134
+ # check to see if the attribute exists and convert string to symbol for hash key
135
+ attributes = attributes.each_with_object({}) { |(k, v), h|
136
+ if (!self.class.attribute_map.key?(k.to_sym))
137
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::GatewayUpdateProducerRedis`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
138
+ end
139
+ h[k.to_sym] = v
140
+ }
141
+
142
+ if attributes.key?(:'acl_rules')
143
+ self.acl_rules = attributes[:'acl_rules']
144
+ end
145
+
146
+ if attributes.key?(:'delete_protection')
147
+ self.delete_protection = attributes[:'delete_protection']
148
+ end
149
+
150
+ if attributes.key?(:'host')
151
+ self.host = attributes[:'host']
152
+ else
153
+ self.host = '127.0.0.1'
154
+ end
155
+
156
+ if attributes.key?(:'json')
157
+ self.json = attributes[:'json']
158
+ else
159
+ self.json = false
160
+ end
161
+
162
+ if attributes.key?(:'name')
163
+ self.name = attributes[:'name']
164
+ end
165
+
166
+ if attributes.key?(:'new_name')
167
+ self.new_name = attributes[:'new_name']
168
+ end
169
+
170
+ if attributes.key?(:'password')
171
+ self.password = attributes[:'password']
172
+ end
173
+
174
+ if attributes.key?(:'port')
175
+ self.port = attributes[:'port']
176
+ else
177
+ self.port = '6379'
178
+ end
179
+
180
+ if attributes.key?(:'producer_encryption_key_name')
181
+ self.producer_encryption_key_name = attributes[:'producer_encryption_key_name']
182
+ end
183
+
184
+ if attributes.key?(:'ssl')
185
+ self.ssl = attributes[:'ssl']
186
+ else
187
+ self.ssl = false
188
+ end
189
+
190
+ if attributes.key?(:'ssl_certificate')
191
+ self.ssl_certificate = attributes[:'ssl_certificate']
192
+ end
193
+
194
+ if attributes.key?(:'tags')
195
+ if (value = attributes[:'tags']).is_a?(Array)
196
+ self.tags = value
197
+ end
198
+ end
199
+
200
+ if attributes.key?(:'target_name')
201
+ self.target_name = attributes[:'target_name']
202
+ end
203
+
204
+ if attributes.key?(:'token')
205
+ self.token = attributes[:'token']
206
+ end
207
+
208
+ if attributes.key?(:'uid_token')
209
+ self.uid_token = attributes[:'uid_token']
210
+ end
211
+
212
+ if attributes.key?(:'user_ttl')
213
+ self.user_ttl = attributes[:'user_ttl']
214
+ else
215
+ self.user_ttl = '60m'
216
+ end
217
+
218
+ if attributes.key?(:'username')
219
+ self.username = attributes[:'username']
220
+ end
221
+ end
222
+
223
+ # Show invalid properties with the reasons. Usually used together with valid?
224
+ # @return Array for valid properties with the reasons
225
+ def list_invalid_properties
226
+ invalid_properties = Array.new
227
+ if @name.nil?
228
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
229
+ end
230
+
231
+ invalid_properties
232
+ end
233
+
234
+ # Check to see if the all the properties in the model are valid
235
+ # @return true if the model is valid
236
+ def valid?
237
+ return false if @name.nil?
238
+ true
239
+ end
240
+
241
+ # Checks equality by comparing each attribute.
242
+ # @param [Object] Object to be compared
243
+ def ==(o)
244
+ return true if self.equal?(o)
245
+ self.class == o.class &&
246
+ acl_rules == o.acl_rules &&
247
+ delete_protection == o.delete_protection &&
248
+ host == o.host &&
249
+ json == o.json &&
250
+ name == o.name &&
251
+ new_name == o.new_name &&
252
+ password == o.password &&
253
+ port == o.port &&
254
+ producer_encryption_key_name == o.producer_encryption_key_name &&
255
+ ssl == o.ssl &&
256
+ ssl_certificate == o.ssl_certificate &&
257
+ tags == o.tags &&
258
+ target_name == o.target_name &&
259
+ token == o.token &&
260
+ uid_token == o.uid_token &&
261
+ user_ttl == o.user_ttl &&
262
+ username == o.username
263
+ end
264
+
265
+ # @see the `==` method
266
+ # @param [Object] Object to be compared
267
+ def eql?(o)
268
+ self == o
269
+ end
270
+
271
+ # Calculates hash code according to all attributes.
272
+ # @return [Integer] Hash code
273
+ def hash
274
+ [acl_rules, delete_protection, host, json, name, new_name, password, port, producer_encryption_key_name, ssl, ssl_certificate, tags, target_name, token, uid_token, user_ttl, username].hash
275
+ end
276
+
277
+ # Builds the object from hash
278
+ # @param [Hash] attributes Model attributes in the form of hash
279
+ # @return [Object] Returns the model itself
280
+ def self.build_from_hash(attributes)
281
+ new.build_from_hash(attributes)
282
+ end
283
+
284
+ # Builds the object from hash
285
+ # @param [Hash] attributes Model attributes in the form of hash
286
+ # @return [Object] Returns the model itself
287
+ def build_from_hash(attributes)
288
+ return nil unless attributes.is_a?(Hash)
289
+ attributes = attributes.transform_keys(&:to_sym)
290
+ self.class.openapi_types.each_pair do |key, type|
291
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
292
+ self.send("#{key}=", nil)
293
+ elsif type =~ /\AArray<(.*)>/i
294
+ # check to ensure the input is an array given that the attribute
295
+ # is documented as an array but the input is not
296
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
297
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
298
+ end
299
+ elsif !attributes[self.class.attribute_map[key]].nil?
300
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
301
+ end
302
+ end
303
+
304
+ self
305
+ end
306
+
307
+ # Deserializes the data based on type
308
+ # @param string type Data type
309
+ # @param string value Value to be deserialized
310
+ # @return [Object] Deserialized data
311
+ def _deserialize(type, value)
312
+ case type.to_sym
313
+ when :Time
314
+ Time.parse(value)
315
+ when :Date
316
+ Date.parse(value)
317
+ when :String
318
+ value.to_s
319
+ when :Integer
320
+ value.to_i
321
+ when :Float
322
+ value.to_f
323
+ when :Boolean
324
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
325
+ true
326
+ else
327
+ false
328
+ end
329
+ when :Object
330
+ # generic object (usually a Hash), return directly
331
+ value
332
+ when /\AArray<(?<inner_type>.+)>\z/
333
+ inner_type = Regexp.last_match[:inner_type]
334
+ value.map { |v| _deserialize(inner_type, v) }
335
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
336
+ k_type = Regexp.last_match[:k_type]
337
+ v_type = Regexp.last_match[:v_type]
338
+ {}.tap do |hash|
339
+ value.each do |k, v|
340
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
341
+ end
342
+ end
343
+ else # model
344
+ # models (e.g. Pet) or oneOf
345
+ klass = Akeyless.const_get(type)
346
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
347
+ end
348
+ end
349
+
350
+ # Returns the string representation of the object
351
+ # @return [String] String presentation of the object
352
+ def to_s
353
+ to_hash.to_s
354
+ end
355
+
356
+ # to_body is an alias to to_hash (backward compatibility)
357
+ # @return [Hash] Returns the object in the form of hash
358
+ def to_body
359
+ to_hash
360
+ end
361
+
362
+ # Returns the object in the form of hash
363
+ # @return [Hash] Returns the object in the form of hash
364
+ def to_hash
365
+ hash = {}
366
+ self.class.attribute_map.each_pair do |attr, param|
367
+ value = self.send(attr)
368
+ if value.nil?
369
+ is_nullable = self.class.openapi_nullable.include?(attr)
370
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
371
+ end
372
+
373
+ hash[param] = _to_hash(value)
374
+ end
375
+ hash
376
+ end
377
+
378
+ # Outputs non-array value in the form of hash
379
+ # For object, use to_hash. Otherwise, just return the value
380
+ # @param [Object] value Any valid value
381
+ # @return [Hash] Returns the value in the form of hash
382
+ def _to_hash(value)
383
+ if value.is_a?(Array)
384
+ value.compact.map { |v| _to_hash(v) }
385
+ elsif value.is_a?(Hash)
386
+ {}.tap do |hash|
387
+ value.each { |k, v| hash[k] = _to_hash(v) }
388
+ end
389
+ elsif value.respond_to? :to_hash
390
+ value.to_hash
391
+ else
392
+ value
393
+ end
394
+ end
395
+
396
+ end
397
+
398
+ end
@@ -0,0 +1,219 @@
1
+ =begin
2
+ #Akeyless API
3
+
4
+ #The purpose of this application is to provide access to Akeyless API.
5
+
6
+ The version of the OpenAPI document: 2.0
7
+ Contact: support@akeyless.io
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.5.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Akeyless
17
+ class GatewayUpdateProducerRedisOutput
18
+ attr_accessor :producer_details
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'producer_details' => :'producer_details'
24
+ }
25
+ end
26
+
27
+ # Returns all the JSON keys this model knows about
28
+ def self.acceptable_attributes
29
+ attribute_map.values
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.openapi_types
34
+ {
35
+ :'producer_details' => :'DSProducerDetails'
36
+ }
37
+ end
38
+
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([
42
+ ])
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ if (!attributes.is_a?(Hash))
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::GatewayUpdateProducerRedisOutput` initialize method"
50
+ end
51
+
52
+ # check to see if the attribute exists and convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}) { |(k, v), h|
54
+ if (!self.class.attribute_map.key?(k.to_sym))
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::GatewayUpdateProducerRedisOutput`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ end
57
+ h[k.to_sym] = v
58
+ }
59
+
60
+ if attributes.key?(:'producer_details')
61
+ self.producer_details = attributes[:'producer_details']
62
+ end
63
+ end
64
+
65
+ # Show invalid properties with the reasons. Usually used together with valid?
66
+ # @return Array for valid properties with the reasons
67
+ def list_invalid_properties
68
+ invalid_properties = Array.new
69
+ invalid_properties
70
+ end
71
+
72
+ # Check to see if the all the properties in the model are valid
73
+ # @return true if the model is valid
74
+ def valid?
75
+ true
76
+ end
77
+
78
+ # Checks equality by comparing each attribute.
79
+ # @param [Object] Object to be compared
80
+ def ==(o)
81
+ return true if self.equal?(o)
82
+ self.class == o.class &&
83
+ producer_details == o.producer_details
84
+ end
85
+
86
+ # @see the `==` method
87
+ # @param [Object] Object to be compared
88
+ def eql?(o)
89
+ self == o
90
+ end
91
+
92
+ # Calculates hash code according to all attributes.
93
+ # @return [Integer] Hash code
94
+ def hash
95
+ [producer_details].hash
96
+ end
97
+
98
+ # Builds the object from hash
99
+ # @param [Hash] attributes Model attributes in the form of hash
100
+ # @return [Object] Returns the model itself
101
+ def self.build_from_hash(attributes)
102
+ new.build_from_hash(attributes)
103
+ end
104
+
105
+ # Builds the object from hash
106
+ # @param [Hash] attributes Model attributes in the form of hash
107
+ # @return [Object] Returns the model itself
108
+ def build_from_hash(attributes)
109
+ return nil unless attributes.is_a?(Hash)
110
+ attributes = attributes.transform_keys(&:to_sym)
111
+ self.class.openapi_types.each_pair do |key, type|
112
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
113
+ self.send("#{key}=", nil)
114
+ elsif type =~ /\AArray<(.*)>/i
115
+ # check to ensure the input is an array given that the attribute
116
+ # is documented as an array but the input is not
117
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
118
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
119
+ end
120
+ elsif !attributes[self.class.attribute_map[key]].nil?
121
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
122
+ end
123
+ end
124
+
125
+ self
126
+ end
127
+
128
+ # Deserializes the data based on type
129
+ # @param string type Data type
130
+ # @param string value Value to be deserialized
131
+ # @return [Object] Deserialized data
132
+ def _deserialize(type, value)
133
+ case type.to_sym
134
+ when :Time
135
+ Time.parse(value)
136
+ when :Date
137
+ Date.parse(value)
138
+ when :String
139
+ value.to_s
140
+ when :Integer
141
+ value.to_i
142
+ when :Float
143
+ value.to_f
144
+ when :Boolean
145
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
146
+ true
147
+ else
148
+ false
149
+ end
150
+ when :Object
151
+ # generic object (usually a Hash), return directly
152
+ value
153
+ when /\AArray<(?<inner_type>.+)>\z/
154
+ inner_type = Regexp.last_match[:inner_type]
155
+ value.map { |v| _deserialize(inner_type, v) }
156
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
157
+ k_type = Regexp.last_match[:k_type]
158
+ v_type = Regexp.last_match[:v_type]
159
+ {}.tap do |hash|
160
+ value.each do |k, v|
161
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
162
+ end
163
+ end
164
+ else # model
165
+ # models (e.g. Pet) or oneOf
166
+ klass = Akeyless.const_get(type)
167
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
168
+ end
169
+ end
170
+
171
+ # Returns the string representation of the object
172
+ # @return [String] String presentation of the object
173
+ def to_s
174
+ to_hash.to_s
175
+ end
176
+
177
+ # to_body is an alias to to_hash (backward compatibility)
178
+ # @return [Hash] Returns the object in the form of hash
179
+ def to_body
180
+ to_hash
181
+ end
182
+
183
+ # Returns the object in the form of hash
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_hash
186
+ hash = {}
187
+ self.class.attribute_map.each_pair do |attr, param|
188
+ value = self.send(attr)
189
+ if value.nil?
190
+ is_nullable = self.class.openapi_nullable.include?(attr)
191
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
192
+ end
193
+
194
+ hash[param] = _to_hash(value)
195
+ end
196
+ hash
197
+ end
198
+
199
+ # Outputs non-array value in the form of hash
200
+ # For object, use to_hash. Otherwise, just return the value
201
+ # @param [Object] value Any valid value
202
+ # @return [Hash] Returns the value in the form of hash
203
+ def _to_hash(value)
204
+ if value.is_a?(Array)
205
+ value.compact.map { |v| _to_hash(v) }
206
+ elsif value.is_a?(Hash)
207
+ {}.tap do |hash|
208
+ value.each { |k, v| hash[k] = _to_hash(v) }
209
+ end
210
+ elsif value.respond_to? :to_hash
211
+ value.to_hash
212
+ else
213
+ value
214
+ end
215
+ end
216
+
217
+ end
218
+
219
+ end
@@ -52,7 +52,7 @@ module Akeyless
52
52
  # Enable/Disable secure remote access [true/false]
53
53
  attr_accessor :secure_access_enable
54
54
 
55
- # Target DB servers for connections
55
+ # Target DB servers for connections (In case of Linked Target association, host(s) will inherit Linked Target hosts)
56
56
  attr_accessor :secure_access_host
57
57
 
58
58
  # Enable/Disable SSL [true/false]
@@ -21,6 +21,8 @@ module Akeyless
21
21
 
22
22
  attr_accessor :auto_rotate
23
23
 
24
+ attr_accessor :bastion_details
25
+
24
26
  attr_accessor :cert_issuer_signer_key_name
25
27
 
26
28
  attr_accessor :certificate_issue_details
@@ -98,6 +100,7 @@ module Akeyless
98
100
  :'access_date' => :'access_date',
99
101
  :'access_request_status' => :'access_request_status',
100
102
  :'auto_rotate' => :'auto_rotate',
103
+ :'bastion_details' => :'bastion_details',
101
104
  :'cert_issuer_signer_key_name' => :'cert_issuer_signer_key_name',
102
105
  :'certificate_issue_details' => :'certificate_issue_details',
103
106
  :'certificates' => :'certificates',
@@ -147,6 +150,7 @@ module Akeyless
147
150
  :'access_date' => :'Time',
148
151
  :'access_request_status' => :'String',
149
152
  :'auto_rotate' => :'Boolean',
153
+ :'bastion_details' => :'BastionsList',
150
154
  :'cert_issuer_signer_key_name' => :'String',
151
155
  :'certificate_issue_details' => :'CertificateIssueInfo',
152
156
  :'certificates' => :'String',
@@ -218,6 +222,10 @@ module Akeyless
218
222
  self.auto_rotate = attributes[:'auto_rotate']
219
223
  end
220
224
 
225
+ if attributes.key?(:'bastion_details')
226
+ self.bastion_details = attributes[:'bastion_details']
227
+ end
228
+
221
229
  if attributes.key?(:'cert_issuer_signer_key_name')
222
230
  self.cert_issuer_signer_key_name = attributes[:'cert_issuer_signer_key_name']
223
231
  end
@@ -392,6 +400,7 @@ module Akeyless
392
400
  access_date == o.access_date &&
393
401
  access_request_status == o.access_request_status &&
394
402
  auto_rotate == o.auto_rotate &&
403
+ bastion_details == o.bastion_details &&
395
404
  cert_issuer_signer_key_name == o.cert_issuer_signer_key_name &&
396
405
  certificate_issue_details == o.certificate_issue_details &&
397
406
  certificates == o.certificates &&
@@ -438,7 +447,7 @@ module Akeyless
438
447
  # Calculates hash code according to all attributes.
439
448
  # @return [Integer] Hash code
440
449
  def hash
441
- [access_date, access_request_status, auto_rotate, cert_issuer_signer_key_name, certificate_issue_details, certificates, client_permissions, creation_date, customer_fragment_id, delete_protection, deletion_date, display_id, gateway_details, is_access_request_enabled, is_enabled, item_accessibility, item_general_info, item_id, item_metadata, item_name, item_size, item_state, item_sub_type, item_tags, item_targets_assoc, item_type, item_versions, last_version, linked_details, modification_date, next_rotation_date, protection_key_name, protection_key_type, public_value, rotation_interval, shared_by, target_versions, with_customer_fragment].hash
450
+ [access_date, access_request_status, auto_rotate, bastion_details, cert_issuer_signer_key_name, certificate_issue_details, certificates, client_permissions, creation_date, customer_fragment_id, delete_protection, deletion_date, display_id, gateway_details, is_access_request_enabled, is_enabled, item_accessibility, item_general_info, item_id, item_metadata, item_name, item_size, item_state, item_sub_type, item_tags, item_targets_assoc, item_type, item_versions, last_version, linked_details, modification_date, next_rotation_date, protection_key_name, protection_key_type, public_value, rotation_interval, shared_by, target_versions, with_customer_fragment].hash
442
451
  end
443
452
 
444
453
  # Builds the object from hash