akeyless 3.1.1 → 3.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +12 -1
  3. data/docs/AssocTargetItem.md +2 -0
  4. data/docs/CreateCertificate.md +3 -1
  5. data/docs/CreateClassicKey.md +6 -2
  6. data/docs/CreateDBTarget.md +4 -0
  7. data/docs/CreateDFCKey.md +3 -1
  8. data/docs/CreateDynamicSecret.md +3 -1
  9. data/docs/CreateKey.md +3 -1
  10. data/docs/CreatePKICertIssuer.md +3 -1
  11. data/docs/CreateRotatedSecret.md +3 -1
  12. data/docs/CreateSSHCertIssuer.md +3 -1
  13. data/docs/CreateSecret.md +3 -1
  14. data/docs/CreateTokenizer.md +3 -1
  15. data/docs/DSProducerDetails.md +8 -0
  16. data/docs/DecryptGPG.md +34 -0
  17. data/docs/DecryptGPGOutput.md +18 -0
  18. data/docs/EncryptGPG.md +32 -0
  19. data/docs/EncryptGPGOutput.md +18 -0
  20. data/docs/GatewayCreateProducerSnowflake.md +4 -0
  21. data/docs/GatewayUpdateItem.md +3 -1
  22. data/docs/GatewayUpdateProducerSnowflake.md +4 -0
  23. data/docs/GenCustomerFragment.md +4 -2
  24. data/docs/SignGPG.md +32 -0
  25. data/docs/SignGPGOutput.md +18 -0
  26. data/docs/TargetTypeDetailsInput.md +4 -0
  27. data/docs/UpdateDBTarget.md +4 -0
  28. data/docs/UpdateItem.md +3 -1
  29. data/docs/UpdatePKICertIssuer.md +3 -1
  30. data/docs/UpdateRotatedSecret.md +3 -1
  31. data/docs/UpdateSSHCertIssuer.md +3 -1
  32. data/docs/UploadPKCS12.md +3 -1
  33. data/docs/UploadRSA.md +3 -1
  34. data/docs/V2Api.md +252 -0
  35. data/docs/VerifyGPG.md +32 -0
  36. data/lib/akeyless/api/v2_api.rb +256 -0
  37. data/lib/akeyless/models/assoc_target_item.rb +11 -1
  38. data/lib/akeyless/models/create_certificate.rb +12 -2
  39. data/lib/akeyless/models/create_classic_key.rb +23 -3
  40. data/lib/akeyless/models/create_db_target.rb +21 -1
  41. data/lib/akeyless/models/create_dfc_key.rb +12 -2
  42. data/lib/akeyless/models/create_dynamic_secret.rb +12 -4
  43. data/lib/akeyless/models/create_key.rb +12 -2
  44. data/lib/akeyless/models/create_pki_cert_issuer.rb +12 -2
  45. data/lib/akeyless/models/create_rotated_secret.rb +12 -2
  46. data/lib/akeyless/models/create_secret.rb +12 -2
  47. data/lib/akeyless/models/create_ssh_cert_issuer.rb +12 -2
  48. data/lib/akeyless/models/create_tokenizer.rb +12 -2
  49. data/lib/akeyless/models/decrypt_gpg.rb +310 -0
  50. data/lib/akeyless/models/decrypt_gpg_output.rb +219 -0
  51. data/lib/akeyless/models/ds_producer_details.rb +40 -1
  52. data/lib/akeyless/models/encrypt_gpg.rb +300 -0
  53. data/lib/akeyless/models/encrypt_gpg_output.rb +219 -0
  54. data/lib/akeyless/models/gateway_create_producer_snowflake.rb +22 -2
  55. data/lib/akeyless/models/gateway_update_item.rb +14 -2
  56. data/lib/akeyless/models/gateway_update_producer_snowflake.rb +22 -2
  57. data/lib/akeyless/models/gen_customer_fragment.rb +15 -5
  58. data/lib/akeyless/models/sign_gpg.rb +300 -0
  59. data/lib/akeyless/models/sign_gpg_output.rb +219 -0
  60. data/lib/akeyless/models/target_type_details_input.rb +20 -1
  61. data/lib/akeyless/models/update_db_target.rb +21 -1
  62. data/lib/akeyless/models/update_item.rb +14 -2
  63. data/lib/akeyless/models/update_pki_cert_issuer.rb +12 -2
  64. data/lib/akeyless/models/update_rotated_secret.rb +14 -2
  65. data/lib/akeyless/models/update_ssh_cert_issuer.rb +12 -2
  66. data/lib/akeyless/models/upload_pkcs12.rb +12 -2
  67. data/lib/akeyless/models/upload_rsa.rb +12 -2
  68. data/lib/akeyless/models/verify_gpg.rb +300 -0
  69. data/lib/akeyless/version.rb +1 -1
  70. data/lib/akeyless.rb +7 -0
  71. data/spec/models/decrypt_gpg_output_spec.rb +34 -0
  72. data/spec/models/decrypt_gpg_spec.rb +82 -0
  73. data/spec/models/encrypt_gpg_output_spec.rb +34 -0
  74. data/spec/models/encrypt_gpg_spec.rb +76 -0
  75. data/spec/models/sign_gpg_output_spec.rb +34 -0
  76. data/spec/models/sign_gpg_spec.rb +76 -0
  77. data/spec/models/verify_gpg_spec.rb +76 -0
  78. metadata +30 -2
@@ -25,10 +25,13 @@ module Akeyless
25
25
  # Protection from accidental deletion of this item
26
26
  attr_accessor :delete_protection
27
27
 
28
+ # Description of the object
29
+ attr_accessor :description
30
+
28
31
  # Set output format to JSON
29
32
  attr_accessor :json
30
33
 
31
- # Metadata about the key
34
+ # Deprecated - use description
32
35
  attr_accessor :metadata
33
36
 
34
37
  # Key name
@@ -52,6 +55,7 @@ module Akeyless
52
55
  :'alg' => :'alg',
53
56
  :'customer_frg_id' => :'customer-frg-id',
54
57
  :'delete_protection' => :'delete_protection',
58
+ :'description' => :'description',
55
59
  :'json' => :'json',
56
60
  :'metadata' => :'metadata',
57
61
  :'name' => :'name',
@@ -73,6 +77,7 @@ module Akeyless
73
77
  :'alg' => :'String',
74
78
  :'customer_frg_id' => :'String',
75
79
  :'delete_protection' => :'String',
80
+ :'description' => :'String',
76
81
  :'json' => :'Boolean',
77
82
  :'metadata' => :'String',
78
83
  :'name' => :'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?(:'json')
120
129
  self.json = attributes[:'json']
121
130
  end
@@ -180,6 +189,7 @@ module Akeyless
180
189
  alg == o.alg &&
181
190
  customer_frg_id == o.customer_frg_id &&
182
191
  delete_protection == o.delete_protection &&
192
+ description == o.description &&
183
193
  json == o.json &&
184
194
  metadata == o.metadata &&
185
195
  name == o.name &&
@@ -198,7 +208,7 @@ module Akeyless
198
208
  # Calculates hash code according to all attributes.
199
209
  # @return [Integer] Hash code
200
210
  def hash
201
- [alg, customer_frg_id, delete_protection, json, metadata, name, split_level, tag, token, uid_token].hash
211
+ [alg, customer_frg_id, delete_protection, description, json, metadata, name, split_level, tag, token, uid_token].hash
202
212
  end
203
213
 
204
214
  # Builds the object from hash
@@ -39,6 +39,9 @@ module Akeyless
39
39
  # Protection from accidental deletion of this item
40
40
  attr_accessor :delete_protection
41
41
 
42
+ # Description of the object
43
+ attr_accessor :description
44
+
42
45
  # Set output format to JSON
43
46
  attr_accessor :json
44
47
 
@@ -48,7 +51,7 @@ module Akeyless
48
51
  # A comma-separated list of localities that will be set in the issued certificate
49
52
  attr_accessor :locality
50
53
 
51
- # A metadata about the issuer
54
+ # Deprecated - use description
52
55
  attr_accessor :metadata
53
56
 
54
57
  # PKI certificate issuer name
@@ -104,6 +107,7 @@ module Akeyless
104
107
  :'code_signing_flag' => :'code-signing-flag',
105
108
  :'country' => :'country',
106
109
  :'delete_protection' => :'delete_protection',
110
+ :'description' => :'description',
107
111
  :'json' => :'json',
108
112
  :'key_usage' => :'key-usage',
109
113
  :'locality' => :'locality',
@@ -141,6 +145,7 @@ module Akeyless
141
145
  :'code_signing_flag' => :'Boolean',
142
146
  :'country' => :'String',
143
147
  :'delete_protection' => :'String',
148
+ :'description' => :'String',
144
149
  :'json' => :'Boolean',
145
150
  :'key_usage' => :'String',
146
151
  :'locality' => :'String',
@@ -215,6 +220,10 @@ module Akeyless
215
220
  self.delete_protection = attributes[:'delete_protection']
216
221
  end
217
222
 
223
+ if attributes.key?(:'description')
224
+ self.description = attributes[:'description']
225
+ end
226
+
218
227
  if attributes.key?(:'json')
219
228
  self.json = attributes[:'json']
220
229
  end
@@ -333,6 +342,7 @@ module Akeyless
333
342
  code_signing_flag == o.code_signing_flag &&
334
343
  country == o.country &&
335
344
  delete_protection == o.delete_protection &&
345
+ description == o.description &&
336
346
  json == o.json &&
337
347
  key_usage == o.key_usage &&
338
348
  locality == o.locality &&
@@ -362,7 +372,7 @@ module Akeyless
362
372
  # Calculates hash code according to all attributes.
363
373
  # @return [Integer] Hash code
364
374
  def hash
365
- [allow_any_name, allow_subdomains, allowed_domains, allowed_uri_sans, client_flag, code_signing_flag, country, delete_protection, json, key_usage, locality, metadata, name, not_enforce_hostnames, not_require_cn, organizational_units, organizations, postal_code, province, server_flag, signer_key_name, street_address, tag, token, ttl, uid_token].hash
375
+ [allow_any_name, allow_subdomains, allowed_domains, allowed_uri_sans, client_flag, code_signing_flag, country, delete_protection, description, json, key_usage, locality, metadata, name, not_enforce_hostnames, not_require_cn, organizational_units, organizations, postal_code, province, server_flag, signer_key_name, street_address, tag, token, ttl, uid_token].hash
366
376
  end
367
377
 
368
378
  # Builds the object from hash
@@ -35,6 +35,9 @@ module Akeyless
35
35
  # Protection from accidental deletion of this item
36
36
  attr_accessor :delete_protection
37
37
 
38
+ # Description of the object
39
+ attr_accessor :description
40
+
38
41
  # Base64-encoded service account private key text
39
42
  attr_accessor :gcp_key
40
43
 
@@ -44,7 +47,7 @@ module Akeyless
44
47
  # The name of a key that used to encrypt the secret value (if empty, the account default protectionKey key will be used)
45
48
  attr_accessor :key
46
49
 
47
- # Metadata about the secret
50
+ # Deprecated - use description
48
51
  attr_accessor :metadata
49
52
 
50
53
  # Secret name
@@ -143,6 +146,7 @@ module Akeyless
143
146
  :'aws_region' => :'aws-region',
144
147
  :'custom_payload' => :'custom-payload',
145
148
  :'delete_protection' => :'delete_protection',
149
+ :'description' => :'description',
146
150
  :'gcp_key' => :'gcp-key',
147
151
  :'json' => :'json',
148
152
  :'key' => :'key',
@@ -196,6 +200,7 @@ module Akeyless
196
200
  :'aws_region' => :'String',
197
201
  :'custom_payload' => :'String',
198
202
  :'delete_protection' => :'String',
203
+ :'description' => :'String',
199
204
  :'gcp_key' => :'String',
200
205
  :'json' => :'Boolean',
201
206
  :'key' => :'String',
@@ -288,6 +293,10 @@ module Akeyless
288
293
  self.delete_protection = attributes[:'delete_protection']
289
294
  end
290
295
 
296
+ if attributes.key?(:'description')
297
+ self.description = attributes[:'description']
298
+ end
299
+
291
300
  if attributes.key?(:'gcp_key')
292
301
  self.gcp_key = attributes[:'gcp_key']
293
302
  end
@@ -478,6 +487,7 @@ module Akeyless
478
487
  aws_region == o.aws_region &&
479
488
  custom_payload == o.custom_payload &&
480
489
  delete_protection == o.delete_protection &&
490
+ description == o.description &&
481
491
  gcp_key == o.gcp_key &&
482
492
  json == o.json &&
483
493
  key == o.key &&
@@ -523,7 +533,7 @@ module Akeyless
523
533
  # Calculates hash code according to all attributes.
524
534
  # @return [Integer] Hash code
525
535
  def hash
526
- [api_id, api_key, application_id, authentication_credentials, auto_rotate, aws_region, custom_payload, delete_protection, gcp_key, json, key, metadata, name, rotated_password, rotated_username, rotation_hour, rotation_interval, rotator_creds_type, rotator_custom_cmd, rotator_type, 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, tags, target_name, token, uid_token, user_attribute, user_dn].hash
536
+ [api_id, api_key, application_id, authentication_credentials, auto_rotate, aws_region, custom_payload, delete_protection, description, gcp_key, json, key, metadata, name, rotated_password, rotated_username, rotation_hour, rotation_interval, rotator_creds_type, rotator_custom_cmd, rotator_type, 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, tags, target_name, token, uid_token, user_attribute, user_dn].hash
527
537
  end
528
538
 
529
539
  # Builds the object from hash
@@ -21,10 +21,13 @@ 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
  # Set output format to JSON
25
28
  attr_accessor :json
26
29
 
27
- # Metadata about the secret
30
+ # Deprecated - use description
28
31
  attr_accessor :metadata
29
32
 
30
33
  # The provided value is a multiline value (separated by '\\n')
@@ -84,6 +87,7 @@ module Akeyless
84
87
  {
85
88
  :'accessibility' => :'accessibility',
86
89
  :'delete_protection' => :'delete_protection',
90
+ :'description' => :'description',
87
91
  :'json' => :'json',
88
92
  :'metadata' => :'metadata',
89
93
  :'multiline_value' => :'multiline_value',
@@ -119,6 +123,7 @@ module Akeyless
119
123
  {
120
124
  :'accessibility' => :'String',
121
125
  :'delete_protection' => :'String',
126
+ :'description' => :'String',
122
127
  :'json' => :'Boolean',
123
128
  :'metadata' => :'String',
124
129
  :'multiline_value' => :'Boolean',
@@ -175,6 +180,10 @@ module Akeyless
175
180
  self.delete_protection = attributes[:'delete_protection']
176
181
  end
177
182
 
183
+ if attributes.key?(:'description')
184
+ self.description = attributes[:'description']
185
+ end
186
+
178
187
  if attributes.key?(:'json')
179
188
  self.json = attributes[:'json']
180
189
  end
@@ -302,6 +311,7 @@ module Akeyless
302
311
  self.class == o.class &&
303
312
  accessibility == o.accessibility &&
304
313
  delete_protection == o.delete_protection &&
314
+ description == o.description &&
305
315
  json == o.json &&
306
316
  metadata == o.metadata &&
307
317
  multiline_value == o.multiline_value &&
@@ -335,7 +345,7 @@ module Akeyless
335
345
  # Calculates hash code according to all attributes.
336
346
  # @return [Integer] Hash code
337
347
  def hash
338
- [accessibility, delete_protection, json, metadata, multiline_value, name, password_manager_custom_field, password_manager_inject_url, password_manager_password, password_manager_username, protection_key, secure_access_bastion_issuer, secure_access_enable, secure_access_host, secure_access_ssh_creds, secure_access_ssh_user, secure_access_url, secure_access_web_browsing, secure_access_web_proxy, tags, token, type, uid_token, value].hash
348
+ [accessibility, delete_protection, description, json, metadata, multiline_value, name, password_manager_custom_field, password_manager_inject_url, password_manager_password, password_manager_username, protection_key, secure_access_bastion_issuer, secure_access_enable, secure_access_host, secure_access_ssh_creds, secure_access_ssh_user, secure_access_url, secure_access_web_browsing, secure_access_web_proxy, tags, token, type, uid_token, value].hash
339
349
  end
340
350
 
341
351
  # 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
  # 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
@@ -68,6 +71,7 @@ module Akeyless
68
71
  {
69
72
  :'allowed_users' => :'allowed-users',
70
73
  :'delete_protection' => :'delete_protection',
74
+ :'description' => :'description',
71
75
  :'extensions' => :'extensions',
72
76
  :'json' => :'json',
73
77
  :'metadata' => :'metadata',
@@ -97,6 +101,7 @@ module Akeyless
97
101
  {
98
102
  :'allowed_users' => :'String',
99
103
  :'delete_protection' => :'String',
104
+ :'description' => :'String',
100
105
  :'extensions' => :'Hash<String, String>',
101
106
  :'json' => :'Boolean',
102
107
  :'metadata' => :'String',
@@ -145,6 +150,10 @@ module Akeyless
145
150
  self.delete_protection = attributes[:'delete_protection']
146
151
  end
147
152
 
153
+ if attributes.key?(:'description')
154
+ self.description = attributes[:'description']
155
+ end
156
+
148
157
  if attributes.key?(:'extensions')
149
158
  if (value = attributes[:'extensions']).is_a?(Hash)
150
159
  self.extensions = value
@@ -256,6 +265,7 @@ module Akeyless
256
265
  self.class == o.class &&
257
266
  allowed_users == o.allowed_users &&
258
267
  delete_protection == o.delete_protection &&
268
+ description == o.description &&
259
269
  extensions == o.extensions &&
260
270
  json == o.json &&
261
271
  metadata == o.metadata &&
@@ -283,7 +293,7 @@ module Akeyless
283
293
  # Calculates hash code according to all attributes.
284
294
  # @return [Integer] Hash code
285
295
  def hash
286
- [allowed_users, delete_protection, extensions, json, metadata, name, principals, 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, tag, token, ttl, uid_token].hash
296
+ [allowed_users, delete_protection, description, extensions, json, metadata, name, principals, 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, tag, token, ttl, uid_token].hash
287
297
  end
288
298
 
289
299
  # Builds the object from hash
@@ -25,6 +25,9 @@ module Akeyless
25
25
  # Protection from accidental deletion of this item
26
26
  attr_accessor :delete_protection
27
27
 
28
+ # Description of the object
29
+ attr_accessor :description
30
+
28
31
  # The Encoding output template to use in regexp vaultless tokenization
29
32
  attr_accessor :encoding_template
30
33
 
@@ -34,7 +37,7 @@ module Akeyless
34
37
  # Set output format to JSON
35
38
  attr_accessor :json
36
39
 
37
- # A metadata about the tokenizer
40
+ # Deprecated - use description
38
41
  attr_accessor :metadata
39
42
 
40
43
  # Tokenizer name
@@ -67,6 +70,7 @@ module Akeyless
67
70
  :'alphabet' => :'alphabet',
68
71
  :'decoding_template' => :'decoding-template',
69
72
  :'delete_protection' => :'delete_protection',
73
+ :'description' => :'description',
70
74
  :'encoding_template' => :'encoding-template',
71
75
  :'encryption_key_name' => :'encryption-key-name',
72
76
  :'json' => :'json',
@@ -93,6 +97,7 @@ module Akeyless
93
97
  :'alphabet' => :'String',
94
98
  :'decoding_template' => :'String',
95
99
  :'delete_protection' => :'String',
100
+ :'description' => :'String',
96
101
  :'encoding_template' => :'String',
97
102
  :'encryption_key_name' => :'String',
98
103
  :'json' => :'Boolean',
@@ -141,6 +146,10 @@ module Akeyless
141
146
  self.delete_protection = attributes[:'delete_protection']
142
147
  end
143
148
 
149
+ if attributes.key?(:'description')
150
+ self.description = attributes[:'description']
151
+ end
152
+
144
153
  if attributes.key?(:'encoding_template')
145
154
  self.encoding_template = attributes[:'encoding_template']
146
155
  end
@@ -228,6 +237,7 @@ module Akeyless
228
237
  alphabet == o.alphabet &&
229
238
  decoding_template == o.decoding_template &&
230
239
  delete_protection == o.delete_protection &&
240
+ description == o.description &&
231
241
  encoding_template == o.encoding_template &&
232
242
  encryption_key_name == o.encryption_key_name &&
233
243
  json == o.json &&
@@ -251,7 +261,7 @@ module Akeyless
251
261
  # Calculates hash code according to all attributes.
252
262
  # @return [Integer] Hash code
253
263
  def hash
254
- [alphabet, decoding_template, delete_protection, encoding_template, encryption_key_name, json, metadata, name, pattern, tag, template_type, token, tokenizer_type, tweak_type, uid_token].hash
264
+ [alphabet, decoding_template, delete_protection, description, encoding_template, encryption_key_name, json, metadata, name, pattern, tag, template_type, token, tokenizer_type, tweak_type, uid_token].hash
255
265
  end
256
266
 
257
267
  # Builds the object from hash
@@ -0,0 +1,310 @@
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 DecryptGPG
18
+ # Ciphertext to be decrypted in base64 encoded format
19
+ attr_accessor :ciphertext
20
+
21
+ # The display id of the key to use in the decryption process
22
+ attr_accessor :display_id
23
+
24
+ # The item id of the key to use in the decryption process
25
+ attr_accessor :item_id
26
+
27
+ # Set output format to JSON
28
+ attr_accessor :json
29
+
30
+ # The name of the key to use in the decryption process
31
+ attr_accessor :key_name
32
+
33
+ # If specified, the output will be formatted accordingly. options: [base64]
34
+ attr_accessor :output_format
35
+
36
+ # Passphrase that was used to generate the key
37
+ attr_accessor :passphrase
38
+
39
+ # Authentication token (see `/auth` and `/configure`)
40
+ attr_accessor :token
41
+
42
+ # The universal identity token, Required only for universal_identity authentication
43
+ attr_accessor :uid_token
44
+
45
+ # Attribute mapping from ruby-style variable name to JSON key.
46
+ def self.attribute_map
47
+ {
48
+ :'ciphertext' => :'ciphertext',
49
+ :'display_id' => :'display-id',
50
+ :'item_id' => :'item-id',
51
+ :'json' => :'json',
52
+ :'key_name' => :'key-name',
53
+ :'output_format' => :'output-format',
54
+ :'passphrase' => :'passphrase',
55
+ :'token' => :'token',
56
+ :'uid_token' => :'uid-token'
57
+ }
58
+ end
59
+
60
+ # Returns all the JSON keys this model knows about
61
+ def self.acceptable_attributes
62
+ attribute_map.values
63
+ end
64
+
65
+ # Attribute type mapping.
66
+ def self.openapi_types
67
+ {
68
+ :'ciphertext' => :'String',
69
+ :'display_id' => :'String',
70
+ :'item_id' => :'Integer',
71
+ :'json' => :'Boolean',
72
+ :'key_name' => :'String',
73
+ :'output_format' => :'String',
74
+ :'passphrase' => :'String',
75
+ :'token' => :'String',
76
+ :'uid_token' => :'String'
77
+ }
78
+ end
79
+
80
+ # List of attributes with nullable: true
81
+ def self.openapi_nullable
82
+ Set.new([
83
+ ])
84
+ end
85
+
86
+ # Initializes the object
87
+ # @param [Hash] attributes Model attributes in the form of hash
88
+ def initialize(attributes = {})
89
+ if (!attributes.is_a?(Hash))
90
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::DecryptGPG` initialize method"
91
+ end
92
+
93
+ # check to see if the attribute exists and convert string to symbol for hash key
94
+ attributes = attributes.each_with_object({}) { |(k, v), h|
95
+ if (!self.class.attribute_map.key?(k.to_sym))
96
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::DecryptGPG`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
97
+ end
98
+ h[k.to_sym] = v
99
+ }
100
+
101
+ if attributes.key?(:'ciphertext')
102
+ self.ciphertext = attributes[:'ciphertext']
103
+ end
104
+
105
+ if attributes.key?(:'display_id')
106
+ self.display_id = attributes[:'display_id']
107
+ end
108
+
109
+ if attributes.key?(:'item_id')
110
+ self.item_id = attributes[:'item_id']
111
+ end
112
+
113
+ if attributes.key?(:'json')
114
+ self.json = attributes[:'json']
115
+ end
116
+
117
+ if attributes.key?(:'key_name')
118
+ self.key_name = attributes[:'key_name']
119
+ end
120
+
121
+ if attributes.key?(:'output_format')
122
+ self.output_format = attributes[:'output_format']
123
+ end
124
+
125
+ if attributes.key?(:'passphrase')
126
+ self.passphrase = attributes[:'passphrase']
127
+ end
128
+
129
+ if attributes.key?(:'token')
130
+ self.token = attributes[:'token']
131
+ end
132
+
133
+ if attributes.key?(:'uid_token')
134
+ self.uid_token = attributes[:'uid_token']
135
+ end
136
+ end
137
+
138
+ # Show invalid properties with the reasons. Usually used together with valid?
139
+ # @return Array for valid properties with the reasons
140
+ def list_invalid_properties
141
+ invalid_properties = Array.new
142
+ if @ciphertext.nil?
143
+ invalid_properties.push('invalid value for "ciphertext", ciphertext cannot be nil.')
144
+ end
145
+
146
+ if @key_name.nil?
147
+ invalid_properties.push('invalid value for "key_name", key_name cannot be nil.')
148
+ end
149
+
150
+ invalid_properties
151
+ end
152
+
153
+ # Check to see if the all the properties in the model are valid
154
+ # @return true if the model is valid
155
+ def valid?
156
+ return false if @ciphertext.nil?
157
+ return false if @key_name.nil?
158
+ true
159
+ end
160
+
161
+ # Checks equality by comparing each attribute.
162
+ # @param [Object] Object to be compared
163
+ def ==(o)
164
+ return true if self.equal?(o)
165
+ self.class == o.class &&
166
+ ciphertext == o.ciphertext &&
167
+ display_id == o.display_id &&
168
+ item_id == o.item_id &&
169
+ json == o.json &&
170
+ key_name == o.key_name &&
171
+ output_format == o.output_format &&
172
+ passphrase == o.passphrase &&
173
+ token == o.token &&
174
+ uid_token == o.uid_token
175
+ end
176
+
177
+ # @see the `==` method
178
+ # @param [Object] Object to be compared
179
+ def eql?(o)
180
+ self == o
181
+ end
182
+
183
+ # Calculates hash code according to all attributes.
184
+ # @return [Integer] Hash code
185
+ def hash
186
+ [ciphertext, display_id, item_id, json, key_name, output_format, passphrase, token, uid_token].hash
187
+ end
188
+
189
+ # Builds the object from hash
190
+ # @param [Hash] attributes Model attributes in the form of hash
191
+ # @return [Object] Returns the model itself
192
+ def self.build_from_hash(attributes)
193
+ new.build_from_hash(attributes)
194
+ end
195
+
196
+ # Builds the object from hash
197
+ # @param [Hash] attributes Model attributes in the form of hash
198
+ # @return [Object] Returns the model itself
199
+ def build_from_hash(attributes)
200
+ return nil unless attributes.is_a?(Hash)
201
+ attributes = attributes.transform_keys(&:to_sym)
202
+ self.class.openapi_types.each_pair do |key, type|
203
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
204
+ self.send("#{key}=", nil)
205
+ elsif type =~ /\AArray<(.*)>/i
206
+ # check to ensure the input is an array given that the attribute
207
+ # is documented as an array but the input is not
208
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
209
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
210
+ end
211
+ elsif !attributes[self.class.attribute_map[key]].nil?
212
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
213
+ end
214
+ end
215
+
216
+ self
217
+ end
218
+
219
+ # Deserializes the data based on type
220
+ # @param string type Data type
221
+ # @param string value Value to be deserialized
222
+ # @return [Object] Deserialized data
223
+ def _deserialize(type, value)
224
+ case type.to_sym
225
+ when :Time
226
+ Time.parse(value)
227
+ when :Date
228
+ Date.parse(value)
229
+ when :String
230
+ value.to_s
231
+ when :Integer
232
+ value.to_i
233
+ when :Float
234
+ value.to_f
235
+ when :Boolean
236
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
237
+ true
238
+ else
239
+ false
240
+ end
241
+ when :Object
242
+ # generic object (usually a Hash), return directly
243
+ value
244
+ when /\AArray<(?<inner_type>.+)>\z/
245
+ inner_type = Regexp.last_match[:inner_type]
246
+ value.map { |v| _deserialize(inner_type, v) }
247
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
248
+ k_type = Regexp.last_match[:k_type]
249
+ v_type = Regexp.last_match[:v_type]
250
+ {}.tap do |hash|
251
+ value.each do |k, v|
252
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
253
+ end
254
+ end
255
+ else # model
256
+ # models (e.g. Pet) or oneOf
257
+ klass = Akeyless.const_get(type)
258
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
259
+ end
260
+ end
261
+
262
+ # Returns the string representation of the object
263
+ # @return [String] String presentation of the object
264
+ def to_s
265
+ to_hash.to_s
266
+ end
267
+
268
+ # to_body is an alias to to_hash (backward compatibility)
269
+ # @return [Hash] Returns the object in the form of hash
270
+ def to_body
271
+ to_hash
272
+ end
273
+
274
+ # Returns the object in the form of hash
275
+ # @return [Hash] Returns the object in the form of hash
276
+ def to_hash
277
+ hash = {}
278
+ self.class.attribute_map.each_pair do |attr, param|
279
+ value = self.send(attr)
280
+ if value.nil?
281
+ is_nullable = self.class.openapi_nullable.include?(attr)
282
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
283
+ end
284
+
285
+ hash[param] = _to_hash(value)
286
+ end
287
+ hash
288
+ end
289
+
290
+ # Outputs non-array value in the form of hash
291
+ # For object, use to_hash. Otherwise, just return the value
292
+ # @param [Object] value Any valid value
293
+ # @return [Hash] Returns the value in the form of hash
294
+ def _to_hash(value)
295
+ if value.is_a?(Array)
296
+ value.compact.map { |v| _to_hash(v) }
297
+ elsif value.is_a?(Hash)
298
+ {}.tap do |hash|
299
+ value.each { |k, v| hash[k] = _to_hash(v) }
300
+ end
301
+ elsif value.respond_to? :to_hash
302
+ value.to_hash
303
+ else
304
+ value
305
+ end
306
+ end
307
+
308
+ end
309
+
310
+ end