akeyless 5.0.22 → 5.0.24

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 (312) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +33 -5
  3. data/docs/AccountGeneralSettings.md +4 -0
  4. data/docs/AgenticRule.md +20 -0
  5. data/docs/AgenticRules.md +20 -0
  6. data/docs/AuthMethodCreateUniversalIdentity.md +4 -0
  7. data/docs/AuthMethodUpdateUniversalIdentity.md +4 -0
  8. data/docs/AwsStorage.md +2 -0
  9. data/docs/CreateAuthMethodUniversalIdentity.md +4 -0
  10. data/docs/CreateRole.md +2 -0
  11. data/docs/CreateRotatedSecret.md +3 -1
  12. data/docs/CreateSecret.md +2 -0
  13. data/docs/CreateUSC.md +6 -2
  14. data/docs/DSProducerDetails.md +2 -0
  15. data/docs/DeleteRoleRule.md +1 -1
  16. data/docs/DescribePermissions.md +1 -1
  17. data/docs/DigiCertTargetDetails.md +42 -0
  18. data/docs/EsmListSecretsOutput.md +5 -1
  19. data/docs/GatewayCreateMigration.md +4 -0
  20. data/docs/GatewayMigrationCreateOutput.md +2 -0
  21. data/docs/GatewayUpdateMigration.md +4 -0
  22. data/docs/GatewayUpdateRemoteAccessRdpRecordings.md +2 -0
  23. data/docs/GeneralConfigPart.md +4 -0
  24. data/docs/GoogleTrustTargetDetails.md +42 -0
  25. data/docs/HashiPayload.md +5 -1
  26. data/docs/Item.md +2 -0
  27. data/docs/ItemGeneralInfo.md +2 -0
  28. data/docs/ItemLockingSetting.md +20 -0
  29. data/docs/ListItems.md +2 -0
  30. data/docs/LockItem.md +28 -0
  31. data/docs/LockTarget.md +28 -0
  32. data/docs/LockingInfo.md +24 -0
  33. data/docs/MigrationStatusReplyObj.md +2 -0
  34. data/docs/NetappStorage.md +30 -0
  35. data/docs/ReverseRBAC.md +1 -1
  36. data/docs/RotatedSecretCreateAws.md +3 -1
  37. data/docs/RotatedSecretCreateAzure.md +3 -1
  38. data/docs/RotatedSecretCreateCustom.md +3 -1
  39. data/docs/RotatedSecretCreateLdap.md +3 -1
  40. data/docs/RotatedSecretCreateMongodb.md +3 -1
  41. data/docs/RotatedSecretCreateMssql.md +3 -1
  42. data/docs/RotatedSecretCreateMysql.md +3 -1
  43. data/docs/RotatedSecretCreateOracledb.md +3 -1
  44. data/docs/RotatedSecretCreatePostgresql.md +3 -1
  45. data/docs/RotatedSecretCreateRedshift.md +3 -1
  46. data/docs/RotatedSecretCreateSsh.md +3 -1
  47. data/docs/RotatedSecretCreateWindows.md +3 -1
  48. data/docs/RotatedSecretUpdateAws.md +3 -1
  49. data/docs/RotatedSecretUpdateAzure.md +3 -1
  50. data/docs/RotatedSecretUpdateCustom.md +3 -1
  51. data/docs/RotatedSecretUpdateLdap.md +3 -1
  52. data/docs/RotatedSecretUpdateMongodb.md +3 -1
  53. data/docs/RotatedSecretUpdateMssql.md +3 -1
  54. data/docs/RotatedSecretUpdateMysql.md +3 -1
  55. data/docs/RotatedSecretUpdateOracledb.md +3 -1
  56. data/docs/RotatedSecretUpdatePostgresql.md +3 -1
  57. data/docs/RotatedSecretUpdateRedshift.md +3 -1
  58. data/docs/RotatedSecretUpdateSsh.md +3 -1
  59. data/docs/RotatedSecretUpdateWindows.md +3 -1
  60. data/docs/RuntimeAuthorityCommand.md +28 -0
  61. data/docs/SecretInfo.md +2 -0
  62. data/docs/SecureRemoteAccess.md +4 -0
  63. data/docs/SetDefaultProfile.md +20 -0
  64. data/docs/SetDefaultProfileOutput.md +18 -0
  65. data/docs/SetRoleRule.md +1 -1
  66. data/docs/SyncCounters.md +22 -0
  67. data/docs/SystemAccessCredentialsReplyObj.md +2 -0
  68. data/docs/Target.md +4 -0
  69. data/docs/TargetCreateArtifactory.md +2 -0
  70. data/docs/TargetCreateAws.md +2 -0
  71. data/docs/TargetCreateAzure.md +2 -0
  72. data/docs/TargetCreateDB.md +2 -0
  73. data/docs/TargetCreateDigiCert.md +52 -0
  74. data/docs/TargetCreateDockerhub.md +2 -0
  75. data/docs/TargetCreateEks.md +2 -0
  76. data/docs/TargetCreateGcp.md +2 -0
  77. data/docs/TargetCreateGemini.md +2 -0
  78. data/docs/TargetCreateGithub.md +2 -0
  79. data/docs/TargetCreateGitlab.md +2 -0
  80. data/docs/TargetCreateGke.md +2 -0
  81. data/docs/TargetCreateGlobalSign.md +2 -0
  82. data/docs/TargetCreateGlobalSignAtlas.md +2 -0
  83. data/docs/TargetCreateGodaddy.md +2 -0
  84. data/docs/TargetCreateGoogleTrust.md +52 -0
  85. data/docs/TargetCreateHashiVault.md +2 -0
  86. data/docs/TargetCreateK8s.md +2 -0
  87. data/docs/TargetCreateLdap.md +2 -0
  88. data/docs/TargetCreateLetsEncrypt.md +3 -1
  89. data/docs/TargetCreateLinked.md +2 -0
  90. data/docs/TargetCreateOpenAI.md +2 -0
  91. data/docs/TargetCreatePing.md +2 -0
  92. data/docs/TargetCreateRabbitMq.md +2 -0
  93. data/docs/TargetCreateSalesforce.md +2 -0
  94. data/docs/TargetCreateSectigo.md +2 -0
  95. data/docs/TargetCreateSplunk.md +5 -1
  96. data/docs/TargetCreateSsh.md +2 -0
  97. data/docs/TargetCreateWeb.md +2 -0
  98. data/docs/TargetCreateWindows.md +2 -0
  99. data/docs/TargetCreateZeroSSL.md +2 -0
  100. data/docs/TargetTypeDetailsInput.md +4 -0
  101. data/docs/TargetUpdateArtifactory.md +2 -0
  102. data/docs/TargetUpdateAws.md +2 -0
  103. data/docs/TargetUpdateAzure.md +2 -0
  104. data/docs/TargetUpdateDB.md +2 -0
  105. data/docs/TargetUpdateDigiCert.md +54 -0
  106. data/docs/TargetUpdateDockerhub.md +2 -0
  107. data/docs/TargetUpdateEks.md +2 -0
  108. data/docs/TargetUpdateGcp.md +2 -0
  109. data/docs/TargetUpdateGemini.md +2 -0
  110. data/docs/TargetUpdateGithub.md +2 -0
  111. data/docs/TargetUpdateGitlab.md +2 -0
  112. data/docs/TargetUpdateGke.md +2 -0
  113. data/docs/TargetUpdateGlobalSign.md +2 -0
  114. data/docs/TargetUpdateGlobalSignAtlas.md +2 -0
  115. data/docs/TargetUpdateGodaddy.md +2 -0
  116. data/docs/TargetUpdateGoogleTrust.md +56 -0
  117. data/docs/TargetUpdateHashiVault.md +2 -0
  118. data/docs/TargetUpdateK8s.md +2 -0
  119. data/docs/TargetUpdateLdap.md +2 -0
  120. data/docs/TargetUpdateLetsEncrypt.md +3 -1
  121. data/docs/TargetUpdateOpenAI.md +2 -0
  122. data/docs/TargetUpdatePing.md +2 -0
  123. data/docs/TargetUpdateRabbitMq.md +2 -0
  124. data/docs/TargetUpdateSalesforce.md +2 -0
  125. data/docs/TargetUpdateSectigo.md +2 -0
  126. data/docs/TargetUpdateSsh.md +2 -0
  127. data/docs/TargetUpdateWeb.md +2 -0
  128. data/docs/TargetUpdateWindows.md +2 -0
  129. data/docs/TargetUpdateZeroSSL.md +2 -0
  130. data/docs/UniversalIdentityAccessRules.md +4 -0
  131. data/docs/UnlockItem.md +24 -0
  132. data/docs/UnlockTarget.md +24 -0
  133. data/docs/UpdateAccountSettings.md +4 -0
  134. data/docs/UpdateAuthMethodUniversalIdentity.md +4 -0
  135. data/docs/UpdateItem.md +8 -2
  136. data/docs/UpdateRole.md +2 -0
  137. data/docs/UpdateRotatedSecret.md +3 -1
  138. data/docs/UpdateTarget.md +2 -0
  139. data/docs/UscCreate.md +2 -0
  140. data/docs/UscDelete.md +4 -0
  141. data/docs/UscGet.md +4 -0
  142. data/docs/UscList.md +4 -0
  143. data/docs/UscListSecretsOutput.md +5 -1
  144. data/docs/UscUpdate.md +4 -0
  145. data/docs/V2Api.md +572 -6
  146. data/docs/WebBastionRdpRecord.md +2 -0
  147. data/lib/akeyless/api/v2_api.rb +580 -4
  148. data/lib/akeyless/models/account_general_settings.rb +19 -1
  149. data/lib/akeyless/models/agentic_rule.rb +223 -0
  150. data/lib/akeyless/models/agentic_rules.rb +227 -0
  151. data/lib/akeyless/models/auth_method_create_universal_identity.rb +25 -1
  152. data/lib/akeyless/models/auth_method_update_universal_identity.rb +25 -1
  153. data/lib/akeyless/models/aws_storage.rb +10 -1
  154. data/lib/akeyless/models/create_auth_method_universal_identity.rb +25 -1
  155. data/lib/akeyless/models/create_role.rb +11 -1
  156. data/lib/akeyless/models/create_rotated_secret.rb +12 -4
  157. data/lib/akeyless/models/create_secret.rb +11 -1
  158. data/lib/akeyless/models/create_usc.rb +25 -5
  159. data/lib/akeyless/models/delete_role_rule.rb +1 -1
  160. data/lib/akeyless/models/describe_permissions.rb +1 -1
  161. data/lib/akeyless/models/digi_cert_target_details.rb +333 -0
  162. data/lib/akeyless/models/ds_producer_details.rb +10 -1
  163. data/lib/akeyless/models/esm_list_secrets_output.rb +24 -4
  164. data/lib/akeyless/models/gateway_create_migration.rb +21 -1
  165. data/lib/akeyless/models/gateway_migration_create_output.rb +10 -1
  166. data/lib/akeyless/models/gateway_update_migration.rb +21 -1
  167. data/lib/akeyless/models/gateway_update_remote_access_rdp_recordings.rb +11 -1
  168. data/lib/akeyless/models/general_config_part.rb +19 -1
  169. data/lib/akeyless/models/google_trust_target_details.rb +335 -0
  170. data/lib/akeyless/models/hashi_payload.rb +22 -4
  171. data/lib/akeyless/models/item.rb +10 -1
  172. data/lib/akeyless/models/item_general_info.rb +10 -1
  173. data/lib/akeyless/models/item_locking_setting.rb +223 -0
  174. data/lib/akeyless/models/list_items.rb +13 -1
  175. data/lib/akeyless/models/lock_item.rb +274 -0
  176. data/lib/akeyless/models/lock_target.rb +274 -0
  177. data/lib/akeyless/models/locking_info.rb +243 -0
  178. data/lib/akeyless/models/migration_status_reply_obj.rb +10 -1
  179. data/lib/akeyless/models/netapp_storage.rb +268 -0
  180. data/lib/akeyless/models/reverse_rbac.rb +1 -1
  181. data/lib/akeyless/models/rotated_secret_create_aws.rb +12 -4
  182. data/lib/akeyless/models/rotated_secret_create_azure.rb +12 -4
  183. data/lib/akeyless/models/rotated_secret_create_custom.rb +12 -4
  184. data/lib/akeyless/models/rotated_secret_create_ldap.rb +12 -4
  185. data/lib/akeyless/models/rotated_secret_create_mongodb.rb +12 -4
  186. data/lib/akeyless/models/rotated_secret_create_mssql.rb +12 -4
  187. data/lib/akeyless/models/rotated_secret_create_mysql.rb +12 -4
  188. data/lib/akeyless/models/rotated_secret_create_oracledb.rb +12 -4
  189. data/lib/akeyless/models/rotated_secret_create_postgresql.rb +12 -4
  190. data/lib/akeyless/models/rotated_secret_create_redshift.rb +12 -4
  191. data/lib/akeyless/models/rotated_secret_create_ssh.rb +12 -4
  192. data/lib/akeyless/models/rotated_secret_create_windows.rb +12 -4
  193. data/lib/akeyless/models/rotated_secret_update_aws.rb +12 -4
  194. data/lib/akeyless/models/rotated_secret_update_azure.rb +12 -4
  195. data/lib/akeyless/models/rotated_secret_update_custom.rb +12 -4
  196. data/lib/akeyless/models/rotated_secret_update_ldap.rb +12 -4
  197. data/lib/akeyless/models/rotated_secret_update_mongodb.rb +12 -4
  198. data/lib/akeyless/models/rotated_secret_update_mssql.rb +12 -4
  199. data/lib/akeyless/models/rotated_secret_update_mysql.rb +12 -4
  200. data/lib/akeyless/models/rotated_secret_update_oracledb.rb +12 -4
  201. data/lib/akeyless/models/rotated_secret_update_postgresql.rb +12 -4
  202. data/lib/akeyless/models/rotated_secret_update_redshift.rb +12 -4
  203. data/lib/akeyless/models/rotated_secret_update_ssh.rb +12 -4
  204. data/lib/akeyless/models/rotated_secret_update_windows.rb +12 -4
  205. data/lib/akeyless/models/runtime_authority_command.rb +288 -0
  206. data/lib/akeyless/models/secret_info.rb +10 -1
  207. data/lib/akeyless/models/secure_remote_access.rb +19 -1
  208. data/lib/akeyless/models/set_default_profile.rb +234 -0
  209. data/lib/akeyless/models/set_default_profile_output.rb +214 -0
  210. data/lib/akeyless/models/set_role_rule.rb +1 -1
  211. data/lib/akeyless/models/sync_counters.rb +233 -0
  212. data/lib/akeyless/models/system_access_credentials_reply_obj.rb +11 -1
  213. data/lib/akeyless/models/target.rb +19 -1
  214. data/lib/akeyless/models/target_create_artifactory.rb +11 -1
  215. data/lib/akeyless/models/target_create_aws.rb +11 -1
  216. data/lib/akeyless/models/target_create_azure.rb +11 -1
  217. data/lib/akeyless/models/target_create_db.rb +11 -1
  218. data/lib/akeyless/models/target_create_digi_cert.rb +408 -0
  219. data/lib/akeyless/models/target_create_dockerhub.rb +11 -1
  220. data/lib/akeyless/models/target_create_eks.rb +11 -1
  221. data/lib/akeyless/models/target_create_gcp.rb +11 -1
  222. data/lib/akeyless/models/target_create_gemini.rb +11 -1
  223. data/lib/akeyless/models/target_create_github.rb +11 -1
  224. data/lib/akeyless/models/target_create_gitlab.rb +11 -1
  225. data/lib/akeyless/models/target_create_gke.rb +11 -1
  226. data/lib/akeyless/models/target_create_global_sign.rb +11 -1
  227. data/lib/akeyless/models/target_create_global_sign_atlas.rb +11 -1
  228. data/lib/akeyless/models/target_create_godaddy.rb +11 -1
  229. data/lib/akeyless/models/target_create_google_trust.rb +408 -0
  230. data/lib/akeyless/models/target_create_hashi_vault.rb +11 -1
  231. data/lib/akeyless/models/target_create_k8s.rb +11 -1
  232. data/lib/akeyless/models/target_create_ldap.rb +11 -1
  233. data/lib/akeyless/models/target_create_lets_encrypt.rb +18 -1
  234. data/lib/akeyless/models/target_create_linked.rb +11 -1
  235. data/lib/akeyless/models/target_create_open_ai.rb +11 -1
  236. data/lib/akeyless/models/target_create_ping.rb +11 -1
  237. data/lib/akeyless/models/target_create_rabbit_mq.rb +11 -1
  238. data/lib/akeyless/models/target_create_salesforce.rb +11 -1
  239. data/lib/akeyless/models/target_create_sectigo.rb +11 -1
  240. data/lib/akeyless/models/target_create_splunk.rb +21 -1
  241. data/lib/akeyless/models/target_create_ssh.rb +11 -1
  242. data/lib/akeyless/models/target_create_web.rb +11 -1
  243. data/lib/akeyless/models/target_create_windows.rb +11 -1
  244. data/lib/akeyless/models/target_create_zero_ssl.rb +11 -1
  245. data/lib/akeyless/models/target_type_details_input.rb +19 -1
  246. data/lib/akeyless/models/target_update_artifactory.rb +11 -1
  247. data/lib/akeyless/models/target_update_aws.rb +11 -1
  248. data/lib/akeyless/models/target_update_azure.rb +11 -1
  249. data/lib/akeyless/models/target_update_db.rb +11 -1
  250. data/lib/akeyless/models/target_update_digi_cert.rb +418 -0
  251. data/lib/akeyless/models/target_update_dockerhub.rb +11 -1
  252. data/lib/akeyless/models/target_update_eks.rb +11 -1
  253. data/lib/akeyless/models/target_update_gcp.rb +11 -1
  254. data/lib/akeyless/models/target_update_gemini.rb +11 -1
  255. data/lib/akeyless/models/target_update_github.rb +11 -1
  256. data/lib/akeyless/models/target_update_gitlab.rb +11 -1
  257. data/lib/akeyless/models/target_update_gke.rb +11 -1
  258. data/lib/akeyless/models/target_update_global_sign.rb +11 -1
  259. data/lib/akeyless/models/target_update_global_sign_atlas.rb +11 -1
  260. data/lib/akeyless/models/target_update_godaddy.rb +11 -1
  261. data/lib/akeyless/models/target_update_google_trust.rb +428 -0
  262. data/lib/akeyless/models/target_update_hashi_vault.rb +11 -1
  263. data/lib/akeyless/models/target_update_k8s.rb +11 -1
  264. data/lib/akeyless/models/target_update_ldap.rb +11 -1
  265. data/lib/akeyless/models/target_update_lets_encrypt.rb +18 -1
  266. data/lib/akeyless/models/target_update_open_ai.rb +11 -1
  267. data/lib/akeyless/models/target_update_ping.rb +11 -1
  268. data/lib/akeyless/models/target_update_rabbit_mq.rb +11 -1
  269. data/lib/akeyless/models/target_update_salesforce.rb +11 -1
  270. data/lib/akeyless/models/target_update_sectigo.rb +11 -1
  271. data/lib/akeyless/models/target_update_ssh.rb +11 -1
  272. data/lib/akeyless/models/target_update_web.rb +11 -1
  273. data/lib/akeyless/models/target_update_windows.rb +11 -1
  274. data/lib/akeyless/models/target_update_zero_ssl.rb +11 -1
  275. data/lib/akeyless/models/universal_identity_access_rules.rb +19 -1
  276. data/lib/akeyless/models/unlock_item.rb +254 -0
  277. data/lib/akeyless/models/unlock_target.rb +254 -0
  278. data/lib/akeyless/models/update_account_settings.rb +21 -1
  279. data/lib/akeyless/models/update_auth_method_universal_identity.rb +25 -1
  280. data/lib/akeyless/models/update_item.rb +35 -7
  281. data/lib/akeyless/models/update_role.rb +11 -1
  282. data/lib/akeyless/models/update_rotated_secret.rb +12 -4
  283. data/lib/akeyless/models/update_target.rb +11 -1
  284. data/lib/akeyless/models/usc_create.rb +10 -1
  285. data/lib/akeyless/models/usc_delete.rb +20 -1
  286. data/lib/akeyless/models/usc_get.rb +20 -1
  287. data/lib/akeyless/models/usc_list.rb +21 -1
  288. data/lib/akeyless/models/usc_list_secrets_output.rb +24 -4
  289. data/lib/akeyless/models/usc_update.rb +20 -1
  290. data/lib/akeyless/models/web_bastion_rdp_record.rb +10 -1
  291. data/lib/akeyless/version.rb +1 -1
  292. data/lib/akeyless.rb +19 -0
  293. data/spec/models/agentic_rule_spec.rb +42 -0
  294. data/spec/models/agentic_rules_spec.rb +42 -0
  295. data/spec/models/digi_cert_target_details_spec.rb +108 -0
  296. data/spec/models/google_trust_target_details_spec.rb +108 -0
  297. data/spec/models/item_locking_setting_spec.rb +42 -0
  298. data/spec/models/lock_item_spec.rb +66 -0
  299. data/spec/models/lock_target_spec.rb +66 -0
  300. data/spec/models/locking_info_spec.rb +54 -0
  301. data/spec/models/netapp_storage_spec.rb +72 -0
  302. data/spec/models/runtime_authority_command_spec.rb +66 -0
  303. data/spec/models/set_default_profile_output_spec.rb +36 -0
  304. data/spec/models/set_default_profile_spec.rb +42 -0
  305. data/spec/models/sync_counters_spec.rb +48 -0
  306. data/spec/models/target_create_digi_cert_spec.rb +132 -0
  307. data/spec/models/target_create_google_trust_spec.rb +132 -0
  308. data/spec/models/target_update_digi_cert_spec.rb +144 -0
  309. data/spec/models/target_update_google_trust_spec.rb +144 -0
  310. data/spec/models/unlock_item_spec.rb +54 -0
  311. data/spec/models/unlock_target_spec.rb +54 -0
  312. metadata +1226 -1147
@@ -15,6 +15,9 @@ require 'time'
15
15
 
16
16
  module Akeyless
17
17
  class TargetUpdateGitlab
18
+ # Protection from accidental deletion of this object [true/false]
19
+ attr_accessor :delete_protection
20
+
18
21
  # Description of the object
19
22
  attr_accessor :description
20
23
 
@@ -54,6 +57,7 @@ module Akeyless
54
57
  # Attribute mapping from ruby-style variable name to JSON key.
55
58
  def self.attribute_map
56
59
  {
60
+ :'delete_protection' => :'delete_protection',
57
61
  :'description' => :'description',
58
62
  :'gitlab_access_token' => :'gitlab-access-token',
59
63
  :'gitlab_certificate' => :'gitlab-certificate',
@@ -77,6 +81,7 @@ module Akeyless
77
81
  # Attribute type mapping.
78
82
  def self.openapi_types
79
83
  {
84
+ :'delete_protection' => :'String',
80
85
  :'description' => :'String',
81
86
  :'gitlab_access_token' => :'String',
82
87
  :'gitlab_certificate' => :'String',
@@ -113,6 +118,10 @@ module Akeyless
113
118
  h[k.to_sym] = v
114
119
  }
115
120
 
121
+ if attributes.key?(:'delete_protection')
122
+ self.delete_protection = attributes[:'delete_protection']
123
+ end
124
+
116
125
  if attributes.key?(:'description')
117
126
  self.description = attributes[:'description']
118
127
  end
@@ -193,6 +202,7 @@ module Akeyless
193
202
  def ==(o)
194
203
  return true if self.equal?(o)
195
204
  self.class == o.class &&
205
+ delete_protection == o.delete_protection &&
196
206
  description == o.description &&
197
207
  gitlab_access_token == o.gitlab_access_token &&
198
208
  gitlab_certificate == o.gitlab_certificate &&
@@ -216,7 +226,7 @@ module Akeyless
216
226
  # Calculates hash code according to all attributes.
217
227
  # @return [Integer] Hash code
218
228
  def hash
219
- [description, gitlab_access_token, gitlab_certificate, gitlab_url, json, keep_prev_version, key, max_versions, name, new_name, token, uid_token].hash
229
+ [delete_protection, description, gitlab_access_token, gitlab_certificate, gitlab_url, json, keep_prev_version, key, max_versions, name, new_name, token, uid_token].hash
220
230
  end
221
231
 
222
232
  # Builds the object from hash
@@ -15,6 +15,9 @@ require 'time'
15
15
 
16
16
  module Akeyless
17
17
  class TargetUpdateGke
18
+ # Protection from accidental deletion of this object [true/false]
19
+ attr_accessor :delete_protection
20
+
18
21
  # Description of the object
19
22
  attr_accessor :description
20
23
 
@@ -62,6 +65,7 @@ module Akeyless
62
65
  # Attribute mapping from ruby-style variable name to JSON key.
63
66
  def self.attribute_map
64
67
  {
68
+ :'delete_protection' => :'delete_protection',
65
69
  :'description' => :'description',
66
70
  :'gke_account_key' => :'gke-account-key',
67
71
  :'gke_cluster_cert' => :'gke-cluster-cert',
@@ -88,6 +92,7 @@ module Akeyless
88
92
  # Attribute type mapping.
89
93
  def self.openapi_types
90
94
  {
95
+ :'delete_protection' => :'String',
91
96
  :'description' => :'String',
92
97
  :'gke_account_key' => :'String',
93
98
  :'gke_cluster_cert' => :'String',
@@ -127,6 +132,10 @@ module Akeyless
127
132
  h[k.to_sym] = v
128
133
  }
129
134
 
135
+ if attributes.key?(:'delete_protection')
136
+ self.delete_protection = attributes[:'delete_protection']
137
+ end
138
+
130
139
  if attributes.key?(:'description')
131
140
  self.description = attributes[:'description']
132
141
  end
@@ -217,6 +226,7 @@ module Akeyless
217
226
  def ==(o)
218
227
  return true if self.equal?(o)
219
228
  self.class == o.class &&
229
+ delete_protection == o.delete_protection &&
220
230
  description == o.description &&
221
231
  gke_account_key == o.gke_account_key &&
222
232
  gke_cluster_cert == o.gke_cluster_cert &&
@@ -243,7 +253,7 @@ module Akeyless
243
253
  # Calculates hash code according to all attributes.
244
254
  # @return [Integer] Hash code
245
255
  def hash
246
- [description, gke_account_key, gke_cluster_cert, gke_cluster_endpoint, gke_cluster_name, gke_service_account_email, json, keep_prev_version, key, max_versions, name, new_name, token, uid_token, use_gw_cloud_identity].hash
256
+ [delete_protection, description, gke_account_key, gke_cluster_cert, gke_cluster_endpoint, gke_cluster_name, gke_service_account_email, json, keep_prev_version, key, max_versions, name, new_name, token, uid_token, use_gw_cloud_identity].hash
247
257
  end
248
258
 
249
259
  # Builds the object from hash
@@ -27,6 +27,9 @@ module Akeyless
27
27
  # Telephone of the GlobalSign GCC account contact
28
28
  attr_accessor :contact_phone
29
29
 
30
+ # Protection from accidental deletion of this object [true/false]
31
+ attr_accessor :delete_protection
32
+
30
33
  # Description of the object
31
34
  attr_accessor :description
32
35
 
@@ -73,6 +76,7 @@ module Akeyless
73
76
  :'contact_first_name' => :'contact-first-name',
74
77
  :'contact_last_name' => :'contact-last-name',
75
78
  :'contact_phone' => :'contact-phone',
79
+ :'delete_protection' => :'delete_protection',
76
80
  :'description' => :'description',
77
81
  :'json' => :'json',
78
82
  :'keep_prev_version' => :'keep-prev-version',
@@ -101,6 +105,7 @@ module Akeyless
101
105
  :'contact_first_name' => :'String',
102
106
  :'contact_last_name' => :'String',
103
107
  :'contact_phone' => :'String',
108
+ :'delete_protection' => :'String',
104
109
  :'description' => :'String',
105
110
  :'json' => :'Boolean',
106
111
  :'keep_prev_version' => :'String',
@@ -162,6 +167,10 @@ module Akeyless
162
167
  self.contact_phone = nil
163
168
  end
164
169
 
170
+ if attributes.key?(:'delete_protection')
171
+ self.delete_protection = attributes[:'delete_protection']
172
+ end
173
+
165
174
  if attributes.key?(:'description')
166
175
  self.description = attributes[:'description']
167
176
  end
@@ -291,6 +300,7 @@ module Akeyless
291
300
  contact_first_name == o.contact_first_name &&
292
301
  contact_last_name == o.contact_last_name &&
293
302
  contact_phone == o.contact_phone &&
303
+ delete_protection == o.delete_protection &&
294
304
  description == o.description &&
295
305
  json == o.json &&
296
306
  keep_prev_version == o.keep_prev_version &&
@@ -315,7 +325,7 @@ module Akeyless
315
325
  # Calculates hash code according to all attributes.
316
326
  # @return [Integer] Hash code
317
327
  def hash
318
- [contact_email, contact_first_name, contact_last_name, contact_phone, description, json, keep_prev_version, key, max_versions, name, new_name, password, profile_id, timeout, token, uid_token, username].hash
328
+ [contact_email, contact_first_name, contact_last_name, contact_phone, delete_protection, description, json, keep_prev_version, key, max_versions, name, new_name, password, profile_id, timeout, token, uid_token, username].hash
319
329
  end
320
330
 
321
331
  # Builds the object from hash
@@ -21,6 +21,9 @@ module Akeyless
21
21
  # API Secret of the GlobalSign Atlas account
22
22
  attr_accessor :api_secret
23
23
 
24
+ # Protection from accidental deletion of this object [true/false]
25
+ attr_accessor :delete_protection
26
+
24
27
  # Description of the object
25
28
  attr_accessor :description
26
29
 
@@ -62,6 +65,7 @@ module Akeyless
62
65
  {
63
66
  :'api_key' => :'api-key',
64
67
  :'api_secret' => :'api-secret',
68
+ :'delete_protection' => :'delete_protection',
65
69
  :'description' => :'description',
66
70
  :'json' => :'json',
67
71
  :'keep_prev_version' => :'keep-prev-version',
@@ -87,6 +91,7 @@ module Akeyless
87
91
  {
88
92
  :'api_key' => :'String',
89
93
  :'api_secret' => :'String',
94
+ :'delete_protection' => :'String',
90
95
  :'description' => :'String',
91
96
  :'json' => :'Boolean',
92
97
  :'keep_prev_version' => :'String',
@@ -135,6 +140,10 @@ module Akeyless
135
140
  self.api_secret = nil
136
141
  end
137
142
 
143
+ if attributes.key?(:'delete_protection')
144
+ self.delete_protection = attributes[:'delete_protection']
145
+ end
146
+
138
147
  if attributes.key?(:'description')
139
148
  self.description = attributes[:'description']
140
149
  end
@@ -227,6 +236,7 @@ module Akeyless
227
236
  self.class == o.class &&
228
237
  api_key == o.api_key &&
229
238
  api_secret == o.api_secret &&
239
+ delete_protection == o.delete_protection &&
230
240
  description == o.description &&
231
241
  json == o.json &&
232
242
  keep_prev_version == o.keep_prev_version &&
@@ -250,7 +260,7 @@ module Akeyless
250
260
  # Calculates hash code according to all attributes.
251
261
  # @return [Integer] Hash code
252
262
  def hash
253
- [api_key, api_secret, description, json, keep_prev_version, key, max_versions, mtls_cert_data_base64, mtls_key_data_base64, name, new_name, timeout, token, uid_token].hash
263
+ [api_key, api_secret, delete_protection, description, json, keep_prev_version, key, max_versions, mtls_cert_data_base64, mtls_key_data_base64, name, new_name, timeout, token, uid_token].hash
254
264
  end
255
265
 
256
266
  # Builds the object from hash
@@ -21,6 +21,9 @@ module Akeyless
21
21
  # Customer ID (ShopperId) required for renewal of imported certificates
22
22
  attr_accessor :customer_id
23
23
 
24
+ # Protection from accidental deletion of this object [true/false]
25
+ attr_accessor :delete_protection
26
+
24
27
  # Description of the object
25
28
  attr_accessor :description
26
29
 
@@ -71,6 +74,7 @@ module Akeyless
71
74
  {
72
75
  :'api_key' => :'api-key',
73
76
  :'customer_id' => :'customer_id',
77
+ :'delete_protection' => :'delete_protection',
74
78
  :'description' => :'description',
75
79
  :'imap_fqdn' => :'imap-fqdn',
76
80
  :'imap_password' => :'imap-password',
@@ -99,6 +103,7 @@ module Akeyless
99
103
  {
100
104
  :'api_key' => :'String',
101
105
  :'customer_id' => :'String',
106
+ :'delete_protection' => :'String',
102
107
  :'description' => :'String',
103
108
  :'imap_fqdn' => :'String',
104
109
  :'imap_password' => :'String',
@@ -148,6 +153,10 @@ module Akeyless
148
153
  self.customer_id = attributes[:'customer_id']
149
154
  end
150
155
 
156
+ if attributes.key?(:'delete_protection')
157
+ self.delete_protection = attributes[:'delete_protection']
158
+ end
159
+
151
160
  if attributes.key?(:'description')
152
161
  self.description = attributes[:'description']
153
162
  end
@@ -277,6 +286,7 @@ module Akeyless
277
286
  self.class == o.class &&
278
287
  api_key == o.api_key &&
279
288
  customer_id == o.customer_id &&
289
+ delete_protection == o.delete_protection &&
280
290
  description == o.description &&
281
291
  imap_fqdn == o.imap_fqdn &&
282
292
  imap_password == o.imap_password &&
@@ -303,7 +313,7 @@ module Akeyless
303
313
  # Calculates hash code according to all attributes.
304
314
  # @return [Integer] Hash code
305
315
  def hash
306
- [api_key, customer_id, description, imap_fqdn, imap_password, imap_port, imap_username, json, keep_prev_version, key, max_versions, name, new_name, secret, timeout, token, uid_token].hash
316
+ [api_key, customer_id, delete_protection, description, imap_fqdn, imap_password, imap_port, imap_username, json, keep_prev_version, key, max_versions, name, new_name, secret, timeout, token, uid_token].hash
307
317
  end
308
318
 
309
319
  # Builds the object from hash
@@ -0,0 +1,428 @@
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
+ # targetUpdateGoogleTrust is a command that updates an existing Google Trust target
18
+ class TargetUpdateGoogleTrust
19
+ # ACME challenge type. Options: [dns]
20
+ attr_accessor :acme_challenge
21
+
22
+ # Protection from accidental deletion of this object [true/false]
23
+ attr_accessor :delete_protection
24
+
25
+ # Description of the object
26
+ attr_accessor :description
27
+
28
+ # Name of existing cloud target for DNS credentials. Required when challenge type is dns. Supported providers: AWS, Azure, GCP
29
+ attr_accessor :dns_target_creds
30
+
31
+ # External Account Binding HMAC key (required for ACME account bootstrap on create)
32
+ attr_accessor :eab_hmac_key
33
+
34
+ # External Account Binding key identifier (required for ACME account bootstrap on create)
35
+ attr_accessor :eab_key_id
36
+
37
+ # Email address for ACME account registration
38
+ attr_accessor :email
39
+
40
+ # GCP Cloud DNS project ID. Optional and can be derived from service account
41
+ attr_accessor :gcp_project
42
+
43
+ # Google Trust directory environment. Options: [production/staging]
44
+ attr_accessor :google_trust_url
45
+
46
+ # AWS Route53 hosted zone ID. Required when DNS credentials target is AWS
47
+ attr_accessor :hosted_zone
48
+
49
+ # Set output format to JSON
50
+ attr_accessor :json
51
+
52
+ # Whether to keep previous version [true/false]. If not set, use default according to account settings
53
+ attr_accessor :keep_prev_version
54
+
55
+ # The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
56
+ attr_accessor :key
57
+
58
+ # Set the maximum number of versions, limited by the account settings defaults.
59
+ attr_accessor :max_versions
60
+
61
+ # Target name
62
+ attr_accessor :name
63
+
64
+ # New target name
65
+ attr_accessor :new_name
66
+
67
+ # Azure resource group name. Required when DNS credentials target is Azure
68
+ attr_accessor :resource_group
69
+
70
+ # Timeout for challenge validation
71
+ attr_accessor :timeout
72
+
73
+ # Authentication token (see `/auth` and `/configure`)
74
+ attr_accessor :token
75
+
76
+ # The universal identity token, Required only for universal_identity authentication
77
+ attr_accessor :uid_token
78
+
79
+ # Attribute mapping from ruby-style variable name to JSON key.
80
+ def self.attribute_map
81
+ {
82
+ :'acme_challenge' => :'acme-challenge',
83
+ :'delete_protection' => :'delete_protection',
84
+ :'description' => :'description',
85
+ :'dns_target_creds' => :'dns-target-creds',
86
+ :'eab_hmac_key' => :'eab-hmac-key',
87
+ :'eab_key_id' => :'eab-key-id',
88
+ :'email' => :'email',
89
+ :'gcp_project' => :'gcp-project',
90
+ :'google_trust_url' => :'google-trust-url',
91
+ :'hosted_zone' => :'hosted-zone',
92
+ :'json' => :'json',
93
+ :'keep_prev_version' => :'keep-prev-version',
94
+ :'key' => :'key',
95
+ :'max_versions' => :'max-versions',
96
+ :'name' => :'name',
97
+ :'new_name' => :'new-name',
98
+ :'resource_group' => :'resource-group',
99
+ :'timeout' => :'timeout',
100
+ :'token' => :'token',
101
+ :'uid_token' => :'uid-token'
102
+ }
103
+ end
104
+
105
+ # Returns all the JSON keys this model knows about
106
+ def self.acceptable_attributes
107
+ attribute_map.values
108
+ end
109
+
110
+ # Attribute type mapping.
111
+ def self.openapi_types
112
+ {
113
+ :'acme_challenge' => :'String',
114
+ :'delete_protection' => :'String',
115
+ :'description' => :'String',
116
+ :'dns_target_creds' => :'String',
117
+ :'eab_hmac_key' => :'String',
118
+ :'eab_key_id' => :'String',
119
+ :'email' => :'String',
120
+ :'gcp_project' => :'String',
121
+ :'google_trust_url' => :'String',
122
+ :'hosted_zone' => :'String',
123
+ :'json' => :'Boolean',
124
+ :'keep_prev_version' => :'String',
125
+ :'key' => :'String',
126
+ :'max_versions' => :'String',
127
+ :'name' => :'String',
128
+ :'new_name' => :'String',
129
+ :'resource_group' => :'String',
130
+ :'timeout' => :'String',
131
+ :'token' => :'String',
132
+ :'uid_token' => :'String'
133
+ }
134
+ end
135
+
136
+ # List of attributes with nullable: true
137
+ def self.openapi_nullable
138
+ Set.new([
139
+ ])
140
+ end
141
+
142
+ # Initializes the object
143
+ # @param [Hash] attributes Model attributes in the form of hash
144
+ def initialize(attributes = {})
145
+ if (!attributes.is_a?(Hash))
146
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::TargetUpdateGoogleTrust` initialize method"
147
+ end
148
+
149
+ # check to see if the attribute exists and convert string to symbol for hash key
150
+ attributes = attributes.each_with_object({}) { |(k, v), h|
151
+ if (!self.class.attribute_map.key?(k.to_sym))
152
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::TargetUpdateGoogleTrust`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
153
+ end
154
+ h[k.to_sym] = v
155
+ }
156
+
157
+ if attributes.key?(:'acme_challenge')
158
+ self.acme_challenge = attributes[:'acme_challenge']
159
+ else
160
+ self.acme_challenge = 'dns'
161
+ end
162
+
163
+ if attributes.key?(:'delete_protection')
164
+ self.delete_protection = attributes[:'delete_protection']
165
+ end
166
+
167
+ if attributes.key?(:'description')
168
+ self.description = attributes[:'description']
169
+ end
170
+
171
+ if attributes.key?(:'dns_target_creds')
172
+ self.dns_target_creds = attributes[:'dns_target_creds']
173
+ end
174
+
175
+ if attributes.key?(:'eab_hmac_key')
176
+ self.eab_hmac_key = attributes[:'eab_hmac_key']
177
+ end
178
+
179
+ if attributes.key?(:'eab_key_id')
180
+ self.eab_key_id = attributes[:'eab_key_id']
181
+ end
182
+
183
+ if attributes.key?(:'email')
184
+ self.email = attributes[:'email']
185
+ else
186
+ self.email = nil
187
+ end
188
+
189
+ if attributes.key?(:'gcp_project')
190
+ self.gcp_project = attributes[:'gcp_project']
191
+ end
192
+
193
+ if attributes.key?(:'google_trust_url')
194
+ self.google_trust_url = attributes[:'google_trust_url']
195
+ else
196
+ self.google_trust_url = 'production'
197
+ end
198
+
199
+ if attributes.key?(:'hosted_zone')
200
+ self.hosted_zone = attributes[:'hosted_zone']
201
+ end
202
+
203
+ if attributes.key?(:'json')
204
+ self.json = attributes[:'json']
205
+ else
206
+ self.json = false
207
+ end
208
+
209
+ if attributes.key?(:'keep_prev_version')
210
+ self.keep_prev_version = attributes[:'keep_prev_version']
211
+ end
212
+
213
+ if attributes.key?(:'key')
214
+ self.key = attributes[:'key']
215
+ end
216
+
217
+ if attributes.key?(:'max_versions')
218
+ self.max_versions = attributes[:'max_versions']
219
+ end
220
+
221
+ if attributes.key?(:'name')
222
+ self.name = attributes[:'name']
223
+ else
224
+ self.name = nil
225
+ end
226
+
227
+ if attributes.key?(:'new_name')
228
+ self.new_name = attributes[:'new_name']
229
+ end
230
+
231
+ if attributes.key?(:'resource_group')
232
+ self.resource_group = attributes[:'resource_group']
233
+ end
234
+
235
+ if attributes.key?(:'timeout')
236
+ self.timeout = attributes[:'timeout']
237
+ else
238
+ self.timeout = '5m'
239
+ end
240
+
241
+ if attributes.key?(:'token')
242
+ self.token = attributes[:'token']
243
+ end
244
+
245
+ if attributes.key?(:'uid_token')
246
+ self.uid_token = attributes[:'uid_token']
247
+ end
248
+ end
249
+
250
+ # Show invalid properties with the reasons. Usually used together with valid?
251
+ # @return Array for valid properties with the reasons
252
+ def list_invalid_properties
253
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
254
+ invalid_properties = Array.new
255
+ if @email.nil?
256
+ invalid_properties.push('invalid value for "email", email cannot be nil.')
257
+ end
258
+
259
+ if @name.nil?
260
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
261
+ end
262
+
263
+ invalid_properties
264
+ end
265
+
266
+ # Check to see if the all the properties in the model are valid
267
+ # @return true if the model is valid
268
+ def valid?
269
+ warn '[DEPRECATED] the `valid?` method is obsolete'
270
+ return false if @email.nil?
271
+ return false if @name.nil?
272
+ true
273
+ end
274
+
275
+ # Checks equality by comparing each attribute.
276
+ # @param [Object] Object to be compared
277
+ def ==(o)
278
+ return true if self.equal?(o)
279
+ self.class == o.class &&
280
+ acme_challenge == o.acme_challenge &&
281
+ delete_protection == o.delete_protection &&
282
+ description == o.description &&
283
+ dns_target_creds == o.dns_target_creds &&
284
+ eab_hmac_key == o.eab_hmac_key &&
285
+ eab_key_id == o.eab_key_id &&
286
+ email == o.email &&
287
+ gcp_project == o.gcp_project &&
288
+ google_trust_url == o.google_trust_url &&
289
+ hosted_zone == o.hosted_zone &&
290
+ json == o.json &&
291
+ keep_prev_version == o.keep_prev_version &&
292
+ key == o.key &&
293
+ max_versions == o.max_versions &&
294
+ name == o.name &&
295
+ new_name == o.new_name &&
296
+ resource_group == o.resource_group &&
297
+ timeout == o.timeout &&
298
+ token == o.token &&
299
+ uid_token == o.uid_token
300
+ end
301
+
302
+ # @see the `==` method
303
+ # @param [Object] Object to be compared
304
+ def eql?(o)
305
+ self == o
306
+ end
307
+
308
+ # Calculates hash code according to all attributes.
309
+ # @return [Integer] Hash code
310
+ def hash
311
+ [acme_challenge, delete_protection, description, dns_target_creds, eab_hmac_key, eab_key_id, email, gcp_project, google_trust_url, hosted_zone, json, keep_prev_version, key, max_versions, name, new_name, resource_group, timeout, token, uid_token].hash
312
+ end
313
+
314
+ # Builds the object from hash
315
+ # @param [Hash] attributes Model attributes in the form of hash
316
+ # @return [Object] Returns the model itself
317
+ def self.build_from_hash(attributes)
318
+ return nil unless attributes.is_a?(Hash)
319
+ attributes = attributes.transform_keys(&:to_sym)
320
+ transformed_hash = {}
321
+ openapi_types.each_pair do |key, type|
322
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
323
+ transformed_hash["#{key}"] = nil
324
+ elsif type =~ /\AArray<(.*)>/i
325
+ # check to ensure the input is an array given that the attribute
326
+ # is documented as an array but the input is not
327
+ if attributes[attribute_map[key]].is_a?(Array)
328
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
329
+ end
330
+ elsif !attributes[attribute_map[key]].nil?
331
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
332
+ end
333
+ end
334
+ new(transformed_hash)
335
+ end
336
+
337
+ # Deserializes the data based on type
338
+ # @param string type Data type
339
+ # @param string value Value to be deserialized
340
+ # @return [Object] Deserialized data
341
+ def self._deserialize(type, value)
342
+ case type.to_sym
343
+ when :Time
344
+ Time.parse(value)
345
+ when :Date
346
+ Date.parse(value)
347
+ when :String
348
+ value.to_s
349
+ when :Integer
350
+ value.to_i
351
+ when :Float
352
+ value.to_f
353
+ when :Boolean
354
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
355
+ true
356
+ else
357
+ false
358
+ end
359
+ when :Object
360
+ # generic object (usually a Hash), return directly
361
+ value
362
+ when /\AArray<(?<inner_type>.+)>\z/
363
+ inner_type = Regexp.last_match[:inner_type]
364
+ value.map { |v| _deserialize(inner_type, v) }
365
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
366
+ k_type = Regexp.last_match[:k_type]
367
+ v_type = Regexp.last_match[:v_type]
368
+ {}.tap do |hash|
369
+ value.each do |k, v|
370
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
371
+ end
372
+ end
373
+ else # model
374
+ # models (e.g. Pet) or oneOf
375
+ klass = Akeyless.const_get(type)
376
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
377
+ end
378
+ end
379
+
380
+ # Returns the string representation of the object
381
+ # @return [String] String presentation of the object
382
+ def to_s
383
+ to_hash.to_s
384
+ end
385
+
386
+ # to_body is an alias to to_hash (backward compatibility)
387
+ # @return [Hash] Returns the object in the form of hash
388
+ def to_body
389
+ to_hash
390
+ end
391
+
392
+ # Returns the object in the form of hash
393
+ # @return [Hash] Returns the object in the form of hash
394
+ def to_hash
395
+ hash = {}
396
+ self.class.attribute_map.each_pair do |attr, param|
397
+ value = self.send(attr)
398
+ if value.nil?
399
+ is_nullable = self.class.openapi_nullable.include?(attr)
400
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
401
+ end
402
+
403
+ hash[param] = _to_hash(value)
404
+ end
405
+ hash
406
+ end
407
+
408
+ # Outputs non-array value in the form of hash
409
+ # For object, use to_hash. Otherwise, just return the value
410
+ # @param [Object] value Any valid value
411
+ # @return [Hash] Returns the value in the form of hash
412
+ def _to_hash(value)
413
+ if value.is_a?(Array)
414
+ value.compact.map { |v| _to_hash(v) }
415
+ elsif value.is_a?(Hash)
416
+ {}.tap do |hash|
417
+ value.each { |k, v| hash[k] = _to_hash(v) }
418
+ end
419
+ elsif value.respond_to? :to_hash
420
+ value.to_hash
421
+ else
422
+ value
423
+ end
424
+ end
425
+
426
+ end
427
+
428
+ end