akeyless 0.0.2.pre.rc2 → 2.16.0

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