akeyless 3.2.8 → 3.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +25 -1
  3. data/docs/CreateESM.md +36 -0
  4. data/docs/CreateESMOutput.md +20 -0
  5. data/docs/CreateRotatedSecret.md +1 -1
  6. data/docs/CreateSSHCertIssuer.md +1 -1
  7. data/docs/CreateSecret.md +1 -1
  8. data/docs/CreateWindowsTarget.md +8 -4
  9. data/docs/DSProducerDetails.md +2 -0
  10. data/docs/DescribeItem.md +2 -0
  11. data/docs/EsmCreate.md +34 -0
  12. data/docs/EsmCreateSecretOutput.md +20 -0
  13. data/docs/EsmDelete.md +26 -0
  14. data/docs/EsmGet.md +26 -0
  15. data/docs/EsmGetSecretOutput.md +20 -0
  16. data/docs/EsmList.md +24 -0
  17. data/docs/EsmListSecretsOutput.md +18 -0
  18. data/docs/EsmUpdate.md +34 -0
  19. data/docs/EsmUpdateSecretOutput.md +20 -0
  20. data/docs/GatewayCreateProducerHanaDb.md +1 -1
  21. data/docs/GatewayCreateProducerMSSQL.md +1 -1
  22. data/docs/GatewayCreateProducerMongo.md +1 -1
  23. data/docs/GatewayCreateProducerMySQL.md +1 -1
  24. data/docs/GatewayCreateProducerOracleDb.md +1 -1
  25. data/docs/GatewayCreateProducerPostgreSQL.md +1 -1
  26. data/docs/GatewayCreateProducerRdp.md +1 -1
  27. data/docs/GatewayCreateProducerRedis.md +48 -0
  28. data/docs/GatewayCreateProducerRedisOutput.md +18 -0
  29. data/docs/GatewayCreateProducerRedshift.md +1 -1
  30. data/docs/GatewayUpdateProducerHanaDb.md +1 -1
  31. data/docs/GatewayUpdateProducerMSSQL.md +1 -1
  32. data/docs/GatewayUpdateProducerMongo.md +1 -1
  33. data/docs/GatewayUpdateProducerMySQL.md +1 -1
  34. data/docs/GatewayUpdateProducerOracleDb.md +1 -1
  35. data/docs/GatewayUpdateProducerPostgreSQL.md +1 -1
  36. data/docs/GatewayUpdateProducerRdp.md +1 -1
  37. data/docs/GatewayUpdateProducerRedis.md +50 -0
  38. data/docs/GatewayUpdateProducerRedisOutput.md +18 -0
  39. data/docs/GatewayUpdateProducerRedshift.md +1 -1
  40. data/docs/Item.md +2 -0
  41. data/docs/LastStatusInfo.md +3 -1
  42. data/docs/SecretInfo.md +36 -0
  43. data/docs/TargetTypeDetailsInput.md +4 -0
  44. data/docs/UpdateItem.md +1 -1
  45. data/docs/UpdateRotatedSecret.md +1 -1
  46. data/docs/UpdateSSHCertIssuer.md +1 -1
  47. data/docs/UpdateWindowsTarget.md +8 -4
  48. data/docs/V2Api.md +503 -2
  49. data/lib/akeyless/api/v2_api.rb +501 -0
  50. data/lib/akeyless/models/create_esm.rb +325 -0
  51. data/lib/akeyless/models/create_esm_output.rb +228 -0
  52. data/lib/akeyless/models/create_rotated_secret.rb +1 -1
  53. data/lib/akeyless/models/create_secret.rb +1 -1
  54. data/lib/akeyless/models/create_ssh_cert_issuer.rb +1 -1
  55. data/lib/akeyless/models/create_windows_target.rb +40 -3
  56. data/lib/akeyless/models/describe_item.rb +13 -1
  57. data/lib/akeyless/models/ds_producer_details.rb +12 -1
  58. data/lib/akeyless/models/esm_create.rb +320 -0
  59. data/lib/akeyless/models/esm_create_secret_output.rb +228 -0
  60. data/lib/akeyless/models/esm_delete.rb +273 -0
  61. data/lib/akeyless/models/esm_get.rb +273 -0
  62. data/lib/akeyless/models/esm_get_secret_output.rb +228 -0
  63. data/lib/akeyless/models/esm_list.rb +258 -0
  64. data/lib/akeyless/models/esm_list_secrets_output.rb +221 -0
  65. data/lib/akeyless/models/esm_update.rb +320 -0
  66. data/lib/akeyless/models/esm_update_secret_output.rb +228 -0
  67. data/lib/akeyless/models/gateway_create_producer_hana_db.rb +1 -1
  68. data/lib/akeyless/models/gateway_create_producer_mongo.rb +1 -1
  69. data/lib/akeyless/models/gateway_create_producer_mssql.rb +1 -1
  70. data/lib/akeyless/models/gateway_create_producer_my_sql.rb +1 -1
  71. data/lib/akeyless/models/gateway_create_producer_oracle_db.rb +1 -1
  72. data/lib/akeyless/models/gateway_create_producer_postgre_sql.rb +1 -1
  73. data/lib/akeyless/models/gateway_create_producer_rdp.rb +1 -1
  74. data/lib/akeyless/models/gateway_create_producer_redis.rb +388 -0
  75. data/lib/akeyless/models/gateway_create_producer_redis_output.rb +219 -0
  76. data/lib/akeyless/models/gateway_create_producer_redshift.rb +1 -1
  77. data/lib/akeyless/models/gateway_update_producer_hana_db.rb +1 -1
  78. data/lib/akeyless/models/gateway_update_producer_mongo.rb +1 -1
  79. data/lib/akeyless/models/gateway_update_producer_mssql.rb +1 -1
  80. data/lib/akeyless/models/gateway_update_producer_my_sql.rb +1 -1
  81. data/lib/akeyless/models/gateway_update_producer_oracle_db.rb +1 -1
  82. data/lib/akeyless/models/gateway_update_producer_postgre_sql.rb +1 -1
  83. data/lib/akeyless/models/gateway_update_producer_rdp.rb +1 -1
  84. data/lib/akeyless/models/gateway_update_producer_redis.rb +398 -0
  85. data/lib/akeyless/models/gateway_update_producer_redis_output.rb +219 -0
  86. data/lib/akeyless/models/gateway_update_producer_redshift.rb +1 -1
  87. data/lib/akeyless/models/item.rb +10 -1
  88. data/lib/akeyless/models/last_status_info.rb +14 -4
  89. data/lib/akeyless/models/secret_info.rb +302 -0
  90. data/lib/akeyless/models/target_type_details_input.rb +19 -1
  91. data/lib/akeyless/models/update_item.rb +1 -1
  92. data/lib/akeyless/models/update_rotated_secret.rb +1 -1
  93. data/lib/akeyless/models/update_ssh_cert_issuer.rb +1 -1
  94. data/lib/akeyless/models/update_windows_target.rb +40 -3
  95. data/lib/akeyless/version.rb +1 -1
  96. data/lib/akeyless.rb +16 -0
  97. data/spec/models/create_esm_output_spec.rb +40 -0
  98. data/spec/models/create_esm_spec.rb +88 -0
  99. data/spec/models/esm_create_secret_output_spec.rb +40 -0
  100. data/spec/models/esm_create_spec.rb +82 -0
  101. data/spec/models/esm_delete_spec.rb +58 -0
  102. data/spec/models/esm_get_secret_output_spec.rb +40 -0
  103. data/spec/models/esm_get_spec.rb +58 -0
  104. data/spec/models/esm_list_secrets_output_spec.rb +34 -0
  105. data/spec/models/esm_list_spec.rb +52 -0
  106. data/spec/models/esm_update_secret_output_spec.rb +40 -0
  107. data/spec/models/esm_update_spec.rb +82 -0
  108. data/spec/models/gateway_create_producer_redis_output_spec.rb +34 -0
  109. data/spec/models/gateway_create_producer_redis_spec.rb +124 -0
  110. data/spec/models/gateway_update_producer_redis_output_spec.rb +34 -0
  111. data/spec/models/gateway_update_producer_redis_spec.rb +130 -0
  112. data/spec/models/secret_info_spec.rb +88 -0
  113. metadata +647 -583
@@ -0,0 +1,320 @@
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.5.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Akeyless
17
+ # esmUpdate is a command that updates a secret in an External Secrets Manager
18
+ class EsmUpdate
19
+ # Use this option if the external secret value is a base64 encoded binary
20
+ attr_accessor :binary_value
21
+
22
+ # Description of the external secret
23
+ attr_accessor :description
24
+
25
+ # Name of the External Secrets Manager item
26
+ attr_accessor :esm_name
27
+
28
+ # Set output format to JSON
29
+ attr_accessor :json
30
+
31
+ # The external secret id (or name, for AWS, Azure or K8s targets) to update
32
+ attr_accessor :secret_id
33
+
34
+ # Tags for the external secret
35
+ attr_accessor :tags
36
+
37
+ # Authentication token (see `/auth` and `/configure`)
38
+ attr_accessor :token
39
+
40
+ # The universal identity token, Required only for universal_identity authentication
41
+ attr_accessor :uid_token
42
+
43
+ # Value of the external secret item, either text or base64 encoded binary
44
+ attr_accessor :value
45
+
46
+ # Attribute mapping from ruby-style variable name to JSON key.
47
+ def self.attribute_map
48
+ {
49
+ :'binary_value' => :'binary-value',
50
+ :'description' => :'description',
51
+ :'esm_name' => :'esm-name',
52
+ :'json' => :'json',
53
+ :'secret_id' => :'secret-id',
54
+ :'tags' => :'tags',
55
+ :'token' => :'token',
56
+ :'uid_token' => :'uid-token',
57
+ :'value' => :'value'
58
+ }
59
+ end
60
+
61
+ # Returns all the JSON keys this model knows about
62
+ def self.acceptable_attributes
63
+ attribute_map.values
64
+ end
65
+
66
+ # Attribute type mapping.
67
+ def self.openapi_types
68
+ {
69
+ :'binary_value' => :'Boolean',
70
+ :'description' => :'String',
71
+ :'esm_name' => :'String',
72
+ :'json' => :'Boolean',
73
+ :'secret_id' => :'String',
74
+ :'tags' => :'Hash<String, String>',
75
+ :'token' => :'String',
76
+ :'uid_token' => :'String',
77
+ :'value' => :'String'
78
+ }
79
+ end
80
+
81
+ # List of attributes with nullable: true
82
+ def self.openapi_nullable
83
+ Set.new([
84
+ ])
85
+ end
86
+
87
+ # Initializes the object
88
+ # @param [Hash] attributes Model attributes in the form of hash
89
+ def initialize(attributes = {})
90
+ if (!attributes.is_a?(Hash))
91
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::EsmUpdate` initialize method"
92
+ end
93
+
94
+ # check to see if the attribute exists and convert string to symbol for hash key
95
+ attributes = attributes.each_with_object({}) { |(k, v), h|
96
+ if (!self.class.attribute_map.key?(k.to_sym))
97
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::EsmUpdate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
98
+ end
99
+ h[k.to_sym] = v
100
+ }
101
+
102
+ if attributes.key?(:'binary_value')
103
+ self.binary_value = attributes[:'binary_value']
104
+ end
105
+
106
+ if attributes.key?(:'description')
107
+ self.description = attributes[:'description']
108
+ end
109
+
110
+ if attributes.key?(:'esm_name')
111
+ self.esm_name = attributes[:'esm_name']
112
+ end
113
+
114
+ if attributes.key?(:'json')
115
+ self.json = attributes[:'json']
116
+ else
117
+ self.json = false
118
+ end
119
+
120
+ if attributes.key?(:'secret_id')
121
+ self.secret_id = attributes[:'secret_id']
122
+ end
123
+
124
+ if attributes.key?(:'tags')
125
+ if (value = attributes[:'tags']).is_a?(Hash)
126
+ self.tags = value
127
+ end
128
+ end
129
+
130
+ if attributes.key?(:'token')
131
+ self.token = attributes[:'token']
132
+ end
133
+
134
+ if attributes.key?(:'uid_token')
135
+ self.uid_token = attributes[:'uid_token']
136
+ end
137
+
138
+ if attributes.key?(:'value')
139
+ self.value = attributes[:'value']
140
+ end
141
+ end
142
+
143
+ # Show invalid properties with the reasons. Usually used together with valid?
144
+ # @return Array for valid properties with the reasons
145
+ def list_invalid_properties
146
+ invalid_properties = Array.new
147
+ if @esm_name.nil?
148
+ invalid_properties.push('invalid value for "esm_name", esm_name cannot be nil.')
149
+ end
150
+
151
+ if @secret_id.nil?
152
+ invalid_properties.push('invalid value for "secret_id", secret_id cannot be nil.')
153
+ end
154
+
155
+ if @value.nil?
156
+ invalid_properties.push('invalid value for "value", value cannot be nil.')
157
+ end
158
+
159
+ invalid_properties
160
+ end
161
+
162
+ # Check to see if the all the properties in the model are valid
163
+ # @return true if the model is valid
164
+ def valid?
165
+ return false if @esm_name.nil?
166
+ return false if @secret_id.nil?
167
+ return false if @value.nil?
168
+ true
169
+ end
170
+
171
+ # Checks equality by comparing each attribute.
172
+ # @param [Object] Object to be compared
173
+ def ==(o)
174
+ return true if self.equal?(o)
175
+ self.class == o.class &&
176
+ binary_value == o.binary_value &&
177
+ description == o.description &&
178
+ esm_name == o.esm_name &&
179
+ json == o.json &&
180
+ secret_id == o.secret_id &&
181
+ tags == o.tags &&
182
+ token == o.token &&
183
+ uid_token == o.uid_token &&
184
+ value == o.value
185
+ end
186
+
187
+ # @see the `==` method
188
+ # @param [Object] Object to be compared
189
+ def eql?(o)
190
+ self == o
191
+ end
192
+
193
+ # Calculates hash code according to all attributes.
194
+ # @return [Integer] Hash code
195
+ def hash
196
+ [binary_value, description, esm_name, json, secret_id, tags, token, uid_token, value].hash
197
+ end
198
+
199
+ # Builds the object from hash
200
+ # @param [Hash] attributes Model attributes in the form of hash
201
+ # @return [Object] Returns the model itself
202
+ def self.build_from_hash(attributes)
203
+ new.build_from_hash(attributes)
204
+ end
205
+
206
+ # Builds the object from hash
207
+ # @param [Hash] attributes Model attributes in the form of hash
208
+ # @return [Object] Returns the model itself
209
+ def build_from_hash(attributes)
210
+ return nil unless attributes.is_a?(Hash)
211
+ attributes = attributes.transform_keys(&:to_sym)
212
+ self.class.openapi_types.each_pair do |key, type|
213
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
214
+ self.send("#{key}=", nil)
215
+ elsif type =~ /\AArray<(.*)>/i
216
+ # check to ensure the input is an array given that the attribute
217
+ # is documented as an array but the input is not
218
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
219
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
220
+ end
221
+ elsif !attributes[self.class.attribute_map[key]].nil?
222
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
223
+ end
224
+ end
225
+
226
+ self
227
+ end
228
+
229
+ # Deserializes the data based on type
230
+ # @param string type Data type
231
+ # @param string value Value to be deserialized
232
+ # @return [Object] Deserialized data
233
+ def _deserialize(type, value)
234
+ case type.to_sym
235
+ when :Time
236
+ Time.parse(value)
237
+ when :Date
238
+ Date.parse(value)
239
+ when :String
240
+ value.to_s
241
+ when :Integer
242
+ value.to_i
243
+ when :Float
244
+ value.to_f
245
+ when :Boolean
246
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
247
+ true
248
+ else
249
+ false
250
+ end
251
+ when :Object
252
+ # generic object (usually a Hash), return directly
253
+ value
254
+ when /\AArray<(?<inner_type>.+)>\z/
255
+ inner_type = Regexp.last_match[:inner_type]
256
+ value.map { |v| _deserialize(inner_type, v) }
257
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
258
+ k_type = Regexp.last_match[:k_type]
259
+ v_type = Regexp.last_match[:v_type]
260
+ {}.tap do |hash|
261
+ value.each do |k, v|
262
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
263
+ end
264
+ end
265
+ else # model
266
+ # models (e.g. Pet) or oneOf
267
+ klass = Akeyless.const_get(type)
268
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
269
+ end
270
+ end
271
+
272
+ # Returns the string representation of the object
273
+ # @return [String] String presentation of the object
274
+ def to_s
275
+ to_hash.to_s
276
+ end
277
+
278
+ # to_body is an alias to to_hash (backward compatibility)
279
+ # @return [Hash] Returns the object in the form of hash
280
+ def to_body
281
+ to_hash
282
+ end
283
+
284
+ # Returns the object in the form of hash
285
+ # @return [Hash] Returns the object in the form of hash
286
+ def to_hash
287
+ hash = {}
288
+ self.class.attribute_map.each_pair do |attr, param|
289
+ value = self.send(attr)
290
+ if value.nil?
291
+ is_nullable = self.class.openapi_nullable.include?(attr)
292
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
293
+ end
294
+
295
+ hash[param] = _to_hash(value)
296
+ end
297
+ hash
298
+ end
299
+
300
+ # Outputs non-array value in the form of hash
301
+ # For object, use to_hash. Otherwise, just return the value
302
+ # @param [Object] value Any valid value
303
+ # @return [Hash] Returns the value in the form of hash
304
+ def _to_hash(value)
305
+ if value.is_a?(Array)
306
+ value.compact.map { |v| _to_hash(v) }
307
+ elsif value.is_a?(Hash)
308
+ {}.tap do |hash|
309
+ value.each { |k, v| hash[k] = _to_hash(v) }
310
+ end
311
+ elsif value.respond_to? :to_hash
312
+ value.to_hash
313
+ else
314
+ value
315
+ end
316
+ end
317
+
318
+ end
319
+
320
+ end
@@ -0,0 +1,228 @@
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.5.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Akeyless
17
+ class EsmUpdateSecretOutput
18
+ attr_accessor :secret_id
19
+
20
+ attr_accessor :version_id
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'secret_id' => :'secret_id',
26
+ :'version_id' => :'version_id'
27
+ }
28
+ end
29
+
30
+ # Returns all the JSON keys this model knows about
31
+ def self.acceptable_attributes
32
+ attribute_map.values
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.openapi_types
37
+ {
38
+ :'secret_id' => :'String',
39
+ :'version_id' => :'String'
40
+ }
41
+ end
42
+
43
+ # List of attributes with nullable: true
44
+ def self.openapi_nullable
45
+ Set.new([
46
+ ])
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::EsmUpdateSecretOutput` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::EsmUpdateSecretOutput`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'secret_id')
65
+ self.secret_id = attributes[:'secret_id']
66
+ end
67
+
68
+ if attributes.key?(:'version_id')
69
+ self.version_id = attributes[:'version_id']
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ invalid_properties = Array.new
77
+ invalid_properties
78
+ end
79
+
80
+ # Check to see if the all the properties in the model are valid
81
+ # @return true if the model is valid
82
+ def valid?
83
+ true
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param [Object] Object to be compared
88
+ def ==(o)
89
+ return true if self.equal?(o)
90
+ self.class == o.class &&
91
+ secret_id == o.secret_id &&
92
+ version_id == o.version_id
93
+ end
94
+
95
+ # @see the `==` method
96
+ # @param [Object] Object to be compared
97
+ def eql?(o)
98
+ self == o
99
+ end
100
+
101
+ # Calculates hash code according to all attributes.
102
+ # @return [Integer] Hash code
103
+ def hash
104
+ [secret_id, version_id].hash
105
+ end
106
+
107
+ # Builds the object from hash
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ # @return [Object] Returns the model itself
110
+ def self.build_from_hash(attributes)
111
+ new.build_from_hash(attributes)
112
+ end
113
+
114
+ # Builds the object from hash
115
+ # @param [Hash] attributes Model attributes in the form of hash
116
+ # @return [Object] Returns the model itself
117
+ def build_from_hash(attributes)
118
+ return nil unless attributes.is_a?(Hash)
119
+ attributes = attributes.transform_keys(&:to_sym)
120
+ self.class.openapi_types.each_pair do |key, type|
121
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
122
+ self.send("#{key}=", nil)
123
+ elsif type =~ /\AArray<(.*)>/i
124
+ # check to ensure the input is an array given that the attribute
125
+ # is documented as an array but the input is not
126
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
127
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
128
+ end
129
+ elsif !attributes[self.class.attribute_map[key]].nil?
130
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
131
+ end
132
+ end
133
+
134
+ self
135
+ end
136
+
137
+ # Deserializes the data based on type
138
+ # @param string type Data type
139
+ # @param string value Value to be deserialized
140
+ # @return [Object] Deserialized data
141
+ def _deserialize(type, value)
142
+ case type.to_sym
143
+ when :Time
144
+ Time.parse(value)
145
+ when :Date
146
+ Date.parse(value)
147
+ when :String
148
+ value.to_s
149
+ when :Integer
150
+ value.to_i
151
+ when :Float
152
+ value.to_f
153
+ when :Boolean
154
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
155
+ true
156
+ else
157
+ false
158
+ end
159
+ when :Object
160
+ # generic object (usually a Hash), return directly
161
+ value
162
+ when /\AArray<(?<inner_type>.+)>\z/
163
+ inner_type = Regexp.last_match[:inner_type]
164
+ value.map { |v| _deserialize(inner_type, v) }
165
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
166
+ k_type = Regexp.last_match[:k_type]
167
+ v_type = Regexp.last_match[:v_type]
168
+ {}.tap do |hash|
169
+ value.each do |k, v|
170
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
171
+ end
172
+ end
173
+ else # model
174
+ # models (e.g. Pet) or oneOf
175
+ klass = Akeyless.const_get(type)
176
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
177
+ end
178
+ end
179
+
180
+ # Returns the string representation of the object
181
+ # @return [String] String presentation of the object
182
+ def to_s
183
+ to_hash.to_s
184
+ end
185
+
186
+ # to_body is an alias to to_hash (backward compatibility)
187
+ # @return [Hash] Returns the object in the form of hash
188
+ def to_body
189
+ to_hash
190
+ end
191
+
192
+ # Returns the object in the form of hash
193
+ # @return [Hash] Returns the object in the form of hash
194
+ def to_hash
195
+ hash = {}
196
+ self.class.attribute_map.each_pair do |attr, param|
197
+ value = self.send(attr)
198
+ if value.nil?
199
+ is_nullable = self.class.openapi_nullable.include?(attr)
200
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
201
+ end
202
+
203
+ hash[param] = _to_hash(value)
204
+ end
205
+ hash
206
+ end
207
+
208
+ # Outputs non-array value in the form of hash
209
+ # For object, use to_hash. Otherwise, just return the value
210
+ # @param [Object] value Any valid value
211
+ # @return [Hash] Returns the value in the form of hash
212
+ def _to_hash(value)
213
+ if value.is_a?(Array)
214
+ value.compact.map { |v| _to_hash(v) }
215
+ elsif value.is_a?(Hash)
216
+ {}.tap do |hash|
217
+ value.each { |k, v| hash[k] = _to_hash(v) }
218
+ end
219
+ elsif value.respond_to? :to_hash
220
+ value.to_hash
221
+ else
222
+ value
223
+ end
224
+ end
225
+
226
+ end
227
+
228
+ end
@@ -58,7 +58,7 @@ module Akeyless
58
58
  # Enable/Disable secure remote access [true/false]
59
59
  attr_accessor :secure_access_enable
60
60
 
61
- # Target DB servers for connections
61
+ # Target DB servers for connections (In case of Linked Target association, host(s) will inherit Linked Target hosts)
62
62
  attr_accessor :secure_access_host
63
63
 
64
64
  # Enable Web Secure Remote Access
@@ -70,7 +70,7 @@ module Akeyless
70
70
  # Enable/Disable secure remote access [true/false]
71
71
  attr_accessor :secure_access_enable
72
72
 
73
- # Target DB servers for connections
73
+ # Target DB servers for connections (In case of Linked Target association, host(s) will inherit Linked Target hosts)
74
74
  attr_accessor :secure_access_host
75
75
 
76
76
  # Enable Web Secure Remote Access
@@ -58,7 +58,7 @@ module Akeyless
58
58
  # Enable/Disable secure remote access [true/false]
59
59
  attr_accessor :secure_access_enable
60
60
 
61
- # Target DB servers for connections
61
+ # Target DB servers for connections (In case of Linked Target association, host(s) will inherit Linked Target hosts)
62
62
  attr_accessor :secure_access_host
63
63
 
64
64
  # Enable Web Secure Remote Access
@@ -61,7 +61,7 @@ module Akeyless
61
61
  # Enable/Disable secure remote access [true/false]
62
62
  attr_accessor :secure_access_enable
63
63
 
64
- # Target DB servers for connections
64
+ # Target DB servers for connections (In case of Linked Target association, host(s) will inherit Linked Target hosts)
65
65
  attr_accessor :secure_access_host
66
66
 
67
67
  # Enable Web Secure Remote Access
@@ -58,7 +58,7 @@ module Akeyless
58
58
  # Enable/Disable secure remote access [true/false]
59
59
  attr_accessor :secure_access_enable
60
60
 
61
- # Target DB servers for connections
61
+ # Target DB servers for connections (In case of Linked Target association, host(s) will inherit Linked Target hosts)
62
62
  attr_accessor :secure_access_host
63
63
 
64
64
  # Enable Web Secure Remote Access
@@ -58,7 +58,7 @@ module Akeyless
58
58
  # Enable/Disable secure remote access [true/false]
59
59
  attr_accessor :secure_access_enable
60
60
 
61
- # Target DB servers for connections
61
+ # Target DB servers for connections (In case of Linked Target association, host(s) will inherit Linked Target hosts)
62
62
  attr_accessor :secure_access_host
63
63
 
64
64
  # Enable Web Secure Remote Access
@@ -55,7 +55,7 @@ module Akeyless
55
55
  # Enable/Disable secure remote access [true/false]
56
56
  attr_accessor :secure_access_enable
57
57
 
58
- # Target servers for connections
58
+ # Target servers for connections (In case of Linked Target association, host(s) will inherit Linked Target hosts - Relevant only for Dynamic Secrets/producers)
59
59
  attr_accessor :secure_access_host
60
60
 
61
61
  # Required when the Dynamic Secret is used for a domain user