akeyless 5.0.18 → 5.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +9 -1
  3. data/docs/CertificateDiscovery.md +34 -0
  4. data/docs/CertificateDiscoveryOutput.md +18 -0
  5. data/docs/CertificateMigration.md +20 -0
  6. data/docs/CertificatePayload.md +30 -0
  7. data/docs/CertificateScanTarget.md +20 -0
  8. data/docs/CertificateStore.md +2 -0
  9. data/docs/CreateRole.md +5 -5
  10. data/docs/CreateUSC.md +2 -0
  11. data/docs/GatewayCreateMigration.md +7 -1
  12. data/docs/GatewayUpdateMigration.md +6 -0
  13. data/docs/GatewayUpdateTlsCert.md +2 -0
  14. data/docs/GeneralConfigPart.md +6 -0
  15. data/docs/GetKubeExecCreds.md +1 -1
  16. data/docs/GetPKICertificate.md +1 -1
  17. data/docs/MigrationsConfigPart.md +2 -0
  18. data/docs/ScanResults.md +32 -0
  19. data/docs/SecretInfo.md +2 -0
  20. data/docs/TargetError.md +22 -0
  21. data/docs/UpdateItem.md +2 -0
  22. data/docs/UpdateRole.md +5 -5
  23. data/docs/UscCreate.md +2 -0
  24. data/docs/UscDelete.md +2 -0
  25. data/docs/V2Api.md +65 -2
  26. data/lib/akeyless/api/v2_api.rb +64 -0
  27. data/lib/akeyless/models/certificate_discovery.rb +318 -0
  28. data/lib/akeyless/models/certificate_discovery_output.rb +214 -0
  29. data/lib/akeyless/models/certificate_migration.rb +223 -0
  30. data/lib/akeyless/models/certificate_payload.rb +272 -0
  31. data/lib/akeyless/models/certificate_scan_target.rb +223 -0
  32. data/lib/akeyless/models/certificate_store.rb +12 -1
  33. data/lib/akeyless/models/create_role.rb +5 -5
  34. data/lib/akeyless/models/create_usc.rb +11 -1
  35. data/lib/akeyless/models/gateway_create_migration.rb +43 -2
  36. data/lib/akeyless/models/gateway_update_migration.rb +42 -1
  37. data/lib/akeyless/models/gateway_update_tls_cert.rb +13 -1
  38. data/lib/akeyless/models/general_config_part.rb +30 -1
  39. data/lib/akeyless/models/get_kube_exec_creds.rb +1 -1
  40. data/lib/akeyless/models/get_pki_certificate.rb +1 -1
  41. data/lib/akeyless/models/migrations_config_part.rb +12 -1
  42. data/lib/akeyless/models/scan_results.rb +282 -0
  43. data/lib/akeyless/models/secret_info.rb +10 -1
  44. data/lib/akeyless/models/target_error.rb +233 -0
  45. data/lib/akeyless/models/update_item.rb +11 -1
  46. data/lib/akeyless/models/update_role.rb +5 -5
  47. data/lib/akeyless/models/usc_create.rb +11 -1
  48. data/lib/akeyless/models/usc_delete.rb +11 -1
  49. data/lib/akeyless/version.rb +1 -1
  50. data/lib/akeyless.rb +7 -0
  51. data/spec/models/certificate_discovery_output_spec.rb +36 -0
  52. data/spec/models/certificate_discovery_spec.rb +84 -0
  53. data/spec/models/certificate_migration_spec.rb +42 -0
  54. data/spec/models/certificate_payload_spec.rb +72 -0
  55. data/spec/models/certificate_scan_target_spec.rb +42 -0
  56. data/spec/models/scan_results_spec.rb +78 -0
  57. data/spec/models/target_error_spec.rb +48 -0
  58. metadata +30 -2
@@ -21,6 +21,8 @@ module Akeyless
21
21
 
22
22
  attr_accessor :azure_kv_migrations
23
23
 
24
+ attr_accessor :certificate_migrations
25
+
24
26
  attr_accessor :gcp_secrets_migrations
25
27
 
26
28
  attr_accessor :hashi_migrations
@@ -39,6 +41,7 @@ module Akeyless
39
41
  :'active_directory_migrations' => :'active_directory_migrations',
40
42
  :'aws_secrets_migrations' => :'aws_secrets_migrations',
41
43
  :'azure_kv_migrations' => :'azure_kv_migrations',
44
+ :'certificate_migrations' => :'certificate_migrations',
42
45
  :'gcp_secrets_migrations' => :'gcp_secrets_migrations',
43
46
  :'hashi_migrations' => :'hashi_migrations',
44
47
  :'k8s_migrations' => :'k8s_migrations',
@@ -59,6 +62,7 @@ module Akeyless
59
62
  :'active_directory_migrations' => :'Array<ActiveDirectoryMigration>',
60
63
  :'aws_secrets_migrations' => :'Array<AWSSecretsMigration>',
61
64
  :'azure_kv_migrations' => :'Array<AzureKeyVaultMigration>',
65
+ :'certificate_migrations' => :'Array<CertificateMigration>',
62
66
  :'gcp_secrets_migrations' => :'Array<GCPSecretsMigration>',
63
67
  :'hashi_migrations' => :'Array<HashiMigration>',
64
68
  :'k8s_migrations' => :'Array<K8SMigration>',
@@ -107,6 +111,12 @@ module Akeyless
107
111
  end
108
112
  end
109
113
 
114
+ if attributes.key?(:'certificate_migrations')
115
+ if (value = attributes[:'certificate_migrations']).is_a?(Array)
116
+ self.certificate_migrations = value
117
+ end
118
+ end
119
+
110
120
  if attributes.key?(:'gcp_secrets_migrations')
111
121
  if (value = attributes[:'gcp_secrets_migrations']).is_a?(Array)
112
122
  self.gcp_secrets_migrations = value
@@ -167,6 +177,7 @@ module Akeyless
167
177
  active_directory_migrations == o.active_directory_migrations &&
168
178
  aws_secrets_migrations == o.aws_secrets_migrations &&
169
179
  azure_kv_migrations == o.azure_kv_migrations &&
180
+ certificate_migrations == o.certificate_migrations &&
170
181
  gcp_secrets_migrations == o.gcp_secrets_migrations &&
171
182
  hashi_migrations == o.hashi_migrations &&
172
183
  k8s_migrations == o.k8s_migrations &&
@@ -184,7 +195,7 @@ module Akeyless
184
195
  # Calculates hash code according to all attributes.
185
196
  # @return [Integer] Hash code
186
197
  def hash
187
- [active_directory_migrations, aws_secrets_migrations, azure_kv_migrations, gcp_secrets_migrations, hashi_migrations, k8s_migrations, mock_migrations, one_password_migrations, server_inventory_migrations].hash
198
+ [active_directory_migrations, aws_secrets_migrations, azure_kv_migrations, certificate_migrations, gcp_secrets_migrations, hashi_migrations, k8s_migrations, mock_migrations, one_password_migrations, server_inventory_migrations].hash
188
199
  end
189
200
 
190
201
  # Builds the object from hash
@@ -0,0 +1,282 @@
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: 3.0
7
+ Contact: support@akeyless.io
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.10.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Akeyless
17
+ # ScanResults contains detailed results from a certificate scan
18
+ class ScanResults
19
+ attr_accessor :count_existing
20
+
21
+ attr_accessor :count_failed
22
+
23
+ attr_accessor :count_hosts
24
+
25
+ attr_accessor :count_new
26
+
27
+ attr_accessor :count_subdomains
28
+
29
+ attr_accessor :error
30
+
31
+ attr_accessor :failed_targets
32
+
33
+ attr_accessor :item_names
34
+
35
+ # Attribute mapping from ruby-style variable name to JSON key.
36
+ def self.attribute_map
37
+ {
38
+ :'count_existing' => :'CountExisting',
39
+ :'count_failed' => :'CountFailed',
40
+ :'count_hosts' => :'CountHosts',
41
+ :'count_new' => :'CountNew',
42
+ :'count_subdomains' => :'CountSubdomains',
43
+ :'error' => :'Error',
44
+ :'failed_targets' => :'FailedTargets',
45
+ :'item_names' => :'ItemNames'
46
+ }
47
+ end
48
+
49
+ # Returns all the JSON keys this model knows about
50
+ def self.acceptable_attributes
51
+ attribute_map.values
52
+ end
53
+
54
+ # Attribute type mapping.
55
+ def self.openapi_types
56
+ {
57
+ :'count_existing' => :'Integer',
58
+ :'count_failed' => :'Integer',
59
+ :'count_hosts' => :'Integer',
60
+ :'count_new' => :'Integer',
61
+ :'count_subdomains' => :'Integer',
62
+ :'error' => :'String',
63
+ :'failed_targets' => :'Array<TargetError>',
64
+ :'item_names' => :'Array<String>'
65
+ }
66
+ end
67
+
68
+ # List of attributes with nullable: true
69
+ def self.openapi_nullable
70
+ Set.new([
71
+ ])
72
+ end
73
+
74
+ # Initializes the object
75
+ # @param [Hash] attributes Model attributes in the form of hash
76
+ def initialize(attributes = {})
77
+ if (!attributes.is_a?(Hash))
78
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::ScanResults` initialize method"
79
+ end
80
+
81
+ # check to see if the attribute exists and convert string to symbol for hash key
82
+ attributes = attributes.each_with_object({}) { |(k, v), h|
83
+ if (!self.class.attribute_map.key?(k.to_sym))
84
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::ScanResults`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
85
+ end
86
+ h[k.to_sym] = v
87
+ }
88
+
89
+ if attributes.key?(:'count_existing')
90
+ self.count_existing = attributes[:'count_existing']
91
+ end
92
+
93
+ if attributes.key?(:'count_failed')
94
+ self.count_failed = attributes[:'count_failed']
95
+ end
96
+
97
+ if attributes.key?(:'count_hosts')
98
+ self.count_hosts = attributes[:'count_hosts']
99
+ end
100
+
101
+ if attributes.key?(:'count_new')
102
+ self.count_new = attributes[:'count_new']
103
+ end
104
+
105
+ if attributes.key?(:'count_subdomains')
106
+ self.count_subdomains = attributes[:'count_subdomains']
107
+ end
108
+
109
+ if attributes.key?(:'error')
110
+ self.error = attributes[:'error']
111
+ end
112
+
113
+ if attributes.key?(:'failed_targets')
114
+ if (value = attributes[:'failed_targets']).is_a?(Array)
115
+ self.failed_targets = value
116
+ end
117
+ end
118
+
119
+ if attributes.key?(:'item_names')
120
+ if (value = attributes[:'item_names']).is_a?(Array)
121
+ self.item_names = value
122
+ end
123
+ end
124
+ end
125
+
126
+ # Show invalid properties with the reasons. Usually used together with valid?
127
+ # @return Array for valid properties with the reasons
128
+ def list_invalid_properties
129
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
130
+ invalid_properties = Array.new
131
+ invalid_properties
132
+ end
133
+
134
+ # Check to see if the all the properties in the model are valid
135
+ # @return true if the model is valid
136
+ def valid?
137
+ warn '[DEPRECATED] the `valid?` method is obsolete'
138
+ true
139
+ end
140
+
141
+ # Checks equality by comparing each attribute.
142
+ # @param [Object] Object to be compared
143
+ def ==(o)
144
+ return true if self.equal?(o)
145
+ self.class == o.class &&
146
+ count_existing == o.count_existing &&
147
+ count_failed == o.count_failed &&
148
+ count_hosts == o.count_hosts &&
149
+ count_new == o.count_new &&
150
+ count_subdomains == o.count_subdomains &&
151
+ error == o.error &&
152
+ failed_targets == o.failed_targets &&
153
+ item_names == o.item_names
154
+ end
155
+
156
+ # @see the `==` method
157
+ # @param [Object] Object to be compared
158
+ def eql?(o)
159
+ self == o
160
+ end
161
+
162
+ # Calculates hash code according to all attributes.
163
+ # @return [Integer] Hash code
164
+ def hash
165
+ [count_existing, count_failed, count_hosts, count_new, count_subdomains, error, failed_targets, item_names].hash
166
+ end
167
+
168
+ # Builds the object from hash
169
+ # @param [Hash] attributes Model attributes in the form of hash
170
+ # @return [Object] Returns the model itself
171
+ def self.build_from_hash(attributes)
172
+ return nil unless attributes.is_a?(Hash)
173
+ attributes = attributes.transform_keys(&:to_sym)
174
+ transformed_hash = {}
175
+ openapi_types.each_pair do |key, type|
176
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
177
+ transformed_hash["#{key}"] = nil
178
+ elsif type =~ /\AArray<(.*)>/i
179
+ # check to ensure the input is an array given that the attribute
180
+ # is documented as an array but the input is not
181
+ if attributes[attribute_map[key]].is_a?(Array)
182
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
183
+ end
184
+ elsif !attributes[attribute_map[key]].nil?
185
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
186
+ end
187
+ end
188
+ new(transformed_hash)
189
+ end
190
+
191
+ # Deserializes the data based on type
192
+ # @param string type Data type
193
+ # @param string value Value to be deserialized
194
+ # @return [Object] Deserialized data
195
+ def self._deserialize(type, value)
196
+ case type.to_sym
197
+ when :Time
198
+ Time.parse(value)
199
+ when :Date
200
+ Date.parse(value)
201
+ when :String
202
+ value.to_s
203
+ when :Integer
204
+ value.to_i
205
+ when :Float
206
+ value.to_f
207
+ when :Boolean
208
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
209
+ true
210
+ else
211
+ false
212
+ end
213
+ when :Object
214
+ # generic object (usually a Hash), return directly
215
+ value
216
+ when /\AArray<(?<inner_type>.+)>\z/
217
+ inner_type = Regexp.last_match[:inner_type]
218
+ value.map { |v| _deserialize(inner_type, v) }
219
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
220
+ k_type = Regexp.last_match[:k_type]
221
+ v_type = Regexp.last_match[:v_type]
222
+ {}.tap do |hash|
223
+ value.each do |k, v|
224
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
225
+ end
226
+ end
227
+ else # model
228
+ # models (e.g. Pet) or oneOf
229
+ klass = Akeyless.const_get(type)
230
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
231
+ end
232
+ end
233
+
234
+ # Returns the string representation of the object
235
+ # @return [String] String presentation of the object
236
+ def to_s
237
+ to_hash.to_s
238
+ end
239
+
240
+ # to_body is an alias to to_hash (backward compatibility)
241
+ # @return [Hash] Returns the object in the form of hash
242
+ def to_body
243
+ to_hash
244
+ end
245
+
246
+ # Returns the object in the form of hash
247
+ # @return [Hash] Returns the object in the form of hash
248
+ def to_hash
249
+ hash = {}
250
+ self.class.attribute_map.each_pair do |attr, param|
251
+ value = self.send(attr)
252
+ if value.nil?
253
+ is_nullable = self.class.openapi_nullable.include?(attr)
254
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
255
+ end
256
+
257
+ hash[param] = _to_hash(value)
258
+ end
259
+ hash
260
+ end
261
+
262
+ # Outputs non-array value in the form of hash
263
+ # For object, use to_hash. Otherwise, just return the value
264
+ # @param [Object] value Any valid value
265
+ # @return [Hash] Returns the value in the form of hash
266
+ def _to_hash(value)
267
+ if value.is_a?(Array)
268
+ value.compact.map { |v| _to_hash(v) }
269
+ elsif value.is_a?(Hash)
270
+ {}.tap do |hash|
271
+ value.each { |k, v| hash[k] = _to_hash(v) }
272
+ end
273
+ elsif value.respond_to? :to_hash
274
+ value.to_hash
275
+ else
276
+ value
277
+ end
278
+ end
279
+
280
+ end
281
+
282
+ end
@@ -29,6 +29,8 @@ module Akeyless
29
29
 
30
30
  attr_accessor :name
31
31
 
32
+ attr_accessor :region
33
+
32
34
  attr_accessor :secret_id
33
35
 
34
36
  attr_accessor :status
@@ -51,6 +53,7 @@ module Akeyless
51
53
  :'last_retrieved' => :'last_retrieved',
52
54
  :'location' => :'location',
53
55
  :'name' => :'name',
56
+ :'region' => :'region',
54
57
  :'secret_id' => :'secret_id',
55
58
  :'status' => :'status',
56
59
  :'tags' => :'tags',
@@ -75,6 +78,7 @@ module Akeyless
75
78
  :'last_retrieved' => :'Time',
76
79
  :'location' => :'Object',
77
80
  :'name' => :'String',
81
+ :'region' => :'String',
78
82
  :'secret_id' => :'String',
79
83
  :'status' => :'Boolean',
80
84
  :'tags' => :'Hash<String, String>',
@@ -134,6 +138,10 @@ module Akeyless
134
138
  self.name = attributes[:'name']
135
139
  end
136
140
 
141
+ if attributes.key?(:'region')
142
+ self.region = attributes[:'region']
143
+ end
144
+
137
145
  if attributes.key?(:'secret_id')
138
146
  self.secret_id = attributes[:'secret_id']
139
147
  end
@@ -188,6 +196,7 @@ module Akeyless
188
196
  last_retrieved == o.last_retrieved &&
189
197
  location == o.location &&
190
198
  name == o.name &&
199
+ region == o.region &&
191
200
  secret_id == o.secret_id &&
192
201
  status == o.status &&
193
202
  tags == o.tags &&
@@ -205,7 +214,7 @@ module Akeyless
205
214
  # Calculates hash code according to all attributes.
206
215
  # @return [Integer] Hash code
207
216
  def hash
208
- [created, description, expiration, key_id, last_retrieved, location, name, secret_id, status, tags, thumbprint, type, version].hash
217
+ [created, description, expiration, key_id, last_retrieved, location, name, region, secret_id, status, tags, thumbprint, type, version].hash
209
218
  end
210
219
 
211
220
  # Builds the object from hash
@@ -0,0 +1,233 @@
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: 3.0
7
+ Contact: support@akeyless.io
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.10.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Akeyless
17
+ # TargetError represents a failed target scan
18
+ class TargetError
19
+ attr_accessor :error
20
+
21
+ attr_accessor :host
22
+
23
+ attr_accessor :port
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'error' => :'error',
29
+ :'host' => :'host',
30
+ :'port' => :'port'
31
+ }
32
+ end
33
+
34
+ # Returns all the JSON keys this model knows about
35
+ def self.acceptable_attributes
36
+ attribute_map.values
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ def self.openapi_types
41
+ {
42
+ :'error' => :'String',
43
+ :'host' => :'String',
44
+ :'port' => :'Integer'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::TargetError` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ attributes = attributes.each_with_object({}) { |(k, v), h|
63
+ if (!self.class.attribute_map.key?(k.to_sym))
64
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::TargetError`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
65
+ end
66
+ h[k.to_sym] = v
67
+ }
68
+
69
+ if attributes.key?(:'error')
70
+ self.error = attributes[:'error']
71
+ end
72
+
73
+ if attributes.key?(:'host')
74
+ self.host = attributes[:'host']
75
+ end
76
+
77
+ if attributes.key?(:'port')
78
+ self.port = attributes[:'port']
79
+ end
80
+ end
81
+
82
+ # Show invalid properties with the reasons. Usually used together with valid?
83
+ # @return Array for valid properties with the reasons
84
+ def list_invalid_properties
85
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
86
+ invalid_properties = Array.new
87
+ invalid_properties
88
+ end
89
+
90
+ # Check to see if the all the properties in the model are valid
91
+ # @return true if the model is valid
92
+ def valid?
93
+ warn '[DEPRECATED] the `valid?` method is obsolete'
94
+ true
95
+ end
96
+
97
+ # Checks equality by comparing each attribute.
98
+ # @param [Object] Object to be compared
99
+ def ==(o)
100
+ return true if self.equal?(o)
101
+ self.class == o.class &&
102
+ error == o.error &&
103
+ host == o.host &&
104
+ port == o.port
105
+ end
106
+
107
+ # @see the `==` method
108
+ # @param [Object] Object to be compared
109
+ def eql?(o)
110
+ self == o
111
+ end
112
+
113
+ # Calculates hash code according to all attributes.
114
+ # @return [Integer] Hash code
115
+ def hash
116
+ [error, host, port].hash
117
+ end
118
+
119
+ # Builds the object from hash
120
+ # @param [Hash] attributes Model attributes in the form of hash
121
+ # @return [Object] Returns the model itself
122
+ def self.build_from_hash(attributes)
123
+ return nil unless attributes.is_a?(Hash)
124
+ attributes = attributes.transform_keys(&:to_sym)
125
+ transformed_hash = {}
126
+ openapi_types.each_pair do |key, type|
127
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
128
+ transformed_hash["#{key}"] = nil
129
+ elsif type =~ /\AArray<(.*)>/i
130
+ # check to ensure the input is an array given that the attribute
131
+ # is documented as an array but the input is not
132
+ if attributes[attribute_map[key]].is_a?(Array)
133
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
134
+ end
135
+ elsif !attributes[attribute_map[key]].nil?
136
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
137
+ end
138
+ end
139
+ new(transformed_hash)
140
+ end
141
+
142
+ # Deserializes the data based on type
143
+ # @param string type Data type
144
+ # @param string value Value to be deserialized
145
+ # @return [Object] Deserialized data
146
+ def self._deserialize(type, value)
147
+ case type.to_sym
148
+ when :Time
149
+ Time.parse(value)
150
+ when :Date
151
+ Date.parse(value)
152
+ when :String
153
+ value.to_s
154
+ when :Integer
155
+ value.to_i
156
+ when :Float
157
+ value.to_f
158
+ when :Boolean
159
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
160
+ true
161
+ else
162
+ false
163
+ end
164
+ when :Object
165
+ # generic object (usually a Hash), return directly
166
+ value
167
+ when /\AArray<(?<inner_type>.+)>\z/
168
+ inner_type = Regexp.last_match[:inner_type]
169
+ value.map { |v| _deserialize(inner_type, v) }
170
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
171
+ k_type = Regexp.last_match[:k_type]
172
+ v_type = Regexp.last_match[:v_type]
173
+ {}.tap do |hash|
174
+ value.each do |k, v|
175
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
176
+ end
177
+ end
178
+ else # model
179
+ # models (e.g. Pet) or oneOf
180
+ klass = Akeyless.const_get(type)
181
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
182
+ end
183
+ end
184
+
185
+ # Returns the string representation of the object
186
+ # @return [String] String presentation of the object
187
+ def to_s
188
+ to_hash.to_s
189
+ end
190
+
191
+ # to_body is an alias to to_hash (backward compatibility)
192
+ # @return [Hash] Returns the object in the form of hash
193
+ def to_body
194
+ to_hash
195
+ end
196
+
197
+ # Returns the object in the form of hash
198
+ # @return [Hash] Returns the object in the form of hash
199
+ def to_hash
200
+ hash = {}
201
+ self.class.attribute_map.each_pair do |attr, param|
202
+ value = self.send(attr)
203
+ if value.nil?
204
+ is_nullable = self.class.openapi_nullable.include?(attr)
205
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
206
+ end
207
+
208
+ hash[param] = _to_hash(value)
209
+ end
210
+ hash
211
+ end
212
+
213
+ # Outputs non-array value in the form of hash
214
+ # For object, use to_hash. Otherwise, just return the value
215
+ # @param [Object] value Any valid value
216
+ # @return [Hash] Returns the value in the form of hash
217
+ def _to_hash(value)
218
+ if value.is_a?(Array)
219
+ value.compact.map { |v| _to_hash(v) }
220
+ elsif value.is_a?(Hash)
221
+ {}.tap do |hash|
222
+ value.each { |k, v| hash[k] = _to_hash(v) }
223
+ end
224
+ elsif value.respond_to? :to_hash
225
+ value.to_hash
226
+ else
227
+ value
228
+ end
229
+ end
230
+
231
+ end
232
+
233
+ end
@@ -40,6 +40,9 @@ module Akeyless
40
40
  # How many days before the expiration of the certificate would you like to be notified.
41
41
  attr_accessor :expiration_event_in
42
42
 
43
+ # GCP Secret Manager regions to query for regional secrets (comma-separated, e.g., us-east1,us-west1). Max 12 regions. USC with GCP targets only.
44
+ attr_accessor :gcp_sm_regions
45
+
43
46
  # Host provider type [explicit/target], Default Host provider is explicit, Relevant only for Secure Remote Access of ssh cert issuer, ldap rotated secret and ldap dynamic secret
44
47
  attr_accessor :host_provider
45
48
 
@@ -174,6 +177,7 @@ module Akeyless
174
177
  :'delete_protection' => :'delete_protection',
175
178
  :'description' => :'description',
176
179
  :'expiration_event_in' => :'expiration-event-in',
180
+ :'gcp_sm_regions' => :'gcp-sm-regions',
177
181
  :'host_provider' => :'host-provider',
178
182
  :'item_custom_fields' => :'item-custom-fields',
179
183
  :'json' => :'json',
@@ -235,6 +239,7 @@ module Akeyless
235
239
  :'delete_protection' => :'String',
236
240
  :'description' => :'String',
237
241
  :'expiration_event_in' => :'Array<String>',
242
+ :'gcp_sm_regions' => :'String',
238
243
  :'host_provider' => :'String',
239
244
  :'item_custom_fields' => :'Hash<String, String>',
240
245
  :'json' => :'Boolean',
@@ -344,6 +349,10 @@ module Akeyless
344
349
  end
345
350
  end
346
351
 
352
+ if attributes.key?(:'gcp_sm_regions')
353
+ self.gcp_sm_regions = attributes[:'gcp_sm_regions']
354
+ end
355
+
347
356
  if attributes.key?(:'host_provider')
348
357
  self.host_provider = attributes[:'host_provider']
349
358
  end
@@ -565,6 +574,7 @@ module Akeyless
565
574
  delete_protection == o.delete_protection &&
566
575
  description == o.description &&
567
576
  expiration_event_in == o.expiration_event_in &&
577
+ gcp_sm_regions == o.gcp_sm_regions &&
568
578
  host_provider == o.host_provider &&
569
579
  item_custom_fields == o.item_custom_fields &&
570
580
  json == o.json &&
@@ -617,7 +627,7 @@ module Akeyless
617
627
  # Calculates hash code according to all attributes.
618
628
  # @return [Integer] Hash code
619
629
  def hash
620
- [provider_type, accessibility, add_tag, cert_file_data, certificate_format, change_event, delete_protection, description, expiration_event_in, host_provider, item_custom_fields, json, max_versions, name, new_metadata, new_name, rm_tag, rotate_after_disconnect, secure_access_add_host, secure_access_allow_external_user, secure_access_allow_port_forwading, secure_access_api, secure_access_aws_account_id, secure_access_aws_native_cli, secure_access_aws_region, secure_access_bastion_api, secure_access_bastion_issuer, secure_access_bastion_ssh, secure_access_certificate_issuer, secure_access_cluster_endpoint, secure_access_dashboard_url, secure_access_db_name, secure_access_db_schema, secure_access_enable, secure_access_gateway, secure_access_host, secure_access_rd_gateway_server, secure_access_rdp_domain, secure_access_rdp_user, secure_access_rm_host, secure_access_ssh, secure_access_ssh_creds, secure_access_ssh_creds_user, secure_access_url, secure_access_use_internal_bastion, secure_access_use_internal_ssh_access, secure_access_web_browsing, secure_access_web_proxy, token, uid_token].hash
630
+ [provider_type, accessibility, add_tag, cert_file_data, certificate_format, change_event, delete_protection, description, expiration_event_in, gcp_sm_regions, host_provider, item_custom_fields, json, max_versions, name, new_metadata, new_name, rm_tag, rotate_after_disconnect, secure_access_add_host, secure_access_allow_external_user, secure_access_allow_port_forwading, secure_access_api, secure_access_aws_account_id, secure_access_aws_native_cli, secure_access_aws_region, secure_access_bastion_api, secure_access_bastion_issuer, secure_access_bastion_ssh, secure_access_certificate_issuer, secure_access_cluster_endpoint, secure_access_dashboard_url, secure_access_db_name, secure_access_db_schema, secure_access_enable, secure_access_gateway, secure_access_host, secure_access_rd_gateway_server, secure_access_rdp_domain, secure_access_rdp_user, secure_access_rm_host, secure_access_ssh, secure_access_ssh_creds, secure_access_ssh_creds_user, secure_access_url, secure_access_use_internal_bastion, secure_access_use_internal_ssh_access, secure_access_web_browsing, secure_access_web_proxy, token, uid_token].hash
621
631
  end
622
632
 
623
633
  # Builds the object from hash