akeyless 3.0.1 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +24 -3
  3. data/docs/AttributeTypeAndValue.md +20 -0
  4. data/docs/CertificateChainInfo.md +22 -0
  5. data/docs/CertificateExpirationEvent.md +18 -0
  6. data/docs/CertificateInfo.md +62 -0
  7. data/docs/Connect.md +2 -0
  8. data/docs/CreateEventForwarder.md +48 -0
  9. data/docs/CreateEventForwarderOutput.md +18 -0
  10. data/docs/CreateRotatedSecret.md +2 -0
  11. data/docs/DeleteEventForwarder.md +24 -0
  12. data/docs/EmailEntry.md +20 -0
  13. data/docs/Extension.md +22 -0
  14. data/docs/GatewayUpdateItem.md +2 -0
  15. data/docs/GetEventForwarder.md +24 -0
  16. data/docs/GetEventForwarderOutput.md +18 -0
  17. data/docs/Item.md +4 -0
  18. data/docs/ItemGeneralInfo.md +2 -0
  19. data/docs/ListSharedItems.md +24 -0
  20. data/docs/Name.md +28 -0
  21. data/docs/NotiForwarder.md +56 -0
  22. data/docs/RequestAccess.md +28 -0
  23. data/docs/RequestAccessOutput.md +18 -0
  24. data/docs/Target.md +4 -0
  25. data/docs/UpdateEventForwarder.md +40 -0
  26. data/docs/UpdateRotatedSecret.md +2 -0
  27. data/docs/V2Api.md +377 -63
  28. data/lib/akeyless/api/v2_api.rb +384 -64
  29. data/lib/akeyless/api_error.rb +1 -0
  30. data/lib/akeyless/configuration.rb +11 -0
  31. data/lib/akeyless/models/attribute_type_and_value.rb +231 -0
  32. data/lib/akeyless/models/certificate_chain_info.rb +241 -0
  33. data/lib/akeyless/models/certificate_expiration_event.rb +219 -0
  34. data/lib/akeyless/models/certificate_info.rb +434 -0
  35. data/lib/akeyless/models/connect.rb +11 -1
  36. data/lib/akeyless/models/create_event_forwarder.rb +394 -0
  37. data/lib/akeyless/models/create_event_forwarder_output.rb +219 -0
  38. data/lib/akeyless/models/create_rotated_secret.rb +11 -1
  39. data/lib/akeyless/models/delete_event_forwarder.rb +255 -0
  40. data/lib/akeyless/models/email_entry.rb +228 -0
  41. data/lib/akeyless/models/extension.rb +237 -0
  42. data/lib/akeyless/models/gateway_update_item.rb +11 -1
  43. data/lib/akeyless/models/get_event_forwarder.rb +255 -0
  44. data/lib/akeyless/models/get_event_forwarder_output.rb +219 -0
  45. data/lib/akeyless/models/item.rb +19 -1
  46. data/lib/akeyless/models/item_general_info.rb +10 -1
  47. data/lib/akeyless/models/list_shared_items.rb +253 -0
  48. data/lib/akeyless/models/name.rb +277 -0
  49. data/lib/akeyless/models/noti_forwarder.rb +400 -0
  50. data/lib/akeyless/models/request_access.rb +282 -0
  51. data/lib/akeyless/models/request_access_output.rb +219 -0
  52. data/lib/akeyless/models/target.rb +19 -1
  53. data/lib/akeyless/models/update_event_forwarder.rb +341 -0
  54. data/lib/akeyless/models/update_rotated_secret.rb +11 -1
  55. data/lib/akeyless/version.rb +1 -1
  56. data/lib/akeyless.rb +17 -1
  57. data/spec/models/attribute_type_and_value_spec.rb +40 -0
  58. data/spec/models/certificate_chain_info_spec.rb +46 -0
  59. data/spec/models/certificate_expiration_event_spec.rb +34 -0
  60. data/spec/models/certificate_info_spec.rb +166 -0
  61. data/spec/models/create_event_forwarder_output_spec.rb +34 -0
  62. data/spec/models/create_event_forwarder_spec.rb +124 -0
  63. data/spec/models/delete_event_forwarder_spec.rb +52 -0
  64. data/spec/models/email_entry_spec.rb +40 -0
  65. data/spec/models/extension_spec.rb +46 -0
  66. data/spec/models/get_event_forwarder_output_spec.rb +34 -0
  67. data/spec/models/get_event_forwarder_spec.rb +52 -0
  68. data/spec/models/list_shared_items_spec.rb +52 -0
  69. data/spec/models/name_spec.rb +64 -0
  70. data/spec/models/noti_forwarder_spec.rb +148 -0
  71. data/spec/models/request_access_output_spec.rb +34 -0
  72. data/spec/models/request_access_spec.rb +64 -0
  73. data/spec/models/update_event_forwarder_spec.rb +100 -0
  74. metadata +597 -529
@@ -0,0 +1,394 @@
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 CreateEventForwarder
18
+ # Workstation Admin Name
19
+ attr_accessor :admin_name
20
+
21
+ # Workstation Admin password
22
+ attr_accessor :admin_pwd
23
+
24
+ # Comment about the EventForwarder
25
+ attr_accessor :comment
26
+
27
+ # A comma seperated list of email addresses to send event to (relevant only for \\\"email\\\" Event Forwarder)
28
+ attr_accessor :email_to
29
+
30
+ # Event sources
31
+ attr_accessor :event_source_locations
32
+
33
+ # Event Source type [item, target]
34
+ attr_accessor :event_source_type
35
+
36
+ # Event types
37
+ attr_accessor :event_types
38
+
39
+ # Rate of periodic runner repetition in hours
40
+ attr_accessor :every
41
+
42
+ attr_accessor :forwarder_type
43
+
44
+ # Workstation Host
45
+ attr_accessor :host
46
+
47
+ # Set output format to JSON
48
+ attr_accessor :json
49
+
50
+ # The name of a key that used to encrypt the EventForwarder secret value (if empty, the account default protectionKey key will be used)
51
+ attr_accessor :key
52
+
53
+ # EventForwarder name
54
+ attr_accessor :name
55
+
56
+ attr_accessor :runner_type
57
+
58
+ # Authentication token (see `/auth` and `/configure`)
59
+ attr_accessor :token
60
+
61
+ # The universal identity token, Required only for universal_identity authentication
62
+ attr_accessor :uid_token
63
+
64
+ # Attribute mapping from ruby-style variable name to JSON key.
65
+ def self.attribute_map
66
+ {
67
+ :'admin_name' => :'admin-name',
68
+ :'admin_pwd' => :'admin-pwd',
69
+ :'comment' => :'comment',
70
+ :'email_to' => :'email-to',
71
+ :'event_source_locations' => :'event-source-locations',
72
+ :'event_source_type' => :'event-source-type',
73
+ :'event_types' => :'event-types',
74
+ :'every' => :'every',
75
+ :'forwarder_type' => :'forwarder-type',
76
+ :'host' => :'host',
77
+ :'json' => :'json',
78
+ :'key' => :'key',
79
+ :'name' => :'name',
80
+ :'runner_type' => :'runner-type',
81
+ :'token' => :'token',
82
+ :'uid_token' => :'uid-token'
83
+ }
84
+ end
85
+
86
+ # Returns all the JSON keys this model knows about
87
+ def self.acceptable_attributes
88
+ attribute_map.values
89
+ end
90
+
91
+ # Attribute type mapping.
92
+ def self.openapi_types
93
+ {
94
+ :'admin_name' => :'String',
95
+ :'admin_pwd' => :'String',
96
+ :'comment' => :'String',
97
+ :'email_to' => :'String',
98
+ :'event_source_locations' => :'Array<String>',
99
+ :'event_source_type' => :'String',
100
+ :'event_types' => :'Array<String>',
101
+ :'every' => :'String',
102
+ :'forwarder_type' => :'String',
103
+ :'host' => :'String',
104
+ :'json' => :'Boolean',
105
+ :'key' => :'String',
106
+ :'name' => :'String',
107
+ :'runner_type' => :'String',
108
+ :'token' => :'String',
109
+ :'uid_token' => :'String'
110
+ }
111
+ end
112
+
113
+ # List of attributes with nullable: true
114
+ def self.openapi_nullable
115
+ Set.new([
116
+ ])
117
+ end
118
+
119
+ # Initializes the object
120
+ # @param [Hash] attributes Model attributes in the form of hash
121
+ def initialize(attributes = {})
122
+ if (!attributes.is_a?(Hash))
123
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::CreateEventForwarder` initialize method"
124
+ end
125
+
126
+ # check to see if the attribute exists and convert string to symbol for hash key
127
+ attributes = attributes.each_with_object({}) { |(k, v), h|
128
+ if (!self.class.attribute_map.key?(k.to_sym))
129
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::CreateEventForwarder`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
130
+ end
131
+ h[k.to_sym] = v
132
+ }
133
+
134
+ if attributes.key?(:'admin_name')
135
+ self.admin_name = attributes[:'admin_name']
136
+ end
137
+
138
+ if attributes.key?(:'admin_pwd')
139
+ self.admin_pwd = attributes[:'admin_pwd']
140
+ end
141
+
142
+ if attributes.key?(:'comment')
143
+ self.comment = attributes[:'comment']
144
+ end
145
+
146
+ if attributes.key?(:'email_to')
147
+ self.email_to = attributes[:'email_to']
148
+ end
149
+
150
+ if attributes.key?(:'event_source_locations')
151
+ if (value = attributes[:'event_source_locations']).is_a?(Array)
152
+ self.event_source_locations = value
153
+ end
154
+ end
155
+
156
+ if attributes.key?(:'event_source_type')
157
+ self.event_source_type = attributes[:'event_source_type']
158
+ else
159
+ self.event_source_type = 'item'
160
+ end
161
+
162
+ if attributes.key?(:'event_types')
163
+ if (value = attributes[:'event_types']).is_a?(Array)
164
+ self.event_types = value
165
+ end
166
+ end
167
+
168
+ if attributes.key?(:'every')
169
+ self.every = attributes[:'every']
170
+ end
171
+
172
+ if attributes.key?(:'forwarder_type')
173
+ self.forwarder_type = attributes[:'forwarder_type']
174
+ end
175
+
176
+ if attributes.key?(:'host')
177
+ self.host = attributes[:'host']
178
+ end
179
+
180
+ if attributes.key?(:'json')
181
+ self.json = attributes[:'json']
182
+ end
183
+
184
+ if attributes.key?(:'key')
185
+ self.key = attributes[:'key']
186
+ end
187
+
188
+ if attributes.key?(:'name')
189
+ self.name = attributes[:'name']
190
+ end
191
+
192
+ if attributes.key?(:'runner_type')
193
+ self.runner_type = attributes[:'runner_type']
194
+ end
195
+
196
+ if attributes.key?(:'token')
197
+ self.token = attributes[:'token']
198
+ end
199
+
200
+ if attributes.key?(:'uid_token')
201
+ self.uid_token = attributes[:'uid_token']
202
+ end
203
+ end
204
+
205
+ # Show invalid properties with the reasons. Usually used together with valid?
206
+ # @return Array for valid properties with the reasons
207
+ def list_invalid_properties
208
+ invalid_properties = Array.new
209
+ if @event_source_locations.nil?
210
+ invalid_properties.push('invalid value for "event_source_locations", event_source_locations cannot be nil.')
211
+ end
212
+
213
+ if @forwarder_type.nil?
214
+ invalid_properties.push('invalid value for "forwarder_type", forwarder_type cannot be nil.')
215
+ end
216
+
217
+ if @name.nil?
218
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
219
+ end
220
+
221
+ if @runner_type.nil?
222
+ invalid_properties.push('invalid value for "runner_type", runner_type cannot be nil.')
223
+ end
224
+
225
+ invalid_properties
226
+ end
227
+
228
+ # Check to see if the all the properties in the model are valid
229
+ # @return true if the model is valid
230
+ def valid?
231
+ return false if @event_source_locations.nil?
232
+ return false if @forwarder_type.nil?
233
+ return false if @name.nil?
234
+ return false if @runner_type.nil?
235
+ true
236
+ end
237
+
238
+ # Checks equality by comparing each attribute.
239
+ # @param [Object] Object to be compared
240
+ def ==(o)
241
+ return true if self.equal?(o)
242
+ self.class == o.class &&
243
+ admin_name == o.admin_name &&
244
+ admin_pwd == o.admin_pwd &&
245
+ comment == o.comment &&
246
+ email_to == o.email_to &&
247
+ event_source_locations == o.event_source_locations &&
248
+ event_source_type == o.event_source_type &&
249
+ event_types == o.event_types &&
250
+ every == o.every &&
251
+ forwarder_type == o.forwarder_type &&
252
+ host == o.host &&
253
+ json == o.json &&
254
+ key == o.key &&
255
+ name == o.name &&
256
+ runner_type == o.runner_type &&
257
+ token == o.token &&
258
+ uid_token == o.uid_token
259
+ end
260
+
261
+ # @see the `==` method
262
+ # @param [Object] Object to be compared
263
+ def eql?(o)
264
+ self == o
265
+ end
266
+
267
+ # Calculates hash code according to all attributes.
268
+ # @return [Integer] Hash code
269
+ def hash
270
+ [admin_name, admin_pwd, comment, email_to, event_source_locations, event_source_type, event_types, every, forwarder_type, host, json, key, name, runner_type, token, uid_token].hash
271
+ end
272
+
273
+ # Builds the object from hash
274
+ # @param [Hash] attributes Model attributes in the form of hash
275
+ # @return [Object] Returns the model itself
276
+ def self.build_from_hash(attributes)
277
+ new.build_from_hash(attributes)
278
+ end
279
+
280
+ # Builds the object from hash
281
+ # @param [Hash] attributes Model attributes in the form of hash
282
+ # @return [Object] Returns the model itself
283
+ def build_from_hash(attributes)
284
+ return nil unless attributes.is_a?(Hash)
285
+ attributes = attributes.transform_keys(&:to_sym)
286
+ self.class.openapi_types.each_pair do |key, type|
287
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
288
+ self.send("#{key}=", nil)
289
+ elsif type =~ /\AArray<(.*)>/i
290
+ # check to ensure the input is an array given that the attribute
291
+ # is documented as an array but the input is not
292
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
293
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
294
+ end
295
+ elsif !attributes[self.class.attribute_map[key]].nil?
296
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
297
+ end
298
+ end
299
+
300
+ self
301
+ end
302
+
303
+ # Deserializes the data based on type
304
+ # @param string type Data type
305
+ # @param string value Value to be deserialized
306
+ # @return [Object] Deserialized data
307
+ def _deserialize(type, value)
308
+ case type.to_sym
309
+ when :Time
310
+ Time.parse(value)
311
+ when :Date
312
+ Date.parse(value)
313
+ when :String
314
+ value.to_s
315
+ when :Integer
316
+ value.to_i
317
+ when :Float
318
+ value.to_f
319
+ when :Boolean
320
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
321
+ true
322
+ else
323
+ false
324
+ end
325
+ when :Object
326
+ # generic object (usually a Hash), return directly
327
+ value
328
+ when /\AArray<(?<inner_type>.+)>\z/
329
+ inner_type = Regexp.last_match[:inner_type]
330
+ value.map { |v| _deserialize(inner_type, v) }
331
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
332
+ k_type = Regexp.last_match[:k_type]
333
+ v_type = Regexp.last_match[:v_type]
334
+ {}.tap do |hash|
335
+ value.each do |k, v|
336
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
337
+ end
338
+ end
339
+ else # model
340
+ # models (e.g. Pet) or oneOf
341
+ klass = Akeyless.const_get(type)
342
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
343
+ end
344
+ end
345
+
346
+ # Returns the string representation of the object
347
+ # @return [String] String presentation of the object
348
+ def to_s
349
+ to_hash.to_s
350
+ end
351
+
352
+ # to_body is an alias to to_hash (backward compatibility)
353
+ # @return [Hash] Returns the object in the form of hash
354
+ def to_body
355
+ to_hash
356
+ end
357
+
358
+ # Returns the object in the form of hash
359
+ # @return [Hash] Returns the object in the form of hash
360
+ def to_hash
361
+ hash = {}
362
+ self.class.attribute_map.each_pair do |attr, param|
363
+ value = self.send(attr)
364
+ if value.nil?
365
+ is_nullable = self.class.openapi_nullable.include?(attr)
366
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
367
+ end
368
+
369
+ hash[param] = _to_hash(value)
370
+ end
371
+ hash
372
+ end
373
+
374
+ # Outputs non-array value in the form of hash
375
+ # For object, use to_hash. Otherwise, just return the value
376
+ # @param [Object] value Any valid value
377
+ # @return [Hash] Returns the value in the form of hash
378
+ def _to_hash(value)
379
+ if value.is_a?(Array)
380
+ value.compact.map { |v| _to_hash(v) }
381
+ elsif value.is_a?(Hash)
382
+ {}.tap do |hash|
383
+ value.each { |k, v| hash[k] = _to_hash(v) }
384
+ end
385
+ elsif value.respond_to? :to_hash
386
+ value.to_hash
387
+ else
388
+ value
389
+ end
390
+ end
391
+
392
+ end
393
+
394
+ 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 CreateEventForwarderOutput
18
+ attr_accessor :event_forwarder_id
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'event_forwarder_id' => :'event_forwarder_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
+ :'event_forwarder_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::CreateEventForwarderOutput` 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::CreateEventForwarderOutput`. 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?(:'event_forwarder_id')
61
+ self.event_forwarder_id = attributes[:'event_forwarder_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
+ event_forwarder_id == o.event_forwarder_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
+ [event_forwarder_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
@@ -35,6 +35,9 @@ module Akeyless
35
35
  # Protection from accidental deletion of this item
36
36
  attr_accessor :delete_protection
37
37
 
38
+ # Base64-encoded service account private key text
39
+ attr_accessor :gcp_key
40
+
38
41
  # Set output format to JSON
39
42
  attr_accessor :json
40
43
 
@@ -140,6 +143,7 @@ module Akeyless
140
143
  :'aws_region' => :'aws-region',
141
144
  :'custom_payload' => :'custom-payload',
142
145
  :'delete_protection' => :'delete_protection',
146
+ :'gcp_key' => :'gcp-key',
143
147
  :'json' => :'json',
144
148
  :'key' => :'key',
145
149
  :'metadata' => :'metadata',
@@ -192,6 +196,7 @@ module Akeyless
192
196
  :'aws_region' => :'String',
193
197
  :'custom_payload' => :'String',
194
198
  :'delete_protection' => :'String',
199
+ :'gcp_key' => :'String',
195
200
  :'json' => :'Boolean',
196
201
  :'key' => :'String',
197
202
  :'metadata' => :'String',
@@ -283,6 +288,10 @@ module Akeyless
283
288
  self.delete_protection = attributes[:'delete_protection']
284
289
  end
285
290
 
291
+ if attributes.key?(:'gcp_key')
292
+ self.gcp_key = attributes[:'gcp_key']
293
+ end
294
+
286
295
  if attributes.key?(:'json')
287
296
  self.json = attributes[:'json']
288
297
  end
@@ -469,6 +478,7 @@ module Akeyless
469
478
  aws_region == o.aws_region &&
470
479
  custom_payload == o.custom_payload &&
471
480
  delete_protection == o.delete_protection &&
481
+ gcp_key == o.gcp_key &&
472
482
  json == o.json &&
473
483
  key == o.key &&
474
484
  metadata == o.metadata &&
@@ -513,7 +523,7 @@ module Akeyless
513
523
  # Calculates hash code according to all attributes.
514
524
  # @return [Integer] Hash code
515
525
  def hash
516
- [api_id, api_key, application_id, authentication_credentials, auto_rotate, aws_region, custom_payload, delete_protection, json, key, metadata, name, rotated_password, rotated_username, rotation_hour, rotation_interval, rotator_creds_type, rotator_custom_cmd, rotator_type, 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, tags, target_name, token, uid_token, user_attribute, user_dn].hash
526
+ [api_id, api_key, application_id, authentication_credentials, auto_rotate, aws_region, custom_payload, delete_protection, gcp_key, json, key, metadata, name, rotated_password, rotated_username, rotation_hour, rotation_interval, rotator_creds_type, rotator_custom_cmd, rotator_type, 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, tags, target_name, token, uid_token, user_attribute, user_dn].hash
517
527
  end
518
528
 
519
529
  # Builds the object from hash