akeyless 3.5.4 → 3.6.0
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 +9 -2
- data/docs/AssocTargetItem.md +8 -0
- data/docs/AuthMethod.md +2 -0
- data/docs/CertificateChainInfo.md +4 -0
- data/docs/CertificateVersionInfo.md +22 -0
- data/docs/Connect.md +1 -1
- data/docs/CreateAuthMethod.md +2 -0
- data/docs/CreateAuthMethodAWSIAM.md +2 -0
- data/docs/CreateAuthMethodAzureAD.md +3 -1
- data/docs/CreateAuthMethodCert.md +2 -0
- data/docs/CreateAuthMethodEmail.md +2 -0
- data/docs/CreateAuthMethodGCP.md +2 -0
- data/docs/CreateAuthMethodHuawei.md +2 -0
- data/docs/CreateAuthMethodK8S.md +2 -0
- data/docs/CreateAuthMethodLDAP.md +2 -0
- data/docs/CreateAuthMethodOAuth2.md +2 -0
- data/docs/CreateAuthMethodOIDC.md +2 -0
- data/docs/CreateAuthMethodSAML.md +2 -0
- data/docs/CreateAuthMethodUniversalIdentity.md +2 -0
- data/docs/CreateEventForwarder.md +1 -1
- data/docs/CreateLinkedTarget.md +2 -0
- data/docs/CreateRole.md +4 -0
- data/docs/CreateRotatedSecret.md +7 -1
- data/docs/CreateSSHCertIssuer.md +4 -4
- data/docs/CreateSecret.md +2 -0
- data/docs/GatewayCreateMigration.md +2 -0
- data/docs/GatewayCreateProducerCassandra.md +4 -0
- data/docs/GatewayUpdateItem.md +2 -0
- data/docs/GatewayUpdateMigration.md +2 -0
- data/docs/GatewayUpdateProducerCassandra.md +4 -0
- data/docs/GenerateCsr.md +1 -1
- data/docs/GwClusterIdentity.md +2 -0
- data/docs/ImportPasswords.md +3 -1
- data/docs/ImportPasswordsOutput.md +3 -1
- data/docs/ItemVersion.md +2 -0
- data/docs/ProvisionCertificate.md +28 -0
- data/docs/ProvisionCertificateOutput.md +24 -0
- data/docs/RenewCertificate.md +28 -0
- data/docs/RenewCertificateOutput.md +28 -0
- data/docs/SecureRemoteAccess.md +2 -0
- data/docs/ServerInventoryPayload.md +2 -0
- data/docs/SetRoleRule.md +1 -1
- data/docs/SignDataWithClassicKey.md +2 -0
- data/docs/SignEcDsa.md +5 -1
- data/docs/SignPKCS1.md +9 -1
- data/docs/SignPKCS1Output.md +1 -1
- data/docs/SignRsaSsaPss.md +5 -1
- data/docs/StaticSecretDetailsInfo.md +2 -0
- data/docs/TargetItemVersion.md +2 -0
- data/docs/UpdateAuthMethod.md +2 -0
- data/docs/UpdateAuthMethodAWSIAM.md +2 -0
- data/docs/UpdateAuthMethodAzureAD.md +3 -1
- data/docs/UpdateAuthMethodCert.md +2 -0
- data/docs/UpdateAuthMethodGCP.md +2 -0
- data/docs/UpdateAuthMethodK8S.md +2 -0
- data/docs/UpdateAuthMethodLDAP.md +2 -0
- data/docs/UpdateAuthMethodOAuth2.md +2 -0
- data/docs/UpdateAuthMethodOIDC.md +2 -0
- data/docs/UpdateAuthMethodSAML.md +2 -0
- data/docs/UpdateAuthMethodUniversalIdentity.md +2 -0
- data/docs/UpdateCertificateValue.md +2 -0
- data/docs/UpdateItem.md +6 -0
- data/docs/UpdateLinkedTarget.md +2 -0
- data/docs/UpdateRole.md +4 -0
- data/docs/UpdateSSHCertIssuer.md +3 -3
- data/docs/UpdateSecretVal.md +2 -0
- data/docs/V2Api.md +138 -9
- data/docs/VerifyEcDsa.md +5 -1
- data/docs/VerifyPKCS1.md +9 -1
- data/docs/VerifyRsaSsaPss.md +5 -1
- data/lib/akeyless/api/v2_api.rb +146 -7
- data/lib/akeyless/models/assoc_target_item.rb +43 -1
- data/lib/akeyless/models/auth_method.rb +10 -1
- data/lib/akeyless/models/certificate_chain_info.rb +19 -1
- data/lib/akeyless/models/certificate_version_info.rb +232 -0
- data/lib/akeyless/models/connect.rb +1 -1
- data/lib/akeyless/models/create_auth_method.rb +11 -1
- data/lib/akeyless/models/create_auth_method_awsiam.rb +11 -1
- data/lib/akeyless/models/create_auth_method_azure_ad.rb +12 -2
- data/lib/akeyless/models/create_auth_method_cert.rb +11 -1
- data/lib/akeyless/models/create_auth_method_email.rb +11 -1
- data/lib/akeyless/models/create_auth_method_gcp.rb +11 -1
- data/lib/akeyless/models/create_auth_method_huawei.rb +11 -1
- data/lib/akeyless/models/create_auth_method_k8_s.rb +11 -1
- data/lib/akeyless/models/create_auth_method_ldap.rb +11 -1
- data/lib/akeyless/models/create_auth_method_o_auth2.rb +11 -1
- data/lib/akeyless/models/create_auth_method_oidc.rb +11 -1
- data/lib/akeyless/models/create_auth_method_saml.rb +11 -1
- data/lib/akeyless/models/create_auth_method_universal_identity.rb +11 -1
- data/lib/akeyless/models/create_event_forwarder.rb +1 -1
- data/lib/akeyless/models/create_linked_target.rb +11 -1
- data/lib/akeyless/models/create_role.rb +21 -1
- data/lib/akeyless/models/create_rotated_secret.rb +35 -2
- data/lib/akeyless/models/create_secret.rb +11 -1
- data/lib/akeyless/models/create_ssh_cert_issuer.rb +9 -9
- data/lib/akeyless/models/gateway_create_migration.rb +11 -1
- data/lib/akeyless/models/gateway_create_producer_cassandra.rb +23 -1
- data/lib/akeyless/models/gateway_update_item.rb +11 -1
- data/lib/akeyless/models/gateway_update_migration.rb +11 -1
- data/lib/akeyless/models/gateway_update_producer_cassandra.rb +23 -1
- data/lib/akeyless/models/generate_csr.rb +1 -1
- data/lib/akeyless/models/gw_cluster_identity.rb +10 -1
- data/lib/akeyless/models/import_passwords.rb +13 -4
- data/lib/akeyless/models/import_passwords_output.rb +13 -4
- data/lib/akeyless/models/item_version.rb +10 -1
- data/lib/akeyless/models/provision_certificate.rb +275 -0
- data/lib/akeyless/models/provision_certificate_output.rb +243 -0
- data/lib/akeyless/models/renew_certificate.rb +267 -0
- data/lib/akeyless/models/renew_certificate_output.rb +259 -0
- data/lib/akeyless/models/secure_remote_access.rb +12 -1
- data/lib/akeyless/models/server_inventory_payload.rb +12 -1
- data/lib/akeyless/models/set_role_rule.rb +1 -1
- data/lib/akeyless/models/sign_data_with_classic_key.rb +13 -1
- data/lib/akeyless/models/sign_ec_dsa.rb +24 -4
- data/lib/akeyless/models/sign_pkcs1.rb +44 -4
- data/lib/akeyless/models/sign_pkcs1_output.rb +2 -4
- data/lib/akeyless/models/sign_rsa_ssa_pss.rb +24 -4
- data/lib/akeyless/models/static_secret_details_info.rb +10 -1
- data/lib/akeyless/models/target_item_version.rb +10 -1
- data/lib/akeyless/models/update_auth_method.rb +11 -1
- data/lib/akeyless/models/update_auth_method_awsiam.rb +11 -1
- data/lib/akeyless/models/update_auth_method_azure_ad.rb +12 -2
- data/lib/akeyless/models/update_auth_method_cert.rb +11 -1
- data/lib/akeyless/models/update_auth_method_gcp.rb +11 -1
- data/lib/akeyless/models/update_auth_method_k8_s.rb +11 -1
- data/lib/akeyless/models/update_auth_method_ldap.rb +11 -1
- data/lib/akeyless/models/update_auth_method_o_auth2.rb +11 -1
- data/lib/akeyless/models/update_auth_method_oidc.rb +11 -1
- data/lib/akeyless/models/update_auth_method_saml.rb +11 -1
- data/lib/akeyless/models/update_auth_method_universal_identity.rb +11 -1
- data/lib/akeyless/models/update_certificate_value.rb +11 -1
- data/lib/akeyless/models/update_item.rb +32 -1
- data/lib/akeyless/models/update_linked_target.rb +11 -1
- data/lib/akeyless/models/update_role.rb +21 -1
- data/lib/akeyless/models/update_secret_val.rb +11 -1
- data/lib/akeyless/models/update_ssh_cert_issuer.rb +8 -8
- data/lib/akeyless/models/verify_ec_dsa.rb +24 -4
- data/lib/akeyless/models/verify_pkcs1.rb +44 -4
- data/lib/akeyless/models/verify_rsa_ssa_pss.rb +24 -4
- data/lib/akeyless/version.rb +1 -1
- data/lib/akeyless.rb +5 -0
- data/spec/models/certificate_version_info_spec.rb +48 -0
- data/spec/models/provision_certificate_output_spec.rb +54 -0
- data/spec/models/provision_certificate_spec.rb +66 -0
- data/spec/models/renew_certificate_output_spec.rb +66 -0
- data/spec/models/renew_certificate_spec.rb +66 -0
- metadata +23 -3
|
@@ -40,6 +40,8 @@ module Akeyless
|
|
|
40
40
|
# The universal identity token, Required only for universal_identity authentication
|
|
41
41
|
attr_accessor :uid_token
|
|
42
42
|
|
|
43
|
+
attr_accessor :update_mode
|
|
44
|
+
|
|
43
45
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
44
46
|
def self.attribute_map
|
|
45
47
|
{
|
|
@@ -50,7 +52,8 @@ module Akeyless
|
|
|
50
52
|
:'protection_key' => :'protection_key',
|
|
51
53
|
:'target_folder' => :'target-folder',
|
|
52
54
|
:'token' => :'token',
|
|
53
|
-
:'uid_token' => :'uid-token'
|
|
55
|
+
:'uid_token' => :'uid-token',
|
|
56
|
+
:'update_mode' => :'update-mode'
|
|
54
57
|
}
|
|
55
58
|
end
|
|
56
59
|
|
|
@@ -69,7 +72,8 @@ module Akeyless
|
|
|
69
72
|
:'protection_key' => :'String',
|
|
70
73
|
:'target_folder' => :'String',
|
|
71
74
|
:'token' => :'String',
|
|
72
|
-
:'uid_token' => :'String'
|
|
75
|
+
:'uid_token' => :'String',
|
|
76
|
+
:'update_mode' => :'String'
|
|
73
77
|
}
|
|
74
78
|
end
|
|
75
79
|
|
|
@@ -135,6 +139,10 @@ module Akeyless
|
|
|
135
139
|
if attributes.key?(:'uid_token')
|
|
136
140
|
self.uid_token = attributes[:'uid_token']
|
|
137
141
|
end
|
|
142
|
+
|
|
143
|
+
if attributes.key?(:'update_mode')
|
|
144
|
+
self.update_mode = attributes[:'update_mode']
|
|
145
|
+
end
|
|
138
146
|
end
|
|
139
147
|
|
|
140
148
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -169,7 +177,8 @@ module Akeyless
|
|
|
169
177
|
protection_key == o.protection_key &&
|
|
170
178
|
target_folder == o.target_folder &&
|
|
171
179
|
token == o.token &&
|
|
172
|
-
uid_token == o.uid_token
|
|
180
|
+
uid_token == o.uid_token &&
|
|
181
|
+
update_mode == o.update_mode
|
|
173
182
|
end
|
|
174
183
|
|
|
175
184
|
# @see the `==` method
|
|
@@ -181,7 +190,7 @@ module Akeyless
|
|
|
181
190
|
# Calculates hash code according to all attributes.
|
|
182
191
|
# @return [Integer] Hash code
|
|
183
192
|
def hash
|
|
184
|
-
[accessibility, format, import_path, json, protection_key, target_folder, token, uid_token].hash
|
|
193
|
+
[accessibility, format, import_path, json, protection_key, target_folder, token, uid_token, update_mode].hash
|
|
185
194
|
end
|
|
186
195
|
|
|
187
196
|
# Builds the object from hash
|
|
@@ -21,12 +21,15 @@ module Akeyless
|
|
|
21
21
|
|
|
22
22
|
attr_accessor :successfully_parsed
|
|
23
23
|
|
|
24
|
+
attr_accessor :updated
|
|
25
|
+
|
|
24
26
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
27
|
def self.attribute_map
|
|
26
28
|
{
|
|
27
29
|
:'imported' => :'imported',
|
|
28
30
|
:'passwords_in_file' => :'passwords_in_file',
|
|
29
|
-
:'successfully_parsed' => :'successfully_parsed'
|
|
31
|
+
:'successfully_parsed' => :'successfully_parsed',
|
|
32
|
+
:'updated' => :'updated'
|
|
30
33
|
}
|
|
31
34
|
end
|
|
32
35
|
|
|
@@ -40,7 +43,8 @@ module Akeyless
|
|
|
40
43
|
{
|
|
41
44
|
:'imported' => :'Integer',
|
|
42
45
|
:'passwords_in_file' => :'Integer',
|
|
43
|
-
:'successfully_parsed' => :'Integer'
|
|
46
|
+
:'successfully_parsed' => :'Integer',
|
|
47
|
+
:'updated' => :'Integer'
|
|
44
48
|
}
|
|
45
49
|
end
|
|
46
50
|
|
|
@@ -76,6 +80,10 @@ module Akeyless
|
|
|
76
80
|
if attributes.key?(:'successfully_parsed')
|
|
77
81
|
self.successfully_parsed = attributes[:'successfully_parsed']
|
|
78
82
|
end
|
|
83
|
+
|
|
84
|
+
if attributes.key?(:'updated')
|
|
85
|
+
self.updated = attributes[:'updated']
|
|
86
|
+
end
|
|
79
87
|
end
|
|
80
88
|
|
|
81
89
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -100,7 +108,8 @@ module Akeyless
|
|
|
100
108
|
self.class == o.class &&
|
|
101
109
|
imported == o.imported &&
|
|
102
110
|
passwords_in_file == o.passwords_in_file &&
|
|
103
|
-
successfully_parsed == o.successfully_parsed
|
|
111
|
+
successfully_parsed == o.successfully_parsed &&
|
|
112
|
+
updated == o.updated
|
|
104
113
|
end
|
|
105
114
|
|
|
106
115
|
# @see the `==` method
|
|
@@ -112,7 +121,7 @@ module Akeyless
|
|
|
112
121
|
# Calculates hash code according to all attributes.
|
|
113
122
|
# @return [Integer] Hash code
|
|
114
123
|
def hash
|
|
115
|
-
[imported, passwords_in_file, successfully_parsed].hash
|
|
124
|
+
[imported, passwords_in_file, successfully_parsed, updated].hash
|
|
116
125
|
end
|
|
117
126
|
|
|
118
127
|
# Builds the object from hash
|
|
@@ -19,6 +19,8 @@ module Akeyless
|
|
|
19
19
|
|
|
20
20
|
attr_accessor :access_date_display
|
|
21
21
|
|
|
22
|
+
attr_accessor :certificate_version_info
|
|
23
|
+
|
|
22
24
|
attr_accessor :creation_date
|
|
23
25
|
|
|
24
26
|
attr_accessor :customer_fragment_id
|
|
@@ -41,6 +43,7 @@ module Akeyless
|
|
|
41
43
|
{
|
|
42
44
|
:'access_date' => :'access_date',
|
|
43
45
|
:'access_date_display' => :'access_date_display',
|
|
46
|
+
:'certificate_version_info' => :'certificate_version_info',
|
|
44
47
|
:'creation_date' => :'creation_date',
|
|
45
48
|
:'customer_fragment_id' => :'customer_fragment_id',
|
|
46
49
|
:'deletion_date' => :'deletion_date',
|
|
@@ -62,6 +65,7 @@ module Akeyless
|
|
|
62
65
|
{
|
|
63
66
|
:'access_date' => :'Time',
|
|
64
67
|
:'access_date_display' => :'String',
|
|
68
|
+
:'certificate_version_info' => :'CertificateVersionInfo',
|
|
65
69
|
:'creation_date' => :'Time',
|
|
66
70
|
:'customer_fragment_id' => :'String',
|
|
67
71
|
:'deletion_date' => :'Time',
|
|
@@ -102,6 +106,10 @@ module Akeyless
|
|
|
102
106
|
self.access_date_display = attributes[:'access_date_display']
|
|
103
107
|
end
|
|
104
108
|
|
|
109
|
+
if attributes.key?(:'certificate_version_info')
|
|
110
|
+
self.certificate_version_info = attributes[:'certificate_version_info']
|
|
111
|
+
end
|
|
112
|
+
|
|
105
113
|
if attributes.key?(:'creation_date')
|
|
106
114
|
self.creation_date = attributes[:'creation_date']
|
|
107
115
|
end
|
|
@@ -157,6 +165,7 @@ module Akeyless
|
|
|
157
165
|
self.class == o.class &&
|
|
158
166
|
access_date == o.access_date &&
|
|
159
167
|
access_date_display == o.access_date_display &&
|
|
168
|
+
certificate_version_info == o.certificate_version_info &&
|
|
160
169
|
creation_date == o.creation_date &&
|
|
161
170
|
customer_fragment_id == o.customer_fragment_id &&
|
|
162
171
|
deletion_date == o.deletion_date &&
|
|
@@ -176,7 +185,7 @@ module Akeyless
|
|
|
176
185
|
# Calculates hash code according to all attributes.
|
|
177
186
|
# @return [Integer] Hash code
|
|
178
187
|
def hash
|
|
179
|
-
[access_date, access_date_display, creation_date, customer_fragment_id, deletion_date, item_version_state, modification_date, protection_key_name, version, with_customer_fragment].hash
|
|
188
|
+
[access_date, access_date_display, certificate_version_info, creation_date, customer_fragment_id, deletion_date, item_version_state, modification_date, protection_key_name, version, with_customer_fragment].hash
|
|
180
189
|
end
|
|
181
190
|
|
|
182
191
|
# Builds the object from hash
|
|
@@ -0,0 +1,275 @@
|
|
|
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: 7.3.0-SNAPSHOT
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Akeyless
|
|
17
|
+
# provisionCertificate is a command that provisions a certificate content to a target
|
|
18
|
+
class ProvisionCertificate
|
|
19
|
+
# Certificate display ID
|
|
20
|
+
attr_accessor :display_id
|
|
21
|
+
|
|
22
|
+
# Certificate item ID
|
|
23
|
+
attr_accessor :item_id
|
|
24
|
+
|
|
25
|
+
# Set output format to JSON
|
|
26
|
+
attr_accessor :json
|
|
27
|
+
|
|
28
|
+
# Certificate name
|
|
29
|
+
attr_accessor :name
|
|
30
|
+
|
|
31
|
+
# Authentication token (see `/auth` and `/configure`)
|
|
32
|
+
attr_accessor :token
|
|
33
|
+
|
|
34
|
+
# The universal identity token, Required only for universal_identity authentication
|
|
35
|
+
attr_accessor :uid_token
|
|
36
|
+
|
|
37
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
38
|
+
def self.attribute_map
|
|
39
|
+
{
|
|
40
|
+
:'display_id' => :'display-id',
|
|
41
|
+
:'item_id' => :'item-id',
|
|
42
|
+
:'json' => :'json',
|
|
43
|
+
:'name' => :'name',
|
|
44
|
+
:'token' => :'token',
|
|
45
|
+
:'uid_token' => :'uid-token'
|
|
46
|
+
}
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Returns all the JSON keys this model knows about
|
|
50
|
+
def self.acceptable_attributes
|
|
51
|
+
attribute_map.values
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Attribute type mapping.
|
|
55
|
+
def self.openapi_types
|
|
56
|
+
{
|
|
57
|
+
:'display_id' => :'String',
|
|
58
|
+
:'item_id' => :'Integer',
|
|
59
|
+
:'json' => :'Boolean',
|
|
60
|
+
:'name' => :'String',
|
|
61
|
+
:'token' => :'String',
|
|
62
|
+
:'uid_token' => :'String'
|
|
63
|
+
}
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# List of attributes with nullable: true
|
|
67
|
+
def self.openapi_nullable
|
|
68
|
+
Set.new([
|
|
69
|
+
])
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Initializes the object
|
|
73
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
74
|
+
def initialize(attributes = {})
|
|
75
|
+
if (!attributes.is_a?(Hash))
|
|
76
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::ProvisionCertificate` initialize method"
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
80
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
81
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
82
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::ProvisionCertificate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
83
|
+
end
|
|
84
|
+
h[k.to_sym] = v
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if attributes.key?(:'display_id')
|
|
88
|
+
self.display_id = attributes[:'display_id']
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
if attributes.key?(:'item_id')
|
|
92
|
+
self.item_id = attributes[:'item_id']
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
if attributes.key?(:'json')
|
|
96
|
+
self.json = attributes[:'json']
|
|
97
|
+
else
|
|
98
|
+
self.json = false
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
if attributes.key?(:'name')
|
|
102
|
+
self.name = attributes[:'name']
|
|
103
|
+
else
|
|
104
|
+
self.name = nil
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if attributes.key?(:'token')
|
|
108
|
+
self.token = attributes[:'token']
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
if attributes.key?(:'uid_token')
|
|
112
|
+
self.uid_token = attributes[:'uid_token']
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
117
|
+
# @return Array for valid properties with the reasons
|
|
118
|
+
def list_invalid_properties
|
|
119
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
120
|
+
invalid_properties = Array.new
|
|
121
|
+
if @name.nil?
|
|
122
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
invalid_properties
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Check to see if the all the properties in the model are valid
|
|
129
|
+
# @return true if the model is valid
|
|
130
|
+
def valid?
|
|
131
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
132
|
+
return false if @name.nil?
|
|
133
|
+
true
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Checks equality by comparing each attribute.
|
|
137
|
+
# @param [Object] Object to be compared
|
|
138
|
+
def ==(o)
|
|
139
|
+
return true if self.equal?(o)
|
|
140
|
+
self.class == o.class &&
|
|
141
|
+
display_id == o.display_id &&
|
|
142
|
+
item_id == o.item_id &&
|
|
143
|
+
json == o.json &&
|
|
144
|
+
name == o.name &&
|
|
145
|
+
token == o.token &&
|
|
146
|
+
uid_token == o.uid_token
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# @see the `==` method
|
|
150
|
+
# @param [Object] Object to be compared
|
|
151
|
+
def eql?(o)
|
|
152
|
+
self == o
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Calculates hash code according to all attributes.
|
|
156
|
+
# @return [Integer] Hash code
|
|
157
|
+
def hash
|
|
158
|
+
[display_id, item_id, json, name, token, uid_token].hash
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Builds the object from hash
|
|
162
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
163
|
+
# @return [Object] Returns the model itself
|
|
164
|
+
def self.build_from_hash(attributes)
|
|
165
|
+
return nil unless attributes.is_a?(Hash)
|
|
166
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
167
|
+
transformed_hash = {}
|
|
168
|
+
openapi_types.each_pair do |key, type|
|
|
169
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
170
|
+
transformed_hash["#{key}"] = nil
|
|
171
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
172
|
+
# check to ensure the input is an array given that the attribute
|
|
173
|
+
# is documented as an array but the input is not
|
|
174
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
175
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
176
|
+
end
|
|
177
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
178
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
new(transformed_hash)
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# Deserializes the data based on type
|
|
185
|
+
# @param string type Data type
|
|
186
|
+
# @param string value Value to be deserialized
|
|
187
|
+
# @return [Object] Deserialized data
|
|
188
|
+
def self._deserialize(type, value)
|
|
189
|
+
case type.to_sym
|
|
190
|
+
when :Time
|
|
191
|
+
Time.parse(value)
|
|
192
|
+
when :Date
|
|
193
|
+
Date.parse(value)
|
|
194
|
+
when :String
|
|
195
|
+
value.to_s
|
|
196
|
+
when :Integer
|
|
197
|
+
value.to_i
|
|
198
|
+
when :Float
|
|
199
|
+
value.to_f
|
|
200
|
+
when :Boolean
|
|
201
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
202
|
+
true
|
|
203
|
+
else
|
|
204
|
+
false
|
|
205
|
+
end
|
|
206
|
+
when :Object
|
|
207
|
+
# generic object (usually a Hash), return directly
|
|
208
|
+
value
|
|
209
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
210
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
211
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
212
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
213
|
+
k_type = Regexp.last_match[:k_type]
|
|
214
|
+
v_type = Regexp.last_match[:v_type]
|
|
215
|
+
{}.tap do |hash|
|
|
216
|
+
value.each do |k, v|
|
|
217
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
218
|
+
end
|
|
219
|
+
end
|
|
220
|
+
else # model
|
|
221
|
+
# models (e.g. Pet) or oneOf
|
|
222
|
+
klass = Akeyless.const_get(type)
|
|
223
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
224
|
+
end
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# Returns the string representation of the object
|
|
228
|
+
# @return [String] String presentation of the object
|
|
229
|
+
def to_s
|
|
230
|
+
to_hash.to_s
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
234
|
+
# @return [Hash] Returns the object in the form of hash
|
|
235
|
+
def to_body
|
|
236
|
+
to_hash
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
# Returns the object in the form of hash
|
|
240
|
+
# @return [Hash] Returns the object in the form of hash
|
|
241
|
+
def to_hash
|
|
242
|
+
hash = {}
|
|
243
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
244
|
+
value = self.send(attr)
|
|
245
|
+
if value.nil?
|
|
246
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
247
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
hash[param] = _to_hash(value)
|
|
251
|
+
end
|
|
252
|
+
hash
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
# Outputs non-array value in the form of hash
|
|
256
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
257
|
+
# @param [Object] value Any valid value
|
|
258
|
+
# @return [Hash] Returns the value in the form of hash
|
|
259
|
+
def _to_hash(value)
|
|
260
|
+
if value.is_a?(Array)
|
|
261
|
+
value.compact.map { |v| _to_hash(v) }
|
|
262
|
+
elsif value.is_a?(Hash)
|
|
263
|
+
{}.tap do |hash|
|
|
264
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
265
|
+
end
|
|
266
|
+
elsif value.respond_to? :to_hash
|
|
267
|
+
value.to_hash
|
|
268
|
+
else
|
|
269
|
+
value
|
|
270
|
+
end
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
end
|
|
@@ -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: 2.0
|
|
7
|
+
Contact: support@akeyless.io
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 7.3.0-SNAPSHOT
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Akeyless
|
|
17
|
+
class ProvisionCertificateOutput
|
|
18
|
+
attr_accessor :fail_message
|
|
19
|
+
|
|
20
|
+
attr_accessor :success_message
|
|
21
|
+
|
|
22
|
+
attr_accessor :host_names
|
|
23
|
+
|
|
24
|
+
attr_accessor :provisioned_at
|
|
25
|
+
|
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
|
+
def self.attribute_map
|
|
28
|
+
{
|
|
29
|
+
:'fail_message' => :'FailMessage',
|
|
30
|
+
:'success_message' => :'SuccessMessage',
|
|
31
|
+
:'host_names' => :'host_names',
|
|
32
|
+
:'provisioned_at' => :'provisioned_at'
|
|
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
|
+
:'fail_message' => :'String',
|
|
45
|
+
:'success_message' => :'String',
|
|
46
|
+
:'host_names' => :'Array<String>',
|
|
47
|
+
:'provisioned_at' => :'Time'
|
|
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::ProvisionCertificateOutput` 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::ProvisionCertificateOutput`. 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?(:'fail_message')
|
|
73
|
+
self.fail_message = attributes[:'fail_message']
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'success_message')
|
|
77
|
+
self.success_message = attributes[:'success_message']
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
if attributes.key?(:'host_names')
|
|
81
|
+
if (value = attributes[:'host_names']).is_a?(Array)
|
|
82
|
+
self.host_names = value
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'provisioned_at')
|
|
87
|
+
self.provisioned_at = attributes[:'provisioned_at']
|
|
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
|
+
fail_message == o.fail_message &&
|
|
112
|
+
success_message == o.success_message &&
|
|
113
|
+
host_names == o.host_names &&
|
|
114
|
+
provisioned_at == o.provisioned_at
|
|
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
|
+
[fail_message, success_message, host_names, provisioned_at].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
|