akeyless 5.0.38 → 5.0.39

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 (108) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +13 -2
  3. data/docs/AssocTargetItem.md +5 -1
  4. data/docs/ClientEvent.md +26 -0
  5. data/docs/ClientEventOutput.md +18 -0
  6. data/docs/Connect.md +2 -0
  7. data/docs/CreateEventForwarder.md +1 -1
  8. data/docs/CreateLdapTarget.md +3 -1
  9. data/docs/CreatePKICertIssuer.md +6 -0
  10. data/docs/DSProducerDetails.md +2 -0
  11. data/docs/DigiCertTargetDetails.md +8 -0
  12. data/docs/EventForwarderCreateEmail.md +1 -1
  13. data/docs/EventForwarderCreateServiceNow.md +1 -1
  14. data/docs/EventForwarderCreateSlack.md +1 -1
  15. data/docs/EventForwarderCreateTeams.md +1 -1
  16. data/docs/EventForwarderCreateWebhook.md +1 -1
  17. data/docs/EventForwarderUpdateEmail.md +1 -1
  18. data/docs/EventForwarderUpdateServiceNow.md +1 -1
  19. data/docs/EventForwarderUpdateSlack.md +1 -1
  20. data/docs/EventForwarderUpdateTeams.md +1 -1
  21. data/docs/EventForwarderUpdateWebhook.md +1 -1
  22. data/docs/GatewayCreateAllowedAccess.md +1 -1
  23. data/docs/GatewayUpdateAllowedAccess.md +1 -1
  24. data/docs/GenerateIntermediateCA.md +48 -0
  25. data/docs/GenerateIntermediateCAOutput.md +26 -0
  26. data/docs/GoogleTrustTargetDetails.md +8 -0
  27. data/docs/InjectorCertificateEvent.md +28 -0
  28. data/docs/Item.md +2 -0
  29. data/docs/LdapTargetDetails.md +3 -1
  30. data/docs/LetsEncryptTargetDetails.md +8 -0
  31. data/docs/ListSRASessions.md +2 -0
  32. data/docs/ListSraSessionsOutput.md +3 -3
  33. data/docs/LockItem.md +1 -1
  34. data/docs/MigrationGeneral.md +6 -0
  35. data/docs/PKICertificateIssueDetails.md +4 -0
  36. data/docs/RequestAccess.md +2 -0
  37. data/docs/RotatedSecretCreateOkta.md +82 -0
  38. data/docs/RotatedSecretUpdateOkta.md +84 -0
  39. data/docs/Target.md +2 -0
  40. data/docs/TargetCreateDigiCert.md +8 -0
  41. data/docs/TargetCreateGoogleTrust.md +8 -0
  42. data/docs/TargetCreateLdap.md +3 -1
  43. data/docs/TargetCreateLetsEncrypt.md +8 -0
  44. data/docs/TargetUpdateDigiCert.md +8 -0
  45. data/docs/TargetUpdateGoogleTrust.md +8 -0
  46. data/docs/TargetUpdateLdap.md +3 -1
  47. data/docs/TargetUpdateLetsEncrypt.md +8 -0
  48. data/docs/UpdateLdapTarget.md +3 -1
  49. data/docs/UpdatePKICertIssuer.md +6 -0
  50. data/docs/V2Api.md +257 -3
  51. data/lib/akeyless/api/v2_api.rb +260 -0
  52. data/lib/akeyless/models/assoc_target_item.rb +24 -2
  53. data/lib/akeyless/models/client_event.rb +256 -0
  54. data/lib/akeyless/models/client_event_output.rb +214 -0
  55. data/lib/akeyless/models/connect.rb +11 -1
  56. data/lib/akeyless/models/create_event_forwarder.rb +1 -1
  57. data/lib/akeyless/models/create_ldap_target.rb +14 -4
  58. data/lib/akeyless/models/create_pki_cert_issuer.rb +31 -1
  59. data/lib/akeyless/models/digi_cert_target_details.rb +43 -1
  60. data/lib/akeyless/models/ds_producer_details.rb +10 -1
  61. data/lib/akeyless/models/event_forwarder_create_email.rb +1 -1
  62. data/lib/akeyless/models/event_forwarder_create_service_now.rb +1 -1
  63. data/lib/akeyless/models/event_forwarder_create_slack.rb +1 -1
  64. data/lib/akeyless/models/event_forwarder_create_teams.rb +1 -1
  65. data/lib/akeyless/models/event_forwarder_create_webhook.rb +1 -1
  66. data/lib/akeyless/models/event_forwarder_update_email.rb +1 -1
  67. data/lib/akeyless/models/event_forwarder_update_service_now.rb +1 -1
  68. data/lib/akeyless/models/event_forwarder_update_slack.rb +1 -1
  69. data/lib/akeyless/models/event_forwarder_update_teams.rb +1 -1
  70. data/lib/akeyless/models/event_forwarder_update_webhook.rb +1 -1
  71. data/lib/akeyless/models/gateway_create_allowed_access.rb +1 -1
  72. data/lib/akeyless/models/gateway_update_allowed_access.rb +1 -1
  73. data/lib/akeyless/models/generate_intermediate_ca.rb +379 -0
  74. data/lib/akeyless/models/generate_intermediate_ca_output.rb +250 -0
  75. data/lib/akeyless/models/google_trust_target_details.rb +43 -1
  76. data/lib/akeyless/models/injector_certificate_event.rb +259 -0
  77. data/lib/akeyless/models/item.rb +10 -1
  78. data/lib/akeyless/models/ldap_target_details.rb +13 -4
  79. data/lib/akeyless/models/lets_encrypt_target_details.rb +43 -1
  80. data/lib/akeyless/models/list_sra_sessions.rb +12 -2
  81. data/lib/akeyless/models/list_sra_sessions_output.rb +3 -0
  82. data/lib/akeyless/models/lock_item.rb +1 -1
  83. data/lib/akeyless/models/migration_general.rb +28 -1
  84. data/lib/akeyless/models/pki_certificate_issue_details.rb +21 -1
  85. data/lib/akeyless/models/request_access.rb +11 -1
  86. data/lib/akeyless/models/rotated_secret_create_okta.rb +556 -0
  87. data/lib/akeyless/models/rotated_secret_update_okta.rb +563 -0
  88. data/lib/akeyless/models/target.rb +10 -1
  89. data/lib/akeyless/models/target_create_digi_cert.rb +43 -1
  90. data/lib/akeyless/models/target_create_google_trust.rb +43 -1
  91. data/lib/akeyless/models/target_create_ldap.rb +14 -4
  92. data/lib/akeyless/models/target_create_lets_encrypt.rb +43 -1
  93. data/lib/akeyless/models/target_update_digi_cert.rb +43 -1
  94. data/lib/akeyless/models/target_update_google_trust.rb +43 -1
  95. data/lib/akeyless/models/target_update_ldap.rb +14 -4
  96. data/lib/akeyless/models/target_update_lets_encrypt.rb +43 -1
  97. data/lib/akeyless/models/update_ldap_target.rb +14 -4
  98. data/lib/akeyless/models/update_pki_cert_issuer.rb +31 -1
  99. data/lib/akeyless/version.rb +1 -1
  100. data/lib/akeyless.rb +7 -0
  101. data/spec/models/client_event_output_spec.rb +36 -0
  102. data/spec/models/client_event_spec.rb +60 -0
  103. data/spec/models/generate_intermediate_ca_output_spec.rb +60 -0
  104. data/spec/models/generate_intermediate_ca_spec.rb +126 -0
  105. data/spec/models/injector_certificate_event_spec.rb +66 -0
  106. data/spec/models/rotated_secret_create_okta_spec.rb +228 -0
  107. data/spec/models/rotated_secret_update_okta_spec.rb +234 -0
  108. metadata +30 -2
@@ -0,0 +1,556 @@
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 RotatedSecretCreateOkta
18
+ # Enable or disable Agentic Runtime Authority rule enforcement for this item. When false, user-defined input/output rules are stored but not enforced; the base security validation still runs. AraEnabled is tri-state (nil/true/false), not a plain bool: it self-encodes its wire value (see akl.OptionalBool) so an explicit false survives the curl-proxy relay instead of being dropped like a default-false bool flag.
19
+ attr_accessor :ara_enabled
20
+
21
+ # Okta uses the SSWS token from the target.
22
+ attr_accessor :authentication_credentials
23
+
24
+ attr_accessor :auto_rotate
25
+
26
+ # Protection from accidental deletion of this object [true/false]
27
+ attr_accessor :delete_protection
28
+
29
+ # Description of the object.
30
+ attr_accessor :description
31
+
32
+ # EnableAra is the documented spelling of AraEnabled. Both set the same field; --ara-enabled shipped first and stays as an undocumented alias so existing scripts and the Terraform provider keep working.
33
+ attr_accessor :enable_agentic_runtime_authority
34
+
35
+ # Turns on AI Quorum checks for this item.
36
+ attr_accessor :enable_ai_quorum
37
+
38
+ # Agentic input rule in name=...,rule=... format (e.g. name=rule1,rule=Sanitize input)
39
+ attr_accessor :input_rule
40
+
41
+ # Additional custom fields to associate with the item
42
+ attr_accessor :item_custom_fields
43
+
44
+ # Set output format to JSON
45
+ attr_accessor :json
46
+
47
+ attr_accessor :key
48
+
49
+ # Lock this secret after each successful value read
50
+ attr_accessor :lock_on_read
51
+
52
+ # Lock TTL in minutes
53
+ attr_accessor :lock_ttl
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
+ # Agentic output rule in name=...,rule=... format (e.g. name=rule1,rule=Mask secrets)
62
+ attr_accessor :output_rule
63
+
64
+ # The length of the password to be generated
65
+ attr_accessor :password_length
66
+
67
+ # Rotate this secret after it is unlocked
68
+ attr_accessor :rotate_on_unlock
69
+
70
+ # rotated-username password (relevant only for rotator-type=password)
71
+ attr_accessor :rotated_password
72
+
73
+ # username to be rotated, if selected use-self-creds at rotator-creds-type, this username will try to rotate it's own password, if use-target-creds is selected, target credentials will be use to rotate the rotated-password (relevant only for rotator-type=password)
74
+ attr_accessor :rotated_username
75
+
76
+ # How many days before the rotation of the item would you like to be notified
77
+ attr_accessor :rotation_event_in
78
+
79
+ attr_accessor :rotation_hour
80
+
81
+ attr_accessor :rotation_interval
82
+
83
+ # The Okta rotator supports only password.
84
+ attr_accessor :rotator_type
85
+
86
+ # If set, dry-run will be skipped [true/false]
87
+ attr_accessor :skip_dry_run
88
+
89
+ # Add tags attached to this object
90
+ attr_accessor :tags
91
+
92
+ # The Okta target name to associate.
93
+ attr_accessor :target_name
94
+
95
+ # Authentication token (see `/auth` and `/configure`)
96
+ attr_accessor :token
97
+
98
+ # The universal identity token, Required only for universal_identity authentication
99
+ attr_accessor :uid_token
100
+
101
+ # Specifies whether the generated temporary password must contain at least one uppercase character from the ISO basic Latin alphabet (A to Z). [true/false]
102
+ attr_accessor :use_capital_letters
103
+
104
+ # Specifies whether the generated temporary password must contain at least one lowercase character from the ISO basic Latin alphabet (a to z). [true/false]
105
+ attr_accessor :use_lower_letters
106
+
107
+ # Specifies whether the generated temporary password must contain at least one numeric character (0 to 9). [true/false]
108
+ attr_accessor :use_numbers
109
+
110
+ attr_accessor :use_special_characters
111
+
112
+ # Attribute mapping from ruby-style variable name to JSON key.
113
+ def self.attribute_map
114
+ {
115
+ :'ara_enabled' => :'ara-enabled',
116
+ :'authentication_credentials' => :'authentication-credentials',
117
+ :'auto_rotate' => :'auto-rotate',
118
+ :'delete_protection' => :'delete_protection',
119
+ :'description' => :'description',
120
+ :'enable_agentic_runtime_authority' => :'enable-agentic-runtime-authority',
121
+ :'enable_ai_quorum' => :'enable-ai-quorum',
122
+ :'input_rule' => :'input-rule',
123
+ :'item_custom_fields' => :'item-custom-fields',
124
+ :'json' => :'json',
125
+ :'key' => :'key',
126
+ :'lock_on_read' => :'lock-on-read',
127
+ :'lock_ttl' => :'lock-ttl',
128
+ :'max_versions' => :'max-versions',
129
+ :'name' => :'name',
130
+ :'output_rule' => :'output-rule',
131
+ :'password_length' => :'password-length',
132
+ :'rotate_on_unlock' => :'rotate-on-unlock',
133
+ :'rotated_password' => :'rotated-password',
134
+ :'rotated_username' => :'rotated-username',
135
+ :'rotation_event_in' => :'rotation-event-in',
136
+ :'rotation_hour' => :'rotation-hour',
137
+ :'rotation_interval' => :'rotation-interval',
138
+ :'rotator_type' => :'rotator-type',
139
+ :'skip_dry_run' => :'skip-dry-run',
140
+ :'tags' => :'tags',
141
+ :'target_name' => :'target-name',
142
+ :'token' => :'token',
143
+ :'uid_token' => :'uid-token',
144
+ :'use_capital_letters' => :'use-capital-letters',
145
+ :'use_lower_letters' => :'use-lower-letters',
146
+ :'use_numbers' => :'use-numbers',
147
+ :'use_special_characters' => :'use-special-characters'
148
+ }
149
+ end
150
+
151
+ # Returns all the JSON keys this model knows about
152
+ def self.acceptable_attributes
153
+ attribute_map.values
154
+ end
155
+
156
+ # Attribute type mapping.
157
+ def self.openapi_types
158
+ {
159
+ :'ara_enabled' => :'Boolean',
160
+ :'authentication_credentials' => :'String',
161
+ :'auto_rotate' => :'String',
162
+ :'delete_protection' => :'String',
163
+ :'description' => :'String',
164
+ :'enable_agentic_runtime_authority' => :'Boolean',
165
+ :'enable_ai_quorum' => :'Boolean',
166
+ :'input_rule' => :'Array<String>',
167
+ :'item_custom_fields' => :'Hash<String, String>',
168
+ :'json' => :'Boolean',
169
+ :'key' => :'String',
170
+ :'lock_on_read' => :'String',
171
+ :'lock_ttl' => :'String',
172
+ :'max_versions' => :'String',
173
+ :'name' => :'String',
174
+ :'output_rule' => :'Array<String>',
175
+ :'password_length' => :'String',
176
+ :'rotate_on_unlock' => :'String',
177
+ :'rotated_password' => :'String',
178
+ :'rotated_username' => :'String',
179
+ :'rotation_event_in' => :'Array<String>',
180
+ :'rotation_hour' => :'Integer',
181
+ :'rotation_interval' => :'String',
182
+ :'rotator_type' => :'String',
183
+ :'skip_dry_run' => :'Boolean',
184
+ :'tags' => :'Array<String>',
185
+ :'target_name' => :'String',
186
+ :'token' => :'String',
187
+ :'uid_token' => :'String',
188
+ :'use_capital_letters' => :'String',
189
+ :'use_lower_letters' => :'String',
190
+ :'use_numbers' => :'String',
191
+ :'use_special_characters' => :'String'
192
+ }
193
+ end
194
+
195
+ # List of attributes with nullable: true
196
+ def self.openapi_nullable
197
+ Set.new([
198
+ ])
199
+ end
200
+
201
+ # Initializes the object
202
+ # @param [Hash] attributes Model attributes in the form of hash
203
+ def initialize(attributes = {})
204
+ if (!attributes.is_a?(Hash))
205
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::RotatedSecretCreateOkta` initialize method"
206
+ end
207
+
208
+ # check to see if the attribute exists and convert string to symbol for hash key
209
+ attributes = attributes.each_with_object({}) { |(k, v), h|
210
+ if (!self.class.attribute_map.key?(k.to_sym))
211
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::RotatedSecretCreateOkta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
212
+ end
213
+ h[k.to_sym] = v
214
+ }
215
+
216
+ if attributes.key?(:'ara_enabled')
217
+ self.ara_enabled = attributes[:'ara_enabled']
218
+ end
219
+
220
+ if attributes.key?(:'authentication_credentials')
221
+ self.authentication_credentials = attributes[:'authentication_credentials']
222
+ end
223
+
224
+ if attributes.key?(:'auto_rotate')
225
+ self.auto_rotate = attributes[:'auto_rotate']
226
+ end
227
+
228
+ if attributes.key?(:'delete_protection')
229
+ self.delete_protection = attributes[:'delete_protection']
230
+ end
231
+
232
+ if attributes.key?(:'description')
233
+ self.description = attributes[:'description']
234
+ end
235
+
236
+ if attributes.key?(:'enable_agentic_runtime_authority')
237
+ self.enable_agentic_runtime_authority = attributes[:'enable_agentic_runtime_authority']
238
+ end
239
+
240
+ if attributes.key?(:'enable_ai_quorum')
241
+ self.enable_ai_quorum = attributes[:'enable_ai_quorum']
242
+ end
243
+
244
+ if attributes.key?(:'input_rule')
245
+ if (value = attributes[:'input_rule']).is_a?(Array)
246
+ self.input_rule = value
247
+ end
248
+ end
249
+
250
+ if attributes.key?(:'item_custom_fields')
251
+ if (value = attributes[:'item_custom_fields']).is_a?(Hash)
252
+ self.item_custom_fields = value
253
+ end
254
+ end
255
+
256
+ if attributes.key?(:'json')
257
+ self.json = attributes[:'json']
258
+ else
259
+ self.json = false
260
+ end
261
+
262
+ if attributes.key?(:'key')
263
+ self.key = attributes[:'key']
264
+ end
265
+
266
+ if attributes.key?(:'lock_on_read')
267
+ self.lock_on_read = attributes[:'lock_on_read']
268
+ end
269
+
270
+ if attributes.key?(:'lock_ttl')
271
+ self.lock_ttl = attributes[:'lock_ttl']
272
+ end
273
+
274
+ if attributes.key?(:'max_versions')
275
+ self.max_versions = attributes[:'max_versions']
276
+ end
277
+
278
+ if attributes.key?(:'name')
279
+ self.name = attributes[:'name']
280
+ else
281
+ self.name = nil
282
+ end
283
+
284
+ if attributes.key?(:'output_rule')
285
+ if (value = attributes[:'output_rule']).is_a?(Array)
286
+ self.output_rule = value
287
+ end
288
+ end
289
+
290
+ if attributes.key?(:'password_length')
291
+ self.password_length = attributes[:'password_length']
292
+ end
293
+
294
+ if attributes.key?(:'rotate_on_unlock')
295
+ self.rotate_on_unlock = attributes[:'rotate_on_unlock']
296
+ end
297
+
298
+ if attributes.key?(:'rotated_password')
299
+ self.rotated_password = attributes[:'rotated_password']
300
+ end
301
+
302
+ if attributes.key?(:'rotated_username')
303
+ self.rotated_username = attributes[:'rotated_username']
304
+ end
305
+
306
+ if attributes.key?(:'rotation_event_in')
307
+ if (value = attributes[:'rotation_event_in']).is_a?(Array)
308
+ self.rotation_event_in = value
309
+ end
310
+ end
311
+
312
+ if attributes.key?(:'rotation_hour')
313
+ self.rotation_hour = attributes[:'rotation_hour']
314
+ end
315
+
316
+ if attributes.key?(:'rotation_interval')
317
+ self.rotation_interval = attributes[:'rotation_interval']
318
+ end
319
+
320
+ if attributes.key?(:'rotator_type')
321
+ self.rotator_type = attributes[:'rotator_type']
322
+ end
323
+
324
+ if attributes.key?(:'skip_dry_run')
325
+ self.skip_dry_run = attributes[:'skip_dry_run']
326
+ end
327
+
328
+ if attributes.key?(:'tags')
329
+ if (value = attributes[:'tags']).is_a?(Array)
330
+ self.tags = value
331
+ end
332
+ end
333
+
334
+ if attributes.key?(:'target_name')
335
+ self.target_name = attributes[:'target_name']
336
+ else
337
+ self.target_name = nil
338
+ end
339
+
340
+ if attributes.key?(:'token')
341
+ self.token = attributes[:'token']
342
+ end
343
+
344
+ if attributes.key?(:'uid_token')
345
+ self.uid_token = attributes[:'uid_token']
346
+ end
347
+
348
+ if attributes.key?(:'use_capital_letters')
349
+ self.use_capital_letters = attributes[:'use_capital_letters']
350
+ end
351
+
352
+ if attributes.key?(:'use_lower_letters')
353
+ self.use_lower_letters = attributes[:'use_lower_letters']
354
+ end
355
+
356
+ if attributes.key?(:'use_numbers')
357
+ self.use_numbers = attributes[:'use_numbers']
358
+ end
359
+
360
+ if attributes.key?(:'use_special_characters')
361
+ self.use_special_characters = attributes[:'use_special_characters']
362
+ end
363
+ end
364
+
365
+ # Show invalid properties with the reasons. Usually used together with valid?
366
+ # @return Array for valid properties with the reasons
367
+ def list_invalid_properties
368
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
369
+ invalid_properties = Array.new
370
+ if @name.nil?
371
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
372
+ end
373
+
374
+ if @target_name.nil?
375
+ invalid_properties.push('invalid value for "target_name", target_name cannot be nil.')
376
+ end
377
+
378
+ invalid_properties
379
+ end
380
+
381
+ # Check to see if the all the properties in the model are valid
382
+ # @return true if the model is valid
383
+ def valid?
384
+ warn '[DEPRECATED] the `valid?` method is obsolete'
385
+ return false if @name.nil?
386
+ return false if @target_name.nil?
387
+ true
388
+ end
389
+
390
+ # Checks equality by comparing each attribute.
391
+ # @param [Object] Object to be compared
392
+ def ==(o)
393
+ return true if self.equal?(o)
394
+ self.class == o.class &&
395
+ ara_enabled == o.ara_enabled &&
396
+ authentication_credentials == o.authentication_credentials &&
397
+ auto_rotate == o.auto_rotate &&
398
+ delete_protection == o.delete_protection &&
399
+ description == o.description &&
400
+ enable_agentic_runtime_authority == o.enable_agentic_runtime_authority &&
401
+ enable_ai_quorum == o.enable_ai_quorum &&
402
+ input_rule == o.input_rule &&
403
+ item_custom_fields == o.item_custom_fields &&
404
+ json == o.json &&
405
+ key == o.key &&
406
+ lock_on_read == o.lock_on_read &&
407
+ lock_ttl == o.lock_ttl &&
408
+ max_versions == o.max_versions &&
409
+ name == o.name &&
410
+ output_rule == o.output_rule &&
411
+ password_length == o.password_length &&
412
+ rotate_on_unlock == o.rotate_on_unlock &&
413
+ rotated_password == o.rotated_password &&
414
+ rotated_username == o.rotated_username &&
415
+ rotation_event_in == o.rotation_event_in &&
416
+ rotation_hour == o.rotation_hour &&
417
+ rotation_interval == o.rotation_interval &&
418
+ rotator_type == o.rotator_type &&
419
+ skip_dry_run == o.skip_dry_run &&
420
+ tags == o.tags &&
421
+ target_name == o.target_name &&
422
+ token == o.token &&
423
+ uid_token == o.uid_token &&
424
+ use_capital_letters == o.use_capital_letters &&
425
+ use_lower_letters == o.use_lower_letters &&
426
+ use_numbers == o.use_numbers &&
427
+ use_special_characters == o.use_special_characters
428
+ end
429
+
430
+ # @see the `==` method
431
+ # @param [Object] Object to be compared
432
+ def eql?(o)
433
+ self == o
434
+ end
435
+
436
+ # Calculates hash code according to all attributes.
437
+ # @return [Integer] Hash code
438
+ def hash
439
+ [ara_enabled, authentication_credentials, auto_rotate, delete_protection, description, enable_agentic_runtime_authority, enable_ai_quorum, input_rule, item_custom_fields, json, key, lock_on_read, lock_ttl, max_versions, name, output_rule, password_length, rotate_on_unlock, rotated_password, rotated_username, rotation_event_in, rotation_hour, rotation_interval, rotator_type, skip_dry_run, tags, target_name, token, uid_token, use_capital_letters, use_lower_letters, use_numbers, use_special_characters].hash
440
+ end
441
+
442
+ # Builds the object from hash
443
+ # @param [Hash] attributes Model attributes in the form of hash
444
+ # @return [Object] Returns the model itself
445
+ def self.build_from_hash(attributes)
446
+ return nil unless attributes.is_a?(Hash)
447
+ attributes = attributes.transform_keys(&:to_sym)
448
+ transformed_hash = {}
449
+ openapi_types.each_pair do |key, type|
450
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
451
+ transformed_hash["#{key}"] = nil
452
+ elsif type =~ /\AArray<(.*)>/i
453
+ # check to ensure the input is an array given that the attribute
454
+ # is documented as an array but the input is not
455
+ if attributes[attribute_map[key]].is_a?(Array)
456
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
457
+ end
458
+ elsif !attributes[attribute_map[key]].nil?
459
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
460
+ end
461
+ end
462
+ new(transformed_hash)
463
+ end
464
+
465
+ # Deserializes the data based on type
466
+ # @param string type Data type
467
+ # @param string value Value to be deserialized
468
+ # @return [Object] Deserialized data
469
+ def self._deserialize(type, value)
470
+ case type.to_sym
471
+ when :Time
472
+ Time.parse(value)
473
+ when :Date
474
+ Date.parse(value)
475
+ when :String
476
+ value.to_s
477
+ when :Integer
478
+ value.to_i
479
+ when :Float
480
+ value.to_f
481
+ when :Boolean
482
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
483
+ true
484
+ else
485
+ false
486
+ end
487
+ when :Object
488
+ # generic object (usually a Hash), return directly
489
+ value
490
+ when /\AArray<(?<inner_type>.+)>\z/
491
+ inner_type = Regexp.last_match[:inner_type]
492
+ value.map { |v| _deserialize(inner_type, v) }
493
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
494
+ k_type = Regexp.last_match[:k_type]
495
+ v_type = Regexp.last_match[:v_type]
496
+ {}.tap do |hash|
497
+ value.each do |k, v|
498
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
499
+ end
500
+ end
501
+ else # model
502
+ # models (e.g. Pet) or oneOf
503
+ klass = Akeyless.const_get(type)
504
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
505
+ end
506
+ end
507
+
508
+ # Returns the string representation of the object
509
+ # @return [String] String presentation of the object
510
+ def to_s
511
+ to_hash.to_s
512
+ end
513
+
514
+ # to_body is an alias to to_hash (backward compatibility)
515
+ # @return [Hash] Returns the object in the form of hash
516
+ def to_body
517
+ to_hash
518
+ end
519
+
520
+ # Returns the object in the form of hash
521
+ # @return [Hash] Returns the object in the form of hash
522
+ def to_hash
523
+ hash = {}
524
+ self.class.attribute_map.each_pair do |attr, param|
525
+ value = self.send(attr)
526
+ if value.nil?
527
+ is_nullable = self.class.openapi_nullable.include?(attr)
528
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
529
+ end
530
+
531
+ hash[param] = _to_hash(value)
532
+ end
533
+ hash
534
+ end
535
+
536
+ # Outputs non-array value in the form of hash
537
+ # For object, use to_hash. Otherwise, just return the value
538
+ # @param [Object] value Any valid value
539
+ # @return [Hash] Returns the value in the form of hash
540
+ def _to_hash(value)
541
+ if value.is_a?(Array)
542
+ value.compact.map { |v| _to_hash(v) }
543
+ elsif value.is_a?(Hash)
544
+ {}.tap do |hash|
545
+ value.each { |k, v| hash[k] = _to_hash(v) }
546
+ end
547
+ elsif value.respond_to? :to_hash
548
+ value.to_hash
549
+ else
550
+ value
551
+ end
552
+ end
553
+
554
+ end
555
+
556
+ end