akeyless 5.0.27 → 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 (274) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +63 -1
  3. data/docs/AccountGeneralSettings.md +6 -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 +11 -1
  26. data/docs/FileDownloadInstructions.md +20 -0
  27. data/docs/FileInfo.md +50 -0
  28. data/docs/FolderDeleteSync.md +32 -0
  29. data/docs/FolderDeleteSyncOutput.md +24 -0
  30. data/docs/FolderSync.md +34 -0
  31. data/docs/FolderSyncAll.md +26 -0
  32. data/docs/FolderSyncAllOutput.md +18 -0
  33. data/docs/FolderSyncOutput.md +24 -0
  34. data/docs/FolderUSCSyncConfig.md +2 -0
  35. data/docs/GatewayCreateMigration.md +2 -0
  36. data/docs/GatewayUpdateMigration.md +2 -0
  37. data/docs/GetKubeExecCreds.md +1 -1
  38. data/docs/GetPKICertificate.md +1 -1
  39. data/docs/GrokTargetDetails.md +22 -0
  40. data/docs/HashiPayload.md +2 -0
  41. data/docs/Item.md +2 -0
  42. data/docs/KeycloakTargetDetails.md +24 -0
  43. data/docs/OIDCAccessRules.md +2 -0
  44. data/docs/OktaTargetDetails.md +20 -0
  45. data/docs/PersonalFolderGlobalMappingSettings.md +20 -0
  46. data/docs/RotatedSecretCreateAws.md +4 -4
  47. data/docs/RotatedSecretCreateAzure.md +6 -4
  48. data/docs/RotatedSecretCreateCassandra.md +4 -4
  49. data/docs/RotatedSecretCreateCustom.md +4 -4
  50. data/docs/RotatedSecretCreateDockerhub.md +4 -4
  51. data/docs/RotatedSecretCreateGcp.md +4 -4
  52. data/docs/RotatedSecretCreateHanadb.md +4 -4
  53. data/docs/RotatedSecretCreateHashiVault.md +60 -0
  54. data/docs/RotatedSecretCreateLdap.md +4 -4
  55. data/docs/RotatedSecretCreateMongodb.md +4 -4
  56. data/docs/RotatedSecretCreateMssql.md +4 -4
  57. data/docs/RotatedSecretCreateMysql.md +4 -4
  58. data/docs/RotatedSecretCreateOpenAI.md +4 -4
  59. data/docs/RotatedSecretCreateOracledb.md +4 -4
  60. data/docs/RotatedSecretCreatePostgresql.md +4 -4
  61. data/docs/RotatedSecretCreateRedis.md +4 -4
  62. data/docs/RotatedSecretCreateRedshift.md +4 -4
  63. data/docs/RotatedSecretCreateSnowflake.md +4 -4
  64. data/docs/RotatedSecretCreateSplunk.md +4 -4
  65. data/docs/RotatedSecretCreateSsh.md +4 -4
  66. data/docs/RotatedSecretCreateWindows.md +4 -4
  67. data/docs/RotatedSecretUpdateAws.md +4 -4
  68. data/docs/RotatedSecretUpdateAzure.md +6 -4
  69. data/docs/RotatedSecretUpdateCassandra.md +4 -4
  70. data/docs/RotatedSecretUpdateCustom.md +4 -4
  71. data/docs/RotatedSecretUpdateDockerhub.md +4 -4
  72. data/docs/RotatedSecretUpdateGcp.md +4 -4
  73. data/docs/RotatedSecretUpdateHanadb.md +4 -4
  74. data/docs/RotatedSecretUpdateHashiVault.md +64 -0
  75. data/docs/RotatedSecretUpdateLdap.md +4 -4
  76. data/docs/RotatedSecretUpdateMongodb.md +4 -4
  77. data/docs/RotatedSecretUpdateMssql.md +4 -4
  78. data/docs/RotatedSecretUpdateMysql.md +4 -4
  79. data/docs/RotatedSecretUpdateOpenAI.md +4 -4
  80. data/docs/RotatedSecretUpdateOracledb.md +4 -4
  81. data/docs/RotatedSecretUpdatePostgresql.md +4 -4
  82. data/docs/RotatedSecretUpdateRedis.md +4 -4
  83. data/docs/RotatedSecretUpdateRedshift.md +4 -4
  84. data/docs/RotatedSecretUpdateSnowflake.md +4 -4
  85. data/docs/RotatedSecretUpdateSplunk.md +4 -4
  86. data/docs/RotatedSecretUpdateSsh.md +4 -4
  87. data/docs/RotatedSecretUpdateWindows.md +4 -4
  88. data/docs/RuntimeAuthorityCommand.md +4 -0
  89. data/docs/SAMLAccessRules.md +3 -1
  90. data/docs/SecretInfo.md +5 -1
  91. data/docs/StaticSecretDetailsInfo.md +2 -0
  92. data/docs/TargetCreateAnthropic.md +36 -0
  93. data/docs/TargetCreateBedrock.md +36 -0
  94. data/docs/TargetCreateCustomDns.md +36 -0
  95. data/docs/TargetCreateDB.md +2 -0
  96. data/docs/TargetCreateGrok.md +38 -0
  97. data/docs/TargetCreateKeycloak.md +40 -0
  98. data/docs/TargetCreateOkta.md +36 -0
  99. data/docs/TargetTypeDetailsInput.md +12 -0
  100. data/docs/TargetUpdateAnthropic.md +42 -0
  101. data/docs/TargetUpdateBedrock.md +42 -0
  102. data/docs/TargetUpdateCustomDns.md +40 -0
  103. data/docs/TargetUpdateDB.md +2 -0
  104. data/docs/TargetUpdateGrok.md +44 -0
  105. data/docs/TargetUpdateKeycloak.md +44 -0
  106. data/docs/TargetUpdateOkta.md +40 -0
  107. data/docs/UidExpirationEvent.md +18 -0
  108. data/docs/UpdateAuthMethodSAML.md +3 -1
  109. data/docs/UpdateAuthMethodUniversalIdentity.md +2 -0
  110. data/docs/UpdateDBTarget.md +2 -0
  111. data/docs/UpdateMcpSecretBearerToken.md +40 -0
  112. data/docs/UpdateMcpSecretOAuthAuthCode.md +50 -0
  113. data/docs/UpdateMcpSecretOAuthClientCreds.md +46 -0
  114. data/docs/UpdatePKICertIssuer.md +1 -1
  115. data/docs/UscGetSecretOutput.md +11 -1
  116. data/docs/V2Api.md +1449 -0
  117. data/lib/akeyless/api/v2_api.rb +1617 -145
  118. data/lib/akeyless/models/account_general_settings.rb +29 -1
  119. data/lib/akeyless/models/anthropic_target_details.rb +224 -0
  120. data/lib/akeyless/models/auth_method.rb +15 -4
  121. data/lib/akeyless/models/auth_method_access_info.rb +13 -1
  122. data/lib/akeyless/models/auth_method_create_saml.rb +14 -4
  123. data/lib/akeyless/models/auth_method_create_universal_identity.rb +13 -1
  124. data/lib/akeyless/models/auth_method_update_saml.rb +14 -4
  125. data/lib/akeyless/models/auth_method_update_universal_identity.rb +13 -1
  126. data/lib/akeyless/models/bedrock_target_details.rb +224 -0
  127. data/lib/akeyless/models/create_auth_method_saml.rb +14 -4
  128. data/lib/akeyless/models/create_auth_method_universal_identity.rb +13 -1
  129. data/lib/akeyless/models/create_db_target.rb +11 -1
  130. data/lib/akeyless/models/create_mcp_secret_bearer_token.rb +371 -0
  131. data/lib/akeyless/models/create_mcp_secret_o_auth_auth_code.rb +423 -0
  132. data/lib/akeyless/models/create_mcp_secret_o_auth_client_creds.rb +403 -0
  133. data/lib/akeyless/models/create_pki_cert_issuer.rb +1 -1
  134. data/lib/akeyless/models/custom_dns_target_details.rb +225 -0
  135. data/lib/akeyless/models/db_target_details.rb +11 -1
  136. data/lib/akeyless/models/ds_producer_details.rb +11 -1
  137. data/lib/akeyless/models/email_customization.rb +259 -0
  138. data/lib/akeyless/models/email_customization_account_information.rb +242 -0
  139. data/lib/akeyless/models/email_customization_account_information_values.rb +241 -0
  140. data/lib/akeyless/models/esm_get_secret_output.rb +53 -4
  141. data/lib/akeyless/models/file_download_instructions.rb +223 -0
  142. data/lib/akeyless/models/file_info.rb +358 -0
  143. data/lib/akeyless/models/folder_delete_sync.rb +305 -0
  144. data/lib/akeyless/models/folder_delete_sync_output.rb +245 -0
  145. data/lib/akeyless/models/folder_sync.rb +306 -0
  146. data/lib/akeyless/models/folder_sync_all.rb +266 -0
  147. data/lib/akeyless/models/folder_sync_all_output.rb +214 -0
  148. data/lib/akeyless/models/folder_sync_output.rb +247 -0
  149. data/lib/akeyless/models/folder_usc_sync_config.rb +10 -1
  150. data/lib/akeyless/models/gateway_create_migration.rb +11 -1
  151. data/lib/akeyless/models/gateway_update_migration.rb +11 -1
  152. data/lib/akeyless/models/get_kube_exec_creds.rb +1 -1
  153. data/lib/akeyless/models/get_pki_certificate.rb +1 -1
  154. data/lib/akeyless/models/grok_target_details.rb +234 -0
  155. data/lib/akeyless/models/hashi_payload.rb +10 -1
  156. data/lib/akeyless/models/item.rb +10 -1
  157. data/lib/akeyless/models/keycloak_target_details.rb +242 -0
  158. data/lib/akeyless/models/oidc_access_rules.rb +11 -1
  159. data/lib/akeyless/models/okta_target_details.rb +224 -0
  160. data/lib/akeyless/models/personal_folder_global_mapping_settings.rb +223 -0
  161. data/lib/akeyless/models/rotated_secret_create_aws.rb +0 -4
  162. data/lib/akeyless/models/rotated_secret_create_azure.rb +11 -5
  163. data/lib/akeyless/models/rotated_secret_create_cassandra.rb +0 -4
  164. data/lib/akeyless/models/rotated_secret_create_custom.rb +0 -4
  165. data/lib/akeyless/models/rotated_secret_create_dockerhub.rb +0 -4
  166. data/lib/akeyless/models/rotated_secret_create_gcp.rb +0 -4
  167. data/lib/akeyless/models/rotated_secret_create_hanadb.rb +0 -4
  168. data/lib/akeyless/models/rotated_secret_create_hashi_vault.rb +446 -0
  169. data/lib/akeyless/models/rotated_secret_create_ldap.rb +0 -4
  170. data/lib/akeyless/models/rotated_secret_create_mongodb.rb +0 -4
  171. data/lib/akeyless/models/rotated_secret_create_mssql.rb +0 -4
  172. data/lib/akeyless/models/rotated_secret_create_mysql.rb +0 -4
  173. data/lib/akeyless/models/rotated_secret_create_open_ai.rb +0 -4
  174. data/lib/akeyless/models/rotated_secret_create_oracledb.rb +0 -4
  175. data/lib/akeyless/models/rotated_secret_create_postgresql.rb +0 -4
  176. data/lib/akeyless/models/rotated_secret_create_redis.rb +0 -4
  177. data/lib/akeyless/models/rotated_secret_create_redshift.rb +0 -4
  178. data/lib/akeyless/models/rotated_secret_create_snowflake.rb +0 -4
  179. data/lib/akeyless/models/rotated_secret_create_splunk.rb +0 -4
  180. data/lib/akeyless/models/rotated_secret_create_ssh.rb +0 -4
  181. data/lib/akeyless/models/rotated_secret_create_windows.rb +0 -4
  182. data/lib/akeyless/models/rotated_secret_sync.rb +1 -1
  183. data/lib/akeyless/models/rotated_secret_update_aws.rb +0 -4
  184. data/lib/akeyless/models/rotated_secret_update_azure.rb +11 -5
  185. data/lib/akeyless/models/rotated_secret_update_cassandra.rb +0 -4
  186. data/lib/akeyless/models/rotated_secret_update_custom.rb +0 -4
  187. data/lib/akeyless/models/rotated_secret_update_dockerhub.rb +0 -4
  188. data/lib/akeyless/models/rotated_secret_update_gcp.rb +0 -4
  189. data/lib/akeyless/models/rotated_secret_update_hanadb.rb +0 -4
  190. data/lib/akeyless/models/rotated_secret_update_hashi_vault.rb +463 -0
  191. data/lib/akeyless/models/rotated_secret_update_ldap.rb +0 -4
  192. data/lib/akeyless/models/rotated_secret_update_mongodb.rb +0 -4
  193. data/lib/akeyless/models/rotated_secret_update_mssql.rb +0 -4
  194. data/lib/akeyless/models/rotated_secret_update_mysql.rb +0 -4
  195. data/lib/akeyless/models/rotated_secret_update_open_ai.rb +0 -4
  196. data/lib/akeyless/models/rotated_secret_update_oracledb.rb +0 -4
  197. data/lib/akeyless/models/rotated_secret_update_postgresql.rb +0 -4
  198. data/lib/akeyless/models/rotated_secret_update_redis.rb +0 -4
  199. data/lib/akeyless/models/rotated_secret_update_redshift.rb +0 -4
  200. data/lib/akeyless/models/rotated_secret_update_snowflake.rb +0 -4
  201. data/lib/akeyless/models/rotated_secret_update_splunk.rb +0 -4
  202. data/lib/akeyless/models/rotated_secret_update_ssh.rb +0 -4
  203. data/lib/akeyless/models/rotated_secret_update_windows.rb +0 -4
  204. data/lib/akeyless/models/runtime_authority_command.rb +21 -1
  205. data/lib/akeyless/models/saml_access_rules.rb +14 -4
  206. data/lib/akeyless/models/secret_info.rb +24 -4
  207. data/lib/akeyless/models/static_secret_details_info.rb +10 -1
  208. data/lib/akeyless/models/static_secret_sync.rb +1 -1
  209. data/lib/akeyless/models/target_create_anthropic.rb +317 -0
  210. data/lib/akeyless/models/target_create_bedrock.rb +317 -0
  211. data/lib/akeyless/models/target_create_custom_dns.rb +330 -0
  212. data/lib/akeyless/models/target_create_db.rb +11 -1
  213. data/lib/akeyless/models/target_create_grok.rb +327 -0
  214. data/lib/akeyless/models/target_create_keycloak.rb +334 -0
  215. data/lib/akeyless/models/target_create_okta.rb +314 -0
  216. data/lib/akeyless/models/target_type_details_input.rb +55 -1
  217. data/lib/akeyless/models/target_update_anthropic.rb +351 -0
  218. data/lib/akeyless/models/target_update_bedrock.rb +351 -0
  219. data/lib/akeyless/models/target_update_custom_dns.rb +350 -0
  220. data/lib/akeyless/models/target_update_db.rb +11 -1
  221. data/lib/akeyless/models/target_update_grok.rb +361 -0
  222. data/lib/akeyless/models/target_update_keycloak.rb +354 -0
  223. data/lib/akeyless/models/target_update_okta.rb +334 -0
  224. data/lib/akeyless/models/uid_expiration_event.rb +214 -0
  225. data/lib/akeyless/models/update_auth_method_saml.rb +14 -4
  226. data/lib/akeyless/models/update_auth_method_universal_identity.rb +13 -1
  227. data/lib/akeyless/models/update_db_target.rb +11 -1
  228. data/lib/akeyless/models/update_mcp_secret_bearer_token.rb +338 -0
  229. data/lib/akeyless/models/update_mcp_secret_o_auth_auth_code.rb +390 -0
  230. data/lib/akeyless/models/update_mcp_secret_o_auth_client_creds.rb +370 -0
  231. data/lib/akeyless/models/update_pki_cert_issuer.rb +1 -1
  232. data/lib/akeyless/models/usc_get_secret_output.rb +53 -4
  233. data/lib/akeyless/version.rb +1 -1
  234. data/lib/akeyless.rb +39 -0
  235. data/spec/models/anthropic_target_details_spec.rb +42 -0
  236. data/spec/models/bedrock_target_details_spec.rb +42 -0
  237. data/spec/models/create_mcp_secret_bearer_token_spec.rb +120 -0
  238. data/spec/models/create_mcp_secret_o_auth_auth_code_spec.rb +150 -0
  239. data/spec/models/create_mcp_secret_o_auth_client_creds_spec.rb +138 -0
  240. data/spec/models/custom_dns_target_details_spec.rb +42 -0
  241. data/spec/models/email_customization_account_information_spec.rb +54 -0
  242. data/spec/models/email_customization_account_information_values_spec.rb +54 -0
  243. data/spec/models/email_customization_spec.rb +66 -0
  244. data/spec/models/file_download_instructions_spec.rb +42 -0
  245. data/spec/models/file_info_spec.rb +132 -0
  246. data/spec/models/folder_delete_sync_output_spec.rb +54 -0
  247. data/spec/models/folder_delete_sync_spec.rb +78 -0
  248. data/spec/models/folder_sync_all_output_spec.rb +36 -0
  249. data/spec/models/folder_sync_all_spec.rb +60 -0
  250. data/spec/models/folder_sync_output_spec.rb +54 -0
  251. data/spec/models/folder_sync_spec.rb +84 -0
  252. data/spec/models/grok_target_details_spec.rb +48 -0
  253. data/spec/models/keycloak_target_details_spec.rb +54 -0
  254. data/spec/models/okta_target_details_spec.rb +42 -0
  255. data/spec/models/personal_folder_global_mapping_settings_spec.rb +42 -0
  256. data/spec/models/rotated_secret_create_hashi_vault_spec.rb +162 -0
  257. data/spec/models/rotated_secret_update_hashi_vault_spec.rb +174 -0
  258. data/spec/models/target_create_anthropic_spec.rb +90 -0
  259. data/spec/models/target_create_bedrock_spec.rb +90 -0
  260. data/spec/models/target_create_custom_dns_spec.rb +90 -0
  261. data/spec/models/target_create_grok_spec.rb +96 -0
  262. data/spec/models/target_create_keycloak_spec.rb +102 -0
  263. data/spec/models/target_create_okta_spec.rb +90 -0
  264. data/spec/models/target_update_anthropic_spec.rb +108 -0
  265. data/spec/models/target_update_bedrock_spec.rb +108 -0
  266. data/spec/models/target_update_custom_dns_spec.rb +102 -0
  267. data/spec/models/target_update_grok_spec.rb +114 -0
  268. data/spec/models/target_update_keycloak_spec.rb +114 -0
  269. data/spec/models/target_update_okta_spec.rb +102 -0
  270. data/spec/models/uid_expiration_event_spec.rb +36 -0
  271. data/spec/models/update_mcp_secret_bearer_token_spec.rb +102 -0
  272. data/spec/models/update_mcp_secret_o_auth_auth_code_spec.rb +132 -0
  273. data/spec/models/update_mcp_secret_o_auth_client_creds_spec.rb +120 -0
  274. metadata +1331 -1175
@@ -0,0 +1,247 @@
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 FolderSyncOutput
18
+ attr_accessor :failed_items
19
+
20
+ attr_accessor :folder_name
21
+
22
+ attr_accessor :skipped_items
23
+
24
+ attr_accessor :synced_items
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'failed_items' => :'failed_items',
30
+ :'folder_name' => :'folder_name',
31
+ :'skipped_items' => :'skipped_items',
32
+ :'synced_items' => :'synced_items'
33
+ }
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'failed_items' => :'Hash<String, String>',
45
+ :'folder_name' => :'String',
46
+ :'skipped_items' => :'Array<String>',
47
+ :'synced_items' => :'Array<String>'
48
+ }
49
+ end
50
+
51
+ # List of attributes with nullable: true
52
+ def self.openapi_nullable
53
+ Set.new([
54
+ ])
55
+ end
56
+
57
+ # Initializes the object
58
+ # @param [Hash] attributes Model attributes in the form of hash
59
+ def initialize(attributes = {})
60
+ if (!attributes.is_a?(Hash))
61
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::FolderSyncOutput` initialize method"
62
+ end
63
+
64
+ # check to see if the attribute exists and convert string to symbol for hash key
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!self.class.attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::FolderSyncOutput`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'failed_items')
73
+ if (value = attributes[:'failed_items']).is_a?(Hash)
74
+ self.failed_items = value
75
+ end
76
+ end
77
+
78
+ if attributes.key?(:'folder_name')
79
+ self.folder_name = attributes[:'folder_name']
80
+ end
81
+
82
+ if attributes.key?(:'skipped_items')
83
+ if (value = attributes[:'skipped_items']).is_a?(Array)
84
+ self.skipped_items = value
85
+ end
86
+ end
87
+
88
+ if attributes.key?(:'synced_items')
89
+ if (value = attributes[:'synced_items']).is_a?(Array)
90
+ self.synced_items = value
91
+ end
92
+ end
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
99
+ invalid_properties = Array.new
100
+ invalid_properties
101
+ end
102
+
103
+ # Check to see if the all the properties in the model are valid
104
+ # @return true if the model is valid
105
+ def valid?
106
+ warn '[DEPRECATED] the `valid?` method is obsolete'
107
+ true
108
+ end
109
+
110
+ # Checks equality by comparing each attribute.
111
+ # @param [Object] Object to be compared
112
+ def ==(o)
113
+ return true if self.equal?(o)
114
+ self.class == o.class &&
115
+ failed_items == o.failed_items &&
116
+ folder_name == o.folder_name &&
117
+ skipped_items == o.skipped_items &&
118
+ synced_items == o.synced_items
119
+ end
120
+
121
+ # @see the `==` method
122
+ # @param [Object] Object to be compared
123
+ def eql?(o)
124
+ self == o
125
+ end
126
+
127
+ # Calculates hash code according to all attributes.
128
+ # @return [Integer] Hash code
129
+ def hash
130
+ [failed_items, folder_name, skipped_items, synced_items].hash
131
+ end
132
+
133
+ # Builds the object from hash
134
+ # @param [Hash] attributes Model attributes in the form of hash
135
+ # @return [Object] Returns the model itself
136
+ def self.build_from_hash(attributes)
137
+ return nil unless attributes.is_a?(Hash)
138
+ attributes = attributes.transform_keys(&:to_sym)
139
+ transformed_hash = {}
140
+ openapi_types.each_pair do |key, type|
141
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
142
+ transformed_hash["#{key}"] = nil
143
+ elsif type =~ /\AArray<(.*)>/i
144
+ # check to ensure the input is an array given that the attribute
145
+ # is documented as an array but the input is not
146
+ if attributes[attribute_map[key]].is_a?(Array)
147
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
148
+ end
149
+ elsif !attributes[attribute_map[key]].nil?
150
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
151
+ end
152
+ end
153
+ new(transformed_hash)
154
+ end
155
+
156
+ # Deserializes the data based on type
157
+ # @param string type Data type
158
+ # @param string value Value to be deserialized
159
+ # @return [Object] Deserialized data
160
+ def self._deserialize(type, value)
161
+ case type.to_sym
162
+ when :Time
163
+ Time.parse(value)
164
+ when :Date
165
+ Date.parse(value)
166
+ when :String
167
+ value.to_s
168
+ when :Integer
169
+ value.to_i
170
+ when :Float
171
+ value.to_f
172
+ when :Boolean
173
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
174
+ true
175
+ else
176
+ false
177
+ end
178
+ when :Object
179
+ # generic object (usually a Hash), return directly
180
+ value
181
+ when /\AArray<(?<inner_type>.+)>\z/
182
+ inner_type = Regexp.last_match[:inner_type]
183
+ value.map { |v| _deserialize(inner_type, v) }
184
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
185
+ k_type = Regexp.last_match[:k_type]
186
+ v_type = Regexp.last_match[:v_type]
187
+ {}.tap do |hash|
188
+ value.each do |k, v|
189
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
190
+ end
191
+ end
192
+ else # model
193
+ # models (e.g. Pet) or oneOf
194
+ klass = Akeyless.const_get(type)
195
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
196
+ end
197
+ end
198
+
199
+ # Returns the string representation of the object
200
+ # @return [String] String presentation of the object
201
+ def to_s
202
+ to_hash.to_s
203
+ end
204
+
205
+ # to_body is an alias to to_hash (backward compatibility)
206
+ # @return [Hash] Returns the object in the form of hash
207
+ def to_body
208
+ to_hash
209
+ end
210
+
211
+ # Returns the object in the form of hash
212
+ # @return [Hash] Returns the object in the form of hash
213
+ def to_hash
214
+ hash = {}
215
+ self.class.attribute_map.each_pair do |attr, param|
216
+ value = self.send(attr)
217
+ if value.nil?
218
+ is_nullable = self.class.openapi_nullable.include?(attr)
219
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
220
+ end
221
+
222
+ hash[param] = _to_hash(value)
223
+ end
224
+ hash
225
+ end
226
+
227
+ # Outputs non-array value in the form of hash
228
+ # For object, use to_hash. Otherwise, just return the value
229
+ # @param [Object] value Any valid value
230
+ # @return [Hash] Returns the value in the form of hash
231
+ def _to_hash(value)
232
+ if value.is_a?(Array)
233
+ value.compact.map { |v| _to_hash(v) }
234
+ elsif value.is_a?(Hash)
235
+ {}.tap do |hash|
236
+ value.each { |k, v| hash[k] = _to_hash(v) }
237
+ end
238
+ elsif value.respond_to? :to_hash
239
+ value.to_hash
240
+ else
241
+ value
242
+ end
243
+ end
244
+
245
+ end
246
+
247
+ end
@@ -17,6 +17,8 @@ module Akeyless
17
17
  class FolderUSCSyncConfig
18
18
  attr_accessor :delete_remote
19
19
 
20
+ attr_accessor :engine_name
21
+
20
22
  attr_accessor :namespace
21
23
 
22
24
  attr_accessor :usc_item_id
@@ -27,6 +29,7 @@ module Akeyless
27
29
  def self.attribute_map
28
30
  {
29
31
  :'delete_remote' => :'delete_remote',
32
+ :'engine_name' => :'engine_name',
30
33
  :'namespace' => :'namespace',
31
34
  :'usc_item_id' => :'usc_item_id',
32
35
  :'usc_item_name' => :'usc_item_name'
@@ -42,6 +45,7 @@ module Akeyless
42
45
  def self.openapi_types
43
46
  {
44
47
  :'delete_remote' => :'Boolean',
48
+ :'engine_name' => :'String',
45
49
  :'namespace' => :'String',
46
50
  :'usc_item_id' => :'Integer',
47
51
  :'usc_item_name' => :'String'
@@ -73,6 +77,10 @@ module Akeyless
73
77
  self.delete_remote = attributes[:'delete_remote']
74
78
  end
75
79
 
80
+ if attributes.key?(:'engine_name')
81
+ self.engine_name = attributes[:'engine_name']
82
+ end
83
+
76
84
  if attributes.key?(:'namespace')
77
85
  self.namespace = attributes[:'namespace']
78
86
  end
@@ -107,6 +115,7 @@ module Akeyless
107
115
  return true if self.equal?(o)
108
116
  self.class == o.class &&
109
117
  delete_remote == o.delete_remote &&
118
+ engine_name == o.engine_name &&
110
119
  namespace == o.namespace &&
111
120
  usc_item_id == o.usc_item_id &&
112
121
  usc_item_name == o.usc_item_name
@@ -121,7 +130,7 @@ module Akeyless
121
130
  # Calculates hash code according to all attributes.
122
131
  # @return [Integer] Hash code
123
132
  def hash
124
- [delete_remote, namespace, usc_item_id, usc_item_name].hash
133
+ [delete_remote, engine_name, namespace, usc_item_id, usc_item_name].hash
125
134
  end
126
135
 
127
136
  # Builds the object from hash
@@ -225,6 +225,9 @@ module Akeyless
225
225
  # Target location in Akeyless for imported secrets
226
226
  attr_accessor :target_location
227
227
 
228
+ # Name of existing target to use to create the migration
229
+ attr_accessor :target_name
230
+
228
231
  # Authentication token (see `/auth` and `/configure`)
229
232
  attr_accessor :token
230
233
 
@@ -313,6 +316,7 @@ module Akeyless
313
316
  :'si_users_ignore' => :'si-users-ignore',
314
317
  :'si_users_path_template' => :'si-users-path-template',
315
318
  :'target_location' => :'target-location',
319
+ :'target_name' => :'target-name',
316
320
  :'token' => :'token',
317
321
  :'type' => :'type',
318
322
  :'uid_token' => :'uid-token',
@@ -399,6 +403,7 @@ module Akeyless
399
403
  :'si_users_ignore' => :'String',
400
404
  :'si_users_path_template' => :'String',
401
405
  :'target_location' => :'String',
406
+ :'target_name' => :'String',
402
407
  :'token' => :'String',
403
408
  :'type' => :'String',
404
409
  :'uid_token' => :'String',
@@ -756,6 +761,10 @@ module Akeyless
756
761
  self.target_location = nil
757
762
  end
758
763
 
764
+ if attributes.key?(:'target_name')
765
+ self.target_name = attributes[:'target_name']
766
+ end
767
+
759
768
  if attributes.key?(:'token')
760
769
  self.token = attributes[:'token']
761
770
  end
@@ -892,6 +901,7 @@ module Akeyless
892
901
  si_users_ignore == o.si_users_ignore &&
893
902
  si_users_path_template == o.si_users_path_template &&
894
903
  target_location == o.target_location &&
904
+ target_name == o.target_name &&
895
905
  token == o.token &&
896
906
  type == o.type &&
897
907
  uid_token == o.uid_token &&
@@ -908,7 +918,7 @@ module Akeyless
908
918
  # Calculates hash code according to all attributes.
909
919
  # @return [Integer] Hash code
910
920
  def hash
911
- [service_account_key_decoded, ad_auto_rotate, ad_cert_expiration_event_in, ad_certificates_path_template, ad_computer_base_dn, ad_discover_iis_app, ad_discover_services, ad_discovery_types, ad_domain_name, ad_domain_users_path_template, ad_local_users_ignore, ad_local_users_path_template, ad_os_filter, ad_rotation_hour, ad_rotation_interval, ad_sra_enable_rdp, ad_ssh_port, ad_target_format, ad_target_name, ad_targets_path_template, ad_targets_type, ad_user_base_dn, ad_user_groups, ad_winrm_over_http, ad_winrm_port, ad_discover_local_users, ai_certificate_discovery, aws_key, aws_key_id, aws_region, azure_client_id, azure_kv_name, azure_secret, azure_tenant_id, conjur_account, conjur_api_key, conjur_url, conjur_username, delete_remote, expiration_event_in, gcp_key, gcp_project_id, hashi_json, hashi_metadata_mode, hashi_ns, hashi_token, hashi_url, hosts, json, k8s_ca_certificate, k8s_client_certificate, k8s_client_key, k8s_namespace, k8s_password, k8s_skip_system, k8s_token, k8s_url, k8s_username, name, port_ranges, protection_key, si_auto_rotate, si_rotation_hour, si_rotation_interval, si_sra_enable_rdp, si_target_name, si_user_groups, si_users_ignore, si_users_path_template, target_location, token, type, uid_token, usc_name, use_gw_cloud_identity].hash
921
+ [service_account_key_decoded, ad_auto_rotate, ad_cert_expiration_event_in, ad_certificates_path_template, ad_computer_base_dn, ad_discover_iis_app, ad_discover_services, ad_discovery_types, ad_domain_name, ad_domain_users_path_template, ad_local_users_ignore, ad_local_users_path_template, ad_os_filter, ad_rotation_hour, ad_rotation_interval, ad_sra_enable_rdp, ad_ssh_port, ad_target_format, ad_target_name, ad_targets_path_template, ad_targets_type, ad_user_base_dn, ad_user_groups, ad_winrm_over_http, ad_winrm_port, ad_discover_local_users, ai_certificate_discovery, aws_key, aws_key_id, aws_region, azure_client_id, azure_kv_name, azure_secret, azure_tenant_id, conjur_account, conjur_api_key, conjur_url, conjur_username, delete_remote, expiration_event_in, gcp_key, gcp_project_id, hashi_json, hashi_metadata_mode, hashi_ns, hashi_token, hashi_url, hosts, json, k8s_ca_certificate, k8s_client_certificate, k8s_client_key, k8s_namespace, k8s_password, k8s_skip_system, k8s_token, k8s_url, k8s_username, name, port_ranges, protection_key, si_auto_rotate, si_rotation_hour, si_rotation_interval, si_sra_enable_rdp, si_target_name, si_user_groups, si_users_ignore, si_users_path_template, target_location, target_name, token, type, uid_token, usc_name, use_gw_cloud_identity].hash
912
922
  end
913
923
 
914
924
  # Builds the object from hash
@@ -231,6 +231,9 @@ module Akeyless
231
231
  # Target location in Akeyless for imported secrets
232
232
  attr_accessor :target_location
233
233
 
234
+ # Name of existing target to use to create the migration
235
+ attr_accessor :target_name
236
+
234
237
  # Authentication token (see `/auth` and `/configure`)
235
238
  attr_accessor :token
236
239
 
@@ -318,6 +321,7 @@ module Akeyless
318
321
  :'si_users_ignore' => :'si-users-ignore',
319
322
  :'si_users_path_template' => :'si-users-path-template',
320
323
  :'target_location' => :'target-location',
324
+ :'target_name' => :'target-name',
321
325
  :'token' => :'token',
322
326
  :'uid_token' => :'uid-token',
323
327
  :'usc_name' => :'usc-name',
@@ -405,6 +409,7 @@ module Akeyless
405
409
  :'si_users_ignore' => :'String',
406
410
  :'si_users_path_template' => :'String',
407
411
  :'target_location' => :'String',
412
+ :'target_name' => :'String',
408
413
  :'token' => :'String',
409
414
  :'uid_token' => :'String',
410
415
  :'usc_name' => :'String',
@@ -767,6 +772,10 @@ module Akeyless
767
772
  self.target_location = nil
768
773
  end
769
774
 
775
+ if attributes.key?(:'target_name')
776
+ self.target_name = attributes[:'target_name']
777
+ end
778
+
770
779
  if attributes.key?(:'token')
771
780
  self.token = attributes[:'token']
772
781
  end
@@ -896,6 +905,7 @@ module Akeyless
896
905
  si_users_ignore == o.si_users_ignore &&
897
906
  si_users_path_template == o.si_users_path_template &&
898
907
  target_location == o.target_location &&
908
+ target_name == o.target_name &&
899
909
  token == o.token &&
900
910
  uid_token == o.uid_token &&
901
911
  usc_name == o.usc_name &&
@@ -911,7 +921,7 @@ module Akeyless
911
921
  # Calculates hash code according to all attributes.
912
922
  # @return [Integer] Hash code
913
923
  def hash
914
- [service_account_key_decoded, ad_auto_rotate, ad_cert_expiration_event_in, ad_certificates_path_template, ad_computer_base_dn, ad_discover_iis_app, ad_discover_services, ad_discovery_types, ad_domain_name, ad_domain_users_path_template, ad_local_users_ignore, ad_local_users_path_template, ad_os_filter, ad_rotation_hour, ad_rotation_interval, ad_sra_enable_rdp, ad_ssh_port, ad_target_format, ad_target_name, ad_targets_path_template, ad_targets_type, ad_user_base_dn, ad_user_groups, ad_winrm_over_http, ad_winrm_port, ad_discover_local_users, ai_certificate_discovery, aws_key, aws_key_id, aws_region, azure_client_id, azure_kv_name, azure_secret, azure_tenant_id, conjur_account, conjur_api_key, conjur_url, conjur_username, delete_remote, expiration_event_in, gcp_key, gcp_project_id, hashi_json, hashi_metadata_mode, hashi_ns, hashi_token, hashi_url, hosts, id, json, k8s_ca_certificate, k8s_client_certificate, k8s_client_key, k8s_namespace, k8s_password, k8s_skip_system, k8s_token, k8s_url, k8s_username, name, new_name, port_ranges, protection_key, si_auto_rotate, si_rotation_hour, si_rotation_interval, si_sra_enable_rdp, si_target_name, si_user_groups, si_users_ignore, si_users_path_template, target_location, token, uid_token, usc_name, use_gw_cloud_identity].hash
924
+ [service_account_key_decoded, ad_auto_rotate, ad_cert_expiration_event_in, ad_certificates_path_template, ad_computer_base_dn, ad_discover_iis_app, ad_discover_services, ad_discovery_types, ad_domain_name, ad_domain_users_path_template, ad_local_users_ignore, ad_local_users_path_template, ad_os_filter, ad_rotation_hour, ad_rotation_interval, ad_sra_enable_rdp, ad_ssh_port, ad_target_format, ad_target_name, ad_targets_path_template, ad_targets_type, ad_user_base_dn, ad_user_groups, ad_winrm_over_http, ad_winrm_port, ad_discover_local_users, ai_certificate_discovery, aws_key, aws_key_id, aws_region, azure_client_id, azure_kv_name, azure_secret, azure_tenant_id, conjur_account, conjur_api_key, conjur_url, conjur_username, delete_remote, expiration_event_in, gcp_key, gcp_project_id, hashi_json, hashi_metadata_mode, hashi_ns, hashi_token, hashi_url, hosts, id, json, k8s_ca_certificate, k8s_client_certificate, k8s_client_key, k8s_namespace, k8s_password, k8s_skip_system, k8s_token, k8s_url, k8s_username, name, new_name, port_ranges, protection_key, si_auto_rotate, si_rotation_hour, si_rotation_interval, si_sra_enable_rdp, si_target_name, si_user_groups, si_users_ignore, si_users_path_template, target_location, target_name, token, uid_token, usc_name, use_gw_cloud_identity].hash
915
925
  end
916
926
 
917
927
  # Builds the object from hash
@@ -49,7 +49,7 @@ module Akeyless
49
49
  # Authentication token (see `/auth` and `/configure`)
50
50
  attr_accessor :token
51
51
 
52
- # Updated certificate lifetime in seconds (must be less than the Certificate Issuer default TTL)
52
+ # Updated certificate lifetime in seconds (must be less than the Certificate Issuer default TTL). Ignored for Let's Encrypt public CA issuers, which always use the CA default lifetime (about 90 days).
53
53
  attr_accessor :ttl
54
54
 
55
55
  # The universal identity token, Required only for universal_identity authentication
@@ -45,7 +45,7 @@ module Akeyless
45
45
  # Authentication token (see `/auth` and `/configure`)
46
46
  attr_accessor :token
47
47
 
48
- # Updated certificate lifetime in seconds (must be less than the Certificate Issuer default TTL)
48
+ # Updated certificate lifetime in seconds (must be less than the Certificate Issuer default TTL). Ignored for Let's Encrypt public CA issuers, which always use the CA default lifetime (about 90 days).
49
49
  attr_accessor :ttl
50
50
 
51
51
  # The universal identity token, Required only for universal_identity authentication
@@ -0,0 +1,234 @@
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
+ # GrokTargetDetails defines details related to connecting to an xAI (Grok) provider. Grok exposes an OpenAI-compatible REST API, so the agent layer reuses the OpenAI client with a custom BaseURL.
18
+ class GrokTargetDetails
19
+ attr_accessor :api_key
20
+
21
+ attr_accessor :grok_url
22
+
23
+ # TeamID is the xAI team this API key belongs to. Stored only; not sent to xAI by the gateway.
24
+ attr_accessor :team_id
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'api_key' => :'api_key',
30
+ :'grok_url' => :'grok_url',
31
+ :'team_id' => :'team_id'
32
+ }
33
+ end
34
+
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ attribute_map.values
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'api_key' => :'String',
44
+ :'grok_url' => :'String',
45
+ :'team_id' => :'String'
46
+ }
47
+ end
48
+
49
+ # List of attributes with nullable: true
50
+ def self.openapi_nullable
51
+ Set.new([
52
+ ])
53
+ end
54
+
55
+ # Initializes the object
56
+ # @param [Hash] attributes Model attributes in the form of hash
57
+ def initialize(attributes = {})
58
+ if (!attributes.is_a?(Hash))
59
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::GrokTargetDetails` initialize method"
60
+ end
61
+
62
+ # check to see if the attribute exists and convert string to symbol for hash key
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!self.class.attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::GrokTargetDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'api_key')
71
+ self.api_key = attributes[:'api_key']
72
+ end
73
+
74
+ if attributes.key?(:'grok_url')
75
+ self.grok_url = attributes[:'grok_url']
76
+ end
77
+
78
+ if attributes.key?(:'team_id')
79
+ self.team_id = attributes[:'team_id']
80
+ end
81
+ end
82
+
83
+ # Show invalid properties with the reasons. Usually used together with valid?
84
+ # @return Array for valid properties with the reasons
85
+ def list_invalid_properties
86
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
87
+ invalid_properties = Array.new
88
+ invalid_properties
89
+ end
90
+
91
+ # Check to see if the all the properties in the model are valid
92
+ # @return true if the model is valid
93
+ def valid?
94
+ warn '[DEPRECATED] the `valid?` method is obsolete'
95
+ true
96
+ end
97
+
98
+ # Checks equality by comparing each attribute.
99
+ # @param [Object] Object to be compared
100
+ def ==(o)
101
+ return true if self.equal?(o)
102
+ self.class == o.class &&
103
+ api_key == o.api_key &&
104
+ grok_url == o.grok_url &&
105
+ team_id == o.team_id
106
+ end
107
+
108
+ # @see the `==` method
109
+ # @param [Object] Object to be compared
110
+ def eql?(o)
111
+ self == o
112
+ end
113
+
114
+ # Calculates hash code according to all attributes.
115
+ # @return [Integer] Hash code
116
+ def hash
117
+ [api_key, grok_url, team_id].hash
118
+ end
119
+
120
+ # Builds the object from hash
121
+ # @param [Hash] attributes Model attributes in the form of hash
122
+ # @return [Object] Returns the model itself
123
+ def self.build_from_hash(attributes)
124
+ return nil unless attributes.is_a?(Hash)
125
+ attributes = attributes.transform_keys(&:to_sym)
126
+ transformed_hash = {}
127
+ openapi_types.each_pair do |key, type|
128
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
129
+ transformed_hash["#{key}"] = nil
130
+ elsif type =~ /\AArray<(.*)>/i
131
+ # check to ensure the input is an array given that the attribute
132
+ # is documented as an array but the input is not
133
+ if attributes[attribute_map[key]].is_a?(Array)
134
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
135
+ end
136
+ elsif !attributes[attribute_map[key]].nil?
137
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
138
+ end
139
+ end
140
+ new(transformed_hash)
141
+ end
142
+
143
+ # Deserializes the data based on type
144
+ # @param string type Data type
145
+ # @param string value Value to be deserialized
146
+ # @return [Object] Deserialized data
147
+ def self._deserialize(type, value)
148
+ case type.to_sym
149
+ when :Time
150
+ Time.parse(value)
151
+ when :Date
152
+ Date.parse(value)
153
+ when :String
154
+ value.to_s
155
+ when :Integer
156
+ value.to_i
157
+ when :Float
158
+ value.to_f
159
+ when :Boolean
160
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
161
+ true
162
+ else
163
+ false
164
+ end
165
+ when :Object
166
+ # generic object (usually a Hash), return directly
167
+ value
168
+ when /\AArray<(?<inner_type>.+)>\z/
169
+ inner_type = Regexp.last_match[:inner_type]
170
+ value.map { |v| _deserialize(inner_type, v) }
171
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
172
+ k_type = Regexp.last_match[:k_type]
173
+ v_type = Regexp.last_match[:v_type]
174
+ {}.tap do |hash|
175
+ value.each do |k, v|
176
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
177
+ end
178
+ end
179
+ else # model
180
+ # models (e.g. Pet) or oneOf
181
+ klass = Akeyless.const_get(type)
182
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
183
+ end
184
+ end
185
+
186
+ # Returns the string representation of the object
187
+ # @return [String] String presentation of the object
188
+ def to_s
189
+ to_hash.to_s
190
+ end
191
+
192
+ # to_body is an alias to to_hash (backward compatibility)
193
+ # @return [Hash] Returns the object in the form of hash
194
+ def to_body
195
+ to_hash
196
+ end
197
+
198
+ # Returns the object in the form of hash
199
+ # @return [Hash] Returns the object in the form of hash
200
+ def to_hash
201
+ hash = {}
202
+ self.class.attribute_map.each_pair do |attr, param|
203
+ value = self.send(attr)
204
+ if value.nil?
205
+ is_nullable = self.class.openapi_nullable.include?(attr)
206
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
207
+ end
208
+
209
+ hash[param] = _to_hash(value)
210
+ end
211
+ hash
212
+ end
213
+
214
+ # Outputs non-array value in the form of hash
215
+ # For object, use to_hash. Otherwise, just return the value
216
+ # @param [Object] value Any valid value
217
+ # @return [Hash] Returns the value in the form of hash
218
+ def _to_hash(value)
219
+ if value.is_a?(Array)
220
+ value.compact.map { |v| _to_hash(v) }
221
+ elsif value.is_a?(Hash)
222
+ {}.tap do |hash|
223
+ value.each { |k, v| hash[k] = _to_hash(v) }
224
+ end
225
+ elsif value.respond_to? :to_hash
226
+ value.to_hash
227
+ else
228
+ value
229
+ end
230
+ end
231
+
232
+ end
233
+
234
+ end