akeyless 5.0.19 → 5.0.21

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 (130) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +28 -1
  3. data/docs/CertificateStore.md +2 -0
  4. data/docs/CreateUSC.md +2 -0
  5. data/docs/GCPPayload.md +5 -1
  6. data/docs/GatewayCreateMigration.md +5 -1
  7. data/docs/GatewayUpdateMigration.md +5 -1
  8. data/docs/GatewayUpdateTlsCert.md +2 -0
  9. data/docs/GeneralConfigPart.md +6 -0
  10. data/docs/GetKubeExecCreds.md +1 -1
  11. data/docs/GetPKICertificate.md +1 -1
  12. data/docs/LetsEncryptTargetDetails.md +38 -0
  13. data/docs/PoliciesCreateOutput.md +18 -0
  14. data/docs/PoliciesDelete.md +24 -0
  15. data/docs/PoliciesGet.md +24 -0
  16. data/docs/PoliciesGetOutput.md +18 -0
  17. data/docs/PoliciesList.md +30 -0
  18. data/docs/PoliciesListOutput.md +18 -0
  19. data/docs/PolicyCreateKeys.md +34 -0
  20. data/docs/PolicyOutput.md +34 -0
  21. data/docs/PolicyUpdateKeys.md +36 -0
  22. data/docs/RotatedSecretCreateAws.md +4 -2
  23. data/docs/RotatedSecretCreateAzure.md +4 -2
  24. data/docs/RotatedSecretCreateCassandra.md +1 -1
  25. data/docs/RotatedSecretCreateCustom.md +1 -1
  26. data/docs/RotatedSecretCreateDockerhub.md +1 -1
  27. data/docs/RotatedSecretCreateGcp.md +4 -2
  28. data/docs/RotatedSecretCreateHanadb.md +1 -1
  29. data/docs/RotatedSecretCreateLdap.md +1 -1
  30. data/docs/RotatedSecretCreateMongodb.md +1 -1
  31. data/docs/RotatedSecretCreateMssql.md +1 -1
  32. data/docs/RotatedSecretCreateMysql.md +1 -1
  33. data/docs/RotatedSecretCreateOpenAI.md +1 -1
  34. data/docs/RotatedSecretCreateOracledb.md +1 -1
  35. data/docs/RotatedSecretCreatePostgresql.md +1 -1
  36. data/docs/RotatedSecretCreateRedis.md +1 -1
  37. data/docs/RotatedSecretCreateRedshift.md +1 -1
  38. data/docs/RotatedSecretCreateSnowflake.md +1 -1
  39. data/docs/RotatedSecretCreateSplunk.md +68 -0
  40. data/docs/RotatedSecretCreateSsh.md +1 -1
  41. data/docs/RotatedSecretCreateWindows.md +1 -1
  42. data/docs/RotatedSecretDetailsInfo.md +2 -0
  43. data/docs/RotatedSecretUpdateAws.md +3 -1
  44. data/docs/RotatedSecretUpdateAzure.md +3 -1
  45. data/docs/RotatedSecretUpdateGcp.md +3 -1
  46. data/docs/RotatedSecretUpdateSplunk.md +64 -0
  47. data/docs/SecretInfo.md +2 -0
  48. data/docs/SplunkPayload.md +30 -0
  49. data/docs/SplunkTargetDetails.md +34 -0
  50. data/docs/TargetCreateLetsEncrypt.md +46 -0
  51. data/docs/TargetCreateSplunk.md +42 -0
  52. data/docs/TargetTypeDetailsInput.md +4 -0
  53. data/docs/TargetUpdateLetsEncrypt.md +50 -0
  54. data/docs/UpdateItem.md +2 -0
  55. data/docs/UscCreate.md +2 -0
  56. data/docs/V2Api.md +659 -29
  57. data/lib/akeyless/api/v2_api.rb +640 -0
  58. data/lib/akeyless/models/certificate_store.rb +12 -1
  59. data/lib/akeyless/models/create_usc.rb +11 -1
  60. data/lib/akeyless/models/gateway_create_migration.rb +24 -4
  61. data/lib/akeyless/models/gateway_update_migration.rb +24 -4
  62. data/lib/akeyless/models/gateway_update_tls_cert.rb +13 -1
  63. data/lib/akeyless/models/gcp_payload.rb +22 -4
  64. data/lib/akeyless/models/general_config_part.rb +30 -1
  65. data/lib/akeyless/models/get_kube_exec_creds.rb +1 -1
  66. data/lib/akeyless/models/get_pki_certificate.rb +1 -1
  67. data/lib/akeyless/models/lets_encrypt_target_details.rb +315 -0
  68. data/lib/akeyless/models/policies_create_output.rb +214 -0
  69. data/lib/akeyless/models/policies_delete.rb +254 -0
  70. data/lib/akeyless/models/policies_get.rb +254 -0
  71. data/lib/akeyless/models/policies_get_output.rb +214 -0
  72. data/lib/akeyless/models/policies_list.rb +283 -0
  73. data/lib/akeyless/models/policies_list_output.rb +216 -0
  74. data/lib/akeyless/models/policy_create_keys.rb +312 -0
  75. data/lib/akeyless/models/policy_output.rb +295 -0
  76. data/lib/akeyless/models/policy_update_keys.rb +322 -0
  77. data/lib/akeyless/models/rotated_secret_create_aws.rb +13 -3
  78. data/lib/akeyless/models/rotated_secret_create_azure.rb +13 -3
  79. data/lib/akeyless/models/rotated_secret_create_cassandra.rb +1 -1
  80. data/lib/akeyless/models/rotated_secret_create_custom.rb +1 -1
  81. data/lib/akeyless/models/rotated_secret_create_dockerhub.rb +1 -1
  82. data/lib/akeyless/models/rotated_secret_create_gcp.rb +13 -3
  83. data/lib/akeyless/models/rotated_secret_create_hanadb.rb +1 -1
  84. data/lib/akeyless/models/rotated_secret_create_ldap.rb +1 -1
  85. data/lib/akeyless/models/rotated_secret_create_mongodb.rb +1 -1
  86. data/lib/akeyless/models/rotated_secret_create_mssql.rb +1 -1
  87. data/lib/akeyless/models/rotated_secret_create_mysql.rb +1 -1
  88. data/lib/akeyless/models/rotated_secret_create_open_ai.rb +1 -1
  89. data/lib/akeyless/models/rotated_secret_create_oracledb.rb +1 -1
  90. data/lib/akeyless/models/rotated_secret_create_postgresql.rb +1 -1
  91. data/lib/akeyless/models/rotated_secret_create_redis.rb +1 -1
  92. data/lib/akeyless/models/rotated_secret_create_redshift.rb +1 -1
  93. data/lib/akeyless/models/rotated_secret_create_snowflake.rb +1 -1
  94. data/lib/akeyless/models/rotated_secret_create_splunk.rb +497 -0
  95. data/lib/akeyless/models/rotated_secret_create_ssh.rb +1 -1
  96. data/lib/akeyless/models/rotated_secret_create_windows.rb +1 -1
  97. data/lib/akeyless/models/rotated_secret_details_info.rb +10 -1
  98. data/lib/akeyless/models/rotated_secret_update_aws.rb +12 -2
  99. data/lib/akeyless/models/rotated_secret_update_azure.rb +12 -2
  100. data/lib/akeyless/models/rotated_secret_update_gcp.rb +12 -2
  101. data/lib/akeyless/models/rotated_secret_update_splunk.rb +467 -0
  102. data/lib/akeyless/models/secret_info.rb +10 -1
  103. data/lib/akeyless/models/splunk_payload.rb +268 -0
  104. data/lib/akeyless/models/splunk_target_details.rb +294 -0
  105. data/lib/akeyless/models/target_create_lets_encrypt.rb +368 -0
  106. data/lib/akeyless/models/target_create_splunk.rb +354 -0
  107. data/lib/akeyless/models/target_type_details_input.rb +19 -1
  108. data/lib/akeyless/models/target_update_lets_encrypt.rb +388 -0
  109. data/lib/akeyless/models/update_item.rb +11 -1
  110. data/lib/akeyless/models/usc_create.rb +11 -1
  111. data/lib/akeyless/version.rb +1 -1
  112. data/lib/akeyless.rb +17 -0
  113. data/spec/models/lets_encrypt_target_details_spec.rb +96 -0
  114. data/spec/models/policies_create_output_spec.rb +36 -0
  115. data/spec/models/policies_delete_spec.rb +54 -0
  116. data/spec/models/policies_get_output_spec.rb +36 -0
  117. data/spec/models/policies_get_spec.rb +54 -0
  118. data/spec/models/policies_list_output_spec.rb +36 -0
  119. data/spec/models/policies_list_spec.rb +72 -0
  120. data/spec/models/policy_create_keys_spec.rb +84 -0
  121. data/spec/models/policy_output_spec.rb +84 -0
  122. data/spec/models/policy_update_keys_spec.rb +90 -0
  123. data/spec/models/rotated_secret_create_splunk_spec.rb +186 -0
  124. data/spec/models/rotated_secret_update_splunk_spec.rb +174 -0
  125. data/spec/models/splunk_payload_spec.rb +72 -0
  126. data/spec/models/splunk_target_details_spec.rb +84 -0
  127. data/spec/models/target_create_lets_encrypt_spec.rb +120 -0
  128. data/spec/models/target_create_splunk_spec.rb +108 -0
  129. data/spec/models/target_update_lets_encrypt_spec.rb +132 -0
  130. metadata +69 -1
@@ -0,0 +1,497 @@
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: 3.0
7
+ Contact: support@akeyless.io
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.10.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Akeyless
17
+ # rotatedSecretCreateSplunk is a command that creates a rotated secret for a Splunk target. Currently we support target-rotator behavior (rotate credentials on the target itself).
18
+ class RotatedSecretCreateSplunk
19
+ # Token audience for Splunk token creation (required for rotator-type=token)
20
+ attr_accessor :audience
21
+
22
+ # The credentials to connect with use-user-creds/use-target-creds
23
+ attr_accessor :authentication_credentials
24
+
25
+ # Whether to automatically rotate every --rotation-interval days, or disable existing automatic rotation [true/false]
26
+ attr_accessor :auto_rotate
27
+
28
+ # Protection from accidental deletion of this object [true/false]
29
+ attr_accessor :delete_protection
30
+
31
+ # Description of the object
32
+ attr_accessor :description
33
+
34
+ # Token expiration date in YYYY-MM-DD format (required for rotator-type=token when manual rotation is selected and no existing token is provided). Time will be set to 00:00 UTC.
35
+ attr_accessor :expiration_date
36
+
37
+ # Current Splunk HEC token value to store (relevant only for rotator-type=hec-token). If not provided, a new HEC input will be created in Splunk.
38
+ attr_accessor :hec_token
39
+
40
+ # Splunk HEC input name to manage (required for rotator-type=hec-token)
41
+ attr_accessor :hec_token_name
42
+
43
+ # Additional custom fields to associate with the item
44
+ attr_accessor :item_custom_fields
45
+
46
+ # Set output format to JSON
47
+ attr_accessor :json
48
+
49
+ # The name of a key that used to encrypt the secret value (if empty, the account default protectionKey key will be used)
50
+ attr_accessor :key
51
+
52
+ # Set the maximum number of versions, limited by the account settings defaults.
53
+ attr_accessor :max_versions
54
+
55
+ # Rotated secret name
56
+ attr_accessor :name
57
+
58
+ # The length of the password to be generated
59
+ attr_accessor :password_length
60
+
61
+ # rotated-username password (relevant only for rotator-type=password)
62
+ attr_accessor :rotated_password
63
+
64
+ # username to be rotated, if selected use-self-creds at rotator-creds-type, this username will try to rotate it's own password, if use-target-creds is selected, target credentials will be use to rotate the rotated-password (relevant only for rotator-type=password)
65
+ attr_accessor :rotated_username
66
+
67
+ # How many days before the rotation of the item would you like to be notified
68
+ attr_accessor :rotation_event_in
69
+
70
+ # The Hour of the rotation in UTC
71
+ attr_accessor :rotation_hour
72
+
73
+ # The number of days to wait between every automatic key rotation (1-365)
74
+ attr_accessor :rotation_interval
75
+
76
+ # The rotator type. options: [target/password/token/hec-token]
77
+ attr_accessor :rotator_type
78
+
79
+ # Current Splunk authentication token to store (relevant only for rotator-type=token). If not provided, a new token will be created in Splunk.
80
+ attr_accessor :splunk_token
81
+
82
+ # Add tags attached to this object
83
+ attr_accessor :tags
84
+
85
+ # The target name to associate
86
+ attr_accessor :target_name
87
+
88
+ # Authentication token (see `/auth` and `/configure`)
89
+ attr_accessor :token
90
+
91
+ # Splunk token owner username (relevant only for rotator-type=token)
92
+ attr_accessor :token_owner
93
+
94
+ # The universal identity token, Required only for universal_identity authentication
95
+ attr_accessor :uid_token
96
+
97
+ # Attribute mapping from ruby-style variable name to JSON key.
98
+ def self.attribute_map
99
+ {
100
+ :'audience' => :'audience',
101
+ :'authentication_credentials' => :'authentication-credentials',
102
+ :'auto_rotate' => :'auto-rotate',
103
+ :'delete_protection' => :'delete_protection',
104
+ :'description' => :'description',
105
+ :'expiration_date' => :'expiration-date',
106
+ :'hec_token' => :'hec-token',
107
+ :'hec_token_name' => :'hec-token-name',
108
+ :'item_custom_fields' => :'item-custom-fields',
109
+ :'json' => :'json',
110
+ :'key' => :'key',
111
+ :'max_versions' => :'max-versions',
112
+ :'name' => :'name',
113
+ :'password_length' => :'password-length',
114
+ :'rotated_password' => :'rotated-password',
115
+ :'rotated_username' => :'rotated-username',
116
+ :'rotation_event_in' => :'rotation-event-in',
117
+ :'rotation_hour' => :'rotation-hour',
118
+ :'rotation_interval' => :'rotation-interval',
119
+ :'rotator_type' => :'rotator-type',
120
+ :'splunk_token' => :'splunk-token',
121
+ :'tags' => :'tags',
122
+ :'target_name' => :'target-name',
123
+ :'token' => :'token',
124
+ :'token_owner' => :'token-owner',
125
+ :'uid_token' => :'uid-token'
126
+ }
127
+ end
128
+
129
+ # Returns all the JSON keys this model knows about
130
+ def self.acceptable_attributes
131
+ attribute_map.values
132
+ end
133
+
134
+ # Attribute type mapping.
135
+ def self.openapi_types
136
+ {
137
+ :'audience' => :'String',
138
+ :'authentication_credentials' => :'String',
139
+ :'auto_rotate' => :'String',
140
+ :'delete_protection' => :'String',
141
+ :'description' => :'String',
142
+ :'expiration_date' => :'String',
143
+ :'hec_token' => :'String',
144
+ :'hec_token_name' => :'String',
145
+ :'item_custom_fields' => :'Hash<String, String>',
146
+ :'json' => :'Boolean',
147
+ :'key' => :'String',
148
+ :'max_versions' => :'String',
149
+ :'name' => :'String',
150
+ :'password_length' => :'String',
151
+ :'rotated_password' => :'String',
152
+ :'rotated_username' => :'String',
153
+ :'rotation_event_in' => :'Array<String>',
154
+ :'rotation_hour' => :'Integer',
155
+ :'rotation_interval' => :'String',
156
+ :'rotator_type' => :'String',
157
+ :'splunk_token' => :'String',
158
+ :'tags' => :'Array<String>',
159
+ :'target_name' => :'String',
160
+ :'token' => :'String',
161
+ :'token_owner' => :'String',
162
+ :'uid_token' => :'String'
163
+ }
164
+ end
165
+
166
+ # List of attributes with nullable: true
167
+ def self.openapi_nullable
168
+ Set.new([
169
+ ])
170
+ end
171
+
172
+ # Initializes the object
173
+ # @param [Hash] attributes Model attributes in the form of hash
174
+ def initialize(attributes = {})
175
+ if (!attributes.is_a?(Hash))
176
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::RotatedSecretCreateSplunk` initialize method"
177
+ end
178
+
179
+ # check to see if the attribute exists and convert string to symbol for hash key
180
+ attributes = attributes.each_with_object({}) { |(k, v), h|
181
+ if (!self.class.attribute_map.key?(k.to_sym))
182
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::RotatedSecretCreateSplunk`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
183
+ end
184
+ h[k.to_sym] = v
185
+ }
186
+
187
+ if attributes.key?(:'audience')
188
+ self.audience = attributes[:'audience']
189
+ end
190
+
191
+ if attributes.key?(:'authentication_credentials')
192
+ self.authentication_credentials = attributes[:'authentication_credentials']
193
+ else
194
+ self.authentication_credentials = 'use-user-creds'
195
+ end
196
+
197
+ if attributes.key?(:'auto_rotate')
198
+ self.auto_rotate = attributes[:'auto_rotate']
199
+ end
200
+
201
+ if attributes.key?(:'delete_protection')
202
+ self.delete_protection = attributes[:'delete_protection']
203
+ end
204
+
205
+ if attributes.key?(:'description')
206
+ self.description = attributes[:'description']
207
+ end
208
+
209
+ if attributes.key?(:'expiration_date')
210
+ self.expiration_date = attributes[:'expiration_date']
211
+ end
212
+
213
+ if attributes.key?(:'hec_token')
214
+ self.hec_token = attributes[:'hec_token']
215
+ end
216
+
217
+ if attributes.key?(:'hec_token_name')
218
+ self.hec_token_name = attributes[:'hec_token_name']
219
+ end
220
+
221
+ if attributes.key?(:'item_custom_fields')
222
+ if (value = attributes[:'item_custom_fields']).is_a?(Hash)
223
+ self.item_custom_fields = value
224
+ end
225
+ end
226
+
227
+ if attributes.key?(:'json')
228
+ self.json = attributes[:'json']
229
+ else
230
+ self.json = false
231
+ end
232
+
233
+ if attributes.key?(:'key')
234
+ self.key = attributes[:'key']
235
+ end
236
+
237
+ if attributes.key?(:'max_versions')
238
+ self.max_versions = attributes[:'max_versions']
239
+ end
240
+
241
+ if attributes.key?(:'name')
242
+ self.name = attributes[:'name']
243
+ else
244
+ self.name = nil
245
+ end
246
+
247
+ if attributes.key?(:'password_length')
248
+ self.password_length = attributes[:'password_length']
249
+ end
250
+
251
+ if attributes.key?(:'rotated_password')
252
+ self.rotated_password = attributes[:'rotated_password']
253
+ end
254
+
255
+ if attributes.key?(:'rotated_username')
256
+ self.rotated_username = attributes[:'rotated_username']
257
+ end
258
+
259
+ if attributes.key?(:'rotation_event_in')
260
+ if (value = attributes[:'rotation_event_in']).is_a?(Array)
261
+ self.rotation_event_in = value
262
+ end
263
+ end
264
+
265
+ if attributes.key?(:'rotation_hour')
266
+ self.rotation_hour = attributes[:'rotation_hour']
267
+ end
268
+
269
+ if attributes.key?(:'rotation_interval')
270
+ self.rotation_interval = attributes[:'rotation_interval']
271
+ end
272
+
273
+ if attributes.key?(:'rotator_type')
274
+ self.rotator_type = attributes[:'rotator_type']
275
+ else
276
+ self.rotator_type = nil
277
+ end
278
+
279
+ if attributes.key?(:'splunk_token')
280
+ self.splunk_token = attributes[:'splunk_token']
281
+ end
282
+
283
+ if attributes.key?(:'tags')
284
+ if (value = attributes[:'tags']).is_a?(Array)
285
+ self.tags = value
286
+ end
287
+ end
288
+
289
+ if attributes.key?(:'target_name')
290
+ self.target_name = attributes[:'target_name']
291
+ else
292
+ self.target_name = nil
293
+ end
294
+
295
+ if attributes.key?(:'token')
296
+ self.token = attributes[:'token']
297
+ end
298
+
299
+ if attributes.key?(:'token_owner')
300
+ self.token_owner = attributes[:'token_owner']
301
+ end
302
+
303
+ if attributes.key?(:'uid_token')
304
+ self.uid_token = attributes[:'uid_token']
305
+ end
306
+ end
307
+
308
+ # Show invalid properties with the reasons. Usually used together with valid?
309
+ # @return Array for valid properties with the reasons
310
+ def list_invalid_properties
311
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
312
+ invalid_properties = Array.new
313
+ if @name.nil?
314
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
315
+ end
316
+
317
+ if @rotator_type.nil?
318
+ invalid_properties.push('invalid value for "rotator_type", rotator_type cannot be nil.')
319
+ end
320
+
321
+ if @target_name.nil?
322
+ invalid_properties.push('invalid value for "target_name", target_name cannot be nil.')
323
+ end
324
+
325
+ invalid_properties
326
+ end
327
+
328
+ # Check to see if the all the properties in the model are valid
329
+ # @return true if the model is valid
330
+ def valid?
331
+ warn '[DEPRECATED] the `valid?` method is obsolete'
332
+ return false if @name.nil?
333
+ return false if @rotator_type.nil?
334
+ return false if @target_name.nil?
335
+ true
336
+ end
337
+
338
+ # Checks equality by comparing each attribute.
339
+ # @param [Object] Object to be compared
340
+ def ==(o)
341
+ return true if self.equal?(o)
342
+ self.class == o.class &&
343
+ audience == o.audience &&
344
+ authentication_credentials == o.authentication_credentials &&
345
+ auto_rotate == o.auto_rotate &&
346
+ delete_protection == o.delete_protection &&
347
+ description == o.description &&
348
+ expiration_date == o.expiration_date &&
349
+ hec_token == o.hec_token &&
350
+ hec_token_name == o.hec_token_name &&
351
+ item_custom_fields == o.item_custom_fields &&
352
+ json == o.json &&
353
+ key == o.key &&
354
+ max_versions == o.max_versions &&
355
+ name == o.name &&
356
+ password_length == o.password_length &&
357
+ rotated_password == o.rotated_password &&
358
+ rotated_username == o.rotated_username &&
359
+ rotation_event_in == o.rotation_event_in &&
360
+ rotation_hour == o.rotation_hour &&
361
+ rotation_interval == o.rotation_interval &&
362
+ rotator_type == o.rotator_type &&
363
+ splunk_token == o.splunk_token &&
364
+ tags == o.tags &&
365
+ target_name == o.target_name &&
366
+ token == o.token &&
367
+ token_owner == o.token_owner &&
368
+ uid_token == o.uid_token
369
+ end
370
+
371
+ # @see the `==` method
372
+ # @param [Object] Object to be compared
373
+ def eql?(o)
374
+ self == o
375
+ end
376
+
377
+ # Calculates hash code according to all attributes.
378
+ # @return [Integer] Hash code
379
+ def hash
380
+ [audience, authentication_credentials, auto_rotate, delete_protection, description, expiration_date, hec_token, hec_token_name, item_custom_fields, json, key, max_versions, name, password_length, rotated_password, rotated_username, rotation_event_in, rotation_hour, rotation_interval, rotator_type, splunk_token, tags, target_name, token, token_owner, uid_token].hash
381
+ end
382
+
383
+ # Builds the object from hash
384
+ # @param [Hash] attributes Model attributes in the form of hash
385
+ # @return [Object] Returns the model itself
386
+ def self.build_from_hash(attributes)
387
+ return nil unless attributes.is_a?(Hash)
388
+ attributes = attributes.transform_keys(&:to_sym)
389
+ transformed_hash = {}
390
+ openapi_types.each_pair do |key, type|
391
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
392
+ transformed_hash["#{key}"] = nil
393
+ elsif type =~ /\AArray<(.*)>/i
394
+ # check to ensure the input is an array given that the attribute
395
+ # is documented as an array but the input is not
396
+ if attributes[attribute_map[key]].is_a?(Array)
397
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
398
+ end
399
+ elsif !attributes[attribute_map[key]].nil?
400
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
401
+ end
402
+ end
403
+ new(transformed_hash)
404
+ end
405
+
406
+ # Deserializes the data based on type
407
+ # @param string type Data type
408
+ # @param string value Value to be deserialized
409
+ # @return [Object] Deserialized data
410
+ def self._deserialize(type, value)
411
+ case type.to_sym
412
+ when :Time
413
+ Time.parse(value)
414
+ when :Date
415
+ Date.parse(value)
416
+ when :String
417
+ value.to_s
418
+ when :Integer
419
+ value.to_i
420
+ when :Float
421
+ value.to_f
422
+ when :Boolean
423
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
424
+ true
425
+ else
426
+ false
427
+ end
428
+ when :Object
429
+ # generic object (usually a Hash), return directly
430
+ value
431
+ when /\AArray<(?<inner_type>.+)>\z/
432
+ inner_type = Regexp.last_match[:inner_type]
433
+ value.map { |v| _deserialize(inner_type, v) }
434
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
435
+ k_type = Regexp.last_match[:k_type]
436
+ v_type = Regexp.last_match[:v_type]
437
+ {}.tap do |hash|
438
+ value.each do |k, v|
439
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
440
+ end
441
+ end
442
+ else # model
443
+ # models (e.g. Pet) or oneOf
444
+ klass = Akeyless.const_get(type)
445
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
446
+ end
447
+ end
448
+
449
+ # Returns the string representation of the object
450
+ # @return [String] String presentation of the object
451
+ def to_s
452
+ to_hash.to_s
453
+ end
454
+
455
+ # to_body is an alias to to_hash (backward compatibility)
456
+ # @return [Hash] Returns the object in the form of hash
457
+ def to_body
458
+ to_hash
459
+ end
460
+
461
+ # Returns the object in the form of hash
462
+ # @return [Hash] Returns the object in the form of hash
463
+ def to_hash
464
+ hash = {}
465
+ self.class.attribute_map.each_pair do |attr, param|
466
+ value = self.send(attr)
467
+ if value.nil?
468
+ is_nullable = self.class.openapi_nullable.include?(attr)
469
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
470
+ end
471
+
472
+ hash[param] = _to_hash(value)
473
+ end
474
+ hash
475
+ end
476
+
477
+ # Outputs non-array value in the form of hash
478
+ # For object, use to_hash. Otherwise, just return the value
479
+ # @param [Object] value Any valid value
480
+ # @return [Hash] Returns the value in the form of hash
481
+ def _to_hash(value)
482
+ if value.is_a?(Array)
483
+ value.compact.map { |v| _to_hash(v) }
484
+ elsif value.is_a?(Hash)
485
+ {}.tap do |hash|
486
+ value.each { |k, v| hash[k] = _to_hash(v) }
487
+ end
488
+ elsif value.respond_to? :to_hash
489
+ value.to_hash
490
+ else
491
+ value
492
+ end
493
+ end
494
+
495
+ end
496
+
497
+ end
@@ -108,7 +108,7 @@ module Akeyless
108
108
  # Add tags attached to this object
109
109
  attr_accessor :tags
110
110
 
111
- # Target name
111
+ # The target name to associate
112
112
  attr_accessor :target_name
113
113
 
114
114
  # Authentication token (see `/auth` and `/configure`)
@@ -93,7 +93,7 @@ module Akeyless
93
93
  # Add tags attached to this object
94
94
  attr_accessor :tags
95
95
 
96
- # Target name
96
+ # The target name to associate
97
97
  attr_accessor :target_name
98
98
 
99
99
  # Authentication token (see `/auth` and `/configure`)
@@ -26,6 +26,8 @@ module Akeyless
26
26
 
27
27
  attr_accessor :grace_rotation_interval
28
28
 
29
+ attr_accessor :grace_rotation_timing
30
+
29
31
  attr_accessor :gw_cluster_id
30
32
 
31
33
  attr_accessor :iis_apps_details
@@ -69,6 +71,7 @@ module Akeyless
69
71
  :'grace_rotation' => :'grace_rotation',
70
72
  :'grace_rotation_hour' => :'grace_rotation_hour',
71
73
  :'grace_rotation_interval' => :'grace_rotation_interval',
74
+ :'grace_rotation_timing' => :'grace_rotation_timing',
72
75
  :'gw_cluster_id' => :'gw_cluster_id',
73
76
  :'iis_apps_details' => :'iis_apps_details',
74
77
  :'last_rotation_error' => :'last_rotation_error',
@@ -102,6 +105,7 @@ module Akeyless
102
105
  :'grace_rotation' => :'Boolean',
103
106
  :'grace_rotation_hour' => :'Integer',
104
107
  :'grace_rotation_interval' => :'Integer',
108
+ :'grace_rotation_timing' => :'String',
105
109
  :'gw_cluster_id' => :'Integer',
106
110
  :'iis_apps_details' => :'Array<WindowsService>',
107
111
  :'last_rotation_error' => :'String',
@@ -163,6 +167,10 @@ module Akeyless
163
167
  self.grace_rotation_interval = attributes[:'grace_rotation_interval']
164
168
  end
165
169
 
170
+ if attributes.key?(:'grace_rotation_timing')
171
+ self.grace_rotation_timing = attributes[:'grace_rotation_timing']
172
+ end
173
+
166
174
  if attributes.key?(:'gw_cluster_id')
167
175
  self.gw_cluster_id = attributes[:'gw_cluster_id']
168
176
  end
@@ -261,6 +269,7 @@ module Akeyless
261
269
  grace_rotation == o.grace_rotation &&
262
270
  grace_rotation_hour == o.grace_rotation_hour &&
263
271
  grace_rotation_interval == o.grace_rotation_interval &&
272
+ grace_rotation_timing == o.grace_rotation_timing &&
264
273
  gw_cluster_id == o.gw_cluster_id &&
265
274
  iis_apps_details == o.iis_apps_details &&
266
275
  last_rotation_error == o.last_rotation_error &&
@@ -289,7 +298,7 @@ module Akeyless
289
298
  # Calculates hash code according to all attributes.
290
299
  # @return [Integer] Hash code
291
300
  def hash
292
- [delete_previous_version_in_days, enable_custom_password_policy, grace_rotation, grace_rotation_hour, grace_rotation_interval, gw_cluster_id, iis_apps_details, last_rotation_error, managed_by_akeyless, max_versions, next_auto_rotate_type, number_of_versions_to_save, public_key_remote_path, rotation_hour, rotation_interval_min, rotation_statement, rotator_creds_type, rotator_status, rotator_type, same_password, services_details, timeout_seconds].hash
301
+ [delete_previous_version_in_days, enable_custom_password_policy, grace_rotation, grace_rotation_hour, grace_rotation_interval, grace_rotation_timing, gw_cluster_id, iis_apps_details, last_rotation_error, managed_by_akeyless, max_versions, next_auto_rotate_type, number_of_versions_to_save, public_key_remote_path, rotation_hour, rotation_interval_min, rotation_statement, rotator_creds_type, rotator_status, rotator_type, same_password, services_details, timeout_seconds].hash
293
302
  end
294
303
 
295
304
  # Builds the object from hash
@@ -39,7 +39,7 @@ module Akeyless
39
39
  # Description of the object
40
40
  attr_accessor :description
41
41
 
42
- # Create a new access key without deleting the old key from AWS/Azure/GCP for backup (relevant only for AWS/Azure/GCP) [true/false]
42
+ # Enable graceful rotation (keep both versions temporarily). When enabled, a new secret version is created while the previous version is kept for the grace period, so both versions exist for a limited time. [true/false]
43
43
  attr_accessor :grace_rotation
44
44
 
45
45
  # The Hour of the grace rotation in UTC
@@ -48,6 +48,9 @@ module Akeyless
48
48
  # The number of days to wait before deleting the old key (must be bigger than rotation-interval)
49
49
  attr_accessor :grace_rotation_interval
50
50
 
51
+ # When to create the new version relative to the rotation date [after/before]
52
+ attr_accessor :grace_rotation_timing
53
+
51
54
  # Additional custom fields to associate with the item
52
55
  attr_accessor :item_custom_fields
53
56
 
@@ -122,6 +125,7 @@ module Akeyless
122
125
  :'grace_rotation' => :'grace-rotation',
123
126
  :'grace_rotation_hour' => :'grace-rotation-hour',
124
127
  :'grace_rotation_interval' => :'grace-rotation-interval',
128
+ :'grace_rotation_timing' => :'grace-rotation-timing',
125
129
  :'item_custom_fields' => :'item-custom-fields',
126
130
  :'json' => :'json',
127
131
  :'keep_prev_version' => :'keep-prev-version',
@@ -164,6 +168,7 @@ module Akeyless
164
168
  :'grace_rotation' => :'String',
165
169
  :'grace_rotation_hour' => :'Integer',
166
170
  :'grace_rotation_interval' => :'String',
171
+ :'grace_rotation_timing' => :'String',
167
172
  :'item_custom_fields' => :'Hash<String, String>',
168
173
  :'json' => :'Boolean',
169
174
  :'keep_prev_version' => :'String',
@@ -260,6 +265,10 @@ module Akeyless
260
265
  self.grace_rotation_interval = attributes[:'grace_rotation_interval']
261
266
  end
262
267
 
268
+ if attributes.key?(:'grace_rotation_timing')
269
+ self.grace_rotation_timing = attributes[:'grace_rotation_timing']
270
+ end
271
+
263
272
  if attributes.key?(:'item_custom_fields')
264
273
  if (value = attributes[:'item_custom_fields']).is_a?(Hash)
265
274
  self.item_custom_fields = value
@@ -389,6 +398,7 @@ module Akeyless
389
398
  grace_rotation == o.grace_rotation &&
390
399
  grace_rotation_hour == o.grace_rotation_hour &&
391
400
  grace_rotation_interval == o.grace_rotation_interval &&
401
+ grace_rotation_timing == o.grace_rotation_timing &&
392
402
  item_custom_fields == o.item_custom_fields &&
393
403
  json == o.json &&
394
404
  keep_prev_version == o.keep_prev_version &&
@@ -420,7 +430,7 @@ module Akeyless
420
430
  # Calculates hash code according to all attributes.
421
431
  # @return [Integer] Hash code
422
432
  def hash
423
- [add_tag, api_id, api_key, authentication_credentials, auto_rotate, aws_region, delete_protection, description, grace_rotation, grace_rotation_hour, grace_rotation_interval, item_custom_fields, json, keep_prev_version, key, max_versions, name, new_name, password_length, rm_tag, rotate_after_disconnect, rotation_event_in, rotation_hour, rotation_interval, secure_access_aws_account_id, secure_access_aws_native_cli, secure_access_bastion_issuer, secure_access_certificate_issuer, secure_access_enable, token, uid_token].hash
433
+ [add_tag, api_id, api_key, authentication_credentials, auto_rotate, aws_region, delete_protection, description, grace_rotation, grace_rotation_hour, grace_rotation_interval, grace_rotation_timing, item_custom_fields, json, keep_prev_version, key, max_versions, name, new_name, password_length, rm_tag, rotate_after_disconnect, rotation_event_in, rotation_hour, rotation_interval, secure_access_aws_account_id, secure_access_aws_native_cli, secure_access_bastion_issuer, secure_access_certificate_issuer, secure_access_enable, token, uid_token].hash
424
434
  end
425
435
 
426
436
  # Builds the object from hash