akeyless 5.0.28 → 5.0.30

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 (159) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +49 -1
  3. data/docs/AccountGeneralSettings.md +4 -0
  4. data/docs/AnthropicTargetDetails.md +20 -0
  5. data/docs/AuthMethod.md +3 -1
  6. data/docs/AuthMethodAccessInfo.md +2 -0
  7. data/docs/AuthMethodCreateSAML.md +3 -1
  8. data/docs/AuthMethodCreateUniversalIdentity.md +2 -0
  9. data/docs/AuthMethodUpdateSAML.md +3 -1
  10. data/docs/AuthMethodUpdateUniversalIdentity.md +2 -0
  11. data/docs/BedrockTargetDetails.md +20 -0
  12. data/docs/CreateAuthMethodSAML.md +3 -1
  13. data/docs/CreateAuthMethodUniversalIdentity.md +2 -0
  14. data/docs/CreateDBTarget.md +2 -0
  15. data/docs/CreateMcpSecretBearerToken.md +46 -0
  16. data/docs/CreateMcpSecretOAuthAuthCode.md +56 -0
  17. data/docs/CreateMcpSecretOAuthClientCreds.md +52 -0
  18. data/docs/CreatePKICertIssuer.md +1 -1
  19. data/docs/CustomDnsTargetDetails.md +20 -0
  20. data/docs/DSProducerDetails.md +2 -0
  21. data/docs/DbTargetDetails.md +2 -0
  22. data/docs/EmailCustomization.md +28 -0
  23. data/docs/EmailCustomizationAccountInformation.md +24 -0
  24. data/docs/EmailCustomizationAccountInformationValues.md +24 -0
  25. data/docs/EsmGetSecretOutput.md +4 -0
  26. data/docs/FileDownloadInstructions.md +20 -0
  27. data/docs/FileInfo.md +50 -0
  28. data/docs/GatewayCreateMigration.md +2 -0
  29. data/docs/GatewayUpdateMigration.md +2 -0
  30. data/docs/GetKubeExecCreds.md +1 -1
  31. data/docs/GetPKICertificate.md +1 -1
  32. data/docs/GrokTargetDetails.md +22 -0
  33. data/docs/HashiPayload.md +2 -0
  34. data/docs/Item.md +2 -0
  35. data/docs/KeycloakTargetDetails.md +24 -0
  36. data/docs/OktaTargetDetails.md +20 -0
  37. data/docs/RuntimeAuthorityCommand.md +4 -0
  38. data/docs/SAMLAccessRules.md +3 -1
  39. data/docs/StaticSecretDetailsInfo.md +2 -0
  40. data/docs/TargetCreateAnthropic.md +36 -0
  41. data/docs/TargetCreateBedrock.md +36 -0
  42. data/docs/TargetCreateCustomDns.md +36 -0
  43. data/docs/TargetCreateDB.md +2 -0
  44. data/docs/TargetCreateGrok.md +38 -0
  45. data/docs/TargetCreateKeycloak.md +40 -0
  46. data/docs/TargetCreateOkta.md +36 -0
  47. data/docs/TargetTypeDetailsInput.md +12 -0
  48. data/docs/TargetUpdateAnthropic.md +42 -0
  49. data/docs/TargetUpdateBedrock.md +42 -0
  50. data/docs/TargetUpdateCustomDns.md +40 -0
  51. data/docs/TargetUpdateDB.md +2 -0
  52. data/docs/TargetUpdateGrok.md +44 -0
  53. data/docs/TargetUpdateKeycloak.md +44 -0
  54. data/docs/TargetUpdateOkta.md +40 -0
  55. data/docs/UidExpirationEvent.md +18 -0
  56. data/docs/UpdateAuthMethodSAML.md +3 -1
  57. data/docs/UpdateAuthMethodUniversalIdentity.md +2 -0
  58. data/docs/UpdateDBTarget.md +2 -0
  59. data/docs/UpdateMcpSecretBearerToken.md +40 -0
  60. data/docs/UpdateMcpSecretOAuthAuthCode.md +50 -0
  61. data/docs/UpdateMcpSecretOAuthClientCreds.md +46 -0
  62. data/docs/UpdatePKICertIssuer.md +1 -1
  63. data/docs/UscGetSecretOutput.md +4 -0
  64. data/docs/V2Api.md +1134 -0
  65. data/lib/akeyless/api/v2_api.rb +1249 -97
  66. data/lib/akeyless/models/account_general_settings.rb +20 -1
  67. data/lib/akeyless/models/anthropic_target_details.rb +224 -0
  68. data/lib/akeyless/models/auth_method.rb +15 -4
  69. data/lib/akeyless/models/auth_method_access_info.rb +13 -1
  70. data/lib/akeyless/models/auth_method_create_saml.rb +14 -4
  71. data/lib/akeyless/models/auth_method_create_universal_identity.rb +13 -1
  72. data/lib/akeyless/models/auth_method_update_saml.rb +14 -4
  73. data/lib/akeyless/models/auth_method_update_universal_identity.rb +13 -1
  74. data/lib/akeyless/models/bedrock_target_details.rb +224 -0
  75. data/lib/akeyless/models/create_auth_method_saml.rb +14 -4
  76. data/lib/akeyless/models/create_auth_method_universal_identity.rb +13 -1
  77. data/lib/akeyless/models/create_db_target.rb +11 -1
  78. data/lib/akeyless/models/create_mcp_secret_bearer_token.rb +371 -0
  79. data/lib/akeyless/models/create_mcp_secret_o_auth_auth_code.rb +423 -0
  80. data/lib/akeyless/models/create_mcp_secret_o_auth_client_creds.rb +403 -0
  81. data/lib/akeyless/models/create_pki_cert_issuer.rb +1 -1
  82. data/lib/akeyless/models/custom_dns_target_details.rb +225 -0
  83. data/lib/akeyless/models/db_target_details.rb +11 -1
  84. data/lib/akeyless/models/ds_producer_details.rb +11 -1
  85. data/lib/akeyless/models/email_customization.rb +259 -0
  86. data/lib/akeyless/models/email_customization_account_information.rb +242 -0
  87. data/lib/akeyless/models/email_customization_account_information_values.rb +241 -0
  88. data/lib/akeyless/models/esm_get_secret_output.rb +19 -1
  89. data/lib/akeyless/models/file_download_instructions.rb +223 -0
  90. data/lib/akeyless/models/file_info.rb +358 -0
  91. data/lib/akeyless/models/gateway_create_migration.rb +11 -1
  92. data/lib/akeyless/models/gateway_update_migration.rb +11 -1
  93. data/lib/akeyless/models/get_kube_exec_creds.rb +1 -1
  94. data/lib/akeyless/models/get_pki_certificate.rb +1 -1
  95. data/lib/akeyless/models/grok_target_details.rb +234 -0
  96. data/lib/akeyless/models/hashi_payload.rb +10 -1
  97. data/lib/akeyless/models/item.rb +10 -1
  98. data/lib/akeyless/models/keycloak_target_details.rb +242 -0
  99. data/lib/akeyless/models/okta_target_details.rb +224 -0
  100. data/lib/akeyless/models/runtime_authority_command.rb +21 -1
  101. data/lib/akeyless/models/saml_access_rules.rb +14 -4
  102. data/lib/akeyless/models/static_secret_details_info.rb +10 -1
  103. data/lib/akeyless/models/target_create_anthropic.rb +317 -0
  104. data/lib/akeyless/models/target_create_bedrock.rb +317 -0
  105. data/lib/akeyless/models/target_create_custom_dns.rb +330 -0
  106. data/lib/akeyless/models/target_create_db.rb +11 -1
  107. data/lib/akeyless/models/target_create_grok.rb +327 -0
  108. data/lib/akeyless/models/target_create_keycloak.rb +334 -0
  109. data/lib/akeyless/models/target_create_okta.rb +314 -0
  110. data/lib/akeyless/models/target_type_details_input.rb +55 -1
  111. data/lib/akeyless/models/target_update_anthropic.rb +351 -0
  112. data/lib/akeyless/models/target_update_bedrock.rb +351 -0
  113. data/lib/akeyless/models/target_update_custom_dns.rb +350 -0
  114. data/lib/akeyless/models/target_update_db.rb +11 -1
  115. data/lib/akeyless/models/target_update_grok.rb +361 -0
  116. data/lib/akeyless/models/target_update_keycloak.rb +354 -0
  117. data/lib/akeyless/models/target_update_okta.rb +334 -0
  118. data/lib/akeyless/models/uid_expiration_event.rb +214 -0
  119. data/lib/akeyless/models/update_auth_method_saml.rb +14 -4
  120. data/lib/akeyless/models/update_auth_method_universal_identity.rb +13 -1
  121. data/lib/akeyless/models/update_db_target.rb +11 -1
  122. data/lib/akeyless/models/update_mcp_secret_bearer_token.rb +338 -0
  123. data/lib/akeyless/models/update_mcp_secret_o_auth_auth_code.rb +390 -0
  124. data/lib/akeyless/models/update_mcp_secret_o_auth_client_creds.rb +370 -0
  125. data/lib/akeyless/models/update_pki_cert_issuer.rb +1 -1
  126. data/lib/akeyless/models/usc_get_secret_output.rb +19 -1
  127. data/lib/akeyless/version.rb +1 -1
  128. data/lib/akeyless.rb +30 -0
  129. data/spec/models/anthropic_target_details_spec.rb +42 -0
  130. data/spec/models/bedrock_target_details_spec.rb +42 -0
  131. data/spec/models/create_mcp_secret_bearer_token_spec.rb +120 -0
  132. data/spec/models/create_mcp_secret_o_auth_auth_code_spec.rb +150 -0
  133. data/spec/models/create_mcp_secret_o_auth_client_creds_spec.rb +138 -0
  134. data/spec/models/custom_dns_target_details_spec.rb +42 -0
  135. data/spec/models/email_customization_account_information_spec.rb +54 -0
  136. data/spec/models/email_customization_account_information_values_spec.rb +54 -0
  137. data/spec/models/email_customization_spec.rb +66 -0
  138. data/spec/models/file_download_instructions_spec.rb +42 -0
  139. data/spec/models/file_info_spec.rb +132 -0
  140. data/spec/models/grok_target_details_spec.rb +48 -0
  141. data/spec/models/keycloak_target_details_spec.rb +54 -0
  142. data/spec/models/okta_target_details_spec.rb +42 -0
  143. data/spec/models/target_create_anthropic_spec.rb +90 -0
  144. data/spec/models/target_create_bedrock_spec.rb +90 -0
  145. data/spec/models/target_create_custom_dns_spec.rb +90 -0
  146. data/spec/models/target_create_grok_spec.rb +96 -0
  147. data/spec/models/target_create_keycloak_spec.rb +102 -0
  148. data/spec/models/target_create_okta_spec.rb +90 -0
  149. data/spec/models/target_update_anthropic_spec.rb +108 -0
  150. data/spec/models/target_update_bedrock_spec.rb +108 -0
  151. data/spec/models/target_update_custom_dns_spec.rb +102 -0
  152. data/spec/models/target_update_grok_spec.rb +114 -0
  153. data/spec/models/target_update_keycloak_spec.rb +114 -0
  154. data/spec/models/target_update_okta_spec.rb +102 -0
  155. data/spec/models/uid_expiration_event_spec.rb +36 -0
  156. data/spec/models/update_mcp_secret_bearer_token_spec.rb +102 -0
  157. data/spec/models/update_mcp_secret_o_auth_auth_code_spec.rb +132 -0
  158. data/spec/models/update_mcp_secret_o_auth_client_creds_spec.rb +120 -0
  159. metadata +1295 -1175
@@ -0,0 +1,354 @@
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 TargetUpdateKeycloak
18
+ # Keycloak service account client ID
19
+ attr_accessor :client_id
20
+
21
+ # Keycloak service account client secret
22
+ attr_accessor :client_secret
23
+
24
+ # Protection from accidental deletion of this object [true/false]
25
+ attr_accessor :delete_protection
26
+
27
+ # Description of the object
28
+ attr_accessor :description
29
+
30
+ # Set output format to JSON
31
+ attr_accessor :json
32
+
33
+ # Whether to keep previous version [true/false]. If not set, use default according to account settings
34
+ attr_accessor :keep_prev_version
35
+
36
+ # The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
37
+ attr_accessor :key
38
+
39
+ # Set the maximum number of versions, limited by the account settings defaults.
40
+ attr_accessor :max_versions
41
+
42
+ # Target name
43
+ attr_accessor :name
44
+
45
+ # New target name
46
+ attr_accessor :new_name
47
+
48
+ # Keycloak realm
49
+ attr_accessor :realm
50
+
51
+ # Authentication token (see `/auth` and `/configure`)
52
+ attr_accessor :token
53
+
54
+ # The universal identity token, Required only for universal_identity authentication
55
+ attr_accessor :uid_token
56
+
57
+ # Keycloak URL
58
+ attr_accessor :url
59
+
60
+ # Attribute mapping from ruby-style variable name to JSON key.
61
+ def self.attribute_map
62
+ {
63
+ :'client_id' => :'client-id',
64
+ :'client_secret' => :'client-secret',
65
+ :'delete_protection' => :'delete_protection',
66
+ :'description' => :'description',
67
+ :'json' => :'json',
68
+ :'keep_prev_version' => :'keep-prev-version',
69
+ :'key' => :'key',
70
+ :'max_versions' => :'max-versions',
71
+ :'name' => :'name',
72
+ :'new_name' => :'new-name',
73
+ :'realm' => :'realm',
74
+ :'token' => :'token',
75
+ :'uid_token' => :'uid-token',
76
+ :'url' => :'url'
77
+ }
78
+ end
79
+
80
+ # Returns all the JSON keys this model knows about
81
+ def self.acceptable_attributes
82
+ attribute_map.values
83
+ end
84
+
85
+ # Attribute type mapping.
86
+ def self.openapi_types
87
+ {
88
+ :'client_id' => :'String',
89
+ :'client_secret' => :'String',
90
+ :'delete_protection' => :'String',
91
+ :'description' => :'String',
92
+ :'json' => :'Boolean',
93
+ :'keep_prev_version' => :'String',
94
+ :'key' => :'String',
95
+ :'max_versions' => :'String',
96
+ :'name' => :'String',
97
+ :'new_name' => :'String',
98
+ :'realm' => :'String',
99
+ :'token' => :'String',
100
+ :'uid_token' => :'String',
101
+ :'url' => :'String'
102
+ }
103
+ end
104
+
105
+ # List of attributes with nullable: true
106
+ def self.openapi_nullable
107
+ Set.new([
108
+ ])
109
+ end
110
+
111
+ # Initializes the object
112
+ # @param [Hash] attributes Model attributes in the form of hash
113
+ def initialize(attributes = {})
114
+ if (!attributes.is_a?(Hash))
115
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::TargetUpdateKeycloak` initialize method"
116
+ end
117
+
118
+ # check to see if the attribute exists and convert string to symbol for hash key
119
+ attributes = attributes.each_with_object({}) { |(k, v), h|
120
+ if (!self.class.attribute_map.key?(k.to_sym))
121
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::TargetUpdateKeycloak`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
122
+ end
123
+ h[k.to_sym] = v
124
+ }
125
+
126
+ if attributes.key?(:'client_id')
127
+ self.client_id = attributes[:'client_id']
128
+ end
129
+
130
+ if attributes.key?(:'client_secret')
131
+ self.client_secret = attributes[:'client_secret']
132
+ end
133
+
134
+ if attributes.key?(:'delete_protection')
135
+ self.delete_protection = attributes[:'delete_protection']
136
+ end
137
+
138
+ if attributes.key?(:'description')
139
+ self.description = attributes[:'description']
140
+ end
141
+
142
+ if attributes.key?(:'json')
143
+ self.json = attributes[:'json']
144
+ else
145
+ self.json = false
146
+ end
147
+
148
+ if attributes.key?(:'keep_prev_version')
149
+ self.keep_prev_version = attributes[:'keep_prev_version']
150
+ end
151
+
152
+ if attributes.key?(:'key')
153
+ self.key = attributes[:'key']
154
+ end
155
+
156
+ if attributes.key?(:'max_versions')
157
+ self.max_versions = attributes[:'max_versions']
158
+ end
159
+
160
+ if attributes.key?(:'name')
161
+ self.name = attributes[:'name']
162
+ else
163
+ self.name = nil
164
+ end
165
+
166
+ if attributes.key?(:'new_name')
167
+ self.new_name = attributes[:'new_name']
168
+ end
169
+
170
+ if attributes.key?(:'realm')
171
+ self.realm = attributes[:'realm']
172
+ end
173
+
174
+ if attributes.key?(:'token')
175
+ self.token = attributes[:'token']
176
+ end
177
+
178
+ if attributes.key?(:'uid_token')
179
+ self.uid_token = attributes[:'uid_token']
180
+ end
181
+
182
+ if attributes.key?(:'url')
183
+ self.url = attributes[:'url']
184
+ end
185
+ end
186
+
187
+ # Show invalid properties with the reasons. Usually used together with valid?
188
+ # @return Array for valid properties with the reasons
189
+ def list_invalid_properties
190
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
191
+ invalid_properties = Array.new
192
+ if @name.nil?
193
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
194
+ end
195
+
196
+ invalid_properties
197
+ end
198
+
199
+ # Check to see if the all the properties in the model are valid
200
+ # @return true if the model is valid
201
+ def valid?
202
+ warn '[DEPRECATED] the `valid?` method is obsolete'
203
+ return false if @name.nil?
204
+ true
205
+ end
206
+
207
+ # Checks equality by comparing each attribute.
208
+ # @param [Object] Object to be compared
209
+ def ==(o)
210
+ return true if self.equal?(o)
211
+ self.class == o.class &&
212
+ client_id == o.client_id &&
213
+ client_secret == o.client_secret &&
214
+ delete_protection == o.delete_protection &&
215
+ description == o.description &&
216
+ json == o.json &&
217
+ keep_prev_version == o.keep_prev_version &&
218
+ key == o.key &&
219
+ max_versions == o.max_versions &&
220
+ name == o.name &&
221
+ new_name == o.new_name &&
222
+ realm == o.realm &&
223
+ token == o.token &&
224
+ uid_token == o.uid_token &&
225
+ url == o.url
226
+ end
227
+
228
+ # @see the `==` method
229
+ # @param [Object] Object to be compared
230
+ def eql?(o)
231
+ self == o
232
+ end
233
+
234
+ # Calculates hash code according to all attributes.
235
+ # @return [Integer] Hash code
236
+ def hash
237
+ [client_id, client_secret, delete_protection, description, json, keep_prev_version, key, max_versions, name, new_name, realm, token, uid_token, url].hash
238
+ end
239
+
240
+ # Builds the object from hash
241
+ # @param [Hash] attributes Model attributes in the form of hash
242
+ # @return [Object] Returns the model itself
243
+ def self.build_from_hash(attributes)
244
+ return nil unless attributes.is_a?(Hash)
245
+ attributes = attributes.transform_keys(&:to_sym)
246
+ transformed_hash = {}
247
+ openapi_types.each_pair do |key, type|
248
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
249
+ transformed_hash["#{key}"] = nil
250
+ elsif type =~ /\AArray<(.*)>/i
251
+ # check to ensure the input is an array given that the attribute
252
+ # is documented as an array but the input is not
253
+ if attributes[attribute_map[key]].is_a?(Array)
254
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
255
+ end
256
+ elsif !attributes[attribute_map[key]].nil?
257
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
258
+ end
259
+ end
260
+ new(transformed_hash)
261
+ end
262
+
263
+ # Deserializes the data based on type
264
+ # @param string type Data type
265
+ # @param string value Value to be deserialized
266
+ # @return [Object] Deserialized data
267
+ def self._deserialize(type, value)
268
+ case type.to_sym
269
+ when :Time
270
+ Time.parse(value)
271
+ when :Date
272
+ Date.parse(value)
273
+ when :String
274
+ value.to_s
275
+ when :Integer
276
+ value.to_i
277
+ when :Float
278
+ value.to_f
279
+ when :Boolean
280
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
281
+ true
282
+ else
283
+ false
284
+ end
285
+ when :Object
286
+ # generic object (usually a Hash), return directly
287
+ value
288
+ when /\AArray<(?<inner_type>.+)>\z/
289
+ inner_type = Regexp.last_match[:inner_type]
290
+ value.map { |v| _deserialize(inner_type, v) }
291
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
292
+ k_type = Regexp.last_match[:k_type]
293
+ v_type = Regexp.last_match[:v_type]
294
+ {}.tap do |hash|
295
+ value.each do |k, v|
296
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
297
+ end
298
+ end
299
+ else # model
300
+ # models (e.g. Pet) or oneOf
301
+ klass = Akeyless.const_get(type)
302
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
303
+ end
304
+ end
305
+
306
+ # Returns the string representation of the object
307
+ # @return [String] String presentation of the object
308
+ def to_s
309
+ to_hash.to_s
310
+ end
311
+
312
+ # to_body is an alias to to_hash (backward compatibility)
313
+ # @return [Hash] Returns the object in the form of hash
314
+ def to_body
315
+ to_hash
316
+ end
317
+
318
+ # Returns the object in the form of hash
319
+ # @return [Hash] Returns the object in the form of hash
320
+ def to_hash
321
+ hash = {}
322
+ self.class.attribute_map.each_pair do |attr, param|
323
+ value = self.send(attr)
324
+ if value.nil?
325
+ is_nullable = self.class.openapi_nullable.include?(attr)
326
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
327
+ end
328
+
329
+ hash[param] = _to_hash(value)
330
+ end
331
+ hash
332
+ end
333
+
334
+ # Outputs non-array value in the form of hash
335
+ # For object, use to_hash. Otherwise, just return the value
336
+ # @param [Object] value Any valid value
337
+ # @return [Hash] Returns the value in the form of hash
338
+ def _to_hash(value)
339
+ if value.is_a?(Array)
340
+ value.compact.map { |v| _to_hash(v) }
341
+ elsif value.is_a?(Hash)
342
+ {}.tap do |hash|
343
+ value.each { |k, v| hash[k] = _to_hash(v) }
344
+ end
345
+ elsif value.respond_to? :to_hash
346
+ value.to_hash
347
+ else
348
+ value
349
+ end
350
+ end
351
+
352
+ end
353
+
354
+ end
@@ -0,0 +1,334 @@
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 TargetUpdateOkta
18
+ # Okta API token
19
+ attr_accessor :api_token
20
+
21
+ # Protection from accidental deletion of this object [true/false]
22
+ attr_accessor :delete_protection
23
+
24
+ # Description of the object
25
+ attr_accessor :description
26
+
27
+ # Set output format to JSON
28
+ attr_accessor :json
29
+
30
+ # Whether to keep previous version [true/false]. If not set, use default according to account settings
31
+ attr_accessor :keep_prev_version
32
+
33
+ # The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
34
+ attr_accessor :key
35
+
36
+ # Set the maximum number of versions, limited by the account settings defaults.
37
+ attr_accessor :max_versions
38
+
39
+ # Target name
40
+ attr_accessor :name
41
+
42
+ # New target name
43
+ attr_accessor :new_name
44
+
45
+ # Authentication token (see `/auth` and `/configure`)
46
+ attr_accessor :token
47
+
48
+ # The universal identity token, Required only for universal_identity authentication
49
+ attr_accessor :uid_token
50
+
51
+ # Okta URL
52
+ attr_accessor :url
53
+
54
+ # Attribute mapping from ruby-style variable name to JSON key.
55
+ def self.attribute_map
56
+ {
57
+ :'api_token' => :'api-token',
58
+ :'delete_protection' => :'delete_protection',
59
+ :'description' => :'description',
60
+ :'json' => :'json',
61
+ :'keep_prev_version' => :'keep-prev-version',
62
+ :'key' => :'key',
63
+ :'max_versions' => :'max-versions',
64
+ :'name' => :'name',
65
+ :'new_name' => :'new-name',
66
+ :'token' => :'token',
67
+ :'uid_token' => :'uid-token',
68
+ :'url' => :'url'
69
+ }
70
+ end
71
+
72
+ # Returns all the JSON keys this model knows about
73
+ def self.acceptable_attributes
74
+ attribute_map.values
75
+ end
76
+
77
+ # Attribute type mapping.
78
+ def self.openapi_types
79
+ {
80
+ :'api_token' => :'String',
81
+ :'delete_protection' => :'String',
82
+ :'description' => :'String',
83
+ :'json' => :'Boolean',
84
+ :'keep_prev_version' => :'String',
85
+ :'key' => :'String',
86
+ :'max_versions' => :'String',
87
+ :'name' => :'String',
88
+ :'new_name' => :'String',
89
+ :'token' => :'String',
90
+ :'uid_token' => :'String',
91
+ :'url' => :'String'
92
+ }
93
+ end
94
+
95
+ # List of attributes with nullable: true
96
+ def self.openapi_nullable
97
+ Set.new([
98
+ ])
99
+ end
100
+
101
+ # Initializes the object
102
+ # @param [Hash] attributes Model attributes in the form of hash
103
+ def initialize(attributes = {})
104
+ if (!attributes.is_a?(Hash))
105
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::TargetUpdateOkta` initialize method"
106
+ end
107
+
108
+ # check to see if the attribute exists and convert string to symbol for hash key
109
+ attributes = attributes.each_with_object({}) { |(k, v), h|
110
+ if (!self.class.attribute_map.key?(k.to_sym))
111
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::TargetUpdateOkta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
112
+ end
113
+ h[k.to_sym] = v
114
+ }
115
+
116
+ if attributes.key?(:'api_token')
117
+ self.api_token = attributes[:'api_token']
118
+ end
119
+
120
+ if attributes.key?(:'delete_protection')
121
+ self.delete_protection = attributes[:'delete_protection']
122
+ end
123
+
124
+ if attributes.key?(:'description')
125
+ self.description = attributes[:'description']
126
+ end
127
+
128
+ if attributes.key?(:'json')
129
+ self.json = attributes[:'json']
130
+ else
131
+ self.json = false
132
+ end
133
+
134
+ if attributes.key?(:'keep_prev_version')
135
+ self.keep_prev_version = attributes[:'keep_prev_version']
136
+ end
137
+
138
+ if attributes.key?(:'key')
139
+ self.key = attributes[:'key']
140
+ end
141
+
142
+ if attributes.key?(:'max_versions')
143
+ self.max_versions = attributes[:'max_versions']
144
+ end
145
+
146
+ if attributes.key?(:'name')
147
+ self.name = attributes[:'name']
148
+ else
149
+ self.name = nil
150
+ end
151
+
152
+ if attributes.key?(:'new_name')
153
+ self.new_name = attributes[:'new_name']
154
+ end
155
+
156
+ if attributes.key?(:'token')
157
+ self.token = attributes[:'token']
158
+ end
159
+
160
+ if attributes.key?(:'uid_token')
161
+ self.uid_token = attributes[:'uid_token']
162
+ end
163
+
164
+ if attributes.key?(:'url')
165
+ self.url = attributes[:'url']
166
+ end
167
+ end
168
+
169
+ # Show invalid properties with the reasons. Usually used together with valid?
170
+ # @return Array for valid properties with the reasons
171
+ def list_invalid_properties
172
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
173
+ invalid_properties = Array.new
174
+ if @name.nil?
175
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
176
+ end
177
+
178
+ invalid_properties
179
+ end
180
+
181
+ # Check to see if the all the properties in the model are valid
182
+ # @return true if the model is valid
183
+ def valid?
184
+ warn '[DEPRECATED] the `valid?` method is obsolete'
185
+ return false if @name.nil?
186
+ true
187
+ end
188
+
189
+ # Checks equality by comparing each attribute.
190
+ # @param [Object] Object to be compared
191
+ def ==(o)
192
+ return true if self.equal?(o)
193
+ self.class == o.class &&
194
+ api_token == o.api_token &&
195
+ delete_protection == o.delete_protection &&
196
+ description == o.description &&
197
+ json == o.json &&
198
+ keep_prev_version == o.keep_prev_version &&
199
+ key == o.key &&
200
+ max_versions == o.max_versions &&
201
+ name == o.name &&
202
+ new_name == o.new_name &&
203
+ token == o.token &&
204
+ uid_token == o.uid_token &&
205
+ url == o.url
206
+ end
207
+
208
+ # @see the `==` method
209
+ # @param [Object] Object to be compared
210
+ def eql?(o)
211
+ self == o
212
+ end
213
+
214
+ # Calculates hash code according to all attributes.
215
+ # @return [Integer] Hash code
216
+ def hash
217
+ [api_token, delete_protection, description, json, keep_prev_version, key, max_versions, name, new_name, token, uid_token, url].hash
218
+ end
219
+
220
+ # Builds the object from hash
221
+ # @param [Hash] attributes Model attributes in the form of hash
222
+ # @return [Object] Returns the model itself
223
+ def self.build_from_hash(attributes)
224
+ return nil unless attributes.is_a?(Hash)
225
+ attributes = attributes.transform_keys(&:to_sym)
226
+ transformed_hash = {}
227
+ openapi_types.each_pair do |key, type|
228
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
229
+ transformed_hash["#{key}"] = nil
230
+ elsif type =~ /\AArray<(.*)>/i
231
+ # check to ensure the input is an array given that the attribute
232
+ # is documented as an array but the input is not
233
+ if attributes[attribute_map[key]].is_a?(Array)
234
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
235
+ end
236
+ elsif !attributes[attribute_map[key]].nil?
237
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
238
+ end
239
+ end
240
+ new(transformed_hash)
241
+ end
242
+
243
+ # Deserializes the data based on type
244
+ # @param string type Data type
245
+ # @param string value Value to be deserialized
246
+ # @return [Object] Deserialized data
247
+ def self._deserialize(type, value)
248
+ case type.to_sym
249
+ when :Time
250
+ Time.parse(value)
251
+ when :Date
252
+ Date.parse(value)
253
+ when :String
254
+ value.to_s
255
+ when :Integer
256
+ value.to_i
257
+ when :Float
258
+ value.to_f
259
+ when :Boolean
260
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
261
+ true
262
+ else
263
+ false
264
+ end
265
+ when :Object
266
+ # generic object (usually a Hash), return directly
267
+ value
268
+ when /\AArray<(?<inner_type>.+)>\z/
269
+ inner_type = Regexp.last_match[:inner_type]
270
+ value.map { |v| _deserialize(inner_type, v) }
271
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
272
+ k_type = Regexp.last_match[:k_type]
273
+ v_type = Regexp.last_match[:v_type]
274
+ {}.tap do |hash|
275
+ value.each do |k, v|
276
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
277
+ end
278
+ end
279
+ else # model
280
+ # models (e.g. Pet) or oneOf
281
+ klass = Akeyless.const_get(type)
282
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
283
+ end
284
+ end
285
+
286
+ # Returns the string representation of the object
287
+ # @return [String] String presentation of the object
288
+ def to_s
289
+ to_hash.to_s
290
+ end
291
+
292
+ # to_body is an alias to to_hash (backward compatibility)
293
+ # @return [Hash] Returns the object in the form of hash
294
+ def to_body
295
+ to_hash
296
+ end
297
+
298
+ # Returns the object in the form of hash
299
+ # @return [Hash] Returns the object in the form of hash
300
+ def to_hash
301
+ hash = {}
302
+ self.class.attribute_map.each_pair do |attr, param|
303
+ value = self.send(attr)
304
+ if value.nil?
305
+ is_nullable = self.class.openapi_nullable.include?(attr)
306
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
307
+ end
308
+
309
+ hash[param] = _to_hash(value)
310
+ end
311
+ hash
312
+ end
313
+
314
+ # Outputs non-array value in the form of hash
315
+ # For object, use to_hash. Otherwise, just return the value
316
+ # @param [Object] value Any valid value
317
+ # @return [Hash] Returns the value in the form of hash
318
+ def _to_hash(value)
319
+ if value.is_a?(Array)
320
+ value.compact.map { |v| _to_hash(v) }
321
+ elsif value.is_a?(Hash)
322
+ {}.tap do |hash|
323
+ value.each { |k, v| hash[k] = _to_hash(v) }
324
+ end
325
+ elsif value.respond_to? :to_hash
326
+ value.to_hash
327
+ else
328
+ value
329
+ end
330
+ end
331
+
332
+ end
333
+
334
+ end