akeyless 4.2.4 → 4.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -1
- data/docs/AcmeAccount.md +22 -0
- data/docs/AuthMethodRoleAssociation.md +2 -0
- data/docs/ChangeAdminAccountPassword.md +26 -0
- data/docs/CreatePKICertIssuer.md +5 -1
- data/docs/DeactivateAcmeAccount.md +28 -0
- data/docs/GenerateAcmeEab.md +24 -0
- data/docs/GenerateAcmeEabOutput.md +22 -0
- data/docs/GetGroupOutput.md +2 -0
- data/docs/GetKubeExecCreds.md +1 -1
- data/docs/GetPKICertificate.md +1 -1
- data/docs/Group.md +2 -0
- data/docs/ListAcmeAccounts.md +24 -0
- data/docs/ListAcmeAccountsOutput.md +18 -0
- data/docs/PKICertificateIssueDetails.md +4 -0
- data/docs/RoleAssociationDetails.md +2 -0
- data/docs/RoleAuthMethodAssociation.md +2 -0
- data/docs/UpdateClassicKeyCertificate.md +2 -0
- data/docs/UpdateItem.md +2 -0
- data/docs/UpdatePKICertIssuer.md +5 -1
- data/docs/V2Api.md +252 -0
- data/lib/akeyless/api/v2_api.rb +256 -0
- data/lib/akeyless/models/acme_account.rb +234 -0
- data/lib/akeyless/models/auth_method_role_association.rb +10 -1
- data/lib/akeyless/models/change_admin_account_password.rb +271 -0
- data/lib/akeyless/models/create_pki_cert_issuer.rb +24 -2
- data/lib/akeyless/models/deactivate_acme_account.rb +282 -0
- data/lib/akeyless/models/generate_acme_eab.rb +254 -0
- data/lib/akeyless/models/generate_acme_eab_output.rb +232 -0
- data/lib/akeyless/models/get_group_output.rb +10 -1
- data/lib/akeyless/models/get_kube_exec_creds.rb +1 -1
- data/lib/akeyless/models/get_pki_certificate.rb +1 -1
- data/lib/akeyless/models/group.rb +10 -1
- data/lib/akeyless/models/list_acme_accounts.rb +255 -0
- data/lib/akeyless/models/list_acme_accounts_output.rb +216 -0
- data/lib/akeyless/models/pki_certificate_issue_details.rb +19 -1
- data/lib/akeyless/models/role_association_details.rb +10 -1
- data/lib/akeyless/models/role_auth_method_association.rb +10 -1
- data/lib/akeyless/models/update_classic_key_certificate.rb +10 -1
- data/lib/akeyless/models/update_item.rb +10 -1
- data/lib/akeyless/models/update_pki_cert_issuer.rb +24 -2
- data/lib/akeyless/version.rb +1 -1
- data/lib/akeyless.rb +7 -0
- data/spec/models/acme_account_spec.rb +48 -0
- data/spec/models/change_admin_account_password_spec.rb +60 -0
- data/spec/models/deactivate_acme_account_spec.rb +66 -0
- data/spec/models/generate_acme_eab_output_spec.rb +48 -0
- data/spec/models/generate_acme_eab_spec.rb +54 -0
- data/spec/models/list_acme_accounts_output_spec.rb +36 -0
- data/spec/models/list_acme_accounts_spec.rb +54 -0
- metadata +30 -2
@@ -0,0 +1,234 @@
|
|
1
|
+
=begin
|
2
|
+
#Akeyless API
|
3
|
+
|
4
|
+
#The purpose of this application is to provide access to Akeyless API.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2.0
|
7
|
+
Contact: support@akeyless.io
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.9.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Akeyless
|
17
|
+
# AcmeAccount is copied without the jwk as it seems like it has issues with sdk
|
18
|
+
class AcmeAccount
|
19
|
+
# AccountId is the ACME account id, not Akeyless account id
|
20
|
+
attr_accessor :account_id
|
21
|
+
|
22
|
+
attr_accessor :key_digest
|
23
|
+
|
24
|
+
attr_accessor :status
|
25
|
+
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
27
|
+
def self.attribute_map
|
28
|
+
{
|
29
|
+
:'account_id' => :'account_id',
|
30
|
+
:'key_digest' => :'key_digest',
|
31
|
+
:'status' => :'status'
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# Returns all the JSON keys this model knows about
|
36
|
+
def self.acceptable_attributes
|
37
|
+
attribute_map.values
|
38
|
+
end
|
39
|
+
|
40
|
+
# Attribute type mapping.
|
41
|
+
def self.openapi_types
|
42
|
+
{
|
43
|
+
:'account_id' => :'String',
|
44
|
+
:'key_digest' => :'String',
|
45
|
+
:'status' => :'String'
|
46
|
+
}
|
47
|
+
end
|
48
|
+
|
49
|
+
# List of attributes with nullable: true
|
50
|
+
def self.openapi_nullable
|
51
|
+
Set.new([
|
52
|
+
])
|
53
|
+
end
|
54
|
+
|
55
|
+
# Initializes the object
|
56
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
57
|
+
def initialize(attributes = {})
|
58
|
+
if (!attributes.is_a?(Hash))
|
59
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::AcmeAccount` initialize method"
|
60
|
+
end
|
61
|
+
|
62
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
63
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
64
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::AcmeAccount`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
66
|
+
end
|
67
|
+
h[k.to_sym] = v
|
68
|
+
}
|
69
|
+
|
70
|
+
if attributes.key?(:'account_id')
|
71
|
+
self.account_id = attributes[:'account_id']
|
72
|
+
end
|
73
|
+
|
74
|
+
if attributes.key?(:'key_digest')
|
75
|
+
self.key_digest = attributes[:'key_digest']
|
76
|
+
end
|
77
|
+
|
78
|
+
if attributes.key?(:'status')
|
79
|
+
self.status = attributes[:'status']
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
84
|
+
# @return Array for valid properties with the reasons
|
85
|
+
def list_invalid_properties
|
86
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
87
|
+
invalid_properties = Array.new
|
88
|
+
invalid_properties
|
89
|
+
end
|
90
|
+
|
91
|
+
# Check to see if the all the properties in the model are valid
|
92
|
+
# @return true if the model is valid
|
93
|
+
def valid?
|
94
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
95
|
+
true
|
96
|
+
end
|
97
|
+
|
98
|
+
# Checks equality by comparing each attribute.
|
99
|
+
# @param [Object] Object to be compared
|
100
|
+
def ==(o)
|
101
|
+
return true if self.equal?(o)
|
102
|
+
self.class == o.class &&
|
103
|
+
account_id == o.account_id &&
|
104
|
+
key_digest == o.key_digest &&
|
105
|
+
status == o.status
|
106
|
+
end
|
107
|
+
|
108
|
+
# @see the `==` method
|
109
|
+
# @param [Object] Object to be compared
|
110
|
+
def eql?(o)
|
111
|
+
self == o
|
112
|
+
end
|
113
|
+
|
114
|
+
# Calculates hash code according to all attributes.
|
115
|
+
# @return [Integer] Hash code
|
116
|
+
def hash
|
117
|
+
[account_id, key_digest, status].hash
|
118
|
+
end
|
119
|
+
|
120
|
+
# Builds the object from hash
|
121
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
122
|
+
# @return [Object] Returns the model itself
|
123
|
+
def self.build_from_hash(attributes)
|
124
|
+
return nil unless attributes.is_a?(Hash)
|
125
|
+
attributes = attributes.transform_keys(&:to_sym)
|
126
|
+
transformed_hash = {}
|
127
|
+
openapi_types.each_pair do |key, type|
|
128
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
129
|
+
transformed_hash["#{key}"] = nil
|
130
|
+
elsif type =~ /\AArray<(.*)>/i
|
131
|
+
# check to ensure the input is an array given that the attribute
|
132
|
+
# is documented as an array but the input is not
|
133
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
134
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
135
|
+
end
|
136
|
+
elsif !attributes[attribute_map[key]].nil?
|
137
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
138
|
+
end
|
139
|
+
end
|
140
|
+
new(transformed_hash)
|
141
|
+
end
|
142
|
+
|
143
|
+
# Deserializes the data based on type
|
144
|
+
# @param string type Data type
|
145
|
+
# @param string value Value to be deserialized
|
146
|
+
# @return [Object] Deserialized data
|
147
|
+
def self._deserialize(type, value)
|
148
|
+
case type.to_sym
|
149
|
+
when :Time
|
150
|
+
Time.parse(value)
|
151
|
+
when :Date
|
152
|
+
Date.parse(value)
|
153
|
+
when :String
|
154
|
+
value.to_s
|
155
|
+
when :Integer
|
156
|
+
value.to_i
|
157
|
+
when :Float
|
158
|
+
value.to_f
|
159
|
+
when :Boolean
|
160
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
161
|
+
true
|
162
|
+
else
|
163
|
+
false
|
164
|
+
end
|
165
|
+
when :Object
|
166
|
+
# generic object (usually a Hash), return directly
|
167
|
+
value
|
168
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
169
|
+
inner_type = Regexp.last_match[:inner_type]
|
170
|
+
value.map { |v| _deserialize(inner_type, v) }
|
171
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
172
|
+
k_type = Regexp.last_match[:k_type]
|
173
|
+
v_type = Regexp.last_match[:v_type]
|
174
|
+
{}.tap do |hash|
|
175
|
+
value.each do |k, v|
|
176
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
177
|
+
end
|
178
|
+
end
|
179
|
+
else # model
|
180
|
+
# models (e.g. Pet) or oneOf
|
181
|
+
klass = Akeyless.const_get(type)
|
182
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
183
|
+
end
|
184
|
+
end
|
185
|
+
|
186
|
+
# Returns the string representation of the object
|
187
|
+
# @return [String] String presentation of the object
|
188
|
+
def to_s
|
189
|
+
to_hash.to_s
|
190
|
+
end
|
191
|
+
|
192
|
+
# to_body is an alias to to_hash (backward compatibility)
|
193
|
+
# @return [Hash] Returns the object in the form of hash
|
194
|
+
def to_body
|
195
|
+
to_hash
|
196
|
+
end
|
197
|
+
|
198
|
+
# Returns the object in the form of hash
|
199
|
+
# @return [Hash] Returns the object in the form of hash
|
200
|
+
def to_hash
|
201
|
+
hash = {}
|
202
|
+
self.class.attribute_map.each_pair do |attr, param|
|
203
|
+
value = self.send(attr)
|
204
|
+
if value.nil?
|
205
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
206
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
207
|
+
end
|
208
|
+
|
209
|
+
hash[param] = _to_hash(value)
|
210
|
+
end
|
211
|
+
hash
|
212
|
+
end
|
213
|
+
|
214
|
+
# Outputs non-array value in the form of hash
|
215
|
+
# For object, use to_hash. Otherwise, just return the value
|
216
|
+
# @param [Object] value Any valid value
|
217
|
+
# @return [Hash] Returns the value in the form of hash
|
218
|
+
def _to_hash(value)
|
219
|
+
if value.is_a?(Array)
|
220
|
+
value.compact.map { |v| _to_hash(v) }
|
221
|
+
elsif value.is_a?(Hash)
|
222
|
+
{}.tap do |hash|
|
223
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
224
|
+
end
|
225
|
+
elsif value.respond_to? :to_hash
|
226
|
+
value.to_hash
|
227
|
+
else
|
228
|
+
value
|
229
|
+
end
|
230
|
+
end
|
231
|
+
|
232
|
+
end
|
233
|
+
|
234
|
+
end
|
@@ -24,6 +24,8 @@ module Akeyless
|
|
24
24
|
|
25
25
|
attr_accessor :is_sub_claims_case_sensitive
|
26
26
|
|
27
|
+
attr_accessor :is_subclaims_with_operator
|
28
|
+
|
27
29
|
attr_accessor :role_name
|
28
30
|
|
29
31
|
attr_accessor :rules
|
@@ -35,6 +37,7 @@ module Akeyless
|
|
35
37
|
:'assoc_id' => :'assoc_id',
|
36
38
|
:'auth_method_sub_claims' => :'auth_method_sub_claims',
|
37
39
|
:'is_sub_claims_case_sensitive' => :'is_sub_claims_case_sensitive',
|
40
|
+
:'is_subclaims_with_operator' => :'is_subclaims_with_operator',
|
38
41
|
:'role_name' => :'role_name',
|
39
42
|
:'rules' => :'rules'
|
40
43
|
}
|
@@ -52,6 +55,7 @@ module Akeyless
|
|
52
55
|
:'assoc_id' => :'String',
|
53
56
|
:'auth_method_sub_claims' => :'Hash<String, Array<String>>',
|
54
57
|
:'is_sub_claims_case_sensitive' => :'Boolean',
|
58
|
+
:'is_subclaims_with_operator' => :'Boolean',
|
55
59
|
:'role_name' => :'String',
|
56
60
|
:'rules' => :'Rules'
|
57
61
|
}
|
@@ -98,6 +102,10 @@ module Akeyless
|
|
98
102
|
self.is_sub_claims_case_sensitive = attributes[:'is_sub_claims_case_sensitive']
|
99
103
|
end
|
100
104
|
|
105
|
+
if attributes.key?(:'is_subclaims_with_operator')
|
106
|
+
self.is_subclaims_with_operator = attributes[:'is_subclaims_with_operator']
|
107
|
+
end
|
108
|
+
|
101
109
|
if attributes.key?(:'role_name')
|
102
110
|
self.role_name = attributes[:'role_name']
|
103
111
|
end
|
@@ -131,6 +139,7 @@ module Akeyless
|
|
131
139
|
assoc_id == o.assoc_id &&
|
132
140
|
auth_method_sub_claims == o.auth_method_sub_claims &&
|
133
141
|
is_sub_claims_case_sensitive == o.is_sub_claims_case_sensitive &&
|
142
|
+
is_subclaims_with_operator == o.is_subclaims_with_operator &&
|
134
143
|
role_name == o.role_name &&
|
135
144
|
rules == o.rules
|
136
145
|
end
|
@@ -144,7 +153,7 @@ module Akeyless
|
|
144
153
|
# Calculates hash code according to all attributes.
|
145
154
|
# @return [Integer] Hash code
|
146
155
|
def hash
|
147
|
-
[allowed_ops, assoc_id, auth_method_sub_claims, is_sub_claims_case_sensitive, role_name, rules].hash
|
156
|
+
[allowed_ops, assoc_id, auth_method_sub_claims, is_sub_claims_case_sensitive, is_subclaims_with_operator, role_name, rules].hash
|
148
157
|
end
|
149
158
|
|
150
159
|
# 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
|
+
Generator version: 7.9.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Akeyless
|
17
|
+
class ChangeAdminAccountPassword
|
18
|
+
# Current password
|
19
|
+
attr_accessor :current_password
|
20
|
+
|
21
|
+
# Set output format to JSON
|
22
|
+
attr_accessor :json
|
23
|
+
|
24
|
+
# New password
|
25
|
+
attr_accessor :new_password
|
26
|
+
|
27
|
+
# Authentication token (see `/auth` and `/configure`)
|
28
|
+
attr_accessor :token
|
29
|
+
|
30
|
+
# The universal identity token, Required only for universal_identity authentication
|
31
|
+
attr_accessor :uid_token
|
32
|
+
|
33
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
34
|
+
def self.attribute_map
|
35
|
+
{
|
36
|
+
:'current_password' => :'current-password',
|
37
|
+
:'json' => :'json',
|
38
|
+
:'new_password' => :'new-password',
|
39
|
+
:'token' => :'token',
|
40
|
+
:'uid_token' => :'uid-token'
|
41
|
+
}
|
42
|
+
end
|
43
|
+
|
44
|
+
# Returns all the JSON keys this model knows about
|
45
|
+
def self.acceptable_attributes
|
46
|
+
attribute_map.values
|
47
|
+
end
|
48
|
+
|
49
|
+
# Attribute type mapping.
|
50
|
+
def self.openapi_types
|
51
|
+
{
|
52
|
+
:'current_password' => :'String',
|
53
|
+
:'json' => :'Boolean',
|
54
|
+
:'new_password' => :'String',
|
55
|
+
:'token' => :'String',
|
56
|
+
:'uid_token' => :'String'
|
57
|
+
}
|
58
|
+
end
|
59
|
+
|
60
|
+
# List of attributes with nullable: true
|
61
|
+
def self.openapi_nullable
|
62
|
+
Set.new([
|
63
|
+
])
|
64
|
+
end
|
65
|
+
|
66
|
+
# Initializes the object
|
67
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
68
|
+
def initialize(attributes = {})
|
69
|
+
if (!attributes.is_a?(Hash))
|
70
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::ChangeAdminAccountPassword` initialize method"
|
71
|
+
end
|
72
|
+
|
73
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
74
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
75
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
76
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::ChangeAdminAccountPassword`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
77
|
+
end
|
78
|
+
h[k.to_sym] = v
|
79
|
+
}
|
80
|
+
|
81
|
+
if attributes.key?(:'current_password')
|
82
|
+
self.current_password = attributes[:'current_password']
|
83
|
+
else
|
84
|
+
self.current_password = nil
|
85
|
+
end
|
86
|
+
|
87
|
+
if attributes.key?(:'json')
|
88
|
+
self.json = attributes[:'json']
|
89
|
+
else
|
90
|
+
self.json = false
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.key?(:'new_password')
|
94
|
+
self.new_password = attributes[:'new_password']
|
95
|
+
else
|
96
|
+
self.new_password = nil
|
97
|
+
end
|
98
|
+
|
99
|
+
if attributes.key?(:'token')
|
100
|
+
self.token = attributes[:'token']
|
101
|
+
end
|
102
|
+
|
103
|
+
if attributes.key?(:'uid_token')
|
104
|
+
self.uid_token = attributes[:'uid_token']
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
109
|
+
# @return Array for valid properties with the reasons
|
110
|
+
def list_invalid_properties
|
111
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
112
|
+
invalid_properties = Array.new
|
113
|
+
if @current_password.nil?
|
114
|
+
invalid_properties.push('invalid value for "current_password", current_password cannot be nil.')
|
115
|
+
end
|
116
|
+
|
117
|
+
if @new_password.nil?
|
118
|
+
invalid_properties.push('invalid value for "new_password", new_password cannot be nil.')
|
119
|
+
end
|
120
|
+
|
121
|
+
invalid_properties
|
122
|
+
end
|
123
|
+
|
124
|
+
# Check to see if the all the properties in the model are valid
|
125
|
+
# @return true if the model is valid
|
126
|
+
def valid?
|
127
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
128
|
+
return false if @current_password.nil?
|
129
|
+
return false if @new_password.nil?
|
130
|
+
true
|
131
|
+
end
|
132
|
+
|
133
|
+
# Checks equality by comparing each attribute.
|
134
|
+
# @param [Object] Object to be compared
|
135
|
+
def ==(o)
|
136
|
+
return true if self.equal?(o)
|
137
|
+
self.class == o.class &&
|
138
|
+
current_password == o.current_password &&
|
139
|
+
json == o.json &&
|
140
|
+
new_password == o.new_password &&
|
141
|
+
token == o.token &&
|
142
|
+
uid_token == o.uid_token
|
143
|
+
end
|
144
|
+
|
145
|
+
# @see the `==` method
|
146
|
+
# @param [Object] Object to be compared
|
147
|
+
def eql?(o)
|
148
|
+
self == o
|
149
|
+
end
|
150
|
+
|
151
|
+
# Calculates hash code according to all attributes.
|
152
|
+
# @return [Integer] Hash code
|
153
|
+
def hash
|
154
|
+
[current_password, json, new_password, token, uid_token].hash
|
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 self.build_from_hash(attributes)
|
161
|
+
return nil unless attributes.is_a?(Hash)
|
162
|
+
attributes = attributes.transform_keys(&:to_sym)
|
163
|
+
transformed_hash = {}
|
164
|
+
openapi_types.each_pair do |key, type|
|
165
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
166
|
+
transformed_hash["#{key}"] = nil
|
167
|
+
elsif type =~ /\AArray<(.*)>/i
|
168
|
+
# check to ensure the input is an array given that the attribute
|
169
|
+
# is documented as an array but the input is not
|
170
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
171
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
172
|
+
end
|
173
|
+
elsif !attributes[attribute_map[key]].nil?
|
174
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
175
|
+
end
|
176
|
+
end
|
177
|
+
new(transformed_hash)
|
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 self._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_any_of) || 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
|
@@ -51,6 +51,9 @@ module Akeyless
|
|
51
51
|
# Set this to allow the cert issuer will expose a public CRL endpoint
|
52
52
|
attr_accessor :create_public_crl
|
53
53
|
|
54
|
+
# Mark key usage as critical [true/false]
|
55
|
+
attr_accessor :critical_key_usage
|
56
|
+
|
54
57
|
# Protection from accidental deletion of this object [true/false]
|
55
58
|
attr_accessor :delete_protection
|
56
59
|
|
@@ -60,10 +63,13 @@ module Akeyless
|
|
60
63
|
# A path in which to save generated certificates
|
61
64
|
attr_accessor :destination_path
|
62
65
|
|
66
|
+
# If set, the cert issuer will support the acme protocol
|
67
|
+
attr_accessor :enable_acme
|
68
|
+
|
63
69
|
# How many days before the expiration of the certificate would you like to be notified.
|
64
70
|
attr_accessor :expiration_event_in
|
65
71
|
|
66
|
-
# The GW cluster URL to issue the certificate from
|
72
|
+
# The GW cluster URL to issue the certificate from. Required in Public CA mode, to allow CRLs on private CA, or to enable ACME
|
67
73
|
attr_accessor :gw_cluster_url
|
68
74
|
|
69
75
|
# If set, the basic constraints extension will be added to certificate
|
@@ -141,9 +147,11 @@ module Akeyless
|
|
141
147
|
:'country' => :'country',
|
142
148
|
:'create_private_crl' => :'create-private-crl',
|
143
149
|
:'create_public_crl' => :'create-public-crl',
|
150
|
+
:'critical_key_usage' => :'critical-key-usage',
|
144
151
|
:'delete_protection' => :'delete_protection',
|
145
152
|
:'description' => :'description',
|
146
153
|
:'destination_path' => :'destination-path',
|
154
|
+
:'enable_acme' => :'enable-acme',
|
147
155
|
:'expiration_event_in' => :'expiration-event-in',
|
148
156
|
:'gw_cluster_url' => :'gw-cluster-url',
|
149
157
|
:'is_ca' => :'is-ca',
|
@@ -189,9 +197,11 @@ module Akeyless
|
|
189
197
|
:'country' => :'String',
|
190
198
|
:'create_private_crl' => :'Boolean',
|
191
199
|
:'create_public_crl' => :'Boolean',
|
200
|
+
:'critical_key_usage' => :'String',
|
192
201
|
:'delete_protection' => :'String',
|
193
202
|
:'description' => :'String',
|
194
203
|
:'destination_path' => :'String',
|
204
|
+
:'enable_acme' => :'Boolean',
|
195
205
|
:'expiration_event_in' => :'Array<String>',
|
196
206
|
:'gw_cluster_url' => :'String',
|
197
207
|
:'is_ca' => :'Boolean',
|
@@ -286,6 +296,12 @@ module Akeyless
|
|
286
296
|
self.create_public_crl = attributes[:'create_public_crl']
|
287
297
|
end
|
288
298
|
|
299
|
+
if attributes.key?(:'critical_key_usage')
|
300
|
+
self.critical_key_usage = attributes[:'critical_key_usage']
|
301
|
+
else
|
302
|
+
self.critical_key_usage = 'true'
|
303
|
+
end
|
304
|
+
|
289
305
|
if attributes.key?(:'delete_protection')
|
290
306
|
self.delete_protection = attributes[:'delete_protection']
|
291
307
|
end
|
@@ -298,6 +314,10 @@ module Akeyless
|
|
298
314
|
self.destination_path = attributes[:'destination_path']
|
299
315
|
end
|
300
316
|
|
317
|
+
if attributes.key?(:'enable_acme')
|
318
|
+
self.enable_acme = attributes[:'enable_acme']
|
319
|
+
end
|
320
|
+
|
301
321
|
if attributes.key?(:'expiration_event_in')
|
302
322
|
if (value = attributes[:'expiration_event_in']).is_a?(Array)
|
303
323
|
self.expiration_event_in = value
|
@@ -448,9 +468,11 @@ module Akeyless
|
|
448
468
|
country == o.country &&
|
449
469
|
create_private_crl == o.create_private_crl &&
|
450
470
|
create_public_crl == o.create_public_crl &&
|
471
|
+
critical_key_usage == o.critical_key_usage &&
|
451
472
|
delete_protection == o.delete_protection &&
|
452
473
|
description == o.description &&
|
453
474
|
destination_path == o.destination_path &&
|
475
|
+
enable_acme == o.enable_acme &&
|
454
476
|
expiration_event_in == o.expiration_event_in &&
|
455
477
|
gw_cluster_url == o.gw_cluster_url &&
|
456
478
|
is_ca == o.is_ca &&
|
@@ -484,7 +506,7 @@ module Akeyless
|
|
484
506
|
# Calculates hash code according to all attributes.
|
485
507
|
# @return [Integer] Hash code
|
486
508
|
def hash
|
487
|
-
[allow_any_name, allow_copy_ext_from_csr, allow_subdomains, allowed_domains, allowed_extra_extensions, allowed_uri_sans, ca_target, client_flag, code_signing_flag, country, create_private_crl, create_public_crl, delete_protection, description, destination_path, expiration_event_in, gw_cluster_url, is_ca, json, key_usage, locality, metadata, name, not_enforce_hostnames, not_require_cn, organizational_units, organizations, postal_code, protect_certificates, province, server_flag, signer_key_name, street_address, tag, token, ttl, uid_token].hash
|
509
|
+
[allow_any_name, allow_copy_ext_from_csr, allow_subdomains, allowed_domains, allowed_extra_extensions, allowed_uri_sans, ca_target, client_flag, code_signing_flag, country, create_private_crl, create_public_crl, critical_key_usage, delete_protection, description, destination_path, enable_acme, expiration_event_in, gw_cluster_url, is_ca, json, key_usage, locality, metadata, name, not_enforce_hostnames, not_require_cn, organizational_units, organizations, postal_code, protect_certificates, province, server_flag, signer_key_name, street_address, tag, token, ttl, uid_token].hash
|
488
510
|
end
|
489
511
|
|
490
512
|
# Builds the object from hash
|