akeyless 3.1.1 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +23 -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/CreatePingTarget.md +38 -0
  12. data/docs/CreatePingTargetOutput.md +18 -0
  13. data/docs/CreateRotatedSecret.md +5 -1
  14. data/docs/CreateSSHCertIssuer.md +3 -1
  15. data/docs/CreateSecret.md +3 -1
  16. data/docs/CreateTokenizer.md +3 -1
  17. data/docs/DSProducerDetails.md +48 -0
  18. data/docs/DecryptGPG.md +34 -0
  19. data/docs/DecryptGPGOutput.md +18 -0
  20. data/docs/EncryptGPG.md +32 -0
  21. data/docs/EncryptGPGOutput.md +18 -0
  22. data/docs/GatewayCreateProducerPing.md +66 -0
  23. data/docs/GatewayCreateProducerPingOutput.md +18 -0
  24. data/docs/GatewayCreateProducerSnowflake.md +4 -0
  25. data/docs/GatewayUpdateItem.md +3 -1
  26. data/docs/GatewayUpdateProducerPing.md +68 -0
  27. data/docs/GatewayUpdateProducerPingOutput.md +18 -0
  28. data/docs/GatewayUpdateProducerSnowflake.md +4 -0
  29. data/docs/GenCustomerFragment.md +4 -2
  30. data/docs/GetKubeExecCreds.md +5 -3
  31. data/docs/GetPKICertificate.md +5 -3
  32. data/docs/SecureRemoteAccess.md +2 -0
  33. data/docs/SignGPG.md +32 -0
  34. data/docs/SignGPGOutput.md +18 -0
  35. data/docs/TargetTypeDetailsInput.md +14 -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/UpdatePingTarget.md +44 -0
  40. data/docs/UpdateRotatedSecret.md +5 -1
  41. data/docs/UpdateSSHCertIssuer.md +3 -1
  42. data/docs/UploadPKCS12.md +3 -1
  43. data/docs/UploadRSA.md +3 -1
  44. data/docs/V2Api.md +504 -0
  45. data/docs/VerifyGPG.md +32 -0
  46. data/lib/akeyless/api/v2_api.rb +512 -0
  47. data/lib/akeyless/models/assoc_target_item.rb +11 -1
  48. data/lib/akeyless/models/create_certificate.rb +12 -2
  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_ping_target.rb +329 -0
  55. data/lib/akeyless/models/create_ping_target_output.rb +219 -0
  56. data/lib/akeyless/models/create_pki_cert_issuer.rb +12 -2
  57. data/lib/akeyless/models/create_rotated_secret.rb +24 -2
  58. data/lib/akeyless/models/create_secret.rb +12 -2
  59. data/lib/akeyless/models/create_ssh_cert_issuer.rb +12 -2
  60. data/lib/akeyless/models/create_tokenizer.rb +12 -2
  61. data/lib/akeyless/models/decrypt_gpg.rb +310 -0
  62. data/lib/akeyless/models/decrypt_gpg_output.rb +219 -0
  63. data/lib/akeyless/models/ds_producer_details.rb +235 -1
  64. data/lib/akeyless/models/encrypt_gpg.rb +300 -0
  65. data/lib/akeyless/models/encrypt_gpg_output.rb +219 -0
  66. data/lib/akeyless/models/gateway_create_producer_ping.rb +482 -0
  67. data/lib/akeyless/models/gateway_create_producer_ping_output.rb +219 -0
  68. data/lib/akeyless/models/gateway_create_producer_snowflake.rb +22 -2
  69. data/lib/akeyless/models/gateway_update_item.rb +14 -2
  70. data/lib/akeyless/models/gateway_update_producer_ping.rb +492 -0
  71. data/lib/akeyless/models/gateway_update_producer_ping_output.rb +219 -0
  72. data/lib/akeyless/models/gateway_update_producer_snowflake.rb +22 -2
  73. data/lib/akeyless/models/gen_customer_fragment.rb +15 -5
  74. data/lib/akeyless/models/get_kube_exec_creds.rb +14 -4
  75. data/lib/akeyless/models/get_pki_certificate.rb +14 -4
  76. data/lib/akeyless/models/secure_remote_access.rb +10 -1
  77. data/lib/akeyless/models/sign_gpg.rb +300 -0
  78. data/lib/akeyless/models/sign_gpg_output.rb +219 -0
  79. data/lib/akeyless/models/target_type_details_input.rb +65 -1
  80. data/lib/akeyless/models/update_db_target.rb +21 -1
  81. data/lib/akeyless/models/update_item.rb +14 -2
  82. data/lib/akeyless/models/update_ping_target.rb +358 -0
  83. data/lib/akeyless/models/update_pki_cert_issuer.rb +12 -2
  84. data/lib/akeyless/models/update_rotated_secret.rb +26 -2
  85. data/lib/akeyless/models/update_ssh_cert_issuer.rb +12 -2
  86. data/lib/akeyless/models/upload_pkcs12.rb +12 -2
  87. data/lib/akeyless/models/upload_rsa.rb +12 -2
  88. data/lib/akeyless/models/verify_gpg.rb +300 -0
  89. data/lib/akeyless/version.rb +1 -1
  90. data/lib/akeyless.rb +14 -0
  91. data/spec/models/create_ping_target_output_spec.rb +34 -0
  92. data/spec/models/create_ping_target_spec.rb +94 -0
  93. data/spec/models/decrypt_gpg_output_spec.rb +34 -0
  94. data/spec/models/decrypt_gpg_spec.rb +82 -0
  95. data/spec/models/encrypt_gpg_output_spec.rb +34 -0
  96. data/spec/models/encrypt_gpg_spec.rb +76 -0
  97. data/spec/models/gateway_create_producer_ping_output_spec.rb +34 -0
  98. data/spec/models/gateway_create_producer_ping_spec.rb +178 -0
  99. data/spec/models/gateway_update_producer_ping_output_spec.rb +34 -0
  100. data/spec/models/gateway_update_producer_ping_spec.rb +184 -0
  101. data/spec/models/sign_gpg_output_spec.rb +34 -0
  102. data/spec/models/sign_gpg_spec.rb +76 -0
  103. data/spec/models/update_ping_target_spec.rb +112 -0
  104. data/spec/models/verify_gpg_spec.rb +76 -0
  105. metadata +609 -553
@@ -16,7 +16,7 @@ require 'time'
16
16
  module Akeyless
17
17
  # CreateClassicKey is a command that creates classic key
18
18
  class CreateClassicKey
19
- # Classic Key type; options: [AES128GCM, AES256GCM, AES128SIV, AES256SIV, RSA1024, RSA2048, RSA3072, RSA4096, EC256, EC384]
19
+ # Classic Key type; options: [AES128GCM, AES256GCM, AES128SIV, AES256SIV, RSA1024, RSA2048, RSA3072, RSA4096, EC256, EC384, GPG]
20
20
  attr_accessor :alg
21
21
 
22
22
  # Certificate in a PEM format.
@@ -25,13 +25,19 @@ 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
+
31
+ # gpg alg: Relevant only if GPG key type selected; options: [RSA1024, RSA2048, RSA3072, RSA4096, Ed25519]
32
+ attr_accessor :gpg_alg
33
+
28
34
  # Set output format to JSON
29
35
  attr_accessor :json
30
36
 
31
37
  # Base64-encoded classic key value
32
38
  attr_accessor :key_data
33
39
 
34
- # Metadata about the classic key
40
+ # Deprecated - use description
35
41
  attr_accessor :metadata
36
42
 
37
43
  # ClassicKey name
@@ -55,6 +61,8 @@ module Akeyless
55
61
  :'alg' => :'alg',
56
62
  :'cert_file_data' => :'cert-file-data',
57
63
  :'delete_protection' => :'delete_protection',
64
+ :'description' => :'description',
65
+ :'gpg_alg' => :'gpg-alg',
58
66
  :'json' => :'json',
59
67
  :'key_data' => :'key-data',
60
68
  :'metadata' => :'metadata',
@@ -77,6 +85,8 @@ module Akeyless
77
85
  :'alg' => :'String',
78
86
  :'cert_file_data' => :'String',
79
87
  :'delete_protection' => :'String',
88
+ :'description' => :'String',
89
+ :'gpg_alg' => :'String',
80
90
  :'json' => :'Boolean',
81
91
  :'key_data' => :'String',
82
92
  :'metadata' => :'String',
@@ -121,6 +131,14 @@ module Akeyless
121
131
  self.delete_protection = attributes[:'delete_protection']
122
132
  end
123
133
 
134
+ if attributes.key?(:'description')
135
+ self.description = attributes[:'description']
136
+ end
137
+
138
+ if attributes.key?(:'gpg_alg')
139
+ self.gpg_alg = attributes[:'gpg_alg']
140
+ end
141
+
124
142
  if attributes.key?(:'json')
125
143
  self.json = attributes[:'json']
126
144
  end
@@ -187,6 +205,8 @@ module Akeyless
187
205
  alg == o.alg &&
188
206
  cert_file_data == o.cert_file_data &&
189
207
  delete_protection == o.delete_protection &&
208
+ description == o.description &&
209
+ gpg_alg == o.gpg_alg &&
190
210
  json == o.json &&
191
211
  key_data == o.key_data &&
192
212
  metadata == o.metadata &&
@@ -206,7 +226,7 @@ module Akeyless
206
226
  # Calculates hash code according to all attributes.
207
227
  # @return [Integer] Hash code
208
228
  def hash
209
- [alg, cert_file_data, delete_protection, json, key_data, metadata, name, protection_key_name, tags, token, uid_token].hash
229
+ [alg, cert_file_data, delete_protection, description, gpg_alg, json, key_data, metadata, name, protection_key_name, tags, token, uid_token].hash
210
230
  end
211
231
 
212
232
  # Builds the object from hash
@@ -64,6 +64,12 @@ module Akeyless
64
64
 
65
65
  attr_accessor :snowflake_account
66
66
 
67
+ # RSA Private key (base64 encoded)
68
+ attr_accessor :snowflake_api_private_key
69
+
70
+ # The Private key passphrase
71
+ attr_accessor :snowflake_api_private_key_password
72
+
67
73
  # SSL connection mode
68
74
  attr_accessor :ssl
69
75
 
@@ -100,6 +106,8 @@ module Akeyless
100
106
  :'port' => :'port',
101
107
  :'pwd' => :'pwd',
102
108
  :'snowflake_account' => :'snowflake-account',
109
+ :'snowflake_api_private_key' => :'snowflake-api-private-key',
110
+ :'snowflake_api_private_key_password' => :'snowflake-api-private-key-password',
103
111
  :'ssl' => :'ssl',
104
112
  :'ssl_certificate' => :'ssl-certificate',
105
113
  :'token' => :'token',
@@ -135,6 +143,8 @@ module Akeyless
135
143
  :'port' => :'String',
136
144
  :'pwd' => :'String',
137
145
  :'snowflake_account' => :'String',
146
+ :'snowflake_api_private_key' => :'String',
147
+ :'snowflake_api_private_key_password' => :'String',
138
148
  :'ssl' => :'Boolean',
139
149
  :'ssl_certificate' => :'String',
140
150
  :'token' => :'String',
@@ -240,6 +250,14 @@ module Akeyless
240
250
  self.snowflake_account = attributes[:'snowflake_account']
241
251
  end
242
252
 
253
+ if attributes.key?(:'snowflake_api_private_key')
254
+ self.snowflake_api_private_key = attributes[:'snowflake_api_private_key']
255
+ end
256
+
257
+ if attributes.key?(:'snowflake_api_private_key_password')
258
+ self.snowflake_api_private_key_password = attributes[:'snowflake_api_private_key_password']
259
+ end
260
+
243
261
  if attributes.key?(:'ssl')
244
262
  self.ssl = attributes[:'ssl']
245
263
  end
@@ -308,6 +326,8 @@ module Akeyless
308
326
  port == o.port &&
309
327
  pwd == o.pwd &&
310
328
  snowflake_account == o.snowflake_account &&
329
+ snowflake_api_private_key == o.snowflake_api_private_key &&
330
+ snowflake_api_private_key_password == o.snowflake_api_private_key_password &&
311
331
  ssl == o.ssl &&
312
332
  ssl_certificate == o.ssl_certificate &&
313
333
  token == o.token &&
@@ -324,7 +344,7 @@ module Akeyless
324
344
  # Calculates hash code according to all attributes.
325
345
  # @return [Integer] Hash code
326
346
  def hash
327
- [comment, db_name, db_server_certificates, db_server_name, db_type, host, json, key, mongodb_atlas, mongodb_atlas_api_private_key, mongodb_atlas_api_public_key, mongodb_atlas_project_id, mongodb_default_auth_db, mongodb_uri_options, name, oracle_service_name, port, pwd, snowflake_account, ssl, ssl_certificate, token, uid_token, user_name].hash
347
+ [comment, db_name, db_server_certificates, db_server_name, db_type, host, json, key, mongodb_atlas, mongodb_atlas_api_private_key, mongodb_atlas_api_public_key, mongodb_atlas_project_id, mongodb_default_auth_db, mongodb_uri_options, name, oracle_service_name, port, pwd, snowflake_account, snowflake_api_private_key, snowflake_api_private_key_password, ssl, ssl_certificate, token, uid_token, user_name].hash
328
348
  end
329
349
 
330
350
  # Builds the object from hash
@@ -24,10 +24,13 @@ module Akeyless
24
24
  # Protection from accidental deletion of this item
25
25
  attr_accessor :delete_protection
26
26
 
27
+ # Description of the object
28
+ attr_accessor :description
29
+
27
30
  # Set output format to JSON
28
31
  attr_accessor :json
29
32
 
30
- # Metadata about the DFC key
33
+ # Deprecated - use description
31
34
  attr_accessor :metadata
32
35
 
33
36
  # DFCKey name
@@ -51,6 +54,7 @@ module Akeyless
51
54
  :'alg' => :'alg',
52
55
  :'customer_frg_id' => :'customer-frg-id',
53
56
  :'delete_protection' => :'delete_protection',
57
+ :'description' => :'description',
54
58
  :'json' => :'json',
55
59
  :'metadata' => :'metadata',
56
60
  :'name' => :'name',
@@ -72,6 +76,7 @@ module Akeyless
72
76
  :'alg' => :'String',
73
77
  :'customer_frg_id' => :'String',
74
78
  :'delete_protection' => :'String',
79
+ :'description' => :'String',
75
80
  :'json' => :'Boolean',
76
81
  :'metadata' => :'String',
77
82
  :'name' => :'String',
@@ -115,6 +120,10 @@ module Akeyless
115
120
  self.delete_protection = attributes[:'delete_protection']
116
121
  end
117
122
 
123
+ if attributes.key?(:'description')
124
+ self.description = attributes[:'description']
125
+ end
126
+
118
127
  if attributes.key?(:'json')
119
128
  self.json = attributes[:'json']
120
129
  end
@@ -179,6 +188,7 @@ module Akeyless
179
188
  alg == o.alg &&
180
189
  customer_frg_id == o.customer_frg_id &&
181
190
  delete_protection == o.delete_protection &&
191
+ description == o.description &&
182
192
  json == o.json &&
183
193
  metadata == o.metadata &&
184
194
  name == o.name &&
@@ -197,7 +207,7 @@ module Akeyless
197
207
  # Calculates hash code according to all attributes.
198
208
  # @return [Integer] Hash code
199
209
  def hash
200
- [alg, customer_frg_id, delete_protection, json, metadata, name, split_level, tag, token, uid_token].hash
210
+ [alg, customer_frg_id, delete_protection, description, json, metadata, name, split_level, tag, token, uid_token].hash
201
211
  end
202
212
 
203
213
  # Builds the object from hash
@@ -18,13 +18,16 @@ module Akeyless
18
18
  # Protection from accidental deletion of this item
19
19
  attr_accessor :delete_protection
20
20
 
21
+ # Description of the object
22
+ attr_accessor :description
23
+
21
24
  # Set output format to JSON
22
25
  attr_accessor :json
23
26
 
24
27
  # The name of a key that used to encrypt the dynamic secret values (if empty, the account default protectionKey key will be used)
25
28
  attr_accessor :key
26
29
 
27
- # Metadata about the dynamic secret
30
+ # Deprecated - use description
28
31
  attr_accessor :metadata
29
32
 
30
33
  # Dynamic secret name
@@ -43,6 +46,7 @@ module Akeyless
43
46
  def self.attribute_map
44
47
  {
45
48
  :'delete_protection' => :'delete_protection',
49
+ :'description' => :'description',
46
50
  :'json' => :'json',
47
51
  :'key' => :'key',
48
52
  :'metadata' => :'metadata',
@@ -62,6 +66,7 @@ module Akeyless
62
66
  def self.openapi_types
63
67
  {
64
68
  :'delete_protection' => :'String',
69
+ :'description' => :'String',
65
70
  :'json' => :'Boolean',
66
71
  :'key' => :'String',
67
72
  :'metadata' => :'String',
@@ -97,6 +102,10 @@ module Akeyless
97
102
  self.delete_protection = attributes[:'delete_protection']
98
103
  end
99
104
 
105
+ if attributes.key?(:'description')
106
+ self.description = attributes[:'description']
107
+ end
108
+
100
109
  if attributes.key?(:'json')
101
110
  self.json = attributes[:'json']
102
111
  end
@@ -107,8 +116,6 @@ module Akeyless
107
116
 
108
117
  if attributes.key?(:'metadata')
109
118
  self.metadata = attributes[:'metadata']
110
- else
111
- self.metadata = 'None'
112
119
  end
113
120
 
114
121
  if attributes.key?(:'name')
@@ -154,6 +161,7 @@ module Akeyless
154
161
  return true if self.equal?(o)
155
162
  self.class == o.class &&
156
163
  delete_protection == o.delete_protection &&
164
+ description == o.description &&
157
165
  json == o.json &&
158
166
  key == o.key &&
159
167
  metadata == o.metadata &&
@@ -172,7 +180,7 @@ module Akeyless
172
180
  # Calculates hash code according to all attributes.
173
181
  # @return [Integer] Hash code
174
182
  def hash
175
- [delete_protection, json, key, metadata, name, tags, token, uid_token].hash
183
+ [delete_protection, description, json, key, metadata, name, tags, token, uid_token].hash
176
184
  end
177
185
 
178
186
  # Builds the object from hash
@@ -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
@@ -0,0 +1,329 @@
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 CreatePingTarget
18
+ # Ping Federate administrative port
19
+ attr_accessor :administrative_port
20
+
21
+ # Ping Federate authorization port
22
+ attr_accessor :authorization_port
23
+
24
+ # Comment about the target
25
+ attr_accessor :comment
26
+
27
+ # Set output format to JSON
28
+ attr_accessor :json
29
+
30
+ # The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
31
+ attr_accessor :key
32
+
33
+ # Target name
34
+ attr_accessor :name
35
+
36
+ # Ping Federate privileged user password
37
+ attr_accessor :password
38
+
39
+ # Ping URL
40
+ attr_accessor :ping_url
41
+
42
+ # Ping Federate privileged user
43
+ attr_accessor :privileged_user
44
+
45
+ # Authentication token (see `/auth` and `/configure`)
46
+ attr_accessor :token
47
+
48
+ # The universal identity token, Required only for universal_identity authentication
49
+ attr_accessor :uid_token
50
+
51
+ # Attribute mapping from ruby-style variable name to JSON key.
52
+ def self.attribute_map
53
+ {
54
+ :'administrative_port' => :'administrative-port',
55
+ :'authorization_port' => :'authorization-port',
56
+ :'comment' => :'comment',
57
+ :'json' => :'json',
58
+ :'key' => :'key',
59
+ :'name' => :'name',
60
+ :'password' => :'password',
61
+ :'ping_url' => :'ping-url',
62
+ :'privileged_user' => :'privileged-user',
63
+ :'token' => :'token',
64
+ :'uid_token' => :'uid-token'
65
+ }
66
+ end
67
+
68
+ # Returns all the JSON keys this model knows about
69
+ def self.acceptable_attributes
70
+ attribute_map.values
71
+ end
72
+
73
+ # Attribute type mapping.
74
+ def self.openapi_types
75
+ {
76
+ :'administrative_port' => :'String',
77
+ :'authorization_port' => :'String',
78
+ :'comment' => :'String',
79
+ :'json' => :'Boolean',
80
+ :'key' => :'String',
81
+ :'name' => :'String',
82
+ :'password' => :'String',
83
+ :'ping_url' => :'String',
84
+ :'privileged_user' => :'String',
85
+ :'token' => :'String',
86
+ :'uid_token' => :'String'
87
+ }
88
+ end
89
+
90
+ # List of attributes with nullable: true
91
+ def self.openapi_nullable
92
+ Set.new([
93
+ ])
94
+ end
95
+
96
+ # Initializes the object
97
+ # @param [Hash] attributes Model attributes in the form of hash
98
+ def initialize(attributes = {})
99
+ if (!attributes.is_a?(Hash))
100
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::CreatePingTarget` initialize method"
101
+ end
102
+
103
+ # check to see if the attribute exists and convert string to symbol for hash key
104
+ attributes = attributes.each_with_object({}) { |(k, v), h|
105
+ if (!self.class.attribute_map.key?(k.to_sym))
106
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::CreatePingTarget`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
107
+ end
108
+ h[k.to_sym] = v
109
+ }
110
+
111
+ if attributes.key?(:'administrative_port')
112
+ self.administrative_port = attributes[:'administrative_port']
113
+ else
114
+ self.administrative_port = '9999'
115
+ end
116
+
117
+ if attributes.key?(:'authorization_port')
118
+ self.authorization_port = attributes[:'authorization_port']
119
+ else
120
+ self.authorization_port = '9031'
121
+ end
122
+
123
+ if attributes.key?(:'comment')
124
+ self.comment = attributes[:'comment']
125
+ end
126
+
127
+ if attributes.key?(:'json')
128
+ self.json = attributes[:'json']
129
+ end
130
+
131
+ if attributes.key?(:'key')
132
+ self.key = attributes[:'key']
133
+ end
134
+
135
+ if attributes.key?(:'name')
136
+ self.name = attributes[:'name']
137
+ end
138
+
139
+ if attributes.key?(:'password')
140
+ self.password = attributes[:'password']
141
+ end
142
+
143
+ if attributes.key?(:'ping_url')
144
+ self.ping_url = attributes[:'ping_url']
145
+ end
146
+
147
+ if attributes.key?(:'privileged_user')
148
+ self.privileged_user = attributes[:'privileged_user']
149
+ end
150
+
151
+ if attributes.key?(:'token')
152
+ self.token = attributes[:'token']
153
+ end
154
+
155
+ if attributes.key?(:'uid_token')
156
+ self.uid_token = attributes[:'uid_token']
157
+ end
158
+ end
159
+
160
+ # Show invalid properties with the reasons. Usually used together with valid?
161
+ # @return Array for valid properties with the reasons
162
+ def list_invalid_properties
163
+ invalid_properties = Array.new
164
+ if @name.nil?
165
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
166
+ end
167
+
168
+ invalid_properties
169
+ end
170
+
171
+ # Check to see if the all the properties in the model are valid
172
+ # @return true if the model is valid
173
+ def valid?
174
+ return false if @name.nil?
175
+ true
176
+ end
177
+
178
+ # Checks equality by comparing each attribute.
179
+ # @param [Object] Object to be compared
180
+ def ==(o)
181
+ return true if self.equal?(o)
182
+ self.class == o.class &&
183
+ administrative_port == o.administrative_port &&
184
+ authorization_port == o.authorization_port &&
185
+ comment == o.comment &&
186
+ json == o.json &&
187
+ key == o.key &&
188
+ name == o.name &&
189
+ password == o.password &&
190
+ ping_url == o.ping_url &&
191
+ privileged_user == o.privileged_user &&
192
+ token == o.token &&
193
+ uid_token == o.uid_token
194
+ end
195
+
196
+ # @see the `==` method
197
+ # @param [Object] Object to be compared
198
+ def eql?(o)
199
+ self == o
200
+ end
201
+
202
+ # Calculates hash code according to all attributes.
203
+ # @return [Integer] Hash code
204
+ def hash
205
+ [administrative_port, authorization_port, comment, json, key, name, password, ping_url, privileged_user, token, uid_token].hash
206
+ end
207
+
208
+ # Builds the object from hash
209
+ # @param [Hash] attributes Model attributes in the form of hash
210
+ # @return [Object] Returns the model itself
211
+ def self.build_from_hash(attributes)
212
+ new.build_from_hash(attributes)
213
+ end
214
+
215
+ # Builds the object from hash
216
+ # @param [Hash] attributes Model attributes in the form of hash
217
+ # @return [Object] Returns the model itself
218
+ def build_from_hash(attributes)
219
+ return nil unless attributes.is_a?(Hash)
220
+ attributes = attributes.transform_keys(&:to_sym)
221
+ self.class.openapi_types.each_pair do |key, type|
222
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
223
+ self.send("#{key}=", nil)
224
+ elsif type =~ /\AArray<(.*)>/i
225
+ # check to ensure the input is an array given that the attribute
226
+ # is documented as an array but the input is not
227
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
228
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
229
+ end
230
+ elsif !attributes[self.class.attribute_map[key]].nil?
231
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
232
+ end
233
+ end
234
+
235
+ self
236
+ end
237
+
238
+ # Deserializes the data based on type
239
+ # @param string type Data type
240
+ # @param string value Value to be deserialized
241
+ # @return [Object] Deserialized data
242
+ def _deserialize(type, value)
243
+ case type.to_sym
244
+ when :Time
245
+ Time.parse(value)
246
+ when :Date
247
+ Date.parse(value)
248
+ when :String
249
+ value.to_s
250
+ when :Integer
251
+ value.to_i
252
+ when :Float
253
+ value.to_f
254
+ when :Boolean
255
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
256
+ true
257
+ else
258
+ false
259
+ end
260
+ when :Object
261
+ # generic object (usually a Hash), return directly
262
+ value
263
+ when /\AArray<(?<inner_type>.+)>\z/
264
+ inner_type = Regexp.last_match[:inner_type]
265
+ value.map { |v| _deserialize(inner_type, v) }
266
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
267
+ k_type = Regexp.last_match[:k_type]
268
+ v_type = Regexp.last_match[:v_type]
269
+ {}.tap do |hash|
270
+ value.each do |k, v|
271
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
272
+ end
273
+ end
274
+ else # model
275
+ # models (e.g. Pet) or oneOf
276
+ klass = Akeyless.const_get(type)
277
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
278
+ end
279
+ end
280
+
281
+ # Returns the string representation of the object
282
+ # @return [String] String presentation of the object
283
+ def to_s
284
+ to_hash.to_s
285
+ end
286
+
287
+ # to_body is an alias to to_hash (backward compatibility)
288
+ # @return [Hash] Returns the object in the form of hash
289
+ def to_body
290
+ to_hash
291
+ end
292
+
293
+ # Returns the object in the form of hash
294
+ # @return [Hash] Returns the object in the form of hash
295
+ def to_hash
296
+ hash = {}
297
+ self.class.attribute_map.each_pair do |attr, param|
298
+ value = self.send(attr)
299
+ if value.nil?
300
+ is_nullable = self.class.openapi_nullable.include?(attr)
301
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
302
+ end
303
+
304
+ hash[param] = _to_hash(value)
305
+ end
306
+ hash
307
+ end
308
+
309
+ # Outputs non-array value in the form of hash
310
+ # For object, use to_hash. Otherwise, just return the value
311
+ # @param [Object] value Any valid value
312
+ # @return [Hash] Returns the value in the form of hash
313
+ def _to_hash(value)
314
+ if value.is_a?(Array)
315
+ value.compact.map { |v| _to_hash(v) }
316
+ elsif value.is_a?(Hash)
317
+ {}.tap do |hash|
318
+ value.each { |k, v| hash[k] = _to_hash(v) }
319
+ end
320
+ elsif value.respond_to? :to_hash
321
+ value.to_hash
322
+ else
323
+ value
324
+ end
325
+ end
326
+
327
+ end
328
+
329
+ end