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
@@ -42,7 +42,7 @@ module Akeyless
42
42
  # If set, explicitly provide the storage account details [true/false]
43
43
  attr_accessor :explicitly_set_sa
44
44
 
45
- # Create a new access key without deleting the old key from AWS/Azure/GCP for backup (relevant only for AWS/Azure/GCP) [true/false]
45
+ # 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]
46
46
  attr_accessor :grace_rotation
47
47
 
48
48
  # The Hour of the grace rotation in UTC
@@ -51,6 +51,9 @@ module Akeyless
51
51
  # The number of days to wait before deleting the old key (must be bigger than rotation-interval)
52
52
  attr_accessor :grace_rotation_interval
53
53
 
54
+ # When to create the new version relative to the rotation date [after/before]
55
+ attr_accessor :grace_rotation_timing
56
+
54
57
  # Additional custom fields to associate with the item
55
58
  attr_accessor :item_custom_fields
56
59
 
@@ -141,6 +144,7 @@ module Akeyless
141
144
  :'grace_rotation' => :'grace-rotation',
142
145
  :'grace_rotation_hour' => :'grace-rotation-hour',
143
146
  :'grace_rotation_interval' => :'grace-rotation-interval',
147
+ :'grace_rotation_timing' => :'grace-rotation-timing',
144
148
  :'item_custom_fields' => :'item-custom-fields',
145
149
  :'json' => :'json',
146
150
  :'keep_prev_version' => :'keep-prev-version',
@@ -189,6 +193,7 @@ module Akeyless
189
193
  :'grace_rotation' => :'String',
190
194
  :'grace_rotation_hour' => :'Integer',
191
195
  :'grace_rotation_interval' => :'String',
196
+ :'grace_rotation_timing' => :'String',
192
197
  :'item_custom_fields' => :'Hash<String, String>',
193
198
  :'json' => :'Boolean',
194
199
  :'keep_prev_version' => :'String',
@@ -294,6 +299,10 @@ module Akeyless
294
299
  self.grace_rotation_interval = attributes[:'grace_rotation_interval']
295
300
  end
296
301
 
302
+ if attributes.key?(:'grace_rotation_timing')
303
+ self.grace_rotation_timing = attributes[:'grace_rotation_timing']
304
+ end
305
+
297
306
  if attributes.key?(:'item_custom_fields')
298
307
  if (value = attributes[:'item_custom_fields']).is_a?(Hash)
299
308
  self.item_custom_fields = value
@@ -450,6 +459,7 @@ module Akeyless
450
459
  grace_rotation == o.grace_rotation &&
451
460
  grace_rotation_hour == o.grace_rotation_hour &&
452
461
  grace_rotation_interval == o.grace_rotation_interval &&
462
+ grace_rotation_timing == o.grace_rotation_timing &&
453
463
  item_custom_fields == o.item_custom_fields &&
454
464
  json == o.json &&
455
465
  keep_prev_version == o.keep_prev_version &&
@@ -486,7 +496,7 @@ module Akeyless
486
496
  # Calculates hash code according to all attributes.
487
497
  # @return [Integer] Hash code
488
498
  def hash
489
- [add_tag, api_id, api_key, application_id, authentication_credentials, auto_rotate, delete_protection, description, explicitly_set_sa, grace_rotation, grace_rotation_hour, grace_rotation_interval, item_custom_fields, json, keep_prev_version, key, max_versions, name, new_name, password_length, resource_group_name, resource_name, rm_tag, rotate_after_disconnect, rotation_event_in, rotation_hour, rotation_interval, secure_access_disable_concurrent_connections, secure_access_enable, secure_access_url, secure_access_web, secure_access_web_browsing, secure_access_web_proxy, storage_account_key_name, token, uid_token, username].hash
499
+ [add_tag, api_id, api_key, application_id, authentication_credentials, auto_rotate, delete_protection, description, explicitly_set_sa, 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, resource_group_name, resource_name, rm_tag, rotate_after_disconnect, rotation_event_in, rotation_hour, rotation_interval, secure_access_disable_concurrent_connections, secure_access_enable, secure_access_url, secure_access_web, secure_access_web_browsing, secure_access_web_proxy, storage_account_key_name, token, uid_token, username].hash
490
500
  end
491
501
 
492
502
  # Builds the object from hash
@@ -39,7 +39,7 @@ module Akeyless
39
39
  # The key id of the gcp service account to rotate
40
40
  attr_accessor :gcp_service_account_key_id
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
 
@@ -107,6 +110,7 @@ module Akeyless
107
110
  :'grace_rotation' => :'grace-rotation',
108
111
  :'grace_rotation_hour' => :'grace-rotation-hour',
109
112
  :'grace_rotation_interval' => :'grace-rotation-interval',
113
+ :'grace_rotation_timing' => :'grace-rotation-timing',
110
114
  :'item_custom_fields' => :'item-custom-fields',
111
115
  :'json' => :'json',
112
116
  :'keep_prev_version' => :'keep-prev-version',
@@ -144,6 +148,7 @@ module Akeyless
144
148
  :'grace_rotation' => :'String',
145
149
  :'grace_rotation_hour' => :'Integer',
146
150
  :'grace_rotation_interval' => :'String',
151
+ :'grace_rotation_timing' => :'String',
147
152
  :'item_custom_fields' => :'Hash<String, String>',
148
153
  :'json' => :'Boolean',
149
154
  :'keep_prev_version' => :'String',
@@ -233,6 +238,10 @@ module Akeyless
233
238
  self.grace_rotation_interval = attributes[:'grace_rotation_interval']
234
239
  end
235
240
 
241
+ if attributes.key?(:'grace_rotation_timing')
242
+ self.grace_rotation_timing = attributes[:'grace_rotation_timing']
243
+ end
244
+
236
245
  if attributes.key?(:'item_custom_fields')
237
246
  if (value = attributes[:'item_custom_fields']).is_a?(Hash)
238
247
  self.item_custom_fields = value
@@ -347,6 +356,7 @@ module Akeyless
347
356
  grace_rotation == o.grace_rotation &&
348
357
  grace_rotation_hour == o.grace_rotation_hour &&
349
358
  grace_rotation_interval == o.grace_rotation_interval &&
359
+ grace_rotation_timing == o.grace_rotation_timing &&
350
360
  item_custom_fields == o.item_custom_fields &&
351
361
  json == o.json &&
352
362
  keep_prev_version == o.keep_prev_version &&
@@ -373,7 +383,7 @@ module Akeyless
373
383
  # Calculates hash code according to all attributes.
374
384
  # @return [Integer] Hash code
375
385
  def hash
376
- [add_tag, authentication_credentials, auto_rotate, delete_protection, description, gcp_key, gcp_service_account_email, gcp_service_account_key_id, 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, rotation_event_in, rotation_hour, rotation_interval, rotator_type, token, uid_token].hash
386
+ [add_tag, authentication_credentials, auto_rotate, delete_protection, description, gcp_key, gcp_service_account_email, gcp_service_account_key_id, 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, rotation_event_in, rotation_hour, rotation_interval, rotator_type, token, uid_token].hash
377
387
  end
378
388
 
379
389
  # Builds the object from hash
@@ -0,0 +1,467 @@
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
+ # rotatedSecretUpdateSplunk is a command that updates a rotated secret for a Splunk target. It reuses the rotator type chosen at create time.
18
+ class RotatedSecretUpdateSplunk
19
+ # List of the new tags that will be attached to this item
20
+ attr_accessor :add_tag
21
+
22
+ # Token audience for Splunk token creation (relevant only for rotator-type=token)
23
+ attr_accessor :audience
24
+
25
+ # The credentials to connect with use-user-creds/use-target-creds
26
+ attr_accessor :authentication_credentials
27
+
28
+ # Whether to automatically rotate every --rotation-interval days, or disable existing automatic rotation [true/false]
29
+ attr_accessor :auto_rotate
30
+
31
+ # Protection from accidental deletion of this object [true/false]
32
+ attr_accessor :delete_protection
33
+
34
+ # Description of the object
35
+ attr_accessor :description
36
+
37
+ # Token expiration date in YYYY-MM-DD format (relevant only for rotator-type=token when manual rotation is selected). Time will be set to 00:00 UTC.
38
+ attr_accessor :expiration_date
39
+
40
+ # For rotator-type=hec-token, optionally set/replace the stored HEC token value.
41
+ attr_accessor :hec_token
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
+ # Whether to keep previous version [true/false]. If not set, use default according to account settings
50
+ attr_accessor :keep_prev_version
51
+
52
+ # The name of a key that used to encrypt the secret value (if empty, the account default protectionKey key will be used)
53
+ attr_accessor :key
54
+
55
+ # Set the maximum number of versions, limited by the account settings defaults.
56
+ attr_accessor :max_versions
57
+
58
+ # Rotated secret name
59
+ attr_accessor :name
60
+
61
+ # New item name
62
+ attr_accessor :new_name
63
+
64
+ # The length of the password to be generated
65
+ attr_accessor :password_length
66
+
67
+ # List of the existent tags that will be removed from this item
68
+ attr_accessor :rm_tag
69
+
70
+ # How many days before the rotation of the item would you like to be notified
71
+ attr_accessor :rotation_event_in
72
+
73
+ # The Hour of the rotation in UTC
74
+ attr_accessor :rotation_hour
75
+
76
+ # The number of days to wait between every automatic key rotation (1-365)
77
+ attr_accessor :rotation_interval
78
+
79
+ # For rotator-type=token, optionally set/replace the stored Splunk authentication token value.
80
+ attr_accessor :splunk_token
81
+
82
+ # Authentication token (see `/auth` and `/configure`)
83
+ attr_accessor :token
84
+
85
+ # For rotator-type=token, specify the Splunk username that the new token should be issued for. (Splunk 10 requires name=<token-owner> when creating auth tokens.)
86
+ attr_accessor :token_owner
87
+
88
+ # The universal identity token, Required only for universal_identity authentication
89
+ attr_accessor :uid_token
90
+
91
+ # Attribute mapping from ruby-style variable name to JSON key.
92
+ def self.attribute_map
93
+ {
94
+ :'add_tag' => :'add-tag',
95
+ :'audience' => :'audience',
96
+ :'authentication_credentials' => :'authentication-credentials',
97
+ :'auto_rotate' => :'auto-rotate',
98
+ :'delete_protection' => :'delete_protection',
99
+ :'description' => :'description',
100
+ :'expiration_date' => :'expiration-date',
101
+ :'hec_token' => :'hec-token',
102
+ :'item_custom_fields' => :'item-custom-fields',
103
+ :'json' => :'json',
104
+ :'keep_prev_version' => :'keep-prev-version',
105
+ :'key' => :'key',
106
+ :'max_versions' => :'max-versions',
107
+ :'name' => :'name',
108
+ :'new_name' => :'new-name',
109
+ :'password_length' => :'password-length',
110
+ :'rm_tag' => :'rm-tag',
111
+ :'rotation_event_in' => :'rotation-event-in',
112
+ :'rotation_hour' => :'rotation-hour',
113
+ :'rotation_interval' => :'rotation-interval',
114
+ :'splunk_token' => :'splunk-token',
115
+ :'token' => :'token',
116
+ :'token_owner' => :'token-owner',
117
+ :'uid_token' => :'uid-token'
118
+ }
119
+ end
120
+
121
+ # Returns all the JSON keys this model knows about
122
+ def self.acceptable_attributes
123
+ attribute_map.values
124
+ end
125
+
126
+ # Attribute type mapping.
127
+ def self.openapi_types
128
+ {
129
+ :'add_tag' => :'Array<String>',
130
+ :'audience' => :'String',
131
+ :'authentication_credentials' => :'String',
132
+ :'auto_rotate' => :'String',
133
+ :'delete_protection' => :'String',
134
+ :'description' => :'String',
135
+ :'expiration_date' => :'String',
136
+ :'hec_token' => :'String',
137
+ :'item_custom_fields' => :'Hash<String, String>',
138
+ :'json' => :'Boolean',
139
+ :'keep_prev_version' => :'String',
140
+ :'key' => :'String',
141
+ :'max_versions' => :'String',
142
+ :'name' => :'String',
143
+ :'new_name' => :'String',
144
+ :'password_length' => :'String',
145
+ :'rm_tag' => :'Array<String>',
146
+ :'rotation_event_in' => :'Array<String>',
147
+ :'rotation_hour' => :'Integer',
148
+ :'rotation_interval' => :'String',
149
+ :'splunk_token' => :'String',
150
+ :'token' => :'String',
151
+ :'token_owner' => :'String',
152
+ :'uid_token' => :'String'
153
+ }
154
+ end
155
+
156
+ # List of attributes with nullable: true
157
+ def self.openapi_nullable
158
+ Set.new([
159
+ ])
160
+ end
161
+
162
+ # Initializes the object
163
+ # @param [Hash] attributes Model attributes in the form of hash
164
+ def initialize(attributes = {})
165
+ if (!attributes.is_a?(Hash))
166
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::RotatedSecretUpdateSplunk` initialize method"
167
+ end
168
+
169
+ # check to see if the attribute exists and convert string to symbol for hash key
170
+ attributes = attributes.each_with_object({}) { |(k, v), h|
171
+ if (!self.class.attribute_map.key?(k.to_sym))
172
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::RotatedSecretUpdateSplunk`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
173
+ end
174
+ h[k.to_sym] = v
175
+ }
176
+
177
+ if attributes.key?(:'add_tag')
178
+ if (value = attributes[:'add_tag']).is_a?(Array)
179
+ self.add_tag = value
180
+ end
181
+ end
182
+
183
+ if attributes.key?(:'audience')
184
+ self.audience = attributes[:'audience']
185
+ end
186
+
187
+ if attributes.key?(:'authentication_credentials')
188
+ self.authentication_credentials = attributes[:'authentication_credentials']
189
+ else
190
+ self.authentication_credentials = 'use-user-creds'
191
+ end
192
+
193
+ if attributes.key?(:'auto_rotate')
194
+ self.auto_rotate = attributes[:'auto_rotate']
195
+ end
196
+
197
+ if attributes.key?(:'delete_protection')
198
+ self.delete_protection = attributes[:'delete_protection']
199
+ end
200
+
201
+ if attributes.key?(:'description')
202
+ self.description = attributes[:'description']
203
+ else
204
+ self.description = 'default_metadata'
205
+ end
206
+
207
+ if attributes.key?(:'expiration_date')
208
+ self.expiration_date = attributes[:'expiration_date']
209
+ end
210
+
211
+ if attributes.key?(:'hec_token')
212
+ self.hec_token = attributes[:'hec_token']
213
+ end
214
+
215
+ if attributes.key?(:'item_custom_fields')
216
+ if (value = attributes[:'item_custom_fields']).is_a?(Hash)
217
+ self.item_custom_fields = value
218
+ end
219
+ end
220
+
221
+ if attributes.key?(:'json')
222
+ self.json = attributes[:'json']
223
+ else
224
+ self.json = false
225
+ end
226
+
227
+ if attributes.key?(:'keep_prev_version')
228
+ self.keep_prev_version = attributes[:'keep_prev_version']
229
+ end
230
+
231
+ if attributes.key?(:'key')
232
+ self.key = attributes[:'key']
233
+ end
234
+
235
+ if attributes.key?(:'max_versions')
236
+ self.max_versions = attributes[:'max_versions']
237
+ end
238
+
239
+ if attributes.key?(:'name')
240
+ self.name = attributes[:'name']
241
+ else
242
+ self.name = nil
243
+ end
244
+
245
+ if attributes.key?(:'new_name')
246
+ self.new_name = attributes[:'new_name']
247
+ end
248
+
249
+ if attributes.key?(:'password_length')
250
+ self.password_length = attributes[:'password_length']
251
+ end
252
+
253
+ if attributes.key?(:'rm_tag')
254
+ if (value = attributes[:'rm_tag']).is_a?(Array)
255
+ self.rm_tag = value
256
+ end
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?(:'splunk_token')
274
+ self.splunk_token = attributes[:'splunk_token']
275
+ end
276
+
277
+ if attributes.key?(:'token')
278
+ self.token = attributes[:'token']
279
+ end
280
+
281
+ if attributes.key?(:'token_owner')
282
+ self.token_owner = attributes[:'token_owner']
283
+ end
284
+
285
+ if attributes.key?(:'uid_token')
286
+ self.uid_token = attributes[:'uid_token']
287
+ end
288
+ end
289
+
290
+ # Show invalid properties with the reasons. Usually used together with valid?
291
+ # @return Array for valid properties with the reasons
292
+ def list_invalid_properties
293
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
294
+ invalid_properties = Array.new
295
+ if @name.nil?
296
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
297
+ end
298
+
299
+ invalid_properties
300
+ end
301
+
302
+ # Check to see if the all the properties in the model are valid
303
+ # @return true if the model is valid
304
+ def valid?
305
+ warn '[DEPRECATED] the `valid?` method is obsolete'
306
+ return false if @name.nil?
307
+ true
308
+ end
309
+
310
+ # Checks equality by comparing each attribute.
311
+ # @param [Object] Object to be compared
312
+ def ==(o)
313
+ return true if self.equal?(o)
314
+ self.class == o.class &&
315
+ add_tag == o.add_tag &&
316
+ audience == o.audience &&
317
+ authentication_credentials == o.authentication_credentials &&
318
+ auto_rotate == o.auto_rotate &&
319
+ delete_protection == o.delete_protection &&
320
+ description == o.description &&
321
+ expiration_date == o.expiration_date &&
322
+ hec_token == o.hec_token &&
323
+ item_custom_fields == o.item_custom_fields &&
324
+ json == o.json &&
325
+ keep_prev_version == o.keep_prev_version &&
326
+ key == o.key &&
327
+ max_versions == o.max_versions &&
328
+ name == o.name &&
329
+ new_name == o.new_name &&
330
+ password_length == o.password_length &&
331
+ rm_tag == o.rm_tag &&
332
+ rotation_event_in == o.rotation_event_in &&
333
+ rotation_hour == o.rotation_hour &&
334
+ rotation_interval == o.rotation_interval &&
335
+ splunk_token == o.splunk_token &&
336
+ token == o.token &&
337
+ token_owner == o.token_owner &&
338
+ uid_token == o.uid_token
339
+ end
340
+
341
+ # @see the `==` method
342
+ # @param [Object] Object to be compared
343
+ def eql?(o)
344
+ self == o
345
+ end
346
+
347
+ # Calculates hash code according to all attributes.
348
+ # @return [Integer] Hash code
349
+ def hash
350
+ [add_tag, audience, authentication_credentials, auto_rotate, delete_protection, description, expiration_date, hec_token, item_custom_fields, json, keep_prev_version, key, max_versions, name, new_name, password_length, rm_tag, rotation_event_in, rotation_hour, rotation_interval, splunk_token, token, token_owner, uid_token].hash
351
+ end
352
+
353
+ # Builds the object from hash
354
+ # @param [Hash] attributes Model attributes in the form of hash
355
+ # @return [Object] Returns the model itself
356
+ def self.build_from_hash(attributes)
357
+ return nil unless attributes.is_a?(Hash)
358
+ attributes = attributes.transform_keys(&:to_sym)
359
+ transformed_hash = {}
360
+ openapi_types.each_pair do |key, type|
361
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
362
+ transformed_hash["#{key}"] = nil
363
+ elsif type =~ /\AArray<(.*)>/i
364
+ # check to ensure the input is an array given that the attribute
365
+ # is documented as an array but the input is not
366
+ if attributes[attribute_map[key]].is_a?(Array)
367
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
368
+ end
369
+ elsif !attributes[attribute_map[key]].nil?
370
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
371
+ end
372
+ end
373
+ new(transformed_hash)
374
+ end
375
+
376
+ # Deserializes the data based on type
377
+ # @param string type Data type
378
+ # @param string value Value to be deserialized
379
+ # @return [Object] Deserialized data
380
+ def self._deserialize(type, value)
381
+ case type.to_sym
382
+ when :Time
383
+ Time.parse(value)
384
+ when :Date
385
+ Date.parse(value)
386
+ when :String
387
+ value.to_s
388
+ when :Integer
389
+ value.to_i
390
+ when :Float
391
+ value.to_f
392
+ when :Boolean
393
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
394
+ true
395
+ else
396
+ false
397
+ end
398
+ when :Object
399
+ # generic object (usually a Hash), return directly
400
+ value
401
+ when /\AArray<(?<inner_type>.+)>\z/
402
+ inner_type = Regexp.last_match[:inner_type]
403
+ value.map { |v| _deserialize(inner_type, v) }
404
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
405
+ k_type = Regexp.last_match[:k_type]
406
+ v_type = Regexp.last_match[:v_type]
407
+ {}.tap do |hash|
408
+ value.each do |k, v|
409
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
410
+ end
411
+ end
412
+ else # model
413
+ # models (e.g. Pet) or oneOf
414
+ klass = Akeyless.const_get(type)
415
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
416
+ end
417
+ end
418
+
419
+ # Returns the string representation of the object
420
+ # @return [String] String presentation of the object
421
+ def to_s
422
+ to_hash.to_s
423
+ end
424
+
425
+ # to_body is an alias to to_hash (backward compatibility)
426
+ # @return [Hash] Returns the object in the form of hash
427
+ def to_body
428
+ to_hash
429
+ end
430
+
431
+ # Returns the object in the form of hash
432
+ # @return [Hash] Returns the object in the form of hash
433
+ def to_hash
434
+ hash = {}
435
+ self.class.attribute_map.each_pair do |attr, param|
436
+ value = self.send(attr)
437
+ if value.nil?
438
+ is_nullable = self.class.openapi_nullable.include?(attr)
439
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
440
+ end
441
+
442
+ hash[param] = _to_hash(value)
443
+ end
444
+ hash
445
+ end
446
+
447
+ # Outputs non-array value in the form of hash
448
+ # For object, use to_hash. Otherwise, just return the value
449
+ # @param [Object] value Any valid value
450
+ # @return [Hash] Returns the value in the form of hash
451
+ def _to_hash(value)
452
+ if value.is_a?(Array)
453
+ value.compact.map { |v| _to_hash(v) }
454
+ elsif value.is_a?(Hash)
455
+ {}.tap do |hash|
456
+ value.each { |k, v| hash[k] = _to_hash(v) }
457
+ end
458
+ elsif value.respond_to? :to_hash
459
+ value.to_hash
460
+ else
461
+ value
462
+ end
463
+ end
464
+
465
+ end
466
+
467
+ end
@@ -29,6 +29,8 @@ module Akeyless
29
29
 
30
30
  attr_accessor :name
31
31
 
32
+ attr_accessor :region
33
+
32
34
  attr_accessor :secret_id
33
35
 
34
36
  attr_accessor :status
@@ -51,6 +53,7 @@ module Akeyless
51
53
  :'last_retrieved' => :'last_retrieved',
52
54
  :'location' => :'location',
53
55
  :'name' => :'name',
56
+ :'region' => :'region',
54
57
  :'secret_id' => :'secret_id',
55
58
  :'status' => :'status',
56
59
  :'tags' => :'tags',
@@ -75,6 +78,7 @@ module Akeyless
75
78
  :'last_retrieved' => :'Time',
76
79
  :'location' => :'Object',
77
80
  :'name' => :'String',
81
+ :'region' => :'String',
78
82
  :'secret_id' => :'String',
79
83
  :'status' => :'Boolean',
80
84
  :'tags' => :'Hash<String, String>',
@@ -134,6 +138,10 @@ module Akeyless
134
138
  self.name = attributes[:'name']
135
139
  end
136
140
 
141
+ if attributes.key?(:'region')
142
+ self.region = attributes[:'region']
143
+ end
144
+
137
145
  if attributes.key?(:'secret_id')
138
146
  self.secret_id = attributes[:'secret_id']
139
147
  end
@@ -188,6 +196,7 @@ module Akeyless
188
196
  last_retrieved == o.last_retrieved &&
189
197
  location == o.location &&
190
198
  name == o.name &&
199
+ region == o.region &&
191
200
  secret_id == o.secret_id &&
192
201
  status == o.status &&
193
202
  tags == o.tags &&
@@ -205,7 +214,7 @@ module Akeyless
205
214
  # Calculates hash code according to all attributes.
206
215
  # @return [Integer] Hash code
207
216
  def hash
208
- [created, description, expiration, key_id, last_retrieved, location, name, secret_id, status, tags, thumbprint, type, version].hash
217
+ [created, description, expiration, key_id, last_retrieved, location, name, region, secret_id, status, tags, thumbprint, type, version].hash
209
218
  end
210
219
 
211
220
  # Builds the object from hash