akeyless 2.16.4 → 2.16.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +20 -1
  3. data/docs/AwsS3LogForwardingConfig.md +2 -0
  4. data/docs/CreateAuthMethod.md +1 -1
  5. data/docs/CreateAuthMethodAWSIAM.md +1 -1
  6. data/docs/CreateAuthMethodAzureAD.md +1 -1
  7. data/docs/CreateAuthMethodCert.md +1 -1
  8. data/docs/CreateAuthMethodGCP.md +1 -1
  9. data/docs/CreateAuthMethodHuawei.md +1 -1
  10. data/docs/CreateAuthMethodK8S.md +1 -1
  11. data/docs/CreateAuthMethodLDAP.md +1 -1
  12. data/docs/CreateAuthMethodOAuth2.md +1 -1
  13. data/docs/CreateAuthMethodOIDC.md +1 -1
  14. data/docs/CreateAuthMethodSAML.md +1 -1
  15. data/docs/CreateAuthMethodUniversalIdentity.md +1 -1
  16. data/docs/CreateClassicKey.md +12 -0
  17. data/docs/CreateRotatedSecret.md +28 -0
  18. data/docs/CreateSalesforceTarget.md +42 -0
  19. data/docs/CreateSalesforceTargetOutput.md +18 -0
  20. data/docs/GatewayCreateMigration.md +50 -0
  21. data/docs/GatewayDeleteMigration.md +22 -0
  22. data/docs/GatewayGetMigration.md +22 -0
  23. data/docs/GatewayMigrationCreateOutput.md +18 -0
  24. data/docs/GatewayMigrationDeleteOutput.md +18 -0
  25. data/docs/GatewayMigrationGetOutput.md +18 -0
  26. data/docs/GatewayMigrationUpdateOutput.md +18 -0
  27. data/docs/GatewayUpdateMigration.md +52 -0
  28. data/docs/GetSecretValue.md +2 -0
  29. data/docs/HashiPayload.md +2 -0
  30. data/docs/Item.md +2 -0
  31. data/docs/TargetTypeDetailsInput.md +12 -0
  32. data/docs/UpdateAuthMethod.md +1 -1
  33. data/docs/UpdateAuthMethodAWSIAM.md +1 -1
  34. data/docs/UpdateAuthMethodAzureAD.md +1 -1
  35. data/docs/UpdateAuthMethodCert.md +1 -1
  36. data/docs/UpdateAuthMethodGCP.md +1 -1
  37. data/docs/UpdateAuthMethodK8S.md +1 -1
  38. data/docs/UpdateAuthMethodLDAP.md +1 -1
  39. data/docs/UpdateAuthMethodOAuth2.md +1 -1
  40. data/docs/UpdateAuthMethodOIDC.md +1 -1
  41. data/docs/UpdateAuthMethodSAML.md +1 -1
  42. data/docs/UpdateAuthMethodUniversalIdentity.md +1 -1
  43. data/docs/UpdateRotatedSecret.md +28 -0
  44. data/docs/UpdateSalesforceTarget.md +48 -0
  45. data/docs/UpdateSalesforceTargetOutput.md +18 -0
  46. data/docs/V2Api.md +441 -0
  47. data/lib/akeyless/api/v2_api.rb +448 -0
  48. data/lib/akeyless/models/aws_s3_log_forwarding_config.rb +10 -1
  49. data/lib/akeyless/models/create_auth_method.rb +0 -2
  50. data/lib/akeyless/models/create_auth_method_awsiam.rb +0 -2
  51. data/lib/akeyless/models/create_auth_method_azure_ad.rb +0 -2
  52. data/lib/akeyless/models/create_auth_method_cert.rb +0 -2
  53. data/lib/akeyless/models/create_auth_method_gcp.rb +0 -2
  54. data/lib/akeyless/models/create_auth_method_huawei.rb +0 -2
  55. data/lib/akeyless/models/create_auth_method_k8_s.rb +0 -2
  56. data/lib/akeyless/models/create_auth_method_ldap.rb +0 -2
  57. data/lib/akeyless/models/create_auth_method_o_auth2.rb +0 -2
  58. data/lib/akeyless/models/create_auth_method_oidc.rb +0 -2
  59. data/lib/akeyless/models/create_auth_method_saml.rb +0 -2
  60. data/lib/akeyless/models/create_auth_method_universal_identity.rb +0 -2
  61. data/lib/akeyless/models/create_classic_key.rb +61 -1
  62. data/lib/akeyless/models/create_rotated_secret.rb +153 -1
  63. data/lib/akeyless/models/create_salesforce_target.rb +375 -0
  64. data/lib/akeyless/models/create_salesforce_target_output.rb +219 -0
  65. data/lib/akeyless/models/gateway_create_migration.rb +374 -0
  66. data/lib/akeyless/models/gateway_delete_migration.rb +246 -0
  67. data/lib/akeyless/models/gateway_get_migration.rb +240 -0
  68. data/lib/akeyless/models/gateway_migration_create_output.rb +219 -0
  69. data/lib/akeyless/models/gateway_migration_delete_output.rb +219 -0
  70. data/lib/akeyless/models/gateway_migration_get_output.rb +219 -0
  71. data/lib/akeyless/models/gateway_migration_update_output.rb +219 -0
  72. data/lib/akeyless/models/gateway_update_migration.rb +383 -0
  73. data/lib/akeyless/models/gateway_update_producer_hana_db.rb +1 -1
  74. data/lib/akeyless/models/get_secret_value.rb +10 -1
  75. data/lib/akeyless/models/hashi_payload.rb +10 -1
  76. data/lib/akeyless/models/item.rb +10 -1
  77. data/lib/akeyless/models/target_type_details_input.rb +59 -1
  78. data/lib/akeyless/models/update_auth_method.rb +0 -2
  79. data/lib/akeyless/models/update_auth_method_awsiam.rb +0 -2
  80. data/lib/akeyless/models/update_auth_method_azure_ad.rb +0 -2
  81. data/lib/akeyless/models/update_auth_method_cert.rb +0 -2
  82. data/lib/akeyless/models/update_auth_method_gcp.rb +0 -2
  83. data/lib/akeyless/models/update_auth_method_k8_s.rb +0 -2
  84. data/lib/akeyless/models/update_auth_method_ldap.rb +0 -2
  85. data/lib/akeyless/models/update_auth_method_o_auth2.rb +0 -2
  86. data/lib/akeyless/models/update_auth_method_oidc.rb +0 -2
  87. data/lib/akeyless/models/update_auth_method_saml.rb +0 -2
  88. data/lib/akeyless/models/update_auth_method_universal_identity.rb +0 -2
  89. data/lib/akeyless/models/update_rotated_secret.rb +153 -1
  90. data/lib/akeyless/models/update_salesforce_target.rb +404 -0
  91. data/lib/akeyless/models/update_salesforce_target_output.rb +219 -0
  92. data/lib/akeyless/version.rb +1 -1
  93. data/lib/akeyless.rb +12 -0
  94. data/spec/models/create_salesforce_target_output_spec.rb +34 -0
  95. data/spec/models/create_salesforce_target_spec.rb +106 -0
  96. data/spec/models/gateway_create_migration_spec.rb +130 -0
  97. data/spec/models/gateway_delete_migration_spec.rb +46 -0
  98. data/spec/models/gateway_get_migration_spec.rb +46 -0
  99. data/spec/models/gateway_migration_create_output_spec.rb +34 -0
  100. data/spec/models/gateway_migration_delete_output_spec.rb +34 -0
  101. data/spec/models/gateway_migration_get_output_spec.rb +34 -0
  102. data/spec/models/gateway_migration_update_output_spec.rb +34 -0
  103. data/spec/models/gateway_update_migration_spec.rb +136 -0
  104. data/spec/models/update_salesforce_target_output_spec.rb +34 -0
  105. data/spec/models/update_salesforce_target_spec.rb +124 -0
  106. metadata +512 -464
@@ -0,0 +1,404 @@
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 UpdateSalesforceTarget
18
+ # Base64 encoded PEM cert to use when uploading a new key to Salesforce
19
+ attr_accessor :ca_cert_data
20
+
21
+ # name of the certificate in Salesforce tenant to use when uploading new key
22
+ attr_accessor :ca_cert_name
23
+
24
+ # Client ID of the oauth2 app to use for connecting to Salesforce
25
+ attr_accessor :client_id
26
+
27
+ # Client secret of the oauth2 app to use for connecting to Salesforce
28
+ attr_accessor :client_secret
29
+
30
+ # Comment about the target
31
+ attr_accessor :comment
32
+
33
+ # The email of the user attached to the oauth2 app used for connecting to Salesforce
34
+ attr_accessor :email
35
+
36
+ attr_accessor :keep_prev_version
37
+
38
+ # The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
39
+ attr_accessor :key
40
+
41
+ # Target name
42
+ attr_accessor :name
43
+
44
+ # New target name
45
+ attr_accessor :new_name
46
+
47
+ # The password of the user attached to the oauth2 app used for connecting to Salesforce
48
+ attr_accessor :password
49
+
50
+ # The security token of the user attached to the oauth2 app used for connecting to Salesforce
51
+ attr_accessor :security_token
52
+
53
+ # Url of the Salesforce tenant
54
+ attr_accessor :tenant_url
55
+
56
+ # Authentication token (see `/auth` and `/configure`)
57
+ attr_accessor :token
58
+
59
+ # The universal identity token, Required only for universal_identity authentication
60
+ attr_accessor :uid_token
61
+
62
+ # Deprecated
63
+ attr_accessor :update_version
64
+
65
+ # Attribute mapping from ruby-style variable name to JSON key.
66
+ def self.attribute_map
67
+ {
68
+ :'ca_cert_data' => :'ca-cert-data',
69
+ :'ca_cert_name' => :'ca-cert-name',
70
+ :'client_id' => :'client-id',
71
+ :'client_secret' => :'client-secret',
72
+ :'comment' => :'comment',
73
+ :'email' => :'email',
74
+ :'keep_prev_version' => :'keep-prev-version',
75
+ :'key' => :'key',
76
+ :'name' => :'name',
77
+ :'new_name' => :'new-name',
78
+ :'password' => :'password',
79
+ :'security_token' => :'security-token',
80
+ :'tenant_url' => :'tenant-url',
81
+ :'token' => :'token',
82
+ :'uid_token' => :'uid-token',
83
+ :'update_version' => :'update-version'
84
+ }
85
+ end
86
+
87
+ # Returns all the JSON keys this model knows about
88
+ def self.acceptable_attributes
89
+ attribute_map.values
90
+ end
91
+
92
+ # Attribute type mapping.
93
+ def self.openapi_types
94
+ {
95
+ :'ca_cert_data' => :'String',
96
+ :'ca_cert_name' => :'String',
97
+ :'client_id' => :'String',
98
+ :'client_secret' => :'String',
99
+ :'comment' => :'String',
100
+ :'email' => :'String',
101
+ :'keep_prev_version' => :'String',
102
+ :'key' => :'String',
103
+ :'name' => :'String',
104
+ :'new_name' => :'String',
105
+ :'password' => :'String',
106
+ :'security_token' => :'String',
107
+ :'tenant_url' => :'String',
108
+ :'token' => :'String',
109
+ :'uid_token' => :'String',
110
+ :'update_version' => :'Boolean'
111
+ }
112
+ end
113
+
114
+ # List of attributes with nullable: true
115
+ def self.openapi_nullable
116
+ Set.new([
117
+ ])
118
+ end
119
+
120
+ # Initializes the object
121
+ # @param [Hash] attributes Model attributes in the form of hash
122
+ def initialize(attributes = {})
123
+ if (!attributes.is_a?(Hash))
124
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::UpdateSalesforceTarget` initialize method"
125
+ end
126
+
127
+ # check to see if the attribute exists and convert string to symbol for hash key
128
+ attributes = attributes.each_with_object({}) { |(k, v), h|
129
+ if (!self.class.attribute_map.key?(k.to_sym))
130
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::UpdateSalesforceTarget`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
131
+ end
132
+ h[k.to_sym] = v
133
+ }
134
+
135
+ if attributes.key?(:'ca_cert_data')
136
+ self.ca_cert_data = attributes[:'ca_cert_data']
137
+ end
138
+
139
+ if attributes.key?(:'ca_cert_name')
140
+ self.ca_cert_name = attributes[:'ca_cert_name']
141
+ end
142
+
143
+ if attributes.key?(:'client_id')
144
+ self.client_id = attributes[:'client_id']
145
+ end
146
+
147
+ if attributes.key?(:'client_secret')
148
+ self.client_secret = attributes[:'client_secret']
149
+ end
150
+
151
+ if attributes.key?(:'comment')
152
+ self.comment = attributes[:'comment']
153
+ end
154
+
155
+ if attributes.key?(:'email')
156
+ self.email = attributes[:'email']
157
+ end
158
+
159
+ if attributes.key?(:'keep_prev_version')
160
+ self.keep_prev_version = attributes[:'keep_prev_version']
161
+ end
162
+
163
+ if attributes.key?(:'key')
164
+ self.key = attributes[:'key']
165
+ end
166
+
167
+ if attributes.key?(:'name')
168
+ self.name = attributes[:'name']
169
+ end
170
+
171
+ if attributes.key?(:'new_name')
172
+ self.new_name = attributes[:'new_name']
173
+ end
174
+
175
+ if attributes.key?(:'password')
176
+ self.password = attributes[:'password']
177
+ end
178
+
179
+ if attributes.key?(:'security_token')
180
+ self.security_token = attributes[:'security_token']
181
+ end
182
+
183
+ if attributes.key?(:'tenant_url')
184
+ self.tenant_url = attributes[:'tenant_url']
185
+ end
186
+
187
+ if attributes.key?(:'token')
188
+ self.token = attributes[:'token']
189
+ end
190
+
191
+ if attributes.key?(:'uid_token')
192
+ self.uid_token = attributes[:'uid_token']
193
+ end
194
+
195
+ if attributes.key?(:'update_version')
196
+ self.update_version = attributes[:'update_version']
197
+ end
198
+ end
199
+
200
+ # Show invalid properties with the reasons. Usually used together with valid?
201
+ # @return Array for valid properties with the reasons
202
+ def list_invalid_properties
203
+ invalid_properties = Array.new
204
+ if @client_id.nil?
205
+ invalid_properties.push('invalid value for "client_id", client_id cannot be nil.')
206
+ end
207
+
208
+ if @client_secret.nil?
209
+ invalid_properties.push('invalid value for "client_secret", client_secret cannot be nil.')
210
+ end
211
+
212
+ if @email.nil?
213
+ invalid_properties.push('invalid value for "email", email cannot be nil.')
214
+ end
215
+
216
+ if @name.nil?
217
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
218
+ end
219
+
220
+ if @password.nil?
221
+ invalid_properties.push('invalid value for "password", password cannot be nil.')
222
+ end
223
+
224
+ if @security_token.nil?
225
+ invalid_properties.push('invalid value for "security_token", security_token cannot be nil.')
226
+ end
227
+
228
+ if @tenant_url.nil?
229
+ invalid_properties.push('invalid value for "tenant_url", tenant_url cannot be nil.')
230
+ end
231
+
232
+ invalid_properties
233
+ end
234
+
235
+ # Check to see if the all the properties in the model are valid
236
+ # @return true if the model is valid
237
+ def valid?
238
+ return false if @client_id.nil?
239
+ return false if @client_secret.nil?
240
+ return false if @email.nil?
241
+ return false if @name.nil?
242
+ return false if @password.nil?
243
+ return false if @security_token.nil?
244
+ return false if @tenant_url.nil?
245
+ true
246
+ end
247
+
248
+ # Checks equality by comparing each attribute.
249
+ # @param [Object] Object to be compared
250
+ def ==(o)
251
+ return true if self.equal?(o)
252
+ self.class == o.class &&
253
+ ca_cert_data == o.ca_cert_data &&
254
+ ca_cert_name == o.ca_cert_name &&
255
+ client_id == o.client_id &&
256
+ client_secret == o.client_secret &&
257
+ comment == o.comment &&
258
+ email == o.email &&
259
+ keep_prev_version == o.keep_prev_version &&
260
+ key == o.key &&
261
+ name == o.name &&
262
+ new_name == o.new_name &&
263
+ password == o.password &&
264
+ security_token == o.security_token &&
265
+ tenant_url == o.tenant_url &&
266
+ token == o.token &&
267
+ uid_token == o.uid_token &&
268
+ update_version == o.update_version
269
+ end
270
+
271
+ # @see the `==` method
272
+ # @param [Object] Object to be compared
273
+ def eql?(o)
274
+ self == o
275
+ end
276
+
277
+ # Calculates hash code according to all attributes.
278
+ # @return [Integer] Hash code
279
+ def hash
280
+ [ca_cert_data, ca_cert_name, client_id, client_secret, comment, email, keep_prev_version, key, name, new_name, password, security_token, tenant_url, token, uid_token, update_version].hash
281
+ end
282
+
283
+ # Builds the object from hash
284
+ # @param [Hash] attributes Model attributes in the form of hash
285
+ # @return [Object] Returns the model itself
286
+ def self.build_from_hash(attributes)
287
+ new.build_from_hash(attributes)
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 build_from_hash(attributes)
294
+ return nil unless attributes.is_a?(Hash)
295
+ attributes = attributes.transform_keys(&:to_sym)
296
+ self.class.openapi_types.each_pair do |key, type|
297
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
298
+ self.send("#{key}=", nil)
299
+ elsif type =~ /\AArray<(.*)>/i
300
+ # check to ensure the input is an array given that the attribute
301
+ # is documented as an array but the input is not
302
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
303
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
304
+ end
305
+ elsif !attributes[self.class.attribute_map[key]].nil?
306
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
307
+ end
308
+ end
309
+
310
+ self
311
+ end
312
+
313
+ # Deserializes the data based on type
314
+ # @param string type Data type
315
+ # @param string value Value to be deserialized
316
+ # @return [Object] Deserialized data
317
+ def _deserialize(type, value)
318
+ case type.to_sym
319
+ when :Time
320
+ Time.parse(value)
321
+ when :Date
322
+ Date.parse(value)
323
+ when :String
324
+ value.to_s
325
+ when :Integer
326
+ value.to_i
327
+ when :Float
328
+ value.to_f
329
+ when :Boolean
330
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
331
+ true
332
+ else
333
+ false
334
+ end
335
+ when :Object
336
+ # generic object (usually a Hash), return directly
337
+ value
338
+ when /\AArray<(?<inner_type>.+)>\z/
339
+ inner_type = Regexp.last_match[:inner_type]
340
+ value.map { |v| _deserialize(inner_type, v) }
341
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
342
+ k_type = Regexp.last_match[:k_type]
343
+ v_type = Regexp.last_match[:v_type]
344
+ {}.tap do |hash|
345
+ value.each do |k, v|
346
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
347
+ end
348
+ end
349
+ else # model
350
+ # models (e.g. Pet) or oneOf
351
+ klass = Akeyless.const_get(type)
352
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
353
+ end
354
+ end
355
+
356
+ # Returns the string representation of the object
357
+ # @return [String] String presentation of the object
358
+ def to_s
359
+ to_hash.to_s
360
+ end
361
+
362
+ # to_body is an alias to to_hash (backward compatibility)
363
+ # @return [Hash] Returns the object in the form of hash
364
+ def to_body
365
+ to_hash
366
+ end
367
+
368
+ # Returns the object in the form of hash
369
+ # @return [Hash] Returns the object in the form of hash
370
+ def to_hash
371
+ hash = {}
372
+ self.class.attribute_map.each_pair do |attr, param|
373
+ value = self.send(attr)
374
+ if value.nil?
375
+ is_nullable = self.class.openapi_nullable.include?(attr)
376
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
377
+ end
378
+
379
+ hash[param] = _to_hash(value)
380
+ end
381
+ hash
382
+ end
383
+
384
+ # Outputs non-array value in the form of hash
385
+ # For object, use to_hash. Otherwise, just return the value
386
+ # @param [Object] value Any valid value
387
+ # @return [Hash] Returns the value in the form of hash
388
+ def _to_hash(value)
389
+ if value.is_a?(Array)
390
+ value.compact.map { |v| _to_hash(v) }
391
+ elsif value.is_a?(Hash)
392
+ {}.tap do |hash|
393
+ value.each { |k, v| hash[k] = _to_hash(v) }
394
+ end
395
+ elsif value.respond_to? :to_hash
396
+ value.to_hash
397
+ else
398
+ value
399
+ end
400
+ end
401
+
402
+ end
403
+
404
+ 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 UpdateSalesforceTargetOutput
18
+ attr_accessor :target_id
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'target_id' => :'target_id'
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
+ :'target_id' => :'Integer'
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::UpdateSalesforceTargetOutput` 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::UpdateSalesforceTargetOutput`. 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?(:'target_id')
61
+ self.target_id = attributes[:'target_id']
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
+ target_id == o.target_id
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
+ [target_id].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
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.0-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module Akeyless
14
- VERSION = '2.16.4'
14
+ VERSION = '2.16.5'
15
15
  end
data/lib/akeyless.rb CHANGED
@@ -115,6 +115,8 @@ require 'akeyless/models/create_ssh_cert_issuer'
115
115
  require 'akeyless/models/create_ssh_cert_issuer_output'
116
116
  require 'akeyless/models/create_ssh_target'
117
117
  require 'akeyless/models/create_ssh_target_output'
118
+ require 'akeyless/models/create_salesforce_target'
119
+ require 'akeyless/models/create_salesforce_target_output'
118
120
  require 'akeyless/models/create_secret'
119
121
  require 'akeyless/models/create_secret_output'
120
122
  require 'akeyless/models/create_target_item_assoc_output'
@@ -169,6 +171,7 @@ require 'akeyless/models/gcp_access_rules'
169
171
  require 'akeyless/models/gateway_add_allowed_management_access'
170
172
  require 'akeyless/models/gateway_create_k8_s_auth_config'
171
173
  require 'akeyless/models/gateway_create_k8_s_auth_config_output'
174
+ require 'akeyless/models/gateway_create_migration'
172
175
  require 'akeyless/models/gateway_create_producer_artifactory'
173
176
  require 'akeyless/models/gateway_create_producer_artifactory_output'
174
177
  require 'akeyless/models/gateway_create_producer_aws'
@@ -220,19 +223,25 @@ require 'akeyless/models/gateway_create_producer_snowflake_output'
220
223
  require 'akeyless/models/gateway_delete_allowed_management_access'
221
224
  require 'akeyless/models/gateway_delete_k8_s_auth_config'
222
225
  require 'akeyless/models/gateway_delete_k8_s_auth_config_output'
226
+ require 'akeyless/models/gateway_delete_migration'
223
227
  require 'akeyless/models/gateway_delete_producer'
224
228
  require 'akeyless/models/gateway_delete_producer_output'
225
229
  require 'akeyless/models/gateway_get_config'
226
230
  require 'akeyless/models/gateway_get_k8_s_auth_config'
227
231
  require 'akeyless/models/gateway_get_k8_s_auth_config_output'
232
+ require 'akeyless/models/gateway_get_migration'
228
233
  require 'akeyless/models/gateway_get_producer'
229
234
  require 'akeyless/models/gateway_get_tmp_users'
230
235
  require 'akeyless/models/gateway_list_allowed_management_access'
231
236
  require 'akeyless/models/gateway_list_migration'
232
237
  require 'akeyless/models/gateway_list_producers'
233
238
  require 'akeyless/models/gateway_message_queue_info'
239
+ require 'akeyless/models/gateway_migration_create_output'
240
+ require 'akeyless/models/gateway_migration_delete_output'
241
+ require 'akeyless/models/gateway_migration_get_output'
234
242
  require 'akeyless/models/gateway_migration_list_output'
235
243
  require 'akeyless/models/gateway_migration_sync_output'
244
+ require 'akeyless/models/gateway_migration_update_output'
236
245
  require 'akeyless/models/gateway_revoke_tmp_users'
237
246
  require 'akeyless/models/gateway_start_producer'
238
247
  require 'akeyless/models/gateway_start_producer_output'
@@ -243,6 +252,7 @@ require 'akeyless/models/gateway_update_item'
243
252
  require 'akeyless/models/gateway_update_item_output'
244
253
  require 'akeyless/models/gateway_update_k8_s_auth_config'
245
254
  require 'akeyless/models/gateway_update_k8_s_auth_config_output'
255
+ require 'akeyless/models/gateway_update_migration'
246
256
  require 'akeyless/models/gateway_update_producer_artifactory'
247
257
  require 'akeyless/models/gateway_update_producer_artifactory_output'
248
258
  require 'akeyless/models/gateway_update_producer_aws'
@@ -502,6 +512,8 @@ require 'akeyless/models/update_ssh_cert_issuer_output'
502
512
  require 'akeyless/models/update_ssh_target'
503
513
  require 'akeyless/models/update_ssh_target_details'
504
514
  require 'akeyless/models/update_ssh_target_output'
515
+ require 'akeyless/models/update_salesforce_target'
516
+ require 'akeyless/models/update_salesforce_target_output'
505
517
  require 'akeyless/models/update_secret_val'
506
518
  require 'akeyless/models/update_secret_val_output'
507
519
  require 'akeyless/models/update_target'