akeyless 5.0.6 → 5.0.7

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 +11 -1
  3. data/docs/AzureLogAnalyticsForwardingConfig.md +2 -0
  4. data/docs/CertificateTemplateInfo.md +2 -0
  5. data/docs/CreateClassicKey.md +3 -1
  6. data/docs/CreateDFCKey.md +3 -1
  7. data/docs/CreateKey.md +3 -1
  8. data/docs/GatewayUpdateLogForwardingAzureAnalytics.md +2 -0
  9. data/docs/GatewayUpdateLogForwardingSplunk.md +2 -0
  10. data/docs/GeminiTargetDetails.md +22 -0
  11. data/docs/GenerateCsr.md +2 -0
  12. data/docs/GwUpdateRemoteAccessSessionLogsAzureAnalytics.md +2 -0
  13. data/docs/GwUpdateRemoteAccessSessionLogsSplunk.md +2 -0
  14. data/docs/OpenAITargetDetails.md +26 -0
  15. data/docs/SplunkLogForwardingConfig.md +2 -0
  16. data/docs/StaticSecretSync.md +2 -0
  17. data/docs/TargetCreateGemini.md +36 -0
  18. data/docs/TargetCreateOpenAI.md +40 -0
  19. data/docs/TargetTypeDetailsInput.md +4 -0
  20. data/docs/TargetUpdateGemini.md +42 -0
  21. data/docs/TargetUpdateOpenAI.md +46 -0
  22. data/docs/V2Api.md +252 -0
  23. data/lib/akeyless/api/v2_api.rb +256 -0
  24. data/lib/akeyless/models/azure_log_analytics_forwarding_config.rb +10 -1
  25. data/lib/akeyless/models/certificate_template_info.rb +10 -1
  26. data/lib/akeyless/models/create_classic_key.rb +14 -2
  27. data/lib/akeyless/models/create_dfc_key.rb +14 -2
  28. data/lib/akeyless/models/create_key.rb +14 -2
  29. data/lib/akeyless/models/gateway_update_log_forwarding_azure_analytics.rb +13 -1
  30. data/lib/akeyless/models/gateway_update_log_forwarding_splunk.rb +13 -1
  31. data/lib/akeyless/models/gemini_target_details.rb +233 -0
  32. data/lib/akeyless/models/generate_csr.rb +13 -1
  33. data/lib/akeyless/models/gw_update_remote_access_session_logs_azure_analytics.rb +13 -1
  34. data/lib/akeyless/models/gw_update_remote_access_session_logs_splunk.rb +13 -1
  35. data/lib/akeyless/models/open_ai_target_details.rb +251 -0
  36. data/lib/akeyless/models/splunk_log_forwarding_config.rb +10 -1
  37. data/lib/akeyless/models/static_secret_sync.rb +11 -1
  38. data/lib/akeyless/models/target_create_gemini.rb +317 -0
  39. data/lib/akeyless/models/target_create_open_ai.rb +337 -0
  40. data/lib/akeyless/models/target_type_details_input.rb +19 -1
  41. data/lib/akeyless/models/target_update_gemini.rb +351 -0
  42. data/lib/akeyless/models/target_update_open_ai.rb +371 -0
  43. data/lib/akeyless/version.rb +1 -1
  44. data/lib/akeyless.rb +6 -0
  45. data/spec/models/gemini_target_details_spec.rb +48 -0
  46. data/spec/models/open_ai_target_details_spec.rb +60 -0
  47. data/spec/models/target_create_gemini_spec.rb +90 -0
  48. data/spec/models/target_create_open_ai_spec.rb +102 -0
  49. data/spec/models/target_update_gemini_spec.rb +108 -0
  50. data/spec/models/target_update_open_ai_spec.rb +120 -0
  51. metadata +25 -1
@@ -33,6 +33,8 @@ module Akeyless
33
33
 
34
34
  attr_accessor :gcp_target_details
35
35
 
36
+ attr_accessor :gemini_target_details
37
+
36
38
  attr_accessor :github_target_details
37
39
 
38
40
  attr_accessor :gitlab_target_details
@@ -55,6 +57,8 @@ module Akeyless
55
57
 
56
58
  attr_accessor :native_k8s_target_details
57
59
 
60
+ attr_accessor :openai_target_details
61
+
58
62
  attr_accessor :ping_target_details
59
63
 
60
64
  attr_accessor :rabbit_mq_target_details
@@ -85,6 +89,7 @@ module Akeyless
85
89
  :'dockerhub_target_details' => :'dockerhub_target_details',
86
90
  :'eks_target_details' => :'eks_target_details',
87
91
  :'gcp_target_details' => :'gcp_target_details',
92
+ :'gemini_target_details' => :'gemini_target_details',
88
93
  :'github_target_details' => :'github_target_details',
89
94
  :'gitlab_target_details' => :'gitlab_target_details',
90
95
  :'gke_target_details' => :'gke_target_details',
@@ -96,6 +101,7 @@ module Akeyless
96
101
  :'linked_target_details' => :'linked_target_details',
97
102
  :'mongo_db_target_details' => :'mongo_db_target_details',
98
103
  :'native_k8s_target_details' => :'native_k8s_target_details',
104
+ :'openai_target_details' => :'openai_target_details',
99
105
  :'ping_target_details' => :'ping_target_details',
100
106
  :'rabbit_mq_target_details' => :'rabbit_mq_target_details',
101
107
  :'salesforce_target_details' => :'salesforce_target_details',
@@ -125,6 +131,7 @@ module Akeyless
125
131
  :'dockerhub_target_details' => :'DockerhubTargetDetails',
126
132
  :'eks_target_details' => :'EKSTargetDetails',
127
133
  :'gcp_target_details' => :'GcpTargetDetails',
134
+ :'gemini_target_details' => :'GeminiTargetDetails',
128
135
  :'github_target_details' => :'GithubTargetDetails',
129
136
  :'gitlab_target_details' => :'GitlabTargetDetails',
130
137
  :'gke_target_details' => :'GKETargetDetails',
@@ -136,6 +143,7 @@ module Akeyless
136
143
  :'linked_target_details' => :'LinkedTargetDetails',
137
144
  :'mongo_db_target_details' => :'MongoDBTargetDetails',
138
145
  :'native_k8s_target_details' => :'NativeK8sTargetDetails',
146
+ :'openai_target_details' => :'OpenAITargetDetails',
139
147
  :'ping_target_details' => :'PingTargetDetails',
140
148
  :'rabbit_mq_target_details' => :'RabbitMQTargetDetails',
141
149
  :'salesforce_target_details' => :'SalesforceTargetDetails',
@@ -205,6 +213,10 @@ module Akeyless
205
213
  self.gcp_target_details = attributes[:'gcp_target_details']
206
214
  end
207
215
 
216
+ if attributes.key?(:'gemini_target_details')
217
+ self.gemini_target_details = attributes[:'gemini_target_details']
218
+ end
219
+
208
220
  if attributes.key?(:'github_target_details')
209
221
  self.github_target_details = attributes[:'github_target_details']
210
222
  end
@@ -249,6 +261,10 @@ module Akeyless
249
261
  self.native_k8s_target_details = attributes[:'native_k8s_target_details']
250
262
  end
251
263
 
264
+ if attributes.key?(:'openai_target_details')
265
+ self.openai_target_details = attributes[:'openai_target_details']
266
+ end
267
+
252
268
  if attributes.key?(:'ping_target_details')
253
269
  self.ping_target_details = attributes[:'ping_target_details']
254
270
  end
@@ -315,6 +331,7 @@ module Akeyless
315
331
  dockerhub_target_details == o.dockerhub_target_details &&
316
332
  eks_target_details == o.eks_target_details &&
317
333
  gcp_target_details == o.gcp_target_details &&
334
+ gemini_target_details == o.gemini_target_details &&
318
335
  github_target_details == o.github_target_details &&
319
336
  gitlab_target_details == o.gitlab_target_details &&
320
337
  gke_target_details == o.gke_target_details &&
@@ -326,6 +343,7 @@ module Akeyless
326
343
  linked_target_details == o.linked_target_details &&
327
344
  mongo_db_target_details == o.mongo_db_target_details &&
328
345
  native_k8s_target_details == o.native_k8s_target_details &&
346
+ openai_target_details == o.openai_target_details &&
329
347
  ping_target_details == o.ping_target_details &&
330
348
  rabbit_mq_target_details == o.rabbit_mq_target_details &&
331
349
  salesforce_target_details == o.salesforce_target_details &&
@@ -346,7 +364,7 @@ module Akeyless
346
364
  # Calculates hash code according to all attributes.
347
365
  # @return [Integer] Hash code
348
366
  def hash
349
- [artifactory_target_details, aws_target_details, azure_target_details, chef_target_details, custom_target_details, db_target_details, dockerhub_target_details, eks_target_details, gcp_target_details, github_target_details, gitlab_target_details, gke_target_details, globalsign_atlas_target_details, globalsign_target_details, godaddy_target_details, hashi_vault_target_details, ldap_target_details, linked_target_details, mongo_db_target_details, native_k8s_target_details, ping_target_details, rabbit_mq_target_details, salesforce_target_details, sectigo_target_details, ssh_target_details, venafi_target_details, web_target_details, windows_target_details, zerossl_target_details].hash
367
+ [artifactory_target_details, aws_target_details, azure_target_details, chef_target_details, custom_target_details, db_target_details, dockerhub_target_details, eks_target_details, gcp_target_details, gemini_target_details, github_target_details, gitlab_target_details, gke_target_details, globalsign_atlas_target_details, globalsign_target_details, godaddy_target_details, hashi_vault_target_details, ldap_target_details, linked_target_details, mongo_db_target_details, native_k8s_target_details, openai_target_details, ping_target_details, rabbit_mq_target_details, salesforce_target_details, sectigo_target_details, ssh_target_details, venafi_target_details, web_target_details, windows_target_details, zerossl_target_details].hash
350
368
  end
351
369
 
352
370
  # Builds the object from hash
@@ -0,0 +1,351 @@
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
+ # targetUpdateGemini is a command that updates an existing gemini target
18
+ class TargetUpdateGemini
19
+ # API key for Gemini
20
+ attr_accessor :api_key
21
+
22
+ # Description of the object
23
+ attr_accessor :description
24
+
25
+ # Base URL of the Gemini API
26
+ attr_accessor :gemini_url
27
+
28
+ # Set output format to JSON
29
+ attr_accessor :json
30
+
31
+ # Whether to keep previous version [true/false]. If not set, use default according to account settings
32
+ attr_accessor :keep_prev_version
33
+
34
+ # The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
35
+ attr_accessor :key
36
+
37
+ # Set the maximum number of versions, limited by the account settings defaults.
38
+ attr_accessor :max_versions
39
+
40
+ # Default model to use with Gemini
41
+ attr_accessor :model
42
+
43
+ # Target name
44
+ attr_accessor :name
45
+
46
+ # Deprecated - use description
47
+ attr_accessor :new_comment
48
+
49
+ # New target name
50
+ attr_accessor :new_name
51
+
52
+ # Authentication token (see `/auth` and `/configure`)
53
+ attr_accessor :token
54
+
55
+ # The universal identity token, Required only for universal_identity authentication
56
+ attr_accessor :uid_token
57
+
58
+ # Attribute mapping from ruby-style variable name to JSON key.
59
+ def self.attribute_map
60
+ {
61
+ :'api_key' => :'api-key',
62
+ :'description' => :'description',
63
+ :'gemini_url' => :'gemini-url',
64
+ :'json' => :'json',
65
+ :'keep_prev_version' => :'keep-prev-version',
66
+ :'key' => :'key',
67
+ :'max_versions' => :'max-versions',
68
+ :'model' => :'model',
69
+ :'name' => :'name',
70
+ :'new_comment' => :'new-comment',
71
+ :'new_name' => :'new-name',
72
+ :'token' => :'token',
73
+ :'uid_token' => :'uid-token'
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
+ :'api_key' => :'String',
86
+ :'description' => :'String',
87
+ :'gemini_url' => :'String',
88
+ :'json' => :'Boolean',
89
+ :'keep_prev_version' => :'String',
90
+ :'key' => :'String',
91
+ :'max_versions' => :'String',
92
+ :'model' => :'String',
93
+ :'name' => :'String',
94
+ :'new_comment' => :'String',
95
+ :'new_name' => :'String',
96
+ :'token' => :'String',
97
+ :'uid_token' => :'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::TargetUpdateGemini` 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::TargetUpdateGemini`. 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?(:'api_key')
123
+ self.api_key = attributes[:'api_key']
124
+ end
125
+
126
+ if attributes.key?(:'description')
127
+ self.description = attributes[:'description']
128
+ else
129
+ self.description = 'default_comment'
130
+ end
131
+
132
+ if attributes.key?(:'gemini_url')
133
+ self.gemini_url = attributes[:'gemini_url']
134
+ else
135
+ self.gemini_url = 'https://generativelanguage.googleapis.com'
136
+ end
137
+
138
+ if attributes.key?(:'json')
139
+ self.json = attributes[:'json']
140
+ else
141
+ self.json = false
142
+ end
143
+
144
+ if attributes.key?(:'keep_prev_version')
145
+ self.keep_prev_version = attributes[:'keep_prev_version']
146
+ end
147
+
148
+ if attributes.key?(:'key')
149
+ self.key = attributes[:'key']
150
+ end
151
+
152
+ if attributes.key?(:'max_versions')
153
+ self.max_versions = attributes[:'max_versions']
154
+ end
155
+
156
+ if attributes.key?(:'model')
157
+ self.model = attributes[:'model']
158
+ end
159
+
160
+ if attributes.key?(:'name')
161
+ self.name = attributes[:'name']
162
+ else
163
+ self.name = nil
164
+ end
165
+
166
+ if attributes.key?(:'new_comment')
167
+ self.new_comment = attributes[:'new_comment']
168
+ else
169
+ self.new_comment = 'default_comment'
170
+ end
171
+
172
+ if attributes.key?(:'new_name')
173
+ self.new_name = attributes[:'new_name']
174
+ end
175
+
176
+ if attributes.key?(:'token')
177
+ self.token = attributes[:'token']
178
+ end
179
+
180
+ if attributes.key?(:'uid_token')
181
+ self.uid_token = attributes[:'uid_token']
182
+ end
183
+ end
184
+
185
+ # Show invalid properties with the reasons. Usually used together with valid?
186
+ # @return Array for valid properties with the reasons
187
+ def list_invalid_properties
188
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
189
+ invalid_properties = Array.new
190
+ if @name.nil?
191
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
192
+ end
193
+
194
+ invalid_properties
195
+ end
196
+
197
+ # Check to see if the all the properties in the model are valid
198
+ # @return true if the model is valid
199
+ def valid?
200
+ warn '[DEPRECATED] the `valid?` method is obsolete'
201
+ return false if @name.nil?
202
+ true
203
+ end
204
+
205
+ # Checks equality by comparing each attribute.
206
+ # @param [Object] Object to be compared
207
+ def ==(o)
208
+ return true if self.equal?(o)
209
+ self.class == o.class &&
210
+ api_key == o.api_key &&
211
+ description == o.description &&
212
+ gemini_url == o.gemini_url &&
213
+ json == o.json &&
214
+ keep_prev_version == o.keep_prev_version &&
215
+ key == o.key &&
216
+ max_versions == o.max_versions &&
217
+ model == o.model &&
218
+ name == o.name &&
219
+ new_comment == o.new_comment &&
220
+ new_name == o.new_name &&
221
+ token == o.token &&
222
+ uid_token == o.uid_token
223
+ end
224
+
225
+ # @see the `==` method
226
+ # @param [Object] Object to be compared
227
+ def eql?(o)
228
+ self == o
229
+ end
230
+
231
+ # Calculates hash code according to all attributes.
232
+ # @return [Integer] Hash code
233
+ def hash
234
+ [api_key, description, gemini_url, json, keep_prev_version, key, max_versions, model, name, new_comment, new_name, token, uid_token].hash
235
+ end
236
+
237
+ # Builds the object from hash
238
+ # @param [Hash] attributes Model attributes in the form of hash
239
+ # @return [Object] Returns the model itself
240
+ def self.build_from_hash(attributes)
241
+ return nil unless attributes.is_a?(Hash)
242
+ attributes = attributes.transform_keys(&:to_sym)
243
+ transformed_hash = {}
244
+ openapi_types.each_pair do |key, type|
245
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
246
+ transformed_hash["#{key}"] = nil
247
+ elsif type =~ /\AArray<(.*)>/i
248
+ # check to ensure the input is an array given that the attribute
249
+ # is documented as an array but the input is not
250
+ if attributes[attribute_map[key]].is_a?(Array)
251
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
252
+ end
253
+ elsif !attributes[attribute_map[key]].nil?
254
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
255
+ end
256
+ end
257
+ new(transformed_hash)
258
+ end
259
+
260
+ # Deserializes the data based on type
261
+ # @param string type Data type
262
+ # @param string value Value to be deserialized
263
+ # @return [Object] Deserialized data
264
+ def self._deserialize(type, value)
265
+ case type.to_sym
266
+ when :Time
267
+ Time.parse(value)
268
+ when :Date
269
+ Date.parse(value)
270
+ when :String
271
+ value.to_s
272
+ when :Integer
273
+ value.to_i
274
+ when :Float
275
+ value.to_f
276
+ when :Boolean
277
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
278
+ true
279
+ else
280
+ false
281
+ end
282
+ when :Object
283
+ # generic object (usually a Hash), return directly
284
+ value
285
+ when /\AArray<(?<inner_type>.+)>\z/
286
+ inner_type = Regexp.last_match[:inner_type]
287
+ value.map { |v| _deserialize(inner_type, v) }
288
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
289
+ k_type = Regexp.last_match[:k_type]
290
+ v_type = Regexp.last_match[:v_type]
291
+ {}.tap do |hash|
292
+ value.each do |k, v|
293
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
294
+ end
295
+ end
296
+ else # model
297
+ # models (e.g. Pet) or oneOf
298
+ klass = Akeyless.const_get(type)
299
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
300
+ end
301
+ end
302
+
303
+ # Returns the string representation of the object
304
+ # @return [String] String presentation of the object
305
+ def to_s
306
+ to_hash.to_s
307
+ end
308
+
309
+ # to_body is an alias to to_hash (backward compatibility)
310
+ # @return [Hash] Returns the object in the form of hash
311
+ def to_body
312
+ to_hash
313
+ end
314
+
315
+ # Returns the object in the form of hash
316
+ # @return [Hash] Returns the object in the form of hash
317
+ def to_hash
318
+ hash = {}
319
+ self.class.attribute_map.each_pair do |attr, param|
320
+ value = self.send(attr)
321
+ if value.nil?
322
+ is_nullable = self.class.openapi_nullable.include?(attr)
323
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
324
+ end
325
+
326
+ hash[param] = _to_hash(value)
327
+ end
328
+ hash
329
+ end
330
+
331
+ # Outputs non-array value in the form of hash
332
+ # For object, use to_hash. Otherwise, just return the value
333
+ # @param [Object] value Any valid value
334
+ # @return [Hash] Returns the value in the form of hash
335
+ def _to_hash(value)
336
+ if value.is_a?(Array)
337
+ value.compact.map { |v| _to_hash(v) }
338
+ elsif value.is_a?(Hash)
339
+ {}.tap do |hash|
340
+ value.each { |k, v| hash[k] = _to_hash(v) }
341
+ end
342
+ elsif value.respond_to? :to_hash
343
+ value.to_hash
344
+ else
345
+ value
346
+ end
347
+ end
348
+
349
+ end
350
+
351
+ end