akeyless 5.0.8 → 5.0.9

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 (35) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +9 -1
  3. data/docs/DSProducerDetails.md +10 -0
  4. data/docs/DynamicSecretCreateOpenAI.md +40 -0
  5. data/docs/DynamicSecretUpdateOpenAI.md +42 -0
  6. data/docs/EsmGetSecretOutput.md +2 -0
  7. data/docs/EventForwarderCreateTeams.md +44 -0
  8. data/docs/EventForwarderUpdateTeams.md +46 -0
  9. data/docs/NotiForwarder.md +2 -0
  10. data/docs/OpenAITargetDetails.md +3 -3
  11. data/docs/SecretInfo.md +2 -0
  12. data/docs/UscCreate.md +2 -0
  13. data/docs/UscGetSecretOutput.md +2 -0
  14. data/docs/UscUpdate.md +2 -0
  15. data/docs/V2Api.md +252 -0
  16. data/lib/akeyless/api/v2_api.rb +256 -0
  17. data/lib/akeyless/models/ds_producer_details.rb +46 -1
  18. data/lib/akeyless/models/dynamic_secret_create_open_ai.rb +339 -0
  19. data/lib/akeyless/models/dynamic_secret_update_open_ai.rb +349 -0
  20. data/lib/akeyless/models/esm_get_secret_output.rb +10 -1
  21. data/lib/akeyless/models/event_forwarder_create_teams.rb +385 -0
  22. data/lib/akeyless/models/event_forwarder_update_teams.rb +391 -0
  23. data/lib/akeyless/models/noti_forwarder.rb +10 -1
  24. data/lib/akeyless/models/open_ai_target_details.rb +13 -13
  25. data/lib/akeyless/models/secret_info.rb +10 -1
  26. data/lib/akeyless/models/usc_create.rb +11 -1
  27. data/lib/akeyless/models/usc_get_secret_output.rb +10 -1
  28. data/lib/akeyless/models/usc_update.rb +11 -1
  29. data/lib/akeyless/version.rb +1 -1
  30. data/lib/akeyless.rb +4 -0
  31. data/spec/models/dynamic_secret_create_open_ai_spec.rb +102 -0
  32. data/spec/models/dynamic_secret_update_open_ai_spec.rb +108 -0
  33. data/spec/models/event_forwarder_create_teams_spec.rb +114 -0
  34. data/spec/models/event_forwarder_update_teams_spec.rb +120 -0
  35. metadata +17 -1
@@ -0,0 +1,349 @@
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
+ # dynamicSecretUpdateOpenAI is a command that updates OpenAI dynamic secret
18
+ class DynamicSecretUpdateOpenAI
19
+ # Customize how temporary usernames are generated using go template
20
+ attr_accessor :custom_username_template
21
+
22
+ # Protection from accidental deletion of this object [true/false]
23
+ attr_accessor :delete_protection
24
+
25
+ # Description of the object
26
+ attr_accessor :description
27
+
28
+ # Set output format to JSON
29
+ attr_accessor :json
30
+
31
+ # Dynamic secret name
32
+ attr_accessor :name
33
+
34
+ # Dynamic secret name
35
+ attr_accessor :new_name
36
+
37
+ # Dynamic producer encryption key
38
+ attr_accessor :producer_encryption_key_name
39
+
40
+ # Project ID
41
+ attr_accessor :project_id
42
+
43
+ # Add tags attached to this object
44
+ attr_accessor :tags
45
+
46
+ # Name of existing target to use in producer creation
47
+ attr_accessor :target_name
48
+
49
+ # Authentication token (see `/auth` and `/configure`)
50
+ attr_accessor :token
51
+
52
+ # The universal identity token, Required only for universal_identity authentication
53
+ attr_accessor :uid_token
54
+
55
+ # User TTL
56
+ attr_accessor :user_ttl
57
+
58
+ # Attribute mapping from ruby-style variable name to JSON key.
59
+ def self.attribute_map
60
+ {
61
+ :'custom_username_template' => :'custom-username-template',
62
+ :'delete_protection' => :'delete_protection',
63
+ :'description' => :'description',
64
+ :'json' => :'json',
65
+ :'name' => :'name',
66
+ :'new_name' => :'new-name',
67
+ :'producer_encryption_key_name' => :'producer-encryption-key-name',
68
+ :'project_id' => :'project-id',
69
+ :'tags' => :'tags',
70
+ :'target_name' => :'target-name',
71
+ :'token' => :'token',
72
+ :'uid_token' => :'uid-token',
73
+ :'user_ttl' => :'user-ttl'
74
+ }
75
+ end
76
+
77
+ # Returns all the JSON keys this model knows about
78
+ def self.acceptable_attributes
79
+ attribute_map.values
80
+ end
81
+
82
+ # Attribute type mapping.
83
+ def self.openapi_types
84
+ {
85
+ :'custom_username_template' => :'String',
86
+ :'delete_protection' => :'String',
87
+ :'description' => :'String',
88
+ :'json' => :'Boolean',
89
+ :'name' => :'String',
90
+ :'new_name' => :'String',
91
+ :'producer_encryption_key_name' => :'String',
92
+ :'project_id' => :'String',
93
+ :'tags' => :'Array<String>',
94
+ :'target_name' => :'String',
95
+ :'token' => :'String',
96
+ :'uid_token' => :'String',
97
+ :'user_ttl' => :'String'
98
+ }
99
+ end
100
+
101
+ # List of attributes with nullable: true
102
+ def self.openapi_nullable
103
+ Set.new([
104
+ ])
105
+ end
106
+
107
+ # Initializes the object
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ def initialize(attributes = {})
110
+ if (!attributes.is_a?(Hash))
111
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::DynamicSecretUpdateOpenAI` initialize method"
112
+ end
113
+
114
+ # check to see if the attribute exists and convert string to symbol for hash key
115
+ attributes = attributes.each_with_object({}) { |(k, v), h|
116
+ if (!self.class.attribute_map.key?(k.to_sym))
117
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::DynamicSecretUpdateOpenAI`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
118
+ end
119
+ h[k.to_sym] = v
120
+ }
121
+
122
+ if attributes.key?(:'custom_username_template')
123
+ self.custom_username_template = attributes[:'custom_username_template']
124
+ end
125
+
126
+ if attributes.key?(:'delete_protection')
127
+ self.delete_protection = attributes[:'delete_protection']
128
+ end
129
+
130
+ if attributes.key?(:'description')
131
+ self.description = attributes[:'description']
132
+ end
133
+
134
+ if attributes.key?(:'json')
135
+ self.json = attributes[:'json']
136
+ else
137
+ self.json = false
138
+ end
139
+
140
+ if attributes.key?(:'name')
141
+ self.name = attributes[:'name']
142
+ else
143
+ self.name = nil
144
+ end
145
+
146
+ if attributes.key?(:'new_name')
147
+ self.new_name = attributes[:'new_name']
148
+ end
149
+
150
+ if attributes.key?(:'producer_encryption_key_name')
151
+ self.producer_encryption_key_name = attributes[:'producer_encryption_key_name']
152
+ end
153
+
154
+ if attributes.key?(:'project_id')
155
+ self.project_id = attributes[:'project_id']
156
+ end
157
+
158
+ if attributes.key?(:'tags')
159
+ if (value = attributes[:'tags']).is_a?(Array)
160
+ self.tags = value
161
+ end
162
+ end
163
+
164
+ if attributes.key?(:'target_name')
165
+ self.target_name = attributes[:'target_name']
166
+ end
167
+
168
+ if attributes.key?(:'token')
169
+ self.token = attributes[:'token']
170
+ end
171
+
172
+ if attributes.key?(:'uid_token')
173
+ self.uid_token = attributes[:'uid_token']
174
+ end
175
+
176
+ if attributes.key?(:'user_ttl')
177
+ self.user_ttl = attributes[:'user_ttl']
178
+ else
179
+ self.user_ttl = '60m'
180
+ end
181
+ end
182
+
183
+ # Show invalid properties with the reasons. Usually used together with valid?
184
+ # @return Array for valid properties with the reasons
185
+ def list_invalid_properties
186
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
187
+ invalid_properties = Array.new
188
+ if @name.nil?
189
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
190
+ end
191
+
192
+ invalid_properties
193
+ end
194
+
195
+ # Check to see if the all the properties in the model are valid
196
+ # @return true if the model is valid
197
+ def valid?
198
+ warn '[DEPRECATED] the `valid?` method is obsolete'
199
+ return false if @name.nil?
200
+ true
201
+ end
202
+
203
+ # Checks equality by comparing each attribute.
204
+ # @param [Object] Object to be compared
205
+ def ==(o)
206
+ return true if self.equal?(o)
207
+ self.class == o.class &&
208
+ custom_username_template == o.custom_username_template &&
209
+ delete_protection == o.delete_protection &&
210
+ description == o.description &&
211
+ json == o.json &&
212
+ name == o.name &&
213
+ new_name == o.new_name &&
214
+ producer_encryption_key_name == o.producer_encryption_key_name &&
215
+ project_id == o.project_id &&
216
+ tags == o.tags &&
217
+ target_name == o.target_name &&
218
+ token == o.token &&
219
+ uid_token == o.uid_token &&
220
+ user_ttl == o.user_ttl
221
+ end
222
+
223
+ # @see the `==` method
224
+ # @param [Object] Object to be compared
225
+ def eql?(o)
226
+ self == o
227
+ end
228
+
229
+ # Calculates hash code according to all attributes.
230
+ # @return [Integer] Hash code
231
+ def hash
232
+ [custom_username_template, delete_protection, description, json, name, new_name, producer_encryption_key_name, project_id, tags, target_name, token, uid_token, user_ttl].hash
233
+ end
234
+
235
+ # Builds the object from hash
236
+ # @param [Hash] attributes Model attributes in the form of hash
237
+ # @return [Object] Returns the model itself
238
+ def self.build_from_hash(attributes)
239
+ return nil unless attributes.is_a?(Hash)
240
+ attributes = attributes.transform_keys(&:to_sym)
241
+ transformed_hash = {}
242
+ openapi_types.each_pair do |key, type|
243
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
244
+ transformed_hash["#{key}"] = nil
245
+ elsif type =~ /\AArray<(.*)>/i
246
+ # check to ensure the input is an array given that the attribute
247
+ # is documented as an array but the input is not
248
+ if attributes[attribute_map[key]].is_a?(Array)
249
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
250
+ end
251
+ elsif !attributes[attribute_map[key]].nil?
252
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
253
+ end
254
+ end
255
+ new(transformed_hash)
256
+ end
257
+
258
+ # Deserializes the data based on type
259
+ # @param string type Data type
260
+ # @param string value Value to be deserialized
261
+ # @return [Object] Deserialized data
262
+ def self._deserialize(type, value)
263
+ case type.to_sym
264
+ when :Time
265
+ Time.parse(value)
266
+ when :Date
267
+ Date.parse(value)
268
+ when :String
269
+ value.to_s
270
+ when :Integer
271
+ value.to_i
272
+ when :Float
273
+ value.to_f
274
+ when :Boolean
275
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
276
+ true
277
+ else
278
+ false
279
+ end
280
+ when :Object
281
+ # generic object (usually a Hash), return directly
282
+ value
283
+ when /\AArray<(?<inner_type>.+)>\z/
284
+ inner_type = Regexp.last_match[:inner_type]
285
+ value.map { |v| _deserialize(inner_type, v) }
286
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
287
+ k_type = Regexp.last_match[:k_type]
288
+ v_type = Regexp.last_match[:v_type]
289
+ {}.tap do |hash|
290
+ value.each do |k, v|
291
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
292
+ end
293
+ end
294
+ else # model
295
+ # models (e.g. Pet) or oneOf
296
+ klass = Akeyless.const_get(type)
297
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
298
+ end
299
+ end
300
+
301
+ # Returns the string representation of the object
302
+ # @return [String] String presentation of the object
303
+ def to_s
304
+ to_hash.to_s
305
+ end
306
+
307
+ # to_body is an alias to to_hash (backward compatibility)
308
+ # @return [Hash] Returns the object in the form of hash
309
+ def to_body
310
+ to_hash
311
+ end
312
+
313
+ # Returns the object in the form of hash
314
+ # @return [Hash] Returns the object in the form of hash
315
+ def to_hash
316
+ hash = {}
317
+ self.class.attribute_map.each_pair do |attr, param|
318
+ value = self.send(attr)
319
+ if value.nil?
320
+ is_nullable = self.class.openapi_nullable.include?(attr)
321
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
322
+ end
323
+
324
+ hash[param] = _to_hash(value)
325
+ end
326
+ hash
327
+ end
328
+
329
+ # Outputs non-array value in the form of hash
330
+ # For object, use to_hash. Otherwise, just return the value
331
+ # @param [Object] value Any valid value
332
+ # @return [Hash] Returns the value in the form of hash
333
+ def _to_hash(value)
334
+ if value.is_a?(Array)
335
+ value.compact.map { |v| _to_hash(v) }
336
+ elsif value.is_a?(Hash)
337
+ {}.tap do |hash|
338
+ value.each { |k, v| hash[k] = _to_hash(v) }
339
+ end
340
+ elsif value.respond_to? :to_hash
341
+ value.to_hash
342
+ else
343
+ value
344
+ end
345
+ end
346
+
347
+ end
348
+
349
+ end
@@ -17,6 +17,8 @@ module Akeyless
17
17
  class EsmGetSecretOutput
18
18
  attr_accessor :binary_value
19
19
 
20
+ attr_accessor :encryption_key
21
+
20
22
  attr_accessor :id
21
23
 
22
24
  attr_accessor :metadata
@@ -29,6 +31,7 @@ module Akeyless
29
31
  def self.attribute_map
30
32
  {
31
33
  :'binary_value' => :'binary_value',
34
+ :'encryption_key' => :'encryption_key',
32
35
  :'id' => :'id',
33
36
  :'metadata' => :'metadata',
34
37
  :'name' => :'name',
@@ -45,6 +48,7 @@ module Akeyless
45
48
  def self.openapi_types
46
49
  {
47
50
  :'binary_value' => :'Boolean',
51
+ :'encryption_key' => :'String',
48
52
  :'id' => :'String',
49
53
  :'metadata' => :'Object',
50
54
  :'name' => :'String',
@@ -78,6 +82,10 @@ module Akeyless
78
82
  self.binary_value = attributes[:'binary_value']
79
83
  end
80
84
 
85
+ if attributes.key?(:'encryption_key')
86
+ self.encryption_key = attributes[:'encryption_key']
87
+ end
88
+
81
89
  if attributes.key?(:'id')
82
90
  self.id = attributes[:'id']
83
91
  end
@@ -116,6 +124,7 @@ module Akeyless
116
124
  return true if self.equal?(o)
117
125
  self.class == o.class &&
118
126
  binary_value == o.binary_value &&
127
+ encryption_key == o.encryption_key &&
119
128
  id == o.id &&
120
129
  metadata == o.metadata &&
121
130
  name == o.name &&
@@ -131,7 +140,7 @@ module Akeyless
131
140
  # Calculates hash code according to all attributes.
132
141
  # @return [Integer] Hash code
133
142
  def hash
134
- [binary_value, id, metadata, name, value].hash
143
+ [binary_value, encryption_key, id, metadata, name, value].hash
135
144
  end
136
145
 
137
146
  # Builds the object from hash