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.
- checksums.yaml +4 -4
- data/README.md +63 -1
- data/docs/AccountGeneralSettings.md +6 -0
- data/docs/AnthropicTargetDetails.md +20 -0
- data/docs/AuthMethod.md +3 -1
- data/docs/AuthMethodAccessInfo.md +2 -0
- data/docs/AuthMethodCreateSAML.md +3 -1
- data/docs/AuthMethodCreateUniversalIdentity.md +2 -0
- data/docs/AuthMethodUpdateSAML.md +3 -1
- data/docs/AuthMethodUpdateUniversalIdentity.md +2 -0
- data/docs/BedrockTargetDetails.md +20 -0
- data/docs/CreateAuthMethodSAML.md +3 -1
- data/docs/CreateAuthMethodUniversalIdentity.md +2 -0
- data/docs/CreateDBTarget.md +2 -0
- data/docs/CreateMcpSecretBearerToken.md +46 -0
- data/docs/CreateMcpSecretOAuthAuthCode.md +56 -0
- data/docs/CreateMcpSecretOAuthClientCreds.md +52 -0
- data/docs/CreatePKICertIssuer.md +1 -1
- data/docs/CustomDnsTargetDetails.md +20 -0
- data/docs/DSProducerDetails.md +2 -0
- data/docs/DbTargetDetails.md +2 -0
- data/docs/EmailCustomization.md +28 -0
- data/docs/EmailCustomizationAccountInformation.md +24 -0
- data/docs/EmailCustomizationAccountInformationValues.md +24 -0
- data/docs/EsmGetSecretOutput.md +11 -1
- data/docs/FileDownloadInstructions.md +20 -0
- data/docs/FileInfo.md +50 -0
- data/docs/FolderDeleteSync.md +32 -0
- data/docs/FolderDeleteSyncOutput.md +24 -0
- data/docs/FolderSync.md +34 -0
- data/docs/FolderSyncAll.md +26 -0
- data/docs/FolderSyncAllOutput.md +18 -0
- data/docs/FolderSyncOutput.md +24 -0
- data/docs/FolderUSCSyncConfig.md +2 -0
- data/docs/GatewayCreateMigration.md +2 -0
- data/docs/GatewayUpdateMigration.md +2 -0
- data/docs/GetKubeExecCreds.md +1 -1
- data/docs/GetPKICertificate.md +1 -1
- data/docs/GrokTargetDetails.md +22 -0
- data/docs/HashiPayload.md +2 -0
- data/docs/Item.md +2 -0
- data/docs/KeycloakTargetDetails.md +24 -0
- data/docs/OIDCAccessRules.md +2 -0
- data/docs/OktaTargetDetails.md +20 -0
- data/docs/PersonalFolderGlobalMappingSettings.md +20 -0
- data/docs/RotatedSecretCreateAws.md +4 -4
- data/docs/RotatedSecretCreateAzure.md +6 -4
- data/docs/RotatedSecretCreateCassandra.md +4 -4
- data/docs/RotatedSecretCreateCustom.md +4 -4
- data/docs/RotatedSecretCreateDockerhub.md +4 -4
- data/docs/RotatedSecretCreateGcp.md +4 -4
- data/docs/RotatedSecretCreateHanadb.md +4 -4
- data/docs/RotatedSecretCreateHashiVault.md +60 -0
- data/docs/RotatedSecretCreateLdap.md +4 -4
- data/docs/RotatedSecretCreateMongodb.md +4 -4
- data/docs/RotatedSecretCreateMssql.md +4 -4
- data/docs/RotatedSecretCreateMysql.md +4 -4
- data/docs/RotatedSecretCreateOpenAI.md +4 -4
- data/docs/RotatedSecretCreateOracledb.md +4 -4
- data/docs/RotatedSecretCreatePostgresql.md +4 -4
- data/docs/RotatedSecretCreateRedis.md +4 -4
- data/docs/RotatedSecretCreateRedshift.md +4 -4
- data/docs/RotatedSecretCreateSnowflake.md +4 -4
- data/docs/RotatedSecretCreateSplunk.md +4 -4
- data/docs/RotatedSecretCreateSsh.md +4 -4
- data/docs/RotatedSecretCreateWindows.md +4 -4
- data/docs/RotatedSecretUpdateAws.md +4 -4
- data/docs/RotatedSecretUpdateAzure.md +6 -4
- data/docs/RotatedSecretUpdateCassandra.md +4 -4
- data/docs/RotatedSecretUpdateCustom.md +4 -4
- data/docs/RotatedSecretUpdateDockerhub.md +4 -4
- data/docs/RotatedSecretUpdateGcp.md +4 -4
- data/docs/RotatedSecretUpdateHanadb.md +4 -4
- data/docs/RotatedSecretUpdateHashiVault.md +64 -0
- data/docs/RotatedSecretUpdateLdap.md +4 -4
- data/docs/RotatedSecretUpdateMongodb.md +4 -4
- data/docs/RotatedSecretUpdateMssql.md +4 -4
- data/docs/RotatedSecretUpdateMysql.md +4 -4
- data/docs/RotatedSecretUpdateOpenAI.md +4 -4
- data/docs/RotatedSecretUpdateOracledb.md +4 -4
- data/docs/RotatedSecretUpdatePostgresql.md +4 -4
- data/docs/RotatedSecretUpdateRedis.md +4 -4
- data/docs/RotatedSecretUpdateRedshift.md +4 -4
- data/docs/RotatedSecretUpdateSnowflake.md +4 -4
- data/docs/RotatedSecretUpdateSplunk.md +4 -4
- data/docs/RotatedSecretUpdateSsh.md +4 -4
- data/docs/RotatedSecretUpdateWindows.md +4 -4
- data/docs/RuntimeAuthorityCommand.md +4 -0
- data/docs/SAMLAccessRules.md +3 -1
- data/docs/SecretInfo.md +5 -1
- data/docs/StaticSecretDetailsInfo.md +2 -0
- data/docs/TargetCreateAnthropic.md +36 -0
- data/docs/TargetCreateBedrock.md +36 -0
- data/docs/TargetCreateCustomDns.md +36 -0
- data/docs/TargetCreateDB.md +2 -0
- data/docs/TargetCreateGrok.md +38 -0
- data/docs/TargetCreateKeycloak.md +40 -0
- data/docs/TargetCreateOkta.md +36 -0
- data/docs/TargetTypeDetailsInput.md +12 -0
- data/docs/TargetUpdateAnthropic.md +42 -0
- data/docs/TargetUpdateBedrock.md +42 -0
- data/docs/TargetUpdateCustomDns.md +40 -0
- data/docs/TargetUpdateDB.md +2 -0
- data/docs/TargetUpdateGrok.md +44 -0
- data/docs/TargetUpdateKeycloak.md +44 -0
- data/docs/TargetUpdateOkta.md +40 -0
- data/docs/UidExpirationEvent.md +18 -0
- data/docs/UpdateAuthMethodSAML.md +3 -1
- data/docs/UpdateAuthMethodUniversalIdentity.md +2 -0
- data/docs/UpdateDBTarget.md +2 -0
- data/docs/UpdateMcpSecretBearerToken.md +40 -0
- data/docs/UpdateMcpSecretOAuthAuthCode.md +50 -0
- data/docs/UpdateMcpSecretOAuthClientCreds.md +46 -0
- data/docs/UpdatePKICertIssuer.md +1 -1
- data/docs/UscGetSecretOutput.md +11 -1
- data/docs/V2Api.md +1449 -0
- data/lib/akeyless/api/v2_api.rb +1617 -145
- data/lib/akeyless/models/account_general_settings.rb +29 -1
- data/lib/akeyless/models/anthropic_target_details.rb +224 -0
- data/lib/akeyless/models/auth_method.rb +15 -4
- data/lib/akeyless/models/auth_method_access_info.rb +13 -1
- data/lib/akeyless/models/auth_method_create_saml.rb +14 -4
- data/lib/akeyless/models/auth_method_create_universal_identity.rb +13 -1
- data/lib/akeyless/models/auth_method_update_saml.rb +14 -4
- data/lib/akeyless/models/auth_method_update_universal_identity.rb +13 -1
- data/lib/akeyless/models/bedrock_target_details.rb +224 -0
- data/lib/akeyless/models/create_auth_method_saml.rb +14 -4
- data/lib/akeyless/models/create_auth_method_universal_identity.rb +13 -1
- data/lib/akeyless/models/create_db_target.rb +11 -1
- data/lib/akeyless/models/create_mcp_secret_bearer_token.rb +371 -0
- data/lib/akeyless/models/create_mcp_secret_o_auth_auth_code.rb +423 -0
- data/lib/akeyless/models/create_mcp_secret_o_auth_client_creds.rb +403 -0
- data/lib/akeyless/models/create_pki_cert_issuer.rb +1 -1
- data/lib/akeyless/models/custom_dns_target_details.rb +225 -0
- data/lib/akeyless/models/db_target_details.rb +11 -1
- data/lib/akeyless/models/ds_producer_details.rb +11 -1
- data/lib/akeyless/models/email_customization.rb +259 -0
- data/lib/akeyless/models/email_customization_account_information.rb +242 -0
- data/lib/akeyless/models/email_customization_account_information_values.rb +241 -0
- data/lib/akeyless/models/esm_get_secret_output.rb +53 -4
- data/lib/akeyless/models/file_download_instructions.rb +223 -0
- data/lib/akeyless/models/file_info.rb +358 -0
- data/lib/akeyless/models/folder_delete_sync.rb +305 -0
- data/lib/akeyless/models/folder_delete_sync_output.rb +245 -0
- data/lib/akeyless/models/folder_sync.rb +306 -0
- data/lib/akeyless/models/folder_sync_all.rb +266 -0
- data/lib/akeyless/models/folder_sync_all_output.rb +214 -0
- data/lib/akeyless/models/folder_sync_output.rb +247 -0
- data/lib/akeyless/models/folder_usc_sync_config.rb +10 -1
- data/lib/akeyless/models/gateway_create_migration.rb +11 -1
- data/lib/akeyless/models/gateway_update_migration.rb +11 -1
- data/lib/akeyless/models/get_kube_exec_creds.rb +1 -1
- data/lib/akeyless/models/get_pki_certificate.rb +1 -1
- data/lib/akeyless/models/grok_target_details.rb +234 -0
- data/lib/akeyless/models/hashi_payload.rb +10 -1
- data/lib/akeyless/models/item.rb +10 -1
- data/lib/akeyless/models/keycloak_target_details.rb +242 -0
- data/lib/akeyless/models/oidc_access_rules.rb +11 -1
- data/lib/akeyless/models/okta_target_details.rb +224 -0
- data/lib/akeyless/models/personal_folder_global_mapping_settings.rb +223 -0
- data/lib/akeyless/models/rotated_secret_create_aws.rb +0 -4
- data/lib/akeyless/models/rotated_secret_create_azure.rb +11 -5
- data/lib/akeyless/models/rotated_secret_create_cassandra.rb +0 -4
- data/lib/akeyless/models/rotated_secret_create_custom.rb +0 -4
- data/lib/akeyless/models/rotated_secret_create_dockerhub.rb +0 -4
- data/lib/akeyless/models/rotated_secret_create_gcp.rb +0 -4
- data/lib/akeyless/models/rotated_secret_create_hanadb.rb +0 -4
- data/lib/akeyless/models/rotated_secret_create_hashi_vault.rb +446 -0
- data/lib/akeyless/models/rotated_secret_create_ldap.rb +0 -4
- data/lib/akeyless/models/rotated_secret_create_mongodb.rb +0 -4
- data/lib/akeyless/models/rotated_secret_create_mssql.rb +0 -4
- data/lib/akeyless/models/rotated_secret_create_mysql.rb +0 -4
- data/lib/akeyless/models/rotated_secret_create_open_ai.rb +0 -4
- data/lib/akeyless/models/rotated_secret_create_oracledb.rb +0 -4
- data/lib/akeyless/models/rotated_secret_create_postgresql.rb +0 -4
- data/lib/akeyless/models/rotated_secret_create_redis.rb +0 -4
- data/lib/akeyless/models/rotated_secret_create_redshift.rb +0 -4
- data/lib/akeyless/models/rotated_secret_create_snowflake.rb +0 -4
- data/lib/akeyless/models/rotated_secret_create_splunk.rb +0 -4
- data/lib/akeyless/models/rotated_secret_create_ssh.rb +0 -4
- data/lib/akeyless/models/rotated_secret_create_windows.rb +0 -4
- data/lib/akeyless/models/rotated_secret_sync.rb +1 -1
- data/lib/akeyless/models/rotated_secret_update_aws.rb +0 -4
- data/lib/akeyless/models/rotated_secret_update_azure.rb +11 -5
- data/lib/akeyless/models/rotated_secret_update_cassandra.rb +0 -4
- data/lib/akeyless/models/rotated_secret_update_custom.rb +0 -4
- data/lib/akeyless/models/rotated_secret_update_dockerhub.rb +0 -4
- data/lib/akeyless/models/rotated_secret_update_gcp.rb +0 -4
- data/lib/akeyless/models/rotated_secret_update_hanadb.rb +0 -4
- data/lib/akeyless/models/rotated_secret_update_hashi_vault.rb +463 -0
- data/lib/akeyless/models/rotated_secret_update_ldap.rb +0 -4
- data/lib/akeyless/models/rotated_secret_update_mongodb.rb +0 -4
- data/lib/akeyless/models/rotated_secret_update_mssql.rb +0 -4
- data/lib/akeyless/models/rotated_secret_update_mysql.rb +0 -4
- data/lib/akeyless/models/rotated_secret_update_open_ai.rb +0 -4
- data/lib/akeyless/models/rotated_secret_update_oracledb.rb +0 -4
- data/lib/akeyless/models/rotated_secret_update_postgresql.rb +0 -4
- data/lib/akeyless/models/rotated_secret_update_redis.rb +0 -4
- data/lib/akeyless/models/rotated_secret_update_redshift.rb +0 -4
- data/lib/akeyless/models/rotated_secret_update_snowflake.rb +0 -4
- data/lib/akeyless/models/rotated_secret_update_splunk.rb +0 -4
- data/lib/akeyless/models/rotated_secret_update_ssh.rb +0 -4
- data/lib/akeyless/models/rotated_secret_update_windows.rb +0 -4
- data/lib/akeyless/models/runtime_authority_command.rb +21 -1
- data/lib/akeyless/models/saml_access_rules.rb +14 -4
- data/lib/akeyless/models/secret_info.rb +24 -4
- data/lib/akeyless/models/static_secret_details_info.rb +10 -1
- data/lib/akeyless/models/static_secret_sync.rb +1 -1
- data/lib/akeyless/models/target_create_anthropic.rb +317 -0
- data/lib/akeyless/models/target_create_bedrock.rb +317 -0
- data/lib/akeyless/models/target_create_custom_dns.rb +330 -0
- data/lib/akeyless/models/target_create_db.rb +11 -1
- data/lib/akeyless/models/target_create_grok.rb +327 -0
- data/lib/akeyless/models/target_create_keycloak.rb +334 -0
- data/lib/akeyless/models/target_create_okta.rb +314 -0
- data/lib/akeyless/models/target_type_details_input.rb +55 -1
- data/lib/akeyless/models/target_update_anthropic.rb +351 -0
- data/lib/akeyless/models/target_update_bedrock.rb +351 -0
- data/lib/akeyless/models/target_update_custom_dns.rb +350 -0
- data/lib/akeyless/models/target_update_db.rb +11 -1
- data/lib/akeyless/models/target_update_grok.rb +361 -0
- data/lib/akeyless/models/target_update_keycloak.rb +354 -0
- data/lib/akeyless/models/target_update_okta.rb +334 -0
- data/lib/akeyless/models/uid_expiration_event.rb +214 -0
- data/lib/akeyless/models/update_auth_method_saml.rb +14 -4
- data/lib/akeyless/models/update_auth_method_universal_identity.rb +13 -1
- data/lib/akeyless/models/update_db_target.rb +11 -1
- data/lib/akeyless/models/update_mcp_secret_bearer_token.rb +338 -0
- data/lib/akeyless/models/update_mcp_secret_o_auth_auth_code.rb +390 -0
- data/lib/akeyless/models/update_mcp_secret_o_auth_client_creds.rb +370 -0
- data/lib/akeyless/models/update_pki_cert_issuer.rb +1 -1
- data/lib/akeyless/models/usc_get_secret_output.rb +53 -4
- data/lib/akeyless/version.rb +1 -1
- data/lib/akeyless.rb +39 -0
- data/spec/models/anthropic_target_details_spec.rb +42 -0
- data/spec/models/bedrock_target_details_spec.rb +42 -0
- data/spec/models/create_mcp_secret_bearer_token_spec.rb +120 -0
- data/spec/models/create_mcp_secret_o_auth_auth_code_spec.rb +150 -0
- data/spec/models/create_mcp_secret_o_auth_client_creds_spec.rb +138 -0
- data/spec/models/custom_dns_target_details_spec.rb +42 -0
- data/spec/models/email_customization_account_information_spec.rb +54 -0
- data/spec/models/email_customization_account_information_values_spec.rb +54 -0
- data/spec/models/email_customization_spec.rb +66 -0
- data/spec/models/file_download_instructions_spec.rb +42 -0
- data/spec/models/file_info_spec.rb +132 -0
- data/spec/models/folder_delete_sync_output_spec.rb +54 -0
- data/spec/models/folder_delete_sync_spec.rb +78 -0
- data/spec/models/folder_sync_all_output_spec.rb +36 -0
- data/spec/models/folder_sync_all_spec.rb +60 -0
- data/spec/models/folder_sync_output_spec.rb +54 -0
- data/spec/models/folder_sync_spec.rb +84 -0
- data/spec/models/grok_target_details_spec.rb +48 -0
- data/spec/models/keycloak_target_details_spec.rb +54 -0
- data/spec/models/okta_target_details_spec.rb +42 -0
- data/spec/models/personal_folder_global_mapping_settings_spec.rb +42 -0
- data/spec/models/rotated_secret_create_hashi_vault_spec.rb +162 -0
- data/spec/models/rotated_secret_update_hashi_vault_spec.rb +174 -0
- data/spec/models/target_create_anthropic_spec.rb +90 -0
- data/spec/models/target_create_bedrock_spec.rb +90 -0
- data/spec/models/target_create_custom_dns_spec.rb +90 -0
- data/spec/models/target_create_grok_spec.rb +96 -0
- data/spec/models/target_create_keycloak_spec.rb +102 -0
- data/spec/models/target_create_okta_spec.rb +90 -0
- data/spec/models/target_update_anthropic_spec.rb +108 -0
- data/spec/models/target_update_bedrock_spec.rb +108 -0
- data/spec/models/target_update_custom_dns_spec.rb +102 -0
- data/spec/models/target_update_grok_spec.rb +114 -0
- data/spec/models/target_update_keycloak_spec.rb +114 -0
- data/spec/models/target_update_okta_spec.rb +102 -0
- data/spec/models/uid_expiration_event_spec.rb +36 -0
- data/spec/models/update_mcp_secret_bearer_token_spec.rb +102 -0
- data/spec/models/update_mcp_secret_o_auth_auth_code_spec.rb +132 -0
- data/spec/models/update_mcp_secret_o_auth_client_creds_spec.rb +120 -0
- metadata +1331 -1175
|
@@ -17,6 +17,8 @@ module Akeyless
|
|
|
17
17
|
class HashiPayload
|
|
18
18
|
attr_accessor :delete_sync_on_deletion
|
|
19
19
|
|
|
20
|
+
attr_accessor :hashi_target_id
|
|
21
|
+
|
|
20
22
|
attr_accessor :import_as_json
|
|
21
23
|
|
|
22
24
|
attr_accessor :metadata_mode
|
|
@@ -33,6 +35,7 @@ module Akeyless
|
|
|
33
35
|
def self.attribute_map
|
|
34
36
|
{
|
|
35
37
|
:'delete_sync_on_deletion' => :'delete_sync_on_deletion',
|
|
38
|
+
:'hashi_target_id' => :'hashi_target_id',
|
|
36
39
|
:'import_as_json' => :'import_as_json',
|
|
37
40
|
:'metadata_mode' => :'metadata_mode',
|
|
38
41
|
:'namespaces' => :'namespaces',
|
|
@@ -51,6 +54,7 @@ module Akeyless
|
|
|
51
54
|
def self.openapi_types
|
|
52
55
|
{
|
|
53
56
|
:'delete_sync_on_deletion' => :'Boolean',
|
|
57
|
+
:'hashi_target_id' => :'Integer',
|
|
54
58
|
:'import_as_json' => :'Boolean',
|
|
55
59
|
:'metadata_mode' => :'String',
|
|
56
60
|
:'namespaces' => :'Array<String>',
|
|
@@ -85,6 +89,10 @@ module Akeyless
|
|
|
85
89
|
self.delete_sync_on_deletion = attributes[:'delete_sync_on_deletion']
|
|
86
90
|
end
|
|
87
91
|
|
|
92
|
+
if attributes.key?(:'hashi_target_id')
|
|
93
|
+
self.hashi_target_id = attributes[:'hashi_target_id']
|
|
94
|
+
end
|
|
95
|
+
|
|
88
96
|
if attributes.key?(:'import_as_json')
|
|
89
97
|
self.import_as_json = attributes[:'import_as_json']
|
|
90
98
|
end
|
|
@@ -133,6 +141,7 @@ module Akeyless
|
|
|
133
141
|
return true if self.equal?(o)
|
|
134
142
|
self.class == o.class &&
|
|
135
143
|
delete_sync_on_deletion == o.delete_sync_on_deletion &&
|
|
144
|
+
hashi_target_id == o.hashi_target_id &&
|
|
136
145
|
import_as_json == o.import_as_json &&
|
|
137
146
|
metadata_mode == o.metadata_mode &&
|
|
138
147
|
namespaces == o.namespaces &&
|
|
@@ -150,7 +159,7 @@ module Akeyless
|
|
|
150
159
|
# Calculates hash code according to all attributes.
|
|
151
160
|
# @return [Integer] Hash code
|
|
152
161
|
def hash
|
|
153
|
-
[delete_sync_on_deletion, import_as_json, metadata_mode, namespaces, token, url, usc_name].hash
|
|
162
|
+
[delete_sync_on_deletion, hashi_target_id, import_as_json, metadata_mode, namespaces, token, url, usc_name].hash
|
|
154
163
|
end
|
|
155
164
|
|
|
156
165
|
# Builds the object from hash
|
data/lib/akeyless/models/item.rb
CHANGED
|
@@ -43,6 +43,8 @@ module Akeyless
|
|
|
43
43
|
|
|
44
44
|
attr_accessor :display_id
|
|
45
45
|
|
|
46
|
+
attr_accessor :file_download
|
|
47
|
+
|
|
46
48
|
attr_accessor :gateway_details
|
|
47
49
|
|
|
48
50
|
attr_accessor :is_access_request_enabled
|
|
@@ -122,6 +124,7 @@ module Akeyless
|
|
|
122
124
|
:'delete_protection' => :'delete_protection',
|
|
123
125
|
:'deletion_date' => :'deletion_date',
|
|
124
126
|
:'display_id' => :'display_id',
|
|
127
|
+
:'file_download' => :'file_download',
|
|
125
128
|
:'gateway_details' => :'gateway_details',
|
|
126
129
|
:'is_access_request_enabled' => :'is_access_request_enabled',
|
|
127
130
|
:'is_enabled' => :'is_enabled',
|
|
@@ -177,6 +180,7 @@ module Akeyless
|
|
|
177
180
|
:'delete_protection' => :'Boolean',
|
|
178
181
|
:'deletion_date' => :'Time',
|
|
179
182
|
:'display_id' => :'String',
|
|
183
|
+
:'file_download' => :'FileDownloadInstructions',
|
|
180
184
|
:'gateway_details' => :'Array<GatewayDetailsForItemReplyObj>',
|
|
181
185
|
:'is_access_request_enabled' => :'Boolean',
|
|
182
186
|
:'is_enabled' => :'Boolean',
|
|
@@ -289,6 +293,10 @@ module Akeyless
|
|
|
289
293
|
self.display_id = attributes[:'display_id']
|
|
290
294
|
end
|
|
291
295
|
|
|
296
|
+
if attributes.key?(:'file_download')
|
|
297
|
+
self.file_download = attributes[:'file_download']
|
|
298
|
+
end
|
|
299
|
+
|
|
292
300
|
if attributes.key?(:'gateway_details')
|
|
293
301
|
if (value = attributes[:'gateway_details']).is_a?(Array)
|
|
294
302
|
self.gateway_details = value
|
|
@@ -458,6 +466,7 @@ module Akeyless
|
|
|
458
466
|
delete_protection == o.delete_protection &&
|
|
459
467
|
deletion_date == o.deletion_date &&
|
|
460
468
|
display_id == o.display_id &&
|
|
469
|
+
file_download == o.file_download &&
|
|
461
470
|
gateway_details == o.gateway_details &&
|
|
462
471
|
is_access_request_enabled == o.is_access_request_enabled &&
|
|
463
472
|
is_enabled == o.is_enabled &&
|
|
@@ -499,7 +508,7 @@ module Akeyless
|
|
|
499
508
|
# Calculates hash code according to all attributes.
|
|
500
509
|
# @return [Integer] Hash code
|
|
501
510
|
def hash
|
|
502
|
-
[access_date, access_date_display, access_request_status, auto_rotate, bastion_details, cert_issuer_signer_key_name, certificate_issue_details, certificates, client_permissions, creation_date, customer_fragment_id, delete_protection, deletion_date, display_id, gateway_details, is_access_request_enabled, is_enabled, item_accessibility, item_custom_fields_details, item_general_info, item_id, item_metadata, item_name, item_size, item_state, item_sub_type, item_tags, item_targets_assoc, item_type, item_versions, last_rotation_date, last_version, linked_details, locking_info, modification_date, next_rotation_date, protection_key_name, protection_key_type, public_value, rotation_interval, shared_by, target_versions, usc_sync_associated_items, with_customer_fragment].hash
|
|
511
|
+
[access_date, access_date_display, access_request_status, auto_rotate, bastion_details, cert_issuer_signer_key_name, certificate_issue_details, certificates, client_permissions, creation_date, customer_fragment_id, delete_protection, deletion_date, display_id, file_download, gateway_details, is_access_request_enabled, is_enabled, item_accessibility, item_custom_fields_details, item_general_info, item_id, item_metadata, item_name, item_size, item_state, item_sub_type, item_tags, item_targets_assoc, item_type, item_versions, last_rotation_date, last_version, linked_details, locking_info, modification_date, next_rotation_date, protection_key_name, protection_key_type, public_value, rotation_interval, shared_by, target_versions, usc_sync_associated_items, with_customer_fragment].hash
|
|
503
512
|
end
|
|
504
513
|
|
|
505
514
|
# Builds the object from hash
|
|
@@ -0,0 +1,242 @@
|
|
|
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
|
+
# KeycloakTargetDetails defines details for a Keycloak target
|
|
18
|
+
class KeycloakTargetDetails
|
|
19
|
+
attr_accessor :keycloak_client_id
|
|
20
|
+
|
|
21
|
+
attr_accessor :keycloak_client_secret
|
|
22
|
+
|
|
23
|
+
attr_accessor :keycloak_realm
|
|
24
|
+
|
|
25
|
+
attr_accessor :keycloak_url
|
|
26
|
+
|
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
|
+
def self.attribute_map
|
|
29
|
+
{
|
|
30
|
+
:'keycloak_client_id' => :'keycloak_client_id',
|
|
31
|
+
:'keycloak_client_secret' => :'keycloak_client_secret',
|
|
32
|
+
:'keycloak_realm' => :'keycloak_realm',
|
|
33
|
+
:'keycloak_url' => :'keycloak_url'
|
|
34
|
+
}
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
|
38
|
+
def self.acceptable_attributes
|
|
39
|
+
attribute_map.values
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Attribute type mapping.
|
|
43
|
+
def self.openapi_types
|
|
44
|
+
{
|
|
45
|
+
:'keycloak_client_id' => :'String',
|
|
46
|
+
:'keycloak_client_secret' => :'String',
|
|
47
|
+
:'keycloak_realm' => :'String',
|
|
48
|
+
:'keycloak_url' => :'String'
|
|
49
|
+
}
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# List of attributes with nullable: true
|
|
53
|
+
def self.openapi_nullable
|
|
54
|
+
Set.new([
|
|
55
|
+
])
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Initializes the object
|
|
59
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
60
|
+
def initialize(attributes = {})
|
|
61
|
+
if (!attributes.is_a?(Hash))
|
|
62
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::KeycloakTargetDetails` initialize method"
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
66
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
67
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
68
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::KeycloakTargetDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
69
|
+
end
|
|
70
|
+
h[k.to_sym] = v
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if attributes.key?(:'keycloak_client_id')
|
|
74
|
+
self.keycloak_client_id = attributes[:'keycloak_client_id']
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
if attributes.key?(:'keycloak_client_secret')
|
|
78
|
+
self.keycloak_client_secret = attributes[:'keycloak_client_secret']
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
if attributes.key?(:'keycloak_realm')
|
|
82
|
+
self.keycloak_realm = attributes[:'keycloak_realm']
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
if attributes.key?(:'keycloak_url')
|
|
86
|
+
self.keycloak_url = attributes[:'keycloak_url']
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
91
|
+
# @return Array for valid properties with the reasons
|
|
92
|
+
def list_invalid_properties
|
|
93
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
94
|
+
invalid_properties = Array.new
|
|
95
|
+
invalid_properties
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Check to see if the all the properties in the model are valid
|
|
99
|
+
# @return true if the model is valid
|
|
100
|
+
def valid?
|
|
101
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
102
|
+
true
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Checks equality by comparing each attribute.
|
|
106
|
+
# @param [Object] Object to be compared
|
|
107
|
+
def ==(o)
|
|
108
|
+
return true if self.equal?(o)
|
|
109
|
+
self.class == o.class &&
|
|
110
|
+
keycloak_client_id == o.keycloak_client_id &&
|
|
111
|
+
keycloak_client_secret == o.keycloak_client_secret &&
|
|
112
|
+
keycloak_realm == o.keycloak_realm &&
|
|
113
|
+
keycloak_url == o.keycloak_url
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# @see the `==` method
|
|
117
|
+
# @param [Object] Object to be compared
|
|
118
|
+
def eql?(o)
|
|
119
|
+
self == o
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# Calculates hash code according to all attributes.
|
|
123
|
+
# @return [Integer] Hash code
|
|
124
|
+
def hash
|
|
125
|
+
[keycloak_client_id, keycloak_client_secret, keycloak_realm, keycloak_url].hash
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Builds the object from hash
|
|
129
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
130
|
+
# @return [Object] Returns the model itself
|
|
131
|
+
def self.build_from_hash(attributes)
|
|
132
|
+
return nil unless attributes.is_a?(Hash)
|
|
133
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
134
|
+
transformed_hash = {}
|
|
135
|
+
openapi_types.each_pair do |key, type|
|
|
136
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
137
|
+
transformed_hash["#{key}"] = nil
|
|
138
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
139
|
+
# check to ensure the input is an array given that the attribute
|
|
140
|
+
# is documented as an array but the input is not
|
|
141
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
142
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
143
|
+
end
|
|
144
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
145
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
146
|
+
end
|
|
147
|
+
end
|
|
148
|
+
new(transformed_hash)
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Deserializes the data based on type
|
|
152
|
+
# @param string type Data type
|
|
153
|
+
# @param string value Value to be deserialized
|
|
154
|
+
# @return [Object] Deserialized data
|
|
155
|
+
def self._deserialize(type, value)
|
|
156
|
+
case type.to_sym
|
|
157
|
+
when :Time
|
|
158
|
+
Time.parse(value)
|
|
159
|
+
when :Date
|
|
160
|
+
Date.parse(value)
|
|
161
|
+
when :String
|
|
162
|
+
value.to_s
|
|
163
|
+
when :Integer
|
|
164
|
+
value.to_i
|
|
165
|
+
when :Float
|
|
166
|
+
value.to_f
|
|
167
|
+
when :Boolean
|
|
168
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
169
|
+
true
|
|
170
|
+
else
|
|
171
|
+
false
|
|
172
|
+
end
|
|
173
|
+
when :Object
|
|
174
|
+
# generic object (usually a Hash), return directly
|
|
175
|
+
value
|
|
176
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
177
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
178
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
179
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
180
|
+
k_type = Regexp.last_match[:k_type]
|
|
181
|
+
v_type = Regexp.last_match[:v_type]
|
|
182
|
+
{}.tap do |hash|
|
|
183
|
+
value.each do |k, v|
|
|
184
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
185
|
+
end
|
|
186
|
+
end
|
|
187
|
+
else # model
|
|
188
|
+
# models (e.g. Pet) or oneOf
|
|
189
|
+
klass = Akeyless.const_get(type)
|
|
190
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
191
|
+
end
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Returns the string representation of the object
|
|
195
|
+
# @return [String] String presentation of the object
|
|
196
|
+
def to_s
|
|
197
|
+
to_hash.to_s
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
201
|
+
# @return [Hash] Returns the object in the form of hash
|
|
202
|
+
def to_body
|
|
203
|
+
to_hash
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# Returns the object in the form of hash
|
|
207
|
+
# @return [Hash] Returns the object in the form of hash
|
|
208
|
+
def to_hash
|
|
209
|
+
hash = {}
|
|
210
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
211
|
+
value = self.send(attr)
|
|
212
|
+
if value.nil?
|
|
213
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
214
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
hash[param] = _to_hash(value)
|
|
218
|
+
end
|
|
219
|
+
hash
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# Outputs non-array value in the form of hash
|
|
223
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
224
|
+
# @param [Object] value Any valid value
|
|
225
|
+
# @return [Hash] Returns the value in the form of hash
|
|
226
|
+
def _to_hash(value)
|
|
227
|
+
if value.is_a?(Array)
|
|
228
|
+
value.compact.map { |v| _to_hash(v) }
|
|
229
|
+
elsif value.is_a?(Hash)
|
|
230
|
+
{}.tap do |hash|
|
|
231
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
232
|
+
end
|
|
233
|
+
elsif value.respond_to? :to_hash
|
|
234
|
+
value.to_hash
|
|
235
|
+
else
|
|
236
|
+
value
|
|
237
|
+
end
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
end
|
|
@@ -22,6 +22,9 @@ module Akeyless
|
|
|
22
22
|
# Audience claim to be used as part of the authentication flow. In case set, it must match the one configured on the Identity Provider's Application
|
|
23
23
|
attr_accessor :audience
|
|
24
24
|
|
|
25
|
+
# AuthorizedGwClusterName binds the access method to a single GW cluster. When empty (or whitespace-only), GW-driven auth is disabled.
|
|
26
|
+
attr_accessor :authorized_gw_cluster_name
|
|
27
|
+
|
|
25
28
|
# The claims that login is restricted to.
|
|
26
29
|
attr_accessor :bound_claims
|
|
27
30
|
|
|
@@ -51,6 +54,7 @@ module Akeyless
|
|
|
51
54
|
{
|
|
52
55
|
:'allowed_redirect_uris' => :'allowed_redirect_URIs',
|
|
53
56
|
:'audience' => :'audience',
|
|
57
|
+
:'authorized_gw_cluster_name' => :'authorized_gw_cluster_name',
|
|
54
58
|
:'bound_claims' => :'bound_claims',
|
|
55
59
|
:'client_id' => :'client_id',
|
|
56
60
|
:'client_secret' => :'client_secret',
|
|
@@ -72,6 +76,7 @@ module Akeyless
|
|
|
72
76
|
{
|
|
73
77
|
:'allowed_redirect_uris' => :'Array<String>',
|
|
74
78
|
:'audience' => :'String',
|
|
79
|
+
:'authorized_gw_cluster_name' => :'String',
|
|
75
80
|
:'bound_claims' => :'Array<OIDCCustomClaim>',
|
|
76
81
|
:'client_id' => :'String',
|
|
77
82
|
:'client_secret' => :'String',
|
|
@@ -114,6 +119,10 @@ module Akeyless
|
|
|
114
119
|
self.audience = attributes[:'audience']
|
|
115
120
|
end
|
|
116
121
|
|
|
122
|
+
if attributes.key?(:'authorized_gw_cluster_name')
|
|
123
|
+
self.authorized_gw_cluster_name = attributes[:'authorized_gw_cluster_name']
|
|
124
|
+
end
|
|
125
|
+
|
|
117
126
|
if attributes.key?(:'bound_claims')
|
|
118
127
|
if (value = attributes[:'bound_claims']).is_a?(Array)
|
|
119
128
|
self.bound_claims = value
|
|
@@ -173,6 +182,7 @@ module Akeyless
|
|
|
173
182
|
self.class == o.class &&
|
|
174
183
|
allowed_redirect_uris == o.allowed_redirect_uris &&
|
|
175
184
|
audience == o.audience &&
|
|
185
|
+
authorized_gw_cluster_name == o.authorized_gw_cluster_name &&
|
|
176
186
|
bound_claims == o.bound_claims &&
|
|
177
187
|
client_id == o.client_id &&
|
|
178
188
|
client_secret == o.client_secret &&
|
|
@@ -192,7 +202,7 @@ module Akeyless
|
|
|
192
202
|
# Calculates hash code according to all attributes.
|
|
193
203
|
# @return [Integer] Hash code
|
|
194
204
|
def hash
|
|
195
|
-
[allowed_redirect_uris, audience, bound_claims, client_id, client_secret, is_internal, issuer, required_scopes, required_scopes_prefix, unique_identifier].hash
|
|
205
|
+
[allowed_redirect_uris, audience, authorized_gw_cluster_name, bound_claims, client_id, client_secret, is_internal, issuer, required_scopes, required_scopes_prefix, unique_identifier].hash
|
|
196
206
|
end
|
|
197
207
|
|
|
198
208
|
# Builds the object from hash
|
|
@@ -0,0 +1,224 @@
|
|
|
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
|
+
# OktaTargetDetails defines details for an Okta target
|
|
18
|
+
class OktaTargetDetails
|
|
19
|
+
attr_accessor :okta_api_token
|
|
20
|
+
|
|
21
|
+
attr_accessor :okta_url
|
|
22
|
+
|
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
24
|
+
def self.attribute_map
|
|
25
|
+
{
|
|
26
|
+
:'okta_api_token' => :'okta_api_token',
|
|
27
|
+
:'okta_url' => :'okta_url'
|
|
28
|
+
}
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Returns all the JSON keys this model knows about
|
|
32
|
+
def self.acceptable_attributes
|
|
33
|
+
attribute_map.values
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Attribute type mapping.
|
|
37
|
+
def self.openapi_types
|
|
38
|
+
{
|
|
39
|
+
:'okta_api_token' => :'String',
|
|
40
|
+
:'okta_url' => :'String'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# List of attributes with nullable: true
|
|
45
|
+
def self.openapi_nullable
|
|
46
|
+
Set.new([
|
|
47
|
+
])
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Initializes the object
|
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
52
|
+
def initialize(attributes = {})
|
|
53
|
+
if (!attributes.is_a?(Hash))
|
|
54
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::OktaTargetDetails` initialize method"
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
58
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
59
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
60
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::OktaTargetDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
61
|
+
end
|
|
62
|
+
h[k.to_sym] = v
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if attributes.key?(:'okta_api_token')
|
|
66
|
+
self.okta_api_token = attributes[:'okta_api_token']
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
if attributes.key?(:'okta_url')
|
|
70
|
+
self.okta_url = attributes[:'okta_url']
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
75
|
+
# @return Array for valid properties with the reasons
|
|
76
|
+
def list_invalid_properties
|
|
77
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
78
|
+
invalid_properties = Array.new
|
|
79
|
+
invalid_properties
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Check to see if the all the properties in the model are valid
|
|
83
|
+
# @return true if the model is valid
|
|
84
|
+
def valid?
|
|
85
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
86
|
+
true
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Checks equality by comparing each attribute.
|
|
90
|
+
# @param [Object] Object to be compared
|
|
91
|
+
def ==(o)
|
|
92
|
+
return true if self.equal?(o)
|
|
93
|
+
self.class == o.class &&
|
|
94
|
+
okta_api_token == o.okta_api_token &&
|
|
95
|
+
okta_url == o.okta_url
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# @see the `==` method
|
|
99
|
+
# @param [Object] Object to be compared
|
|
100
|
+
def eql?(o)
|
|
101
|
+
self == o
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Calculates hash code according to all attributes.
|
|
105
|
+
# @return [Integer] Hash code
|
|
106
|
+
def hash
|
|
107
|
+
[okta_api_token, okta_url].hash
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Builds the object from hash
|
|
111
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
112
|
+
# @return [Object] Returns the model itself
|
|
113
|
+
def self.build_from_hash(attributes)
|
|
114
|
+
return nil unless attributes.is_a?(Hash)
|
|
115
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
116
|
+
transformed_hash = {}
|
|
117
|
+
openapi_types.each_pair do |key, type|
|
|
118
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
119
|
+
transformed_hash["#{key}"] = nil
|
|
120
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
121
|
+
# check to ensure the input is an array given that the attribute
|
|
122
|
+
# is documented as an array but the input is not
|
|
123
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
124
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
125
|
+
end
|
|
126
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
127
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
new(transformed_hash)
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Deserializes the data based on type
|
|
134
|
+
# @param string type Data type
|
|
135
|
+
# @param string value Value to be deserialized
|
|
136
|
+
# @return [Object] Deserialized data
|
|
137
|
+
def self._deserialize(type, value)
|
|
138
|
+
case type.to_sym
|
|
139
|
+
when :Time
|
|
140
|
+
Time.parse(value)
|
|
141
|
+
when :Date
|
|
142
|
+
Date.parse(value)
|
|
143
|
+
when :String
|
|
144
|
+
value.to_s
|
|
145
|
+
when :Integer
|
|
146
|
+
value.to_i
|
|
147
|
+
when :Float
|
|
148
|
+
value.to_f
|
|
149
|
+
when :Boolean
|
|
150
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
151
|
+
true
|
|
152
|
+
else
|
|
153
|
+
false
|
|
154
|
+
end
|
|
155
|
+
when :Object
|
|
156
|
+
# generic object (usually a Hash), return directly
|
|
157
|
+
value
|
|
158
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
159
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
160
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
161
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
162
|
+
k_type = Regexp.last_match[:k_type]
|
|
163
|
+
v_type = Regexp.last_match[:v_type]
|
|
164
|
+
{}.tap do |hash|
|
|
165
|
+
value.each do |k, v|
|
|
166
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
167
|
+
end
|
|
168
|
+
end
|
|
169
|
+
else # model
|
|
170
|
+
# models (e.g. Pet) or oneOf
|
|
171
|
+
klass = Akeyless.const_get(type)
|
|
172
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# Returns the string representation of the object
|
|
177
|
+
# @return [String] String presentation of the object
|
|
178
|
+
def to_s
|
|
179
|
+
to_hash.to_s
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
183
|
+
# @return [Hash] Returns the object in the form of hash
|
|
184
|
+
def to_body
|
|
185
|
+
to_hash
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Returns the object in the form of hash
|
|
189
|
+
# @return [Hash] Returns the object in the form of hash
|
|
190
|
+
def to_hash
|
|
191
|
+
hash = {}
|
|
192
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
193
|
+
value = self.send(attr)
|
|
194
|
+
if value.nil?
|
|
195
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
196
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
hash[param] = _to_hash(value)
|
|
200
|
+
end
|
|
201
|
+
hash
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# Outputs non-array value in the form of hash
|
|
205
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
206
|
+
# @param [Object] value Any valid value
|
|
207
|
+
# @return [Hash] Returns the value in the form of hash
|
|
208
|
+
def _to_hash(value)
|
|
209
|
+
if value.is_a?(Array)
|
|
210
|
+
value.compact.map { |v| _to_hash(v) }
|
|
211
|
+
elsif value.is_a?(Hash)
|
|
212
|
+
{}.tap do |hash|
|
|
213
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
214
|
+
end
|
|
215
|
+
elsif value.respond_to? :to_hash
|
|
216
|
+
value.to_hash
|
|
217
|
+
else
|
|
218
|
+
value
|
|
219
|
+
end
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
end
|