akeyless 2.16.6 → 2.16.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -1
- data/docs/CertAccessRules.md +1 -1
- data/docs/CreateAzureTarget.md +6 -0
- data/docs/CreateRotatedSecret.md +2 -0
- data/docs/DSProducerDetails.md +6 -0
- data/docs/DeleteRoleRule.md +1 -1
- data/docs/GatewayCreateProducerRabbitMQ.md +2 -0
- data/docs/GatewayCreateProducerRedshift.md +2 -0
- data/docs/GatewayUpdateProducerRabbitMQ.md +2 -0
- data/docs/GatewayUpdateProducerRedshift.md +2 -0
- data/docs/GetRSAPublicOutput.md +1 -1
- data/docs/ListItems.md +2 -0
- data/docs/SetRoleRule.md +1 -1
- data/docs/Target.md +2 -0
- data/docs/TargetTypeDetailsInput.md +6 -0
- data/docs/UpdateAzureTarget.md +6 -0
- data/docs/UpdateLdapTarget.md +42 -0
- data/docs/UpdateLdapTargetDetails.md +40 -0
- data/docs/UpdateLdapTargetOutput.md +18 -0
- data/docs/UpdateRotatedSecret.md +2 -0
- data/docs/V2Api.md +126 -0
- data/lib/akeyless/api/v2_api.rb +128 -0
- data/lib/akeyless/models/cert_access_rules.rb +2 -4
- data/lib/akeyless/models/create_azure_target.rb +31 -1
- data/lib/akeyless/models/create_rotated_secret.rb +11 -1
- data/lib/akeyless/models/delete_role_rule.rb +1 -1
- data/lib/akeyless/models/ds_producer_details.rb +28 -1
- data/lib/akeyless/models/gateway_create_producer_rabbit_mq.rb +13 -1
- data/lib/akeyless/models/gateway_create_producer_redshift.rb +11 -1
- data/lib/akeyless/models/gateway_update_producer_rabbit_mq.rb +13 -1
- data/lib/akeyless/models/gateway_update_producer_redshift.rb +11 -1
- data/lib/akeyless/models/get_rsa_public_output.rb +2 -4
- data/lib/akeyless/models/list_items.rb +10 -1
- data/lib/akeyless/models/set_role_rule.rb +1 -1
- data/lib/akeyless/models/target.rb +13 -1
- data/lib/akeyless/models/target_type_details_input.rb +28 -1
- data/lib/akeyless/models/update_azure_target.rb +31 -1
- data/lib/akeyless/models/update_ldap_target.rb +339 -0
- data/lib/akeyless/models/update_ldap_target_details.rb +328 -0
- data/lib/akeyless/models/update_ldap_target_output.rb +219 -0
- data/lib/akeyless/models/update_rotated_secret.rb +11 -1
- data/lib/akeyless/version.rb +1 -1
- data/lib/akeyless.rb +3 -0
- data/spec/models/update_ldap_target_details_spec.rb +100 -0
- data/spec/models/update_ldap_target_output_spec.rb +34 -0
- data/spec/models/update_ldap_target_spec.rb +106 -0
- metadata +14 -2
@@ -0,0 +1,328 @@
|
|
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.0.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Akeyless
|
17
|
+
class UpdateLdapTargetDetails
|
18
|
+
attr_accessor :bind_dn
|
19
|
+
|
20
|
+
attr_accessor :bind_dn_password
|
21
|
+
|
22
|
+
attr_accessor :keep_prev_version
|
23
|
+
|
24
|
+
attr_accessor :key
|
25
|
+
|
26
|
+
attr_accessor :ldap_ca_cert
|
27
|
+
|
28
|
+
attr_accessor :ldap_url
|
29
|
+
|
30
|
+
# Target name
|
31
|
+
attr_accessor :name
|
32
|
+
|
33
|
+
# Deprecated
|
34
|
+
attr_accessor :new_version
|
35
|
+
|
36
|
+
# The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
|
37
|
+
attr_accessor :protection_key
|
38
|
+
|
39
|
+
# Authentication token (see `/auth` and `/configure`)
|
40
|
+
attr_accessor :token
|
41
|
+
|
42
|
+
attr_accessor :token_expiration
|
43
|
+
|
44
|
+
# The universal identity token, Required only for universal_identity authentication
|
45
|
+
attr_accessor :uid_token
|
46
|
+
|
47
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
48
|
+
def self.attribute_map
|
49
|
+
{
|
50
|
+
:'bind_dn' => :'bind-dn',
|
51
|
+
:'bind_dn_password' => :'bind-dn-password',
|
52
|
+
:'keep_prev_version' => :'keep-prev-version',
|
53
|
+
:'key' => :'key',
|
54
|
+
:'ldap_ca_cert' => :'ldap-ca-cert',
|
55
|
+
:'ldap_url' => :'ldap-url',
|
56
|
+
:'name' => :'name',
|
57
|
+
:'new_version' => :'new-version',
|
58
|
+
:'protection_key' => :'protection_key',
|
59
|
+
:'token' => :'token',
|
60
|
+
:'token_expiration' => :'token-expiration',
|
61
|
+
:'uid_token' => :'uid-token'
|
62
|
+
}
|
63
|
+
end
|
64
|
+
|
65
|
+
# Returns all the JSON keys this model knows about
|
66
|
+
def self.acceptable_attributes
|
67
|
+
attribute_map.values
|
68
|
+
end
|
69
|
+
|
70
|
+
# Attribute type mapping.
|
71
|
+
def self.openapi_types
|
72
|
+
{
|
73
|
+
:'bind_dn' => :'String',
|
74
|
+
:'bind_dn_password' => :'String',
|
75
|
+
:'keep_prev_version' => :'String',
|
76
|
+
:'key' => :'String',
|
77
|
+
:'ldap_ca_cert' => :'String',
|
78
|
+
:'ldap_url' => :'String',
|
79
|
+
:'name' => :'String',
|
80
|
+
:'new_version' => :'Boolean',
|
81
|
+
:'protection_key' => :'String',
|
82
|
+
:'token' => :'String',
|
83
|
+
:'token_expiration' => :'String',
|
84
|
+
:'uid_token' => :'String'
|
85
|
+
}
|
86
|
+
end
|
87
|
+
|
88
|
+
# List of attributes with nullable: true
|
89
|
+
def self.openapi_nullable
|
90
|
+
Set.new([
|
91
|
+
])
|
92
|
+
end
|
93
|
+
|
94
|
+
# Initializes the object
|
95
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
96
|
+
def initialize(attributes = {})
|
97
|
+
if (!attributes.is_a?(Hash))
|
98
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::UpdateLdapTargetDetails` initialize method"
|
99
|
+
end
|
100
|
+
|
101
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
102
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
103
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
104
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::UpdateLdapTargetDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
105
|
+
end
|
106
|
+
h[k.to_sym] = v
|
107
|
+
}
|
108
|
+
|
109
|
+
if attributes.key?(:'bind_dn')
|
110
|
+
self.bind_dn = attributes[:'bind_dn']
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.key?(:'bind_dn_password')
|
114
|
+
self.bind_dn_password = attributes[:'bind_dn_password']
|
115
|
+
end
|
116
|
+
|
117
|
+
if attributes.key?(:'keep_prev_version')
|
118
|
+
self.keep_prev_version = attributes[:'keep_prev_version']
|
119
|
+
end
|
120
|
+
|
121
|
+
if attributes.key?(:'key')
|
122
|
+
self.key = attributes[:'key']
|
123
|
+
end
|
124
|
+
|
125
|
+
if attributes.key?(:'ldap_ca_cert')
|
126
|
+
self.ldap_ca_cert = attributes[:'ldap_ca_cert']
|
127
|
+
end
|
128
|
+
|
129
|
+
if attributes.key?(:'ldap_url')
|
130
|
+
self.ldap_url = attributes[:'ldap_url']
|
131
|
+
end
|
132
|
+
|
133
|
+
if attributes.key?(:'name')
|
134
|
+
self.name = attributes[:'name']
|
135
|
+
end
|
136
|
+
|
137
|
+
if attributes.key?(:'new_version')
|
138
|
+
self.new_version = attributes[:'new_version']
|
139
|
+
end
|
140
|
+
|
141
|
+
if attributes.key?(:'protection_key')
|
142
|
+
self.protection_key = attributes[:'protection_key']
|
143
|
+
end
|
144
|
+
|
145
|
+
if attributes.key?(:'token')
|
146
|
+
self.token = attributes[:'token']
|
147
|
+
end
|
148
|
+
|
149
|
+
if attributes.key?(:'token_expiration')
|
150
|
+
self.token_expiration = attributes[:'token_expiration']
|
151
|
+
end
|
152
|
+
|
153
|
+
if attributes.key?(:'uid_token')
|
154
|
+
self.uid_token = attributes[:'uid_token']
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
159
|
+
# @return Array for valid properties with the reasons
|
160
|
+
def list_invalid_properties
|
161
|
+
invalid_properties = Array.new
|
162
|
+
if @name.nil?
|
163
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
164
|
+
end
|
165
|
+
|
166
|
+
invalid_properties
|
167
|
+
end
|
168
|
+
|
169
|
+
# Check to see if the all the properties in the model are valid
|
170
|
+
# @return true if the model is valid
|
171
|
+
def valid?
|
172
|
+
return false if @name.nil?
|
173
|
+
true
|
174
|
+
end
|
175
|
+
|
176
|
+
# Checks equality by comparing each attribute.
|
177
|
+
# @param [Object] Object to be compared
|
178
|
+
def ==(o)
|
179
|
+
return true if self.equal?(o)
|
180
|
+
self.class == o.class &&
|
181
|
+
bind_dn == o.bind_dn &&
|
182
|
+
bind_dn_password == o.bind_dn_password &&
|
183
|
+
keep_prev_version == o.keep_prev_version &&
|
184
|
+
key == o.key &&
|
185
|
+
ldap_ca_cert == o.ldap_ca_cert &&
|
186
|
+
ldap_url == o.ldap_url &&
|
187
|
+
name == o.name &&
|
188
|
+
new_version == o.new_version &&
|
189
|
+
protection_key == o.protection_key &&
|
190
|
+
token == o.token &&
|
191
|
+
token_expiration == o.token_expiration &&
|
192
|
+
uid_token == o.uid_token
|
193
|
+
end
|
194
|
+
|
195
|
+
# @see the `==` method
|
196
|
+
# @param [Object] Object to be compared
|
197
|
+
def eql?(o)
|
198
|
+
self == o
|
199
|
+
end
|
200
|
+
|
201
|
+
# Calculates hash code according to all attributes.
|
202
|
+
# @return [Integer] Hash code
|
203
|
+
def hash
|
204
|
+
[bind_dn, bind_dn_password, keep_prev_version, key, ldap_ca_cert, ldap_url, name, new_version, protection_key, token, token_expiration, uid_token].hash
|
205
|
+
end
|
206
|
+
|
207
|
+
# Builds the object from hash
|
208
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
209
|
+
# @return [Object] Returns the model itself
|
210
|
+
def self.build_from_hash(attributes)
|
211
|
+
new.build_from_hash(attributes)
|
212
|
+
end
|
213
|
+
|
214
|
+
# Builds the object from hash
|
215
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
216
|
+
# @return [Object] Returns the model itself
|
217
|
+
def build_from_hash(attributes)
|
218
|
+
return nil unless attributes.is_a?(Hash)
|
219
|
+
attributes = attributes.transform_keys(&:to_sym)
|
220
|
+
self.class.openapi_types.each_pair do |key, type|
|
221
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
222
|
+
self.send("#{key}=", nil)
|
223
|
+
elsif type =~ /\AArray<(.*)>/i
|
224
|
+
# check to ensure the input is an array given that the attribute
|
225
|
+
# is documented as an array but the input is not
|
226
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
227
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
228
|
+
end
|
229
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
230
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
231
|
+
end
|
232
|
+
end
|
233
|
+
|
234
|
+
self
|
235
|
+
end
|
236
|
+
|
237
|
+
# Deserializes the data based on type
|
238
|
+
# @param string type Data type
|
239
|
+
# @param string value Value to be deserialized
|
240
|
+
# @return [Object] Deserialized data
|
241
|
+
def _deserialize(type, value)
|
242
|
+
case type.to_sym
|
243
|
+
when :Time
|
244
|
+
Time.parse(value)
|
245
|
+
when :Date
|
246
|
+
Date.parse(value)
|
247
|
+
when :String
|
248
|
+
value.to_s
|
249
|
+
when :Integer
|
250
|
+
value.to_i
|
251
|
+
when :Float
|
252
|
+
value.to_f
|
253
|
+
when :Boolean
|
254
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
255
|
+
true
|
256
|
+
else
|
257
|
+
false
|
258
|
+
end
|
259
|
+
when :Object
|
260
|
+
# generic object (usually a Hash), return directly
|
261
|
+
value
|
262
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
263
|
+
inner_type = Regexp.last_match[:inner_type]
|
264
|
+
value.map { |v| _deserialize(inner_type, v) }
|
265
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
266
|
+
k_type = Regexp.last_match[:k_type]
|
267
|
+
v_type = Regexp.last_match[:v_type]
|
268
|
+
{}.tap do |hash|
|
269
|
+
value.each do |k, v|
|
270
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
271
|
+
end
|
272
|
+
end
|
273
|
+
else # model
|
274
|
+
# models (e.g. Pet) or oneOf
|
275
|
+
klass = Akeyless.const_get(type)
|
276
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
277
|
+
end
|
278
|
+
end
|
279
|
+
|
280
|
+
# Returns the string representation of the object
|
281
|
+
# @return [String] String presentation of the object
|
282
|
+
def to_s
|
283
|
+
to_hash.to_s
|
284
|
+
end
|
285
|
+
|
286
|
+
# to_body is an alias to to_hash (backward compatibility)
|
287
|
+
# @return [Hash] Returns the object in the form of hash
|
288
|
+
def to_body
|
289
|
+
to_hash
|
290
|
+
end
|
291
|
+
|
292
|
+
# Returns the object in the form of hash
|
293
|
+
# @return [Hash] Returns the object in the form of hash
|
294
|
+
def to_hash
|
295
|
+
hash = {}
|
296
|
+
self.class.attribute_map.each_pair do |attr, param|
|
297
|
+
value = self.send(attr)
|
298
|
+
if value.nil?
|
299
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
300
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
301
|
+
end
|
302
|
+
|
303
|
+
hash[param] = _to_hash(value)
|
304
|
+
end
|
305
|
+
hash
|
306
|
+
end
|
307
|
+
|
308
|
+
# Outputs non-array value in the form of hash
|
309
|
+
# For object, use to_hash. Otherwise, just return the value
|
310
|
+
# @param [Object] value Any valid value
|
311
|
+
# @return [Hash] Returns the value in the form of hash
|
312
|
+
def _to_hash(value)
|
313
|
+
if value.is_a?(Array)
|
314
|
+
value.compact.map { |v| _to_hash(v) }
|
315
|
+
elsif value.is_a?(Hash)
|
316
|
+
{}.tap do |hash|
|
317
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
318
|
+
end
|
319
|
+
elsif value.respond_to? :to_hash
|
320
|
+
value.to_hash
|
321
|
+
else
|
322
|
+
value
|
323
|
+
end
|
324
|
+
end
|
325
|
+
|
326
|
+
end
|
327
|
+
|
328
|
+
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.0.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Akeyless
|
17
|
+
class UpdateLdapTargetOutput
|
18
|
+
attr_accessor :target_id
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'target_id' => :'target_id'
|
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
|
+
:'target_id' => :'Integer'
|
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::UpdateLdapTargetOutput` 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::UpdateLdapTargetOutput`. 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?(:'target_id')
|
61
|
+
self.target_id = attributes[:'target_id']
|
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
|
+
target_id == o.target_id
|
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
|
+
[target_id].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
|
@@ -109,6 +109,9 @@ module Akeyless
|
|
109
109
|
# Deprecated: use RotatedUser
|
110
110
|
attr_accessor :ssh_username
|
111
111
|
|
112
|
+
# The name of the storage account key to rotate [key1/key2/kerb1/kerb2]
|
113
|
+
attr_accessor :storage_account_key_name
|
114
|
+
|
112
115
|
# Authentication token (see `/auth` and `/configure`)
|
113
116
|
attr_accessor :token
|
114
117
|
|
@@ -152,6 +155,7 @@ module Akeyless
|
|
152
155
|
:'secure_access_web_proxy' => :'secure-access-web-proxy',
|
153
156
|
:'ssh_password' => :'ssh-password',
|
154
157
|
:'ssh_username' => :'ssh-username',
|
158
|
+
:'storage_account_key_name' => :'storage-account-key-name',
|
155
159
|
:'token' => :'token',
|
156
160
|
:'uid_token' => :'uid-token'
|
157
161
|
}
|
@@ -199,6 +203,7 @@ module Akeyless
|
|
199
203
|
:'secure_access_web_proxy' => :'Boolean',
|
200
204
|
:'ssh_password' => :'String',
|
201
205
|
:'ssh_username' => :'String',
|
206
|
+
:'storage_account_key_name' => :'String',
|
202
207
|
:'token' => :'String',
|
203
208
|
:'uid_token' => :'String'
|
204
209
|
}
|
@@ -379,6 +384,10 @@ module Akeyless
|
|
379
384
|
self.ssh_username = attributes[:'ssh_username']
|
380
385
|
end
|
381
386
|
|
387
|
+
if attributes.key?(:'storage_account_key_name')
|
388
|
+
self.storage_account_key_name = attributes[:'storage_account_key_name']
|
389
|
+
end
|
390
|
+
|
382
391
|
if attributes.key?(:'token')
|
383
392
|
self.token = attributes[:'token']
|
384
393
|
end
|
@@ -445,6 +454,7 @@ module Akeyless
|
|
445
454
|
secure_access_web_proxy == o.secure_access_web_proxy &&
|
446
455
|
ssh_password == o.ssh_password &&
|
447
456
|
ssh_username == o.ssh_username &&
|
457
|
+
storage_account_key_name == o.storage_account_key_name &&
|
448
458
|
token == o.token &&
|
449
459
|
uid_token == o.uid_token
|
450
460
|
end
|
@@ -458,7 +468,7 @@ module Akeyless
|
|
458
468
|
# Calculates hash code according to all attributes.
|
459
469
|
# @return [Integer] Hash code
|
460
470
|
def hash
|
461
|
-
[add_tag, api_id, api_key, auto_rotate, aws_region, custom_payload, keep_prev_version, key, name, new_metadata, new_name, new_version, rm_tag, rotated_password, rotated_username, rotation_hour, rotation_interval, rotator_creds_type, rotator_custom_cmd, secure_access_allow_external_user, secure_access_aws_account_id, secure_access_aws_native_cli, secure_access_bastion_issuer, secure_access_db_name, secure_access_db_schema, secure_access_enable, secure_access_host, secure_access_rdp_domain, secure_access_rdp_user, secure_access_web, secure_access_web_browsing, secure_access_web_proxy, ssh_password, ssh_username, token, uid_token].hash
|
471
|
+
[add_tag, api_id, api_key, auto_rotate, aws_region, custom_payload, keep_prev_version, key, name, new_metadata, new_name, new_version, rm_tag, rotated_password, rotated_username, rotation_hour, rotation_interval, rotator_creds_type, rotator_custom_cmd, secure_access_allow_external_user, secure_access_aws_account_id, secure_access_aws_native_cli, secure_access_bastion_issuer, secure_access_db_name, secure_access_db_schema, secure_access_enable, secure_access_host, secure_access_rdp_domain, secure_access_rdp_user, secure_access_web, secure_access_web_browsing, secure_access_web_proxy, ssh_password, ssh_username, storage_account_key_name, token, uid_token].hash
|
462
472
|
end
|
463
473
|
|
464
474
|
# Builds the object from hash
|
data/lib/akeyless/version.rb
CHANGED
data/lib/akeyless.rb
CHANGED
@@ -504,6 +504,9 @@ require 'akeyless/models/update_github_target'
|
|
504
504
|
require 'akeyless/models/update_github_target_output'
|
505
505
|
require 'akeyless/models/update_item'
|
506
506
|
require 'akeyless/models/update_item_output'
|
507
|
+
require 'akeyless/models/update_ldap_target'
|
508
|
+
require 'akeyless/models/update_ldap_target_details'
|
509
|
+
require 'akeyless/models/update_ldap_target_output'
|
507
510
|
require 'akeyless/models/update_native_k8_s_target'
|
508
511
|
require 'akeyless/models/update_native_k8_s_target_output'
|
509
512
|
require 'akeyless/models/update_output'
|