akeyless 5.0.6 → 5.0.8

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 (79) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +14 -1
  3. data/docs/Auth.md +4 -0
  4. data/docs/AuthOutput.md +2 -0
  5. data/docs/AzureLogAnalyticsForwardingConfig.md +2 -0
  6. data/docs/CertificateTemplateInfo.md +2 -0
  7. data/docs/CreateClassicKey.md +3 -1
  8. data/docs/CreateDFCKey.md +3 -1
  9. data/docs/CreateKey.md +3 -1
  10. data/docs/CreateRole.md +2 -0
  11. data/docs/GatewayCreateAllowedAccess.md +1 -1
  12. data/docs/GatewayUpdateAllowedAccess.md +1 -1
  13. data/docs/GatewayUpdateLogForwardingAzureAnalytics.md +2 -0
  14. data/docs/GatewayUpdateLogForwardingSplunk.md +2 -0
  15. data/docs/GeminiTargetDetails.md +22 -0
  16. data/docs/GenerateCsr.md +2 -0
  17. data/docs/GetCertChallenge.md +22 -0
  18. data/docs/GetCertChallengeOutput.md +18 -0
  19. data/docs/GwUpdateRemoteAccessSessionLogsAzureAnalytics.md +2 -0
  20. data/docs/GwUpdateRemoteAccessSessionLogsSplunk.md +2 -0
  21. data/docs/OpenAITargetDetails.md +26 -0
  22. data/docs/PathRule.md +2 -0
  23. data/docs/ReverseRBACClient.md +2 -0
  24. data/docs/RoleAuthMethodAssociation.md +2 -0
  25. data/docs/SharingItemFullInfo.md +2 -0
  26. data/docs/SplunkLogForwardingConfig.md +2 -0
  27. data/docs/StaticSecretSync.md +2 -0
  28. data/docs/TargetCreateGemini.md +36 -0
  29. data/docs/TargetCreateOpenAI.md +40 -0
  30. data/docs/TargetItemAssociation.md +2 -0
  31. data/docs/TargetTypeDetailsInput.md +4 -0
  32. data/docs/TargetUpdateGemini.md +42 -0
  33. data/docs/TargetUpdateOpenAI.md +46 -0
  34. data/docs/UpdateRole.md +2 -0
  35. data/docs/V2Api.md +315 -0
  36. data/lib/akeyless/api/v2_api.rb +320 -0
  37. data/lib/akeyless/models/auth.rb +21 -1
  38. data/lib/akeyless/models/auth_output.rb +10 -1
  39. data/lib/akeyless/models/azure_log_analytics_forwarding_config.rb +10 -1
  40. data/lib/akeyless/models/certificate_template_info.rb +10 -1
  41. data/lib/akeyless/models/create_classic_key.rb +14 -2
  42. data/lib/akeyless/models/create_dfc_key.rb +14 -2
  43. data/lib/akeyless/models/create_key.rb +14 -2
  44. data/lib/akeyless/models/create_role.rb +11 -1
  45. data/lib/akeyless/models/gateway_create_allowed_access.rb +1 -1
  46. data/lib/akeyless/models/gateway_update_allowed_access.rb +1 -1
  47. data/lib/akeyless/models/gateway_update_log_forwarding_azure_analytics.rb +13 -1
  48. data/lib/akeyless/models/gateway_update_log_forwarding_splunk.rb +13 -1
  49. data/lib/akeyless/models/gemini_target_details.rb +233 -0
  50. data/lib/akeyless/models/generate_csr.rb +13 -1
  51. data/lib/akeyless/models/get_cert_challenge.rb +238 -0
  52. data/lib/akeyless/models/get_cert_challenge_output.rb +214 -0
  53. data/lib/akeyless/models/gw_update_remote_access_session_logs_azure_analytics.rb +13 -1
  54. data/lib/akeyless/models/gw_update_remote_access_session_logs_splunk.rb +13 -1
  55. data/lib/akeyless/models/open_ai_target_details.rb +251 -0
  56. data/lib/akeyless/models/path_rule.rb +11 -1
  57. data/lib/akeyless/models/reverse_rbac_client.rb +10 -1
  58. data/lib/akeyless/models/role_auth_method_association.rb +10 -1
  59. data/lib/akeyless/models/sharing_item_full_info.rb +11 -1
  60. data/lib/akeyless/models/splunk_log_forwarding_config.rb +10 -1
  61. data/lib/akeyless/models/static_secret_sync.rb +11 -1
  62. data/lib/akeyless/models/target_create_gemini.rb +317 -0
  63. data/lib/akeyless/models/target_create_open_ai.rb +337 -0
  64. data/lib/akeyless/models/target_item_association.rb +10 -1
  65. data/lib/akeyless/models/target_type_details_input.rb +19 -1
  66. data/lib/akeyless/models/target_update_gemini.rb +351 -0
  67. data/lib/akeyless/models/target_update_open_ai.rb +371 -0
  68. data/lib/akeyless/models/update_role.rb +11 -1
  69. data/lib/akeyless/version.rb +1 -1
  70. data/lib/akeyless.rb +8 -0
  71. data/spec/models/gemini_target_details_spec.rb +48 -0
  72. data/spec/models/get_cert_challenge_output_spec.rb +36 -0
  73. data/spec/models/get_cert_challenge_spec.rb +48 -0
  74. data/spec/models/open_ai_target_details_spec.rb +60 -0
  75. data/spec/models/target_create_gemini_spec.rb +90 -0
  76. data/spec/models/target_create_open_ai_spec.rb +102 -0
  77. data/spec/models/target_update_gemini_spec.rb +108 -0
  78. data/spec/models/target_update_open_ai_spec.rb +120 -0
  79. metadata +33 -1
@@ -27,7 +27,7 @@ module Akeyless
27
27
  # Country name for the generated certificate. Relevant only for generate-self-signed-certificate.
28
28
  attr_accessor :certificate_country
29
29
 
30
- # Digest algorithm to be used for the certificate key signing. Currently, we support only \"sha256\" so we hide this option for CLI.
30
+ # Digest algorithm to be used for the certificate key signing.
31
31
  attr_accessor :certificate_digest_algo
32
32
 
33
33
  attr_accessor :certificate_format
@@ -62,6 +62,9 @@ module Akeyless
62
62
  # Whether to generate a self signed certificate with the key. If set, --certificate-ttl must be provided.
63
63
  attr_accessor :generate_self_signed_certificate
64
64
 
65
+ # Specifies the hash algorithm used for the encryption key's operations, available options: [SHA256, SHA384, SHA512]
66
+ attr_accessor :hash_algorithm
67
+
65
68
  # Set output format to JSON
66
69
  attr_accessor :json
67
70
 
@@ -108,6 +111,7 @@ module Akeyless
108
111
  :'description' => :'description',
109
112
  :'expiration_event_in' => :'expiration-event-in',
110
113
  :'generate_self_signed_certificate' => :'generate-self-signed-certificate',
114
+ :'hash_algorithm' => :'hash-algorithm',
111
115
  :'json' => :'json',
112
116
  :'metadata' => :'metadata',
113
117
  :'name' => :'name',
@@ -144,6 +148,7 @@ module Akeyless
144
148
  :'description' => :'String',
145
149
  :'expiration_event_in' => :'Array<String>',
146
150
  :'generate_self_signed_certificate' => :'Boolean',
151
+ :'hash_algorithm' => :'String',
147
152
  :'json' => :'Boolean',
148
153
  :'metadata' => :'String',
149
154
  :'name' => :'String',
@@ -245,6 +250,12 @@ module Akeyless
245
250
  self.generate_self_signed_certificate = attributes[:'generate_self_signed_certificate']
246
251
  end
247
252
 
253
+ if attributes.key?(:'hash_algorithm')
254
+ self.hash_algorithm = attributes[:'hash_algorithm']
255
+ else
256
+ self.hash_algorithm = 'SHA256'
257
+ end
258
+
248
259
  if attributes.key?(:'json')
249
260
  self.json = attributes[:'json']
250
261
  else
@@ -338,6 +349,7 @@ module Akeyless
338
349
  description == o.description &&
339
350
  expiration_event_in == o.expiration_event_in &&
340
351
  generate_self_signed_certificate == o.generate_self_signed_certificate &&
352
+ hash_algorithm == o.hash_algorithm &&
341
353
  json == o.json &&
342
354
  metadata == o.metadata &&
343
355
  name == o.name &&
@@ -358,7 +370,7 @@ module Akeyless
358
370
  # Calculates hash code according to all attributes.
359
371
  # @return [Integer] Hash code
360
372
  def hash
361
- [alg, auto_rotate, certificate_common_name, certificate_country, certificate_digest_algo, certificate_format, certificate_locality, certificate_organization, certificate_province, certificate_ttl, conf_file_data, customer_frg_id, delete_protection, description, expiration_event_in, generate_self_signed_certificate, json, metadata, name, rotation_event_in, rotation_interval, split_level, tag, token, uid_token].hash
373
+ [alg, auto_rotate, certificate_common_name, certificate_country, certificate_digest_algo, certificate_format, certificate_locality, certificate_organization, certificate_province, certificate_ttl, conf_file_data, customer_frg_id, delete_protection, description, expiration_event_in, generate_self_signed_certificate, hash_algorithm, json, metadata, name, rotation_event_in, rotation_interval, split_level, tag, token, uid_token].hash
362
374
  end
363
375
 
364
376
  # Builds the object from hash
@@ -25,7 +25,7 @@ module Akeyless
25
25
  # Country name for the generated certificate. Relevant only for generate-self-signed-certificate.
26
26
  attr_accessor :certificate_country
27
27
 
28
- # Digest algorithm to be used for the certificate key signing. Currently, we support only \"sha256\" so we hide this option for CLI.
28
+ # Digest algorithm to be used for the certificate key signing.
29
29
  attr_accessor :certificate_digest_algo
30
30
 
31
31
  # Locality for the generated certificate. Relevant only for generate-self-signed-certificate.
@@ -55,6 +55,9 @@ module Akeyless
55
55
  # Whether to generate a self signed certificate with the key. If set, --certificate-ttl must be provided.
56
56
  attr_accessor :generate_self_signed_certificate
57
57
 
58
+ # Specifies the hash algorithm used for the encryption key's operations, available options: [SHA256, SHA384, SHA512]
59
+ attr_accessor :hash_algorithm
60
+
58
61
  # Set output format to JSON
59
62
  attr_accessor :json
60
63
 
@@ -92,6 +95,7 @@ module Akeyless
92
95
  :'delete_protection' => :'delete_protection',
93
96
  :'description' => :'description',
94
97
  :'generate_self_signed_certificate' => :'generate-self-signed-certificate',
98
+ :'hash_algorithm' => :'hash-algorithm',
95
99
  :'json' => :'json',
96
100
  :'metadata' => :'metadata',
97
101
  :'name' => :'name',
@@ -123,6 +127,7 @@ module Akeyless
123
127
  :'delete_protection' => :'String',
124
128
  :'description' => :'String',
125
129
  :'generate_self_signed_certificate' => :'Boolean',
130
+ :'hash_algorithm' => :'String',
126
131
  :'json' => :'Boolean',
127
132
  :'metadata' => :'String',
128
133
  :'name' => :'String',
@@ -208,6 +213,12 @@ module Akeyless
208
213
  self.generate_self_signed_certificate = attributes[:'generate_self_signed_certificate']
209
214
  end
210
215
 
216
+ if attributes.key?(:'hash_algorithm')
217
+ self.hash_algorithm = attributes[:'hash_algorithm']
218
+ else
219
+ self.hash_algorithm = 'SHA256'
220
+ end
221
+
211
222
  if attributes.key?(:'json')
212
223
  self.json = attributes[:'json']
213
224
  else
@@ -288,6 +299,7 @@ module Akeyless
288
299
  delete_protection == o.delete_protection &&
289
300
  description == o.description &&
290
301
  generate_self_signed_certificate == o.generate_self_signed_certificate &&
302
+ hash_algorithm == o.hash_algorithm &&
291
303
  json == o.json &&
292
304
  metadata == o.metadata &&
293
305
  name == o.name &&
@@ -306,7 +318,7 @@ module Akeyless
306
318
  # Calculates hash code according to all attributes.
307
319
  # @return [Integer] Hash code
308
320
  def hash
309
- [alg, certificate_common_name, certificate_country, certificate_digest_algo, certificate_locality, certificate_organization, certificate_province, certificate_ttl, conf_file_data, customer_frg_id, delete_protection, description, generate_self_signed_certificate, json, metadata, name, split_level, tag, token, uid_token].hash
321
+ [alg, certificate_common_name, certificate_country, certificate_digest_algo, certificate_locality, certificate_organization, certificate_province, certificate_ttl, conf_file_data, customer_frg_id, delete_protection, description, generate_self_signed_certificate, hash_algorithm, json, metadata, name, split_level, tag, token, uid_token].hash
310
322
  end
311
323
 
312
324
  # Builds the object from hash
@@ -45,6 +45,9 @@ module Akeyless
45
45
  # Role name
46
46
  attr_accessor :name
47
47
 
48
+ # Allow this role to view Reverse RBAC. Supported values: 'own', 'all'.
49
+ attr_accessor :reverse_rbac_access
50
+
48
51
  # Allow this role to view SRA Clusters. Currently only 'none', 'own', 'all' values are supported.
49
52
  attr_accessor :sra_reports_access
50
53
 
@@ -70,6 +73,7 @@ module Akeyless
70
73
  :'gw_analytics_access' => :'gw-analytics-access',
71
74
  :'json' => :'json',
72
75
  :'name' => :'name',
76
+ :'reverse_rbac_access' => :'reverse-rbac-access',
73
77
  :'sra_reports_access' => :'sra-reports-access',
74
78
  :'token' => :'token',
75
79
  :'uid_token' => :'uid-token',
@@ -95,6 +99,7 @@ module Akeyless
95
99
  :'gw_analytics_access' => :'String',
96
100
  :'json' => :'Boolean',
97
101
  :'name' => :'String',
102
+ :'reverse_rbac_access' => :'String',
98
103
  :'sra_reports_access' => :'String',
99
104
  :'token' => :'String',
100
105
  :'uid_token' => :'String',
@@ -167,6 +172,10 @@ module Akeyless
167
172
  self.name = nil
168
173
  end
169
174
 
175
+ if attributes.key?(:'reverse_rbac_access')
176
+ self.reverse_rbac_access = attributes[:'reverse_rbac_access']
177
+ end
178
+
170
179
  if attributes.key?(:'sra_reports_access')
171
180
  self.sra_reports_access = attributes[:'sra_reports_access']
172
181
  end
@@ -219,6 +228,7 @@ module Akeyless
219
228
  gw_analytics_access == o.gw_analytics_access &&
220
229
  json == o.json &&
221
230
  name == o.name &&
231
+ reverse_rbac_access == o.reverse_rbac_access &&
222
232
  sra_reports_access == o.sra_reports_access &&
223
233
  token == o.token &&
224
234
  uid_token == o.uid_token &&
@@ -234,7 +244,7 @@ module Akeyless
234
244
  # Calculates hash code according to all attributes.
235
245
  # @return [Integer] Hash code
236
246
  def hash
237
- [analytics_access, audit_access, comment, delete_protection, description, event_center_access, event_forwarders_access, gw_analytics_access, json, name, sra_reports_access, token, uid_token, usage_reports_access].hash
247
+ [analytics_access, audit_access, comment, delete_protection, description, event_center_access, event_forwarders_access, gw_analytics_access, json, name, reverse_rbac_access, sra_reports_access, token, uid_token, usage_reports_access].hash
238
248
  end
239
249
 
240
250
  # Builds the object from hash
@@ -33,7 +33,7 @@ module Akeyless
33
33
  # Allowed access name
34
34
  attr_accessor :name
35
35
 
36
- # Permissions Comma-seperated list of permissions for this allowed access. Available permissions: [defaults,targets,classic_keys,automatic_migration,ldap_auth,dynamic_secret,k8s_auth,log_forwarding,zero_knowledge_encryption,rotated_secret,caching,event_forwarding,admin,kmip,general]
36
+ # Permissions Comma-seperated list of permissions for this allowed access. Available permissions: [defaults,targets,classic_keys,automatic_migration,ldap_auth,dynamic_secret,k8s_auth,log_forwarding,zero_knowledge_encryption,rotated_secret,caching,event_forwarding,admin,kmip,general,rotate_secret_value]
37
37
  attr_accessor :permissions
38
38
 
39
39
  # Sub claims key/val of sub claims, e.g group=admins,developers
@@ -36,7 +36,7 @@ module Akeyless
36
36
  # New allowed access name
37
37
  attr_accessor :new_name
38
38
 
39
- # Permissions Comma-seperated list of permissions for this allowed access. Available permissions: [defaults,targets,classic_keys,automatic_migration,ldap_auth,dynamic_secret,k8s_auth,log_forwarding,zero_knowledge_encryption,rotated_secret,caching,event_forwarding,admin,kmip,general]
39
+ # Permissions Comma-seperated list of permissions for this allowed access. Available permissions: [defaults,targets,classic_keys,automatic_migration,ldap_auth,dynamic_secret,k8s_auth,log_forwarding,zero_knowledge_encryption,rotated_secret,caching,event_forwarding,admin,kmip,general,rotate_secret_value]
40
40
  attr_accessor :permissions
41
41
 
42
42
  # Sub claims key/val of sub claims, e.g group=admins,developers
@@ -19,6 +19,9 @@ module Akeyless
19
19
  # Enable Log Forwarding [true/false]
20
20
  attr_accessor :enable
21
21
 
22
+ # Enable batch forwarding [true/false]
23
+ attr_accessor :enable_batch
24
+
22
25
  # Set output format to JSON
23
26
  attr_accessor :json
24
27
 
@@ -44,6 +47,7 @@ module Akeyless
44
47
  def self.attribute_map
45
48
  {
46
49
  :'enable' => :'enable',
50
+ :'enable_batch' => :'enable-batch',
47
51
  :'json' => :'json',
48
52
  :'output_format' => :'output-format',
49
53
  :'pull_interval' => :'pull-interval',
@@ -63,6 +67,7 @@ module Akeyless
63
67
  def self.openapi_types
64
68
  {
65
69
  :'enable' => :'String',
70
+ :'enable_batch' => :'String',
66
71
  :'json' => :'Boolean',
67
72
  :'output_format' => :'String',
68
73
  :'pull_interval' => :'String',
@@ -100,6 +105,12 @@ module Akeyless
100
105
  self.enable = 'true'
101
106
  end
102
107
 
108
+ if attributes.key?(:'enable_batch')
109
+ self.enable_batch = attributes[:'enable_batch']
110
+ else
111
+ self.enable_batch = 'true'
112
+ end
113
+
103
114
  if attributes.key?(:'json')
104
115
  self.json = attributes[:'json']
105
116
  else
@@ -156,6 +167,7 @@ module Akeyless
156
167
  return true if self.equal?(o)
157
168
  self.class == o.class &&
158
169
  enable == o.enable &&
170
+ enable_batch == o.enable_batch &&
159
171
  json == o.json &&
160
172
  output_format == o.output_format &&
161
173
  pull_interval == o.pull_interval &&
@@ -174,7 +186,7 @@ module Akeyless
174
186
  # Calculates hash code according to all attributes.
175
187
  # @return [Integer] Hash code
176
188
  def hash
177
- [enable, json, output_format, pull_interval, token, uid_token, workspace_id, workspace_key].hash
189
+ [enable, enable_batch, json, output_format, pull_interval, token, uid_token, workspace_id, workspace_key].hash
178
190
  end
179
191
 
180
192
  # Builds the object from hash
@@ -19,6 +19,9 @@ module Akeyless
19
19
  # Enable Log Forwarding [true/false]
20
20
  attr_accessor :enable
21
21
 
22
+ # Enable batch forwarding [true/false]
23
+ attr_accessor :enable_batch
24
+
22
25
  # Enable tls
23
26
  attr_accessor :enable_tls
24
27
 
@@ -59,6 +62,7 @@ module Akeyless
59
62
  def self.attribute_map
60
63
  {
61
64
  :'enable' => :'enable',
65
+ :'enable_batch' => :'enable-batch',
62
66
  :'enable_tls' => :'enable-tls',
63
67
  :'index' => :'index',
64
68
  :'json' => :'json',
@@ -83,6 +87,7 @@ module Akeyless
83
87
  def self.openapi_types
84
88
  {
85
89
  :'enable' => :'String',
90
+ :'enable_batch' => :'String',
86
91
  :'enable_tls' => :'Boolean',
87
92
  :'index' => :'String',
88
93
  :'json' => :'Boolean',
@@ -125,6 +130,12 @@ module Akeyless
125
130
  self.enable = 'true'
126
131
  end
127
132
 
133
+ if attributes.key?(:'enable_batch')
134
+ self.enable_batch = attributes[:'enable_batch']
135
+ else
136
+ self.enable_batch = 'true'
137
+ end
138
+
128
139
  if attributes.key?(:'enable_tls')
129
140
  self.enable_tls = attributes[:'enable_tls']
130
141
  end
@@ -207,6 +218,7 @@ module Akeyless
207
218
  return true if self.equal?(o)
208
219
  self.class == o.class &&
209
220
  enable == o.enable &&
221
+ enable_batch == o.enable_batch &&
210
222
  enable_tls == o.enable_tls &&
211
223
  index == o.index &&
212
224
  json == o.json &&
@@ -230,7 +242,7 @@ module Akeyless
230
242
  # Calculates hash code according to all attributes.
231
243
  # @return [Integer] Hash code
232
244
  def hash
233
- [enable, enable_tls, index, json, output_format, pull_interval, source, source_type, splunk_token, splunk_url, tls_certificate, token, uid_token].hash
245
+ [enable, enable_batch, enable_tls, index, json, output_format, pull_interval, source, source_type, splunk_token, splunk_url, tls_certificate, token, uid_token].hash
234
246
  end
235
247
 
236
248
  # Builds the object from hash
@@ -0,0 +1,233 @@
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
+ # GeminiTargetDetails defines details related to connecting to a Google Gemini provider
18
+ class GeminiTargetDetails
19
+ attr_accessor :api_key
20
+
21
+ attr_accessor :gemini_url
22
+
23
+ attr_accessor :model
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'api_key' => :'api_key',
29
+ :'gemini_url' => :'gemini_url',
30
+ :'model' => :'model'
31
+ }
32
+ end
33
+
34
+ # Returns all the JSON keys this model knows about
35
+ def self.acceptable_attributes
36
+ attribute_map.values
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ def self.openapi_types
41
+ {
42
+ :'api_key' => :'String',
43
+ :'gemini_url' => :'String',
44
+ :'model' => :'String'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::GeminiTargetDetails` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ attributes = attributes.each_with_object({}) { |(k, v), h|
63
+ if (!self.class.attribute_map.key?(k.to_sym))
64
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::GeminiTargetDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
65
+ end
66
+ h[k.to_sym] = v
67
+ }
68
+
69
+ if attributes.key?(:'api_key')
70
+ self.api_key = attributes[:'api_key']
71
+ end
72
+
73
+ if attributes.key?(:'gemini_url')
74
+ self.gemini_url = attributes[:'gemini_url']
75
+ end
76
+
77
+ if attributes.key?(:'model')
78
+ self.model = attributes[:'model']
79
+ end
80
+ end
81
+
82
+ # Show invalid properties with the reasons. Usually used together with valid?
83
+ # @return Array for valid properties with the reasons
84
+ def list_invalid_properties
85
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
86
+ invalid_properties = Array.new
87
+ invalid_properties
88
+ end
89
+
90
+ # Check to see if the all the properties in the model are valid
91
+ # @return true if the model is valid
92
+ def valid?
93
+ warn '[DEPRECATED] the `valid?` method is obsolete'
94
+ true
95
+ end
96
+
97
+ # Checks equality by comparing each attribute.
98
+ # @param [Object] Object to be compared
99
+ def ==(o)
100
+ return true if self.equal?(o)
101
+ self.class == o.class &&
102
+ api_key == o.api_key &&
103
+ gemini_url == o.gemini_url &&
104
+ model == o.model
105
+ end
106
+
107
+ # @see the `==` method
108
+ # @param [Object] Object to be compared
109
+ def eql?(o)
110
+ self == o
111
+ end
112
+
113
+ # Calculates hash code according to all attributes.
114
+ # @return [Integer] Hash code
115
+ def hash
116
+ [api_key, gemini_url, model].hash
117
+ end
118
+
119
+ # Builds the object from hash
120
+ # @param [Hash] attributes Model attributes in the form of hash
121
+ # @return [Object] Returns the model itself
122
+ def self.build_from_hash(attributes)
123
+ return nil unless attributes.is_a?(Hash)
124
+ attributes = attributes.transform_keys(&:to_sym)
125
+ transformed_hash = {}
126
+ openapi_types.each_pair do |key, type|
127
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
128
+ transformed_hash["#{key}"] = nil
129
+ elsif type =~ /\AArray<(.*)>/i
130
+ # check to ensure the input is an array given that the attribute
131
+ # is documented as an array but the input is not
132
+ if attributes[attribute_map[key]].is_a?(Array)
133
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
134
+ end
135
+ elsif !attributes[attribute_map[key]].nil?
136
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
137
+ end
138
+ end
139
+ new(transformed_hash)
140
+ end
141
+
142
+ # Deserializes the data based on type
143
+ # @param string type Data type
144
+ # @param string value Value to be deserialized
145
+ # @return [Object] Deserialized data
146
+ def self._deserialize(type, value)
147
+ case type.to_sym
148
+ when :Time
149
+ Time.parse(value)
150
+ when :Date
151
+ Date.parse(value)
152
+ when :String
153
+ value.to_s
154
+ when :Integer
155
+ value.to_i
156
+ when :Float
157
+ value.to_f
158
+ when :Boolean
159
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
160
+ true
161
+ else
162
+ false
163
+ end
164
+ when :Object
165
+ # generic object (usually a Hash), return directly
166
+ value
167
+ when /\AArray<(?<inner_type>.+)>\z/
168
+ inner_type = Regexp.last_match[:inner_type]
169
+ value.map { |v| _deserialize(inner_type, v) }
170
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
171
+ k_type = Regexp.last_match[:k_type]
172
+ v_type = Regexp.last_match[:v_type]
173
+ {}.tap do |hash|
174
+ value.each do |k, v|
175
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
176
+ end
177
+ end
178
+ else # model
179
+ # models (e.g. Pet) or oneOf
180
+ klass = Akeyless.const_get(type)
181
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
182
+ end
183
+ end
184
+
185
+ # Returns the string representation of the object
186
+ # @return [String] String presentation of the object
187
+ def to_s
188
+ to_hash.to_s
189
+ end
190
+
191
+ # to_body is an alias to to_hash (backward compatibility)
192
+ # @return [Hash] Returns the object in the form of hash
193
+ def to_body
194
+ to_hash
195
+ end
196
+
197
+ # Returns the object in the form of hash
198
+ # @return [Hash] Returns the object in the form of hash
199
+ def to_hash
200
+ hash = {}
201
+ self.class.attribute_map.each_pair do |attr, param|
202
+ value = self.send(attr)
203
+ if value.nil?
204
+ is_nullable = self.class.openapi_nullable.include?(attr)
205
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
206
+ end
207
+
208
+ hash[param] = _to_hash(value)
209
+ end
210
+ hash
211
+ end
212
+
213
+ # Outputs non-array value in the form of hash
214
+ # For object, use to_hash. Otherwise, just return the value
215
+ # @param [Object] value Any valid value
216
+ # @return [Hash] Returns the value in the form of hash
217
+ def _to_hash(value)
218
+ if value.is_a?(Array)
219
+ value.compact.map { |v| _to_hash(v) }
220
+ elsif value.is_a?(Hash)
221
+ {}.tap do |hash|
222
+ value.each { |k, v| hash[k] = _to_hash(v) }
223
+ end
224
+ elsif value.respond_to? :to_hash
225
+ value.to_hash
226
+ else
227
+ value
228
+ end
229
+ end
230
+
231
+ end
232
+
233
+ end
@@ -47,6 +47,9 @@ module Akeyless
47
47
  # Generate a new classic key for the csr
48
48
  attr_accessor :generate_key
49
49
 
50
+ # Specifies the hash algorithm used for the encryption key's operations, available options: SHA256, SHA384, SHA512
51
+ attr_accessor :hash_algorithm
52
+
50
53
  # A comma-separated list of ip addresses alternative names
51
54
  attr_accessor :ip_addresses
52
55
 
@@ -91,6 +94,7 @@ module Akeyless
91
94
  :'email_addresses' => :'email-addresses',
92
95
  :'export_private_key' => :'export-private-key',
93
96
  :'generate_key' => :'generate-key',
97
+ :'hash_algorithm' => :'hash-algorithm',
94
98
  :'ip_addresses' => :'ip-addresses',
95
99
  :'json' => :'json',
96
100
  :'key_type' => :'key-type',
@@ -123,6 +127,7 @@ module Akeyless
123
127
  :'email_addresses' => :'String',
124
128
  :'export_private_key' => :'Boolean',
125
129
  :'generate_key' => :'Boolean',
130
+ :'hash_algorithm' => :'String',
126
131
  :'ip_addresses' => :'String',
127
132
  :'json' => :'Boolean',
128
133
  :'key_type' => :'String',
@@ -205,6 +210,12 @@ module Akeyless
205
210
  self.generate_key = attributes[:'generate_key']
206
211
  end
207
212
 
213
+ if attributes.key?(:'hash_algorithm')
214
+ self.hash_algorithm = attributes[:'hash_algorithm']
215
+ else
216
+ self.hash_algorithm = 'SHA256'
217
+ end
218
+
208
219
  if attributes.key?(:'ip_addresses')
209
220
  self.ip_addresses = attributes[:'ip_addresses']
210
221
  end
@@ -300,6 +311,7 @@ module Akeyless
300
311
  email_addresses == o.email_addresses &&
301
312
  export_private_key == o.export_private_key &&
302
313
  generate_key == o.generate_key &&
314
+ hash_algorithm == o.hash_algorithm &&
303
315
  ip_addresses == o.ip_addresses &&
304
316
  json == o.json &&
305
317
  key_type == o.key_type &&
@@ -321,7 +333,7 @@ module Akeyless
321
333
  # Calculates hash code according to all attributes.
322
334
  # @return [Integer] Hash code
323
335
  def hash
324
- [alg, alt_names, certificate_type, city, common_name, country, critical, dep, email_addresses, export_private_key, generate_key, ip_addresses, json, key_type, name, org, split_level, state, token, uid_token, uri_sans].hash
336
+ [alg, alt_names, certificate_type, city, common_name, country, critical, dep, email_addresses, export_private_key, generate_key, hash_algorithm, ip_addresses, json, key_type, name, org, split_level, state, token, uid_token, uri_sans].hash
325
337
  end
326
338
 
327
339
  # Builds the object from hash