akeyless 3.3.11 → 3.3.13
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/AccessPermissionAssignment.md +20 -0
- data/docs/AuthMethodRoleAssociation.md +2 -0
- data/docs/CreateAuthMethodEmail.md +36 -0
- data/docs/CreateAuthMethodEmailOutput.md +18 -0
- data/docs/CreatePKICertIssuer.md +2 -0
- data/docs/EsmDeleteSecretOutput.md +18 -0
- data/docs/EsmGetSecretOutput.md +2 -0
- data/docs/EsmUpdateSecretOutput.md +2 -0
- data/docs/GoogleChronicleForwardingConfig.md +24 -0
- data/docs/ItemGeneralInfo.md +2 -0
- data/docs/LogForwardingConfigPart.md +2 -0
- data/docs/OidcClientInfo.md +34 -0
- data/docs/UpdatePKICertIssuer.md +2 -0
- data/docs/V2Api.md +319 -4
- data/lib/akeyless/api/v2_api.rb +323 -3
- data/lib/akeyless/models/access_permission_assignment.rb +230 -0
- data/lib/akeyless/models/auth_method_role_association.rb +10 -1
- data/lib/akeyless/models/create_auth_method_email.rb +331 -0
- data/lib/akeyless/models/create_auth_method_email_output.rb +219 -0
- data/lib/akeyless/models/create_pki_cert_issuer.rb +11 -1
- data/lib/akeyless/models/esm_delete_secret_output.rb +219 -0
- data/lib/akeyless/models/esm_get_secret_output.rb +10 -1
- data/lib/akeyless/models/esm_update_secret_output.rb +10 -1
- data/lib/akeyless/models/google_chronicle_forwarding_config.rb +246 -0
- data/lib/akeyless/models/item_general_info.rb +10 -1
- data/lib/akeyless/models/log_forwarding_config_part.rb +10 -1
- data/lib/akeyless/models/oidc_client_info.rb +305 -0
- data/lib/akeyless/models/update_pki_cert_issuer.rb +11 -1
- data/lib/akeyless/version.rb +1 -1
- data/lib/akeyless.rb +6 -0
- data/spec/models/access_permission_assignment_spec.rb +40 -0
- data/spec/models/create_auth_method_email_output_spec.rb +34 -0
- data/spec/models/create_auth_method_email_spec.rb +88 -0
- data/spec/models/esm_delete_secret_output_spec.rb +34 -0
- data/spec/models/google_chronicle_forwarding_config_spec.rb +52 -0
- data/spec/models/oidc_client_info_spec.rb +82 -0
- metadata +649 -625
@@ -0,0 +1,331 @@
|
|
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.0.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Akeyless
|
17
|
+
# createAuthMethodEmail is a command that creates a new auth method that will be able to authenticate using email.
|
18
|
+
class CreateAuthMethodEmail
|
19
|
+
# Access expiration date in Unix timestamp (select 0 for access without expiry date)
|
20
|
+
attr_accessor :access_expires
|
21
|
+
|
22
|
+
# A CIDR whitelist with the IPs that the access is restricted to
|
23
|
+
attr_accessor :bound_ips
|
24
|
+
|
25
|
+
# An email address to be invited to have access
|
26
|
+
attr_accessor :email
|
27
|
+
|
28
|
+
# if true: enforce role-association must include sub claims
|
29
|
+
attr_accessor :force_sub_claims
|
30
|
+
|
31
|
+
# A CIDR whitelist with the GW IPs that the access is restricted to
|
32
|
+
attr_accessor :gw_bound_ips
|
33
|
+
|
34
|
+
# Set output format to JSON
|
35
|
+
attr_accessor :json
|
36
|
+
|
37
|
+
# Jwt TTL
|
38
|
+
attr_accessor :jwt_ttl
|
39
|
+
|
40
|
+
# Auth Method name
|
41
|
+
attr_accessor :name
|
42
|
+
|
43
|
+
# Authentication token (see `/auth` and `/configure`)
|
44
|
+
attr_accessor :token
|
45
|
+
|
46
|
+
# The universal identity token, Required only for universal_identity authentication
|
47
|
+
attr_accessor :uid_token
|
48
|
+
|
49
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
50
|
+
def self.attribute_map
|
51
|
+
{
|
52
|
+
:'access_expires' => :'access-expires',
|
53
|
+
:'bound_ips' => :'bound-ips',
|
54
|
+
:'email' => :'email',
|
55
|
+
:'force_sub_claims' => :'force-sub-claims',
|
56
|
+
:'gw_bound_ips' => :'gw-bound-ips',
|
57
|
+
:'json' => :'json',
|
58
|
+
:'jwt_ttl' => :'jwt-ttl',
|
59
|
+
:'name' => :'name',
|
60
|
+
:'token' => :'token',
|
61
|
+
:'uid_token' => :'uid-token'
|
62
|
+
}
|
63
|
+
end
|
64
|
+
|
65
|
+
# Returns all the JSON keys this model knows about
|
66
|
+
def self.acceptable_attributes
|
67
|
+
attribute_map.values
|
68
|
+
end
|
69
|
+
|
70
|
+
# Attribute type mapping.
|
71
|
+
def self.openapi_types
|
72
|
+
{
|
73
|
+
:'access_expires' => :'Integer',
|
74
|
+
:'bound_ips' => :'Array<String>',
|
75
|
+
:'email' => :'String',
|
76
|
+
:'force_sub_claims' => :'Boolean',
|
77
|
+
:'gw_bound_ips' => :'Array<String>',
|
78
|
+
:'json' => :'Boolean',
|
79
|
+
:'jwt_ttl' => :'Integer',
|
80
|
+
:'name' => :'String',
|
81
|
+
:'token' => :'String',
|
82
|
+
:'uid_token' => :'String'
|
83
|
+
}
|
84
|
+
end
|
85
|
+
|
86
|
+
# List of attributes with nullable: true
|
87
|
+
def self.openapi_nullable
|
88
|
+
Set.new([
|
89
|
+
])
|
90
|
+
end
|
91
|
+
|
92
|
+
# Initializes the object
|
93
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
94
|
+
def initialize(attributes = {})
|
95
|
+
if (!attributes.is_a?(Hash))
|
96
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::CreateAuthMethodEmail` initialize method"
|
97
|
+
end
|
98
|
+
|
99
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
100
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
101
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
102
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::CreateAuthMethodEmail`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
103
|
+
end
|
104
|
+
h[k.to_sym] = v
|
105
|
+
}
|
106
|
+
|
107
|
+
if attributes.key?(:'access_expires')
|
108
|
+
self.access_expires = attributes[:'access_expires']
|
109
|
+
else
|
110
|
+
self.access_expires = 0
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.key?(:'bound_ips')
|
114
|
+
if (value = attributes[:'bound_ips']).is_a?(Array)
|
115
|
+
self.bound_ips = value
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
if attributes.key?(:'email')
|
120
|
+
self.email = attributes[:'email']
|
121
|
+
end
|
122
|
+
|
123
|
+
if attributes.key?(:'force_sub_claims')
|
124
|
+
self.force_sub_claims = attributes[:'force_sub_claims']
|
125
|
+
end
|
126
|
+
|
127
|
+
if attributes.key?(:'gw_bound_ips')
|
128
|
+
if (value = attributes[:'gw_bound_ips']).is_a?(Array)
|
129
|
+
self.gw_bound_ips = value
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
if attributes.key?(:'json')
|
134
|
+
self.json = attributes[:'json']
|
135
|
+
else
|
136
|
+
self.json = false
|
137
|
+
end
|
138
|
+
|
139
|
+
if attributes.key?(:'jwt_ttl')
|
140
|
+
self.jwt_ttl = attributes[:'jwt_ttl']
|
141
|
+
else
|
142
|
+
self.jwt_ttl = 0
|
143
|
+
end
|
144
|
+
|
145
|
+
if attributes.key?(:'name')
|
146
|
+
self.name = attributes[:'name']
|
147
|
+
end
|
148
|
+
|
149
|
+
if attributes.key?(:'token')
|
150
|
+
self.token = attributes[:'token']
|
151
|
+
end
|
152
|
+
|
153
|
+
if attributes.key?(:'uid_token')
|
154
|
+
self.uid_token = attributes[:'uid_token']
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
159
|
+
# @return Array for valid properties with the reasons
|
160
|
+
def list_invalid_properties
|
161
|
+
invalid_properties = Array.new
|
162
|
+
if @email.nil?
|
163
|
+
invalid_properties.push('invalid value for "email", email cannot be nil.')
|
164
|
+
end
|
165
|
+
|
166
|
+
if @name.nil?
|
167
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
168
|
+
end
|
169
|
+
|
170
|
+
invalid_properties
|
171
|
+
end
|
172
|
+
|
173
|
+
# Check to see if the all the properties in the model are valid
|
174
|
+
# @return true if the model is valid
|
175
|
+
def valid?
|
176
|
+
return false if @email.nil?
|
177
|
+
return false if @name.nil?
|
178
|
+
true
|
179
|
+
end
|
180
|
+
|
181
|
+
# Checks equality by comparing each attribute.
|
182
|
+
# @param [Object] Object to be compared
|
183
|
+
def ==(o)
|
184
|
+
return true if self.equal?(o)
|
185
|
+
self.class == o.class &&
|
186
|
+
access_expires == o.access_expires &&
|
187
|
+
bound_ips == o.bound_ips &&
|
188
|
+
email == o.email &&
|
189
|
+
force_sub_claims == o.force_sub_claims &&
|
190
|
+
gw_bound_ips == o.gw_bound_ips &&
|
191
|
+
json == o.json &&
|
192
|
+
jwt_ttl == o.jwt_ttl &&
|
193
|
+
name == o.name &&
|
194
|
+
token == o.token &&
|
195
|
+
uid_token == o.uid_token
|
196
|
+
end
|
197
|
+
|
198
|
+
# @see the `==` method
|
199
|
+
# @param [Object] Object to be compared
|
200
|
+
def eql?(o)
|
201
|
+
self == o
|
202
|
+
end
|
203
|
+
|
204
|
+
# Calculates hash code according to all attributes.
|
205
|
+
# @return [Integer] Hash code
|
206
|
+
def hash
|
207
|
+
[access_expires, bound_ips, email, force_sub_claims, gw_bound_ips, json, jwt_ttl, name, token, uid_token].hash
|
208
|
+
end
|
209
|
+
|
210
|
+
# Builds the object from hash
|
211
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
212
|
+
# @return [Object] Returns the model itself
|
213
|
+
def self.build_from_hash(attributes)
|
214
|
+
new.build_from_hash(attributes)
|
215
|
+
end
|
216
|
+
|
217
|
+
# Builds the object from hash
|
218
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
219
|
+
# @return [Object] Returns the model itself
|
220
|
+
def build_from_hash(attributes)
|
221
|
+
return nil unless attributes.is_a?(Hash)
|
222
|
+
attributes = attributes.transform_keys(&:to_sym)
|
223
|
+
self.class.openapi_types.each_pair do |key, type|
|
224
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
225
|
+
self.send("#{key}=", nil)
|
226
|
+
elsif type =~ /\AArray<(.*)>/i
|
227
|
+
# check to ensure the input is an array given that the attribute
|
228
|
+
# is documented as an array but the input is not
|
229
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
230
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
231
|
+
end
|
232
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
233
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
234
|
+
end
|
235
|
+
end
|
236
|
+
|
237
|
+
self
|
238
|
+
end
|
239
|
+
|
240
|
+
# Deserializes the data based on type
|
241
|
+
# @param string type Data type
|
242
|
+
# @param string value Value to be deserialized
|
243
|
+
# @return [Object] Deserialized data
|
244
|
+
def _deserialize(type, value)
|
245
|
+
case type.to_sym
|
246
|
+
when :Time
|
247
|
+
Time.parse(value)
|
248
|
+
when :Date
|
249
|
+
Date.parse(value)
|
250
|
+
when :String
|
251
|
+
value.to_s
|
252
|
+
when :Integer
|
253
|
+
value.to_i
|
254
|
+
when :Float
|
255
|
+
value.to_f
|
256
|
+
when :Boolean
|
257
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
258
|
+
true
|
259
|
+
else
|
260
|
+
false
|
261
|
+
end
|
262
|
+
when :Object
|
263
|
+
# generic object (usually a Hash), return directly
|
264
|
+
value
|
265
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
266
|
+
inner_type = Regexp.last_match[:inner_type]
|
267
|
+
value.map { |v| _deserialize(inner_type, v) }
|
268
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
269
|
+
k_type = Regexp.last_match[:k_type]
|
270
|
+
v_type = Regexp.last_match[:v_type]
|
271
|
+
{}.tap do |hash|
|
272
|
+
value.each do |k, v|
|
273
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
274
|
+
end
|
275
|
+
end
|
276
|
+
else # model
|
277
|
+
# models (e.g. Pet) or oneOf
|
278
|
+
klass = Akeyless.const_get(type)
|
279
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
280
|
+
end
|
281
|
+
end
|
282
|
+
|
283
|
+
# Returns the string representation of the object
|
284
|
+
# @return [String] String presentation of the object
|
285
|
+
def to_s
|
286
|
+
to_hash.to_s
|
287
|
+
end
|
288
|
+
|
289
|
+
# to_body is an alias to to_hash (backward compatibility)
|
290
|
+
# @return [Hash] Returns the object in the form of hash
|
291
|
+
def to_body
|
292
|
+
to_hash
|
293
|
+
end
|
294
|
+
|
295
|
+
# Returns the object in the form of hash
|
296
|
+
# @return [Hash] Returns the object in the form of hash
|
297
|
+
def to_hash
|
298
|
+
hash = {}
|
299
|
+
self.class.attribute_map.each_pair do |attr, param|
|
300
|
+
value = self.send(attr)
|
301
|
+
if value.nil?
|
302
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
303
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
304
|
+
end
|
305
|
+
|
306
|
+
hash[param] = _to_hash(value)
|
307
|
+
end
|
308
|
+
hash
|
309
|
+
end
|
310
|
+
|
311
|
+
# Outputs non-array value in the form of hash
|
312
|
+
# For object, use to_hash. Otherwise, just return the value
|
313
|
+
# @param [Object] value Any valid value
|
314
|
+
# @return [Hash] Returns the value in the form of hash
|
315
|
+
def _to_hash(value)
|
316
|
+
if value.is_a?(Array)
|
317
|
+
value.compact.map { |v| _to_hash(v) }
|
318
|
+
elsif value.is_a?(Hash)
|
319
|
+
{}.tap do |hash|
|
320
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
321
|
+
end
|
322
|
+
elsif value.respond_to? :to_hash
|
323
|
+
value.to_hash
|
324
|
+
else
|
325
|
+
value
|
326
|
+
end
|
327
|
+
end
|
328
|
+
|
329
|
+
end
|
330
|
+
|
331
|
+
end
|
@@ -0,0 +1,219 @@
|
|
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.0.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Akeyless
|
17
|
+
class CreateAuthMethodEmailOutput
|
18
|
+
attr_accessor :access_id
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'access_id' => :'access_id'
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
# Returns all the JSON keys this model knows about
|
28
|
+
def self.acceptable_attributes
|
29
|
+
attribute_map.values
|
30
|
+
end
|
31
|
+
|
32
|
+
# Attribute type mapping.
|
33
|
+
def self.openapi_types
|
34
|
+
{
|
35
|
+
:'access_id' => :'String'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# List of attributes with nullable: true
|
40
|
+
def self.openapi_nullable
|
41
|
+
Set.new([
|
42
|
+
])
|
43
|
+
end
|
44
|
+
|
45
|
+
# Initializes the object
|
46
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
47
|
+
def initialize(attributes = {})
|
48
|
+
if (!attributes.is_a?(Hash))
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::CreateAuthMethodEmailOutput` initialize method"
|
50
|
+
end
|
51
|
+
|
52
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
53
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
54
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
55
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::CreateAuthMethodEmailOutput`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
56
|
+
end
|
57
|
+
h[k.to_sym] = v
|
58
|
+
}
|
59
|
+
|
60
|
+
if attributes.key?(:'access_id')
|
61
|
+
self.access_id = attributes[:'access_id']
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
66
|
+
# @return Array for valid properties with the reasons
|
67
|
+
def list_invalid_properties
|
68
|
+
invalid_properties = Array.new
|
69
|
+
invalid_properties
|
70
|
+
end
|
71
|
+
|
72
|
+
# Check to see if the all the properties in the model are valid
|
73
|
+
# @return true if the model is valid
|
74
|
+
def valid?
|
75
|
+
true
|
76
|
+
end
|
77
|
+
|
78
|
+
# Checks equality by comparing each attribute.
|
79
|
+
# @param [Object] Object to be compared
|
80
|
+
def ==(o)
|
81
|
+
return true if self.equal?(o)
|
82
|
+
self.class == o.class &&
|
83
|
+
access_id == o.access_id
|
84
|
+
end
|
85
|
+
|
86
|
+
# @see the `==` method
|
87
|
+
# @param [Object] Object to be compared
|
88
|
+
def eql?(o)
|
89
|
+
self == o
|
90
|
+
end
|
91
|
+
|
92
|
+
# Calculates hash code according to all attributes.
|
93
|
+
# @return [Integer] Hash code
|
94
|
+
def hash
|
95
|
+
[access_id].hash
|
96
|
+
end
|
97
|
+
|
98
|
+
# Builds the object from hash
|
99
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
100
|
+
# @return [Object] Returns the model itself
|
101
|
+
def self.build_from_hash(attributes)
|
102
|
+
new.build_from_hash(attributes)
|
103
|
+
end
|
104
|
+
|
105
|
+
# Builds the object from hash
|
106
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
107
|
+
# @return [Object] Returns the model itself
|
108
|
+
def build_from_hash(attributes)
|
109
|
+
return nil unless attributes.is_a?(Hash)
|
110
|
+
attributes = attributes.transform_keys(&:to_sym)
|
111
|
+
self.class.openapi_types.each_pair do |key, type|
|
112
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
113
|
+
self.send("#{key}=", nil)
|
114
|
+
elsif type =~ /\AArray<(.*)>/i
|
115
|
+
# check to ensure the input is an array given that the attribute
|
116
|
+
# is documented as an array but the input is not
|
117
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
118
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
119
|
+
end
|
120
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
121
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
self
|
126
|
+
end
|
127
|
+
|
128
|
+
# Deserializes the data based on type
|
129
|
+
# @param string type Data type
|
130
|
+
# @param string value Value to be deserialized
|
131
|
+
# @return [Object] Deserialized data
|
132
|
+
def _deserialize(type, value)
|
133
|
+
case type.to_sym
|
134
|
+
when :Time
|
135
|
+
Time.parse(value)
|
136
|
+
when :Date
|
137
|
+
Date.parse(value)
|
138
|
+
when :String
|
139
|
+
value.to_s
|
140
|
+
when :Integer
|
141
|
+
value.to_i
|
142
|
+
when :Float
|
143
|
+
value.to_f
|
144
|
+
when :Boolean
|
145
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
146
|
+
true
|
147
|
+
else
|
148
|
+
false
|
149
|
+
end
|
150
|
+
when :Object
|
151
|
+
# generic object (usually a Hash), return directly
|
152
|
+
value
|
153
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
154
|
+
inner_type = Regexp.last_match[:inner_type]
|
155
|
+
value.map { |v| _deserialize(inner_type, v) }
|
156
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
157
|
+
k_type = Regexp.last_match[:k_type]
|
158
|
+
v_type = Regexp.last_match[:v_type]
|
159
|
+
{}.tap do |hash|
|
160
|
+
value.each do |k, v|
|
161
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
162
|
+
end
|
163
|
+
end
|
164
|
+
else # model
|
165
|
+
# models (e.g. Pet) or oneOf
|
166
|
+
klass = Akeyless.const_get(type)
|
167
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
171
|
+
# Returns the string representation of the object
|
172
|
+
# @return [String] String presentation of the object
|
173
|
+
def to_s
|
174
|
+
to_hash.to_s
|
175
|
+
end
|
176
|
+
|
177
|
+
# to_body is an alias to to_hash (backward compatibility)
|
178
|
+
# @return [Hash] Returns the object in the form of hash
|
179
|
+
def to_body
|
180
|
+
to_hash
|
181
|
+
end
|
182
|
+
|
183
|
+
# Returns the object in the form of hash
|
184
|
+
# @return [Hash] Returns the object in the form of hash
|
185
|
+
def to_hash
|
186
|
+
hash = {}
|
187
|
+
self.class.attribute_map.each_pair do |attr, param|
|
188
|
+
value = self.send(attr)
|
189
|
+
if value.nil?
|
190
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
191
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
192
|
+
end
|
193
|
+
|
194
|
+
hash[param] = _to_hash(value)
|
195
|
+
end
|
196
|
+
hash
|
197
|
+
end
|
198
|
+
|
199
|
+
# Outputs non-array value in the form of hash
|
200
|
+
# For object, use to_hash. Otherwise, just return the value
|
201
|
+
# @param [Object] value Any valid value
|
202
|
+
# @return [Hash] Returns the value in the form of hash
|
203
|
+
def _to_hash(value)
|
204
|
+
if value.is_a?(Array)
|
205
|
+
value.compact.map { |v| _to_hash(v) }
|
206
|
+
elsif value.is_a?(Hash)
|
207
|
+
{}.tap do |hash|
|
208
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
209
|
+
end
|
210
|
+
elsif value.respond_to? :to_hash
|
211
|
+
value.to_hash
|
212
|
+
else
|
213
|
+
value
|
214
|
+
end
|
215
|
+
end
|
216
|
+
|
217
|
+
end
|
218
|
+
|
219
|
+
end
|
@@ -54,6 +54,9 @@ module Akeyless
|
|
54
54
|
# The GW cluster URL to issue the certificate from, required in Public CA mode
|
55
55
|
attr_accessor :gw_cluster_url
|
56
56
|
|
57
|
+
# If set, the basic constraints extension will be added to certificate
|
58
|
+
attr_accessor :is_ca
|
59
|
+
|
57
60
|
# Set output format to JSON
|
58
61
|
attr_accessor :json
|
59
62
|
|
@@ -127,6 +130,7 @@ module Akeyless
|
|
127
130
|
:'destination_path' => :'destination-path',
|
128
131
|
:'expiration_event_in' => :'expiration-event-in',
|
129
132
|
:'gw_cluster_url' => :'gw-cluster-url',
|
133
|
+
:'is_ca' => :'is-ca',
|
130
134
|
:'json' => :'json',
|
131
135
|
:'key_usage' => :'key-usage',
|
132
136
|
:'locality' => :'locality',
|
@@ -170,6 +174,7 @@ module Akeyless
|
|
170
174
|
:'destination_path' => :'String',
|
171
175
|
:'expiration_event_in' => :'Array<String>',
|
172
176
|
:'gw_cluster_url' => :'String',
|
177
|
+
:'is_ca' => :'Boolean',
|
173
178
|
:'json' => :'Boolean',
|
174
179
|
:'key_usage' => :'String',
|
175
180
|
:'locality' => :'String',
|
@@ -267,6 +272,10 @@ module Akeyless
|
|
267
272
|
self.gw_cluster_url = attributes[:'gw_cluster_url']
|
268
273
|
end
|
269
274
|
|
275
|
+
if attributes.key?(:'is_ca')
|
276
|
+
self.is_ca = attributes[:'is_ca']
|
277
|
+
end
|
278
|
+
|
270
279
|
if attributes.key?(:'json')
|
271
280
|
self.json = attributes[:'json']
|
272
281
|
else
|
@@ -398,6 +407,7 @@ module Akeyless
|
|
398
407
|
destination_path == o.destination_path &&
|
399
408
|
expiration_event_in == o.expiration_event_in &&
|
400
409
|
gw_cluster_url == o.gw_cluster_url &&
|
410
|
+
is_ca == o.is_ca &&
|
401
411
|
json == o.json &&
|
402
412
|
key_usage == o.key_usage &&
|
403
413
|
locality == o.locality &&
|
@@ -428,7 +438,7 @@ module Akeyless
|
|
428
438
|
# Calculates hash code according to all attributes.
|
429
439
|
# @return [Integer] Hash code
|
430
440
|
def hash
|
431
|
-
[allow_any_name, allow_subdomains, allowed_domains, allowed_uri_sans, ca_target, client_flag, code_signing_flag, country, delete_protection, description, destination_path, expiration_event_in, gw_cluster_url, 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
|
441
|
+
[allow_any_name, allow_subdomains, allowed_domains, allowed_uri_sans, ca_target, client_flag, code_signing_flag, country, 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
|
432
442
|
end
|
433
443
|
|
434
444
|
# Builds the object from hash
|