akeyless 2.15.32 → 2.16.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -1
- data/docs/Auth.md +5 -1
- data/docs/AuthMethodAccessInfo.md +2 -0
- data/docs/CertAccessRules.md +34 -0
- data/docs/CreateAuthMethodCert.md +48 -0
- data/docs/CreateAuthMethodCertOutput.md +18 -0
- data/docs/CreateAuthMethodLDAP.md +3 -1
- data/docs/CreateAuthMethodOIDC.md +4 -0
- data/docs/CreateClassicKey.md +5 -1
- data/docs/GatewayCreateProducerCustom.md +4 -0
- data/docs/GatewayCreateProducerOracleDb.md +8 -0
- data/docs/GatewayMessageQueueInfo.md +1 -3
- data/docs/GatewayUpdateProducerCustom.md +4 -0
- data/docs/GatewayUpdateProducerOracleDb.md +8 -0
- data/docs/KMIPClient.md +2 -0
- data/docs/KMIPServer.md +4 -0
- data/docs/KmipDeleteServer.md +20 -0
- data/docs/KmipDescribeServerOutput.md +4 -0
- data/docs/KmipMoveServer.md +22 -0
- data/docs/KmipMoveServerOutput.md +20 -0
- data/docs/ListAuthMethods.md +3 -1
- data/docs/ListRoles.md +2 -0
- data/docs/ListTargets.md +2 -0
- data/docs/OIDCAccessRules.md +4 -0
- data/docs/UpdateAuthMethodCert.md +50 -0
- data/docs/UpdateAuthMethodCertOutput.md +18 -0
- data/docs/UpdateAuthMethodLDAP.md +3 -1
- data/docs/UpdateAuthMethodOIDC.md +4 -0
- data/docs/UpdateOutput.md +2 -0
- data/docs/V2Api.md +256 -0
- data/lib/akeyless/api/v2_api.rb +248 -0
- data/lib/akeyless/api_client.rb +3 -1
- data/lib/akeyless/models/auth.rb +22 -2
- data/lib/akeyless/models/auth_method_access_info.rb +10 -1
- data/lib/akeyless/models/cert_access_rules.rb +316 -0
- data/lib/akeyless/models/create_auth_method_cert.rb +401 -0
- data/lib/akeyless/models/create_auth_method_cert_output.rb +219 -0
- data/lib/akeyless/models/create_auth_method_ldap.rb +14 -4
- data/lib/akeyless/models/create_auth_method_oidc.rb +23 -1
- data/lib/akeyless/models/create_classic_key.rb +26 -4
- data/lib/akeyless/models/gateway_create_producer_custom.rb +23 -1
- data/lib/akeyless/models/gateway_create_producer_oracle_db.rb +39 -1
- data/lib/akeyless/models/gateway_message_queue_info.rb +4 -13
- data/lib/akeyless/models/gateway_update_producer_custom.rb +23 -1
- data/lib/akeyless/models/gateway_update_producer_oracle_db.rb +39 -1
- data/lib/akeyless/models/kmip_client.rb +10 -1
- data/lib/akeyless/models/kmip_delete_server.rb +231 -0
- data/lib/akeyless/models/kmip_describe_server_output.rb +19 -1
- data/lib/akeyless/models/kmip_move_server.rb +240 -0
- data/lib/akeyless/models/kmip_move_server_output.rb +228 -0
- data/lib/akeyless/models/kmip_server.rb +19 -1
- data/lib/akeyless/models/list_auth_methods.rb +12 -2
- data/lib/akeyless/models/list_roles.rb +11 -1
- data/lib/akeyless/models/list_targets.rb +11 -1
- data/lib/akeyless/models/oidc_access_rules.rb +23 -1
- data/lib/akeyless/models/update_auth_method_cert.rb +411 -0
- data/lib/akeyless/models/update_auth_method_cert_output.rb +219 -0
- data/lib/akeyless/models/update_auth_method_ldap.rb +14 -4
- data/lib/akeyless/models/update_auth_method_oidc.rb +23 -1
- data/lib/akeyless/models/update_output.rb +10 -1
- data/lib/akeyless/version.rb +1 -1
- data/lib/akeyless.rb +8 -0
- data/spec/models/cert_access_rules_spec.rb +82 -0
- data/spec/models/create_auth_method_cert_output_spec.rb +34 -0
- data/spec/models/create_auth_method_cert_spec.rb +124 -0
- data/spec/models/kmip_delete_server_spec.rb +40 -0
- data/spec/models/kmip_move_server_output_spec.rb +40 -0
- data/spec/models/kmip_move_server_spec.rb +46 -0
- data/spec/models/update_auth_method_cert_output_spec.rb +34 -0
- data/spec/models/update_auth_method_cert_spec.rb +130 -0
- metadata +34 -2
@@ -0,0 +1,411 @@
|
|
1
|
+
=begin
|
2
|
+
#Akeyless API
|
3
|
+
|
4
|
+
#The purpose of this application is to provide access to Akeyless API.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2.0
|
7
|
+
Contact: support@akeyless.io
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.0.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Akeyless
|
17
|
+
# updateAuthMethodCert is a command that updates a new auth method that will be able to authenticate using a client certificae
|
18
|
+
class UpdateAuthMethodCert
|
19
|
+
# Access expiration date in Unix timestamp (select 0 for access without expiry date)
|
20
|
+
attr_accessor :access_expires
|
21
|
+
|
22
|
+
# A list of names. At least one must exist in the Common Name. Supports globbing.
|
23
|
+
attr_accessor :bound_common_names
|
24
|
+
|
25
|
+
# A list of DNS names. At least one must exist in the SANs. Supports globbing.
|
26
|
+
attr_accessor :bound_dns_sans
|
27
|
+
|
28
|
+
# A list of Email Addresses. At least one must exist in the SANs. Supports globbing.
|
29
|
+
attr_accessor :bound_email_sans
|
30
|
+
|
31
|
+
# A list of extensions formatted as \"oid:value\". Expects the extension value to be some type of ASN1 encoded string. All values much match. Supports globbing on \"value\".
|
32
|
+
attr_accessor :bound_extensions
|
33
|
+
|
34
|
+
# A CIDR whitelist with the IPs that the access is restricted to
|
35
|
+
attr_accessor :bound_ips
|
36
|
+
|
37
|
+
# A list of Organizational Units names. At least one must exist in the OU field.
|
38
|
+
attr_accessor :bound_organizational_units
|
39
|
+
|
40
|
+
# A list of URIs. At least one must exist in the SANs. Supports globbing.
|
41
|
+
attr_accessor :bound_uri_sans
|
42
|
+
|
43
|
+
# The certificate data in base64, if no file was provided
|
44
|
+
attr_accessor :certificate_data
|
45
|
+
|
46
|
+
# if true: enforce role-association must include sub claims
|
47
|
+
attr_accessor :force_sub_claims
|
48
|
+
|
49
|
+
# Jwt TTL
|
50
|
+
attr_accessor :jwt_ttl
|
51
|
+
|
52
|
+
# Auth Method name
|
53
|
+
attr_accessor :name
|
54
|
+
|
55
|
+
# Auth Method new name
|
56
|
+
attr_accessor :new_name
|
57
|
+
|
58
|
+
# A list of revoked cert ids
|
59
|
+
attr_accessor :revoked_cert_ids
|
60
|
+
|
61
|
+
# Authentication token (see `/auth` and `/configure`)
|
62
|
+
attr_accessor :token
|
63
|
+
|
64
|
+
# The universal identity token, Required only for universal_identity authentication
|
65
|
+
attr_accessor :uid_token
|
66
|
+
|
67
|
+
# A unique identifier (ID) value should be configured, such as common_name or organizational_unit Whenever a user logs in with a token, these authentication types issue a \"sub claim\" that contains details uniquely identifying that user. This sub claim includes a key containing the ID value that you configured, and is used to distinguish between different users from within the same organization.
|
68
|
+
attr_accessor :unique_identifier
|
69
|
+
|
70
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
71
|
+
def self.attribute_map
|
72
|
+
{
|
73
|
+
:'access_expires' => :'access-expires',
|
74
|
+
:'bound_common_names' => :'bound-common-names',
|
75
|
+
:'bound_dns_sans' => :'bound-dns-sans',
|
76
|
+
:'bound_email_sans' => :'bound-email-sans',
|
77
|
+
:'bound_extensions' => :'bound-extensions',
|
78
|
+
:'bound_ips' => :'bound-ips',
|
79
|
+
:'bound_organizational_units' => :'bound-organizational-units',
|
80
|
+
:'bound_uri_sans' => :'bound-uri-sans',
|
81
|
+
:'certificate_data' => :'certificate-data',
|
82
|
+
:'force_sub_claims' => :'force-sub-claims',
|
83
|
+
:'jwt_ttl' => :'jwt-ttl',
|
84
|
+
:'name' => :'name',
|
85
|
+
:'new_name' => :'new-name',
|
86
|
+
:'revoked_cert_ids' => :'revoked-cert-ids',
|
87
|
+
:'token' => :'token',
|
88
|
+
:'uid_token' => :'uid-token',
|
89
|
+
:'unique_identifier' => :'unique-identifier'
|
90
|
+
}
|
91
|
+
end
|
92
|
+
|
93
|
+
# Returns all the JSON keys this model knows about
|
94
|
+
def self.acceptable_attributes
|
95
|
+
attribute_map.values
|
96
|
+
end
|
97
|
+
|
98
|
+
# Attribute type mapping.
|
99
|
+
def self.openapi_types
|
100
|
+
{
|
101
|
+
:'access_expires' => :'Integer',
|
102
|
+
:'bound_common_names' => :'Array<String>',
|
103
|
+
:'bound_dns_sans' => :'Array<String>',
|
104
|
+
:'bound_email_sans' => :'Array<String>',
|
105
|
+
:'bound_extensions' => :'Array<String>',
|
106
|
+
:'bound_ips' => :'Array<String>',
|
107
|
+
:'bound_organizational_units' => :'Array<String>',
|
108
|
+
:'bound_uri_sans' => :'Array<String>',
|
109
|
+
:'certificate_data' => :'String',
|
110
|
+
:'force_sub_claims' => :'Boolean',
|
111
|
+
:'jwt_ttl' => :'Integer',
|
112
|
+
:'name' => :'String',
|
113
|
+
:'new_name' => :'String',
|
114
|
+
:'revoked_cert_ids' => :'Array<String>',
|
115
|
+
:'token' => :'String',
|
116
|
+
:'uid_token' => :'String',
|
117
|
+
:'unique_identifier' => :'String'
|
118
|
+
}
|
119
|
+
end
|
120
|
+
|
121
|
+
# List of attributes with nullable: true
|
122
|
+
def self.openapi_nullable
|
123
|
+
Set.new([
|
124
|
+
])
|
125
|
+
end
|
126
|
+
|
127
|
+
# Initializes the object
|
128
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
129
|
+
def initialize(attributes = {})
|
130
|
+
if (!attributes.is_a?(Hash))
|
131
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::UpdateAuthMethodCert` initialize method"
|
132
|
+
end
|
133
|
+
|
134
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
135
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
136
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
137
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::UpdateAuthMethodCert`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
138
|
+
end
|
139
|
+
h[k.to_sym] = v
|
140
|
+
}
|
141
|
+
|
142
|
+
if attributes.key?(:'access_expires')
|
143
|
+
self.access_expires = attributes[:'access_expires']
|
144
|
+
else
|
145
|
+
self.access_expires = 0
|
146
|
+
end
|
147
|
+
|
148
|
+
if attributes.key?(:'bound_common_names')
|
149
|
+
if (value = attributes[:'bound_common_names']).is_a?(Array)
|
150
|
+
self.bound_common_names = value
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
if attributes.key?(:'bound_dns_sans')
|
155
|
+
if (value = attributes[:'bound_dns_sans']).is_a?(Array)
|
156
|
+
self.bound_dns_sans = value
|
157
|
+
end
|
158
|
+
end
|
159
|
+
|
160
|
+
if attributes.key?(:'bound_email_sans')
|
161
|
+
if (value = attributes[:'bound_email_sans']).is_a?(Array)
|
162
|
+
self.bound_email_sans = value
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
if attributes.key?(:'bound_extensions')
|
167
|
+
if (value = attributes[:'bound_extensions']).is_a?(Array)
|
168
|
+
self.bound_extensions = value
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
if attributes.key?(:'bound_ips')
|
173
|
+
if (value = attributes[:'bound_ips']).is_a?(Array)
|
174
|
+
self.bound_ips = value
|
175
|
+
end
|
176
|
+
end
|
177
|
+
|
178
|
+
if attributes.key?(:'bound_organizational_units')
|
179
|
+
if (value = attributes[:'bound_organizational_units']).is_a?(Array)
|
180
|
+
self.bound_organizational_units = value
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
if attributes.key?(:'bound_uri_sans')
|
185
|
+
if (value = attributes[:'bound_uri_sans']).is_a?(Array)
|
186
|
+
self.bound_uri_sans = value
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
190
|
+
if attributes.key?(:'certificate_data')
|
191
|
+
self.certificate_data = attributes[:'certificate_data']
|
192
|
+
end
|
193
|
+
|
194
|
+
if attributes.key?(:'force_sub_claims')
|
195
|
+
self.force_sub_claims = attributes[:'force_sub_claims']
|
196
|
+
end
|
197
|
+
|
198
|
+
if attributes.key?(:'jwt_ttl')
|
199
|
+
self.jwt_ttl = attributes[:'jwt_ttl']
|
200
|
+
else
|
201
|
+
self.jwt_ttl = 0
|
202
|
+
end
|
203
|
+
|
204
|
+
if attributes.key?(:'name')
|
205
|
+
self.name = attributes[:'name']
|
206
|
+
end
|
207
|
+
|
208
|
+
if attributes.key?(:'new_name')
|
209
|
+
self.new_name = attributes[:'new_name']
|
210
|
+
end
|
211
|
+
|
212
|
+
if attributes.key?(:'revoked_cert_ids')
|
213
|
+
if (value = attributes[:'revoked_cert_ids']).is_a?(Array)
|
214
|
+
self.revoked_cert_ids = value
|
215
|
+
end
|
216
|
+
end
|
217
|
+
|
218
|
+
if attributes.key?(:'token')
|
219
|
+
self.token = attributes[:'token']
|
220
|
+
end
|
221
|
+
|
222
|
+
if attributes.key?(:'uid_token')
|
223
|
+
self.uid_token = attributes[:'uid_token']
|
224
|
+
end
|
225
|
+
|
226
|
+
if attributes.key?(:'unique_identifier')
|
227
|
+
self.unique_identifier = attributes[:'unique_identifier']
|
228
|
+
end
|
229
|
+
end
|
230
|
+
|
231
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
232
|
+
# @return Array for valid properties with the reasons
|
233
|
+
def list_invalid_properties
|
234
|
+
invalid_properties = Array.new
|
235
|
+
if @name.nil?
|
236
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
237
|
+
end
|
238
|
+
|
239
|
+
if @unique_identifier.nil?
|
240
|
+
invalid_properties.push('invalid value for "unique_identifier", unique_identifier cannot be nil.')
|
241
|
+
end
|
242
|
+
|
243
|
+
invalid_properties
|
244
|
+
end
|
245
|
+
|
246
|
+
# Check to see if the all the properties in the model are valid
|
247
|
+
# @return true if the model is valid
|
248
|
+
def valid?
|
249
|
+
return false if @name.nil?
|
250
|
+
return false if @unique_identifier.nil?
|
251
|
+
true
|
252
|
+
end
|
253
|
+
|
254
|
+
# Checks equality by comparing each attribute.
|
255
|
+
# @param [Object] Object to be compared
|
256
|
+
def ==(o)
|
257
|
+
return true if self.equal?(o)
|
258
|
+
self.class == o.class &&
|
259
|
+
access_expires == o.access_expires &&
|
260
|
+
bound_common_names == o.bound_common_names &&
|
261
|
+
bound_dns_sans == o.bound_dns_sans &&
|
262
|
+
bound_email_sans == o.bound_email_sans &&
|
263
|
+
bound_extensions == o.bound_extensions &&
|
264
|
+
bound_ips == o.bound_ips &&
|
265
|
+
bound_organizational_units == o.bound_organizational_units &&
|
266
|
+
bound_uri_sans == o.bound_uri_sans &&
|
267
|
+
certificate_data == o.certificate_data &&
|
268
|
+
force_sub_claims == o.force_sub_claims &&
|
269
|
+
jwt_ttl == o.jwt_ttl &&
|
270
|
+
name == o.name &&
|
271
|
+
new_name == o.new_name &&
|
272
|
+
revoked_cert_ids == o.revoked_cert_ids &&
|
273
|
+
token == o.token &&
|
274
|
+
uid_token == o.uid_token &&
|
275
|
+
unique_identifier == o.unique_identifier
|
276
|
+
end
|
277
|
+
|
278
|
+
# @see the `==` method
|
279
|
+
# @param [Object] Object to be compared
|
280
|
+
def eql?(o)
|
281
|
+
self == o
|
282
|
+
end
|
283
|
+
|
284
|
+
# Calculates hash code according to all attributes.
|
285
|
+
# @return [Integer] Hash code
|
286
|
+
def hash
|
287
|
+
[access_expires, bound_common_names, bound_dns_sans, bound_email_sans, bound_extensions, bound_ips, bound_organizational_units, bound_uri_sans, certificate_data, force_sub_claims, jwt_ttl, name, new_name, revoked_cert_ids, token, uid_token, unique_identifier].hash
|
288
|
+
end
|
289
|
+
|
290
|
+
# Builds the object from hash
|
291
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
292
|
+
# @return [Object] Returns the model itself
|
293
|
+
def self.build_from_hash(attributes)
|
294
|
+
new.build_from_hash(attributes)
|
295
|
+
end
|
296
|
+
|
297
|
+
# Builds the object from hash
|
298
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
299
|
+
# @return [Object] Returns the model itself
|
300
|
+
def build_from_hash(attributes)
|
301
|
+
return nil unless attributes.is_a?(Hash)
|
302
|
+
attributes = attributes.transform_keys(&:to_sym)
|
303
|
+
self.class.openapi_types.each_pair do |key, type|
|
304
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
305
|
+
self.send("#{key}=", nil)
|
306
|
+
elsif type =~ /\AArray<(.*)>/i
|
307
|
+
# check to ensure the input is an array given that the attribute
|
308
|
+
# is documented as an array but the input is not
|
309
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
310
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
311
|
+
end
|
312
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
313
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
314
|
+
end
|
315
|
+
end
|
316
|
+
|
317
|
+
self
|
318
|
+
end
|
319
|
+
|
320
|
+
# Deserializes the data based on type
|
321
|
+
# @param string type Data type
|
322
|
+
# @param string value Value to be deserialized
|
323
|
+
# @return [Object] Deserialized data
|
324
|
+
def _deserialize(type, value)
|
325
|
+
case type.to_sym
|
326
|
+
when :Time
|
327
|
+
Time.parse(value)
|
328
|
+
when :Date
|
329
|
+
Date.parse(value)
|
330
|
+
when :String
|
331
|
+
value.to_s
|
332
|
+
when :Integer
|
333
|
+
value.to_i
|
334
|
+
when :Float
|
335
|
+
value.to_f
|
336
|
+
when :Boolean
|
337
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
338
|
+
true
|
339
|
+
else
|
340
|
+
false
|
341
|
+
end
|
342
|
+
when :Object
|
343
|
+
# generic object (usually a Hash), return directly
|
344
|
+
value
|
345
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
346
|
+
inner_type = Regexp.last_match[:inner_type]
|
347
|
+
value.map { |v| _deserialize(inner_type, v) }
|
348
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
349
|
+
k_type = Regexp.last_match[:k_type]
|
350
|
+
v_type = Regexp.last_match[:v_type]
|
351
|
+
{}.tap do |hash|
|
352
|
+
value.each do |k, v|
|
353
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
354
|
+
end
|
355
|
+
end
|
356
|
+
else # model
|
357
|
+
# models (e.g. Pet) or oneOf
|
358
|
+
klass = Akeyless.const_get(type)
|
359
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
360
|
+
end
|
361
|
+
end
|
362
|
+
|
363
|
+
# Returns the string representation of the object
|
364
|
+
# @return [String] String presentation of the object
|
365
|
+
def to_s
|
366
|
+
to_hash.to_s
|
367
|
+
end
|
368
|
+
|
369
|
+
# to_body is an alias to to_hash (backward compatibility)
|
370
|
+
# @return [Hash] Returns the object in the form of hash
|
371
|
+
def to_body
|
372
|
+
to_hash
|
373
|
+
end
|
374
|
+
|
375
|
+
# Returns the object in the form of hash
|
376
|
+
# @return [Hash] Returns the object in the form of hash
|
377
|
+
def to_hash
|
378
|
+
hash = {}
|
379
|
+
self.class.attribute_map.each_pair do |attr, param|
|
380
|
+
value = self.send(attr)
|
381
|
+
if value.nil?
|
382
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
383
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
384
|
+
end
|
385
|
+
|
386
|
+
hash[param] = _to_hash(value)
|
387
|
+
end
|
388
|
+
hash
|
389
|
+
end
|
390
|
+
|
391
|
+
# Outputs non-array value in the form of hash
|
392
|
+
# For object, use to_hash. Otherwise, just return the value
|
393
|
+
# @param [Object] value Any valid value
|
394
|
+
# @return [Hash] Returns the value in the form of hash
|
395
|
+
def _to_hash(value)
|
396
|
+
if value.is_a?(Array)
|
397
|
+
value.compact.map { |v| _to_hash(v) }
|
398
|
+
elsif value.is_a?(Hash)
|
399
|
+
{}.tap do |hash|
|
400
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
401
|
+
end
|
402
|
+
elsif value.respond_to? :to_hash
|
403
|
+
value.to_hash
|
404
|
+
else
|
405
|
+
value
|
406
|
+
end
|
407
|
+
end
|
408
|
+
|
409
|
+
end
|
410
|
+
|
411
|
+
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: 6.0.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Akeyless
|
17
|
+
class UpdateAuthMethodCertOutput
|
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::UpdateAuthMethodCertOutput` 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::UpdateAuthMethodCertOutput`. 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
|
@@ -43,6 +43,9 @@ module Akeyless
|
|
43
43
|
# The universal identity token, Required only for universal_identity authentication
|
44
44
|
attr_accessor :uid_token
|
45
45
|
|
46
|
+
# A unique identifier (ID) value should be configured for OAuth2, LDAP and SAML authentication method types and is usually a value such as the email, username, or upn for example. Whenever a user logs in with a token, these authentication types issue a \"sub claim\" that contains details uniquely identifying that user. This sub claim includes a key containing the ID value that you configured, and is used to distinguish between different users from within the same organization.
|
47
|
+
attr_accessor :unique_identifier
|
48
|
+
|
46
49
|
# Attribute mapping from ruby-style variable name to JSON key.
|
47
50
|
def self.attribute_map
|
48
51
|
{
|
@@ -54,7 +57,8 @@ module Akeyless
|
|
54
57
|
:'new_name' => :'new-name',
|
55
58
|
:'public_key_data' => :'public-key-data',
|
56
59
|
:'token' => :'token',
|
57
|
-
:'uid_token' => :'uid-token'
|
60
|
+
:'uid_token' => :'uid-token',
|
61
|
+
:'unique_identifier' => :'unique-identifier'
|
58
62
|
}
|
59
63
|
end
|
60
64
|
|
@@ -74,7 +78,8 @@ module Akeyless
|
|
74
78
|
:'new_name' => :'String',
|
75
79
|
:'public_key_data' => :'String',
|
76
80
|
:'token' => :'String',
|
77
|
-
:'uid_token' => :'String'
|
81
|
+
:'uid_token' => :'String',
|
82
|
+
:'unique_identifier' => :'String'
|
78
83
|
}
|
79
84
|
end
|
80
85
|
|
@@ -140,6 +145,10 @@ module Akeyless
|
|
140
145
|
if attributes.key?(:'uid_token')
|
141
146
|
self.uid_token = attributes[:'uid_token']
|
142
147
|
end
|
148
|
+
|
149
|
+
if attributes.key?(:'unique_identifier')
|
150
|
+
self.unique_identifier = attributes[:'unique_identifier']
|
151
|
+
end
|
143
152
|
end
|
144
153
|
|
145
154
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -173,7 +182,8 @@ module Akeyless
|
|
173
182
|
new_name == o.new_name &&
|
174
183
|
public_key_data == o.public_key_data &&
|
175
184
|
token == o.token &&
|
176
|
-
uid_token == o.uid_token
|
185
|
+
uid_token == o.uid_token &&
|
186
|
+
unique_identifier == o.unique_identifier
|
177
187
|
end
|
178
188
|
|
179
189
|
# @see the `==` method
|
@@ -185,7 +195,7 @@ module Akeyless
|
|
185
195
|
# Calculates hash code according to all attributes.
|
186
196
|
# @return [Integer] Hash code
|
187
197
|
def hash
|
188
|
-
[access_expires, bound_ips, force_sub_claims, jwt_ttl, name, new_name, public_key_data, token, uid_token].hash
|
198
|
+
[access_expires, bound_ips, force_sub_claims, jwt_ttl, name, new_name, public_key_data, token, uid_token, unique_identifier].hash
|
189
199
|
end
|
190
200
|
|
191
201
|
# Builds the object from hash
|