akeyless 3.1.0 → 3.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +24 -1
- data/docs/AssocTargetItem.md +2 -0
- data/docs/CreateCertificate.md +40 -0
- data/docs/CreateCertificateOutput.md +18 -0
- data/docs/CreateClassicKey.md +6 -2
- data/docs/CreateDBTarget.md +4 -0
- data/docs/CreateDFCKey.md +3 -1
- data/docs/CreateDynamicSecret.md +3 -1
- data/docs/CreateKey.md +3 -1
- data/docs/CreatePKICertIssuer.md +3 -1
- data/docs/CreateRotatedSecret.md +3 -1
- data/docs/CreateSSHCertIssuer.md +3 -1
- data/docs/CreateSecret.md +3 -1
- data/docs/CreateTokenizer.md +3 -1
- data/docs/DSProducerDetails.md +8 -0
- data/docs/DecryptGPG.md +34 -0
- data/docs/DecryptGPGOutput.md +18 -0
- data/docs/EncryptGPG.md +32 -0
- data/docs/EncryptGPGOutput.md +18 -0
- data/docs/GatewayCreateProducerSnowflake.md +4 -0
- data/docs/GatewayUpdateItem.md +3 -1
- data/docs/GatewayUpdateProducerSnowflake.md +4 -0
- data/docs/GatewayUpdateTlsCert.md +26 -0
- data/docs/GatewayUpdateTlsCertOutput.md +18 -0
- data/docs/GenCustomerFragment.md +4 -2
- data/docs/GetCertificateValue.md +26 -0
- data/docs/GetCertificateValueOutput.md +20 -0
- data/docs/ListSRABastions.md +2 -0
- data/docs/RotateKey.md +2 -0
- data/docs/SignGPG.md +32 -0
- data/docs/SignGPGOutput.md +18 -0
- data/docs/TargetTypeDetailsInput.md +4 -0
- data/docs/UpdateCertificateOutput.md +18 -0
- data/docs/UpdateCertificateValue.md +32 -0
- data/docs/UpdateDBTarget.md +4 -0
- data/docs/UpdateItem.md +3 -1
- data/docs/UpdatePKICertIssuer.md +3 -1
- data/docs/UpdateRotatedSecret.md +3 -1
- data/docs/UpdateSSHCertIssuer.md +3 -1
- data/docs/UploadPKCS12.md +3 -1
- data/docs/UploadRSA.md +3 -1
- data/docs/V2Api.md +504 -0
- data/docs/VerifyGPG.md +32 -0
- data/lib/akeyless/api/v2_api.rb +512 -0
- data/lib/akeyless/models/assoc_target_item.rb +11 -1
- data/lib/akeyless/models/create_certificate.rb +339 -0
- data/lib/akeyless/models/create_certificate_output.rb +219 -0
- data/lib/akeyless/models/create_classic_key.rb +23 -3
- data/lib/akeyless/models/create_db_target.rb +21 -1
- data/lib/akeyless/models/create_dfc_key.rb +12 -2
- data/lib/akeyless/models/create_dynamic_secret.rb +12 -4
- data/lib/akeyless/models/create_key.rb +12 -2
- data/lib/akeyless/models/create_pki_cert_issuer.rb +12 -2
- data/lib/akeyless/models/create_rotated_secret.rb +12 -2
- data/lib/akeyless/models/create_secret.rb +12 -2
- data/lib/akeyless/models/create_ssh_cert_issuer.rb +12 -2
- data/lib/akeyless/models/create_tokenizer.rb +12 -2
- data/lib/akeyless/models/decrypt_gpg.rb +310 -0
- data/lib/akeyless/models/decrypt_gpg_output.rb +219 -0
- data/lib/akeyless/models/ds_producer_details.rb +40 -1
- data/lib/akeyless/models/encrypt_gpg.rb +300 -0
- data/lib/akeyless/models/encrypt_gpg_output.rb +219 -0
- data/lib/akeyless/models/gateway_create_producer_snowflake.rb +22 -2
- data/lib/akeyless/models/gateway_update_item.rb +14 -2
- data/lib/akeyless/models/gateway_update_producer_snowflake.rb +22 -2
- data/lib/akeyless/models/gateway_update_tls_cert.rb +261 -0
- data/lib/akeyless/models/gateway_update_tls_cert_output.rb +219 -0
- data/lib/akeyless/models/gen_customer_fragment.rb +15 -5
- data/lib/akeyless/models/get_certificate_value.rb +265 -0
- data/lib/akeyless/models/get_certificate_value_output.rb +228 -0
- data/lib/akeyless/models/list_sra_bastions.rb +10 -1
- data/lib/akeyless/models/rotate_key.rb +11 -1
- data/lib/akeyless/models/sign_gpg.rb +300 -0
- data/lib/akeyless/models/sign_gpg_output.rb +219 -0
- data/lib/akeyless/models/target_type_details_input.rb +20 -1
- data/lib/akeyless/models/update_certificate_output.rb +219 -0
- data/lib/akeyless/models/update_certificate_value.rb +297 -0
- data/lib/akeyless/models/update_db_target.rb +21 -1
- data/lib/akeyless/models/update_item.rb +14 -2
- data/lib/akeyless/models/update_pki_cert_issuer.rb +12 -2
- data/lib/akeyless/models/update_rotated_secret.rb +14 -2
- data/lib/akeyless/models/update_ssh_cert_issuer.rb +12 -2
- data/lib/akeyless/models/upload_pkcs12.rb +12 -2
- data/lib/akeyless/models/upload_rsa.rb +12 -2
- data/lib/akeyless/models/verify_gpg.rb +300 -0
- data/lib/akeyless/version.rb +1 -1
- data/lib/akeyless.rb +15 -0
- data/spec/models/create_certificate_output_spec.rb +34 -0
- data/spec/models/create_certificate_spec.rb +94 -0
- data/spec/models/decrypt_gpg_output_spec.rb +34 -0
- data/spec/models/decrypt_gpg_spec.rb +82 -0
- data/spec/models/encrypt_gpg_output_spec.rb +34 -0
- data/spec/models/encrypt_gpg_spec.rb +76 -0
- data/spec/models/gateway_update_tls_cert_output_spec.rb +34 -0
- data/spec/models/gateway_update_tls_cert_spec.rb +58 -0
- data/spec/models/get_certificate_value_output_spec.rb +40 -0
- data/spec/models/get_certificate_value_spec.rb +58 -0
- data/spec/models/sign_gpg_output_spec.rb +34 -0
- data/spec/models/sign_gpg_spec.rb +76 -0
- data/spec/models/update_certificate_output_spec.rb +34 -0
- data/spec/models/update_certificate_value_spec.rb +76 -0
- data/spec/models/verify_gpg_spec.rb +76 -0
- metadata +600 -540
@@ -0,0 +1,339 @@
|
|
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 CreateCertificate
|
18
|
+
# Content of the certificate PEM in a Base64 format.
|
19
|
+
attr_accessor :certificate_data
|
20
|
+
|
21
|
+
# Protection from accidental deletion of this item
|
22
|
+
attr_accessor :delete_protection
|
23
|
+
|
24
|
+
# Description of the object
|
25
|
+
attr_accessor :description
|
26
|
+
|
27
|
+
# How many days before the expiration of the certificate would you like to be notified.
|
28
|
+
attr_accessor :expiration_event_in
|
29
|
+
|
30
|
+
# Set output format to JSON
|
31
|
+
attr_accessor :json
|
32
|
+
|
33
|
+
# The name of a key to use to encrypt the certificate's key (if empty, the account default protectionKey key will be used)
|
34
|
+
attr_accessor :key
|
35
|
+
|
36
|
+
# Content of the certificate's private key PEM in a Base64 format.
|
37
|
+
attr_accessor :key_data
|
38
|
+
|
39
|
+
# Deprecated - use description
|
40
|
+
attr_accessor :metadata
|
41
|
+
|
42
|
+
# Certificate name
|
43
|
+
attr_accessor :name
|
44
|
+
|
45
|
+
# List of the tags attached to this certificate
|
46
|
+
attr_accessor :tags
|
47
|
+
|
48
|
+
# Authentication token (see `/auth` and `/configure`)
|
49
|
+
attr_accessor :token
|
50
|
+
|
51
|
+
# The universal identity token, Required only for universal_identity authentication
|
52
|
+
attr_accessor :uid_token
|
53
|
+
|
54
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
55
|
+
def self.attribute_map
|
56
|
+
{
|
57
|
+
:'certificate_data' => :'certificate-data',
|
58
|
+
:'delete_protection' => :'delete_protection',
|
59
|
+
:'description' => :'description',
|
60
|
+
:'expiration_event_in' => :'expiration-event-in',
|
61
|
+
:'json' => :'json',
|
62
|
+
:'key' => :'key',
|
63
|
+
:'key_data' => :'key-data',
|
64
|
+
:'metadata' => :'metadata',
|
65
|
+
:'name' => :'name',
|
66
|
+
:'tags' => :'tags',
|
67
|
+
:'token' => :'token',
|
68
|
+
:'uid_token' => :'uid-token'
|
69
|
+
}
|
70
|
+
end
|
71
|
+
|
72
|
+
# Returns all the JSON keys this model knows about
|
73
|
+
def self.acceptable_attributes
|
74
|
+
attribute_map.values
|
75
|
+
end
|
76
|
+
|
77
|
+
# Attribute type mapping.
|
78
|
+
def self.openapi_types
|
79
|
+
{
|
80
|
+
:'certificate_data' => :'String',
|
81
|
+
:'delete_protection' => :'String',
|
82
|
+
:'description' => :'String',
|
83
|
+
:'expiration_event_in' => :'Array<String>',
|
84
|
+
:'json' => :'Boolean',
|
85
|
+
:'key' => :'String',
|
86
|
+
:'key_data' => :'String',
|
87
|
+
:'metadata' => :'String',
|
88
|
+
:'name' => :'String',
|
89
|
+
:'tags' => :'Array<String>',
|
90
|
+
:'token' => :'String',
|
91
|
+
:'uid_token' => :'String'
|
92
|
+
}
|
93
|
+
end
|
94
|
+
|
95
|
+
# List of attributes with nullable: true
|
96
|
+
def self.openapi_nullable
|
97
|
+
Set.new([
|
98
|
+
])
|
99
|
+
end
|
100
|
+
|
101
|
+
# Initializes the object
|
102
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
103
|
+
def initialize(attributes = {})
|
104
|
+
if (!attributes.is_a?(Hash))
|
105
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::CreateCertificate` initialize method"
|
106
|
+
end
|
107
|
+
|
108
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
109
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
110
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
111
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::CreateCertificate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
112
|
+
end
|
113
|
+
h[k.to_sym] = v
|
114
|
+
}
|
115
|
+
|
116
|
+
if attributes.key?(:'certificate_data')
|
117
|
+
self.certificate_data = attributes[:'certificate_data']
|
118
|
+
end
|
119
|
+
|
120
|
+
if attributes.key?(:'delete_protection')
|
121
|
+
self.delete_protection = attributes[:'delete_protection']
|
122
|
+
end
|
123
|
+
|
124
|
+
if attributes.key?(:'description')
|
125
|
+
self.description = attributes[:'description']
|
126
|
+
end
|
127
|
+
|
128
|
+
if attributes.key?(:'expiration_event_in')
|
129
|
+
if (value = attributes[:'expiration_event_in']).is_a?(Array)
|
130
|
+
self.expiration_event_in = value
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
if attributes.key?(:'json')
|
135
|
+
self.json = attributes[:'json']
|
136
|
+
end
|
137
|
+
|
138
|
+
if attributes.key?(:'key')
|
139
|
+
self.key = attributes[:'key']
|
140
|
+
end
|
141
|
+
|
142
|
+
if attributes.key?(:'key_data')
|
143
|
+
self.key_data = attributes[:'key_data']
|
144
|
+
end
|
145
|
+
|
146
|
+
if attributes.key?(:'metadata')
|
147
|
+
self.metadata = attributes[:'metadata']
|
148
|
+
end
|
149
|
+
|
150
|
+
if attributes.key?(:'name')
|
151
|
+
self.name = attributes[:'name']
|
152
|
+
end
|
153
|
+
|
154
|
+
if attributes.key?(:'tags')
|
155
|
+
if (value = attributes[:'tags']).is_a?(Array)
|
156
|
+
self.tags = value
|
157
|
+
end
|
158
|
+
end
|
159
|
+
|
160
|
+
if attributes.key?(:'token')
|
161
|
+
self.token = attributes[:'token']
|
162
|
+
end
|
163
|
+
|
164
|
+
if attributes.key?(:'uid_token')
|
165
|
+
self.uid_token = attributes[:'uid_token']
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
170
|
+
# @return Array for valid properties with the reasons
|
171
|
+
def list_invalid_properties
|
172
|
+
invalid_properties = Array.new
|
173
|
+
if @name.nil?
|
174
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
175
|
+
end
|
176
|
+
|
177
|
+
invalid_properties
|
178
|
+
end
|
179
|
+
|
180
|
+
# Check to see if the all the properties in the model are valid
|
181
|
+
# @return true if the model is valid
|
182
|
+
def valid?
|
183
|
+
return false if @name.nil?
|
184
|
+
true
|
185
|
+
end
|
186
|
+
|
187
|
+
# Checks equality by comparing each attribute.
|
188
|
+
# @param [Object] Object to be compared
|
189
|
+
def ==(o)
|
190
|
+
return true if self.equal?(o)
|
191
|
+
self.class == o.class &&
|
192
|
+
certificate_data == o.certificate_data &&
|
193
|
+
delete_protection == o.delete_protection &&
|
194
|
+
description == o.description &&
|
195
|
+
expiration_event_in == o.expiration_event_in &&
|
196
|
+
json == o.json &&
|
197
|
+
key == o.key &&
|
198
|
+
key_data == o.key_data &&
|
199
|
+
metadata == o.metadata &&
|
200
|
+
name == o.name &&
|
201
|
+
tags == o.tags &&
|
202
|
+
token == o.token &&
|
203
|
+
uid_token == o.uid_token
|
204
|
+
end
|
205
|
+
|
206
|
+
# @see the `==` method
|
207
|
+
# @param [Object] Object to be compared
|
208
|
+
def eql?(o)
|
209
|
+
self == o
|
210
|
+
end
|
211
|
+
|
212
|
+
# Calculates hash code according to all attributes.
|
213
|
+
# @return [Integer] Hash code
|
214
|
+
def hash
|
215
|
+
[certificate_data, delete_protection, description, expiration_event_in, json, key, key_data, metadata, name, tags, token, uid_token].hash
|
216
|
+
end
|
217
|
+
|
218
|
+
# Builds the object from hash
|
219
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
220
|
+
# @return [Object] Returns the model itself
|
221
|
+
def self.build_from_hash(attributes)
|
222
|
+
new.build_from_hash(attributes)
|
223
|
+
end
|
224
|
+
|
225
|
+
# Builds the object from hash
|
226
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
227
|
+
# @return [Object] Returns the model itself
|
228
|
+
def build_from_hash(attributes)
|
229
|
+
return nil unless attributes.is_a?(Hash)
|
230
|
+
attributes = attributes.transform_keys(&:to_sym)
|
231
|
+
self.class.openapi_types.each_pair do |key, type|
|
232
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
233
|
+
self.send("#{key}=", nil)
|
234
|
+
elsif type =~ /\AArray<(.*)>/i
|
235
|
+
# check to ensure the input is an array given that the attribute
|
236
|
+
# is documented as an array but the input is not
|
237
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
238
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
239
|
+
end
|
240
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
241
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
242
|
+
end
|
243
|
+
end
|
244
|
+
|
245
|
+
self
|
246
|
+
end
|
247
|
+
|
248
|
+
# Deserializes the data based on type
|
249
|
+
# @param string type Data type
|
250
|
+
# @param string value Value to be deserialized
|
251
|
+
# @return [Object] Deserialized data
|
252
|
+
def _deserialize(type, value)
|
253
|
+
case type.to_sym
|
254
|
+
when :Time
|
255
|
+
Time.parse(value)
|
256
|
+
when :Date
|
257
|
+
Date.parse(value)
|
258
|
+
when :String
|
259
|
+
value.to_s
|
260
|
+
when :Integer
|
261
|
+
value.to_i
|
262
|
+
when :Float
|
263
|
+
value.to_f
|
264
|
+
when :Boolean
|
265
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
266
|
+
true
|
267
|
+
else
|
268
|
+
false
|
269
|
+
end
|
270
|
+
when :Object
|
271
|
+
# generic object (usually a Hash), return directly
|
272
|
+
value
|
273
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
274
|
+
inner_type = Regexp.last_match[:inner_type]
|
275
|
+
value.map { |v| _deserialize(inner_type, v) }
|
276
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
277
|
+
k_type = Regexp.last_match[:k_type]
|
278
|
+
v_type = Regexp.last_match[:v_type]
|
279
|
+
{}.tap do |hash|
|
280
|
+
value.each do |k, v|
|
281
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
282
|
+
end
|
283
|
+
end
|
284
|
+
else # model
|
285
|
+
# models (e.g. Pet) or oneOf
|
286
|
+
klass = Akeyless.const_get(type)
|
287
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
288
|
+
end
|
289
|
+
end
|
290
|
+
|
291
|
+
# Returns the string representation of the object
|
292
|
+
# @return [String] String presentation of the object
|
293
|
+
def to_s
|
294
|
+
to_hash.to_s
|
295
|
+
end
|
296
|
+
|
297
|
+
# to_body is an alias to to_hash (backward compatibility)
|
298
|
+
# @return [Hash] Returns the object in the form of hash
|
299
|
+
def to_body
|
300
|
+
to_hash
|
301
|
+
end
|
302
|
+
|
303
|
+
# Returns the object in the form of hash
|
304
|
+
# @return [Hash] Returns the object in the form of hash
|
305
|
+
def to_hash
|
306
|
+
hash = {}
|
307
|
+
self.class.attribute_map.each_pair do |attr, param|
|
308
|
+
value = self.send(attr)
|
309
|
+
if value.nil?
|
310
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
311
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
312
|
+
end
|
313
|
+
|
314
|
+
hash[param] = _to_hash(value)
|
315
|
+
end
|
316
|
+
hash
|
317
|
+
end
|
318
|
+
|
319
|
+
# Outputs non-array value in the form of hash
|
320
|
+
# For object, use to_hash. Otherwise, just return the value
|
321
|
+
# @param [Object] value Any valid value
|
322
|
+
# @return [Hash] Returns the value in the form of hash
|
323
|
+
def _to_hash(value)
|
324
|
+
if value.is_a?(Array)
|
325
|
+
value.compact.map { |v| _to_hash(v) }
|
326
|
+
elsif value.is_a?(Hash)
|
327
|
+
{}.tap do |hash|
|
328
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
329
|
+
end
|
330
|
+
elsif value.respond_to? :to_hash
|
331
|
+
value.to_hash
|
332
|
+
else
|
333
|
+
value
|
334
|
+
end
|
335
|
+
end
|
336
|
+
|
337
|
+
end
|
338
|
+
|
339
|
+
end
|
@@ -0,0 +1,219 @@
|
|
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 CreateCertificateOutput
|
18
|
+
attr_accessor :name
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'name' => :'name'
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
# Returns all the JSON keys this model knows about
|
28
|
+
def self.acceptable_attributes
|
29
|
+
attribute_map.values
|
30
|
+
end
|
31
|
+
|
32
|
+
# Attribute type mapping.
|
33
|
+
def self.openapi_types
|
34
|
+
{
|
35
|
+
:'name' => :'String'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# List of attributes with nullable: true
|
40
|
+
def self.openapi_nullable
|
41
|
+
Set.new([
|
42
|
+
])
|
43
|
+
end
|
44
|
+
|
45
|
+
# Initializes the object
|
46
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
47
|
+
def initialize(attributes = {})
|
48
|
+
if (!attributes.is_a?(Hash))
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::CreateCertificateOutput` initialize method"
|
50
|
+
end
|
51
|
+
|
52
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
53
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
54
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
55
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::CreateCertificateOutput`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
56
|
+
end
|
57
|
+
h[k.to_sym] = v
|
58
|
+
}
|
59
|
+
|
60
|
+
if attributes.key?(:'name')
|
61
|
+
self.name = attributes[:'name']
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
66
|
+
# @return Array for valid properties with the reasons
|
67
|
+
def list_invalid_properties
|
68
|
+
invalid_properties = Array.new
|
69
|
+
invalid_properties
|
70
|
+
end
|
71
|
+
|
72
|
+
# Check to see if the all the properties in the model are valid
|
73
|
+
# @return true if the model is valid
|
74
|
+
def valid?
|
75
|
+
true
|
76
|
+
end
|
77
|
+
|
78
|
+
# Checks equality by comparing each attribute.
|
79
|
+
# @param [Object] Object to be compared
|
80
|
+
def ==(o)
|
81
|
+
return true if self.equal?(o)
|
82
|
+
self.class == o.class &&
|
83
|
+
name == o.name
|
84
|
+
end
|
85
|
+
|
86
|
+
# @see the `==` method
|
87
|
+
# @param [Object] Object to be compared
|
88
|
+
def eql?(o)
|
89
|
+
self == o
|
90
|
+
end
|
91
|
+
|
92
|
+
# Calculates hash code according to all attributes.
|
93
|
+
# @return [Integer] Hash code
|
94
|
+
def hash
|
95
|
+
[name].hash
|
96
|
+
end
|
97
|
+
|
98
|
+
# Builds the object from hash
|
99
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
100
|
+
# @return [Object] Returns the model itself
|
101
|
+
def self.build_from_hash(attributes)
|
102
|
+
new.build_from_hash(attributes)
|
103
|
+
end
|
104
|
+
|
105
|
+
# Builds the object from hash
|
106
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
107
|
+
# @return [Object] Returns the model itself
|
108
|
+
def build_from_hash(attributes)
|
109
|
+
return nil unless attributes.is_a?(Hash)
|
110
|
+
attributes = attributes.transform_keys(&:to_sym)
|
111
|
+
self.class.openapi_types.each_pair do |key, type|
|
112
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
113
|
+
self.send("#{key}=", nil)
|
114
|
+
elsif type =~ /\AArray<(.*)>/i
|
115
|
+
# check to ensure the input is an array given that the attribute
|
116
|
+
# is documented as an array but the input is not
|
117
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
118
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
119
|
+
end
|
120
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
121
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
self
|
126
|
+
end
|
127
|
+
|
128
|
+
# Deserializes the data based on type
|
129
|
+
# @param string type Data type
|
130
|
+
# @param string value Value to be deserialized
|
131
|
+
# @return [Object] Deserialized data
|
132
|
+
def _deserialize(type, value)
|
133
|
+
case type.to_sym
|
134
|
+
when :Time
|
135
|
+
Time.parse(value)
|
136
|
+
when :Date
|
137
|
+
Date.parse(value)
|
138
|
+
when :String
|
139
|
+
value.to_s
|
140
|
+
when :Integer
|
141
|
+
value.to_i
|
142
|
+
when :Float
|
143
|
+
value.to_f
|
144
|
+
when :Boolean
|
145
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
146
|
+
true
|
147
|
+
else
|
148
|
+
false
|
149
|
+
end
|
150
|
+
when :Object
|
151
|
+
# generic object (usually a Hash), return directly
|
152
|
+
value
|
153
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
154
|
+
inner_type = Regexp.last_match[:inner_type]
|
155
|
+
value.map { |v| _deserialize(inner_type, v) }
|
156
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
157
|
+
k_type = Regexp.last_match[:k_type]
|
158
|
+
v_type = Regexp.last_match[:v_type]
|
159
|
+
{}.tap do |hash|
|
160
|
+
value.each do |k, v|
|
161
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
162
|
+
end
|
163
|
+
end
|
164
|
+
else # model
|
165
|
+
# models (e.g. Pet) or oneOf
|
166
|
+
klass = Akeyless.const_get(type)
|
167
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
171
|
+
# Returns the string representation of the object
|
172
|
+
# @return [String] String presentation of the object
|
173
|
+
def to_s
|
174
|
+
to_hash.to_s
|
175
|
+
end
|
176
|
+
|
177
|
+
# to_body is an alias to to_hash (backward compatibility)
|
178
|
+
# @return [Hash] Returns the object in the form of hash
|
179
|
+
def to_body
|
180
|
+
to_hash
|
181
|
+
end
|
182
|
+
|
183
|
+
# Returns the object in the form of hash
|
184
|
+
# @return [Hash] Returns the object in the form of hash
|
185
|
+
def to_hash
|
186
|
+
hash = {}
|
187
|
+
self.class.attribute_map.each_pair do |attr, param|
|
188
|
+
value = self.send(attr)
|
189
|
+
if value.nil?
|
190
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
191
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
192
|
+
end
|
193
|
+
|
194
|
+
hash[param] = _to_hash(value)
|
195
|
+
end
|
196
|
+
hash
|
197
|
+
end
|
198
|
+
|
199
|
+
# Outputs non-array value in the form of hash
|
200
|
+
# For object, use to_hash. Otherwise, just return the value
|
201
|
+
# @param [Object] value Any valid value
|
202
|
+
# @return [Hash] Returns the value in the form of hash
|
203
|
+
def _to_hash(value)
|
204
|
+
if value.is_a?(Array)
|
205
|
+
value.compact.map { |v| _to_hash(v) }
|
206
|
+
elsif value.is_a?(Hash)
|
207
|
+
{}.tap do |hash|
|
208
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
209
|
+
end
|
210
|
+
elsif value.respond_to? :to_hash
|
211
|
+
value.to_hash
|
212
|
+
else
|
213
|
+
value
|
214
|
+
end
|
215
|
+
end
|
216
|
+
|
217
|
+
end
|
218
|
+
|
219
|
+
end
|
@@ -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
|
-
#
|
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
|