akeyless 5.0.21 → 5.0.23
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 +35 -1
- data/docs/AccountGeneralSettings.md +6 -0
- data/docs/ActiveDirectoryPayload.md +6 -0
- data/docs/Auth.md +2 -0
- data/docs/AuthMethodCreateCert.md +2 -0
- data/docs/AuthMethodCreateUniversalIdentity.md +4 -0
- data/docs/AuthMethodUpdateCert.md +2 -0
- data/docs/AuthMethodUpdateUniversalIdentity.md +4 -0
- data/docs/AwsStorage.md +2 -0
- data/docs/AzureADAccessRules.md +2 -0
- data/docs/AzureTargetDetails.md +2 -0
- data/docs/CertAccessRules.md +2 -0
- data/docs/CertificateChainInfo.md +2 -0
- data/docs/Configure.md +2 -0
- data/docs/ConjurMigration.md +20 -0
- data/docs/ConjurPayload.md +24 -0
- data/docs/CreateAuthMethodCert.md +2 -0
- data/docs/CreateAuthMethodUniversalIdentity.md +4 -0
- data/docs/CreateAzureTarget.md +2 -0
- data/docs/CreateRotatedSecret.md +3 -1
- data/docs/CreateSecret.md +2 -0
- data/docs/CreateUSC.md +10 -0
- data/docs/DSProducerDetails.md +2 -0
- data/docs/DefaultAuthMethodSettings.md +20 -0
- data/docs/DeleteRoleRule.md +1 -1
- data/docs/DescribePermissions.md +1 -1
- data/docs/DigiCertTargetDetails.md +42 -0
- data/docs/EsmListSecretsOutput.md +3 -1
- data/docs/GatewayCreateMigration.md +19 -1
- data/docs/GatewayUpdateMigration.md +18 -0
- data/docs/GatewayUpdateRemoteAccessRdpRecordings.md +2 -0
- data/docs/GeneralConfigPart.md +4 -0
- data/docs/GetPKICertificateOutput.md +2 -0
- data/docs/GithubMetadata.md +28 -0
- data/docs/GoogleTrustTargetDetails.md +42 -0
- data/docs/HTTPChallengeInfo.md +26 -0
- data/docs/HashiPayload.md +5 -1
- data/docs/IssuerOverviewInfo.md +22 -0
- data/docs/Item.md +2 -0
- data/docs/ItemGeneralInfo.md +2 -0
- data/docs/ItemLockingSetting.md +20 -0
- data/docs/LockItem.md +28 -0
- data/docs/LockTarget.md +28 -0
- data/docs/LockingInfo.md +24 -0
- data/docs/MigrationStatusReplyObj.md +4 -0
- data/docs/MigrationsConfigPart.md +2 -0
- data/docs/NetappStorage.md +30 -0
- data/docs/ReverseRBAC.md +1 -1
- data/docs/RotatedSecretCreateAws.md +3 -1
- data/docs/RotatedSecretCreateAzure.md +3 -1
- data/docs/RotatedSecretCreateCustom.md +3 -1
- data/docs/RotatedSecretCreateLdap.md +3 -1
- data/docs/RotatedSecretCreateMongodb.md +3 -1
- data/docs/RotatedSecretCreateMssql.md +3 -1
- data/docs/RotatedSecretCreateMysql.md +3 -1
- data/docs/RotatedSecretCreateOracledb.md +3 -1
- data/docs/RotatedSecretCreatePostgresql.md +3 -1
- data/docs/RotatedSecretCreateRedshift.md +3 -1
- data/docs/RotatedSecretCreateSsh.md +3 -1
- data/docs/RotatedSecretCreateWindows.md +3 -1
- data/docs/RotatedSecretUpdateAws.md +3 -1
- data/docs/RotatedSecretUpdateAzure.md +3 -1
- data/docs/RotatedSecretUpdateCustom.md +3 -1
- data/docs/RotatedSecretUpdateLdap.md +3 -1
- data/docs/RotatedSecretUpdateMongodb.md +3 -1
- data/docs/RotatedSecretUpdateMssql.md +3 -1
- data/docs/RotatedSecretUpdateMysql.md +3 -1
- data/docs/RotatedSecretUpdateOracledb.md +3 -1
- data/docs/RotatedSecretUpdatePostgresql.md +3 -1
- data/docs/RotatedSecretUpdateRedshift.md +3 -1
- data/docs/RotatedSecretUpdateSsh.md +3 -1
- data/docs/RotatedSecretUpdateWindows.md +3 -1
- data/docs/SecretInfo.md +4 -0
- data/docs/SecureRemoteAccess.md +4 -0
- data/docs/SetRoleRule.md +1 -1
- data/docs/SyncCounters.md +22 -0
- data/docs/Target.md +2 -0
- data/docs/TargetCreateAzure.md +2 -0
- data/docs/TargetCreateDigiCert.md +50 -0
- data/docs/TargetCreateGoogleTrust.md +50 -0
- data/docs/TargetCreateLetsEncrypt.md +1 -1
- data/docs/TargetCreateSplunk.md +3 -1
- data/docs/TargetTypeDetailsInput.md +4 -0
- data/docs/TargetUpdateAzure.md +2 -0
- data/docs/TargetUpdateDigiCert.md +54 -0
- data/docs/TargetUpdateGoogleTrust.md +54 -0
- data/docs/TargetUpdateLetsEncrypt.md +1 -1
- data/docs/UniversalIdentityAccessRules.md +4 -0
- data/docs/UnlockItem.md +24 -0
- data/docs/UnlockTarget.md +24 -0
- data/docs/UpdateAccountSettings.md +4 -0
- data/docs/UpdateAuthMethodCert.md +2 -0
- data/docs/UpdateAuthMethodUniversalIdentity.md +4 -0
- data/docs/UpdateAzureTarget.md +2 -0
- data/docs/UpdateItem.md +3 -1
- data/docs/UpdateRotatedSecret.md +3 -1
- data/docs/UscCreate.md +2 -0
- data/docs/UscDelete.md +4 -0
- data/docs/UscGet.md +4 -0
- data/docs/UscListSecretsOutput.md +3 -1
- data/docs/UscUpdate.md +4 -0
- data/docs/V2Api.md +632 -2
- data/docs/ValidateCertificateChallenge.md +30 -0
- data/docs/ValidateCertificateChallengeOutput.md +24 -0
- data/docs/VaultAddress.md +20 -0
- data/docs/VaultAddressOutput.md +20 -0
- data/docs/WebBastionRdpRecord.md +2 -0
- data/lib/akeyless/api/v2_api.rb +640 -0
- data/lib/akeyless/models/account_general_settings.rb +28 -1
- data/lib/akeyless/models/active_directory_payload.rb +30 -1
- data/lib/akeyless/models/auth.rb +13 -1
- data/lib/akeyless/models/auth_method_create_cert.rb +11 -1
- data/lib/akeyless/models/auth_method_create_universal_identity.rb +25 -1
- data/lib/akeyless/models/auth_method_update_cert.rb +11 -1
- data/lib/akeyless/models/auth_method_update_universal_identity.rb +25 -1
- data/lib/akeyless/models/aws_storage.rb +10 -1
- data/lib/akeyless/models/azure_ad_access_rules.rb +11 -1
- data/lib/akeyless/models/azure_target_details.rb +10 -1
- data/lib/akeyless/models/cert_access_rules.rb +11 -1
- data/lib/akeyless/models/certificate_chain_info.rb +11 -1
- data/lib/akeyless/models/configure.rb +13 -1
- data/lib/akeyless/models/conjur_migration.rb +223 -0
- data/lib/akeyless/models/conjur_payload.rb +241 -0
- data/lib/akeyless/models/create_auth_method_cert.rb +11 -1
- data/lib/akeyless/models/create_auth_method_universal_identity.rb +25 -1
- data/lib/akeyless/models/create_azure_target.rb +13 -1
- data/lib/akeyless/models/create_rotated_secret.rb +12 -4
- data/lib/akeyless/models/create_secret.rb +11 -1
- data/lib/akeyless/models/create_usc.rb +54 -1
- data/lib/akeyless/models/default_auth_method_settings.rb +223 -0
- data/lib/akeyless/models/delete_role_rule.rb +1 -1
- data/lib/akeyless/models/describe_permissions.rb +1 -1
- data/lib/akeyless/models/digi_cert_target_details.rb +333 -0
- data/lib/akeyless/models/ds_producer_details.rb +10 -1
- data/lib/akeyless/models/esm_list_secrets_output.rb +15 -4
- data/lib/akeyless/models/gateway_create_migration.rb +94 -2
- data/lib/akeyless/models/gateway_update_migration.rb +93 -1
- data/lib/akeyless/models/gateway_update_remote_access_rdp_recordings.rb +11 -1
- data/lib/akeyless/models/general_config_part.rb +19 -1
- data/lib/akeyless/models/get_pki_certificate_output.rb +10 -1
- data/lib/akeyless/models/github_metadata.rb +259 -0
- data/lib/akeyless/models/google_trust_target_details.rb +335 -0
- data/lib/akeyless/models/hashi_payload.rb +22 -4
- data/lib/akeyless/models/http_challenge_info.rb +251 -0
- data/lib/akeyless/models/issuer_overview_info.rb +232 -0
- data/lib/akeyless/models/item.rb +10 -1
- data/lib/akeyless/models/item_general_info.rb +10 -1
- data/lib/akeyless/models/item_locking_setting.rb +223 -0
- data/lib/akeyless/models/lock_item.rb +274 -0
- data/lib/akeyless/models/lock_target.rb +274 -0
- data/lib/akeyless/models/locking_info.rb +243 -0
- data/lib/akeyless/models/migration_status_reply_obj.rb +19 -1
- data/lib/akeyless/models/migrations_config_part.rb +12 -1
- data/lib/akeyless/models/netapp_storage.rb +268 -0
- data/lib/akeyless/models/reverse_rbac.rb +1 -1
- data/lib/akeyless/models/rotated_secret_create_aws.rb +12 -4
- data/lib/akeyless/models/rotated_secret_create_azure.rb +12 -4
- data/lib/akeyless/models/rotated_secret_create_custom.rb +12 -4
- data/lib/akeyless/models/rotated_secret_create_ldap.rb +12 -4
- data/lib/akeyless/models/rotated_secret_create_mongodb.rb +12 -4
- data/lib/akeyless/models/rotated_secret_create_mssql.rb +12 -4
- data/lib/akeyless/models/rotated_secret_create_mysql.rb +12 -4
- data/lib/akeyless/models/rotated_secret_create_oracledb.rb +12 -4
- data/lib/akeyless/models/rotated_secret_create_postgresql.rb +12 -4
- data/lib/akeyless/models/rotated_secret_create_redshift.rb +12 -4
- data/lib/akeyless/models/rotated_secret_create_ssh.rb +12 -4
- data/lib/akeyless/models/rotated_secret_create_windows.rb +12 -4
- data/lib/akeyless/models/rotated_secret_update_aws.rb +12 -4
- data/lib/akeyless/models/rotated_secret_update_azure.rb +12 -4
- data/lib/akeyless/models/rotated_secret_update_custom.rb +12 -4
- data/lib/akeyless/models/rotated_secret_update_ldap.rb +12 -4
- data/lib/akeyless/models/rotated_secret_update_mongodb.rb +12 -4
- data/lib/akeyless/models/rotated_secret_update_mssql.rb +12 -4
- data/lib/akeyless/models/rotated_secret_update_mysql.rb +12 -4
- data/lib/akeyless/models/rotated_secret_update_oracledb.rb +12 -4
- data/lib/akeyless/models/rotated_secret_update_postgresql.rb +12 -4
- data/lib/akeyless/models/rotated_secret_update_redshift.rb +12 -4
- data/lib/akeyless/models/rotated_secret_update_ssh.rb +12 -4
- data/lib/akeyless/models/rotated_secret_update_windows.rb +12 -4
- data/lib/akeyless/models/secret_info.rb +19 -1
- data/lib/akeyless/models/secure_remote_access.rb +19 -1
- data/lib/akeyless/models/set_role_rule.rb +1 -1
- data/lib/akeyless/models/sync_counters.rb +233 -0
- data/lib/akeyless/models/target.rb +10 -1
- data/lib/akeyless/models/target_create_azure.rb +13 -1
- data/lib/akeyless/models/target_create_digi_cert.rb +398 -0
- data/lib/akeyless/models/target_create_google_trust.rb +398 -0
- data/lib/akeyless/models/target_create_lets_encrypt.rb +7 -0
- data/lib/akeyless/models/target_create_splunk.rb +11 -1
- data/lib/akeyless/models/target_type_details_input.rb +19 -1
- data/lib/akeyless/models/target_update_azure.rb +13 -1
- data/lib/akeyless/models/target_update_digi_cert.rb +418 -0
- data/lib/akeyless/models/target_update_google_trust.rb +418 -0
- data/lib/akeyless/models/target_update_lets_encrypt.rb +7 -0
- data/lib/akeyless/models/universal_identity_access_rules.rb +19 -1
- data/lib/akeyless/models/unlock_item.rb +254 -0
- data/lib/akeyless/models/unlock_target.rb +254 -0
- data/lib/akeyless/models/update_account_settings.rb +21 -1
- data/lib/akeyless/models/update_auth_method_cert.rb +11 -1
- data/lib/akeyless/models/update_auth_method_universal_identity.rb +25 -1
- data/lib/akeyless/models/update_azure_target.rb +13 -1
- data/lib/akeyless/models/update_item.rb +12 -4
- data/lib/akeyless/models/update_rotated_secret.rb +12 -4
- data/lib/akeyless/models/usc_create.rb +10 -1
- data/lib/akeyless/models/usc_delete.rb +20 -1
- data/lib/akeyless/models/usc_get.rb +20 -1
- data/lib/akeyless/models/usc_list_secrets_output.rb +15 -4
- data/lib/akeyless/models/usc_update.rb +20 -1
- data/lib/akeyless/models/validate_certificate_challenge.rb +279 -0
- data/lib/akeyless/models/validate_certificate_challenge_output.rb +242 -0
- data/lib/akeyless/models/vault_address.rb +227 -0
- data/lib/akeyless/models/vault_address_output.rb +223 -0
- data/lib/akeyless/models/web_bastion_rdp_record.rb +10 -1
- data/lib/akeyless/version.rb +1 -1
- data/lib/akeyless.rb +24 -0
- data/spec/models/conjur_migration_spec.rb +42 -0
- data/spec/models/conjur_payload_spec.rb +54 -0
- data/spec/models/default_auth_method_settings_spec.rb +42 -0
- data/spec/models/digi_cert_target_details_spec.rb +108 -0
- data/spec/models/github_metadata_spec.rb +66 -0
- data/spec/models/google_trust_target_details_spec.rb +108 -0
- data/spec/models/http_challenge_info_spec.rb +60 -0
- data/spec/models/issuer_overview_info_spec.rb +48 -0
- data/spec/models/item_locking_setting_spec.rb +42 -0
- data/spec/models/lock_item_spec.rb +66 -0
- data/spec/models/lock_target_spec.rb +66 -0
- data/spec/models/locking_info_spec.rb +54 -0
- data/spec/models/netapp_storage_spec.rb +72 -0
- data/spec/models/sync_counters_spec.rb +48 -0
- data/spec/models/target_create_digi_cert_spec.rb +132 -0
- data/spec/models/target_create_google_trust_spec.rb +132 -0
- data/spec/models/target_update_digi_cert_spec.rb +144 -0
- data/spec/models/target_update_google_trust_spec.rb +144 -0
- data/spec/models/unlock_item_spec.rb +54 -0
- data/spec/models/unlock_target_spec.rb +54 -0
- data/spec/models/validate_certificate_challenge_output_spec.rb +54 -0
- data/spec/models/validate_certificate_challenge_spec.rb +72 -0
- data/spec/models/vault_address_output_spec.rb +42 -0
- data/spec/models/vault_address_spec.rb +42 -0
- metadata +1233 -1134
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Akeyless API
|
|
3
|
+
|
|
4
|
+
#The purpose of this application is to provide access to Akeyless API.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 3.0
|
|
7
|
+
Contact: support@akeyless.io
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.10.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Akeyless
|
|
17
|
+
class LockingInfo
|
|
18
|
+
attr_accessor :actions
|
|
19
|
+
|
|
20
|
+
attr_accessor :expire_at
|
|
21
|
+
|
|
22
|
+
attr_accessor :locked_by
|
|
23
|
+
|
|
24
|
+
attr_accessor :unique_identifier
|
|
25
|
+
|
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
|
+
def self.attribute_map
|
|
28
|
+
{
|
|
29
|
+
:'actions' => :'actions',
|
|
30
|
+
:'expire_at' => :'expire_at',
|
|
31
|
+
:'locked_by' => :'locked_by',
|
|
32
|
+
:'unique_identifier' => :'unique_identifier'
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns all the JSON keys this model knows about
|
|
37
|
+
def self.acceptable_attributes
|
|
38
|
+
attribute_map.values
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Attribute type mapping.
|
|
42
|
+
def self.openapi_types
|
|
43
|
+
{
|
|
44
|
+
:'actions' => :'Array<String>',
|
|
45
|
+
:'expire_at' => :'Integer',
|
|
46
|
+
:'locked_by' => :'String',
|
|
47
|
+
:'unique_identifier' => :'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::LockingInfo` 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::LockingInfo`. 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?(:'actions')
|
|
73
|
+
if (value = attributes[:'actions']).is_a?(Array)
|
|
74
|
+
self.actions = value
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'expire_at')
|
|
79
|
+
self.expire_at = attributes[:'expire_at']
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'locked_by')
|
|
83
|
+
self.locked_by = attributes[:'locked_by']
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'unique_identifier')
|
|
87
|
+
self.unique_identifier = attributes[:'unique_identifier']
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
92
|
+
# @return Array for valid properties with the reasons
|
|
93
|
+
def list_invalid_properties
|
|
94
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
95
|
+
invalid_properties = Array.new
|
|
96
|
+
invalid_properties
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Check to see if the all the properties in the model are valid
|
|
100
|
+
# @return true if the model is valid
|
|
101
|
+
def valid?
|
|
102
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
103
|
+
true
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Checks equality by comparing each attribute.
|
|
107
|
+
# @param [Object] Object to be compared
|
|
108
|
+
def ==(o)
|
|
109
|
+
return true if self.equal?(o)
|
|
110
|
+
self.class == o.class &&
|
|
111
|
+
actions == o.actions &&
|
|
112
|
+
expire_at == o.expire_at &&
|
|
113
|
+
locked_by == o.locked_by &&
|
|
114
|
+
unique_identifier == o.unique_identifier
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# @see the `==` method
|
|
118
|
+
# @param [Object] Object to be compared
|
|
119
|
+
def eql?(o)
|
|
120
|
+
self == o
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Calculates hash code according to all attributes.
|
|
124
|
+
# @return [Integer] Hash code
|
|
125
|
+
def hash
|
|
126
|
+
[actions, expire_at, locked_by, unique_identifier].hash
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Builds the object from hash
|
|
130
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
131
|
+
# @return [Object] Returns the model itself
|
|
132
|
+
def self.build_from_hash(attributes)
|
|
133
|
+
return nil unless attributes.is_a?(Hash)
|
|
134
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
135
|
+
transformed_hash = {}
|
|
136
|
+
openapi_types.each_pair do |key, type|
|
|
137
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
138
|
+
transformed_hash["#{key}"] = nil
|
|
139
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
140
|
+
# check to ensure the input is an array given that the attribute
|
|
141
|
+
# is documented as an array but the input is not
|
|
142
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
143
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
144
|
+
end
|
|
145
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
146
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
new(transformed_hash)
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Deserializes the data based on type
|
|
153
|
+
# @param string type Data type
|
|
154
|
+
# @param string value Value to be deserialized
|
|
155
|
+
# @return [Object] Deserialized data
|
|
156
|
+
def self._deserialize(type, value)
|
|
157
|
+
case type.to_sym
|
|
158
|
+
when :Time
|
|
159
|
+
Time.parse(value)
|
|
160
|
+
when :Date
|
|
161
|
+
Date.parse(value)
|
|
162
|
+
when :String
|
|
163
|
+
value.to_s
|
|
164
|
+
when :Integer
|
|
165
|
+
value.to_i
|
|
166
|
+
when :Float
|
|
167
|
+
value.to_f
|
|
168
|
+
when :Boolean
|
|
169
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
170
|
+
true
|
|
171
|
+
else
|
|
172
|
+
false
|
|
173
|
+
end
|
|
174
|
+
when :Object
|
|
175
|
+
# generic object (usually a Hash), return directly
|
|
176
|
+
value
|
|
177
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
178
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
179
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
180
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
181
|
+
k_type = Regexp.last_match[:k_type]
|
|
182
|
+
v_type = Regexp.last_match[:v_type]
|
|
183
|
+
{}.tap do |hash|
|
|
184
|
+
value.each do |k, v|
|
|
185
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
186
|
+
end
|
|
187
|
+
end
|
|
188
|
+
else # model
|
|
189
|
+
# models (e.g. Pet) or oneOf
|
|
190
|
+
klass = Akeyless.const_get(type)
|
|
191
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
192
|
+
end
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# Returns the string representation of the object
|
|
196
|
+
# @return [String] String presentation of the object
|
|
197
|
+
def to_s
|
|
198
|
+
to_hash.to_s
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
202
|
+
# @return [Hash] Returns the object in the form of hash
|
|
203
|
+
def to_body
|
|
204
|
+
to_hash
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
# Returns the object in the form of hash
|
|
208
|
+
# @return [Hash] Returns the object in the form of hash
|
|
209
|
+
def to_hash
|
|
210
|
+
hash = {}
|
|
211
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
212
|
+
value = self.send(attr)
|
|
213
|
+
if value.nil?
|
|
214
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
215
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
hash[param] = _to_hash(value)
|
|
219
|
+
end
|
|
220
|
+
hash
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
# Outputs non-array value in the form of hash
|
|
224
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
225
|
+
# @param [Object] value Any valid value
|
|
226
|
+
# @return [Hash] Returns the value in the form of hash
|
|
227
|
+
def _to_hash(value)
|
|
228
|
+
if value.is_a?(Array)
|
|
229
|
+
value.compact.map { |v| _to_hash(v) }
|
|
230
|
+
elsif value.is_a?(Hash)
|
|
231
|
+
{}.tap do |hash|
|
|
232
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
233
|
+
end
|
|
234
|
+
elsif value.respond_to? :to_hash
|
|
235
|
+
value.to_hash
|
|
236
|
+
else
|
|
237
|
+
value
|
|
238
|
+
end
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
end
|
|
@@ -15,6 +15,8 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Akeyless
|
|
17
17
|
class MigrationStatusReplyObj
|
|
18
|
+
attr_accessor :certificates
|
|
19
|
+
|
|
18
20
|
attr_accessor :computers
|
|
19
21
|
|
|
20
22
|
attr_accessor :duration_time
|
|
@@ -43,11 +45,14 @@ module Akeyless
|
|
|
43
45
|
|
|
44
46
|
attr_accessor :start_time
|
|
45
47
|
|
|
48
|
+
attr_accessor :sync
|
|
49
|
+
|
|
46
50
|
attr_accessor :targets
|
|
47
51
|
|
|
48
52
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
49
53
|
def self.attribute_map
|
|
50
54
|
{
|
|
55
|
+
:'certificates' => :'certificates',
|
|
51
56
|
:'computers' => :'computers',
|
|
52
57
|
:'duration_time' => :'duration_time',
|
|
53
58
|
:'error' => :'error',
|
|
@@ -62,6 +67,7 @@ module Akeyless
|
|
|
62
67
|
:'migration_type_name' => :'migration_type_name',
|
|
63
68
|
:'rotated_secrets' => :'rotated_secrets',
|
|
64
69
|
:'start_time' => :'start_time',
|
|
70
|
+
:'sync' => :'sync',
|
|
65
71
|
:'targets' => :'targets'
|
|
66
72
|
}
|
|
67
73
|
end
|
|
@@ -74,6 +80,7 @@ module Akeyless
|
|
|
74
80
|
# Attribute type mapping.
|
|
75
81
|
def self.openapi_types
|
|
76
82
|
{
|
|
83
|
+
:'certificates' => :'MigrationItems',
|
|
77
84
|
:'computers' => :'Integer',
|
|
78
85
|
:'duration_time' => :'String',
|
|
79
86
|
:'error' => :'String',
|
|
@@ -88,6 +95,7 @@ module Akeyless
|
|
|
88
95
|
:'migration_type_name' => :'String',
|
|
89
96
|
:'rotated_secrets' => :'MigrationItems',
|
|
90
97
|
:'start_time' => :'String',
|
|
98
|
+
:'sync' => :'SyncCounters',
|
|
91
99
|
:'targets' => :'MigrationItems'
|
|
92
100
|
}
|
|
93
101
|
end
|
|
@@ -113,6 +121,10 @@ module Akeyless
|
|
|
113
121
|
h[k.to_sym] = v
|
|
114
122
|
}
|
|
115
123
|
|
|
124
|
+
if attributes.key?(:'certificates')
|
|
125
|
+
self.certificates = attributes[:'certificates']
|
|
126
|
+
end
|
|
127
|
+
|
|
116
128
|
if attributes.key?(:'computers')
|
|
117
129
|
self.computers = attributes[:'computers']
|
|
118
130
|
end
|
|
@@ -169,6 +181,10 @@ module Akeyless
|
|
|
169
181
|
self.start_time = attributes[:'start_time']
|
|
170
182
|
end
|
|
171
183
|
|
|
184
|
+
if attributes.key?(:'sync')
|
|
185
|
+
self.sync = attributes[:'sync']
|
|
186
|
+
end
|
|
187
|
+
|
|
172
188
|
if attributes.key?(:'targets')
|
|
173
189
|
self.targets = attributes[:'targets']
|
|
174
190
|
end
|
|
@@ -194,6 +210,7 @@ module Akeyless
|
|
|
194
210
|
def ==(o)
|
|
195
211
|
return true if self.equal?(o)
|
|
196
212
|
self.class == o.class &&
|
|
213
|
+
certificates == o.certificates &&
|
|
197
214
|
computers == o.computers &&
|
|
198
215
|
duration_time == o.duration_time &&
|
|
199
216
|
error == o.error &&
|
|
@@ -208,6 +225,7 @@ module Akeyless
|
|
|
208
225
|
migration_type_name == o.migration_type_name &&
|
|
209
226
|
rotated_secrets == o.rotated_secrets &&
|
|
210
227
|
start_time == o.start_time &&
|
|
228
|
+
sync == o.sync &&
|
|
211
229
|
targets == o.targets
|
|
212
230
|
end
|
|
213
231
|
|
|
@@ -220,7 +238,7 @@ module Akeyless
|
|
|
220
238
|
# Calculates hash code according to all attributes.
|
|
221
239
|
# @return [Integer] Hash code
|
|
222
240
|
def hash
|
|
223
|
-
[computers, duration_time, error, last_status_message, max_name_length, max_value_length, migration_id, migration_items, migration_name, migration_state, migration_type, migration_type_name, rotated_secrets, start_time, targets].hash
|
|
241
|
+
[certificates, computers, duration_time, error, last_status_message, max_name_length, max_value_length, migration_id, migration_items, migration_name, migration_state, migration_type, migration_type_name, rotated_secrets, start_time, sync, targets].hash
|
|
224
242
|
end
|
|
225
243
|
|
|
226
244
|
# Builds the object from hash
|
|
@@ -23,6 +23,8 @@ module Akeyless
|
|
|
23
23
|
|
|
24
24
|
attr_accessor :certificate_migrations
|
|
25
25
|
|
|
26
|
+
attr_accessor :conjur_migrations
|
|
27
|
+
|
|
26
28
|
attr_accessor :gcp_secrets_migrations
|
|
27
29
|
|
|
28
30
|
attr_accessor :hashi_migrations
|
|
@@ -42,6 +44,7 @@ module Akeyless
|
|
|
42
44
|
:'aws_secrets_migrations' => :'aws_secrets_migrations',
|
|
43
45
|
:'azure_kv_migrations' => :'azure_kv_migrations',
|
|
44
46
|
:'certificate_migrations' => :'certificate_migrations',
|
|
47
|
+
:'conjur_migrations' => :'conjur_migrations',
|
|
45
48
|
:'gcp_secrets_migrations' => :'gcp_secrets_migrations',
|
|
46
49
|
:'hashi_migrations' => :'hashi_migrations',
|
|
47
50
|
:'k8s_migrations' => :'k8s_migrations',
|
|
@@ -63,6 +66,7 @@ module Akeyless
|
|
|
63
66
|
:'aws_secrets_migrations' => :'Array<AWSSecretsMigration>',
|
|
64
67
|
:'azure_kv_migrations' => :'Array<AzureKeyVaultMigration>',
|
|
65
68
|
:'certificate_migrations' => :'Array<CertificateMigration>',
|
|
69
|
+
:'conjur_migrations' => :'Array<ConjurMigration>',
|
|
66
70
|
:'gcp_secrets_migrations' => :'Array<GCPSecretsMigration>',
|
|
67
71
|
:'hashi_migrations' => :'Array<HashiMigration>',
|
|
68
72
|
:'k8s_migrations' => :'Array<K8SMigration>',
|
|
@@ -117,6 +121,12 @@ module Akeyless
|
|
|
117
121
|
end
|
|
118
122
|
end
|
|
119
123
|
|
|
124
|
+
if attributes.key?(:'conjur_migrations')
|
|
125
|
+
if (value = attributes[:'conjur_migrations']).is_a?(Array)
|
|
126
|
+
self.conjur_migrations = value
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
|
|
120
130
|
if attributes.key?(:'gcp_secrets_migrations')
|
|
121
131
|
if (value = attributes[:'gcp_secrets_migrations']).is_a?(Array)
|
|
122
132
|
self.gcp_secrets_migrations = value
|
|
@@ -178,6 +188,7 @@ module Akeyless
|
|
|
178
188
|
aws_secrets_migrations == o.aws_secrets_migrations &&
|
|
179
189
|
azure_kv_migrations == o.azure_kv_migrations &&
|
|
180
190
|
certificate_migrations == o.certificate_migrations &&
|
|
191
|
+
conjur_migrations == o.conjur_migrations &&
|
|
181
192
|
gcp_secrets_migrations == o.gcp_secrets_migrations &&
|
|
182
193
|
hashi_migrations == o.hashi_migrations &&
|
|
183
194
|
k8s_migrations == o.k8s_migrations &&
|
|
@@ -195,7 +206,7 @@ module Akeyless
|
|
|
195
206
|
# Calculates hash code according to all attributes.
|
|
196
207
|
# @return [Integer] Hash code
|
|
197
208
|
def hash
|
|
198
|
-
[active_directory_migrations, aws_secrets_migrations, azure_kv_migrations, certificate_migrations, gcp_secrets_migrations, hashi_migrations, k8s_migrations, mock_migrations, one_password_migrations, server_inventory_migrations].hash
|
|
209
|
+
[active_directory_migrations, aws_secrets_migrations, azure_kv_migrations, certificate_migrations, conjur_migrations, gcp_secrets_migrations, hashi_migrations, k8s_migrations, mock_migrations, one_password_migrations, server_inventory_migrations].hash
|
|
199
210
|
end
|
|
200
211
|
|
|
201
212
|
# Builds the object from hash
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Akeyless API
|
|
3
|
+
|
|
4
|
+
#The purpose of this application is to provide access to Akeyless API.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 3.0
|
|
7
|
+
Contact: support@akeyless.io
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.10.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Akeyless
|
|
17
|
+
class NetappStorage
|
|
18
|
+
attr_accessor :access_key_id
|
|
19
|
+
|
|
20
|
+
attr_accessor :access_key_secret
|
|
21
|
+
|
|
22
|
+
attr_accessor :auth_type
|
|
23
|
+
|
|
24
|
+
attr_accessor :bucket
|
|
25
|
+
|
|
26
|
+
attr_accessor :endpoint_url
|
|
27
|
+
|
|
28
|
+
attr_accessor :prefix
|
|
29
|
+
|
|
30
|
+
attr_accessor :region
|
|
31
|
+
|
|
32
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
33
|
+
def self.attribute_map
|
|
34
|
+
{
|
|
35
|
+
:'access_key_id' => :'access_key_id',
|
|
36
|
+
:'access_key_secret' => :'access_key_secret',
|
|
37
|
+
:'auth_type' => :'auth_type',
|
|
38
|
+
:'bucket' => :'bucket',
|
|
39
|
+
:'endpoint_url' => :'endpoint_url',
|
|
40
|
+
:'prefix' => :'prefix',
|
|
41
|
+
:'region' => :'region'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Returns all the JSON keys this model knows about
|
|
46
|
+
def self.acceptable_attributes
|
|
47
|
+
attribute_map.values
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Attribute type mapping.
|
|
51
|
+
def self.openapi_types
|
|
52
|
+
{
|
|
53
|
+
:'access_key_id' => :'String',
|
|
54
|
+
:'access_key_secret' => :'String',
|
|
55
|
+
:'auth_type' => :'String',
|
|
56
|
+
:'bucket' => :'String',
|
|
57
|
+
:'endpoint_url' => :'String',
|
|
58
|
+
:'prefix' => :'String',
|
|
59
|
+
:'region' => :'String'
|
|
60
|
+
}
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# List of attributes with nullable: true
|
|
64
|
+
def self.openapi_nullable
|
|
65
|
+
Set.new([
|
|
66
|
+
])
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Initializes the object
|
|
70
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
71
|
+
def initialize(attributes = {})
|
|
72
|
+
if (!attributes.is_a?(Hash))
|
|
73
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::NetappStorage` initialize method"
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
77
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
78
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
79
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::NetappStorage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
80
|
+
end
|
|
81
|
+
h[k.to_sym] = v
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if attributes.key?(:'access_key_id')
|
|
85
|
+
self.access_key_id = attributes[:'access_key_id']
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'access_key_secret')
|
|
89
|
+
self.access_key_secret = attributes[:'access_key_secret']
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if attributes.key?(:'auth_type')
|
|
93
|
+
self.auth_type = attributes[:'auth_type']
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'bucket')
|
|
97
|
+
self.bucket = attributes[:'bucket']
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'endpoint_url')
|
|
101
|
+
self.endpoint_url = attributes[:'endpoint_url']
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if attributes.key?(:'prefix')
|
|
105
|
+
self.prefix = attributes[:'prefix']
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if attributes.key?(:'region')
|
|
109
|
+
self.region = attributes[:'region']
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
114
|
+
# @return Array for valid properties with the reasons
|
|
115
|
+
def list_invalid_properties
|
|
116
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
117
|
+
invalid_properties = Array.new
|
|
118
|
+
invalid_properties
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Check to see if the all the properties in the model are valid
|
|
122
|
+
# @return true if the model is valid
|
|
123
|
+
def valid?
|
|
124
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
125
|
+
true
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Checks equality by comparing each attribute.
|
|
129
|
+
# @param [Object] Object to be compared
|
|
130
|
+
def ==(o)
|
|
131
|
+
return true if self.equal?(o)
|
|
132
|
+
self.class == o.class &&
|
|
133
|
+
access_key_id == o.access_key_id &&
|
|
134
|
+
access_key_secret == o.access_key_secret &&
|
|
135
|
+
auth_type == o.auth_type &&
|
|
136
|
+
bucket == o.bucket &&
|
|
137
|
+
endpoint_url == o.endpoint_url &&
|
|
138
|
+
prefix == o.prefix &&
|
|
139
|
+
region == o.region
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# @see the `==` method
|
|
143
|
+
# @param [Object] Object to be compared
|
|
144
|
+
def eql?(o)
|
|
145
|
+
self == o
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Calculates hash code according to all attributes.
|
|
149
|
+
# @return [Integer] Hash code
|
|
150
|
+
def hash
|
|
151
|
+
[access_key_id, access_key_secret, auth_type, bucket, endpoint_url, prefix, region].hash
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Builds the object from hash
|
|
155
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
156
|
+
# @return [Object] Returns the model itself
|
|
157
|
+
def self.build_from_hash(attributes)
|
|
158
|
+
return nil unless attributes.is_a?(Hash)
|
|
159
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
160
|
+
transformed_hash = {}
|
|
161
|
+
openapi_types.each_pair do |key, type|
|
|
162
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
163
|
+
transformed_hash["#{key}"] = nil
|
|
164
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
165
|
+
# check to ensure the input is an array given that the attribute
|
|
166
|
+
# is documented as an array but the input is not
|
|
167
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
168
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
169
|
+
end
|
|
170
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
171
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
172
|
+
end
|
|
173
|
+
end
|
|
174
|
+
new(transformed_hash)
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Deserializes the data based on type
|
|
178
|
+
# @param string type Data type
|
|
179
|
+
# @param string value Value to be deserialized
|
|
180
|
+
# @return [Object] Deserialized data
|
|
181
|
+
def self._deserialize(type, value)
|
|
182
|
+
case type.to_sym
|
|
183
|
+
when :Time
|
|
184
|
+
Time.parse(value)
|
|
185
|
+
when :Date
|
|
186
|
+
Date.parse(value)
|
|
187
|
+
when :String
|
|
188
|
+
value.to_s
|
|
189
|
+
when :Integer
|
|
190
|
+
value.to_i
|
|
191
|
+
when :Float
|
|
192
|
+
value.to_f
|
|
193
|
+
when :Boolean
|
|
194
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
195
|
+
true
|
|
196
|
+
else
|
|
197
|
+
false
|
|
198
|
+
end
|
|
199
|
+
when :Object
|
|
200
|
+
# generic object (usually a Hash), return directly
|
|
201
|
+
value
|
|
202
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
203
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
204
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
205
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
206
|
+
k_type = Regexp.last_match[:k_type]
|
|
207
|
+
v_type = Regexp.last_match[:v_type]
|
|
208
|
+
{}.tap do |hash|
|
|
209
|
+
value.each do |k, v|
|
|
210
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
211
|
+
end
|
|
212
|
+
end
|
|
213
|
+
else # model
|
|
214
|
+
# models (e.g. Pet) or oneOf
|
|
215
|
+
klass = Akeyless.const_get(type)
|
|
216
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
217
|
+
end
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# Returns the string representation of the object
|
|
221
|
+
# @return [String] String presentation of the object
|
|
222
|
+
def to_s
|
|
223
|
+
to_hash.to_s
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
227
|
+
# @return [Hash] Returns the object in the form of hash
|
|
228
|
+
def to_body
|
|
229
|
+
to_hash
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
# Returns the object in the form of hash
|
|
233
|
+
# @return [Hash] Returns the object in the form of hash
|
|
234
|
+
def to_hash
|
|
235
|
+
hash = {}
|
|
236
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
237
|
+
value = self.send(attr)
|
|
238
|
+
if value.nil?
|
|
239
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
240
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
hash[param] = _to_hash(value)
|
|
244
|
+
end
|
|
245
|
+
hash
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
# Outputs non-array value in the form of hash
|
|
249
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
250
|
+
# @param [Object] value Any valid value
|
|
251
|
+
# @return [Hash] Returns the value in the form of hash
|
|
252
|
+
def _to_hash(value)
|
|
253
|
+
if value.is_a?(Array)
|
|
254
|
+
value.compact.map { |v| _to_hash(v) }
|
|
255
|
+
elsif value.is_a?(Hash)
|
|
256
|
+
{}.tap do |hash|
|
|
257
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
258
|
+
end
|
|
259
|
+
elsif value.respond_to? :to_hash
|
|
260
|
+
value.to_hash
|
|
261
|
+
else
|
|
262
|
+
value
|
|
263
|
+
end
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
end
|
|
@@ -25,7 +25,7 @@ module Akeyless
|
|
|
25
25
|
# Authentication token (see `/auth` and `/configure`)
|
|
26
26
|
attr_accessor :token
|
|
27
27
|
|
|
28
|
-
# Type of object (item, am, role)
|
|
28
|
+
# Type of object (item, am, role, target, sra, ara)
|
|
29
29
|
attr_accessor :type
|
|
30
30
|
|
|
31
31
|
# The universal identity token, Required only for universal_identity authentication
|