akeyless 3.1.1 → 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 +12 -1
- data/docs/AssocTargetItem.md +2 -0
- data/docs/CreateCertificate.md +3 -1
- 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/GenCustomerFragment.md +4 -2
- data/docs/SignGPG.md +32 -0
- data/docs/SignGPGOutput.md +18 -0
- data/docs/TargetTypeDetailsInput.md +4 -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 +252 -0
- data/docs/VerifyGPG.md +32 -0
- data/lib/akeyless/api/v2_api.rb +256 -0
- data/lib/akeyless/models/assoc_target_item.rb +11 -1
- data/lib/akeyless/models/create_certificate.rb +12 -2
- 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/gen_customer_fragment.rb +15 -5
- 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_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 +7 -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/sign_gpg_output_spec.rb +34 -0
- data/spec/models/sign_gpg_spec.rb +76 -0
- data/spec/models/verify_gpg_spec.rb +76 -0
- metadata +30 -2
@@ -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 SignGPG
|
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
|
+
# The message to be signed in base64 format
|
31
|
+
attr_accessor :message
|
32
|
+
|
33
|
+
# Passphrase that was used to generate the key
|
34
|
+
attr_accessor :passphrase
|
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
|
+
:'message' => :'message',
|
50
|
+
:'passphrase' => :'passphrase',
|
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
|
+
:'message' => :'String',
|
69
|
+
:'passphrase' => :'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::SignGPG` 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::SignGPG`. 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?(:'message')
|
113
|
+
self.message = attributes[:'message']
|
114
|
+
end
|
115
|
+
|
116
|
+
if attributes.key?(:'passphrase')
|
117
|
+
self.passphrase = attributes[:'passphrase']
|
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 @message.nil?
|
138
|
+
invalid_properties.push('invalid value for "message", message 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 @message.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
|
+
message == o.message &&
|
162
|
+
passphrase == o.passphrase &&
|
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, message, passphrase, 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
|
@@ -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 SignGPGOutput
|
18
|
+
attr_accessor :result
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'result' => :'result'
|
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
|
+
:'result' => :'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::SignGPGOutput` 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::SignGPGOutput`. 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?(:'result')
|
61
|
+
self.result = attributes[:'result']
|
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
|
+
result == o.result
|
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
|
+
[result].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
|
@@ -75,6 +75,11 @@ module Akeyless
|
|
75
75
|
|
76
76
|
attr_accessor :db_port
|
77
77
|
|
78
|
+
# (Optional) Private Key in PEM format
|
79
|
+
attr_accessor :db_private_key
|
80
|
+
|
81
|
+
attr_accessor :db_private_key_passphrase
|
82
|
+
|
78
83
|
attr_accessor :db_pwd
|
79
84
|
|
80
85
|
# (Optional) DBServerCertificates defines the set of root certificate authorities that clients use when verifying server certificates. If DBServerCertificates is empty, TLS uses the host's root CA set.
|
@@ -244,6 +249,8 @@ module Akeyless
|
|
244
249
|
:'db_host_name' => :'db_host_name',
|
245
250
|
:'db_name' => :'db_name',
|
246
251
|
:'db_port' => :'db_port',
|
252
|
+
:'db_private_key' => :'db_private_key',
|
253
|
+
:'db_private_key_passphrase' => :'db_private_key_passphrase',
|
247
254
|
:'db_pwd' => :'db_pwd',
|
248
255
|
:'db_server_certificates' => :'db_server_certificates',
|
249
256
|
:'db_server_name' => :'db_server_name',
|
@@ -348,6 +355,8 @@ module Akeyless
|
|
348
355
|
:'db_host_name' => :'String',
|
349
356
|
:'db_name' => :'String',
|
350
357
|
:'db_port' => :'String',
|
358
|
+
:'db_private_key' => :'String',
|
359
|
+
:'db_private_key_passphrase' => :'String',
|
351
360
|
:'db_pwd' => :'String',
|
352
361
|
:'db_server_certificates' => :'String',
|
353
362
|
:'db_server_name' => :'String',
|
@@ -553,6 +562,14 @@ module Akeyless
|
|
553
562
|
self.db_port = attributes[:'db_port']
|
554
563
|
end
|
555
564
|
|
565
|
+
if attributes.key?(:'db_private_key')
|
566
|
+
self.db_private_key = attributes[:'db_private_key']
|
567
|
+
end
|
568
|
+
|
569
|
+
if attributes.key?(:'db_private_key_passphrase')
|
570
|
+
self.db_private_key_passphrase = attributes[:'db_private_key_passphrase']
|
571
|
+
end
|
572
|
+
|
556
573
|
if attributes.key?(:'db_pwd')
|
557
574
|
self.db_pwd = attributes[:'db_pwd']
|
558
575
|
end
|
@@ -860,6 +877,8 @@ module Akeyless
|
|
860
877
|
db_host_name == o.db_host_name &&
|
861
878
|
db_name == o.db_name &&
|
862
879
|
db_port == o.db_port &&
|
880
|
+
db_private_key == o.db_private_key &&
|
881
|
+
db_private_key_passphrase == o.db_private_key_passphrase &&
|
863
882
|
db_pwd == o.db_pwd &&
|
864
883
|
db_server_certificates == o.db_server_certificates &&
|
865
884
|
db_server_name == o.db_server_name &&
|
@@ -936,7 +955,7 @@ module Akeyless
|
|
936
955
|
# Calculates hash code according to all attributes.
|
937
956
|
# @return [Integer] Hash code
|
938
957
|
def hash
|
939
|
-
[app_private_key, artifactory_admin_apikey, artifactory_admin_username, artifactory_base_url, auth_flow, aws_access_key_id, aws_region, aws_secret_access_key, aws_session_token, azure_client_id, azure_client_secret, azure_resource_group_name, azure_resource_name, azure_subscription_id, azure_tenant_id, ca_cert_data, ca_cert_name, chef_server_host_name, chef_server_key, chef_server_port, chef_server_url, chef_server_username, chef_skip_ssl, client_id, client_secret, db_host_name, db_name, db_port, db_pwd, db_server_certificates, db_server_name, db_user_name, eks_access_key_id, eks_cluster_ca_certificate, eks_cluster_endpoint, eks_cluster_name, eks_region, eks_secret_access_key, gcp_service_account_email, gcp_service_account_key, github_app_id, github_app_private_key, github_base_url, gke_cluster_ca_certificate, gke_cluster_endpoint, gke_cluster_name, gke_service_account_key, gke_service_account_name, host, implementation_type, k8s_bearer_token, k8s_cluster_ca_certificate, k8s_cluster_endpoint, ldap_audience, ldap_bind_dn, ldap_bind_password, ldap_certificate, ldap_token_expiration, ldap_url, mongodb_atlas_api_private_key, mongodb_atlas_api_public_key, mongodb_atlas_project_id, mongodb_db_name, mongodb_default_auth_db, mongodb_host_port, mongodb_is_atlas, mongodb_password, mongodb_uri_connection, mongodb_uri_options, mongodb_username, password, payload, port, private_key, private_key_password, rabbitmq_server_password, rabbitmq_server_uri, rabbitmq_server_user, security_token, sf_account, ssl_connection_certificate, ssl_connection_mode, tenant_url, url, use_gw_cloud_identity, user_name, username, venafi_api_key, venafi_base_url, venafi_tpp_password, venafi_tpp_username, venafi_use_tpp, venafi_zone].hash
|
958
|
+
[app_private_key, artifactory_admin_apikey, artifactory_admin_username, artifactory_base_url, auth_flow, aws_access_key_id, aws_region, aws_secret_access_key, aws_session_token, azure_client_id, azure_client_secret, azure_resource_group_name, azure_resource_name, azure_subscription_id, azure_tenant_id, ca_cert_data, ca_cert_name, chef_server_host_name, chef_server_key, chef_server_port, chef_server_url, chef_server_username, chef_skip_ssl, client_id, client_secret, db_host_name, db_name, db_port, db_private_key, db_private_key_passphrase, db_pwd, db_server_certificates, db_server_name, db_user_name, eks_access_key_id, eks_cluster_ca_certificate, eks_cluster_endpoint, eks_cluster_name, eks_region, eks_secret_access_key, gcp_service_account_email, gcp_service_account_key, github_app_id, github_app_private_key, github_base_url, gke_cluster_ca_certificate, gke_cluster_endpoint, gke_cluster_name, gke_service_account_key, gke_service_account_name, host, implementation_type, k8s_bearer_token, k8s_cluster_ca_certificate, k8s_cluster_endpoint, ldap_audience, ldap_bind_dn, ldap_bind_password, ldap_certificate, ldap_token_expiration, ldap_url, mongodb_atlas_api_private_key, mongodb_atlas_api_public_key, mongodb_atlas_project_id, mongodb_db_name, mongodb_default_auth_db, mongodb_host_port, mongodb_is_atlas, mongodb_password, mongodb_uri_connection, mongodb_uri_options, mongodb_username, password, payload, port, private_key, private_key_password, rabbitmq_server_password, rabbitmq_server_uri, rabbitmq_server_user, security_token, sf_account, ssl_connection_certificate, ssl_connection_mode, tenant_url, url, use_gw_cloud_identity, user_name, username, venafi_api_key, venafi_base_url, venafi_tpp_password, venafi_tpp_username, venafi_use_tpp, venafi_zone].hash
|
940
959
|
end
|
941
960
|
|
942
961
|
# Builds the object from hash
|
@@ -69,6 +69,12 @@ module Akeyless
|
|
69
69
|
|
70
70
|
attr_accessor :snowflake_account
|
71
71
|
|
72
|
+
# RSA Private key (base64 encoded)
|
73
|
+
attr_accessor :snowflake_api_private_key
|
74
|
+
|
75
|
+
# The Private key passphrase
|
76
|
+
attr_accessor :snowflake_api_private_key_password
|
77
|
+
|
72
78
|
# SSL connection mode
|
73
79
|
attr_accessor :ssl
|
74
80
|
|
@@ -110,6 +116,8 @@ module Akeyless
|
|
110
116
|
:'port' => :'port',
|
111
117
|
:'pwd' => :'pwd',
|
112
118
|
:'snowflake_account' => :'snowflake-account',
|
119
|
+
:'snowflake_api_private_key' => :'snowflake-api-private-key',
|
120
|
+
:'snowflake_api_private_key_password' => :'snowflake-api-private-key-password',
|
113
121
|
:'ssl' => :'ssl',
|
114
122
|
:'ssl_certificate' => :'ssl-certificate',
|
115
123
|
:'token' => :'token',
|
@@ -148,6 +156,8 @@ module Akeyless
|
|
148
156
|
:'port' => :'String',
|
149
157
|
:'pwd' => :'String',
|
150
158
|
:'snowflake_account' => :'String',
|
159
|
+
:'snowflake_api_private_key' => :'String',
|
160
|
+
:'snowflake_api_private_key_password' => :'String',
|
151
161
|
:'ssl' => :'Boolean',
|
152
162
|
:'ssl_certificate' => :'String',
|
153
163
|
:'token' => :'String',
|
@@ -262,6 +272,14 @@ module Akeyless
|
|
262
272
|
self.snowflake_account = attributes[:'snowflake_account']
|
263
273
|
end
|
264
274
|
|
275
|
+
if attributes.key?(:'snowflake_api_private_key')
|
276
|
+
self.snowflake_api_private_key = attributes[:'snowflake_api_private_key']
|
277
|
+
end
|
278
|
+
|
279
|
+
if attributes.key?(:'snowflake_api_private_key_password')
|
280
|
+
self.snowflake_api_private_key_password = attributes[:'snowflake_api_private_key_password']
|
281
|
+
end
|
282
|
+
|
265
283
|
if attributes.key?(:'ssl')
|
266
284
|
self.ssl = attributes[:'ssl']
|
267
285
|
end
|
@@ -336,6 +354,8 @@ module Akeyless
|
|
336
354
|
port == o.port &&
|
337
355
|
pwd == o.pwd &&
|
338
356
|
snowflake_account == o.snowflake_account &&
|
357
|
+
snowflake_api_private_key == o.snowflake_api_private_key &&
|
358
|
+
snowflake_api_private_key_password == o.snowflake_api_private_key_password &&
|
339
359
|
ssl == o.ssl &&
|
340
360
|
ssl_certificate == o.ssl_certificate &&
|
341
361
|
token == o.token &&
|
@@ -353,7 +373,7 @@ module Akeyless
|
|
353
373
|
# Calculates hash code according to all attributes.
|
354
374
|
# @return [Integer] Hash code
|
355
375
|
def hash
|
356
|
-
[comment, db_name, db_server_certificates, db_server_name, db_type, host, json, keep_prev_version, 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, new_name, oracle_service_name, port, pwd, snowflake_account, ssl, ssl_certificate, token, uid_token, update_version, user_name].hash
|
376
|
+
[comment, db_name, db_server_certificates, db_server_name, db_type, host, json, keep_prev_version, 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, new_name, oracle_service_name, port, pwd, snowflake_account, snowflake_api_private_key, snowflake_api_private_key_password, ssl, ssl_certificate, token, uid_token, update_version, user_name].hash
|
357
377
|
end
|
358
378
|
|
359
379
|
# Builds the object from hash
|