akeyless 2.15.32 → 2.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +13 -1
  3. data/docs/Auth.md +5 -1
  4. data/docs/AuthMethodAccessInfo.md +2 -0
  5. data/docs/CertAccessRules.md +34 -0
  6. data/docs/CreateAuthMethodCert.md +48 -0
  7. data/docs/CreateAuthMethodCertOutput.md +18 -0
  8. data/docs/CreateAuthMethodLDAP.md +3 -1
  9. data/docs/CreateAuthMethodOIDC.md +4 -0
  10. data/docs/CreateClassicKey.md +5 -1
  11. data/docs/GatewayCreateProducerCustom.md +4 -0
  12. data/docs/GatewayCreateProducerOracleDb.md +8 -0
  13. data/docs/GatewayMessageQueueInfo.md +1 -3
  14. data/docs/GatewayUpdateProducerCustom.md +4 -0
  15. data/docs/GatewayUpdateProducerOracleDb.md +8 -0
  16. data/docs/KMIPClient.md +2 -0
  17. data/docs/KMIPServer.md +4 -0
  18. data/docs/KmipDeleteServer.md +20 -0
  19. data/docs/KmipDescribeServerOutput.md +4 -0
  20. data/docs/KmipMoveServer.md +22 -0
  21. data/docs/KmipMoveServerOutput.md +20 -0
  22. data/docs/ListAuthMethods.md +3 -1
  23. data/docs/ListRoles.md +2 -0
  24. data/docs/ListTargets.md +2 -0
  25. data/docs/OIDCAccessRules.md +4 -0
  26. data/docs/UpdateAuthMethodCert.md +50 -0
  27. data/docs/UpdateAuthMethodCertOutput.md +18 -0
  28. data/docs/UpdateAuthMethodLDAP.md +3 -1
  29. data/docs/UpdateAuthMethodOIDC.md +4 -0
  30. data/docs/UpdateOutput.md +2 -0
  31. data/docs/V2Api.md +256 -0
  32. data/lib/akeyless/api/v2_api.rb +248 -0
  33. data/lib/akeyless/api_client.rb +3 -1
  34. data/lib/akeyless/models/auth.rb +22 -2
  35. data/lib/akeyless/models/auth_method_access_info.rb +10 -1
  36. data/lib/akeyless/models/cert_access_rules.rb +316 -0
  37. data/lib/akeyless/models/create_auth_method_cert.rb +401 -0
  38. data/lib/akeyless/models/create_auth_method_cert_output.rb +219 -0
  39. data/lib/akeyless/models/create_auth_method_ldap.rb +14 -4
  40. data/lib/akeyless/models/create_auth_method_oidc.rb +23 -1
  41. data/lib/akeyless/models/create_classic_key.rb +26 -4
  42. data/lib/akeyless/models/gateway_create_producer_custom.rb +23 -1
  43. data/lib/akeyless/models/gateway_create_producer_oracle_db.rb +39 -1
  44. data/lib/akeyless/models/gateway_message_queue_info.rb +4 -13
  45. data/lib/akeyless/models/gateway_update_producer_custom.rb +23 -1
  46. data/lib/akeyless/models/gateway_update_producer_oracle_db.rb +39 -1
  47. data/lib/akeyless/models/kmip_client.rb +10 -1
  48. data/lib/akeyless/models/kmip_delete_server.rb +231 -0
  49. data/lib/akeyless/models/kmip_describe_server_output.rb +19 -1
  50. data/lib/akeyless/models/kmip_move_server.rb +240 -0
  51. data/lib/akeyless/models/kmip_move_server_output.rb +228 -0
  52. data/lib/akeyless/models/kmip_server.rb +19 -1
  53. data/lib/akeyless/models/list_auth_methods.rb +12 -2
  54. data/lib/akeyless/models/list_roles.rb +11 -1
  55. data/lib/akeyless/models/list_targets.rb +11 -1
  56. data/lib/akeyless/models/oidc_access_rules.rb +23 -1
  57. data/lib/akeyless/models/update_auth_method_cert.rb +411 -0
  58. data/lib/akeyless/models/update_auth_method_cert_output.rb +219 -0
  59. data/lib/akeyless/models/update_auth_method_ldap.rb +14 -4
  60. data/lib/akeyless/models/update_auth_method_oidc.rb +23 -1
  61. data/lib/akeyless/models/update_output.rb +10 -1
  62. data/lib/akeyless/version.rb +1 -1
  63. data/lib/akeyless.rb +8 -0
  64. data/spec/models/cert_access_rules_spec.rb +82 -0
  65. data/spec/models/create_auth_method_cert_output_spec.rb +34 -0
  66. data/spec/models/create_auth_method_cert_spec.rb +124 -0
  67. data/spec/models/kmip_delete_server_spec.rb +40 -0
  68. data/spec/models/kmip_move_server_output_spec.rb +40 -0
  69. data/spec/models/kmip_move_server_spec.rb +46 -0
  70. data/spec/models/update_auth_method_cert_output_spec.rb +34 -0
  71. data/spec/models/update_auth_method_cert_spec.rb +130 -0
  72. metadata +34 -2
@@ -0,0 +1,316 @@
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 CertAccessRules
18
+ # A list of names. At least one must exist in the Common Name. Supports globbing.
19
+ attr_accessor :bound_common_names
20
+
21
+ # A list of DNS names. At least one must exist in the SANs. Supports globbing.
22
+ attr_accessor :bound_dns_sans
23
+
24
+ # A list of Email Addresses. At least one must exist in the SANs. Supports globbing.
25
+ attr_accessor :bound_email_sans
26
+
27
+ # A list of extensions formatted as \"oid:value\". Expects the extension value to be some type of ASN1 encoded string. All values must match. Supports globbing on \"value\".
28
+ attr_accessor :bound_extensions
29
+
30
+ # A list of Organizational Units names. At least one must exist in the OU field.
31
+ attr_accessor :bound_organizational_units
32
+
33
+ # A list of URIs. At least one must exist in the SANs. Supports globbing.
34
+ attr_accessor :bound_uri_sans
35
+
36
+ # Base64 encdoed PEM certificate
37
+ attr_accessor :certificate
38
+
39
+ # A list of revoked cert ids
40
+ attr_accessor :revoked_cert_ids
41
+
42
+ # A unique identifier to distinguish different users
43
+ attr_accessor :unique_identifier
44
+
45
+ # Attribute mapping from ruby-style variable name to JSON key.
46
+ def self.attribute_map
47
+ {
48
+ :'bound_common_names' => :'bound_common_names',
49
+ :'bound_dns_sans' => :'bound_dns_sans',
50
+ :'bound_email_sans' => :'bound_email_sans',
51
+ :'bound_extensions' => :'bound_extensions',
52
+ :'bound_organizational_units' => :'bound_organizational_units',
53
+ :'bound_uri_sans' => :'bound_uri_sans',
54
+ :'certificate' => :'certificate',
55
+ :'revoked_cert_ids' => :'revoked_cert_ids',
56
+ :'unique_identifier' => :'unique_identifier'
57
+ }
58
+ end
59
+
60
+ # Returns all the JSON keys this model knows about
61
+ def self.acceptable_attributes
62
+ attribute_map.values
63
+ end
64
+
65
+ # Attribute type mapping.
66
+ def self.openapi_types
67
+ {
68
+ :'bound_common_names' => :'Array<String>',
69
+ :'bound_dns_sans' => :'Array<String>',
70
+ :'bound_email_sans' => :'Array<String>',
71
+ :'bound_extensions' => :'Array<String>',
72
+ :'bound_organizational_units' => :'Array<String>',
73
+ :'bound_uri_sans' => :'Array<String>',
74
+ :'certificate' => :'Array<Integer>',
75
+ :'revoked_cert_ids' => :'Array<String>',
76
+ :'unique_identifier' => :'String'
77
+ }
78
+ end
79
+
80
+ # List of attributes with nullable: true
81
+ def self.openapi_nullable
82
+ Set.new([
83
+ ])
84
+ end
85
+
86
+ # Initializes the object
87
+ # @param [Hash] attributes Model attributes in the form of hash
88
+ def initialize(attributes = {})
89
+ if (!attributes.is_a?(Hash))
90
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::CertAccessRules` initialize method"
91
+ end
92
+
93
+ # check to see if the attribute exists and convert string to symbol for hash key
94
+ attributes = attributes.each_with_object({}) { |(k, v), h|
95
+ if (!self.class.attribute_map.key?(k.to_sym))
96
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::CertAccessRules`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
97
+ end
98
+ h[k.to_sym] = v
99
+ }
100
+
101
+ if attributes.key?(:'bound_common_names')
102
+ if (value = attributes[:'bound_common_names']).is_a?(Array)
103
+ self.bound_common_names = value
104
+ end
105
+ end
106
+
107
+ if attributes.key?(:'bound_dns_sans')
108
+ if (value = attributes[:'bound_dns_sans']).is_a?(Array)
109
+ self.bound_dns_sans = value
110
+ end
111
+ end
112
+
113
+ if attributes.key?(:'bound_email_sans')
114
+ if (value = attributes[:'bound_email_sans']).is_a?(Array)
115
+ self.bound_email_sans = value
116
+ end
117
+ end
118
+
119
+ if attributes.key?(:'bound_extensions')
120
+ if (value = attributes[:'bound_extensions']).is_a?(Array)
121
+ self.bound_extensions = value
122
+ end
123
+ end
124
+
125
+ if attributes.key?(:'bound_organizational_units')
126
+ if (value = attributes[:'bound_organizational_units']).is_a?(Array)
127
+ self.bound_organizational_units = value
128
+ end
129
+ end
130
+
131
+ if attributes.key?(:'bound_uri_sans')
132
+ if (value = attributes[:'bound_uri_sans']).is_a?(Array)
133
+ self.bound_uri_sans = value
134
+ end
135
+ end
136
+
137
+ if attributes.key?(:'certificate')
138
+ if (value = attributes[:'certificate']).is_a?(Array)
139
+ self.certificate = value
140
+ end
141
+ end
142
+
143
+ if attributes.key?(:'revoked_cert_ids')
144
+ if (value = attributes[:'revoked_cert_ids']).is_a?(Array)
145
+ self.revoked_cert_ids = value
146
+ end
147
+ end
148
+
149
+ if attributes.key?(:'unique_identifier')
150
+ self.unique_identifier = attributes[:'unique_identifier']
151
+ end
152
+ end
153
+
154
+ # Show invalid properties with the reasons. Usually used together with valid?
155
+ # @return Array for valid properties with the reasons
156
+ def list_invalid_properties
157
+ invalid_properties = Array.new
158
+ invalid_properties
159
+ end
160
+
161
+ # Check to see if the all the properties in the model are valid
162
+ # @return true if the model is valid
163
+ def valid?
164
+ true
165
+ end
166
+
167
+ # Checks equality by comparing each attribute.
168
+ # @param [Object] Object to be compared
169
+ def ==(o)
170
+ return true if self.equal?(o)
171
+ self.class == o.class &&
172
+ bound_common_names == o.bound_common_names &&
173
+ bound_dns_sans == o.bound_dns_sans &&
174
+ bound_email_sans == o.bound_email_sans &&
175
+ bound_extensions == o.bound_extensions &&
176
+ bound_organizational_units == o.bound_organizational_units &&
177
+ bound_uri_sans == o.bound_uri_sans &&
178
+ certificate == o.certificate &&
179
+ revoked_cert_ids == o.revoked_cert_ids &&
180
+ unique_identifier == o.unique_identifier
181
+ end
182
+
183
+ # @see the `==` method
184
+ # @param [Object] Object to be compared
185
+ def eql?(o)
186
+ self == o
187
+ end
188
+
189
+ # Calculates hash code according to all attributes.
190
+ # @return [Integer] Hash code
191
+ def hash
192
+ [bound_common_names, bound_dns_sans, bound_email_sans, bound_extensions, bound_organizational_units, bound_uri_sans, certificate, revoked_cert_ids, unique_identifier].hash
193
+ end
194
+
195
+ # Builds the object from hash
196
+ # @param [Hash] attributes Model attributes in the form of hash
197
+ # @return [Object] Returns the model itself
198
+ def self.build_from_hash(attributes)
199
+ new.build_from_hash(attributes)
200
+ end
201
+
202
+ # Builds the object from hash
203
+ # @param [Hash] attributes Model attributes in the form of hash
204
+ # @return [Object] Returns the model itself
205
+ def build_from_hash(attributes)
206
+ return nil unless attributes.is_a?(Hash)
207
+ attributes = attributes.transform_keys(&:to_sym)
208
+ self.class.openapi_types.each_pair do |key, type|
209
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
210
+ self.send("#{key}=", nil)
211
+ elsif type =~ /\AArray<(.*)>/i
212
+ # check to ensure the input is an array given that the attribute
213
+ # is documented as an array but the input is not
214
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
215
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
216
+ end
217
+ elsif !attributes[self.class.attribute_map[key]].nil?
218
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
219
+ end
220
+ end
221
+
222
+ self
223
+ end
224
+
225
+ # Deserializes the data based on type
226
+ # @param string type Data type
227
+ # @param string value Value to be deserialized
228
+ # @return [Object] Deserialized data
229
+ def _deserialize(type, value)
230
+ case type.to_sym
231
+ when :Time
232
+ Time.parse(value)
233
+ when :Date
234
+ Date.parse(value)
235
+ when :String
236
+ value.to_s
237
+ when :Integer
238
+ value.to_i
239
+ when :Float
240
+ value.to_f
241
+ when :Boolean
242
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
243
+ true
244
+ else
245
+ false
246
+ end
247
+ when :Object
248
+ # generic object (usually a Hash), return directly
249
+ value
250
+ when /\AArray<(?<inner_type>.+)>\z/
251
+ inner_type = Regexp.last_match[:inner_type]
252
+ value.map { |v| _deserialize(inner_type, v) }
253
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
254
+ k_type = Regexp.last_match[:k_type]
255
+ v_type = Regexp.last_match[:v_type]
256
+ {}.tap do |hash|
257
+ value.each do |k, v|
258
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
259
+ end
260
+ end
261
+ else # model
262
+ # models (e.g. Pet) or oneOf
263
+ klass = Akeyless.const_get(type)
264
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
265
+ end
266
+ end
267
+
268
+ # Returns the string representation of the object
269
+ # @return [String] String presentation of the object
270
+ def to_s
271
+ to_hash.to_s
272
+ end
273
+
274
+ # to_body is an alias to to_hash (backward compatibility)
275
+ # @return [Hash] Returns the object in the form of hash
276
+ def to_body
277
+ to_hash
278
+ end
279
+
280
+ # Returns the object in the form of hash
281
+ # @return [Hash] Returns the object in the form of hash
282
+ def to_hash
283
+ hash = {}
284
+ self.class.attribute_map.each_pair do |attr, param|
285
+ value = self.send(attr)
286
+ if value.nil?
287
+ is_nullable = self.class.openapi_nullable.include?(attr)
288
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
289
+ end
290
+
291
+ hash[param] = _to_hash(value)
292
+ end
293
+ hash
294
+ end
295
+
296
+ # Outputs non-array value in the form of hash
297
+ # For object, use to_hash. Otherwise, just return the value
298
+ # @param [Object] value Any valid value
299
+ # @return [Hash] Returns the value in the form of hash
300
+ def _to_hash(value)
301
+ if value.is_a?(Array)
302
+ value.compact.map { |v| _to_hash(v) }
303
+ elsif value.is_a?(Hash)
304
+ {}.tap do |hash|
305
+ value.each { |k, v| hash[k] = _to_hash(v) }
306
+ end
307
+ elsif value.respond_to? :to_hash
308
+ value.to_hash
309
+ else
310
+ value
311
+ end
312
+ end
313
+
314
+ end
315
+
316
+ end