akeyless 2.16.8 → 2.16.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -1
- data/docs/Configure.md +5 -1
- data/docs/GatewayCreateMigration.md +22 -22
- data/docs/GatewayCreateProducerArtifactory.md +2 -0
- data/docs/GatewayCreateProducerAws.md +2 -0
- data/docs/GatewayCreateProducerAzure.md +2 -0
- data/docs/GatewayCreateProducerCassandra.md +2 -0
- data/docs/GatewayCreateProducerCertificateAutomation.md +2 -0
- data/docs/GatewayCreateProducerChef.md +2 -0
- data/docs/GatewayCreateProducerCustom.md +2 -0
- data/docs/GatewayCreateProducerDockerhub.md +2 -0
- data/docs/GatewayCreateProducerEks.md +2 -0
- data/docs/GatewayCreateProducerGcp.md +2 -0
- data/docs/GatewayCreateProducerGithub.md +2 -0
- data/docs/GatewayCreateProducerGke.md +2 -0
- data/docs/GatewayCreateProducerHanaDb.md +2 -0
- data/docs/GatewayCreateProducerLdap.md +2 -0
- data/docs/GatewayCreateProducerMSSQL.md +2 -0
- data/docs/GatewayCreateProducerMongo.md +2 -0
- data/docs/GatewayCreateProducerMySQL.md +2 -0
- data/docs/GatewayCreateProducerNativeK8S.md +2 -0
- data/docs/GatewayCreateProducerOracleDb.md +2 -0
- data/docs/GatewayCreateProducerPostgreSQL.md +2 -0
- data/docs/GatewayCreateProducerRabbitMQ.md +2 -0
- data/docs/GatewayCreateProducerRdp.md +2 -0
- data/docs/GatewayCreateProducerRedshift.md +2 -0
- data/docs/GatewayCreateProducerSnowflake.md +2 -0
- data/docs/GatewayDeleteMigration.md +1 -1
- data/docs/GatewayGetMigration.md +1 -1
- data/docs/GatewayStatusMigration.md +24 -0
- data/docs/GatewayUpdateItem.md +2 -0
- data/docs/GatewayUpdateMigration.md +25 -25
- data/docs/GatewayUpdateProducerArtifactory.md +2 -0
- data/docs/GatewayUpdateProducerAws.md +2 -0
- data/docs/GatewayUpdateProducerAzure.md +2 -0
- data/docs/GatewayUpdateProducerCassandra.md +2 -0
- data/docs/GatewayUpdateProducerCertificateAutomation.md +2 -0
- data/docs/GatewayUpdateProducerChef.md +2 -0
- data/docs/GatewayUpdateProducerCustom.md +2 -0
- data/docs/GatewayUpdateProducerDockerhub.md +2 -0
- data/docs/GatewayUpdateProducerEks.md +2 -0
- data/docs/GatewayUpdateProducerGcp.md +2 -0
- data/docs/GatewayUpdateProducerGithub.md +2 -0
- data/docs/GatewayUpdateProducerGke.md +2 -0
- data/docs/GatewayUpdateProducerHanaDb.md +2 -0
- data/docs/GatewayUpdateProducerLdap.md +2 -0
- data/docs/GatewayUpdateProducerMSSQL.md +2 -0
- data/docs/GatewayUpdateProducerMongo.md +2 -0
- data/docs/GatewayUpdateProducerMySQL.md +2 -0
- data/docs/GatewayUpdateProducerNativeK8S.md +2 -0
- data/docs/GatewayUpdateProducerOracleDb.md +2 -0
- data/docs/GatewayUpdateProducerPostgreSQL.md +2 -0
- data/docs/GatewayUpdateProducerRabbitMQ.md +2 -0
- data/docs/GatewayUpdateProducerRdp.md +2 -0
- data/docs/GatewayUpdateProducerRedshift.md +2 -0
- data/docs/GatewayUpdateProducerSnowflake.md +2 -0
- data/docs/GetKubeExecCreds.md +4 -0
- data/docs/GetPKICertificate.md +4 -0
- data/docs/GetSSHCertificate.md +4 -0
- data/docs/Item.md +2 -0
- data/docs/ItemGeneralInfo.md +2 -0
- data/docs/MigrationGeneral.md +2 -0
- data/docs/MigrationItems.md +24 -0
- data/docs/MigrationStatusReplyObj.md +36 -0
- data/docs/TargetTypeDetailsInput.md +2 -0
- data/docs/UpdateItem.md +2 -0
- data/docs/UploadRSA.md +2 -0
- data/docs/V2Api.md +64 -1
- data/lib/akeyless/api/v2_api.rb +64 -0
- data/lib/akeyless/models/configure.rb +24 -4
- data/lib/akeyless/models/gateway_create_migration.rb +22 -22
- data/lib/akeyless/models/gateway_create_producer_artifactory.rb +11 -1
- data/lib/akeyless/models/gateway_create_producer_aws.rb +11 -1
- data/lib/akeyless/models/gateway_create_producer_azure.rb +11 -1
- data/lib/akeyless/models/gateway_create_producer_cassandra.rb +11 -1
- data/lib/akeyless/models/gateway_create_producer_certificate_automation.rb +11 -1
- data/lib/akeyless/models/gateway_create_producer_chef.rb +11 -1
- data/lib/akeyless/models/gateway_create_producer_custom.rb +11 -1
- data/lib/akeyless/models/gateway_create_producer_dockerhub.rb +11 -1
- data/lib/akeyless/models/gateway_create_producer_eks.rb +11 -1
- data/lib/akeyless/models/gateway_create_producer_gcp.rb +11 -1
- data/lib/akeyless/models/gateway_create_producer_github.rb +11 -1
- data/lib/akeyless/models/gateway_create_producer_gke.rb +11 -1
- data/lib/akeyless/models/gateway_create_producer_hana_db.rb +11 -1
- data/lib/akeyless/models/gateway_create_producer_ldap.rb +11 -1
- data/lib/akeyless/models/gateway_create_producer_mongo.rb +11 -1
- data/lib/akeyless/models/gateway_create_producer_mssql.rb +11 -1
- data/lib/akeyless/models/gateway_create_producer_my_sql.rb +11 -1
- data/lib/akeyless/models/gateway_create_producer_native_k8_s.rb +11 -1
- data/lib/akeyless/models/gateway_create_producer_oracle_db.rb +11 -1
- data/lib/akeyless/models/gateway_create_producer_postgre_sql.rb +11 -1
- data/lib/akeyless/models/gateway_create_producer_rabbit_mq.rb +11 -1
- data/lib/akeyless/models/gateway_create_producer_rdp.rb +11 -1
- data/lib/akeyless/models/gateway_create_producer_redshift.rb +11 -1
- data/lib/akeyless/models/gateway_create_producer_snowflake.rb +11 -1
- data/lib/akeyless/models/gateway_delete_migration.rb +1 -1
- data/lib/akeyless/models/gateway_get_migration.rb +1 -0
- data/lib/akeyless/models/gateway_status_migration.rb +251 -0
- data/lib/akeyless/models/gateway_update_item.rb +11 -1
- data/lib/akeyless/models/gateway_update_migration.rb +33 -38
- data/lib/akeyless/models/gateway_update_producer_artifactory.rb +11 -1
- data/lib/akeyless/models/gateway_update_producer_aws.rb +11 -1
- data/lib/akeyless/models/gateway_update_producer_azure.rb +11 -1
- data/lib/akeyless/models/gateway_update_producer_cassandra.rb +11 -1
- data/lib/akeyless/models/gateway_update_producer_certificate_automation.rb +11 -1
- data/lib/akeyless/models/gateway_update_producer_chef.rb +11 -1
- data/lib/akeyless/models/gateway_update_producer_custom.rb +11 -1
- data/lib/akeyless/models/gateway_update_producer_dockerhub.rb +11 -1
- data/lib/akeyless/models/gateway_update_producer_eks.rb +11 -1
- data/lib/akeyless/models/gateway_update_producer_gcp.rb +11 -1
- data/lib/akeyless/models/gateway_update_producer_github.rb +11 -1
- data/lib/akeyless/models/gateway_update_producer_gke.rb +11 -1
- data/lib/akeyless/models/gateway_update_producer_hana_db.rb +11 -1
- data/lib/akeyless/models/gateway_update_producer_ldap.rb +11 -1
- data/lib/akeyless/models/gateway_update_producer_mongo.rb +11 -1
- data/lib/akeyless/models/gateway_update_producer_mssql.rb +11 -1
- data/lib/akeyless/models/gateway_update_producer_my_sql.rb +11 -1
- data/lib/akeyless/models/gateway_update_producer_native_k8_s.rb +11 -1
- data/lib/akeyless/models/gateway_update_producer_oracle_db.rb +11 -1
- data/lib/akeyless/models/gateway_update_producer_postgre_sql.rb +11 -1
- data/lib/akeyless/models/gateway_update_producer_rabbit_mq.rb +11 -1
- data/lib/akeyless/models/gateway_update_producer_rdp.rb +11 -1
- data/lib/akeyless/models/gateway_update_producer_redshift.rb +11 -1
- data/lib/akeyless/models/gateway_update_producer_snowflake.rb +11 -1
- data/lib/akeyless/models/get_kube_exec_creds.rb +21 -1
- data/lib/akeyless/models/get_pki_certificate.rb +21 -1
- data/lib/akeyless/models/get_ssh_certificate.rb +21 -1
- data/lib/akeyless/models/item.rb +10 -1
- data/lib/akeyless/models/item_general_info.rb +10 -1
- data/lib/akeyless/models/migration_general.rb +10 -1
- data/lib/akeyless/models/migration_items.rb +246 -0
- data/lib/akeyless/models/migration_status_reply_obj.rb +300 -0
- data/lib/akeyless/models/target_type_details_input.rb +10 -1
- data/lib/akeyless/models/update_item.rb +11 -1
- data/lib/akeyless/models/upload_rsa.rb +11 -1
- data/lib/akeyless/version.rb +1 -1
- data/lib/akeyless.rb +3 -0
- data/spec/models/gateway_status_migration_spec.rb +52 -0
- data/spec/models/migration_items_spec.rb +52 -0
- data/spec/models/migration_status_reply_obj_spec.rb +88 -0
- metadata +511 -499
@@ -21,12 +21,18 @@ module Akeyless
|
|
21
21
|
# The username to sign in the SSH certificate
|
22
22
|
attr_accessor :cert_username
|
23
23
|
|
24
|
+
# Set this option to output legacy ('ssh-rsa-cert-v01@openssh.com') signing algorithm name in the certificate.
|
25
|
+
attr_accessor :legacy_signing_alg_name
|
26
|
+
|
24
27
|
# SSH public key file contents. If this option is used, the certificate will be printed to stdout
|
25
28
|
attr_accessor :public_key_data
|
26
29
|
|
27
30
|
# Authentication token (see `/auth` and `/configure`)
|
28
31
|
attr_accessor :token
|
29
32
|
|
33
|
+
# Updated certificate lifetime in seconds (must be less than the Certificate Issuer default TTL)
|
34
|
+
attr_accessor :ttl
|
35
|
+
|
30
36
|
# The universal identity token, Required only for universal_identity authentication
|
31
37
|
attr_accessor :uid_token
|
32
38
|
|
@@ -35,8 +41,10 @@ module Akeyless
|
|
35
41
|
{
|
36
42
|
:'cert_issuer_name' => :'cert-issuer-name',
|
37
43
|
:'cert_username' => :'cert-username',
|
44
|
+
:'legacy_signing_alg_name' => :'legacy-signing-alg-name',
|
38
45
|
:'public_key_data' => :'public-key-data',
|
39
46
|
:'token' => :'token',
|
47
|
+
:'ttl' => :'ttl',
|
40
48
|
:'uid_token' => :'uid-token'
|
41
49
|
}
|
42
50
|
end
|
@@ -51,8 +59,10 @@ module Akeyless
|
|
51
59
|
{
|
52
60
|
:'cert_issuer_name' => :'String',
|
53
61
|
:'cert_username' => :'String',
|
62
|
+
:'legacy_signing_alg_name' => :'Boolean',
|
54
63
|
:'public_key_data' => :'String',
|
55
64
|
:'token' => :'String',
|
65
|
+
:'ttl' => :'Integer',
|
56
66
|
:'uid_token' => :'String'
|
57
67
|
}
|
58
68
|
end
|
@@ -86,6 +96,10 @@ module Akeyless
|
|
86
96
|
self.cert_username = attributes[:'cert_username']
|
87
97
|
end
|
88
98
|
|
99
|
+
if attributes.key?(:'legacy_signing_alg_name')
|
100
|
+
self.legacy_signing_alg_name = attributes[:'legacy_signing_alg_name']
|
101
|
+
end
|
102
|
+
|
89
103
|
if attributes.key?(:'public_key_data')
|
90
104
|
self.public_key_data = attributes[:'public_key_data']
|
91
105
|
end
|
@@ -94,6 +108,10 @@ module Akeyless
|
|
94
108
|
self.token = attributes[:'token']
|
95
109
|
end
|
96
110
|
|
111
|
+
if attributes.key?(:'ttl')
|
112
|
+
self.ttl = attributes[:'ttl']
|
113
|
+
end
|
114
|
+
|
97
115
|
if attributes.key?(:'uid_token')
|
98
116
|
self.uid_token = attributes[:'uid_token']
|
99
117
|
end
|
@@ -129,8 +147,10 @@ module Akeyless
|
|
129
147
|
self.class == o.class &&
|
130
148
|
cert_issuer_name == o.cert_issuer_name &&
|
131
149
|
cert_username == o.cert_username &&
|
150
|
+
legacy_signing_alg_name == o.legacy_signing_alg_name &&
|
132
151
|
public_key_data == o.public_key_data &&
|
133
152
|
token == o.token &&
|
153
|
+
ttl == o.ttl &&
|
134
154
|
uid_token == o.uid_token
|
135
155
|
end
|
136
156
|
|
@@ -143,7 +163,7 @@ module Akeyless
|
|
143
163
|
# Calculates hash code according to all attributes.
|
144
164
|
# @return [Integer] Hash code
|
145
165
|
def hash
|
146
|
-
[cert_issuer_name, cert_username, public_key_data, token, uid_token].hash
|
166
|
+
[cert_issuer_name, cert_username, legacy_signing_alg_name, public_key_data, token, ttl, uid_token].hash
|
147
167
|
end
|
148
168
|
|
149
169
|
# Builds the object from hash
|
data/lib/akeyless/models/item.rb
CHANGED
@@ -66,6 +66,8 @@ module Akeyless
|
|
66
66
|
|
67
67
|
attr_accessor :protection_key_name
|
68
68
|
|
69
|
+
attr_accessor :protection_key_type
|
70
|
+
|
69
71
|
attr_accessor :public_value
|
70
72
|
|
71
73
|
attr_accessor :rotation_interval
|
@@ -102,6 +104,7 @@ module Akeyless
|
|
102
104
|
:'last_version' => :'last_version',
|
103
105
|
:'next_rotation_date' => :'next_rotation_date',
|
104
106
|
:'protection_key_name' => :'protection_key_name',
|
107
|
+
:'protection_key_type' => :'protection_key_type',
|
105
108
|
:'public_value' => :'public_value',
|
106
109
|
:'rotation_interval' => :'rotation_interval',
|
107
110
|
:'target_versions' => :'target_versions',
|
@@ -142,6 +145,7 @@ module Akeyless
|
|
142
145
|
:'last_version' => :'Integer',
|
143
146
|
:'next_rotation_date' => :'Time',
|
144
147
|
:'protection_key_name' => :'String',
|
148
|
+
:'protection_key_type' => :'String',
|
145
149
|
:'public_value' => :'String',
|
146
150
|
:'rotation_interval' => :'Integer',
|
147
151
|
:'target_versions' => :'Array<TargetItemVersion>',
|
@@ -278,6 +282,10 @@ module Akeyless
|
|
278
282
|
self.protection_key_name = attributes[:'protection_key_name']
|
279
283
|
end
|
280
284
|
|
285
|
+
if attributes.key?(:'protection_key_type')
|
286
|
+
self.protection_key_type = attributes[:'protection_key_type']
|
287
|
+
end
|
288
|
+
|
281
289
|
if attributes.key?(:'public_value')
|
282
290
|
self.public_value = attributes[:'public_value']
|
283
291
|
end
|
@@ -340,6 +348,7 @@ module Akeyless
|
|
340
348
|
last_version == o.last_version &&
|
341
349
|
next_rotation_date == o.next_rotation_date &&
|
342
350
|
protection_key_name == o.protection_key_name &&
|
351
|
+
protection_key_type == o.protection_key_type &&
|
343
352
|
public_value == o.public_value &&
|
344
353
|
rotation_interval == o.rotation_interval &&
|
345
354
|
target_versions == o.target_versions &&
|
@@ -355,7 +364,7 @@ module Akeyless
|
|
355
364
|
# Calculates hash code according to all attributes.
|
356
365
|
# @return [Integer] Hash code
|
357
366
|
def hash
|
358
|
-
[auto_rotate, cert_issuer_signer_key_name, certificate_issue_details, certificates, client_permissions, customer_fragment_id, delete_protection, deletion_date, display_id, is_enabled, item_accessibility, item_general_info, item_id, item_metadata, item_name, item_size, item_state, item_sub_type, item_tags, item_targets_assoc, item_type, item_versions, last_version, next_rotation_date, protection_key_name, public_value, rotation_interval, target_versions, with_customer_fragment].hash
|
367
|
+
[auto_rotate, cert_issuer_signer_key_name, certificate_issue_details, certificates, client_permissions, customer_fragment_id, delete_protection, deletion_date, display_id, is_enabled, item_accessibility, item_general_info, item_id, item_metadata, item_name, item_size, item_state, item_sub_type, item_tags, item_targets_assoc, item_type, item_versions, last_version, next_rotation_date, protection_key_name, protection_key_type, public_value, rotation_interval, target_versions, with_customer_fragment].hash
|
359
368
|
end
|
360
369
|
|
361
370
|
# Builds the object from hash
|
@@ -19,6 +19,8 @@ module Akeyless
|
|
19
19
|
|
20
20
|
attr_accessor :classic_key_details
|
21
21
|
|
22
|
+
attr_accessor :cluster_gw_url
|
23
|
+
|
22
24
|
attr_accessor :display_metadata
|
23
25
|
|
24
26
|
attr_accessor :dynamic_secret_producer_details
|
@@ -38,6 +40,7 @@ module Akeyless
|
|
38
40
|
{
|
39
41
|
:'cert_issue_details' => :'cert_issue_details',
|
40
42
|
:'classic_key_details' => :'classic_key_details',
|
43
|
+
:'cluster_gw_url' => :'cluster_gw_url',
|
41
44
|
:'display_metadata' => :'display_metadata',
|
42
45
|
:'dynamic_secret_producer_details' => :'dynamic_secret_producer_details',
|
43
46
|
:'password_policy' => :'password_policy',
|
@@ -58,6 +61,7 @@ module Akeyless
|
|
58
61
|
{
|
59
62
|
:'cert_issue_details' => :'CertificateIssueInfo',
|
60
63
|
:'classic_key_details' => :'ClassicKeyDetailsInfo',
|
64
|
+
:'cluster_gw_url' => :'String',
|
61
65
|
:'display_metadata' => :'String',
|
62
66
|
:'dynamic_secret_producer_details' => :'DynamicSecretProducerInfo',
|
63
67
|
:'password_policy' => :'PasswordPolicyInfo',
|
@@ -97,6 +101,10 @@ module Akeyless
|
|
97
101
|
self.classic_key_details = attributes[:'classic_key_details']
|
98
102
|
end
|
99
103
|
|
104
|
+
if attributes.key?(:'cluster_gw_url')
|
105
|
+
self.cluster_gw_url = attributes[:'cluster_gw_url']
|
106
|
+
end
|
107
|
+
|
100
108
|
if attributes.key?(:'display_metadata')
|
101
109
|
self.display_metadata = attributes[:'display_metadata']
|
102
110
|
end
|
@@ -146,6 +154,7 @@ module Akeyless
|
|
146
154
|
self.class == o.class &&
|
147
155
|
cert_issue_details == o.cert_issue_details &&
|
148
156
|
classic_key_details == o.classic_key_details &&
|
157
|
+
cluster_gw_url == o.cluster_gw_url &&
|
149
158
|
display_metadata == o.display_metadata &&
|
150
159
|
dynamic_secret_producer_details == o.dynamic_secret_producer_details &&
|
151
160
|
password_policy == o.password_policy &&
|
@@ -164,7 +173,7 @@ module Akeyless
|
|
164
173
|
# Calculates hash code according to all attributes.
|
165
174
|
# @return [Integer] Hash code
|
166
175
|
def hash
|
167
|
-
[cert_issue_details, classic_key_details, display_metadata, dynamic_secret_producer_details, password_policy, rotated_secret_details, secure_remote_access_details, static_secret_info, tokenizer_info].hash
|
176
|
+
[cert_issue_details, classic_key_details, cluster_gw_url, display_metadata, dynamic_secret_producer_details, password_policy, rotated_secret_details, secure_remote_access_details, static_secret_info, tokenizer_info].hash
|
168
177
|
end
|
169
178
|
|
170
179
|
# Builds the object from hash
|
@@ -19,6 +19,8 @@ module Akeyless
|
|
19
19
|
|
20
20
|
attr_accessor :name
|
21
21
|
|
22
|
+
attr_accessor :new_name
|
23
|
+
|
22
24
|
attr_accessor :prefix
|
23
25
|
|
24
26
|
attr_accessor :protection_key
|
@@ -28,6 +30,7 @@ module Akeyless
|
|
28
30
|
{
|
29
31
|
:'id' => :'id',
|
30
32
|
:'name' => :'name',
|
33
|
+
:'new_name' => :'new_name',
|
31
34
|
:'prefix' => :'prefix',
|
32
35
|
:'protection_key' => :'protection_key'
|
33
36
|
}
|
@@ -43,6 +46,7 @@ module Akeyless
|
|
43
46
|
{
|
44
47
|
:'id' => :'String',
|
45
48
|
:'name' => :'String',
|
49
|
+
:'new_name' => :'String',
|
46
50
|
:'prefix' => :'String',
|
47
51
|
:'protection_key' => :'String'
|
48
52
|
}
|
@@ -77,6 +81,10 @@ module Akeyless
|
|
77
81
|
self.name = attributes[:'name']
|
78
82
|
end
|
79
83
|
|
84
|
+
if attributes.key?(:'new_name')
|
85
|
+
self.new_name = attributes[:'new_name']
|
86
|
+
end
|
87
|
+
|
80
88
|
if attributes.key?(:'prefix')
|
81
89
|
self.prefix = attributes[:'prefix']
|
82
90
|
end
|
@@ -106,6 +114,7 @@ module Akeyless
|
|
106
114
|
self.class == o.class &&
|
107
115
|
id == o.id &&
|
108
116
|
name == o.name &&
|
117
|
+
new_name == o.new_name &&
|
109
118
|
prefix == o.prefix &&
|
110
119
|
protection_key == o.protection_key
|
111
120
|
end
|
@@ -119,7 +128,7 @@ module Akeyless
|
|
119
128
|
# Calculates hash code according to all attributes.
|
120
129
|
# @return [Integer] Hash code
|
121
130
|
def hash
|
122
|
-
[id, name, prefix, protection_key].hash
|
131
|
+
[id, name, new_name, prefix, protection_key].hash
|
123
132
|
end
|
124
133
|
|
125
134
|
# Builds the object from hash
|
@@ -0,0 +1,246 @@
|
|
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.1-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Akeyless
|
17
|
+
class MigrationItems
|
18
|
+
attr_accessor :failed
|
19
|
+
|
20
|
+
attr_accessor :migrated
|
21
|
+
|
22
|
+
attr_accessor :skipped
|
23
|
+
|
24
|
+
attr_accessor :total
|
25
|
+
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
27
|
+
def self.attribute_map
|
28
|
+
{
|
29
|
+
:'failed' => :'failed',
|
30
|
+
:'migrated' => :'migrated',
|
31
|
+
:'skipped' => :'skipped',
|
32
|
+
:'total' => :'total'
|
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
|
+
:'failed' => :'Integer',
|
45
|
+
:'migrated' => :'Integer',
|
46
|
+
:'skipped' => :'Integer',
|
47
|
+
:'total' => :'Integer'
|
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::MigrationItems` 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::MigrationItems`. 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?(:'failed')
|
73
|
+
self.failed = attributes[:'failed']
|
74
|
+
end
|
75
|
+
|
76
|
+
if attributes.key?(:'migrated')
|
77
|
+
self.migrated = attributes[:'migrated']
|
78
|
+
end
|
79
|
+
|
80
|
+
if attributes.key?(:'skipped')
|
81
|
+
self.skipped = attributes[:'skipped']
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes.key?(:'total')
|
85
|
+
self.total = attributes[:'total']
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
90
|
+
# @return Array for valid properties with the reasons
|
91
|
+
def list_invalid_properties
|
92
|
+
invalid_properties = Array.new
|
93
|
+
invalid_properties
|
94
|
+
end
|
95
|
+
|
96
|
+
# Check to see if the all the properties in the model are valid
|
97
|
+
# @return true if the model is valid
|
98
|
+
def valid?
|
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
|
+
failed == o.failed &&
|
108
|
+
migrated == o.migrated &&
|
109
|
+
skipped == o.skipped &&
|
110
|
+
total == o.total
|
111
|
+
end
|
112
|
+
|
113
|
+
# @see the `==` method
|
114
|
+
# @param [Object] Object to be compared
|
115
|
+
def eql?(o)
|
116
|
+
self == o
|
117
|
+
end
|
118
|
+
|
119
|
+
# Calculates hash code according to all attributes.
|
120
|
+
# @return [Integer] Hash code
|
121
|
+
def hash
|
122
|
+
[failed, migrated, skipped, total].hash
|
123
|
+
end
|
124
|
+
|
125
|
+
# Builds the object from hash
|
126
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
127
|
+
# @return [Object] Returns the model itself
|
128
|
+
def self.build_from_hash(attributes)
|
129
|
+
new.build_from_hash(attributes)
|
130
|
+
end
|
131
|
+
|
132
|
+
# Builds the object from hash
|
133
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
134
|
+
# @return [Object] Returns the model itself
|
135
|
+
def build_from_hash(attributes)
|
136
|
+
return nil unless attributes.is_a?(Hash)
|
137
|
+
attributes = attributes.transform_keys(&:to_sym)
|
138
|
+
self.class.openapi_types.each_pair do |key, type|
|
139
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
140
|
+
self.send("#{key}=", nil)
|
141
|
+
elsif type =~ /\AArray<(.*)>/i
|
142
|
+
# check to ensure the input is an array given that the attribute
|
143
|
+
# is documented as an array but the input is not
|
144
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
145
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
146
|
+
end
|
147
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
148
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
self
|
153
|
+
end
|
154
|
+
|
155
|
+
# Deserializes the data based on type
|
156
|
+
# @param string type Data type
|
157
|
+
# @param string value Value to be deserialized
|
158
|
+
# @return [Object] Deserialized data
|
159
|
+
def _deserialize(type, value)
|
160
|
+
case type.to_sym
|
161
|
+
when :Time
|
162
|
+
Time.parse(value)
|
163
|
+
when :Date
|
164
|
+
Date.parse(value)
|
165
|
+
when :String
|
166
|
+
value.to_s
|
167
|
+
when :Integer
|
168
|
+
value.to_i
|
169
|
+
when :Float
|
170
|
+
value.to_f
|
171
|
+
when :Boolean
|
172
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
173
|
+
true
|
174
|
+
else
|
175
|
+
false
|
176
|
+
end
|
177
|
+
when :Object
|
178
|
+
# generic object (usually a Hash), return directly
|
179
|
+
value
|
180
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
181
|
+
inner_type = Regexp.last_match[:inner_type]
|
182
|
+
value.map { |v| _deserialize(inner_type, v) }
|
183
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
184
|
+
k_type = Regexp.last_match[:k_type]
|
185
|
+
v_type = Regexp.last_match[:v_type]
|
186
|
+
{}.tap do |hash|
|
187
|
+
value.each do |k, v|
|
188
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
189
|
+
end
|
190
|
+
end
|
191
|
+
else # model
|
192
|
+
# models (e.g. Pet) or oneOf
|
193
|
+
klass = Akeyless.const_get(type)
|
194
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
195
|
+
end
|
196
|
+
end
|
197
|
+
|
198
|
+
# Returns the string representation of the object
|
199
|
+
# @return [String] String presentation of the object
|
200
|
+
def to_s
|
201
|
+
to_hash.to_s
|
202
|
+
end
|
203
|
+
|
204
|
+
# to_body is an alias to to_hash (backward compatibility)
|
205
|
+
# @return [Hash] Returns the object in the form of hash
|
206
|
+
def to_body
|
207
|
+
to_hash
|
208
|
+
end
|
209
|
+
|
210
|
+
# Returns the object in the form of hash
|
211
|
+
# @return [Hash] Returns the object in the form of hash
|
212
|
+
def to_hash
|
213
|
+
hash = {}
|
214
|
+
self.class.attribute_map.each_pair do |attr, param|
|
215
|
+
value = self.send(attr)
|
216
|
+
if value.nil?
|
217
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
218
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
219
|
+
end
|
220
|
+
|
221
|
+
hash[param] = _to_hash(value)
|
222
|
+
end
|
223
|
+
hash
|
224
|
+
end
|
225
|
+
|
226
|
+
# Outputs non-array value in the form of hash
|
227
|
+
# For object, use to_hash. Otherwise, just return the value
|
228
|
+
# @param [Object] value Any valid value
|
229
|
+
# @return [Hash] Returns the value in the form of hash
|
230
|
+
def _to_hash(value)
|
231
|
+
if value.is_a?(Array)
|
232
|
+
value.compact.map { |v| _to_hash(v) }
|
233
|
+
elsif value.is_a?(Hash)
|
234
|
+
{}.tap do |hash|
|
235
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
236
|
+
end
|
237
|
+
elsif value.respond_to? :to_hash
|
238
|
+
value.to_hash
|
239
|
+
else
|
240
|
+
value
|
241
|
+
end
|
242
|
+
end
|
243
|
+
|
244
|
+
end
|
245
|
+
|
246
|
+
end
|