akeyless 5.0.8 → 5.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +9 -1
  3. data/docs/CreateESM.md +2 -0
  4. data/docs/CreateUSC.md +2 -0
  5. data/docs/DSProducerDetails.md +12 -0
  6. data/docs/DynamicSecretCreateGcp.md +2 -0
  7. data/docs/DynamicSecretCreateOpenAI.md +40 -0
  8. data/docs/DynamicSecretUpdateGcp.md +2 -0
  9. data/docs/DynamicSecretUpdateOpenAI.md +42 -0
  10. data/docs/EsmGetSecretOutput.md +2 -0
  11. data/docs/EventForwarderCreateTeams.md +44 -0
  12. data/docs/EventForwarderUpdateTeams.md +46 -0
  13. data/docs/GatewayCreateMigration.md +1 -11
  14. data/docs/GatewayCreateProducerGcp.md +2 -0
  15. data/docs/GatewayUpdateMigration.md +0 -10
  16. data/docs/GatewayUpdateProducerGcp.md +2 -0
  17. data/docs/NotiForwarder.md +2 -0
  18. data/docs/OpenAITargetDetails.md +3 -3
  19. data/docs/SecretInfo.md +2 -0
  20. data/docs/UscCreate.md +2 -0
  21. data/docs/UscGetSecretOutput.md +2 -0
  22. data/docs/UscUpdate.md +2 -0
  23. data/docs/V2Api.md +252 -0
  24. data/lib/akeyless/api/v2_api.rb +256 -0
  25. data/lib/akeyless/models/create_esm.rb +11 -1
  26. data/lib/akeyless/models/create_usc.rb +11 -1
  27. data/lib/akeyless/models/ds_producer_details.rb +55 -1
  28. data/lib/akeyless/models/dynamic_secret_create_gcp.rb +11 -1
  29. data/lib/akeyless/models/dynamic_secret_create_open_ai.rb +339 -0
  30. data/lib/akeyless/models/dynamic_secret_update_gcp.rb +11 -1
  31. data/lib/akeyless/models/dynamic_secret_update_open_ai.rb +349 -0
  32. data/lib/akeyless/models/esm_get_secret_output.rb +10 -1
  33. data/lib/akeyless/models/event_forwarder_create_teams.rb +385 -0
  34. data/lib/akeyless/models/event_forwarder_update_teams.rb +391 -0
  35. data/lib/akeyless/models/gateway_create_migration.rb +2 -54
  36. data/lib/akeyless/models/gateway_create_producer_gcp.rb +11 -1
  37. data/lib/akeyless/models/gateway_update_migration.rb +1 -53
  38. data/lib/akeyless/models/gateway_update_producer_gcp.rb +11 -1
  39. data/lib/akeyless/models/noti_forwarder.rb +10 -1
  40. data/lib/akeyless/models/open_ai_target_details.rb +13 -13
  41. data/lib/akeyless/models/secret_info.rb +10 -1
  42. data/lib/akeyless/models/usc_create.rb +11 -1
  43. data/lib/akeyless/models/usc_get_secret_output.rb +10 -1
  44. data/lib/akeyless/models/usc_update.rb +11 -1
  45. data/lib/akeyless/version.rb +1 -1
  46. data/lib/akeyless.rb +4 -0
  47. data/spec/models/dynamic_secret_create_open_ai_spec.rb +102 -0
  48. data/spec/models/dynamic_secret_update_open_ai_spec.rb +108 -0
  49. data/spec/models/event_forwarder_create_teams_spec.rb +114 -0
  50. data/spec/models/event_forwarder_update_teams_spec.rb +120 -0
  51. metadata +17 -1
@@ -0,0 +1,385 @@
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: 3.0
7
+ Contact: support@akeyless.io
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.10.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Akeyless
17
+ # eventForwarderCreateTeams is a command that creates teams event forwarder
18
+ class EventForwarderCreateTeams
19
+ # Auth Method Event sources
20
+ attr_accessor :auth_methods_event_source_locations
21
+
22
+ # Description of the object
23
+ attr_accessor :description
24
+
25
+ # List of event types to notify about [request-access, certificate-pending-expiration, certificate-expired, certificate-provisioning-success, certificate-provisioning-failure, auth-method-pending-expiration, auth-method-expired, next-automatic-rotation, rotated-secret-success, rotated-secret-failure, dynamic-secret-failure, multi-auth-failure, uid-rotation-failure, apply-justification, email-auth-method-approved, usage, rotation-usage, gateway-inactive, static-secret-updated, rate-limiting, usage-report, secret-sync]
26
+ attr_accessor :event_types
27
+
28
+ # Rate of periodic runner repetition in hours
29
+ attr_accessor :every
30
+
31
+ # Event sources
32
+ attr_accessor :gateways_event_source_locations
33
+
34
+ # Items Event sources
35
+ attr_accessor :items_event_source_locations
36
+
37
+ # Set output format to JSON
38
+ attr_accessor :json
39
+
40
+ # The name of a key that used to encrypt the EventForwarder secret value (if empty, the account default protectionKey key will be used)
41
+ attr_accessor :key
42
+
43
+ # EventForwarder name
44
+ attr_accessor :name
45
+
46
+ attr_accessor :runner_type
47
+
48
+ # Targets Event sources
49
+ attr_accessor :targets_event_source_locations
50
+
51
+ # Authentication token (see `/auth` and `/configure`)
52
+ attr_accessor :token
53
+
54
+ # The universal identity token, Required only for universal_identity authentication
55
+ attr_accessor :uid_token
56
+
57
+ # Teams Webhook URL
58
+ attr_accessor :url
59
+
60
+ # Attribute mapping from ruby-style variable name to JSON key.
61
+ def self.attribute_map
62
+ {
63
+ :'auth_methods_event_source_locations' => :'auth-methods-event-source-locations',
64
+ :'description' => :'description',
65
+ :'event_types' => :'event-types',
66
+ :'every' => :'every',
67
+ :'gateways_event_source_locations' => :'gateways-event-source-locations',
68
+ :'items_event_source_locations' => :'items-event-source-locations',
69
+ :'json' => :'json',
70
+ :'key' => :'key',
71
+ :'name' => :'name',
72
+ :'runner_type' => :'runner-type',
73
+ :'targets_event_source_locations' => :'targets-event-source-locations',
74
+ :'token' => :'token',
75
+ :'uid_token' => :'uid-token',
76
+ :'url' => :'url'
77
+ }
78
+ end
79
+
80
+ # Returns all the JSON keys this model knows about
81
+ def self.acceptable_attributes
82
+ attribute_map.values
83
+ end
84
+
85
+ # Attribute type mapping.
86
+ def self.openapi_types
87
+ {
88
+ :'auth_methods_event_source_locations' => :'Array<String>',
89
+ :'description' => :'String',
90
+ :'event_types' => :'Array<String>',
91
+ :'every' => :'String',
92
+ :'gateways_event_source_locations' => :'Array<String>',
93
+ :'items_event_source_locations' => :'Array<String>',
94
+ :'json' => :'Boolean',
95
+ :'key' => :'String',
96
+ :'name' => :'String',
97
+ :'runner_type' => :'String',
98
+ :'targets_event_source_locations' => :'Array<String>',
99
+ :'token' => :'String',
100
+ :'uid_token' => :'String',
101
+ :'url' => :'String'
102
+ }
103
+ end
104
+
105
+ # List of attributes with nullable: true
106
+ def self.openapi_nullable
107
+ Set.new([
108
+ ])
109
+ end
110
+
111
+ # Initializes the object
112
+ # @param [Hash] attributes Model attributes in the form of hash
113
+ def initialize(attributes = {})
114
+ if (!attributes.is_a?(Hash))
115
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::EventForwarderCreateTeams` initialize method"
116
+ end
117
+
118
+ # check to see if the attribute exists and convert string to symbol for hash key
119
+ attributes = attributes.each_with_object({}) { |(k, v), h|
120
+ if (!self.class.attribute_map.key?(k.to_sym))
121
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::EventForwarderCreateTeams`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
122
+ end
123
+ h[k.to_sym] = v
124
+ }
125
+
126
+ if attributes.key?(:'auth_methods_event_source_locations')
127
+ if (value = attributes[:'auth_methods_event_source_locations']).is_a?(Array)
128
+ self.auth_methods_event_source_locations = value
129
+ end
130
+ end
131
+
132
+ if attributes.key?(:'description')
133
+ self.description = attributes[:'description']
134
+ end
135
+
136
+ if attributes.key?(:'event_types')
137
+ if (value = attributes[:'event_types']).is_a?(Array)
138
+ self.event_types = value
139
+ end
140
+ end
141
+
142
+ if attributes.key?(:'every')
143
+ self.every = attributes[:'every']
144
+ end
145
+
146
+ if attributes.key?(:'gateways_event_source_locations')
147
+ if (value = attributes[:'gateways_event_source_locations']).is_a?(Array)
148
+ self.gateways_event_source_locations = value
149
+ end
150
+ else
151
+ self.gateways_event_source_locations = nil
152
+ end
153
+
154
+ if attributes.key?(:'items_event_source_locations')
155
+ if (value = attributes[:'items_event_source_locations']).is_a?(Array)
156
+ self.items_event_source_locations = value
157
+ end
158
+ end
159
+
160
+ if attributes.key?(:'json')
161
+ self.json = attributes[:'json']
162
+ else
163
+ self.json = false
164
+ end
165
+
166
+ if attributes.key?(:'key')
167
+ self.key = attributes[:'key']
168
+ end
169
+
170
+ if attributes.key?(:'name')
171
+ self.name = attributes[:'name']
172
+ else
173
+ self.name = nil
174
+ end
175
+
176
+ if attributes.key?(:'runner_type')
177
+ self.runner_type = attributes[:'runner_type']
178
+ else
179
+ self.runner_type = nil
180
+ end
181
+
182
+ if attributes.key?(:'targets_event_source_locations')
183
+ if (value = attributes[:'targets_event_source_locations']).is_a?(Array)
184
+ self.targets_event_source_locations = value
185
+ end
186
+ end
187
+
188
+ if attributes.key?(:'token')
189
+ self.token = attributes[:'token']
190
+ end
191
+
192
+ if attributes.key?(:'uid_token')
193
+ self.uid_token = attributes[:'uid_token']
194
+ end
195
+
196
+ if attributes.key?(:'url')
197
+ self.url = attributes[:'url']
198
+ else
199
+ self.url = nil
200
+ end
201
+ end
202
+
203
+ # Show invalid properties with the reasons. Usually used together with valid?
204
+ # @return Array for valid properties with the reasons
205
+ def list_invalid_properties
206
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
207
+ invalid_properties = Array.new
208
+ if @gateways_event_source_locations.nil?
209
+ invalid_properties.push('invalid value for "gateways_event_source_locations", gateways_event_source_locations cannot be nil.')
210
+ end
211
+
212
+ if @name.nil?
213
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
214
+ end
215
+
216
+ if @runner_type.nil?
217
+ invalid_properties.push('invalid value for "runner_type", runner_type cannot be nil.')
218
+ end
219
+
220
+ if @url.nil?
221
+ invalid_properties.push('invalid value for "url", url cannot be nil.')
222
+ end
223
+
224
+ invalid_properties
225
+ end
226
+
227
+ # Check to see if the all the properties in the model are valid
228
+ # @return true if the model is valid
229
+ def valid?
230
+ warn '[DEPRECATED] the `valid?` method is obsolete'
231
+ return false if @gateways_event_source_locations.nil?
232
+ return false if @name.nil?
233
+ return false if @runner_type.nil?
234
+ return false if @url.nil?
235
+ true
236
+ end
237
+
238
+ # Checks equality by comparing each attribute.
239
+ # @param [Object] Object to be compared
240
+ def ==(o)
241
+ return true if self.equal?(o)
242
+ self.class == o.class &&
243
+ auth_methods_event_source_locations == o.auth_methods_event_source_locations &&
244
+ description == o.description &&
245
+ event_types == o.event_types &&
246
+ every == o.every &&
247
+ gateways_event_source_locations == o.gateways_event_source_locations &&
248
+ items_event_source_locations == o.items_event_source_locations &&
249
+ json == o.json &&
250
+ key == o.key &&
251
+ name == o.name &&
252
+ runner_type == o.runner_type &&
253
+ targets_event_source_locations == o.targets_event_source_locations &&
254
+ token == o.token &&
255
+ uid_token == o.uid_token &&
256
+ url == o.url
257
+ end
258
+
259
+ # @see the `==` method
260
+ # @param [Object] Object to be compared
261
+ def eql?(o)
262
+ self == o
263
+ end
264
+
265
+ # Calculates hash code according to all attributes.
266
+ # @return [Integer] Hash code
267
+ def hash
268
+ [auth_methods_event_source_locations, description, event_types, every, gateways_event_source_locations, items_event_source_locations, json, key, name, runner_type, targets_event_source_locations, token, uid_token, url].hash
269
+ end
270
+
271
+ # Builds the object from hash
272
+ # @param [Hash] attributes Model attributes in the form of hash
273
+ # @return [Object] Returns the model itself
274
+ def self.build_from_hash(attributes)
275
+ return nil unless attributes.is_a?(Hash)
276
+ attributes = attributes.transform_keys(&:to_sym)
277
+ transformed_hash = {}
278
+ openapi_types.each_pair do |key, type|
279
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
280
+ transformed_hash["#{key}"] = nil
281
+ elsif type =~ /\AArray<(.*)>/i
282
+ # check to ensure the input is an array given that the attribute
283
+ # is documented as an array but the input is not
284
+ if attributes[attribute_map[key]].is_a?(Array)
285
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
286
+ end
287
+ elsif !attributes[attribute_map[key]].nil?
288
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
289
+ end
290
+ end
291
+ new(transformed_hash)
292
+ end
293
+
294
+ # Deserializes the data based on type
295
+ # @param string type Data type
296
+ # @param string value Value to be deserialized
297
+ # @return [Object] Deserialized data
298
+ def self._deserialize(type, value)
299
+ case type.to_sym
300
+ when :Time
301
+ Time.parse(value)
302
+ when :Date
303
+ Date.parse(value)
304
+ when :String
305
+ value.to_s
306
+ when :Integer
307
+ value.to_i
308
+ when :Float
309
+ value.to_f
310
+ when :Boolean
311
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
312
+ true
313
+ else
314
+ false
315
+ end
316
+ when :Object
317
+ # generic object (usually a Hash), return directly
318
+ value
319
+ when /\AArray<(?<inner_type>.+)>\z/
320
+ inner_type = Regexp.last_match[:inner_type]
321
+ value.map { |v| _deserialize(inner_type, v) }
322
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
323
+ k_type = Regexp.last_match[:k_type]
324
+ v_type = Regexp.last_match[:v_type]
325
+ {}.tap do |hash|
326
+ value.each do |k, v|
327
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
328
+ end
329
+ end
330
+ else # model
331
+ # models (e.g. Pet) or oneOf
332
+ klass = Akeyless.const_get(type)
333
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
334
+ end
335
+ end
336
+
337
+ # Returns the string representation of the object
338
+ # @return [String] String presentation of the object
339
+ def to_s
340
+ to_hash.to_s
341
+ end
342
+
343
+ # to_body is an alias to to_hash (backward compatibility)
344
+ # @return [Hash] Returns the object in the form of hash
345
+ def to_body
346
+ to_hash
347
+ end
348
+
349
+ # Returns the object in the form of hash
350
+ # @return [Hash] Returns the object in the form of hash
351
+ def to_hash
352
+ hash = {}
353
+ self.class.attribute_map.each_pair do |attr, param|
354
+ value = self.send(attr)
355
+ if value.nil?
356
+ is_nullable = self.class.openapi_nullable.include?(attr)
357
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
358
+ end
359
+
360
+ hash[param] = _to_hash(value)
361
+ end
362
+ hash
363
+ end
364
+
365
+ # Outputs non-array value in the form of hash
366
+ # For object, use to_hash. Otherwise, just return the value
367
+ # @param [Object] value Any valid value
368
+ # @return [Hash] Returns the value in the form of hash
369
+ def _to_hash(value)
370
+ if value.is_a?(Array)
371
+ value.compact.map { |v| _to_hash(v) }
372
+ elsif value.is_a?(Hash)
373
+ {}.tap do |hash|
374
+ value.each { |k, v| hash[k] = _to_hash(v) }
375
+ end
376
+ elsif value.respond_to? :to_hash
377
+ value.to_hash
378
+ else
379
+ value
380
+ end
381
+ end
382
+
383
+ end
384
+
385
+ end