akeyless 2.16.4 → 2.16.7
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 +44 -1
- data/docs/AwsS3LogForwardingConfig.md +2 -0
- data/docs/CertAccessRules.md +1 -1
- data/docs/CreateAuthMethod.md +1 -1
- data/docs/CreateAuthMethodAWSIAM.md +1 -1
- data/docs/CreateAuthMethodAzureAD.md +1 -1
- data/docs/CreateAuthMethodCert.md +1 -1
- data/docs/CreateAuthMethodGCP.md +1 -1
- data/docs/CreateAuthMethodHuawei.md +1 -1
- data/docs/CreateAuthMethodK8S.md +1 -1
- data/docs/CreateAuthMethodLDAP.md +1 -1
- data/docs/CreateAuthMethodOAuth2.md +1 -1
- data/docs/CreateAuthMethodOIDC.md +1 -1
- data/docs/CreateAuthMethodSAML.md +1 -1
- data/docs/CreateAuthMethodUniversalIdentity.md +1 -1
- data/docs/CreateAzureTarget.md +6 -0
- data/docs/CreateClassicKey.md +12 -0
- data/docs/CreateRotatedSecret.md +30 -0
- data/docs/CreateSalesforceTarget.md +42 -0
- data/docs/CreateSalesforceTargetOutput.md +18 -0
- data/docs/CreateTokenizer.md +42 -0
- data/docs/CreateTokenizerOutput.md +18 -0
- data/docs/DSProducerDetails.md +6 -0
- data/docs/DeleteRoleRule.md +1 -1
- data/docs/Detokenize.md +26 -0
- data/docs/DetokenizeOutput.md +18 -0
- data/docs/DynamicSecretProducerInfo.md +2 -0
- data/docs/EmailTokenizerInfo.md +22 -0
- data/docs/GatewayCreateMigration.md +50 -0
- data/docs/GatewayCreateProducerRabbitMQ.md +2 -0
- data/docs/GatewayCreateProducerRedshift.md +2 -0
- data/docs/GatewayDeleteMigration.md +22 -0
- data/docs/GatewayGetMigration.md +22 -0
- data/docs/GatewayMigrationCreateOutput.md +18 -0
- data/docs/GatewayMigrationDeleteOutput.md +18 -0
- data/docs/GatewayMigrationGetOutput.md +18 -0
- data/docs/GatewayMigrationUpdateOutput.md +18 -0
- data/docs/GatewayUpdateMigration.md +52 -0
- data/docs/GatewayUpdateProducerRabbitMQ.md +2 -0
- data/docs/GatewayUpdateProducerRedshift.md +2 -0
- data/docs/GetRSAPublicOutput.md +1 -1
- data/docs/GetSecretValue.md +2 -0
- data/docs/HashiPayload.md +2 -0
- data/docs/Item.md +2 -0
- data/docs/ItemGeneralInfo.md +5 -1
- data/docs/ListItems.md +2 -0
- data/docs/ListTargets.md +2 -0
- data/docs/LogForwardingConfigPart.md +0 -2
- data/docs/Producer.md +2 -0
- data/docs/RegexpTokenizerInfo.md +24 -0
- data/docs/RotateSecret.md +22 -0
- data/docs/RotatedSecretOutput.md +18 -0
- data/docs/SetRoleRule.md +1 -1
- data/docs/SystemAccessCredentialsReplyObj.md +2 -0
- data/docs/Target.md +2 -0
- data/docs/TargetTypeDetailsInput.md +18 -0
- data/docs/Tokenize.md +26 -0
- data/docs/TokenizeOutput.md +20 -0
- data/docs/TokenizerInfo.md +18 -0
- data/docs/UpdateAuthMethod.md +1 -1
- data/docs/UpdateAuthMethodAWSIAM.md +1 -1
- data/docs/UpdateAuthMethodAzureAD.md +1 -1
- data/docs/UpdateAuthMethodCert.md +1 -1
- data/docs/UpdateAuthMethodGCP.md +1 -1
- data/docs/UpdateAuthMethodK8S.md +1 -1
- data/docs/UpdateAuthMethodLDAP.md +1 -1
- data/docs/UpdateAuthMethodOAuth2.md +1 -1
- data/docs/UpdateAuthMethodOIDC.md +1 -1
- data/docs/UpdateAuthMethodSAML.md +1 -1
- data/docs/UpdateAuthMethodUniversalIdentity.md +1 -1
- data/docs/UpdateAzureTarget.md +6 -0
- data/docs/UpdateLdapTarget.md +42 -0
- data/docs/UpdateLdapTargetDetails.md +40 -0
- data/docs/UpdateLdapTargetOutput.md +18 -0
- data/docs/UpdateRotatedSecret.md +30 -0
- data/docs/UpdateSalesforceTarget.md +48 -0
- data/docs/UpdateSalesforceTargetOutput.md +18 -0
- data/docs/UpdateTokenizer.md +46 -0
- data/docs/UpdateTokenizerOutput.md +18 -0
- data/docs/V2Api.md +888 -6
- data/docs/VaultlessTokenizerInfo.md +28 -0
- data/lib/akeyless/api/v2_api.rb +897 -1
- data/lib/akeyless/models/aws_s3_log_forwarding_config.rb +10 -1
- data/lib/akeyless/models/cert_access_rules.rb +2 -4
- data/lib/akeyless/models/create_auth_method.rb +0 -2
- data/lib/akeyless/models/create_auth_method_awsiam.rb +0 -2
- data/lib/akeyless/models/create_auth_method_azure_ad.rb +0 -2
- data/lib/akeyless/models/create_auth_method_cert.rb +0 -2
- data/lib/akeyless/models/create_auth_method_gcp.rb +0 -2
- data/lib/akeyless/models/create_auth_method_huawei.rb +0 -2
- data/lib/akeyless/models/create_auth_method_k8_s.rb +0 -2
- data/lib/akeyless/models/create_auth_method_ldap.rb +0 -2
- data/lib/akeyless/models/create_auth_method_o_auth2.rb +0 -2
- data/lib/akeyless/models/create_auth_method_oidc.rb +0 -2
- data/lib/akeyless/models/create_auth_method_saml.rb +0 -2
- data/lib/akeyless/models/create_auth_method_universal_identity.rb +0 -2
- data/lib/akeyless/models/create_azure_target.rb +31 -1
- data/lib/akeyless/models/create_classic_key.rb +61 -1
- data/lib/akeyless/models/create_rotated_secret.rb +163 -1
- data/lib/akeyless/models/create_salesforce_target.rb +375 -0
- data/lib/akeyless/models/create_salesforce_target_output.rb +219 -0
- data/lib/akeyless/models/create_tokenizer.rb +358 -0
- data/lib/akeyless/models/create_tokenizer_output.rb +219 -0
- data/lib/akeyless/models/delete_role_rule.rb +1 -1
- data/lib/akeyless/models/detokenize.rb +271 -0
- data/lib/akeyless/models/detokenize_output.rb +219 -0
- data/lib/akeyless/models/ds_producer_details.rb +28 -1
- data/lib/akeyless/models/dynamic_secret_producer_info.rb +10 -1
- data/lib/akeyless/models/email_tokenizer_info.rb +241 -0
- data/lib/akeyless/models/gateway_create_migration.rb +374 -0
- data/lib/akeyless/models/gateway_create_producer_rabbit_mq.rb +13 -1
- data/lib/akeyless/models/gateway_create_producer_redshift.rb +11 -1
- data/lib/akeyless/models/gateway_delete_migration.rb +246 -0
- data/lib/akeyless/models/gateway_get_migration.rb +240 -0
- data/lib/akeyless/models/gateway_migration_create_output.rb +219 -0
- data/lib/akeyless/models/gateway_migration_delete_output.rb +219 -0
- data/lib/akeyless/models/gateway_migration_get_output.rb +219 -0
- data/lib/akeyless/models/gateway_migration_update_output.rb +219 -0
- data/lib/akeyless/models/gateway_update_migration.rb +383 -0
- data/lib/akeyless/models/gateway_update_producer_hana_db.rb +1 -1
- data/lib/akeyless/models/gateway_update_producer_rabbit_mq.rb +13 -1
- data/lib/akeyless/models/gateway_update_producer_redshift.rb +11 -1
- data/lib/akeyless/models/get_rsa_public_output.rb +2 -4
- data/lib/akeyless/models/get_secret_value.rb +10 -1
- data/lib/akeyless/models/hashi_payload.rb +10 -1
- data/lib/akeyless/models/item.rb +10 -1
- data/lib/akeyless/models/item_general_info.rb +22 -4
- data/lib/akeyless/models/list_items.rb +10 -1
- data/lib/akeyless/models/list_targets.rb +13 -1
- data/lib/akeyless/models/log_forwarding_config_part.rb +1 -10
- data/lib/akeyless/models/producer.rb +10 -1
- data/lib/akeyless/models/regexp_tokenizer_info.rb +251 -0
- data/lib/akeyless/models/rotate_secret.rb +245 -0
- data/lib/akeyless/models/rotated_secret_output.rb +219 -0
- data/lib/akeyless/models/set_role_rule.rb +1 -1
- data/lib/akeyless/models/system_access_credentials_reply_obj.rb +11 -1
- data/lib/akeyless/models/target.rb +13 -1
- data/lib/akeyless/models/target_type_details_input.rb +86 -1
- data/lib/akeyless/models/tokenize.rb +271 -0
- data/lib/akeyless/models/tokenize_output.rb +228 -0
- data/lib/akeyless/models/tokenizer_info.rb +219 -0
- data/lib/akeyless/models/update_auth_method.rb +0 -2
- data/lib/akeyless/models/update_auth_method_awsiam.rb +0 -2
- data/lib/akeyless/models/update_auth_method_azure_ad.rb +0 -2
- data/lib/akeyless/models/update_auth_method_cert.rb +0 -2
- data/lib/akeyless/models/update_auth_method_gcp.rb +0 -2
- data/lib/akeyless/models/update_auth_method_k8_s.rb +0 -2
- data/lib/akeyless/models/update_auth_method_ldap.rb +0 -2
- data/lib/akeyless/models/update_auth_method_o_auth2.rb +0 -2
- data/lib/akeyless/models/update_auth_method_oidc.rb +0 -2
- data/lib/akeyless/models/update_auth_method_saml.rb +0 -2
- data/lib/akeyless/models/update_auth_method_universal_identity.rb +0 -2
- data/lib/akeyless/models/update_azure_target.rb +31 -1
- data/lib/akeyless/models/update_ldap_target.rb +339 -0
- data/lib/akeyless/models/update_ldap_target_details.rb +328 -0
- data/lib/akeyless/models/update_ldap_target_output.rb +219 -0
- data/lib/akeyless/models/update_rotated_secret.rb +163 -1
- data/lib/akeyless/models/update_salesforce_target.rb +404 -0
- data/lib/akeyless/models/update_salesforce_target_output.rb +219 -0
- data/lib/akeyless/models/update_tokenizer.rb +382 -0
- data/lib/akeyless/models/update_tokenizer_output.rb +219 -0
- data/lib/akeyless/models/vaultless_tokenizer_info.rb +267 -0
- data/lib/akeyless/version.rb +1 -1
- data/lib/akeyless.rb +29 -0
- data/spec/models/create_salesforce_target_output_spec.rb +34 -0
- data/spec/models/create_salesforce_target_spec.rb +106 -0
- data/spec/models/create_tokenizer_output_spec.rb +34 -0
- data/spec/models/create_tokenizer_spec.rb +106 -0
- data/spec/models/detokenize_output_spec.rb +34 -0
- data/spec/models/detokenize_spec.rb +58 -0
- data/spec/models/email_tokenizer_info_spec.rb +46 -0
- data/spec/models/gateway_create_migration_spec.rb +130 -0
- data/spec/models/gateway_delete_migration_spec.rb +46 -0
- data/spec/models/gateway_get_migration_spec.rb +46 -0
- data/spec/models/gateway_migration_create_output_spec.rb +34 -0
- data/spec/models/gateway_migration_delete_output_spec.rb +34 -0
- data/spec/models/gateway_migration_get_output_spec.rb +34 -0
- data/spec/models/gateway_migration_update_output_spec.rb +34 -0
- data/spec/models/gateway_update_migration_spec.rb +136 -0
- data/spec/models/regexp_tokenizer_info_spec.rb +52 -0
- data/spec/models/rotate_secret_spec.rb +46 -0
- data/spec/models/rotated_secret_output_spec.rb +34 -0
- data/spec/models/tokenize_output_spec.rb +40 -0
- data/spec/models/tokenize_spec.rb +58 -0
- data/spec/models/tokenizer_info_spec.rb +34 -0
- data/spec/models/update_ldap_target_details_spec.rb +100 -0
- data/spec/models/update_ldap_target_output_spec.rb +34 -0
- data/spec/models/update_ldap_target_spec.rb +106 -0
- data/spec/models/update_salesforce_target_output_spec.rb +34 -0
- data/spec/models/update_salesforce_target_spec.rb +124 -0
- data/spec/models/update_tokenizer_output_spec.rb +34 -0
- data/spec/models/update_tokenizer_spec.rb +118 -0
- data/spec/models/vaultless_tokenizer_info_spec.rb +64 -0
- metadata +575 -459
|
@@ -24,7 +24,7 @@ module Akeyless
|
|
|
24
24
|
# The role name to be updated
|
|
25
25
|
attr_accessor :role_name
|
|
26
26
|
|
|
27
|
-
# item-rule, target-rule, role-rule, auth-method-rule, search-rule or reports-rule
|
|
27
|
+
# item-rule, target-rule, role-rule, auth-method-rule, search-rule, reports-rule, gw-reports-rule or sra-reports-rule
|
|
28
28
|
attr_accessor :rule_type
|
|
29
29
|
|
|
30
30
|
# Authentication token (see `/auth` and `/configure`)
|
|
@@ -24,6 +24,9 @@ module Akeyless
|
|
|
24
24
|
# Temporary credentials for accessing the KFMs instances
|
|
25
25
|
attr_accessor :kfm_creds
|
|
26
26
|
|
|
27
|
+
# Credentials tmp token
|
|
28
|
+
attr_accessor :token
|
|
29
|
+
|
|
27
30
|
# Temporary credentials for accessing the UAM service
|
|
28
31
|
attr_accessor :uam_creds
|
|
29
32
|
|
|
@@ -33,6 +36,7 @@ module Akeyless
|
|
|
33
36
|
:'auth_creds' => :'auth_creds',
|
|
34
37
|
:'expiry' => :'expiry',
|
|
35
38
|
:'kfm_creds' => :'kfm_creds',
|
|
39
|
+
:'token' => :'token',
|
|
36
40
|
:'uam_creds' => :'uam_creds'
|
|
37
41
|
}
|
|
38
42
|
end
|
|
@@ -48,6 +52,7 @@ module Akeyless
|
|
|
48
52
|
:'auth_creds' => :'String',
|
|
49
53
|
:'expiry' => :'Integer',
|
|
50
54
|
:'kfm_creds' => :'String',
|
|
55
|
+
:'token' => :'String',
|
|
51
56
|
:'uam_creds' => :'String'
|
|
52
57
|
}
|
|
53
58
|
end
|
|
@@ -85,6 +90,10 @@ module Akeyless
|
|
|
85
90
|
self.kfm_creds = attributes[:'kfm_creds']
|
|
86
91
|
end
|
|
87
92
|
|
|
93
|
+
if attributes.key?(:'token')
|
|
94
|
+
self.token = attributes[:'token']
|
|
95
|
+
end
|
|
96
|
+
|
|
88
97
|
if attributes.key?(:'uam_creds')
|
|
89
98
|
self.uam_creds = attributes[:'uam_creds']
|
|
90
99
|
end
|
|
@@ -111,6 +120,7 @@ module Akeyless
|
|
|
111
120
|
auth_creds == o.auth_creds &&
|
|
112
121
|
expiry == o.expiry &&
|
|
113
122
|
kfm_creds == o.kfm_creds &&
|
|
123
|
+
token == o.token &&
|
|
114
124
|
uam_creds == o.uam_creds
|
|
115
125
|
end
|
|
116
126
|
|
|
@@ -123,7 +133,7 @@ module Akeyless
|
|
|
123
133
|
# Calculates hash code according to all attributes.
|
|
124
134
|
# @return [Integer] Hash code
|
|
125
135
|
def hash
|
|
126
|
-
[auth_creds, expiry, kfm_creds, uam_creds].hash
|
|
136
|
+
[auth_creds, expiry, kfm_creds, token, uam_creds].hash
|
|
127
137
|
end
|
|
128
138
|
|
|
129
139
|
# Builds the object from hash
|
|
@@ -15,6 +15,9 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Akeyless
|
|
17
17
|
class Target
|
|
18
|
+
# this is not \"omitempty\" since an empty value causes no update while an empty map will clear the attributes
|
|
19
|
+
attr_accessor :attributes
|
|
20
|
+
|
|
18
21
|
attr_accessor :client_permissions
|
|
19
22
|
|
|
20
23
|
attr_accessor :comment
|
|
@@ -38,6 +41,7 @@ module Akeyless
|
|
|
38
41
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
39
42
|
def self.attribute_map
|
|
40
43
|
{
|
|
44
|
+
:'attributes' => :'attributes',
|
|
41
45
|
:'client_permissions' => :'client_permissions',
|
|
42
46
|
:'comment' => :'comment',
|
|
43
47
|
:'last_version' => :'last_version',
|
|
@@ -59,6 +63,7 @@ module Akeyless
|
|
|
59
63
|
# Attribute type mapping.
|
|
60
64
|
def self.openapi_types
|
|
61
65
|
{
|
|
66
|
+
:'attributes' => :'Hash<String, Object>',
|
|
62
67
|
:'client_permissions' => :'Array<String>',
|
|
63
68
|
:'comment' => :'String',
|
|
64
69
|
:'last_version' => :'Integer',
|
|
@@ -93,6 +98,12 @@ module Akeyless
|
|
|
93
98
|
h[k.to_sym] = v
|
|
94
99
|
}
|
|
95
100
|
|
|
101
|
+
if attributes.key?(:'attributes')
|
|
102
|
+
if (value = attributes[:'attributes']).is_a?(Hash)
|
|
103
|
+
self.attributes = value
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
|
|
96
107
|
if attributes.key?(:'client_permissions')
|
|
97
108
|
if (value = attributes[:'client_permissions']).is_a?(Array)
|
|
98
109
|
self.client_permissions = value
|
|
@@ -158,6 +169,7 @@ module Akeyless
|
|
|
158
169
|
def ==(o)
|
|
159
170
|
return true if self.equal?(o)
|
|
160
171
|
self.class == o.class &&
|
|
172
|
+
attributes == o.attributes &&
|
|
161
173
|
client_permissions == o.client_permissions &&
|
|
162
174
|
comment == o.comment &&
|
|
163
175
|
last_version == o.last_version &&
|
|
@@ -179,7 +191,7 @@ module Akeyless
|
|
|
179
191
|
# Calculates hash code according to all attributes.
|
|
180
192
|
# @return [Integer] Hash code
|
|
181
193
|
def hash
|
|
182
|
-
[client_permissions, comment, last_version, protection_key_name, target_id, target_items_assoc, target_name, target_type, target_versions, with_customer_fragment].hash
|
|
194
|
+
[attributes, client_permissions, comment, last_version, protection_key_name, target_id, target_items_assoc, target_name, target_type, target_versions, with_customer_fragment].hash
|
|
183
195
|
end
|
|
184
196
|
|
|
185
197
|
# Builds the object from hash
|
|
@@ -33,8 +33,20 @@ module Akeyless
|
|
|
33
33
|
|
|
34
34
|
attr_accessor :azure_client_secret
|
|
35
35
|
|
|
36
|
+
attr_accessor :azure_resource_group_name
|
|
37
|
+
|
|
38
|
+
attr_accessor :azure_resource_name
|
|
39
|
+
|
|
40
|
+
attr_accessor :azure_subscription_id
|
|
41
|
+
|
|
36
42
|
attr_accessor :azure_tenant_id
|
|
37
43
|
|
|
44
|
+
# CACertData is the rsa 4096 certificate data in PEM format
|
|
45
|
+
attr_accessor :ca_cert_data
|
|
46
|
+
|
|
47
|
+
# CACertName is the name of the certificate in SalesForce tenant
|
|
48
|
+
attr_accessor :ca_cert_name
|
|
49
|
+
|
|
38
50
|
attr_accessor :chef_server_host_name
|
|
39
51
|
|
|
40
52
|
attr_accessor :chef_server_key
|
|
@@ -47,6 +59,10 @@ module Akeyless
|
|
|
47
59
|
|
|
48
60
|
attr_accessor :chef_skip_ssl
|
|
49
61
|
|
|
62
|
+
attr_accessor :client_id
|
|
63
|
+
|
|
64
|
+
attr_accessor :client_secret
|
|
65
|
+
|
|
50
66
|
attr_accessor :db_host_name
|
|
51
67
|
|
|
52
68
|
attr_accessor :db_name
|
|
@@ -156,6 +172,8 @@ module Akeyless
|
|
|
156
172
|
|
|
157
173
|
attr_accessor :rabbitmq_server_user
|
|
158
174
|
|
|
175
|
+
attr_accessor :security_token
|
|
176
|
+
|
|
159
177
|
attr_accessor :sf_account
|
|
160
178
|
|
|
161
179
|
# (Optional) SSLConnectionCertificate defines the certificate for SSL connection. Must be base64 certificate loaded by UI using file loader field
|
|
@@ -164,6 +182,8 @@ module Akeyless
|
|
|
164
182
|
# (Optional) SSLConnectionMode defines if SSL mode will be used to connect to DB
|
|
165
183
|
attr_accessor :ssl_connection_mode
|
|
166
184
|
|
|
185
|
+
attr_accessor :tenant_url
|
|
186
|
+
|
|
167
187
|
attr_accessor :url
|
|
168
188
|
|
|
169
189
|
attr_accessor :use_gw_cloud_identity
|
|
@@ -196,13 +216,20 @@ module Akeyless
|
|
|
196
216
|
:'aws_session_token' => :'aws_session_token',
|
|
197
217
|
:'azure_client_id' => :'azure_client_id',
|
|
198
218
|
:'azure_client_secret' => :'azure_client_secret',
|
|
219
|
+
:'azure_resource_group_name' => :'azure_resource_group_name',
|
|
220
|
+
:'azure_resource_name' => :'azure_resource_name',
|
|
221
|
+
:'azure_subscription_id' => :'azure_subscription_id',
|
|
199
222
|
:'azure_tenant_id' => :'azure_tenant_id',
|
|
223
|
+
:'ca_cert_data' => :'ca_cert_data',
|
|
224
|
+
:'ca_cert_name' => :'ca_cert_name',
|
|
200
225
|
:'chef_server_host_name' => :'chef_server_host_name',
|
|
201
226
|
:'chef_server_key' => :'chef_server_key',
|
|
202
227
|
:'chef_server_port' => :'chef_server_port',
|
|
203
228
|
:'chef_server_url' => :'chef_server_url',
|
|
204
229
|
:'chef_server_username' => :'chef_server_username',
|
|
205
230
|
:'chef_skip_ssl' => :'chef_skip_ssl',
|
|
231
|
+
:'client_id' => :'client_id',
|
|
232
|
+
:'client_secret' => :'client_secret',
|
|
206
233
|
:'db_host_name' => :'db_host_name',
|
|
207
234
|
:'db_name' => :'db_name',
|
|
208
235
|
:'db_port' => :'db_port',
|
|
@@ -255,9 +282,11 @@ module Akeyless
|
|
|
255
282
|
:'rabbitmq_server_password' => :'rabbitmq_server_password',
|
|
256
283
|
:'rabbitmq_server_uri' => :'rabbitmq_server_uri',
|
|
257
284
|
:'rabbitmq_server_user' => :'rabbitmq_server_user',
|
|
285
|
+
:'security_token' => :'security_token',
|
|
258
286
|
:'sf_account' => :'sf_account',
|
|
259
287
|
:'ssl_connection_certificate' => :'ssl_connection_certificate',
|
|
260
288
|
:'ssl_connection_mode' => :'ssl_connection_mode',
|
|
289
|
+
:'tenant_url' => :'tenant_url',
|
|
261
290
|
:'url' => :'url',
|
|
262
291
|
:'use_gw_cloud_identity' => :'use_gw_cloud_identity',
|
|
263
292
|
:'user_name' => :'user_name',
|
|
@@ -288,13 +317,20 @@ module Akeyless
|
|
|
288
317
|
:'aws_session_token' => :'String',
|
|
289
318
|
:'azure_client_id' => :'String',
|
|
290
319
|
:'azure_client_secret' => :'String',
|
|
320
|
+
:'azure_resource_group_name' => :'String',
|
|
321
|
+
:'azure_resource_name' => :'String',
|
|
322
|
+
:'azure_subscription_id' => :'String',
|
|
291
323
|
:'azure_tenant_id' => :'String',
|
|
324
|
+
:'ca_cert_data' => :'Array<Integer>',
|
|
325
|
+
:'ca_cert_name' => :'String',
|
|
292
326
|
:'chef_server_host_name' => :'String',
|
|
293
327
|
:'chef_server_key' => :'String',
|
|
294
328
|
:'chef_server_port' => :'String',
|
|
295
329
|
:'chef_server_url' => :'String',
|
|
296
330
|
:'chef_server_username' => :'String',
|
|
297
331
|
:'chef_skip_ssl' => :'Boolean',
|
|
332
|
+
:'client_id' => :'String',
|
|
333
|
+
:'client_secret' => :'String',
|
|
298
334
|
:'db_host_name' => :'String',
|
|
299
335
|
:'db_name' => :'String',
|
|
300
336
|
:'db_port' => :'String',
|
|
@@ -347,9 +383,11 @@ module Akeyless
|
|
|
347
383
|
:'rabbitmq_server_password' => :'String',
|
|
348
384
|
:'rabbitmq_server_uri' => :'String',
|
|
349
385
|
:'rabbitmq_server_user' => :'String',
|
|
386
|
+
:'security_token' => :'String',
|
|
350
387
|
:'sf_account' => :'String',
|
|
351
388
|
:'ssl_connection_certificate' => :'String',
|
|
352
389
|
:'ssl_connection_mode' => :'Boolean',
|
|
390
|
+
:'tenant_url' => :'String',
|
|
353
391
|
:'url' => :'String',
|
|
354
392
|
:'use_gw_cloud_identity' => :'Boolean',
|
|
355
393
|
:'user_name' => :'String',
|
|
@@ -420,10 +458,32 @@ module Akeyless
|
|
|
420
458
|
self.azure_client_secret = attributes[:'azure_client_secret']
|
|
421
459
|
end
|
|
422
460
|
|
|
461
|
+
if attributes.key?(:'azure_resource_group_name')
|
|
462
|
+
self.azure_resource_group_name = attributes[:'azure_resource_group_name']
|
|
463
|
+
end
|
|
464
|
+
|
|
465
|
+
if attributes.key?(:'azure_resource_name')
|
|
466
|
+
self.azure_resource_name = attributes[:'azure_resource_name']
|
|
467
|
+
end
|
|
468
|
+
|
|
469
|
+
if attributes.key?(:'azure_subscription_id')
|
|
470
|
+
self.azure_subscription_id = attributes[:'azure_subscription_id']
|
|
471
|
+
end
|
|
472
|
+
|
|
423
473
|
if attributes.key?(:'azure_tenant_id')
|
|
424
474
|
self.azure_tenant_id = attributes[:'azure_tenant_id']
|
|
425
475
|
end
|
|
426
476
|
|
|
477
|
+
if attributes.key?(:'ca_cert_data')
|
|
478
|
+
if (value = attributes[:'ca_cert_data']).is_a?(Array)
|
|
479
|
+
self.ca_cert_data = value
|
|
480
|
+
end
|
|
481
|
+
end
|
|
482
|
+
|
|
483
|
+
if attributes.key?(:'ca_cert_name')
|
|
484
|
+
self.ca_cert_name = attributes[:'ca_cert_name']
|
|
485
|
+
end
|
|
486
|
+
|
|
427
487
|
if attributes.key?(:'chef_server_host_name')
|
|
428
488
|
self.chef_server_host_name = attributes[:'chef_server_host_name']
|
|
429
489
|
end
|
|
@@ -448,6 +508,14 @@ module Akeyless
|
|
|
448
508
|
self.chef_skip_ssl = attributes[:'chef_skip_ssl']
|
|
449
509
|
end
|
|
450
510
|
|
|
511
|
+
if attributes.key?(:'client_id')
|
|
512
|
+
self.client_id = attributes[:'client_id']
|
|
513
|
+
end
|
|
514
|
+
|
|
515
|
+
if attributes.key?(:'client_secret')
|
|
516
|
+
self.client_secret = attributes[:'client_secret']
|
|
517
|
+
end
|
|
518
|
+
|
|
451
519
|
if attributes.key?(:'db_host_name')
|
|
452
520
|
self.db_host_name = attributes[:'db_host_name']
|
|
453
521
|
end
|
|
@@ -656,6 +724,10 @@ module Akeyless
|
|
|
656
724
|
self.rabbitmq_server_user = attributes[:'rabbitmq_server_user']
|
|
657
725
|
end
|
|
658
726
|
|
|
727
|
+
if attributes.key?(:'security_token')
|
|
728
|
+
self.security_token = attributes[:'security_token']
|
|
729
|
+
end
|
|
730
|
+
|
|
659
731
|
if attributes.key?(:'sf_account')
|
|
660
732
|
self.sf_account = attributes[:'sf_account']
|
|
661
733
|
end
|
|
@@ -668,6 +740,10 @@ module Akeyless
|
|
|
668
740
|
self.ssl_connection_mode = attributes[:'ssl_connection_mode']
|
|
669
741
|
end
|
|
670
742
|
|
|
743
|
+
if attributes.key?(:'tenant_url')
|
|
744
|
+
self.tenant_url = attributes[:'tenant_url']
|
|
745
|
+
end
|
|
746
|
+
|
|
671
747
|
if attributes.key?(:'url')
|
|
672
748
|
self.url = attributes[:'url']
|
|
673
749
|
end
|
|
@@ -736,13 +812,20 @@ module Akeyless
|
|
|
736
812
|
aws_session_token == o.aws_session_token &&
|
|
737
813
|
azure_client_id == o.azure_client_id &&
|
|
738
814
|
azure_client_secret == o.azure_client_secret &&
|
|
815
|
+
azure_resource_group_name == o.azure_resource_group_name &&
|
|
816
|
+
azure_resource_name == o.azure_resource_name &&
|
|
817
|
+
azure_subscription_id == o.azure_subscription_id &&
|
|
739
818
|
azure_tenant_id == o.azure_tenant_id &&
|
|
819
|
+
ca_cert_data == o.ca_cert_data &&
|
|
820
|
+
ca_cert_name == o.ca_cert_name &&
|
|
740
821
|
chef_server_host_name == o.chef_server_host_name &&
|
|
741
822
|
chef_server_key == o.chef_server_key &&
|
|
742
823
|
chef_server_port == o.chef_server_port &&
|
|
743
824
|
chef_server_url == o.chef_server_url &&
|
|
744
825
|
chef_server_username == o.chef_server_username &&
|
|
745
826
|
chef_skip_ssl == o.chef_skip_ssl &&
|
|
827
|
+
client_id == o.client_id &&
|
|
828
|
+
client_secret == o.client_secret &&
|
|
746
829
|
db_host_name == o.db_host_name &&
|
|
747
830
|
db_name == o.db_name &&
|
|
748
831
|
db_port == o.db_port &&
|
|
@@ -795,9 +878,11 @@ module Akeyless
|
|
|
795
878
|
rabbitmq_server_password == o.rabbitmq_server_password &&
|
|
796
879
|
rabbitmq_server_uri == o.rabbitmq_server_uri &&
|
|
797
880
|
rabbitmq_server_user == o.rabbitmq_server_user &&
|
|
881
|
+
security_token == o.security_token &&
|
|
798
882
|
sf_account == o.sf_account &&
|
|
799
883
|
ssl_connection_certificate == o.ssl_connection_certificate &&
|
|
800
884
|
ssl_connection_mode == o.ssl_connection_mode &&
|
|
885
|
+
tenant_url == o.tenant_url &&
|
|
801
886
|
url == o.url &&
|
|
802
887
|
use_gw_cloud_identity == o.use_gw_cloud_identity &&
|
|
803
888
|
user_name == o.user_name &&
|
|
@@ -819,7 +904,7 @@ module Akeyless
|
|
|
819
904
|
# Calculates hash code according to all attributes.
|
|
820
905
|
# @return [Integer] Hash code
|
|
821
906
|
def hash
|
|
822
|
-
[artifactory_admin_apikey, artifactory_admin_username, artifactory_base_url, aws_access_key_id, aws_region, aws_secret_access_key, aws_session_token, azure_client_id, azure_client_secret, azure_tenant_id, chef_server_host_name, chef_server_key, chef_server_port, chef_server_url, chef_server_username, chef_skip_ssl, db_host_name, db_name, db_port, db_pwd, db_server_certificates, db_server_name, db_user_name, eks_access_key_id, eks_cluster_ca_certificate, eks_cluster_endpoint, eks_cluster_name, eks_region, eks_secret_access_key, gcp_service_account_email, gcp_service_account_key, github_app_id, github_app_private_key, github_base_url, gke_cluster_ca_certificate, gke_cluster_endpoint, gke_cluster_name, gke_service_account_key, gke_service_account_name, host, k8s_bearer_token, k8s_cluster_ca_certificate, k8s_cluster_endpoint, ldap_audience, ldap_bind_dn, ldap_bind_password, ldap_certificate, ldap_token_expiration, ldap_url, mongodb_atlas_api_private_key, mongodb_atlas_api_public_key, mongodb_atlas_project_id, mongodb_db_name, mongodb_default_auth_db, mongodb_host_port, mongodb_is_atlas, mongodb_password, mongodb_uri_connection, mongodb_uri_options, mongodb_username, password, payload, port, private_key, private_key_password, rabbitmq_server_password, rabbitmq_server_uri, rabbitmq_server_user, sf_account, ssl_connection_certificate, ssl_connection_mode, url, use_gw_cloud_identity, user_name, username, venafi_api_key, venafi_base_url, venafi_tpp_password, venafi_tpp_username, venafi_use_tpp, venafi_zone].hash
|
|
907
|
+
[artifactory_admin_apikey, artifactory_admin_username, artifactory_base_url, aws_access_key_id, aws_region, aws_secret_access_key, aws_session_token, azure_client_id, azure_client_secret, azure_resource_group_name, azure_resource_name, azure_subscription_id, azure_tenant_id, ca_cert_data, ca_cert_name, chef_server_host_name, chef_server_key, chef_server_port, chef_server_url, chef_server_username, chef_skip_ssl, client_id, client_secret, db_host_name, db_name, db_port, db_pwd, db_server_certificates, db_server_name, db_user_name, eks_access_key_id, eks_cluster_ca_certificate, eks_cluster_endpoint, eks_cluster_name, eks_region, eks_secret_access_key, gcp_service_account_email, gcp_service_account_key, github_app_id, github_app_private_key, github_base_url, gke_cluster_ca_certificate, gke_cluster_endpoint, gke_cluster_name, gke_service_account_key, gke_service_account_name, host, k8s_bearer_token, k8s_cluster_ca_certificate, k8s_cluster_endpoint, ldap_audience, ldap_bind_dn, ldap_bind_password, ldap_certificate, ldap_token_expiration, ldap_url, mongodb_atlas_api_private_key, mongodb_atlas_api_public_key, mongodb_atlas_project_id, mongodb_db_name, mongodb_default_auth_db, mongodb_host_port, mongodb_is_atlas, mongodb_password, mongodb_uri_connection, mongodb_uri_options, mongodb_username, password, payload, port, private_key, private_key_password, rabbitmq_server_password, rabbitmq_server_uri, rabbitmq_server_user, security_token, sf_account, ssl_connection_certificate, ssl_connection_mode, tenant_url, url, use_gw_cloud_identity, user_name, username, venafi_api_key, venafi_base_url, venafi_tpp_password, venafi_tpp_username, venafi_use_tpp, venafi_zone].hash
|
|
823
908
|
end
|
|
824
909
|
|
|
825
910
|
# Builds the object from hash
|
|
@@ -0,0 +1,271 @@
|
|
|
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
|
+
OpenAPI Generator version: 6.0.0-SNAPSHOT
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Akeyless
|
|
17
|
+
# tokenize is a command that encrypts text with a tokenizer
|
|
18
|
+
class Tokenize
|
|
19
|
+
# Data to be encrypted
|
|
20
|
+
attr_accessor :plaintext
|
|
21
|
+
|
|
22
|
+
# Authentication token (see `/auth` and `/configure`)
|
|
23
|
+
attr_accessor :token
|
|
24
|
+
|
|
25
|
+
# The name of the tokenizer to use in the encryption process
|
|
26
|
+
attr_accessor :tokenizer_name
|
|
27
|
+
|
|
28
|
+
# Base64 encoded tweak for vaultless encryption
|
|
29
|
+
attr_accessor :tweak
|
|
30
|
+
|
|
31
|
+
# The universal identity token, Required only for universal_identity authentication
|
|
32
|
+
attr_accessor :uid_token
|
|
33
|
+
|
|
34
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
35
|
+
def self.attribute_map
|
|
36
|
+
{
|
|
37
|
+
:'plaintext' => :'plaintext',
|
|
38
|
+
:'token' => :'token',
|
|
39
|
+
:'tokenizer_name' => :'tokenizer-name',
|
|
40
|
+
:'tweak' => :'tweak',
|
|
41
|
+
:'uid_token' => :'uid-token'
|
|
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
|
+
:'plaintext' => :'String',
|
|
54
|
+
:'token' => :'String',
|
|
55
|
+
:'tokenizer_name' => :'String',
|
|
56
|
+
:'tweak' => :'String',
|
|
57
|
+
:'uid_token' => :'String'
|
|
58
|
+
}
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# List of attributes with nullable: true
|
|
62
|
+
def self.openapi_nullable
|
|
63
|
+
Set.new([
|
|
64
|
+
])
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Initializes the object
|
|
68
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
69
|
+
def initialize(attributes = {})
|
|
70
|
+
if (!attributes.is_a?(Hash))
|
|
71
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::Tokenize` initialize method"
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
75
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
76
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
77
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::Tokenize`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
78
|
+
end
|
|
79
|
+
h[k.to_sym] = v
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'plaintext')
|
|
83
|
+
self.plaintext = attributes[:'plaintext']
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'token')
|
|
87
|
+
self.token = attributes[:'token']
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'tokenizer_name')
|
|
91
|
+
self.tokenizer_name = attributes[:'tokenizer_name']
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'tweak')
|
|
95
|
+
self.tweak = attributes[:'tweak']
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
if attributes.key?(:'uid_token')
|
|
99
|
+
self.uid_token = attributes[:'uid_token']
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
104
|
+
# @return Array for valid properties with the reasons
|
|
105
|
+
def list_invalid_properties
|
|
106
|
+
invalid_properties = Array.new
|
|
107
|
+
if @plaintext.nil?
|
|
108
|
+
invalid_properties.push('invalid value for "plaintext", plaintext cannot be nil.')
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
if @tokenizer_name.nil?
|
|
112
|
+
invalid_properties.push('invalid value for "tokenizer_name", tokenizer_name cannot be nil.')
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
invalid_properties
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Check to see if the all the properties in the model are valid
|
|
119
|
+
# @return true if the model is valid
|
|
120
|
+
def valid?
|
|
121
|
+
return false if @plaintext.nil?
|
|
122
|
+
return false if @tokenizer_name.nil?
|
|
123
|
+
true
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Checks equality by comparing each attribute.
|
|
127
|
+
# @param [Object] Object to be compared
|
|
128
|
+
def ==(o)
|
|
129
|
+
return true if self.equal?(o)
|
|
130
|
+
self.class == o.class &&
|
|
131
|
+
plaintext == o.plaintext &&
|
|
132
|
+
token == o.token &&
|
|
133
|
+
tokenizer_name == o.tokenizer_name &&
|
|
134
|
+
tweak == o.tweak &&
|
|
135
|
+
uid_token == o.uid_token
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# @see the `==` method
|
|
139
|
+
# @param [Object] Object to be compared
|
|
140
|
+
def eql?(o)
|
|
141
|
+
self == o
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Calculates hash code according to all attributes.
|
|
145
|
+
# @return [Integer] Hash code
|
|
146
|
+
def hash
|
|
147
|
+
[plaintext, token, tokenizer_name, tweak, uid_token].hash
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Builds the object from hash
|
|
151
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
152
|
+
# @return [Object] Returns the model itself
|
|
153
|
+
def self.build_from_hash(attributes)
|
|
154
|
+
new.build_from_hash(attributes)
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# Builds the object from hash
|
|
158
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
159
|
+
# @return [Object] Returns the model itself
|
|
160
|
+
def build_from_hash(attributes)
|
|
161
|
+
return nil unless attributes.is_a?(Hash)
|
|
162
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
163
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
164
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
165
|
+
self.send("#{key}=", nil)
|
|
166
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
167
|
+
# check to ensure the input is an array given that the attribute
|
|
168
|
+
# is documented as an array but the input is not
|
|
169
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
170
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
171
|
+
end
|
|
172
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
173
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
174
|
+
end
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
self
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Deserializes the data based on type
|
|
181
|
+
# @param string type Data type
|
|
182
|
+
# @param string value Value to be deserialized
|
|
183
|
+
# @return [Object] Deserialized data
|
|
184
|
+
def _deserialize(type, value)
|
|
185
|
+
case type.to_sym
|
|
186
|
+
when :Time
|
|
187
|
+
Time.parse(value)
|
|
188
|
+
when :Date
|
|
189
|
+
Date.parse(value)
|
|
190
|
+
when :String
|
|
191
|
+
value.to_s
|
|
192
|
+
when :Integer
|
|
193
|
+
value.to_i
|
|
194
|
+
when :Float
|
|
195
|
+
value.to_f
|
|
196
|
+
when :Boolean
|
|
197
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
198
|
+
true
|
|
199
|
+
else
|
|
200
|
+
false
|
|
201
|
+
end
|
|
202
|
+
when :Object
|
|
203
|
+
# generic object (usually a Hash), return directly
|
|
204
|
+
value
|
|
205
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
206
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
207
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
208
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
209
|
+
k_type = Regexp.last_match[:k_type]
|
|
210
|
+
v_type = Regexp.last_match[:v_type]
|
|
211
|
+
{}.tap do |hash|
|
|
212
|
+
value.each do |k, v|
|
|
213
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
214
|
+
end
|
|
215
|
+
end
|
|
216
|
+
else # model
|
|
217
|
+
# models (e.g. Pet) or oneOf
|
|
218
|
+
klass = Akeyless.const_get(type)
|
|
219
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
220
|
+
end
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
# Returns the string representation of the object
|
|
224
|
+
# @return [String] String presentation of the object
|
|
225
|
+
def to_s
|
|
226
|
+
to_hash.to_s
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
230
|
+
# @return [Hash] Returns the object in the form of hash
|
|
231
|
+
def to_body
|
|
232
|
+
to_hash
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
# Returns the object in the form of hash
|
|
236
|
+
# @return [Hash] Returns the object in the form of hash
|
|
237
|
+
def to_hash
|
|
238
|
+
hash = {}
|
|
239
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
240
|
+
value = self.send(attr)
|
|
241
|
+
if value.nil?
|
|
242
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
243
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
hash[param] = _to_hash(value)
|
|
247
|
+
end
|
|
248
|
+
hash
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
# Outputs non-array value in the form of hash
|
|
252
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
253
|
+
# @param [Object] value Any valid value
|
|
254
|
+
# @return [Hash] Returns the value in the form of hash
|
|
255
|
+
def _to_hash(value)
|
|
256
|
+
if value.is_a?(Array)
|
|
257
|
+
value.compact.map { |v| _to_hash(v) }
|
|
258
|
+
elsif value.is_a?(Hash)
|
|
259
|
+
{}.tap do |hash|
|
|
260
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
261
|
+
end
|
|
262
|
+
elsif value.respond_to? :to_hash
|
|
263
|
+
value.to_hash
|
|
264
|
+
else
|
|
265
|
+
value
|
|
266
|
+
end
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
end
|