akeyless 5.0.22 → 5.0.23

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 (173) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +23 -1
  3. data/docs/AccountGeneralSettings.md +4 -0
  4. data/docs/AuthMethodCreateUniversalIdentity.md +4 -0
  5. data/docs/AuthMethodUpdateUniversalIdentity.md +4 -0
  6. data/docs/AwsStorage.md +2 -0
  7. data/docs/CreateAuthMethodUniversalIdentity.md +4 -0
  8. data/docs/CreateRotatedSecret.md +3 -1
  9. data/docs/CreateSecret.md +2 -0
  10. data/docs/CreateUSC.md +1 -1
  11. data/docs/DeleteRoleRule.md +1 -1
  12. data/docs/DescribePermissions.md +1 -1
  13. data/docs/DigiCertTargetDetails.md +42 -0
  14. data/docs/EsmListSecretsOutput.md +3 -1
  15. data/docs/GatewayCreateMigration.md +4 -0
  16. data/docs/GatewayUpdateMigration.md +4 -0
  17. data/docs/GatewayUpdateRemoteAccessRdpRecordings.md +2 -0
  18. data/docs/GeneralConfigPart.md +4 -0
  19. data/docs/GoogleTrustTargetDetails.md +42 -0
  20. data/docs/HashiPayload.md +5 -1
  21. data/docs/Item.md +2 -0
  22. data/docs/ItemLockingSetting.md +20 -0
  23. data/docs/LockItem.md +28 -0
  24. data/docs/LockTarget.md +28 -0
  25. data/docs/LockingInfo.md +24 -0
  26. data/docs/MigrationStatusReplyObj.md +2 -0
  27. data/docs/NetappStorage.md +30 -0
  28. data/docs/ReverseRBAC.md +1 -1
  29. data/docs/RotatedSecretCreateAws.md +3 -1
  30. data/docs/RotatedSecretCreateAzure.md +3 -1
  31. data/docs/RotatedSecretCreateCustom.md +3 -1
  32. data/docs/RotatedSecretCreateLdap.md +3 -1
  33. data/docs/RotatedSecretCreateMongodb.md +3 -1
  34. data/docs/RotatedSecretCreateMssql.md +3 -1
  35. data/docs/RotatedSecretCreateMysql.md +3 -1
  36. data/docs/RotatedSecretCreateOracledb.md +3 -1
  37. data/docs/RotatedSecretCreatePostgresql.md +3 -1
  38. data/docs/RotatedSecretCreateRedshift.md +3 -1
  39. data/docs/RotatedSecretCreateSsh.md +3 -1
  40. data/docs/RotatedSecretCreateWindows.md +3 -1
  41. data/docs/RotatedSecretUpdateAws.md +3 -1
  42. data/docs/RotatedSecretUpdateAzure.md +3 -1
  43. data/docs/RotatedSecretUpdateCustom.md +3 -1
  44. data/docs/RotatedSecretUpdateLdap.md +3 -1
  45. data/docs/RotatedSecretUpdateMongodb.md +3 -1
  46. data/docs/RotatedSecretUpdateMssql.md +3 -1
  47. data/docs/RotatedSecretUpdateMysql.md +3 -1
  48. data/docs/RotatedSecretUpdateOracledb.md +3 -1
  49. data/docs/RotatedSecretUpdatePostgresql.md +3 -1
  50. data/docs/RotatedSecretUpdateRedshift.md +3 -1
  51. data/docs/RotatedSecretUpdateSsh.md +3 -1
  52. data/docs/RotatedSecretUpdateWindows.md +3 -1
  53. data/docs/SecretInfo.md +2 -0
  54. data/docs/SecureRemoteAccess.md +4 -0
  55. data/docs/SetRoleRule.md +1 -1
  56. data/docs/SyncCounters.md +22 -0
  57. data/docs/Target.md +2 -0
  58. data/docs/TargetCreateDigiCert.md +50 -0
  59. data/docs/TargetCreateGoogleTrust.md +50 -0
  60. data/docs/TargetCreateLetsEncrypt.md +1 -1
  61. data/docs/TargetCreateSplunk.md +3 -1
  62. data/docs/TargetTypeDetailsInput.md +4 -0
  63. data/docs/TargetUpdateDigiCert.md +54 -0
  64. data/docs/TargetUpdateGoogleTrust.md +54 -0
  65. data/docs/TargetUpdateLetsEncrypt.md +1 -1
  66. data/docs/UniversalIdentityAccessRules.md +4 -0
  67. data/docs/UnlockItem.md +24 -0
  68. data/docs/UnlockTarget.md +24 -0
  69. data/docs/UpdateAccountSettings.md +4 -0
  70. data/docs/UpdateAuthMethodUniversalIdentity.md +4 -0
  71. data/docs/UpdateItem.md +3 -1
  72. data/docs/UpdateRotatedSecret.md +3 -1
  73. data/docs/UscCreate.md +2 -0
  74. data/docs/UscDelete.md +4 -0
  75. data/docs/UscGet.md +4 -0
  76. data/docs/UscListSecretsOutput.md +3 -1
  77. data/docs/UscUpdate.md +4 -0
  78. data/docs/V2Api.md +506 -2
  79. data/docs/WebBastionRdpRecord.md +2 -0
  80. data/lib/akeyless/api/v2_api.rb +512 -0
  81. data/lib/akeyless/models/account_general_settings.rb +19 -1
  82. data/lib/akeyless/models/auth_method_create_universal_identity.rb +25 -1
  83. data/lib/akeyless/models/auth_method_update_universal_identity.rb +25 -1
  84. data/lib/akeyless/models/aws_storage.rb +10 -1
  85. data/lib/akeyless/models/create_auth_method_universal_identity.rb +25 -1
  86. data/lib/akeyless/models/create_rotated_secret.rb +12 -4
  87. data/lib/akeyless/models/create_secret.rb +11 -1
  88. data/lib/akeyless/models/create_usc.rb +1 -1
  89. data/lib/akeyless/models/delete_role_rule.rb +1 -1
  90. data/lib/akeyless/models/describe_permissions.rb +1 -1
  91. data/lib/akeyless/models/digi_cert_target_details.rb +333 -0
  92. data/lib/akeyless/models/esm_list_secrets_output.rb +15 -4
  93. data/lib/akeyless/models/gateway_create_migration.rb +21 -1
  94. data/lib/akeyless/models/gateway_update_migration.rb +21 -1
  95. data/lib/akeyless/models/gateway_update_remote_access_rdp_recordings.rb +11 -1
  96. data/lib/akeyless/models/general_config_part.rb +19 -1
  97. data/lib/akeyless/models/google_trust_target_details.rb +335 -0
  98. data/lib/akeyless/models/hashi_payload.rb +22 -4
  99. data/lib/akeyless/models/item.rb +10 -1
  100. data/lib/akeyless/models/item_locking_setting.rb +223 -0
  101. data/lib/akeyless/models/lock_item.rb +274 -0
  102. data/lib/akeyless/models/lock_target.rb +274 -0
  103. data/lib/akeyless/models/locking_info.rb +243 -0
  104. data/lib/akeyless/models/migration_status_reply_obj.rb +10 -1
  105. data/lib/akeyless/models/netapp_storage.rb +268 -0
  106. data/lib/akeyless/models/reverse_rbac.rb +1 -1
  107. data/lib/akeyless/models/rotated_secret_create_aws.rb +12 -4
  108. data/lib/akeyless/models/rotated_secret_create_azure.rb +12 -4
  109. data/lib/akeyless/models/rotated_secret_create_custom.rb +12 -4
  110. data/lib/akeyless/models/rotated_secret_create_ldap.rb +12 -4
  111. data/lib/akeyless/models/rotated_secret_create_mongodb.rb +12 -4
  112. data/lib/akeyless/models/rotated_secret_create_mssql.rb +12 -4
  113. data/lib/akeyless/models/rotated_secret_create_mysql.rb +12 -4
  114. data/lib/akeyless/models/rotated_secret_create_oracledb.rb +12 -4
  115. data/lib/akeyless/models/rotated_secret_create_postgresql.rb +12 -4
  116. data/lib/akeyless/models/rotated_secret_create_redshift.rb +12 -4
  117. data/lib/akeyless/models/rotated_secret_create_ssh.rb +12 -4
  118. data/lib/akeyless/models/rotated_secret_create_windows.rb +12 -4
  119. data/lib/akeyless/models/rotated_secret_update_aws.rb +12 -4
  120. data/lib/akeyless/models/rotated_secret_update_azure.rb +12 -4
  121. data/lib/akeyless/models/rotated_secret_update_custom.rb +12 -4
  122. data/lib/akeyless/models/rotated_secret_update_ldap.rb +12 -4
  123. data/lib/akeyless/models/rotated_secret_update_mongodb.rb +12 -4
  124. data/lib/akeyless/models/rotated_secret_update_mssql.rb +12 -4
  125. data/lib/akeyless/models/rotated_secret_update_mysql.rb +12 -4
  126. data/lib/akeyless/models/rotated_secret_update_oracledb.rb +12 -4
  127. data/lib/akeyless/models/rotated_secret_update_postgresql.rb +12 -4
  128. data/lib/akeyless/models/rotated_secret_update_redshift.rb +12 -4
  129. data/lib/akeyless/models/rotated_secret_update_ssh.rb +12 -4
  130. data/lib/akeyless/models/rotated_secret_update_windows.rb +12 -4
  131. data/lib/akeyless/models/secret_info.rb +10 -1
  132. data/lib/akeyless/models/secure_remote_access.rb +19 -1
  133. data/lib/akeyless/models/set_role_rule.rb +1 -1
  134. data/lib/akeyless/models/sync_counters.rb +233 -0
  135. data/lib/akeyless/models/target.rb +10 -1
  136. data/lib/akeyless/models/target_create_digi_cert.rb +398 -0
  137. data/lib/akeyless/models/target_create_google_trust.rb +398 -0
  138. data/lib/akeyless/models/target_create_lets_encrypt.rb +7 -0
  139. data/lib/akeyless/models/target_create_splunk.rb +11 -1
  140. data/lib/akeyless/models/target_type_details_input.rb +19 -1
  141. data/lib/akeyless/models/target_update_digi_cert.rb +418 -0
  142. data/lib/akeyless/models/target_update_google_trust.rb +418 -0
  143. data/lib/akeyless/models/target_update_lets_encrypt.rb +7 -0
  144. data/lib/akeyless/models/universal_identity_access_rules.rb +19 -1
  145. data/lib/akeyless/models/unlock_item.rb +254 -0
  146. data/lib/akeyless/models/unlock_target.rb +254 -0
  147. data/lib/akeyless/models/update_account_settings.rb +21 -1
  148. data/lib/akeyless/models/update_auth_method_universal_identity.rb +25 -1
  149. data/lib/akeyless/models/update_item.rb +12 -4
  150. data/lib/akeyless/models/update_rotated_secret.rb +12 -4
  151. data/lib/akeyless/models/usc_create.rb +10 -1
  152. data/lib/akeyless/models/usc_delete.rb +20 -1
  153. data/lib/akeyless/models/usc_get.rb +20 -1
  154. data/lib/akeyless/models/usc_list_secrets_output.rb +15 -4
  155. data/lib/akeyless/models/usc_update.rb +20 -1
  156. data/lib/akeyless/models/web_bastion_rdp_record.rb +10 -1
  157. data/lib/akeyless/version.rb +1 -1
  158. data/lib/akeyless.rb +14 -0
  159. data/spec/models/digi_cert_target_details_spec.rb +108 -0
  160. data/spec/models/google_trust_target_details_spec.rb +108 -0
  161. data/spec/models/item_locking_setting_spec.rb +42 -0
  162. data/spec/models/lock_item_spec.rb +66 -0
  163. data/spec/models/lock_target_spec.rb +66 -0
  164. data/spec/models/locking_info_spec.rb +54 -0
  165. data/spec/models/netapp_storage_spec.rb +72 -0
  166. data/spec/models/sync_counters_spec.rb +48 -0
  167. data/spec/models/target_create_digi_cert_spec.rb +132 -0
  168. data/spec/models/target_create_google_trust_spec.rb +132 -0
  169. data/spec/models/target_update_digi_cert_spec.rb +144 -0
  170. data/spec/models/target_update_google_trust_spec.rb +144 -0
  171. data/spec/models/unlock_item_spec.rb +54 -0
  172. data/spec/models/unlock_target_spec.rb +54 -0
  173. metadata +1206 -1147
@@ -0,0 +1,254 @@
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
+ class UnlockItem
18
+ # Set output format to JSON
19
+ attr_accessor :json
20
+
21
+ # Item name
22
+ attr_accessor :name
23
+
24
+ # Authentication token (see `/auth` and `/configure`)
25
+ attr_accessor :token
26
+
27
+ # The universal identity token, Required only for universal_identity authentication
28
+ attr_accessor :uid_token
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'json' => :'json',
34
+ :'name' => :'name',
35
+ :'token' => :'token',
36
+ :'uid_token' => :'uid-token'
37
+ }
38
+ end
39
+
40
+ # Returns all the JSON keys this model knows about
41
+ def self.acceptable_attributes
42
+ attribute_map.values
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ def self.openapi_types
47
+ {
48
+ :'json' => :'Boolean',
49
+ :'name' => :'String',
50
+ :'token' => :'String',
51
+ :'uid_token' => :'String'
52
+ }
53
+ end
54
+
55
+ # List of attributes with nullable: true
56
+ def self.openapi_nullable
57
+ Set.new([
58
+ ])
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::UnlockItem` initialize method"
66
+ end
67
+
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ attributes = attributes.each_with_object({}) { |(k, v), h|
70
+ if (!self.class.attribute_map.key?(k.to_sym))
71
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::UnlockItem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
+ end
73
+ h[k.to_sym] = v
74
+ }
75
+
76
+ if attributes.key?(:'json')
77
+ self.json = attributes[:'json']
78
+ else
79
+ self.json = false
80
+ end
81
+
82
+ if attributes.key?(:'name')
83
+ self.name = attributes[:'name']
84
+ else
85
+ self.name = nil
86
+ end
87
+
88
+ if attributes.key?(:'token')
89
+ self.token = attributes[:'token']
90
+ end
91
+
92
+ if attributes.key?(:'uid_token')
93
+ self.uid_token = attributes[:'uid_token']
94
+ end
95
+ end
96
+
97
+ # Show invalid properties with the reasons. Usually used together with valid?
98
+ # @return Array for valid properties with the reasons
99
+ def list_invalid_properties
100
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
101
+ invalid_properties = Array.new
102
+ if @name.nil?
103
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
104
+ end
105
+
106
+ invalid_properties
107
+ end
108
+
109
+ # Check to see if the all the properties in the model are valid
110
+ # @return true if the model is valid
111
+ def valid?
112
+ warn '[DEPRECATED] the `valid?` method is obsolete'
113
+ return false if @name.nil?
114
+ true
115
+ end
116
+
117
+ # Checks equality by comparing each attribute.
118
+ # @param [Object] Object to be compared
119
+ def ==(o)
120
+ return true if self.equal?(o)
121
+ self.class == o.class &&
122
+ json == o.json &&
123
+ name == o.name &&
124
+ token == o.token &&
125
+ uid_token == o.uid_token
126
+ end
127
+
128
+ # @see the `==` method
129
+ # @param [Object] Object to be compared
130
+ def eql?(o)
131
+ self == o
132
+ end
133
+
134
+ # Calculates hash code according to all attributes.
135
+ # @return [Integer] Hash code
136
+ def hash
137
+ [json, name, token, uid_token].hash
138
+ end
139
+
140
+ # Builds the object from hash
141
+ # @param [Hash] attributes Model attributes in the form of hash
142
+ # @return [Object] Returns the model itself
143
+ def self.build_from_hash(attributes)
144
+ return nil unless attributes.is_a?(Hash)
145
+ attributes = attributes.transform_keys(&:to_sym)
146
+ transformed_hash = {}
147
+ openapi_types.each_pair do |key, type|
148
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
149
+ transformed_hash["#{key}"] = nil
150
+ elsif type =~ /\AArray<(.*)>/i
151
+ # check to ensure the input is an array given that the attribute
152
+ # is documented as an array but the input is not
153
+ if attributes[attribute_map[key]].is_a?(Array)
154
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
155
+ end
156
+ elsif !attributes[attribute_map[key]].nil?
157
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
158
+ end
159
+ end
160
+ new(transformed_hash)
161
+ end
162
+
163
+ # Deserializes the data based on type
164
+ # @param string type Data type
165
+ # @param string value Value to be deserialized
166
+ # @return [Object] Deserialized data
167
+ def self._deserialize(type, value)
168
+ case type.to_sym
169
+ when :Time
170
+ Time.parse(value)
171
+ when :Date
172
+ Date.parse(value)
173
+ when :String
174
+ value.to_s
175
+ when :Integer
176
+ value.to_i
177
+ when :Float
178
+ value.to_f
179
+ when :Boolean
180
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
181
+ true
182
+ else
183
+ false
184
+ end
185
+ when :Object
186
+ # generic object (usually a Hash), return directly
187
+ value
188
+ when /\AArray<(?<inner_type>.+)>\z/
189
+ inner_type = Regexp.last_match[:inner_type]
190
+ value.map { |v| _deserialize(inner_type, v) }
191
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
192
+ k_type = Regexp.last_match[:k_type]
193
+ v_type = Regexp.last_match[:v_type]
194
+ {}.tap do |hash|
195
+ value.each do |k, v|
196
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
197
+ end
198
+ end
199
+ else # model
200
+ # models (e.g. Pet) or oneOf
201
+ klass = Akeyless.const_get(type)
202
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
203
+ end
204
+ end
205
+
206
+ # Returns the string representation of the object
207
+ # @return [String] String presentation of the object
208
+ def to_s
209
+ to_hash.to_s
210
+ end
211
+
212
+ # to_body is an alias to to_hash (backward compatibility)
213
+ # @return [Hash] Returns the object in the form of hash
214
+ def to_body
215
+ to_hash
216
+ end
217
+
218
+ # Returns the object in the form of hash
219
+ # @return [Hash] Returns the object in the form of hash
220
+ def to_hash
221
+ hash = {}
222
+ self.class.attribute_map.each_pair do |attr, param|
223
+ value = self.send(attr)
224
+ if value.nil?
225
+ is_nullable = self.class.openapi_nullable.include?(attr)
226
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
227
+ end
228
+
229
+ hash[param] = _to_hash(value)
230
+ end
231
+ hash
232
+ end
233
+
234
+ # Outputs non-array value in the form of hash
235
+ # For object, use to_hash. Otherwise, just return the value
236
+ # @param [Object] value Any valid value
237
+ # @return [Hash] Returns the value in the form of hash
238
+ def _to_hash(value)
239
+ if value.is_a?(Array)
240
+ value.compact.map { |v| _to_hash(v) }
241
+ elsif value.is_a?(Hash)
242
+ {}.tap do |hash|
243
+ value.each { |k, v| hash[k] = _to_hash(v) }
244
+ end
245
+ elsif value.respond_to? :to_hash
246
+ value.to_hash
247
+ else
248
+ value
249
+ end
250
+ end
251
+
252
+ end
253
+
254
+ end
@@ -0,0 +1,254 @@
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
+ class UnlockTarget
18
+ # Set output format to JSON
19
+ attr_accessor :json
20
+
21
+ # Target name
22
+ attr_accessor :name
23
+
24
+ # Authentication token (see `/auth` and `/configure`)
25
+ attr_accessor :token
26
+
27
+ # The universal identity token, Required only for universal_identity authentication
28
+ attr_accessor :uid_token
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'json' => :'json',
34
+ :'name' => :'name',
35
+ :'token' => :'token',
36
+ :'uid_token' => :'uid-token'
37
+ }
38
+ end
39
+
40
+ # Returns all the JSON keys this model knows about
41
+ def self.acceptable_attributes
42
+ attribute_map.values
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ def self.openapi_types
47
+ {
48
+ :'json' => :'Boolean',
49
+ :'name' => :'String',
50
+ :'token' => :'String',
51
+ :'uid_token' => :'String'
52
+ }
53
+ end
54
+
55
+ # List of attributes with nullable: true
56
+ def self.openapi_nullable
57
+ Set.new([
58
+ ])
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::UnlockTarget` initialize method"
66
+ end
67
+
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ attributes = attributes.each_with_object({}) { |(k, v), h|
70
+ if (!self.class.attribute_map.key?(k.to_sym))
71
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::UnlockTarget`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
+ end
73
+ h[k.to_sym] = v
74
+ }
75
+
76
+ if attributes.key?(:'json')
77
+ self.json = attributes[:'json']
78
+ else
79
+ self.json = false
80
+ end
81
+
82
+ if attributes.key?(:'name')
83
+ self.name = attributes[:'name']
84
+ else
85
+ self.name = nil
86
+ end
87
+
88
+ if attributes.key?(:'token')
89
+ self.token = attributes[:'token']
90
+ end
91
+
92
+ if attributes.key?(:'uid_token')
93
+ self.uid_token = attributes[:'uid_token']
94
+ end
95
+ end
96
+
97
+ # Show invalid properties with the reasons. Usually used together with valid?
98
+ # @return Array for valid properties with the reasons
99
+ def list_invalid_properties
100
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
101
+ invalid_properties = Array.new
102
+ if @name.nil?
103
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
104
+ end
105
+
106
+ invalid_properties
107
+ end
108
+
109
+ # Check to see if the all the properties in the model are valid
110
+ # @return true if the model is valid
111
+ def valid?
112
+ warn '[DEPRECATED] the `valid?` method is obsolete'
113
+ return false if @name.nil?
114
+ true
115
+ end
116
+
117
+ # Checks equality by comparing each attribute.
118
+ # @param [Object] Object to be compared
119
+ def ==(o)
120
+ return true if self.equal?(o)
121
+ self.class == o.class &&
122
+ json == o.json &&
123
+ name == o.name &&
124
+ token == o.token &&
125
+ uid_token == o.uid_token
126
+ end
127
+
128
+ # @see the `==` method
129
+ # @param [Object] Object to be compared
130
+ def eql?(o)
131
+ self == o
132
+ end
133
+
134
+ # Calculates hash code according to all attributes.
135
+ # @return [Integer] Hash code
136
+ def hash
137
+ [json, name, token, uid_token].hash
138
+ end
139
+
140
+ # Builds the object from hash
141
+ # @param [Hash] attributes Model attributes in the form of hash
142
+ # @return [Object] Returns the model itself
143
+ def self.build_from_hash(attributes)
144
+ return nil unless attributes.is_a?(Hash)
145
+ attributes = attributes.transform_keys(&:to_sym)
146
+ transformed_hash = {}
147
+ openapi_types.each_pair do |key, type|
148
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
149
+ transformed_hash["#{key}"] = nil
150
+ elsif type =~ /\AArray<(.*)>/i
151
+ # check to ensure the input is an array given that the attribute
152
+ # is documented as an array but the input is not
153
+ if attributes[attribute_map[key]].is_a?(Array)
154
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
155
+ end
156
+ elsif !attributes[attribute_map[key]].nil?
157
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
158
+ end
159
+ end
160
+ new(transformed_hash)
161
+ end
162
+
163
+ # Deserializes the data based on type
164
+ # @param string type Data type
165
+ # @param string value Value to be deserialized
166
+ # @return [Object] Deserialized data
167
+ def self._deserialize(type, value)
168
+ case type.to_sym
169
+ when :Time
170
+ Time.parse(value)
171
+ when :Date
172
+ Date.parse(value)
173
+ when :String
174
+ value.to_s
175
+ when :Integer
176
+ value.to_i
177
+ when :Float
178
+ value.to_f
179
+ when :Boolean
180
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
181
+ true
182
+ else
183
+ false
184
+ end
185
+ when :Object
186
+ # generic object (usually a Hash), return directly
187
+ value
188
+ when /\AArray<(?<inner_type>.+)>\z/
189
+ inner_type = Regexp.last_match[:inner_type]
190
+ value.map { |v| _deserialize(inner_type, v) }
191
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
192
+ k_type = Regexp.last_match[:k_type]
193
+ v_type = Regexp.last_match[:v_type]
194
+ {}.tap do |hash|
195
+ value.each do |k, v|
196
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
197
+ end
198
+ end
199
+ else # model
200
+ # models (e.g. Pet) or oneOf
201
+ klass = Akeyless.const_get(type)
202
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
203
+ end
204
+ end
205
+
206
+ # Returns the string representation of the object
207
+ # @return [String] String presentation of the object
208
+ def to_s
209
+ to_hash.to_s
210
+ end
211
+
212
+ # to_body is an alias to to_hash (backward compatibility)
213
+ # @return [Hash] Returns the object in the form of hash
214
+ def to_body
215
+ to_hash
216
+ end
217
+
218
+ # Returns the object in the form of hash
219
+ # @return [Hash] Returns the object in the form of hash
220
+ def to_hash
221
+ hash = {}
222
+ self.class.attribute_map.each_pair do |attr, param|
223
+ value = self.send(attr)
224
+ if value.nil?
225
+ is_nullable = self.class.openapi_nullable.include?(attr)
226
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
227
+ end
228
+
229
+ hash[param] = _to_hash(value)
230
+ end
231
+ hash
232
+ end
233
+
234
+ # Outputs non-array value in the form of hash
235
+ # For object, use to_hash. Otherwise, just return the value
236
+ # @param [Object] value Any valid value
237
+ # @return [Hash] Returns the value in the form of hash
238
+ def _to_hash(value)
239
+ if value.is_a?(Array)
240
+ value.compact.map { |v| _to_hash(v) }
241
+ elsif value.is_a?(Hash)
242
+ {}.tap do |hash|
243
+ value.each { |k, v| hash[k] = _to_hash(v) }
244
+ end
245
+ elsif value.respond_to? :to_hash
246
+ value.to_hash
247
+ else
248
+ value
249
+ end
250
+ end
251
+
252
+ end
253
+
254
+ end
@@ -84,6 +84,9 @@ module Akeyless
84
84
  # Characters that cannot be used for items/targets/roles/auths/event_forwarder names. Empty string will enforce nothing.
85
85
  attr_accessor :invalid_characters
86
86
 
87
+ # Enable item locking feature [true/false]
88
+ attr_accessor :item_locking_enabled
89
+
87
90
  # VersionSettingsObjectType defines object types for account version settings
88
91
  attr_accessor :item_type
89
92
 
@@ -114,6 +117,9 @@ module Akeyless
114
117
  # Lock gw-bound-ips setting in the account.
115
118
  attr_accessor :lock_gw_bound_ips
116
119
 
120
+ # Set the maximum TTL for item/target locks in minutes
121
+ attr_accessor :lock_max_ttl
122
+
117
123
  # Set the maximum rotation interval for rotated secrets auto rotation settings
118
124
  attr_accessor :max_rotation_interval
119
125
 
@@ -191,6 +197,7 @@ module Akeyless
191
197
  :'hide_personal_folder' => :'hide-personal-folder',
192
198
  :'hide_static_password' => :'hide-static-password',
193
199
  :'invalid_characters' => :'invalid-characters',
200
+ :'item_locking_enabled' => :'item-locking-enabled',
194
201
  :'item_type' => :'item-type',
195
202
  :'items_deletion_protection' => :'items-deletion-protection',
196
203
  :'json' => :'json',
@@ -201,6 +208,7 @@ module Akeyless
201
208
  :'lock_bound_ips' => :'lock-bound-ips',
202
209
  :'lock_default_key' => :'lock-default-key',
203
210
  :'lock_gw_bound_ips' => :'lock-gw-bound-ips',
211
+ :'lock_max_ttl' => :'lock-max-ttl',
204
212
  :'max_rotation_interval' => :'max-rotation-interval',
205
213
  :'max_rotation_interval_enable' => :'max-rotation-interval-enable',
206
214
  :'max_versions' => :'max-versions',
@@ -252,6 +260,7 @@ module Akeyless
252
260
  :'hide_personal_folder' => :'String',
253
261
  :'hide_static_password' => :'String',
254
262
  :'invalid_characters' => :'String',
263
+ :'item_locking_enabled' => :'String',
255
264
  :'item_type' => :'String',
256
265
  :'items_deletion_protection' => :'String',
257
266
  :'json' => :'Boolean',
@@ -262,6 +271,7 @@ module Akeyless
262
271
  :'lock_bound_ips' => :'String',
263
272
  :'lock_default_key' => :'String',
264
273
  :'lock_gw_bound_ips' => :'String',
274
+ :'lock_max_ttl' => :'Integer',
265
275
  :'max_rotation_interval' => :'Integer',
266
276
  :'max_rotation_interval_enable' => :'String',
267
277
  :'max_versions' => :'String',
@@ -407,6 +417,10 @@ module Akeyless
407
417
  self.invalid_characters = 'notReceivedInvalidCharacter'
408
418
  end
409
419
 
420
+ if attributes.key?(:'item_locking_enabled')
421
+ self.item_locking_enabled = attributes[:'item_locking_enabled']
422
+ end
423
+
410
424
  if attributes.key?(:'item_type')
411
425
  self.item_type = attributes[:'item_type']
412
426
  end
@@ -449,6 +463,10 @@ module Akeyless
449
463
  self.lock_gw_bound_ips = attributes[:'lock_gw_bound_ips']
450
464
  end
451
465
 
466
+ if attributes.key?(:'lock_max_ttl')
467
+ self.lock_max_ttl = attributes[:'lock_max_ttl']
468
+ end
469
+
452
470
  if attributes.key?(:'max_rotation_interval')
453
471
  self.max_rotation_interval = attributes[:'max_rotation_interval']
454
472
  end
@@ -561,6 +579,7 @@ module Akeyless
561
579
  hide_personal_folder == o.hide_personal_folder &&
562
580
  hide_static_password == o.hide_static_password &&
563
581
  invalid_characters == o.invalid_characters &&
582
+ item_locking_enabled == o.item_locking_enabled &&
564
583
  item_type == o.item_type &&
565
584
  items_deletion_protection == o.items_deletion_protection &&
566
585
  json == o.json &&
@@ -571,6 +590,7 @@ module Akeyless
571
590
  lock_bound_ips == o.lock_bound_ips &&
572
591
  lock_default_key == o.lock_default_key &&
573
592
  lock_gw_bound_ips == o.lock_gw_bound_ips &&
593
+ lock_max_ttl == o.lock_max_ttl &&
574
594
  max_rotation_interval == o.max_rotation_interval &&
575
595
  max_rotation_interval_enable == o.max_rotation_interval_enable &&
576
596
  max_versions == o.max_versions &&
@@ -599,7 +619,7 @@ module Akeyless
599
619
  # Calculates hash code according to all attributes.
600
620
  # @return [Integer] Hash code
601
621
  def hash
602
- [address, allowed_client_type, allowed_email_domains, bound_ips, city, company_name, country, default_certificate_expiration_notification_days, default_key_name, default_share_link_ttl_minutes, default_versioning, dp_enable_classic_key_protection, dynamic_secret_max_ttl, dynamic_secret_max_ttl_enable, enable_ai_insights, enable_default_certificate_expiration_event, enable_item_sharing, enable_password_expiration, force_new_versions, gw_bound_ips, hide_personal_folder, hide_static_password, invalid_characters, item_type, items_deletion_protection, json, jwt_ttl_default, jwt_ttl_max, jwt_ttl_min, lock_allowed_client_type, lock_bound_ips, lock_default_key, lock_gw_bound_ips, max_rotation_interval, max_rotation_interval_enable, max_versions, password_expiration_days, password_expiration_notification_days, password_length, phone, postal_code, token, uid_token, usage_event_enable, usage_event_interval, usage_event_object_type, use_capital_letters, use_lower_letters, use_numbers, use_special_characters].hash
622
+ [address, allowed_client_type, allowed_email_domains, bound_ips, city, company_name, country, default_certificate_expiration_notification_days, default_key_name, default_share_link_ttl_minutes, default_versioning, dp_enable_classic_key_protection, dynamic_secret_max_ttl, dynamic_secret_max_ttl_enable, enable_ai_insights, enable_default_certificate_expiration_event, enable_item_sharing, enable_password_expiration, force_new_versions, gw_bound_ips, hide_personal_folder, hide_static_password, invalid_characters, item_locking_enabled, item_type, items_deletion_protection, json, jwt_ttl_default, jwt_ttl_max, jwt_ttl_min, lock_allowed_client_type, lock_bound_ips, lock_default_key, lock_gw_bound_ips, lock_max_ttl, max_rotation_interval, max_rotation_interval_enable, max_versions, password_expiration_days, password_expiration_notification_days, password_length, phone, postal_code, token, uid_token, usage_event_enable, usage_event_interval, usage_event_object_type, use_capital_letters, use_lower_letters, use_numbers, use_special_characters].hash
603
623
  end
604
624
 
605
625
  # Builds the object from hash
@@ -28,6 +28,9 @@ module Akeyless
28
28
  # A CIDR whitelist with the IPs that the access is restricted to
29
29
  attr_accessor :bound_ips
30
30
 
31
+ # Maximum child token ttl allowed in uid-create-child-token
32
+ attr_accessor :child_ttl_limit
33
+
31
34
  # Protection from accidental deletion of this object [true/false]
32
35
  attr_accessor :delete_protection
33
36
 
@@ -67,6 +70,9 @@ module Akeyless
67
70
  # Authentication token (see `/auth` and `/configure`)
68
71
  attr_accessor :token
69
72
 
73
+ # Maximum UID tree depth allowed (child of child of ...)
74
+ attr_accessor :tree_length
75
+
70
76
  # Token ttl
71
77
  attr_accessor :ttl
72
78
 
@@ -80,6 +86,7 @@ module Akeyless
80
86
  :'allowed_client_type' => :'allowed-client-type',
81
87
  :'audit_logs_claims' => :'audit-logs-claims',
82
88
  :'bound_ips' => :'bound-ips',
89
+ :'child_ttl_limit' => :'child-ttl-limit',
83
90
  :'delete_protection' => :'delete_protection',
84
91
  :'deny_inheritance' => :'deny-inheritance',
85
92
  :'deny_rotate' => :'deny-rotate',
@@ -93,6 +100,7 @@ module Akeyless
93
100
  :'new_name' => :'new-name',
94
101
  :'product_type' => :'product-type',
95
102
  :'token' => :'token',
103
+ :'tree_length' => :'tree-length',
96
104
  :'ttl' => :'ttl',
97
105
  :'uid_token' => :'uid-token'
98
106
  }
@@ -110,6 +118,7 @@ module Akeyless
110
118
  :'allowed_client_type' => :'Array<String>',
111
119
  :'audit_logs_claims' => :'Array<String>',
112
120
  :'bound_ips' => :'Array<String>',
121
+ :'child_ttl_limit' => :'Integer',
113
122
  :'delete_protection' => :'String',
114
123
  :'deny_inheritance' => :'Boolean',
115
124
  :'deny_rotate' => :'Boolean',
@@ -123,6 +132,7 @@ module Akeyless
123
132
  :'new_name' => :'String',
124
133
  :'product_type' => :'Array<String>',
125
134
  :'token' => :'String',
135
+ :'tree_length' => :'Integer',
126
136
  :'ttl' => :'Integer',
127
137
  :'uid_token' => :'String'
128
138
  }
@@ -173,6 +183,12 @@ module Akeyless
173
183
  end
174
184
  end
175
185
 
186
+ if attributes.key?(:'child_ttl_limit')
187
+ self.child_ttl_limit = attributes[:'child_ttl_limit']
188
+ else
189
+ self.child_ttl_limit = 43200
190
+ end
191
+
176
192
  if attributes.key?(:'delete_protection')
177
193
  self.delete_protection = attributes[:'delete_protection']
178
194
  end
@@ -237,6 +253,12 @@ module Akeyless
237
253
  self.token = attributes[:'token']
238
254
  end
239
255
 
256
+ if attributes.key?(:'tree_length')
257
+ self.tree_length = attributes[:'tree_length']
258
+ else
259
+ self.tree_length = 200
260
+ end
261
+
240
262
  if attributes.key?(:'ttl')
241
263
  self.ttl = attributes[:'ttl']
242
264
  else
@@ -277,6 +299,7 @@ module Akeyless
277
299
  allowed_client_type == o.allowed_client_type &&
278
300
  audit_logs_claims == o.audit_logs_claims &&
279
301
  bound_ips == o.bound_ips &&
302
+ child_ttl_limit == o.child_ttl_limit &&
280
303
  delete_protection == o.delete_protection &&
281
304
  deny_inheritance == o.deny_inheritance &&
282
305
  deny_rotate == o.deny_rotate &&
@@ -290,6 +313,7 @@ module Akeyless
290
313
  new_name == o.new_name &&
291
314
  product_type == o.product_type &&
292
315
  token == o.token &&
316
+ tree_length == o.tree_length &&
293
317
  ttl == o.ttl &&
294
318
  uid_token == o.uid_token
295
319
  end
@@ -303,7 +327,7 @@ module Akeyless
303
327
  # Calculates hash code according to all attributes.
304
328
  # @return [Integer] Hash code
305
329
  def hash
306
- [access_expires, allowed_client_type, audit_logs_claims, bound_ips, delete_protection, deny_inheritance, deny_rotate, description, expiration_event_in, force_sub_claims, gw_bound_ips, json, jwt_ttl, name, new_name, product_type, token, ttl, uid_token].hash
330
+ [access_expires, allowed_client_type, audit_logs_claims, bound_ips, child_ttl_limit, delete_protection, deny_inheritance, deny_rotate, description, expiration_event_in, force_sub_claims, gw_bound_ips, json, jwt_ttl, name, new_name, product_type, token, tree_length, ttl, uid_token].hash
307
331
  end
308
332
 
309
333
  # Builds the object from hash