akeyless 2.15.29 → 2.16.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +27 -9
  3. data/docs/Auth.md +5 -1
  4. data/docs/AuthMethodAccessInfo.md +2 -0
  5. data/docs/CertAccessRules.md +34 -0
  6. data/docs/ConfigHash.md +2 -0
  7. data/docs/CreateAuthMethodCert.md +48 -0
  8. data/docs/CreateAuthMethodCertOutput.md +18 -0
  9. data/docs/CreateAuthMethodLDAP.md +3 -1
  10. data/docs/CreateAuthMethodOIDC.md +4 -0
  11. data/docs/CreateClassicKey.md +5 -1
  12. data/docs/DSProducerDetails.md +4 -0
  13. data/docs/GatewayCreateProducerCustom.md +4 -0
  14. data/docs/GatewayCreateProducerHanaDb.md +54 -0
  15. data/docs/GatewayCreateProducerHanaDbOutput.md +18 -0
  16. data/docs/GatewayCreateProducerMongo.md +1 -1
  17. data/docs/GatewayCreateProducerOracleDb.md +8 -0
  18. data/docs/GatewayMessageQueueInfo.md +1 -3
  19. data/docs/GatewayUpdateProducerCustom.md +4 -0
  20. data/docs/GatewayUpdateProducerHanaDb.md +56 -0
  21. data/docs/GatewayUpdateProducerHanaDbOutput.md +18 -0
  22. data/docs/GatewayUpdateProducerMongo.md +1 -1
  23. data/docs/GatewayUpdateProducerOracleDb.md +8 -0
  24. data/docs/KMIPClient.md +2 -0
  25. data/docs/KMIPConfigPart.md +5 -1
  26. data/docs/KMIPServer.md +30 -0
  27. data/docs/KmipDeleteServer.md +20 -0
  28. data/docs/KmipDescribeServerOutput.md +4 -0
  29. data/docs/KmipMoveServer.md +22 -0
  30. data/docs/KmipMoveServerOutput.md +20 -0
  31. data/docs/ListAuthMethods.md +4 -0
  32. data/docs/ListRoles.md +2 -0
  33. data/docs/ListTargets.md +2 -0
  34. data/docs/OIDCAccessRules.md +4 -0
  35. data/docs/TargetItemAssociation.md +2 -0
  36. data/docs/UpdateAuthMethodCert.md +50 -0
  37. data/docs/UpdateAuthMethodCertOutput.md +18 -0
  38. data/docs/UpdateAuthMethodLDAP.md +3 -1
  39. data/docs/UpdateAuthMethodOIDC.md +4 -0
  40. data/docs/UpdateDBTarget.md +4 -0
  41. data/docs/UpdateOutput.md +2 -0
  42. data/docs/V2Api.md +319 -0
  43. data/git_push.sh +0 -0
  44. data/lib/akeyless/api/v2_api.rb +312 -0
  45. data/lib/akeyless/api_client.rb +3 -7
  46. data/lib/akeyless/configuration.rb +2 -1
  47. data/lib/akeyless/models/auth.rb +22 -2
  48. data/lib/akeyless/models/auth_method_access_info.rb +10 -1
  49. data/lib/akeyless/models/cert_access_rules.rb +316 -0
  50. data/lib/akeyless/models/config_hash.rb +10 -1
  51. data/lib/akeyless/models/create_auth_method_cert.rb +401 -0
  52. data/lib/akeyless/models/create_auth_method_cert_output.rb +219 -0
  53. data/lib/akeyless/models/create_auth_method_ldap.rb +14 -4
  54. data/lib/akeyless/models/create_auth_method_oidc.rb +23 -1
  55. data/lib/akeyless/models/create_classic_key.rb +26 -4
  56. data/lib/akeyless/models/ds_producer_details.rb +19 -1
  57. data/lib/akeyless/models/gateway_create_producer_custom.rb +23 -1
  58. data/lib/akeyless/models/gateway_create_producer_hana_db.rb +411 -0
  59. data/lib/akeyless/models/gateway_create_producer_hana_db_output.rb +219 -0
  60. data/lib/akeyless/models/gateway_create_producer_mongo.rb +0 -2
  61. data/lib/akeyless/models/gateway_create_producer_oracle_db.rb +39 -1
  62. data/lib/akeyless/models/gateway_message_queue_info.rb +4 -13
  63. data/lib/akeyless/models/gateway_update_producer_custom.rb +23 -1
  64. data/lib/akeyless/models/gateway_update_producer_hana_db.rb +421 -0
  65. data/lib/akeyless/models/gateway_update_producer_hana_db_output.rb +219 -0
  66. data/lib/akeyless/models/gateway_update_producer_mongo.rb +0 -2
  67. data/lib/akeyless/models/gateway_update_producer_oracle_db.rb +39 -1
  68. data/lib/akeyless/models/kmip_client.rb +10 -1
  69. data/lib/akeyless/models/kmip_config_part.rb +23 -1
  70. data/lib/akeyless/models/kmip_delete_server.rb +231 -0
  71. data/lib/akeyless/models/kmip_describe_server_output.rb +19 -1
  72. data/lib/akeyless/models/kmip_move_server.rb +240 -0
  73. data/lib/akeyless/models/kmip_move_server_output.rb +228 -0
  74. data/lib/akeyless/models/kmip_server.rb +277 -0
  75. data/lib/akeyless/models/list_auth_methods.rb +23 -1
  76. data/lib/akeyless/models/list_roles.rb +11 -1
  77. data/lib/akeyless/models/list_targets.rb +11 -1
  78. data/lib/akeyless/models/oidc_access_rules.rb +23 -1
  79. data/lib/akeyless/models/target_item_association.rb +10 -1
  80. data/lib/akeyless/models/update_auth_method_cert.rb +411 -0
  81. data/lib/akeyless/models/update_auth_method_cert_output.rb +219 -0
  82. data/lib/akeyless/models/update_auth_method_ldap.rb +14 -4
  83. data/lib/akeyless/models/update_auth_method_oidc.rb +23 -1
  84. data/lib/akeyless/models/update_db_target.rb +21 -1
  85. data/lib/akeyless/models/update_output.rb +10 -1
  86. data/lib/akeyless/version.rb +1 -1
  87. data/lib/akeyless.rb +13 -0
  88. data/spec/models/cert_access_rules_spec.rb +82 -0
  89. data/spec/models/create_auth_method_cert_output_spec.rb +34 -0
  90. data/spec/models/create_auth_method_cert_spec.rb +124 -0
  91. data/spec/models/gateway_create_producer_hana_db_output_spec.rb +34 -0
  92. data/spec/models/gateway_create_producer_hana_db_spec.rb +142 -0
  93. data/spec/models/gateway_update_producer_hana_db_output_spec.rb +34 -0
  94. data/spec/models/gateway_update_producer_hana_db_spec.rb +148 -0
  95. data/spec/models/kmip_delete_server_spec.rb +40 -0
  96. data/spec/models/kmip_move_server_output_spec.rb +40 -0
  97. data/spec/models/kmip_move_server_spec.rb +46 -0
  98. data/spec/models/kmip_server_spec.rb +58 -0
  99. data/spec/models/update_auth_method_cert_output_spec.rb +34 -0
  100. data/spec/models/update_auth_method_cert_spec.rb +130 -0
  101. metadata +508 -456
@@ -0,0 +1,411 @@
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.0.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Akeyless
17
+ # gatewayCreateProducerHanaDb is a command that creates hanadb producer
18
+ class GatewayCreateProducerHanaDb
19
+ # HanaDb Name
20
+ attr_accessor :hana_dbname
21
+
22
+ # HanaDb Creation statements
23
+ attr_accessor :hanadb_create_statements
24
+
25
+ # HanaDb Host
26
+ attr_accessor :hanadb_host
27
+
28
+ # HanaDb Password
29
+ attr_accessor :hanadb_password
30
+
31
+ # HanaDb Port
32
+ attr_accessor :hanadb_port
33
+
34
+ # HanaDb Revocation statements
35
+ attr_accessor :hanadb_revocation_statements
36
+
37
+ # HanaDb Username
38
+ attr_accessor :hanadb_username
39
+
40
+ # Producer name
41
+ attr_accessor :name
42
+
43
+ # Dynamic producer encryption key
44
+ attr_accessor :producer_encryption_key_name
45
+
46
+ attr_accessor :secure_access_bastion_issuer
47
+
48
+ attr_accessor :secure_access_db_schema
49
+
50
+ attr_accessor :secure_access_enable
51
+
52
+ attr_accessor :secure_access_host
53
+
54
+ attr_accessor :secure_access_web
55
+
56
+ # List of the tags attached to this secret
57
+ attr_accessor :tags
58
+
59
+ # Target name
60
+ attr_accessor :target_name
61
+
62
+ # Authentication token (see `/auth` and `/configure`)
63
+ attr_accessor :token
64
+
65
+ # The universal identity token, Required only for universal_identity authentication
66
+ attr_accessor :uid_token
67
+
68
+ # User TTL
69
+ attr_accessor :user_ttl
70
+
71
+ # Attribute mapping from ruby-style variable name to JSON key.
72
+ def self.attribute_map
73
+ {
74
+ :'hana_dbname' => :'hana-dbname',
75
+ :'hanadb_create_statements' => :'hanadb-create-statements',
76
+ :'hanadb_host' => :'hanadb-host',
77
+ :'hanadb_password' => :'hanadb-password',
78
+ :'hanadb_port' => :'hanadb-port',
79
+ :'hanadb_revocation_statements' => :'hanadb-revocation-statements',
80
+ :'hanadb_username' => :'hanadb-username',
81
+ :'name' => :'name',
82
+ :'producer_encryption_key_name' => :'producer-encryption-key-name',
83
+ :'secure_access_bastion_issuer' => :'secure-access-bastion-issuer',
84
+ :'secure_access_db_schema' => :'secure-access-db-schema',
85
+ :'secure_access_enable' => :'secure-access-enable',
86
+ :'secure_access_host' => :'secure-access-host',
87
+ :'secure_access_web' => :'secure-access-web',
88
+ :'tags' => :'tags',
89
+ :'target_name' => :'target-name',
90
+ :'token' => :'token',
91
+ :'uid_token' => :'uid-token',
92
+ :'user_ttl' => :'user-ttl'
93
+ }
94
+ end
95
+
96
+ # Returns all the JSON keys this model knows about
97
+ def self.acceptable_attributes
98
+ attribute_map.values
99
+ end
100
+
101
+ # Attribute type mapping.
102
+ def self.openapi_types
103
+ {
104
+ :'hana_dbname' => :'String',
105
+ :'hanadb_create_statements' => :'String',
106
+ :'hanadb_host' => :'String',
107
+ :'hanadb_password' => :'String',
108
+ :'hanadb_port' => :'String',
109
+ :'hanadb_revocation_statements' => :'String',
110
+ :'hanadb_username' => :'String',
111
+ :'name' => :'String',
112
+ :'producer_encryption_key_name' => :'String',
113
+ :'secure_access_bastion_issuer' => :'String',
114
+ :'secure_access_db_schema' => :'String',
115
+ :'secure_access_enable' => :'String',
116
+ :'secure_access_host' => :'Array<String>',
117
+ :'secure_access_web' => :'Boolean',
118
+ :'tags' => :'Array<String>',
119
+ :'target_name' => :'String',
120
+ :'token' => :'String',
121
+ :'uid_token' => :'String',
122
+ :'user_ttl' => :'String'
123
+ }
124
+ end
125
+
126
+ # List of attributes with nullable: true
127
+ def self.openapi_nullable
128
+ Set.new([
129
+ ])
130
+ end
131
+
132
+ # Initializes the object
133
+ # @param [Hash] attributes Model attributes in the form of hash
134
+ def initialize(attributes = {})
135
+ if (!attributes.is_a?(Hash))
136
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::GatewayCreateProducerHanaDb` initialize method"
137
+ end
138
+
139
+ # check to see if the attribute exists and convert string to symbol for hash key
140
+ attributes = attributes.each_with_object({}) { |(k, v), h|
141
+ if (!self.class.attribute_map.key?(k.to_sym))
142
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::GatewayCreateProducerHanaDb`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
143
+ end
144
+ h[k.to_sym] = v
145
+ }
146
+
147
+ if attributes.key?(:'hana_dbname')
148
+ self.hana_dbname = attributes[:'hana_dbname']
149
+ end
150
+
151
+ if attributes.key?(:'hanadb_create_statements')
152
+ self.hanadb_create_statements = attributes[:'hanadb_create_statements']
153
+ end
154
+
155
+ if attributes.key?(:'hanadb_host')
156
+ self.hanadb_host = attributes[:'hanadb_host']
157
+ else
158
+ self.hanadb_host = '127.0.0.1'
159
+ end
160
+
161
+ if attributes.key?(:'hanadb_password')
162
+ self.hanadb_password = attributes[:'hanadb_password']
163
+ end
164
+
165
+ if attributes.key?(:'hanadb_port')
166
+ self.hanadb_port = attributes[:'hanadb_port']
167
+ else
168
+ self.hanadb_port = '443'
169
+ end
170
+
171
+ if attributes.key?(:'hanadb_revocation_statements')
172
+ self.hanadb_revocation_statements = attributes[:'hanadb_revocation_statements']
173
+ end
174
+
175
+ if attributes.key?(:'hanadb_username')
176
+ self.hanadb_username = attributes[:'hanadb_username']
177
+ end
178
+
179
+ if attributes.key?(:'name')
180
+ self.name = attributes[:'name']
181
+ end
182
+
183
+ if attributes.key?(:'producer_encryption_key_name')
184
+ self.producer_encryption_key_name = attributes[:'producer_encryption_key_name']
185
+ end
186
+
187
+ if attributes.key?(:'secure_access_bastion_issuer')
188
+ self.secure_access_bastion_issuer = attributes[:'secure_access_bastion_issuer']
189
+ end
190
+
191
+ if attributes.key?(:'secure_access_db_schema')
192
+ self.secure_access_db_schema = attributes[:'secure_access_db_schema']
193
+ end
194
+
195
+ if attributes.key?(:'secure_access_enable')
196
+ self.secure_access_enable = attributes[:'secure_access_enable']
197
+ end
198
+
199
+ if attributes.key?(:'secure_access_host')
200
+ if (value = attributes[:'secure_access_host']).is_a?(Array)
201
+ self.secure_access_host = value
202
+ end
203
+ end
204
+
205
+ if attributes.key?(:'secure_access_web')
206
+ self.secure_access_web = attributes[:'secure_access_web']
207
+ end
208
+
209
+ if attributes.key?(:'tags')
210
+ if (value = attributes[:'tags']).is_a?(Array)
211
+ self.tags = value
212
+ end
213
+ end
214
+
215
+ if attributes.key?(:'target_name')
216
+ self.target_name = attributes[:'target_name']
217
+ end
218
+
219
+ if attributes.key?(:'token')
220
+ self.token = attributes[:'token']
221
+ end
222
+
223
+ if attributes.key?(:'uid_token')
224
+ self.uid_token = attributes[:'uid_token']
225
+ end
226
+
227
+ if attributes.key?(:'user_ttl')
228
+ self.user_ttl = attributes[:'user_ttl']
229
+ else
230
+ self.user_ttl = '60m'
231
+ end
232
+ end
233
+
234
+ # Show invalid properties with the reasons. Usually used together with valid?
235
+ # @return Array for valid properties with the reasons
236
+ def list_invalid_properties
237
+ invalid_properties = Array.new
238
+ if @name.nil?
239
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
240
+ end
241
+
242
+ invalid_properties
243
+ end
244
+
245
+ # Check to see if the all the properties in the model are valid
246
+ # @return true if the model is valid
247
+ def valid?
248
+ return false if @name.nil?
249
+ true
250
+ end
251
+
252
+ # Checks equality by comparing each attribute.
253
+ # @param [Object] Object to be compared
254
+ def ==(o)
255
+ return true if self.equal?(o)
256
+ self.class == o.class &&
257
+ hana_dbname == o.hana_dbname &&
258
+ hanadb_create_statements == o.hanadb_create_statements &&
259
+ hanadb_host == o.hanadb_host &&
260
+ hanadb_password == o.hanadb_password &&
261
+ hanadb_port == o.hanadb_port &&
262
+ hanadb_revocation_statements == o.hanadb_revocation_statements &&
263
+ hanadb_username == o.hanadb_username &&
264
+ name == o.name &&
265
+ producer_encryption_key_name == o.producer_encryption_key_name &&
266
+ secure_access_bastion_issuer == o.secure_access_bastion_issuer &&
267
+ secure_access_db_schema == o.secure_access_db_schema &&
268
+ secure_access_enable == o.secure_access_enable &&
269
+ secure_access_host == o.secure_access_host &&
270
+ secure_access_web == o.secure_access_web &&
271
+ tags == o.tags &&
272
+ target_name == o.target_name &&
273
+ token == o.token &&
274
+ uid_token == o.uid_token &&
275
+ user_ttl == o.user_ttl
276
+ end
277
+
278
+ # @see the `==` method
279
+ # @param [Object] Object to be compared
280
+ def eql?(o)
281
+ self == o
282
+ end
283
+
284
+ # Calculates hash code according to all attributes.
285
+ # @return [Integer] Hash code
286
+ def hash
287
+ [hana_dbname, hanadb_create_statements, hanadb_host, hanadb_password, hanadb_port, hanadb_revocation_statements, hanadb_username, name, producer_encryption_key_name, secure_access_bastion_issuer, secure_access_db_schema, secure_access_enable, secure_access_host, secure_access_web, tags, target_name, token, uid_token, user_ttl].hash
288
+ end
289
+
290
+ # Builds the object from hash
291
+ # @param [Hash] attributes Model attributes in the form of hash
292
+ # @return [Object] Returns the model itself
293
+ def self.build_from_hash(attributes)
294
+ new.build_from_hash(attributes)
295
+ end
296
+
297
+ # Builds the object from hash
298
+ # @param [Hash] attributes Model attributes in the form of hash
299
+ # @return [Object] Returns the model itself
300
+ def build_from_hash(attributes)
301
+ return nil unless attributes.is_a?(Hash)
302
+ attributes = attributes.transform_keys(&:to_sym)
303
+ self.class.openapi_types.each_pair do |key, type|
304
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
305
+ self.send("#{key}=", nil)
306
+ elsif type =~ /\AArray<(.*)>/i
307
+ # check to ensure the input is an array given that the attribute
308
+ # is documented as an array but the input is not
309
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
310
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
311
+ end
312
+ elsif !attributes[self.class.attribute_map[key]].nil?
313
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
314
+ end
315
+ end
316
+
317
+ self
318
+ end
319
+
320
+ # Deserializes the data based on type
321
+ # @param string type Data type
322
+ # @param string value Value to be deserialized
323
+ # @return [Object] Deserialized data
324
+ def _deserialize(type, value)
325
+ case type.to_sym
326
+ when :Time
327
+ Time.parse(value)
328
+ when :Date
329
+ Date.parse(value)
330
+ when :String
331
+ value.to_s
332
+ when :Integer
333
+ value.to_i
334
+ when :Float
335
+ value.to_f
336
+ when :Boolean
337
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
338
+ true
339
+ else
340
+ false
341
+ end
342
+ when :Object
343
+ # generic object (usually a Hash), return directly
344
+ value
345
+ when /\AArray<(?<inner_type>.+)>\z/
346
+ inner_type = Regexp.last_match[:inner_type]
347
+ value.map { |v| _deserialize(inner_type, v) }
348
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
349
+ k_type = Regexp.last_match[:k_type]
350
+ v_type = Regexp.last_match[:v_type]
351
+ {}.tap do |hash|
352
+ value.each do |k, v|
353
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
354
+ end
355
+ end
356
+ else # model
357
+ # models (e.g. Pet) or oneOf
358
+ klass = Akeyless.const_get(type)
359
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
360
+ end
361
+ end
362
+
363
+ # Returns the string representation of the object
364
+ # @return [String] String presentation of the object
365
+ def to_s
366
+ to_hash.to_s
367
+ end
368
+
369
+ # to_body is an alias to to_hash (backward compatibility)
370
+ # @return [Hash] Returns the object in the form of hash
371
+ def to_body
372
+ to_hash
373
+ end
374
+
375
+ # Returns the object in the form of hash
376
+ # @return [Hash] Returns the object in the form of hash
377
+ def to_hash
378
+ hash = {}
379
+ self.class.attribute_map.each_pair do |attr, param|
380
+ value = self.send(attr)
381
+ if value.nil?
382
+ is_nullable = self.class.openapi_nullable.include?(attr)
383
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
384
+ end
385
+
386
+ hash[param] = _to_hash(value)
387
+ end
388
+ hash
389
+ end
390
+
391
+ # Outputs non-array value in the form of hash
392
+ # For object, use to_hash. Otherwise, just return the value
393
+ # @param [Object] value Any valid value
394
+ # @return [Hash] Returns the value in the form of hash
395
+ def _to_hash(value)
396
+ if value.is_a?(Array)
397
+ value.compact.map { |v| _to_hash(v) }
398
+ elsif value.is_a?(Hash)
399
+ {}.tap do |hash|
400
+ value.each { |k, v| hash[k] = _to_hash(v) }
401
+ end
402
+ elsif value.respond_to? :to_hash
403
+ value.to_hash
404
+ else
405
+ value
406
+ end
407
+ end
408
+
409
+ end
410
+
411
+ 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.0.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Akeyless
17
+ class GatewayCreateProducerHanaDbOutput
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::GatewayCreateProducerHanaDbOutput` 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::GatewayCreateProducerHanaDbOutput`. 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
@@ -179,8 +179,6 @@ module Akeyless
179
179
 
180
180
  if attributes.key?(:'mongodb_custom_data')
181
181
  self.mongodb_custom_data = attributes[:'mongodb_custom_data']
182
- else
183
- self.mongodb_custom_data = '\"\"'
184
182
  end
185
183
 
186
184
  if attributes.key?(:'mongodb_default_auth_db')