akeyless 3.1.0 → 3.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +24 -1
  3. data/docs/AssocTargetItem.md +2 -0
  4. data/docs/CreateCertificate.md +40 -0
  5. data/docs/CreateCertificateOutput.md +18 -0
  6. data/docs/CreateClassicKey.md +6 -2
  7. data/docs/CreateDBTarget.md +4 -0
  8. data/docs/CreateDFCKey.md +3 -1
  9. data/docs/CreateDynamicSecret.md +3 -1
  10. data/docs/CreateKey.md +3 -1
  11. data/docs/CreatePKICertIssuer.md +3 -1
  12. data/docs/CreateRotatedSecret.md +3 -1
  13. data/docs/CreateSSHCertIssuer.md +3 -1
  14. data/docs/CreateSecret.md +3 -1
  15. data/docs/CreateTokenizer.md +3 -1
  16. data/docs/DSProducerDetails.md +8 -0
  17. data/docs/DecryptGPG.md +34 -0
  18. data/docs/DecryptGPGOutput.md +18 -0
  19. data/docs/EncryptGPG.md +32 -0
  20. data/docs/EncryptGPGOutput.md +18 -0
  21. data/docs/GatewayCreateProducerSnowflake.md +4 -0
  22. data/docs/GatewayUpdateItem.md +3 -1
  23. data/docs/GatewayUpdateProducerSnowflake.md +4 -0
  24. data/docs/GatewayUpdateTlsCert.md +26 -0
  25. data/docs/GatewayUpdateTlsCertOutput.md +18 -0
  26. data/docs/GenCustomerFragment.md +4 -2
  27. data/docs/GetCertificateValue.md +26 -0
  28. data/docs/GetCertificateValueOutput.md +20 -0
  29. data/docs/ListSRABastions.md +2 -0
  30. data/docs/RotateKey.md +2 -0
  31. data/docs/SignGPG.md +32 -0
  32. data/docs/SignGPGOutput.md +18 -0
  33. data/docs/TargetTypeDetailsInput.md +4 -0
  34. data/docs/UpdateCertificateOutput.md +18 -0
  35. data/docs/UpdateCertificateValue.md +32 -0
  36. data/docs/UpdateDBTarget.md +4 -0
  37. data/docs/UpdateItem.md +3 -1
  38. data/docs/UpdatePKICertIssuer.md +3 -1
  39. data/docs/UpdateRotatedSecret.md +3 -1
  40. data/docs/UpdateSSHCertIssuer.md +3 -1
  41. data/docs/UploadPKCS12.md +3 -1
  42. data/docs/UploadRSA.md +3 -1
  43. data/docs/V2Api.md +504 -0
  44. data/docs/VerifyGPG.md +32 -0
  45. data/lib/akeyless/api/v2_api.rb +512 -0
  46. data/lib/akeyless/models/assoc_target_item.rb +11 -1
  47. data/lib/akeyless/models/create_certificate.rb +339 -0
  48. data/lib/akeyless/models/create_certificate_output.rb +219 -0
  49. data/lib/akeyless/models/create_classic_key.rb +23 -3
  50. data/lib/akeyless/models/create_db_target.rb +21 -1
  51. data/lib/akeyless/models/create_dfc_key.rb +12 -2
  52. data/lib/akeyless/models/create_dynamic_secret.rb +12 -4
  53. data/lib/akeyless/models/create_key.rb +12 -2
  54. data/lib/akeyless/models/create_pki_cert_issuer.rb +12 -2
  55. data/lib/akeyless/models/create_rotated_secret.rb +12 -2
  56. data/lib/akeyless/models/create_secret.rb +12 -2
  57. data/lib/akeyless/models/create_ssh_cert_issuer.rb +12 -2
  58. data/lib/akeyless/models/create_tokenizer.rb +12 -2
  59. data/lib/akeyless/models/decrypt_gpg.rb +310 -0
  60. data/lib/akeyless/models/decrypt_gpg_output.rb +219 -0
  61. data/lib/akeyless/models/ds_producer_details.rb +40 -1
  62. data/lib/akeyless/models/encrypt_gpg.rb +300 -0
  63. data/lib/akeyless/models/encrypt_gpg_output.rb +219 -0
  64. data/lib/akeyless/models/gateway_create_producer_snowflake.rb +22 -2
  65. data/lib/akeyless/models/gateway_update_item.rb +14 -2
  66. data/lib/akeyless/models/gateway_update_producer_snowflake.rb +22 -2
  67. data/lib/akeyless/models/gateway_update_tls_cert.rb +261 -0
  68. data/lib/akeyless/models/gateway_update_tls_cert_output.rb +219 -0
  69. data/lib/akeyless/models/gen_customer_fragment.rb +15 -5
  70. data/lib/akeyless/models/get_certificate_value.rb +265 -0
  71. data/lib/akeyless/models/get_certificate_value_output.rb +228 -0
  72. data/lib/akeyless/models/list_sra_bastions.rb +10 -1
  73. data/lib/akeyless/models/rotate_key.rb +11 -1
  74. data/lib/akeyless/models/sign_gpg.rb +300 -0
  75. data/lib/akeyless/models/sign_gpg_output.rb +219 -0
  76. data/lib/akeyless/models/target_type_details_input.rb +20 -1
  77. data/lib/akeyless/models/update_certificate_output.rb +219 -0
  78. data/lib/akeyless/models/update_certificate_value.rb +297 -0
  79. data/lib/akeyless/models/update_db_target.rb +21 -1
  80. data/lib/akeyless/models/update_item.rb +14 -2
  81. data/lib/akeyless/models/update_pki_cert_issuer.rb +12 -2
  82. data/lib/akeyless/models/update_rotated_secret.rb +14 -2
  83. data/lib/akeyless/models/update_ssh_cert_issuer.rb +12 -2
  84. data/lib/akeyless/models/upload_pkcs12.rb +12 -2
  85. data/lib/akeyless/models/upload_rsa.rb +12 -2
  86. data/lib/akeyless/models/verify_gpg.rb +300 -0
  87. data/lib/akeyless/version.rb +1 -1
  88. data/lib/akeyless.rb +15 -0
  89. data/spec/models/create_certificate_output_spec.rb +34 -0
  90. data/spec/models/create_certificate_spec.rb +94 -0
  91. data/spec/models/decrypt_gpg_output_spec.rb +34 -0
  92. data/spec/models/decrypt_gpg_spec.rb +82 -0
  93. data/spec/models/encrypt_gpg_output_spec.rb +34 -0
  94. data/spec/models/encrypt_gpg_spec.rb +76 -0
  95. data/spec/models/gateway_update_tls_cert_output_spec.rb +34 -0
  96. data/spec/models/gateway_update_tls_cert_spec.rb +58 -0
  97. data/spec/models/get_certificate_value_output_spec.rb +40 -0
  98. data/spec/models/get_certificate_value_spec.rb +58 -0
  99. data/spec/models/sign_gpg_output_spec.rb +34 -0
  100. data/spec/models/sign_gpg_spec.rb +76 -0
  101. data/spec/models/update_certificate_output_spec.rb +34 -0
  102. data/spec/models/update_certificate_value_spec.rb +76 -0
  103. data/spec/models/verify_gpg_spec.rb +76 -0
  104. metadata +600 -540
@@ -31,6 +31,9 @@ module Akeyless
31
31
 
32
32
  attr_accessor :custom_payload
33
33
 
34
+ # Description of the object
35
+ attr_accessor :description
36
+
34
37
  # Base64-encoded service account private key text
35
38
  attr_accessor :gcp_key
36
39
 
@@ -45,7 +48,7 @@ module Akeyless
45
48
  # Secret name
46
49
  attr_accessor :name
47
50
 
48
- # New item metadata
51
+ # Deprecated - use description
49
52
  attr_accessor :new_metadata
50
53
 
51
54
  # New item name
@@ -133,6 +136,7 @@ module Akeyless
133
136
  :'auto_rotate' => :'auto-rotate',
134
137
  :'aws_region' => :'aws-region',
135
138
  :'custom_payload' => :'custom-payload',
139
+ :'description' => :'description',
136
140
  :'gcp_key' => :'gcp-key',
137
141
  :'json' => :'json',
138
142
  :'keep_prev_version' => :'keep-prev-version',
@@ -183,6 +187,7 @@ module Akeyless
183
187
  :'auto_rotate' => :'String',
184
188
  :'aws_region' => :'String',
185
189
  :'custom_payload' => :'String',
190
+ :'description' => :'String',
186
191
  :'gcp_key' => :'String',
187
192
  :'json' => :'Boolean',
188
193
  :'keep_prev_version' => :'String',
@@ -268,6 +273,12 @@ module Akeyless
268
273
  self.custom_payload = attributes[:'custom_payload']
269
274
  end
270
275
 
276
+ if attributes.key?(:'description')
277
+ self.description = attributes[:'description']
278
+ else
279
+ self.description = 'default_metadata'
280
+ end
281
+
271
282
  if attributes.key?(:'gcp_key')
272
283
  self.gcp_key = attributes[:'gcp_key']
273
284
  end
@@ -444,6 +455,7 @@ module Akeyless
444
455
  auto_rotate == o.auto_rotate &&
445
456
  aws_region == o.aws_region &&
446
457
  custom_payload == o.custom_payload &&
458
+ description == o.description &&
447
459
  gcp_key == o.gcp_key &&
448
460
  json == o.json &&
449
461
  keep_prev_version == o.keep_prev_version &&
@@ -488,7 +500,7 @@ module Akeyless
488
500
  # Calculates hash code according to all attributes.
489
501
  # @return [Integer] Hash code
490
502
  def hash
491
- [add_tag, api_id, api_key, auto_rotate, aws_region, custom_payload, gcp_key, json, keep_prev_version, key, name, new_metadata, new_name, new_version, rm_tag, rotated_password, rotated_username, rotation_hour, rotation_interval, rotator_creds_type, rotator_custom_cmd, secure_access_allow_external_user, secure_access_aws_account_id, secure_access_aws_native_cli, secure_access_bastion_issuer, secure_access_db_name, secure_access_db_schema, secure_access_enable, secure_access_host, secure_access_rdp_domain, secure_access_rdp_user, secure_access_web, secure_access_web_browsing, secure_access_web_proxy, ssh_password, ssh_username, storage_account_key_name, token, uid_token].hash
503
+ [add_tag, api_id, api_key, auto_rotate, aws_region, custom_payload, description, gcp_key, json, keep_prev_version, key, name, new_metadata, new_name, new_version, rm_tag, rotated_password, rotated_username, rotation_hour, rotation_interval, rotator_creds_type, rotator_custom_cmd, secure_access_allow_external_user, secure_access_aws_account_id, secure_access_aws_native_cli, secure_access_bastion_issuer, secure_access_db_name, secure_access_db_schema, secure_access_enable, secure_access_host, secure_access_rdp_domain, secure_access_rdp_user, secure_access_web, secure_access_web_browsing, secure_access_web_proxy, ssh_password, ssh_username, storage_account_key_name, token, uid_token].hash
492
504
  end
493
505
 
494
506
  # Builds the object from hash
@@ -21,13 +21,16 @@ module Akeyless
21
21
  # Users allowed to fetch the certificate, e.g root,ubuntu
22
22
  attr_accessor :allowed_users
23
23
 
24
+ # Description of the object
25
+ attr_accessor :description
26
+
24
27
  # Signed certificates with extensions, e.g permit-port-forwarding=\\\"\\\"
25
28
  attr_accessor :extensions
26
29
 
27
30
  # Set output format to JSON
28
31
  attr_accessor :json
29
32
 
30
- # A metadata about the issuer
33
+ # Deprecated - use description
31
34
  attr_accessor :metadata
32
35
 
33
36
  # SSH certificate issuer name
@@ -71,6 +74,7 @@ module Akeyless
71
74
  {
72
75
  :'add_tag' => :'add-tag',
73
76
  :'allowed_users' => :'allowed-users',
77
+ :'description' => :'description',
74
78
  :'extensions' => :'extensions',
75
79
  :'json' => :'json',
76
80
  :'metadata' => :'metadata',
@@ -101,6 +105,7 @@ module Akeyless
101
105
  {
102
106
  :'add_tag' => :'Array<String>',
103
107
  :'allowed_users' => :'String',
108
+ :'description' => :'String',
104
109
  :'extensions' => :'Hash<String, String>',
105
110
  :'json' => :'Boolean',
106
111
  :'metadata' => :'String',
@@ -152,6 +157,10 @@ module Akeyless
152
157
  self.allowed_users = attributes[:'allowed_users']
153
158
  end
154
159
 
160
+ if attributes.key?(:'description')
161
+ self.description = attributes[:'description']
162
+ end
163
+
155
164
  if attributes.key?(:'extensions')
156
165
  if (value = attributes[:'extensions']).is_a?(Hash)
157
166
  self.extensions = value
@@ -267,6 +276,7 @@ module Akeyless
267
276
  self.class == o.class &&
268
277
  add_tag == o.add_tag &&
269
278
  allowed_users == o.allowed_users &&
279
+ description == o.description &&
270
280
  extensions == o.extensions &&
271
281
  json == o.json &&
272
282
  metadata == o.metadata &&
@@ -295,7 +305,7 @@ module Akeyless
295
305
  # Calculates hash code according to all attributes.
296
306
  # @return [Integer] Hash code
297
307
  def hash
298
- [add_tag, allowed_users, extensions, json, metadata, name, new_name, principals, rm_tag, secure_access_bastion_api, secure_access_bastion_ssh, secure_access_enable, secure_access_host, secure_access_ssh_creds_user, secure_access_use_internal_bastion, signer_key_name, token, ttl, uid_token].hash
308
+ [add_tag, allowed_users, description, extensions, json, metadata, name, new_name, principals, rm_tag, secure_access_bastion_api, secure_access_bastion_ssh, secure_access_enable, secure_access_host, secure_access_ssh_creds_user, secure_access_use_internal_bastion, signer_key_name, token, ttl, uid_token].hash
299
309
  end
300
310
 
301
311
  # Builds the object from hash
@@ -21,13 +21,16 @@ module Akeyless
21
21
  # Protection from accidental deletion of this item
22
22
  attr_accessor :delete_protection
23
23
 
24
+ # Description of the object
25
+ attr_accessor :description
26
+
24
27
  # PKCS#12 input file (private key and certificate only)
25
28
  attr_accessor :_in
26
29
 
27
30
  # Set output format to JSON
28
31
  attr_accessor :json
29
32
 
30
- # A metadata about the key
33
+ # Deprecated - use description
31
34
  attr_accessor :metadata
32
35
 
33
36
  # Name of key to be created
@@ -53,6 +56,7 @@ module Akeyless
53
56
  {
54
57
  :'customer_frg_id' => :'customer-frg-id',
55
58
  :'delete_protection' => :'delete_protection',
59
+ :'description' => :'description',
56
60
  :'_in' => :'in',
57
61
  :'json' => :'json',
58
62
  :'metadata' => :'metadata',
@@ -75,6 +79,7 @@ module Akeyless
75
79
  {
76
80
  :'customer_frg_id' => :'String',
77
81
  :'delete_protection' => :'String',
82
+ :'description' => :'String',
78
83
  :'_in' => :'String',
79
84
  :'json' => :'Boolean',
80
85
  :'metadata' => :'String',
@@ -116,6 +121,10 @@ module Akeyless
116
121
  self.delete_protection = attributes[:'delete_protection']
117
122
  end
118
123
 
124
+ if attributes.key?(:'description')
125
+ self.description = attributes[:'description']
126
+ end
127
+
119
128
  if attributes.key?(:'_in')
120
129
  self._in = attributes[:'_in']
121
130
  end
@@ -192,6 +201,7 @@ module Akeyless
192
201
  self.class == o.class &&
193
202
  customer_frg_id == o.customer_frg_id &&
194
203
  delete_protection == o.delete_protection &&
204
+ description == o.description &&
195
205
  _in == o._in &&
196
206
  json == o.json &&
197
207
  metadata == o.metadata &&
@@ -212,7 +222,7 @@ module Akeyless
212
222
  # Calculates hash code according to all attributes.
213
223
  # @return [Integer] Hash code
214
224
  def hash
215
- [customer_frg_id, delete_protection, _in, json, metadata, name, passphrase, split_level, tag, token, uid_token].hash
225
+ [customer_frg_id, delete_protection, description, _in, json, metadata, name, passphrase, split_level, tag, token, uid_token].hash
216
226
  end
217
227
 
218
228
  # Builds the object from hash
@@ -27,10 +27,13 @@ module Akeyless
27
27
  # Protection from accidental deletion of this item
28
28
  attr_accessor :delete_protection
29
29
 
30
+ # Description of the object
31
+ attr_accessor :description
32
+
30
33
  # Set output format to JSON
31
34
  attr_accessor :json
32
35
 
33
- # A metadata about the key
36
+ # Deprecated - use description
34
37
  attr_accessor :metadata
35
38
 
36
39
  # Name of key to be created
@@ -61,6 +64,7 @@ module Akeyless
61
64
  :'cert_file_data' => :'cert-file-data',
62
65
  :'customer_frg_id' => :'customer-frg-id',
63
66
  :'delete_protection' => :'delete_protection',
67
+ :'description' => :'description',
64
68
  :'json' => :'json',
65
69
  :'metadata' => :'metadata',
66
70
  :'name' => :'name',
@@ -85,6 +89,7 @@ module Akeyless
85
89
  :'cert_file_data' => :'String',
86
90
  :'customer_frg_id' => :'String',
87
91
  :'delete_protection' => :'String',
92
+ :'description' => :'String',
88
93
  :'json' => :'Boolean',
89
94
  :'metadata' => :'String',
90
95
  :'name' => :'String',
@@ -134,6 +139,10 @@ module Akeyless
134
139
  self.delete_protection = attributes[:'delete_protection']
135
140
  end
136
141
 
142
+ if attributes.key?(:'description')
143
+ self.description = attributes[:'description']
144
+ end
145
+
137
146
  if attributes.key?(:'json')
138
147
  self.json = attributes[:'json']
139
148
  end
@@ -207,6 +216,7 @@ module Akeyless
207
216
  cert_file_data == o.cert_file_data &&
208
217
  customer_frg_id == o.customer_frg_id &&
209
218
  delete_protection == o.delete_protection &&
219
+ description == o.description &&
210
220
  json == o.json &&
211
221
  metadata == o.metadata &&
212
222
  name == o.name &&
@@ -227,7 +237,7 @@ module Akeyless
227
237
  # Calculates hash code according to all attributes.
228
238
  # @return [Integer] Hash code
229
239
  def hash
230
- [alg, cert_file_data, customer_frg_id, delete_protection, json, metadata, name, overwrite, rsa_file_data, split_level, tag, token, uid_token].hash
240
+ [alg, cert_file_data, customer_frg_id, delete_protection, description, json, metadata, name, overwrite, rsa_file_data, split_level, tag, token, uid_token].hash
231
241
  end
232
242
 
233
243
  # Builds the object from hash
@@ -0,0 +1,300 @@
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.3.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Akeyless
17
+ class VerifyGPG
18
+ # The display id of the key to use in the encryption process
19
+ attr_accessor :display_id
20
+
21
+ # The item id of the key to use in the encryption process
22
+ attr_accessor :item_id
23
+
24
+ # Set output format to JSON
25
+ attr_accessor :json
26
+
27
+ # The name of the key to use in the encryption process
28
+ attr_accessor :key_name
29
+
30
+ # Passphrase that was used to generate the key
31
+ attr_accessor :passphrase
32
+
33
+ # The signature to be verified in base64 format
34
+ attr_accessor :signature
35
+
36
+ # Authentication token (see `/auth` and `/configure`)
37
+ attr_accessor :token
38
+
39
+ # The universal identity token, Required only for universal_identity authentication
40
+ attr_accessor :uid_token
41
+
42
+ # Attribute mapping from ruby-style variable name to JSON key.
43
+ def self.attribute_map
44
+ {
45
+ :'display_id' => :'display-id',
46
+ :'item_id' => :'item-id',
47
+ :'json' => :'json',
48
+ :'key_name' => :'key-name',
49
+ :'passphrase' => :'passphrase',
50
+ :'signature' => :'signature',
51
+ :'token' => :'token',
52
+ :'uid_token' => :'uid-token'
53
+ }
54
+ end
55
+
56
+ # Returns all the JSON keys this model knows about
57
+ def self.acceptable_attributes
58
+ attribute_map.values
59
+ end
60
+
61
+ # Attribute type mapping.
62
+ def self.openapi_types
63
+ {
64
+ :'display_id' => :'String',
65
+ :'item_id' => :'Integer',
66
+ :'json' => :'Boolean',
67
+ :'key_name' => :'String',
68
+ :'passphrase' => :'String',
69
+ :'signature' => :'String',
70
+ :'token' => :'String',
71
+ :'uid_token' => :'String'
72
+ }
73
+ end
74
+
75
+ # List of attributes with nullable: true
76
+ def self.openapi_nullable
77
+ Set.new([
78
+ ])
79
+ end
80
+
81
+ # Initializes the object
82
+ # @param [Hash] attributes Model attributes in the form of hash
83
+ def initialize(attributes = {})
84
+ if (!attributes.is_a?(Hash))
85
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::VerifyGPG` initialize method"
86
+ end
87
+
88
+ # check to see if the attribute exists and convert string to symbol for hash key
89
+ attributes = attributes.each_with_object({}) { |(k, v), h|
90
+ if (!self.class.attribute_map.key?(k.to_sym))
91
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::VerifyGPG`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
92
+ end
93
+ h[k.to_sym] = v
94
+ }
95
+
96
+ if attributes.key?(:'display_id')
97
+ self.display_id = attributes[:'display_id']
98
+ end
99
+
100
+ if attributes.key?(:'item_id')
101
+ self.item_id = attributes[:'item_id']
102
+ end
103
+
104
+ if attributes.key?(:'json')
105
+ self.json = attributes[:'json']
106
+ end
107
+
108
+ if attributes.key?(:'key_name')
109
+ self.key_name = attributes[:'key_name']
110
+ end
111
+
112
+ if attributes.key?(:'passphrase')
113
+ self.passphrase = attributes[:'passphrase']
114
+ end
115
+
116
+ if attributes.key?(:'signature')
117
+ self.signature = attributes[:'signature']
118
+ end
119
+
120
+ if attributes.key?(:'token')
121
+ self.token = attributes[:'token']
122
+ end
123
+
124
+ if attributes.key?(:'uid_token')
125
+ self.uid_token = attributes[:'uid_token']
126
+ end
127
+ end
128
+
129
+ # Show invalid properties with the reasons. Usually used together with valid?
130
+ # @return Array for valid properties with the reasons
131
+ def list_invalid_properties
132
+ invalid_properties = Array.new
133
+ if @key_name.nil?
134
+ invalid_properties.push('invalid value for "key_name", key_name cannot be nil.')
135
+ end
136
+
137
+ if @signature.nil?
138
+ invalid_properties.push('invalid value for "signature", signature cannot be nil.')
139
+ end
140
+
141
+ invalid_properties
142
+ end
143
+
144
+ # Check to see if the all the properties in the model are valid
145
+ # @return true if the model is valid
146
+ def valid?
147
+ return false if @key_name.nil?
148
+ return false if @signature.nil?
149
+ true
150
+ end
151
+
152
+ # Checks equality by comparing each attribute.
153
+ # @param [Object] Object to be compared
154
+ def ==(o)
155
+ return true if self.equal?(o)
156
+ self.class == o.class &&
157
+ display_id == o.display_id &&
158
+ item_id == o.item_id &&
159
+ json == o.json &&
160
+ key_name == o.key_name &&
161
+ passphrase == o.passphrase &&
162
+ signature == o.signature &&
163
+ token == o.token &&
164
+ uid_token == o.uid_token
165
+ end
166
+
167
+ # @see the `==` method
168
+ # @param [Object] Object to be compared
169
+ def eql?(o)
170
+ self == o
171
+ end
172
+
173
+ # Calculates hash code according to all attributes.
174
+ # @return [Integer] Hash code
175
+ def hash
176
+ [display_id, item_id, json, key_name, passphrase, signature, token, uid_token].hash
177
+ end
178
+
179
+ # Builds the object from hash
180
+ # @param [Hash] attributes Model attributes in the form of hash
181
+ # @return [Object] Returns the model itself
182
+ def self.build_from_hash(attributes)
183
+ new.build_from_hash(attributes)
184
+ end
185
+
186
+ # Builds the object from hash
187
+ # @param [Hash] attributes Model attributes in the form of hash
188
+ # @return [Object] Returns the model itself
189
+ def build_from_hash(attributes)
190
+ return nil unless attributes.is_a?(Hash)
191
+ attributes = attributes.transform_keys(&:to_sym)
192
+ self.class.openapi_types.each_pair do |key, type|
193
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
194
+ self.send("#{key}=", nil)
195
+ elsif type =~ /\AArray<(.*)>/i
196
+ # check to ensure the input is an array given that the attribute
197
+ # is documented as an array but the input is not
198
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
199
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
200
+ end
201
+ elsif !attributes[self.class.attribute_map[key]].nil?
202
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
203
+ end
204
+ end
205
+
206
+ self
207
+ end
208
+
209
+ # Deserializes the data based on type
210
+ # @param string type Data type
211
+ # @param string value Value to be deserialized
212
+ # @return [Object] Deserialized data
213
+ def _deserialize(type, value)
214
+ case type.to_sym
215
+ when :Time
216
+ Time.parse(value)
217
+ when :Date
218
+ Date.parse(value)
219
+ when :String
220
+ value.to_s
221
+ when :Integer
222
+ value.to_i
223
+ when :Float
224
+ value.to_f
225
+ when :Boolean
226
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
227
+ true
228
+ else
229
+ false
230
+ end
231
+ when :Object
232
+ # generic object (usually a Hash), return directly
233
+ value
234
+ when /\AArray<(?<inner_type>.+)>\z/
235
+ inner_type = Regexp.last_match[:inner_type]
236
+ value.map { |v| _deserialize(inner_type, v) }
237
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
238
+ k_type = Regexp.last_match[:k_type]
239
+ v_type = Regexp.last_match[:v_type]
240
+ {}.tap do |hash|
241
+ value.each do |k, v|
242
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
243
+ end
244
+ end
245
+ else # model
246
+ # models (e.g. Pet) or oneOf
247
+ klass = Akeyless.const_get(type)
248
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
249
+ end
250
+ end
251
+
252
+ # Returns the string representation of the object
253
+ # @return [String] String presentation of the object
254
+ def to_s
255
+ to_hash.to_s
256
+ end
257
+
258
+ # to_body is an alias to to_hash (backward compatibility)
259
+ # @return [Hash] Returns the object in the form of hash
260
+ def to_body
261
+ to_hash
262
+ end
263
+
264
+ # Returns the object in the form of hash
265
+ # @return [Hash] Returns the object in the form of hash
266
+ def to_hash
267
+ hash = {}
268
+ self.class.attribute_map.each_pair do |attr, param|
269
+ value = self.send(attr)
270
+ if value.nil?
271
+ is_nullable = self.class.openapi_nullable.include?(attr)
272
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
273
+ end
274
+
275
+ hash[param] = _to_hash(value)
276
+ end
277
+ hash
278
+ end
279
+
280
+ # Outputs non-array value in the form of hash
281
+ # For object, use to_hash. Otherwise, just return the value
282
+ # @param [Object] value Any valid value
283
+ # @return [Hash] Returns the value in the form of hash
284
+ def _to_hash(value)
285
+ if value.is_a?(Array)
286
+ value.compact.map { |v| _to_hash(v) }
287
+ elsif value.is_a?(Hash)
288
+ {}.tap do |hash|
289
+ value.each { |k, v| hash[k] = _to_hash(v) }
290
+ end
291
+ elsif value.respond_to? :to_hash
292
+ value.to_hash
293
+ else
294
+ value
295
+ end
296
+ end
297
+
298
+ end
299
+
300
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.3.0-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module Akeyless
14
- VERSION = '3.1.0'
14
+ VERSION = '3.1.2'
15
15
  end
data/lib/akeyless.rb CHANGED
@@ -89,6 +89,8 @@ require 'akeyless/models/create_auth_method_universal_identity'
89
89
  require 'akeyless/models/create_auth_method_universal_identity_output'
90
90
  require 'akeyless/models/create_azure_target'
91
91
  require 'akeyless/models/create_azure_target_output'
92
+ require 'akeyless/models/create_certificate'
93
+ require 'akeyless/models/create_certificate_output'
92
94
  require 'akeyless/models/create_classic_key'
93
95
  require 'akeyless/models/create_classic_key_output'
94
96
  require 'akeyless/models/create_db_target'
@@ -144,6 +146,8 @@ require 'akeyless/models/datadog_forwarding_config'
144
146
  require 'akeyless/models/decrypt'
145
147
  require 'akeyless/models/decrypt_file'
146
148
  require 'akeyless/models/decrypt_file_output'
149
+ require 'akeyless/models/decrypt_gpg'
150
+ require 'akeyless/models/decrypt_gpg_output'
147
151
  require 'akeyless/models/decrypt_output'
148
152
  require 'akeyless/models/decrypt_pkcs1'
149
153
  require 'akeyless/models/decrypt_pkcs1_output'
@@ -182,6 +186,8 @@ require 'akeyless/models/email_tokenizer_info'
182
186
  require 'akeyless/models/encrypt'
183
187
  require 'akeyless/models/encrypt_file'
184
188
  require 'akeyless/models/encrypt_file_output'
189
+ require 'akeyless/models/encrypt_gpg'
190
+ require 'akeyless/models/encrypt_gpg_output'
185
191
  require 'akeyless/models/encrypt_output'
186
192
  require 'akeyless/models/encrypt_with_classic_key'
187
193
  require 'akeyless/models/encrypt_with_classic_key_output'
@@ -331,6 +337,8 @@ require 'akeyless/models/gateway_update_producer_redshift'
331
337
  require 'akeyless/models/gateway_update_producer_redshift_output'
332
338
  require 'akeyless/models/gateway_update_producer_snowflake'
333
339
  require 'akeyless/models/gateway_update_producer_snowflake_output'
340
+ require 'akeyless/models/gateway_update_tls_cert'
341
+ require 'akeyless/models/gateway_update_tls_cert_output'
334
342
  require 'akeyless/models/gateway_update_tmp_users'
335
343
  require 'akeyless/models/gateways_list_response'
336
344
  require 'akeyless/models/gen_customer_fragment'
@@ -338,6 +346,8 @@ require 'akeyless/models/general_config_part'
338
346
  require 'akeyless/models/get_account_settings'
339
347
  require 'akeyless/models/get_account_settings_command_output'
340
348
  require 'akeyless/models/get_auth_method'
349
+ require 'akeyless/models/get_certificate_value'
350
+ require 'akeyless/models/get_certificate_value_output'
341
351
  require 'akeyless/models/get_dynamic_secret_value'
342
352
  require 'akeyless/models/get_event_forwarder'
343
353
  require 'akeyless/models/get_event_forwarder_output'
@@ -472,6 +482,8 @@ require 'akeyless/models/secure_remote_access'
472
482
  require 'akeyless/models/set_item_state'
473
483
  require 'akeyless/models/set_role_rule'
474
484
  require 'akeyless/models/share_item'
485
+ require 'akeyless/models/sign_gpg'
486
+ require 'akeyless/models/sign_gpg_output'
475
487
  require 'akeyless/models/sign_jwt_output'
476
488
  require 'akeyless/models/sign_jwt_with_classic_key'
477
489
  require 'akeyless/models/sign_pkcs1'
@@ -532,6 +544,8 @@ require 'akeyless/models/update_auth_method_saml'
532
544
  require 'akeyless/models/update_auth_method_universal_identity'
533
545
  require 'akeyless/models/update_azure_target'
534
546
  require 'akeyless/models/update_azure_target_output'
547
+ require 'akeyless/models/update_certificate_output'
548
+ require 'akeyless/models/update_certificate_value'
535
549
  require 'akeyless/models/update_db_target'
536
550
  require 'akeyless/models/update_db_target_details'
537
551
  require 'akeyless/models/update_db_target_output'
@@ -586,6 +600,7 @@ require 'akeyless/models/upload_rsa'
586
600
  require 'akeyless/models/validate_token'
587
601
  require 'akeyless/models/validate_token_output'
588
602
  require 'akeyless/models/vaultless_tokenizer_info'
603
+ require 'akeyless/models/verify_gpg'
589
604
  require 'akeyless/models/verify_jwt_output'
590
605
  require 'akeyless/models/verify_jwt_with_classic_key'
591
606
  require 'akeyless/models/verify_pkcs1'
@@ -0,0 +1,34 @@
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.3.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for Akeyless::CreateCertificateOutput
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Akeyless::CreateCertificateOutput do
21
+ let(:instance) { Akeyless::CreateCertificateOutput.new }
22
+
23
+ describe 'test an instance of CreateCertificateOutput' do
24
+ it 'should create an instance of CreateCertificateOutput' do
25
+ expect(instance).to be_instance_of(Akeyless::CreateCertificateOutput)
26
+ end
27
+ end
28
+ describe 'test attribute "name"' do
29
+ it 'should work' do
30
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
31
+ end
32
+ end
33
+
34
+ end