akeyless 4.2.3 → 4.2.4
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 +43 -2
- data/docs/AccountGeneralSettings.md +2 -0
- data/docs/AwsStorage.md +28 -0
- data/docs/AzureStorage.md +28 -0
- data/docs/BastionConfigReplyObj.md +28 -0
- data/docs/BastionGlobalConf.md +24 -0
- data/docs/Configure.md +8 -0
- data/docs/Connect.md +2 -2
- data/docs/CreateClassicKey.md +8 -0
- data/docs/CreateDFCKey.md +8 -0
- data/docs/DynamicSecretUpdateArtifactory.md +1 -1
- data/docs/DynamicSecretUpdateAws.md +1 -1
- data/docs/DynamicSecretUpdateAzure.md +1 -1
- data/docs/DynamicSecretUpdateCassandra.md +1 -1
- data/docs/DynamicSecretUpdateChef.md +1 -1
- data/docs/DynamicSecretUpdateCustom.md +1 -1
- data/docs/DynamicSecretUpdateDockerhub.md +1 -1
- data/docs/DynamicSecretUpdateEks.md +1 -1
- data/docs/DynamicSecretUpdateGcp.md +1 -1
- data/docs/DynamicSecretUpdateGithub.md +1 -1
- data/docs/DynamicSecretUpdateGitlab.md +1 -1
- data/docs/DynamicSecretUpdateGke.md +1 -1
- data/docs/DynamicSecretUpdateGoogleWorkspace.md +1 -1
- data/docs/DynamicSecretUpdateHanaDb.md +1 -1
- data/docs/DynamicSecretUpdateK8s.md +1 -1
- data/docs/DynamicSecretUpdateLdap.md +1 -1
- data/docs/DynamicSecretUpdateMongoDb.md +1 -1
- data/docs/DynamicSecretUpdateMsSql.md +1 -1
- data/docs/DynamicSecretUpdateMySql.md +1 -1
- data/docs/DynamicSecretUpdateOracleDb.md +1 -1
- data/docs/DynamicSecretUpdatePing.md +1 -1
- data/docs/DynamicSecretUpdateVenafi.md +1 -1
- data/docs/EmailPassAccessRules.md +3 -1
- data/docs/EventForwarderCreateEmail.md +2 -2
- data/docs/EventForwarderCreateServiceNow.md +1 -1
- data/docs/EventForwarderCreateSlack.md +1 -1
- data/docs/EventForwarderCreateWebhook.md +1 -1
- data/docs/EventForwarderUpdateEmail.md +2 -2
- data/docs/EventForwarderUpdateServiceNow.md +1 -1
- data/docs/EventForwarderUpdateSlack.md +1 -1
- data/docs/EventForwarderUpdateWebhook.md +1 -1
- data/docs/GatewayGetRemoteAccess.md +22 -0
- data/docs/GatewayUpdateItem.md +2 -0
- data/docs/GatewayUpdateRemoteAccess.md +36 -0
- data/docs/GatewayUpdateRemoteAccessRdpRecordings.md +46 -0
- data/docs/GwUpdateRemoteAccessSessionLogsAwsS3.md +42 -0
- data/docs/GwUpdateRemoteAccessSessionLogsAzureAnalytics.md +32 -0
- data/docs/GwUpdateRemoteAccessSessionLogsDatadog.md +38 -0
- data/docs/GwUpdateRemoteAccessSessionLogsElasticsearch.md +48 -0
- data/docs/GwUpdateRemoteAccessSessionLogsGoogleChronicle.md +36 -0
- data/docs/GwUpdateRemoteAccessSessionLogsLogstash.md +36 -0
- data/docs/GwUpdateRemoteAccessSessionLogsLogzIo.md +32 -0
- data/docs/GwUpdateRemoteAccessSessionLogsSplunk.md +42 -0
- data/docs/GwUpdateRemoteAccessSessionLogsStdout.md +28 -0
- data/docs/GwUpdateRemoteAccessSessionLogsSumologic.md +34 -0
- data/docs/GwUpdateRemoteAccessSessionLogsSyslog.md +40 -0
- data/docs/ItemGeneralInfo.md +4 -0
- data/docs/NextAutoRotationEvent.md +18 -0
- data/docs/PasswordExpirationInfo.md +24 -0
- data/docs/ResetAccessKey.md +24 -0
- data/docs/ResetAuthMethodAccessKeyOutput.md +18 -0
- data/docs/RollbackSecret.md +2 -0
- data/docs/RotatedSecretCreateAws.md +2 -0
- data/docs/RotatedSecretCreateAzure.md +2 -0
- data/docs/RotatedSecretCreateCassandra.md +2 -0
- data/docs/RotatedSecretCreateCustom.md +2 -0
- data/docs/RotatedSecretCreateDockerhub.md +2 -0
- data/docs/RotatedSecretCreateGcp.md +2 -0
- data/docs/RotatedSecretCreateHanadb.md +2 -0
- data/docs/RotatedSecretCreateLdap.md +2 -0
- data/docs/RotatedSecretCreateMongodb.md +2 -0
- data/docs/RotatedSecretCreateMssql.md +2 -0
- data/docs/RotatedSecretCreateMysql.md +2 -0
- data/docs/RotatedSecretCreateOracledb.md +2 -0
- data/docs/RotatedSecretCreatePostgresql.md +2 -0
- data/docs/RotatedSecretCreateRedis.md +2 -0
- data/docs/RotatedSecretCreateRedshift.md +2 -0
- data/docs/RotatedSecretCreateSnowflake.md +2 -0
- data/docs/RotatedSecretCreateSsh.md +2 -0
- data/docs/RotatedSecretCreateWindows.md +2 -0
- data/docs/RotatedSecretUpdateAws.md +2 -0
- data/docs/RotatedSecretUpdateAzure.md +2 -0
- data/docs/RotatedSecretUpdateCassandra.md +2 -0
- data/docs/RotatedSecretUpdateCustom.md +2 -0
- data/docs/RotatedSecretUpdateDockerhub.md +2 -0
- data/docs/RotatedSecretUpdateGcp.md +2 -0
- data/docs/RotatedSecretUpdateHanadb.md +2 -0
- data/docs/RotatedSecretUpdateLdap.md +2 -0
- data/docs/RotatedSecretUpdateMongodb.md +2 -0
- data/docs/RotatedSecretUpdateMssql.md +2 -0
- data/docs/RotatedSecretUpdateMysql.md +2 -0
- data/docs/RotatedSecretUpdateOracledb.md +2 -0
- data/docs/RotatedSecretUpdatePostgresql.md +2 -0
- data/docs/RotatedSecretUpdateRedis.md +2 -0
- data/docs/RotatedSecretUpdateRedshift.md +2 -0
- data/docs/RotatedSecretUpdateSnowflake.md +2 -0
- data/docs/RotatedSecretUpdateSsh.md +2 -0
- data/docs/RotatedSecretUpdateWindows.md +2 -0
- data/docs/SshBastionConf.md +24 -0
- data/docs/SshBastionSessionTermination.md +26 -0
- data/docs/UpdateAccountSettings.md +6 -0
- data/docs/UpdateItem.md +2 -0
- data/docs/UpdateRotationSettings.md +2 -0
- data/docs/UpdateTarget.md +1 -1
- data/docs/UploadRSA.md +2 -0
- data/docs/V2Api.md +880 -1
- data/docs/WebBastionConf.md +20 -0
- data/docs/WebBastionGuacamole.md +18 -0
- data/docs/WebBastionRdpRecord.md +22 -0
- data/lib/akeyless/api/v2_api.rb +886 -1
- data/lib/akeyless/models/account_general_settings.rb +10 -1
- data/lib/akeyless/models/aws_storage.rb +260 -0
- data/lib/akeyless/models/azure_storage.rb +260 -0
- data/lib/akeyless/models/bastion_config_reply_obj.rb +259 -0
- data/lib/akeyless/models/bastion_global_conf.rb +243 -0
- data/lib/akeyless/models/configure.rb +41 -1
- data/lib/akeyless/models/connect.rb +11 -11
- data/lib/akeyless/models/create_classic_key.rb +45 -1
- data/lib/akeyless/models/create_dfc_key.rb +45 -1
- data/lib/akeyless/models/dynamic_secret_update_artifactory.rb +1 -1
- data/lib/akeyless/models/dynamic_secret_update_aws.rb +1 -1
- data/lib/akeyless/models/dynamic_secret_update_azure.rb +1 -1
- data/lib/akeyless/models/dynamic_secret_update_cassandra.rb +1 -1
- data/lib/akeyless/models/dynamic_secret_update_chef.rb +1 -1
- data/lib/akeyless/models/dynamic_secret_update_custom.rb +1 -1
- data/lib/akeyless/models/dynamic_secret_update_dockerhub.rb +1 -1
- data/lib/akeyless/models/dynamic_secret_update_eks.rb +1 -1
- data/lib/akeyless/models/dynamic_secret_update_gcp.rb +1 -1
- data/lib/akeyless/models/dynamic_secret_update_github.rb +1 -1
- data/lib/akeyless/models/dynamic_secret_update_gitlab.rb +1 -1
- data/lib/akeyless/models/dynamic_secret_update_gke.rb +1 -1
- data/lib/akeyless/models/dynamic_secret_update_google_workspace.rb +1 -1
- data/lib/akeyless/models/dynamic_secret_update_hana_db.rb +1 -1
- data/lib/akeyless/models/dynamic_secret_update_k8s.rb +1 -1
- data/lib/akeyless/models/dynamic_secret_update_ldap.rb +1 -1
- data/lib/akeyless/models/dynamic_secret_update_mongo_db.rb +1 -1
- data/lib/akeyless/models/dynamic_secret_update_ms_sql.rb +1 -1
- data/lib/akeyless/models/dynamic_secret_update_my_sql.rb +1 -1
- data/lib/akeyless/models/dynamic_secret_update_oracle_db.rb +1 -1
- data/lib/akeyless/models/dynamic_secret_update_ping.rb +1 -1
- data/lib/akeyless/models/dynamic_secret_update_venafi.rb +1 -1
- data/lib/akeyless/models/email_pass_access_rules.rb +14 -4
- data/lib/akeyless/models/event_forwarder_create_email.rb +2 -2
- data/lib/akeyless/models/event_forwarder_create_service_now.rb +1 -1
- data/lib/akeyless/models/event_forwarder_create_slack.rb +1 -1
- data/lib/akeyless/models/event_forwarder_create_webhook.rb +1 -1
- data/lib/akeyless/models/event_forwarder_update_email.rb +2 -2
- data/lib/akeyless/models/event_forwarder_update_service_now.rb +1 -1
- data/lib/akeyless/models/event_forwarder_update_slack.rb +1 -1
- data/lib/akeyless/models/event_forwarder_update_webhook.rb +1 -1
- data/lib/akeyless/models/gateway_get_remote_access.rb +238 -0
- data/lib/akeyless/models/gateway_update_item.rb +13 -1
- data/lib/akeyless/models/gateway_update_remote_access.rb +318 -0
- data/lib/akeyless/models/gateway_update_remote_access_rdp_recordings.rb +358 -0
- data/lib/akeyless/models/gw_update_remote_access_session_logs_aws_s3.rb +346 -0
- data/lib/akeyless/models/gw_update_remote_access_session_logs_azure_analytics.rb +294 -0
- data/lib/akeyless/models/gw_update_remote_access_session_logs_datadog.rb +330 -0
- data/lib/akeyless/models/gw_update_remote_access_session_logs_elasticsearch.rb +376 -0
- data/lib/akeyless/models/gw_update_remote_access_session_logs_google_chronicle.rb +314 -0
- data/lib/akeyless/models/gw_update_remote_access_session_logs_logstash.rb +316 -0
- data/lib/akeyless/models/gw_update_remote_access_session_logs_logz_io.rb +294 -0
- data/lib/akeyless/models/gw_update_remote_access_session_logs_splunk.rb +350 -0
- data/lib/akeyless/models/gw_update_remote_access_session_logs_stdout.rb +274 -0
- data/lib/akeyless/models/gw_update_remote_access_session_logs_sumologic.rb +308 -0
- data/lib/akeyless/models/gw_update_remote_access_session_logs_syslog.rb +342 -0
- data/lib/akeyless/models/item_general_info.rb +23 -1
- data/lib/akeyless/models/next_auto_rotation_event.rb +214 -0
- data/lib/akeyless/models/password_expiration_info.rb +242 -0
- data/lib/akeyless/models/reset_access_key.rb +255 -0
- data/lib/akeyless/models/reset_auth_method_access_key_output.rb +215 -0
- data/lib/akeyless/models/rollback_secret.rb +13 -1
- data/lib/akeyless/models/rotated_secret_create_aws.rb +13 -1
- data/lib/akeyless/models/rotated_secret_create_azure.rb +13 -1
- data/lib/akeyless/models/rotated_secret_create_cassandra.rb +13 -1
- data/lib/akeyless/models/rotated_secret_create_custom.rb +13 -1
- data/lib/akeyless/models/rotated_secret_create_dockerhub.rb +13 -1
- data/lib/akeyless/models/rotated_secret_create_gcp.rb +13 -1
- data/lib/akeyless/models/rotated_secret_create_hanadb.rb +13 -1
- data/lib/akeyless/models/rotated_secret_create_ldap.rb +13 -1
- data/lib/akeyless/models/rotated_secret_create_mongodb.rb +13 -1
- data/lib/akeyless/models/rotated_secret_create_mssql.rb +13 -1
- data/lib/akeyless/models/rotated_secret_create_mysql.rb +13 -1
- data/lib/akeyless/models/rotated_secret_create_oracledb.rb +13 -1
- data/lib/akeyless/models/rotated_secret_create_postgresql.rb +13 -1
- data/lib/akeyless/models/rotated_secret_create_redis.rb +13 -1
- data/lib/akeyless/models/rotated_secret_create_redshift.rb +13 -1
- data/lib/akeyless/models/rotated_secret_create_snowflake.rb +13 -1
- data/lib/akeyless/models/rotated_secret_create_ssh.rb +13 -1
- data/lib/akeyless/models/rotated_secret_create_windows.rb +13 -1
- data/lib/akeyless/models/rotated_secret_update_aws.rb +13 -1
- data/lib/akeyless/models/rotated_secret_update_azure.rb +13 -1
- data/lib/akeyless/models/rotated_secret_update_cassandra.rb +13 -1
- data/lib/akeyless/models/rotated_secret_update_custom.rb +13 -1
- data/lib/akeyless/models/rotated_secret_update_dockerhub.rb +13 -1
- data/lib/akeyless/models/rotated_secret_update_gcp.rb +13 -1
- data/lib/akeyless/models/rotated_secret_update_hanadb.rb +13 -1
- data/lib/akeyless/models/rotated_secret_update_ldap.rb +13 -1
- data/lib/akeyless/models/rotated_secret_update_mongodb.rb +13 -1
- data/lib/akeyless/models/rotated_secret_update_mssql.rb +13 -1
- data/lib/akeyless/models/rotated_secret_update_mysql.rb +13 -1
- data/lib/akeyless/models/rotated_secret_update_oracledb.rb +13 -1
- data/lib/akeyless/models/rotated_secret_update_postgresql.rb +13 -1
- data/lib/akeyless/models/rotated_secret_update_redis.rb +13 -1
- data/lib/akeyless/models/rotated_secret_update_redshift.rb +13 -1
- data/lib/akeyless/models/rotated_secret_update_snowflake.rb +13 -1
- data/lib/akeyless/models/rotated_secret_update_ssh.rb +13 -1
- data/lib/akeyless/models/rotated_secret_update_windows.rb +13 -1
- data/lib/akeyless/models/ssh_bastion_conf.rb +241 -0
- data/lib/akeyless/models/ssh_bastion_session_termination.rb +250 -0
- data/lib/akeyless/models/update_account_settings.rb +31 -1
- data/lib/akeyless/models/update_item.rb +13 -1
- data/lib/akeyless/models/update_rotation_settings.rb +13 -1
- data/lib/akeyless/models/update_target.rb +1 -1
- data/lib/akeyless/models/upload_rsa.rb +13 -1
- data/lib/akeyless/models/web_bastion_conf.rb +223 -0
- data/lib/akeyless/models/web_bastion_guacamole.rb +214 -0
- data/lib/akeyless/models/web_bastion_rdp_record.rb +232 -0
- data/lib/akeyless/version.rb +1 -1
- data/lib/akeyless.rb +27 -0
- data/spec/models/aws_storage_spec.rb +66 -0
- data/spec/models/azure_storage_spec.rb +66 -0
- data/spec/models/bastion_config_reply_obj_spec.rb +66 -0
- data/spec/models/bastion_global_conf_spec.rb +54 -0
- data/spec/models/gateway_get_remote_access_spec.rb +48 -0
- data/spec/models/gateway_update_remote_access_rdp_recordings_spec.rb +120 -0
- data/spec/models/gateway_update_remote_access_spec.rb +90 -0
- data/spec/models/gw_update_remote_access_session_logs_aws_s3_spec.rb +108 -0
- data/spec/models/gw_update_remote_access_session_logs_azure_analytics_spec.rb +78 -0
- data/spec/models/gw_update_remote_access_session_logs_datadog_spec.rb +96 -0
- data/spec/models/gw_update_remote_access_session_logs_elasticsearch_spec.rb +126 -0
- data/spec/models/gw_update_remote_access_session_logs_google_chronicle_spec.rb +90 -0
- data/spec/models/gw_update_remote_access_session_logs_logstash_spec.rb +90 -0
- data/spec/models/gw_update_remote_access_session_logs_logz_io_spec.rb +78 -0
- data/spec/models/gw_update_remote_access_session_logs_splunk_spec.rb +108 -0
- data/spec/models/gw_update_remote_access_session_logs_stdout_spec.rb +66 -0
- data/spec/models/gw_update_remote_access_session_logs_sumologic_spec.rb +84 -0
- data/spec/models/gw_update_remote_access_session_logs_syslog_spec.rb +102 -0
- data/spec/models/next_auto_rotation_event_spec.rb +36 -0
- data/spec/models/password_expiration_info_spec.rb +54 -0
- data/spec/models/reset_access_key_spec.rb +54 -0
- data/spec/models/reset_auth_method_access_key_output_spec.rb +36 -0
- data/spec/models/ssh_bastion_conf_spec.rb +54 -0
- data/spec/models/ssh_bastion_session_termination_spec.rb +60 -0
- data/spec/models/web_bastion_conf_spec.rb +42 -0
- data/spec/models/web_bastion_guacamole_spec.rb +36 -0
- data/spec/models/web_bastion_rdp_record_spec.rb +48 -0
- metadata +1089 -981
|
@@ -43,7 +43,7 @@ module Akeyless
|
|
|
43
43
|
# Enable/Disable Event Forwarder [true/false]
|
|
44
44
|
attr_accessor :enable
|
|
45
45
|
|
|
46
|
-
# List of event types to notify about [request-access, certificate-pending-expiration, certificate-expired, certificate-provisioning-success, certificate-provisioning-failure, auth-method-pending-expiration, auth-method-expired, rotated-secret-success, rotated-secret-failure, dynamic-secret-failure, multi-auth-failure, uid-rotation-failure, apply-justification, email-auth-method-approved, usage, rotation-usage, gateway-inactive, static-secret-updated]
|
|
46
|
+
# List of event types to notify about [request-access, certificate-pending-expiration, certificate-expired, certificate-provisioning-success, certificate-provisioning-failure, auth-method-pending-expiration, auth-method-expired, next-automatic-rotation, rotated-secret-success, rotated-secret-failure, dynamic-secret-failure, multi-auth-failure, uid-rotation-failure, apply-justification, email-auth-method-approved, usage, rotation-usage, gateway-inactive, static-secret-updated]
|
|
47
47
|
attr_accessor :event_types
|
|
48
48
|
|
|
49
49
|
# Event sources
|
|
@@ -25,7 +25,7 @@ module Akeyless
|
|
|
25
25
|
# Enable/Disable Event Forwarder [true/false]
|
|
26
26
|
attr_accessor :enable
|
|
27
27
|
|
|
28
|
-
# List of event types to notify about [request-access, certificate-pending-expiration, certificate-expired, certificate-provisioning-success, certificate-provisioning-failure, auth-method-pending-expiration, auth-method-expired, rotated-secret-success, rotated-secret-failure, dynamic-secret-failure, multi-auth-failure, uid-rotation-failure, apply-justification, email-auth-method-approved, usage, rotation-usage, gateway-inactive, static-secret-updated]
|
|
28
|
+
# List of event types to notify about [request-access, certificate-pending-expiration, certificate-expired, certificate-provisioning-success, certificate-provisioning-failure, auth-method-pending-expiration, auth-method-expired, next-automatic-rotation, rotated-secret-success, rotated-secret-failure, dynamic-secret-failure, multi-auth-failure, uid-rotation-failure, apply-justification, email-auth-method-approved, usage, rotation-usage, gateway-inactive, static-secret-updated]
|
|
29
29
|
attr_accessor :event_types
|
|
30
30
|
|
|
31
31
|
# Event sources
|
|
@@ -34,7 +34,7 @@ module Akeyless
|
|
|
34
34
|
# Enable/Disable Event Forwarder [true/false]
|
|
35
35
|
attr_accessor :enable
|
|
36
36
|
|
|
37
|
-
# List of event types to notify about [request-access, certificate-pending-expiration, certificate-expired, certificate-provisioning-success, certificate-provisioning-failure, auth-method-pending-expiration, auth-method-expired, rotated-secret-success, rotated-secret-failure, dynamic-secret-failure, multi-auth-failure, uid-rotation-failure, apply-justification, email-auth-method-approved, usage, rotation-usage, gateway-inactive, static-secret-updated]
|
|
37
|
+
# List of event types to notify about [request-access, certificate-pending-expiration, certificate-expired, certificate-provisioning-success, certificate-provisioning-failure, auth-method-pending-expiration, auth-method-expired, next-automatic-rotation, rotated-secret-success, rotated-secret-failure, dynamic-secret-failure, multi-auth-failure, uid-rotation-failure, apply-justification, email-auth-method-approved, usage, rotation-usage, gateway-inactive, static-secret-updated]
|
|
38
38
|
attr_accessor :event_types
|
|
39
39
|
|
|
40
40
|
# Event sources
|
|
@@ -0,0 +1,238 @@
|
|
|
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: 2.0
|
|
7
|
+
Contact: support@akeyless.io
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.9.0-SNAPSHOT
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Akeyless
|
|
17
|
+
# gatewayGetRemoteAccess is a command that returns remote access config
|
|
18
|
+
class GatewayGetRemoteAccess
|
|
19
|
+
# Set output format to JSON
|
|
20
|
+
attr_accessor :json
|
|
21
|
+
|
|
22
|
+
# Authentication token (see `/auth` and `/configure`)
|
|
23
|
+
attr_accessor :token
|
|
24
|
+
|
|
25
|
+
# The universal identity token, Required only for universal_identity authentication
|
|
26
|
+
attr_accessor :uid_token
|
|
27
|
+
|
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
|
+
def self.attribute_map
|
|
30
|
+
{
|
|
31
|
+
:'json' => :'json',
|
|
32
|
+
:'token' => :'token',
|
|
33
|
+
:'uid_token' => :'uid-token'
|
|
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
|
+
:'json' => :'Boolean',
|
|
46
|
+
:'token' => :'String',
|
|
47
|
+
:'uid_token' => :'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::GatewayGetRemoteAccess` 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::GatewayGetRemoteAccess`. 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?(:'json')
|
|
73
|
+
self.json = attributes[:'json']
|
|
74
|
+
else
|
|
75
|
+
self.json = false
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'token')
|
|
79
|
+
self.token = attributes[:'token']
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'uid_token')
|
|
83
|
+
self.uid_token = attributes[:'uid_token']
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
88
|
+
# @return Array for valid properties with the reasons
|
|
89
|
+
def list_invalid_properties
|
|
90
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
91
|
+
invalid_properties = Array.new
|
|
92
|
+
invalid_properties
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Check to see if the all the properties in the model are valid
|
|
96
|
+
# @return true if the model is valid
|
|
97
|
+
def valid?
|
|
98
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
99
|
+
true
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Checks equality by comparing each attribute.
|
|
103
|
+
# @param [Object] Object to be compared
|
|
104
|
+
def ==(o)
|
|
105
|
+
return true if self.equal?(o)
|
|
106
|
+
self.class == o.class &&
|
|
107
|
+
json == o.json &&
|
|
108
|
+
token == o.token &&
|
|
109
|
+
uid_token == o.uid_token
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# @see the `==` method
|
|
113
|
+
# @param [Object] Object to be compared
|
|
114
|
+
def eql?(o)
|
|
115
|
+
self == o
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Calculates hash code according to all attributes.
|
|
119
|
+
# @return [Integer] Hash code
|
|
120
|
+
def hash
|
|
121
|
+
[json, token, uid_token].hash
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Builds the object from hash
|
|
125
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
126
|
+
# @return [Object] Returns the model itself
|
|
127
|
+
def self.build_from_hash(attributes)
|
|
128
|
+
return nil unless attributes.is_a?(Hash)
|
|
129
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
130
|
+
transformed_hash = {}
|
|
131
|
+
openapi_types.each_pair do |key, type|
|
|
132
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
133
|
+
transformed_hash["#{key}"] = nil
|
|
134
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
135
|
+
# check to ensure the input is an array given that the attribute
|
|
136
|
+
# is documented as an array but the input is not
|
|
137
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
138
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
139
|
+
end
|
|
140
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
141
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
new(transformed_hash)
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Deserializes the data based on type
|
|
148
|
+
# @param string type Data type
|
|
149
|
+
# @param string value Value to be deserialized
|
|
150
|
+
# @return [Object] Deserialized data
|
|
151
|
+
def self._deserialize(type, value)
|
|
152
|
+
case type.to_sym
|
|
153
|
+
when :Time
|
|
154
|
+
Time.parse(value)
|
|
155
|
+
when :Date
|
|
156
|
+
Date.parse(value)
|
|
157
|
+
when :String
|
|
158
|
+
value.to_s
|
|
159
|
+
when :Integer
|
|
160
|
+
value.to_i
|
|
161
|
+
when :Float
|
|
162
|
+
value.to_f
|
|
163
|
+
when :Boolean
|
|
164
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
165
|
+
true
|
|
166
|
+
else
|
|
167
|
+
false
|
|
168
|
+
end
|
|
169
|
+
when :Object
|
|
170
|
+
# generic object (usually a Hash), return directly
|
|
171
|
+
value
|
|
172
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
173
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
174
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
175
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
176
|
+
k_type = Regexp.last_match[:k_type]
|
|
177
|
+
v_type = Regexp.last_match[:v_type]
|
|
178
|
+
{}.tap do |hash|
|
|
179
|
+
value.each do |k, v|
|
|
180
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
181
|
+
end
|
|
182
|
+
end
|
|
183
|
+
else # model
|
|
184
|
+
# models (e.g. Pet) or oneOf
|
|
185
|
+
klass = Akeyless.const_get(type)
|
|
186
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
187
|
+
end
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# Returns the string representation of the object
|
|
191
|
+
# @return [String] String presentation of the object
|
|
192
|
+
def to_s
|
|
193
|
+
to_hash.to_s
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
197
|
+
# @return [Hash] Returns the object in the form of hash
|
|
198
|
+
def to_body
|
|
199
|
+
to_hash
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Returns the object in the form of hash
|
|
203
|
+
# @return [Hash] Returns the object in the form of hash
|
|
204
|
+
def to_hash
|
|
205
|
+
hash = {}
|
|
206
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
207
|
+
value = self.send(attr)
|
|
208
|
+
if value.nil?
|
|
209
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
210
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
hash[param] = _to_hash(value)
|
|
214
|
+
end
|
|
215
|
+
hash
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# Outputs non-array value in the form of hash
|
|
219
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
220
|
+
# @param [Object] value Any valid value
|
|
221
|
+
# @return [Hash] Returns the value in the form of hash
|
|
222
|
+
def _to_hash(value)
|
|
223
|
+
if value.is_a?(Array)
|
|
224
|
+
value.compact.map { |v| _to_hash(v) }
|
|
225
|
+
elsif value.is_a?(Hash)
|
|
226
|
+
{}.tap do |hash|
|
|
227
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
228
|
+
end
|
|
229
|
+
elsif value.respond_to? :to_hash
|
|
230
|
+
value.to_hash
|
|
231
|
+
else
|
|
232
|
+
value
|
|
233
|
+
end
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
end
|
|
@@ -85,6 +85,9 @@ module Akeyless
|
|
|
85
85
|
# username to be rotated, if selected \\\"use-self-creds\\\" at rotator-creds-type, this username will try to rotate it's own password, if \\\"use-target-creds\\\" is selected, target credentials will be use to rotate the rotated-password (relevant only for rotator-type=password)
|
|
86
86
|
attr_accessor :rotated_username
|
|
87
87
|
|
|
88
|
+
# How many days before the rotation of the item would you like to be notified
|
|
89
|
+
attr_accessor :rotation_event_in
|
|
90
|
+
|
|
88
91
|
# The Rotation Hour
|
|
89
92
|
attr_accessor :rotation_hour
|
|
90
93
|
|
|
@@ -129,6 +132,7 @@ module Akeyless
|
|
|
129
132
|
:'rm_tag' => :'rm-tag',
|
|
130
133
|
:'rotated_password' => :'rotated-password',
|
|
131
134
|
:'rotated_username' => :'rotated-username',
|
|
135
|
+
:'rotation_event_in' => :'rotation-event-in',
|
|
132
136
|
:'rotation_hour' => :'rotation-hour',
|
|
133
137
|
:'rotation_interval' => :'rotation-interval',
|
|
134
138
|
:'rotator_creds_type' => :'rotator-creds-type',
|
|
@@ -169,6 +173,7 @@ module Akeyless
|
|
|
169
173
|
:'rm_tag' => :'Array<String>',
|
|
170
174
|
:'rotated_password' => :'String',
|
|
171
175
|
:'rotated_username' => :'String',
|
|
176
|
+
:'rotation_event_in' => :'Array<String>',
|
|
172
177
|
:'rotation_hour' => :'Integer',
|
|
173
178
|
:'rotation_interval' => :'String',
|
|
174
179
|
:'rotator_creds_type' => :'String',
|
|
@@ -303,6 +308,12 @@ module Akeyless
|
|
|
303
308
|
self.rotated_username = attributes[:'rotated_username']
|
|
304
309
|
end
|
|
305
310
|
|
|
311
|
+
if attributes.key?(:'rotation_event_in')
|
|
312
|
+
if (value = attributes[:'rotation_event_in']).is_a?(Array)
|
|
313
|
+
self.rotation_event_in = value
|
|
314
|
+
end
|
|
315
|
+
end
|
|
316
|
+
|
|
306
317
|
if attributes.key?(:'rotation_hour')
|
|
307
318
|
self.rotation_hour = attributes[:'rotation_hour']
|
|
308
319
|
else
|
|
@@ -387,6 +398,7 @@ module Akeyless
|
|
|
387
398
|
rm_tag == o.rm_tag &&
|
|
388
399
|
rotated_password == o.rotated_password &&
|
|
389
400
|
rotated_username == o.rotated_username &&
|
|
401
|
+
rotation_event_in == o.rotation_event_in &&
|
|
390
402
|
rotation_hour == o.rotation_hour &&
|
|
391
403
|
rotation_interval == o.rotation_interval &&
|
|
392
404
|
rotator_creds_type == o.rotator_creds_type &&
|
|
@@ -404,7 +416,7 @@ module Akeyless
|
|
|
404
416
|
# Calculates hash code according to all attributes.
|
|
405
417
|
# @return [Integer] Hash code
|
|
406
418
|
def hash
|
|
407
|
-
[add_tag, api_id, api_key, app_id, auto_rotate, custom_payload, delete_protection, description, gcp_key, gcp_service_account_email, gcp_service_account_key_id, grace_rotation, json, keep_prev_version, key, name, new_metadata, new_name, new_version, password_length, rm_tag, rotated_password, rotated_username, rotation_hour, rotation_interval, rotator_creds_type, token, type, uid_token].hash
|
|
419
|
+
[add_tag, api_id, api_key, app_id, auto_rotate, custom_payload, delete_protection, description, gcp_key, gcp_service_account_email, gcp_service_account_key_id, grace_rotation, json, keep_prev_version, key, name, new_metadata, new_name, new_version, password_length, rm_tag, rotated_password, rotated_username, rotation_event_in, rotation_hour, rotation_interval, rotator_creds_type, token, type, uid_token].hash
|
|
408
420
|
end
|
|
409
421
|
|
|
410
422
|
# Builds the object from hash
|
|
@@ -0,0 +1,318 @@
|
|
|
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: 2.0
|
|
7
|
+
Contact: support@akeyless.io
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.9.0-SNAPSHOT
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Akeyless
|
|
17
|
+
# gatewayUpdateRemoteAccess is a command that update remote access config
|
|
18
|
+
class GatewayUpdateRemoteAccess
|
|
19
|
+
# List of valid URLs to redirect from the Portal back to the remote access server (in a comma-delimited list)
|
|
20
|
+
attr_accessor :allowed_urls
|
|
21
|
+
|
|
22
|
+
# Specifies whether to show/hide if the session is currently recorded [true/false]
|
|
23
|
+
attr_accessor :hide_session_recording
|
|
24
|
+
|
|
25
|
+
# Set output format to JSON
|
|
26
|
+
attr_accessor :json
|
|
27
|
+
|
|
28
|
+
# Decide which algorithm will be used as part of the SSH initial hand-shake process
|
|
29
|
+
attr_accessor :kexalgs
|
|
30
|
+
|
|
31
|
+
# Enable support for additional keyboard layouts
|
|
32
|
+
attr_accessor :keyboard_layout
|
|
33
|
+
|
|
34
|
+
# Signs SSH certificates using legacy ssh-rsa-cert-01@openssh.com signing algorithm [true/false]
|
|
35
|
+
attr_accessor :legacy_ssh_algorithm
|
|
36
|
+
|
|
37
|
+
# Specify the usernameSubClaim that exists inside the IDP JWT, e.g. email
|
|
38
|
+
attr_accessor :rdp_target_configuration
|
|
39
|
+
|
|
40
|
+
# Specify the usernameSubClaim that exists inside the IDP JWT, e.g. email
|
|
41
|
+
attr_accessor :ssh_target_configuration
|
|
42
|
+
|
|
43
|
+
# Authentication token (see `/auth` and `/configure`)
|
|
44
|
+
attr_accessor :token
|
|
45
|
+
|
|
46
|
+
# The universal identity token, Required only for universal_identity authentication
|
|
47
|
+
attr_accessor :uid_token
|
|
48
|
+
|
|
49
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
50
|
+
def self.attribute_map
|
|
51
|
+
{
|
|
52
|
+
:'allowed_urls' => :'allowed-urls',
|
|
53
|
+
:'hide_session_recording' => :'hide-session-recording',
|
|
54
|
+
:'json' => :'json',
|
|
55
|
+
:'kexalgs' => :'kexalgs',
|
|
56
|
+
:'keyboard_layout' => :'keyboard-layout',
|
|
57
|
+
:'legacy_ssh_algorithm' => :'legacy-ssh-algorithm',
|
|
58
|
+
:'rdp_target_configuration' => :'rdp-target-configuration',
|
|
59
|
+
:'ssh_target_configuration' => :'ssh-target-configuration',
|
|
60
|
+
:'token' => :'token',
|
|
61
|
+
:'uid_token' => :'uid-token'
|
|
62
|
+
}
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Returns all the JSON keys this model knows about
|
|
66
|
+
def self.acceptable_attributes
|
|
67
|
+
attribute_map.values
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Attribute type mapping.
|
|
71
|
+
def self.openapi_types
|
|
72
|
+
{
|
|
73
|
+
:'allowed_urls' => :'String',
|
|
74
|
+
:'hide_session_recording' => :'String',
|
|
75
|
+
:'json' => :'Boolean',
|
|
76
|
+
:'kexalgs' => :'String',
|
|
77
|
+
:'keyboard_layout' => :'String',
|
|
78
|
+
:'legacy_ssh_algorithm' => :'String',
|
|
79
|
+
:'rdp_target_configuration' => :'String',
|
|
80
|
+
:'ssh_target_configuration' => :'String',
|
|
81
|
+
:'token' => :'String',
|
|
82
|
+
:'uid_token' => :'String'
|
|
83
|
+
}
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# List of attributes with nullable: true
|
|
87
|
+
def self.openapi_nullable
|
|
88
|
+
Set.new([
|
|
89
|
+
])
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Initializes the object
|
|
93
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
94
|
+
def initialize(attributes = {})
|
|
95
|
+
if (!attributes.is_a?(Hash))
|
|
96
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::GatewayUpdateRemoteAccess` initialize method"
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
100
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
101
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
102
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::GatewayUpdateRemoteAccess`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
103
|
+
end
|
|
104
|
+
h[k.to_sym] = v
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
if attributes.key?(:'allowed_urls')
|
|
108
|
+
self.allowed_urls = attributes[:'allowed_urls']
|
|
109
|
+
else
|
|
110
|
+
self.allowed_urls = 'use-existing'
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
if attributes.key?(:'hide_session_recording')
|
|
114
|
+
self.hide_session_recording = attributes[:'hide_session_recording']
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
if attributes.key?(:'json')
|
|
118
|
+
self.json = attributes[:'json']
|
|
119
|
+
else
|
|
120
|
+
self.json = false
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
if attributes.key?(:'kexalgs')
|
|
124
|
+
self.kexalgs = attributes[:'kexalgs']
|
|
125
|
+
else
|
|
126
|
+
self.kexalgs = 'use-existing'
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
if attributes.key?(:'keyboard_layout')
|
|
130
|
+
self.keyboard_layout = attributes[:'keyboard_layout']
|
|
131
|
+
else
|
|
132
|
+
self.keyboard_layout = 'use-existing'
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
if attributes.key?(:'legacy_ssh_algorithm')
|
|
136
|
+
self.legacy_ssh_algorithm = attributes[:'legacy_ssh_algorithm']
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
if attributes.key?(:'rdp_target_configuration')
|
|
140
|
+
self.rdp_target_configuration = attributes[:'rdp_target_configuration']
|
|
141
|
+
else
|
|
142
|
+
self.rdp_target_configuration = 'use-existing'
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
if attributes.key?(:'ssh_target_configuration')
|
|
146
|
+
self.ssh_target_configuration = attributes[:'ssh_target_configuration']
|
|
147
|
+
else
|
|
148
|
+
self.ssh_target_configuration = 'use-existing'
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if attributes.key?(:'token')
|
|
152
|
+
self.token = attributes[:'token']
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
if attributes.key?(:'uid_token')
|
|
156
|
+
self.uid_token = attributes[:'uid_token']
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
161
|
+
# @return Array for valid properties with the reasons
|
|
162
|
+
def list_invalid_properties
|
|
163
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
164
|
+
invalid_properties = Array.new
|
|
165
|
+
invalid_properties
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# Check to see if the all the properties in the model are valid
|
|
169
|
+
# @return true if the model is valid
|
|
170
|
+
def valid?
|
|
171
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
172
|
+
true
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Checks equality by comparing each attribute.
|
|
176
|
+
# @param [Object] Object to be compared
|
|
177
|
+
def ==(o)
|
|
178
|
+
return true if self.equal?(o)
|
|
179
|
+
self.class == o.class &&
|
|
180
|
+
allowed_urls == o.allowed_urls &&
|
|
181
|
+
hide_session_recording == o.hide_session_recording &&
|
|
182
|
+
json == o.json &&
|
|
183
|
+
kexalgs == o.kexalgs &&
|
|
184
|
+
keyboard_layout == o.keyboard_layout &&
|
|
185
|
+
legacy_ssh_algorithm == o.legacy_ssh_algorithm &&
|
|
186
|
+
rdp_target_configuration == o.rdp_target_configuration &&
|
|
187
|
+
ssh_target_configuration == o.ssh_target_configuration &&
|
|
188
|
+
token == o.token &&
|
|
189
|
+
uid_token == o.uid_token
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# @see the `==` method
|
|
193
|
+
# @param [Object] Object to be compared
|
|
194
|
+
def eql?(o)
|
|
195
|
+
self == o
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# Calculates hash code according to all attributes.
|
|
199
|
+
# @return [Integer] Hash code
|
|
200
|
+
def hash
|
|
201
|
+
[allowed_urls, hide_session_recording, json, kexalgs, keyboard_layout, legacy_ssh_algorithm, rdp_target_configuration, ssh_target_configuration, token, uid_token].hash
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# Builds the object from hash
|
|
205
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
206
|
+
# @return [Object] Returns the model itself
|
|
207
|
+
def self.build_from_hash(attributes)
|
|
208
|
+
return nil unless attributes.is_a?(Hash)
|
|
209
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
210
|
+
transformed_hash = {}
|
|
211
|
+
openapi_types.each_pair do |key, type|
|
|
212
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
213
|
+
transformed_hash["#{key}"] = nil
|
|
214
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
215
|
+
# check to ensure the input is an array given that the attribute
|
|
216
|
+
# is documented as an array but the input is not
|
|
217
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
218
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
219
|
+
end
|
|
220
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
221
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
222
|
+
end
|
|
223
|
+
end
|
|
224
|
+
new(transformed_hash)
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# Deserializes the data based on type
|
|
228
|
+
# @param string type Data type
|
|
229
|
+
# @param string value Value to be deserialized
|
|
230
|
+
# @return [Object] Deserialized data
|
|
231
|
+
def self._deserialize(type, value)
|
|
232
|
+
case type.to_sym
|
|
233
|
+
when :Time
|
|
234
|
+
Time.parse(value)
|
|
235
|
+
when :Date
|
|
236
|
+
Date.parse(value)
|
|
237
|
+
when :String
|
|
238
|
+
value.to_s
|
|
239
|
+
when :Integer
|
|
240
|
+
value.to_i
|
|
241
|
+
when :Float
|
|
242
|
+
value.to_f
|
|
243
|
+
when :Boolean
|
|
244
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
245
|
+
true
|
|
246
|
+
else
|
|
247
|
+
false
|
|
248
|
+
end
|
|
249
|
+
when :Object
|
|
250
|
+
# generic object (usually a Hash), return directly
|
|
251
|
+
value
|
|
252
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
253
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
254
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
255
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
256
|
+
k_type = Regexp.last_match[:k_type]
|
|
257
|
+
v_type = Regexp.last_match[:v_type]
|
|
258
|
+
{}.tap do |hash|
|
|
259
|
+
value.each do |k, v|
|
|
260
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
261
|
+
end
|
|
262
|
+
end
|
|
263
|
+
else # model
|
|
264
|
+
# models (e.g. Pet) or oneOf
|
|
265
|
+
klass = Akeyless.const_get(type)
|
|
266
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
267
|
+
end
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
# Returns the string representation of the object
|
|
271
|
+
# @return [String] String presentation of the object
|
|
272
|
+
def to_s
|
|
273
|
+
to_hash.to_s
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
277
|
+
# @return [Hash] Returns the object in the form of hash
|
|
278
|
+
def to_body
|
|
279
|
+
to_hash
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
# Returns the object in the form of hash
|
|
283
|
+
# @return [Hash] Returns the object in the form of hash
|
|
284
|
+
def to_hash
|
|
285
|
+
hash = {}
|
|
286
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
287
|
+
value = self.send(attr)
|
|
288
|
+
if value.nil?
|
|
289
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
290
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
hash[param] = _to_hash(value)
|
|
294
|
+
end
|
|
295
|
+
hash
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
# Outputs non-array value in the form of hash
|
|
299
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
300
|
+
# @param [Object] value Any valid value
|
|
301
|
+
# @return [Hash] Returns the value in the form of hash
|
|
302
|
+
def _to_hash(value)
|
|
303
|
+
if value.is_a?(Array)
|
|
304
|
+
value.compact.map { |v| _to_hash(v) }
|
|
305
|
+
elsif value.is_a?(Hash)
|
|
306
|
+
{}.tap do |hash|
|
|
307
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
308
|
+
end
|
|
309
|
+
elsif value.respond_to? :to_hash
|
|
310
|
+
value.to_hash
|
|
311
|
+
else
|
|
312
|
+
value
|
|
313
|
+
end
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
end
|
|
317
|
+
|
|
318
|
+
end
|