akeyless 5.0.28 → 5.0.31

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 (176) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +54 -1
  3. data/docs/AccountGeneralSettings.md +4 -0
  4. data/docs/AerospikeTargetDetails.md +82 -0
  5. data/docs/AnthropicTargetDetails.md +20 -0
  6. data/docs/AuthMethod.md +3 -1
  7. data/docs/AuthMethodAccessInfo.md +2 -0
  8. data/docs/AuthMethodCreateSAML.md +3 -1
  9. data/docs/AuthMethodCreateUniversalIdentity.md +2 -0
  10. data/docs/AuthMethodUpdateSAML.md +3 -1
  11. data/docs/AuthMethodUpdateUniversalIdentity.md +2 -0
  12. data/docs/BedrockTargetDetails.md +20 -0
  13. data/docs/CertificateDiscovery.md +2 -0
  14. data/docs/CertificatePayload.md +2 -0
  15. data/docs/CreateAuthMethodSAML.md +3 -1
  16. data/docs/CreateAuthMethodUniversalIdentity.md +2 -0
  17. data/docs/CreateDBTarget.md +2 -0
  18. data/docs/CreateMcpSecretBearerToken.md +46 -0
  19. data/docs/CreateMcpSecretOAuthAuthCode.md +56 -0
  20. data/docs/CreateMcpSecretOAuthClientCreds.md +52 -0
  21. data/docs/CreatePKICertIssuer.md +1 -1
  22. data/docs/CustomDnsTargetDetails.md +20 -0
  23. data/docs/DSProducerDetails.md +2 -0
  24. data/docs/DbTargetDetails.md +2 -0
  25. data/docs/DecryptGPG.md +3 -1
  26. data/docs/EmailCustomization.md +28 -0
  27. data/docs/EmailCustomizationAccountInformation.md +24 -0
  28. data/docs/EmailCustomizationAccountInformationValues.md +24 -0
  29. data/docs/EncryptGPG.md +3 -1
  30. data/docs/EsmGetSecretOutput.md +4 -0
  31. data/docs/FileDownloadInstructions.md +20 -0
  32. data/docs/FileInfo.md +50 -0
  33. data/docs/GatewayCreateMigration.md +4 -0
  34. data/docs/GatewayUpdateMigration.md +4 -0
  35. data/docs/GetKubeExecCreds.md +1 -1
  36. data/docs/GetPKICertificate.md +1 -1
  37. data/docs/GrokTargetDetails.md +22 -0
  38. data/docs/HashiPayload.md +2 -0
  39. data/docs/Item.md +2 -0
  40. data/docs/KeycloakTargetDetails.md +24 -0
  41. data/docs/OktaTargetDetails.md +20 -0
  42. data/docs/RuntimeAuthorityCommand.md +4 -0
  43. data/docs/SAMLAccessRules.md +3 -1
  44. data/docs/StaticSecretDetailsInfo.md +2 -0
  45. data/docs/TargetCreateAerospike.md +64 -0
  46. data/docs/TargetCreateAnthropic.md +36 -0
  47. data/docs/TargetCreateBedrock.md +36 -0
  48. data/docs/TargetCreateCustomDns.md +36 -0
  49. data/docs/TargetCreateDB.md +2 -0
  50. data/docs/TargetCreateGrok.md +38 -0
  51. data/docs/TargetCreateKeycloak.md +40 -0
  52. data/docs/TargetCreateOkta.md +36 -0
  53. data/docs/TargetTypeDetailsInput.md +14 -0
  54. data/docs/TargetUpdateAerospike.md +70 -0
  55. data/docs/TargetUpdateAnthropic.md +42 -0
  56. data/docs/TargetUpdateBedrock.md +42 -0
  57. data/docs/TargetUpdateCustomDns.md +40 -0
  58. data/docs/TargetUpdateDB.md +2 -0
  59. data/docs/TargetUpdateGrok.md +44 -0
  60. data/docs/TargetUpdateKeycloak.md +44 -0
  61. data/docs/TargetUpdateOkta.md +40 -0
  62. data/docs/UidExpirationEvent.md +18 -0
  63. data/docs/UpdateAuthMethodSAML.md +3 -1
  64. data/docs/UpdateAuthMethodUniversalIdentity.md +2 -0
  65. data/docs/UpdateDBTarget.md +2 -0
  66. data/docs/UpdateMcpSecretBearerToken.md +40 -0
  67. data/docs/UpdateMcpSecretOAuthAuthCode.md +50 -0
  68. data/docs/UpdateMcpSecretOAuthClientCreds.md +46 -0
  69. data/docs/UpdatePKICertIssuer.md +1 -1
  70. data/docs/UscGetSecretOutput.md +4 -0
  71. data/docs/V2Api.md +1260 -0
  72. data/lib/akeyless/api/v2_api.rb +1410 -130
  73. data/lib/akeyless/models/account_general_settings.rb +20 -1
  74. data/lib/akeyless/models/aerospike_target_details.rb +512 -0
  75. data/lib/akeyless/models/anthropic_target_details.rb +224 -0
  76. data/lib/akeyless/models/auth_method.rb +15 -4
  77. data/lib/akeyless/models/auth_method_access_info.rb +13 -1
  78. data/lib/akeyless/models/auth_method_create_saml.rb +14 -4
  79. data/lib/akeyless/models/auth_method_create_universal_identity.rb +13 -1
  80. data/lib/akeyless/models/auth_method_update_saml.rb +14 -4
  81. data/lib/akeyless/models/auth_method_update_universal_identity.rb +13 -1
  82. data/lib/akeyless/models/bedrock_target_details.rb +224 -0
  83. data/lib/akeyless/models/certificate_discovery.rb +11 -1
  84. data/lib/akeyless/models/certificate_payload.rb +12 -1
  85. data/lib/akeyless/models/create_auth_method_saml.rb +14 -4
  86. data/lib/akeyless/models/create_auth_method_universal_identity.rb +13 -1
  87. data/lib/akeyless/models/create_db_target.rb +11 -1
  88. data/lib/akeyless/models/create_mcp_secret_bearer_token.rb +371 -0
  89. data/lib/akeyless/models/create_mcp_secret_o_auth_auth_code.rb +423 -0
  90. data/lib/akeyless/models/create_mcp_secret_o_auth_client_creds.rb +403 -0
  91. data/lib/akeyless/models/create_pki_cert_issuer.rb +1 -1
  92. data/lib/akeyless/models/custom_dns_target_details.rb +225 -0
  93. data/lib/akeyless/models/db_target_details.rb +11 -1
  94. data/lib/akeyless/models/decrypt_gpg.rb +14 -4
  95. data/lib/akeyless/models/ds_producer_details.rb +11 -1
  96. data/lib/akeyless/models/email_customization.rb +259 -0
  97. data/lib/akeyless/models/email_customization_account_information.rb +242 -0
  98. data/lib/akeyless/models/email_customization_account_information_values.rb +241 -0
  99. data/lib/akeyless/models/encrypt_gpg.rb +14 -4
  100. data/lib/akeyless/models/esm_get_secret_output.rb +19 -1
  101. data/lib/akeyless/models/file_download_instructions.rb +223 -0
  102. data/lib/akeyless/models/file_info.rb +358 -0
  103. data/lib/akeyless/models/gateway_create_migration.rb +21 -1
  104. data/lib/akeyless/models/gateway_update_migration.rb +21 -1
  105. data/lib/akeyless/models/get_kube_exec_creds.rb +1 -1
  106. data/lib/akeyless/models/get_pki_certificate.rb +1 -1
  107. data/lib/akeyless/models/grok_target_details.rb +234 -0
  108. data/lib/akeyless/models/hashi_payload.rb +10 -1
  109. data/lib/akeyless/models/item.rb +10 -1
  110. data/lib/akeyless/models/keycloak_target_details.rb +242 -0
  111. data/lib/akeyless/models/okta_target_details.rb +224 -0
  112. data/lib/akeyless/models/runtime_authority_command.rb +21 -1
  113. data/lib/akeyless/models/saml_access_rules.rb +14 -4
  114. data/lib/akeyless/models/static_secret_details_info.rb +10 -1
  115. data/lib/akeyless/models/target_create_aerospike.rb +454 -0
  116. data/lib/akeyless/models/target_create_anthropic.rb +317 -0
  117. data/lib/akeyless/models/target_create_bedrock.rb +317 -0
  118. data/lib/akeyless/models/target_create_custom_dns.rb +330 -0
  119. data/lib/akeyless/models/target_create_db.rb +11 -1
  120. data/lib/akeyless/models/target_create_grok.rb +327 -0
  121. data/lib/akeyless/models/target_create_keycloak.rb +334 -0
  122. data/lib/akeyless/models/target_create_okta.rb +314 -0
  123. data/lib/akeyless/models/target_type_details_input.rb +64 -1
  124. data/lib/akeyless/models/target_update_aerospike.rb +488 -0
  125. data/lib/akeyless/models/target_update_anthropic.rb +351 -0
  126. data/lib/akeyless/models/target_update_bedrock.rb +351 -0
  127. data/lib/akeyless/models/target_update_custom_dns.rb +350 -0
  128. data/lib/akeyless/models/target_update_db.rb +11 -1
  129. data/lib/akeyless/models/target_update_grok.rb +361 -0
  130. data/lib/akeyless/models/target_update_keycloak.rb +354 -0
  131. data/lib/akeyless/models/target_update_okta.rb +334 -0
  132. data/lib/akeyless/models/uid_expiration_event.rb +214 -0
  133. data/lib/akeyless/models/update_auth_method_saml.rb +14 -4
  134. data/lib/akeyless/models/update_auth_method_universal_identity.rb +13 -1
  135. data/lib/akeyless/models/update_db_target.rb +11 -1
  136. data/lib/akeyless/models/update_mcp_secret_bearer_token.rb +338 -0
  137. data/lib/akeyless/models/update_mcp_secret_o_auth_auth_code.rb +390 -0
  138. data/lib/akeyless/models/update_mcp_secret_o_auth_client_creds.rb +370 -0
  139. data/lib/akeyless/models/update_pki_cert_issuer.rb +1 -1
  140. data/lib/akeyless/models/usc_get_secret_output.rb +19 -1
  141. data/lib/akeyless/version.rb +1 -1
  142. data/lib/akeyless.rb +33 -0
  143. data/spec/models/aerospike_target_details_spec.rb +228 -0
  144. data/spec/models/anthropic_target_details_spec.rb +42 -0
  145. data/spec/models/bedrock_target_details_spec.rb +42 -0
  146. data/spec/models/create_mcp_secret_bearer_token_spec.rb +120 -0
  147. data/spec/models/create_mcp_secret_o_auth_auth_code_spec.rb +150 -0
  148. data/spec/models/create_mcp_secret_o_auth_client_creds_spec.rb +138 -0
  149. data/spec/models/custom_dns_target_details_spec.rb +42 -0
  150. data/spec/models/email_customization_account_information_spec.rb +54 -0
  151. data/spec/models/email_customization_account_information_values_spec.rb +54 -0
  152. data/spec/models/email_customization_spec.rb +66 -0
  153. data/spec/models/file_download_instructions_spec.rb +42 -0
  154. data/spec/models/file_info_spec.rb +132 -0
  155. data/spec/models/grok_target_details_spec.rb +48 -0
  156. data/spec/models/keycloak_target_details_spec.rb +54 -0
  157. data/spec/models/okta_target_details_spec.rb +42 -0
  158. data/spec/models/target_create_aerospike_spec.rb +174 -0
  159. data/spec/models/target_create_anthropic_spec.rb +90 -0
  160. data/spec/models/target_create_bedrock_spec.rb +90 -0
  161. data/spec/models/target_create_custom_dns_spec.rb +90 -0
  162. data/spec/models/target_create_grok_spec.rb +96 -0
  163. data/spec/models/target_create_keycloak_spec.rb +102 -0
  164. data/spec/models/target_create_okta_spec.rb +90 -0
  165. data/spec/models/target_update_aerospike_spec.rb +192 -0
  166. data/spec/models/target_update_anthropic_spec.rb +108 -0
  167. data/spec/models/target_update_bedrock_spec.rb +108 -0
  168. data/spec/models/target_update_custom_dns_spec.rb +102 -0
  169. data/spec/models/target_update_grok_spec.rb +114 -0
  170. data/spec/models/target_update_keycloak_spec.rb +114 -0
  171. data/spec/models/target_update_okta_spec.rb +102 -0
  172. data/spec/models/uid_expiration_event_spec.rb +36 -0
  173. data/spec/models/update_mcp_secret_bearer_token_spec.rb +102 -0
  174. data/spec/models/update_mcp_secret_o_auth_auth_code_spec.rb +132 -0
  175. data/spec/models/update_mcp_secret_o_auth_client_creds_spec.rb +120 -0
  176. metadata +1314 -1182
@@ -0,0 +1,488 @@
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 TargetUpdateAerospike
18
+ # Username of an account with the user-admin role
19
+ attr_accessor :admin_username
20
+
21
+ # Client ID for Aerospike Cloud authentication (relevant only for Aerospike Cloud)
22
+ attr_accessor :aerospike_client_id
23
+
24
+ # Client secret for Aerospike Cloud authentication (relevant only for Aerospike Cloud)
25
+ attr_accessor :aerospike_client_secret
26
+
27
+ # Set to 'true' for Aerospike Cloud deployments
28
+ attr_accessor :aerospike_cloud
29
+
30
+ # Cloud cluster ID (relevant only for Aerospike Cloud)
31
+ attr_accessor :aerospike_cluster_id
32
+
33
+ # Client certificate for mTLS (mTLS only)
34
+ attr_accessor :client_certificate
35
+
36
+ # Client private key for mTLS (mTLS only)
37
+ attr_accessor :client_private_key
38
+
39
+ # TLS server name used to verify the certificate hostname. If empty, the Aerospike hostname is used.
40
+ attr_accessor :db_server_name
41
+
42
+ # Protection from accidental deletion of this object [true/false]
43
+ attr_accessor :delete_protection
44
+
45
+ # Description of the object
46
+ attr_accessor :description
47
+
48
+ # Enable mutual TLS authentication - requires --ssl=true (true/false)
49
+ attr_accessor :enable_mtls
50
+
51
+ # Aerospike host address and port (e.g. url.to.aerospike.db)
52
+ attr_accessor :hostname
53
+
54
+ # Set output format to JSON
55
+ attr_accessor :json
56
+
57
+ # Whether to keep previous version [true/false]. If not set, use default according to account settings
58
+ attr_accessor :keep_prev_version
59
+
60
+ # The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
61
+ attr_accessor :key
62
+
63
+ # Set the maximum number of versions, limited by the account settings defaults.
64
+ attr_accessor :max_versions
65
+
66
+ # Target name
67
+ attr_accessor :name
68
+
69
+ # Namespace name (relevant only for Aerospike db)
70
+ attr_accessor :namespace
71
+
72
+ # Deprecated - use description
73
+ attr_accessor :new_comment
74
+
75
+ # New target name
76
+ attr_accessor :new_name
77
+
78
+ # Password for the admin user
79
+ attr_accessor :password
80
+
81
+ # Database connection port
82
+ attr_accessor :port
83
+
84
+ # Skip server name verification while still validating the certificate chain (true/false). Empty means do not skip.
85
+ attr_accessor :skip_server_name_validation
86
+
87
+ # Enable SSL encryption (true/false)
88
+ attr_accessor :ssl
89
+
90
+ # Base64-encoded SSL CA certificate from a trusted Certificate Authority (CA)
91
+ attr_accessor :ssl_certificate
92
+
93
+ # Authentication token (see `/auth` and `/configure`)
94
+ attr_accessor :token
95
+
96
+ # The universal identity token, Required only for universal_identity authentication
97
+ attr_accessor :uid_token
98
+
99
+ # Attribute mapping from ruby-style variable name to JSON key.
100
+ def self.attribute_map
101
+ {
102
+ :'admin_username' => :'admin-username',
103
+ :'aerospike_client_id' => :'aerospike-client-id',
104
+ :'aerospike_client_secret' => :'aerospike-client-secret',
105
+ :'aerospike_cloud' => :'aerospike-cloud',
106
+ :'aerospike_cluster_id' => :'aerospike-cluster-id',
107
+ :'client_certificate' => :'client-certificate',
108
+ :'client_private_key' => :'client-private-key',
109
+ :'db_server_name' => :'db-server-name',
110
+ :'delete_protection' => :'delete_protection',
111
+ :'description' => :'description',
112
+ :'enable_mtls' => :'enable-mtls',
113
+ :'hostname' => :'hostname',
114
+ :'json' => :'json',
115
+ :'keep_prev_version' => :'keep-prev-version',
116
+ :'key' => :'key',
117
+ :'max_versions' => :'max-versions',
118
+ :'name' => :'name',
119
+ :'namespace' => :'namespace',
120
+ :'new_comment' => :'new-comment',
121
+ :'new_name' => :'new-name',
122
+ :'password' => :'password',
123
+ :'port' => :'port',
124
+ :'skip_server_name_validation' => :'skip-server-name-validation',
125
+ :'ssl' => :'ssl',
126
+ :'ssl_certificate' => :'ssl-certificate',
127
+ :'token' => :'token',
128
+ :'uid_token' => :'uid-token'
129
+ }
130
+ end
131
+
132
+ # Returns all the JSON keys this model knows about
133
+ def self.acceptable_attributes
134
+ attribute_map.values
135
+ end
136
+
137
+ # Attribute type mapping.
138
+ def self.openapi_types
139
+ {
140
+ :'admin_username' => :'String',
141
+ :'aerospike_client_id' => :'String',
142
+ :'aerospike_client_secret' => :'String',
143
+ :'aerospike_cloud' => :'Boolean',
144
+ :'aerospike_cluster_id' => :'String',
145
+ :'client_certificate' => :'String',
146
+ :'client_private_key' => :'String',
147
+ :'db_server_name' => :'String',
148
+ :'delete_protection' => :'String',
149
+ :'description' => :'String',
150
+ :'enable_mtls' => :'Boolean',
151
+ :'hostname' => :'String',
152
+ :'json' => :'Boolean',
153
+ :'keep_prev_version' => :'String',
154
+ :'key' => :'String',
155
+ :'max_versions' => :'String',
156
+ :'name' => :'String',
157
+ :'namespace' => :'String',
158
+ :'new_comment' => :'String',
159
+ :'new_name' => :'String',
160
+ :'password' => :'String',
161
+ :'port' => :'String',
162
+ :'skip_server_name_validation' => :'String',
163
+ :'ssl' => :'Boolean',
164
+ :'ssl_certificate' => :'String',
165
+ :'token' => :'String',
166
+ :'uid_token' => :'String'
167
+ }
168
+ end
169
+
170
+ # List of attributes with nullable: true
171
+ def self.openapi_nullable
172
+ Set.new([
173
+ ])
174
+ end
175
+
176
+ # Initializes the object
177
+ # @param [Hash] attributes Model attributes in the form of hash
178
+ def initialize(attributes = {})
179
+ if (!attributes.is_a?(Hash))
180
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::TargetUpdateAerospike` initialize method"
181
+ end
182
+
183
+ # check to see if the attribute exists and convert string to symbol for hash key
184
+ attributes = attributes.each_with_object({}) { |(k, v), h|
185
+ if (!self.class.attribute_map.key?(k.to_sym))
186
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::TargetUpdateAerospike`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
187
+ end
188
+ h[k.to_sym] = v
189
+ }
190
+
191
+ if attributes.key?(:'admin_username')
192
+ self.admin_username = attributes[:'admin_username']
193
+ end
194
+
195
+ if attributes.key?(:'aerospike_client_id')
196
+ self.aerospike_client_id = attributes[:'aerospike_client_id']
197
+ end
198
+
199
+ if attributes.key?(:'aerospike_client_secret')
200
+ self.aerospike_client_secret = attributes[:'aerospike_client_secret']
201
+ end
202
+
203
+ if attributes.key?(:'aerospike_cloud')
204
+ self.aerospike_cloud = attributes[:'aerospike_cloud']
205
+ end
206
+
207
+ if attributes.key?(:'aerospike_cluster_id')
208
+ self.aerospike_cluster_id = attributes[:'aerospike_cluster_id']
209
+ end
210
+
211
+ if attributes.key?(:'client_certificate')
212
+ self.client_certificate = attributes[:'client_certificate']
213
+ end
214
+
215
+ if attributes.key?(:'client_private_key')
216
+ self.client_private_key = attributes[:'client_private_key']
217
+ end
218
+
219
+ if attributes.key?(:'db_server_name')
220
+ self.db_server_name = attributes[:'db_server_name']
221
+ end
222
+
223
+ if attributes.key?(:'delete_protection')
224
+ self.delete_protection = attributes[:'delete_protection']
225
+ end
226
+
227
+ if attributes.key?(:'description')
228
+ self.description = attributes[:'description']
229
+ else
230
+ self.description = 'default_comment'
231
+ end
232
+
233
+ if attributes.key?(:'enable_mtls')
234
+ self.enable_mtls = attributes[:'enable_mtls']
235
+ end
236
+
237
+ if attributes.key?(:'hostname')
238
+ self.hostname = attributes[:'hostname']
239
+ end
240
+
241
+ if attributes.key?(:'json')
242
+ self.json = attributes[:'json']
243
+ else
244
+ self.json = false
245
+ end
246
+
247
+ if attributes.key?(:'keep_prev_version')
248
+ self.keep_prev_version = attributes[:'keep_prev_version']
249
+ end
250
+
251
+ if attributes.key?(:'key')
252
+ self.key = attributes[:'key']
253
+ end
254
+
255
+ if attributes.key?(:'max_versions')
256
+ self.max_versions = attributes[:'max_versions']
257
+ end
258
+
259
+ if attributes.key?(:'name')
260
+ self.name = attributes[:'name']
261
+ else
262
+ self.name = nil
263
+ end
264
+
265
+ if attributes.key?(:'namespace')
266
+ self.namespace = attributes[:'namespace']
267
+ end
268
+
269
+ if attributes.key?(:'new_comment')
270
+ self.new_comment = attributes[:'new_comment']
271
+ else
272
+ self.new_comment = 'default_comment'
273
+ end
274
+
275
+ if attributes.key?(:'new_name')
276
+ self.new_name = attributes[:'new_name']
277
+ end
278
+
279
+ if attributes.key?(:'password')
280
+ self.password = attributes[:'password']
281
+ end
282
+
283
+ if attributes.key?(:'port')
284
+ self.port = attributes[:'port']
285
+ end
286
+
287
+ if attributes.key?(:'skip_server_name_validation')
288
+ self.skip_server_name_validation = attributes[:'skip_server_name_validation']
289
+ end
290
+
291
+ if attributes.key?(:'ssl')
292
+ self.ssl = attributes[:'ssl']
293
+ end
294
+
295
+ if attributes.key?(:'ssl_certificate')
296
+ self.ssl_certificate = attributes[:'ssl_certificate']
297
+ end
298
+
299
+ if attributes.key?(:'token')
300
+ self.token = attributes[:'token']
301
+ end
302
+
303
+ if attributes.key?(:'uid_token')
304
+ self.uid_token = attributes[:'uid_token']
305
+ end
306
+ end
307
+
308
+ # Show invalid properties with the reasons. Usually used together with valid?
309
+ # @return Array for valid properties with the reasons
310
+ def list_invalid_properties
311
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
312
+ invalid_properties = Array.new
313
+ if @name.nil?
314
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
315
+ end
316
+
317
+ invalid_properties
318
+ end
319
+
320
+ # Check to see if the all the properties in the model are valid
321
+ # @return true if the model is valid
322
+ def valid?
323
+ warn '[DEPRECATED] the `valid?` method is obsolete'
324
+ return false if @name.nil?
325
+ true
326
+ end
327
+
328
+ # Checks equality by comparing each attribute.
329
+ # @param [Object] Object to be compared
330
+ def ==(o)
331
+ return true if self.equal?(o)
332
+ self.class == o.class &&
333
+ admin_username == o.admin_username &&
334
+ aerospike_client_id == o.aerospike_client_id &&
335
+ aerospike_client_secret == o.aerospike_client_secret &&
336
+ aerospike_cloud == o.aerospike_cloud &&
337
+ aerospike_cluster_id == o.aerospike_cluster_id &&
338
+ client_certificate == o.client_certificate &&
339
+ client_private_key == o.client_private_key &&
340
+ db_server_name == o.db_server_name &&
341
+ delete_protection == o.delete_protection &&
342
+ description == o.description &&
343
+ enable_mtls == o.enable_mtls &&
344
+ hostname == o.hostname &&
345
+ json == o.json &&
346
+ keep_prev_version == o.keep_prev_version &&
347
+ key == o.key &&
348
+ max_versions == o.max_versions &&
349
+ name == o.name &&
350
+ namespace == o.namespace &&
351
+ new_comment == o.new_comment &&
352
+ new_name == o.new_name &&
353
+ password == o.password &&
354
+ port == o.port &&
355
+ skip_server_name_validation == o.skip_server_name_validation &&
356
+ ssl == o.ssl &&
357
+ ssl_certificate == o.ssl_certificate &&
358
+ token == o.token &&
359
+ uid_token == o.uid_token
360
+ end
361
+
362
+ # @see the `==` method
363
+ # @param [Object] Object to be compared
364
+ def eql?(o)
365
+ self == o
366
+ end
367
+
368
+ # Calculates hash code according to all attributes.
369
+ # @return [Integer] Hash code
370
+ def hash
371
+ [admin_username, aerospike_client_id, aerospike_client_secret, aerospike_cloud, aerospike_cluster_id, client_certificate, client_private_key, db_server_name, delete_protection, description, enable_mtls, hostname, json, keep_prev_version, key, max_versions, name, namespace, new_comment, new_name, password, port, skip_server_name_validation, ssl, ssl_certificate, token, uid_token].hash
372
+ end
373
+
374
+ # Builds the object from hash
375
+ # @param [Hash] attributes Model attributes in the form of hash
376
+ # @return [Object] Returns the model itself
377
+ def self.build_from_hash(attributes)
378
+ return nil unless attributes.is_a?(Hash)
379
+ attributes = attributes.transform_keys(&:to_sym)
380
+ transformed_hash = {}
381
+ openapi_types.each_pair do |key, type|
382
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
383
+ transformed_hash["#{key}"] = nil
384
+ elsif type =~ /\AArray<(.*)>/i
385
+ # check to ensure the input is an array given that the attribute
386
+ # is documented as an array but the input is not
387
+ if attributes[attribute_map[key]].is_a?(Array)
388
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
389
+ end
390
+ elsif !attributes[attribute_map[key]].nil?
391
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
392
+ end
393
+ end
394
+ new(transformed_hash)
395
+ end
396
+
397
+ # Deserializes the data based on type
398
+ # @param string type Data type
399
+ # @param string value Value to be deserialized
400
+ # @return [Object] Deserialized data
401
+ def self._deserialize(type, value)
402
+ case type.to_sym
403
+ when :Time
404
+ Time.parse(value)
405
+ when :Date
406
+ Date.parse(value)
407
+ when :String
408
+ value.to_s
409
+ when :Integer
410
+ value.to_i
411
+ when :Float
412
+ value.to_f
413
+ when :Boolean
414
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
415
+ true
416
+ else
417
+ false
418
+ end
419
+ when :Object
420
+ # generic object (usually a Hash), return directly
421
+ value
422
+ when /\AArray<(?<inner_type>.+)>\z/
423
+ inner_type = Regexp.last_match[:inner_type]
424
+ value.map { |v| _deserialize(inner_type, v) }
425
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
426
+ k_type = Regexp.last_match[:k_type]
427
+ v_type = Regexp.last_match[:v_type]
428
+ {}.tap do |hash|
429
+ value.each do |k, v|
430
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
431
+ end
432
+ end
433
+ else # model
434
+ # models (e.g. Pet) or oneOf
435
+ klass = Akeyless.const_get(type)
436
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
437
+ end
438
+ end
439
+
440
+ # Returns the string representation of the object
441
+ # @return [String] String presentation of the object
442
+ def to_s
443
+ to_hash.to_s
444
+ end
445
+
446
+ # to_body is an alias to to_hash (backward compatibility)
447
+ # @return [Hash] Returns the object in the form of hash
448
+ def to_body
449
+ to_hash
450
+ end
451
+
452
+ # Returns the object in the form of hash
453
+ # @return [Hash] Returns the object in the form of hash
454
+ def to_hash
455
+ hash = {}
456
+ self.class.attribute_map.each_pair do |attr, param|
457
+ value = self.send(attr)
458
+ if value.nil?
459
+ is_nullable = self.class.openapi_nullable.include?(attr)
460
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
461
+ end
462
+
463
+ hash[param] = _to_hash(value)
464
+ end
465
+ hash
466
+ end
467
+
468
+ # Outputs non-array value in the form of hash
469
+ # For object, use to_hash. Otherwise, just return the value
470
+ # @param [Object] value Any valid value
471
+ # @return [Hash] Returns the value in the form of hash
472
+ def _to_hash(value)
473
+ if value.is_a?(Array)
474
+ value.compact.map { |v| _to_hash(v) }
475
+ elsif value.is_a?(Hash)
476
+ {}.tap do |hash|
477
+ value.each { |k, v| hash[k] = _to_hash(v) }
478
+ end
479
+ elsif value.respond_to? :to_hash
480
+ value.to_hash
481
+ else
482
+ value
483
+ end
484
+ end
485
+
486
+ end
487
+
488
+ end