akeyless 5.0.17 → 5.0.19
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.
- checksums.yaml +4 -4
- data/README.md +13 -1
- data/docs/AccountGeneralSettings.md +2 -0
- data/docs/CertificateDiscovery.md +34 -0
- data/docs/CertificateDiscoveryOutput.md +18 -0
- data/docs/CertificateMigration.md +20 -0
- data/docs/CertificatePayload.md +30 -0
- data/docs/CertificateScanTarget.md +20 -0
- data/docs/CreateRole.md +5 -5
- data/docs/GatewayCreateMigration.md +7 -1
- data/docs/GatewayUpdateMigration.md +6 -0
- data/docs/ItemUSCSyncAssociation.md +2 -0
- data/docs/ListItems.md +2 -0
- data/docs/MigrationsConfigPart.md +2 -0
- data/docs/RotatedSecretCreateOpenAI.md +56 -0
- data/docs/RotatedSecretCreateSsh.md +1 -1
- data/docs/RotatedSecretDeleteSync.md +2 -0
- data/docs/RotatedSecretSync.md +2 -0
- data/docs/RotatedSecretUpdateOpenAI.md +58 -0
- data/docs/RotatedSecretUpdateSsh.md +1 -1
- data/docs/ScanResults.md +32 -0
- data/docs/StaticSecretDeleteSync.md +2 -0
- data/docs/StaticSecretSync.md +2 -0
- data/docs/TargetError.md +22 -0
- data/docs/UpdateRole.md +5 -5
- data/docs/UscDelete.md +2 -0
- data/docs/UscSyncInfo.md +2 -0
- data/docs/V2Api.md +191 -2
- data/lib/akeyless/api/v2_api.rb +192 -0
- data/lib/akeyless/models/account_general_settings.rb +10 -1
- data/lib/akeyless/models/certificate_discovery.rb +318 -0
- data/lib/akeyless/models/certificate_discovery_output.rb +214 -0
- data/lib/akeyless/models/certificate_migration.rb +223 -0
- data/lib/akeyless/models/certificate_payload.rb +272 -0
- data/lib/akeyless/models/certificate_scan_target.rb +223 -0
- data/lib/akeyless/models/create_role.rb +5 -5
- data/lib/akeyless/models/gateway_create_migration.rb +43 -2
- data/lib/akeyless/models/gateway_update_migration.rb +42 -1
- data/lib/akeyless/models/item_usc_sync_association.rb +10 -1
- data/lib/akeyless/models/list_items.rb +13 -1
- data/lib/akeyless/models/migrations_config_part.rb +12 -1
- data/lib/akeyless/models/rotated_secret_create_open_ai.rb +437 -0
- data/lib/akeyless/models/rotated_secret_create_ssh.rb +1 -1
- data/lib/akeyless/models/rotated_secret_delete_sync.rb +13 -1
- data/lib/akeyless/models/rotated_secret_sync.rb +11 -1
- data/lib/akeyless/models/rotated_secret_update_open_ai.rb +437 -0
- data/lib/akeyless/models/rotated_secret_update_ssh.rb +1 -1
- data/lib/akeyless/models/scan_results.rb +282 -0
- data/lib/akeyless/models/static_secret_delete_sync.rb +13 -1
- data/lib/akeyless/models/static_secret_sync.rb +11 -1
- data/lib/akeyless/models/target_error.rb +233 -0
- data/lib/akeyless/models/update_role.rb +5 -5
- data/lib/akeyless/models/usc_delete.rb +11 -1
- data/lib/akeyless/models/usc_sync_info.rb +10 -1
- data/lib/akeyless/version.rb +1 -1
- data/lib/akeyless.rb +9 -0
- data/spec/models/certificate_discovery_output_spec.rb +36 -0
- data/spec/models/certificate_discovery_spec.rb +84 -0
- data/spec/models/certificate_migration_spec.rb +42 -0
- data/spec/models/certificate_payload_spec.rb +72 -0
- data/spec/models/certificate_scan_target_spec.rb +42 -0
- data/spec/models/rotated_secret_create_open_ai_spec.rb +150 -0
- data/spec/models/rotated_secret_update_open_ai_spec.rb +156 -0
- data/spec/models/scan_results_spec.rb +78 -0
- data/spec/models/target_error_spec.rb +48 -0
- metadata +38 -2
|
@@ -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
|
|
@@ -15,6 +15,9 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Akeyless
|
|
17
17
|
class StaticSecretDeleteSync
|
|
18
|
+
# Delete the secret from the remote target USC as well
|
|
19
|
+
attr_accessor :delete_from_usc
|
|
20
|
+
|
|
18
21
|
# Set output format to JSON
|
|
19
22
|
attr_accessor :json
|
|
20
23
|
|
|
@@ -36,6 +39,7 @@ module Akeyless
|
|
|
36
39
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
37
40
|
def self.attribute_map
|
|
38
41
|
{
|
|
42
|
+
:'delete_from_usc' => :'delete-from-usc',
|
|
39
43
|
:'json' => :'json',
|
|
40
44
|
:'name' => :'name',
|
|
41
45
|
:'remote_secret_name' => :'remote-secret-name',
|
|
@@ -53,6 +57,7 @@ module Akeyless
|
|
|
53
57
|
# Attribute type mapping.
|
|
54
58
|
def self.openapi_types
|
|
55
59
|
{
|
|
60
|
+
:'delete_from_usc' => :'Boolean',
|
|
56
61
|
:'json' => :'Boolean',
|
|
57
62
|
:'name' => :'String',
|
|
58
63
|
:'remote_secret_name' => :'String',
|
|
@@ -83,6 +88,12 @@ module Akeyless
|
|
|
83
88
|
h[k.to_sym] = v
|
|
84
89
|
}
|
|
85
90
|
|
|
91
|
+
if attributes.key?(:'delete_from_usc')
|
|
92
|
+
self.delete_from_usc = attributes[:'delete_from_usc']
|
|
93
|
+
else
|
|
94
|
+
self.delete_from_usc = false
|
|
95
|
+
end
|
|
96
|
+
|
|
86
97
|
if attributes.key?(:'json')
|
|
87
98
|
self.json = attributes[:'json']
|
|
88
99
|
else
|
|
@@ -144,6 +155,7 @@ module Akeyless
|
|
|
144
155
|
def ==(o)
|
|
145
156
|
return true if self.equal?(o)
|
|
146
157
|
self.class == o.class &&
|
|
158
|
+
delete_from_usc == o.delete_from_usc &&
|
|
147
159
|
json == o.json &&
|
|
148
160
|
name == o.name &&
|
|
149
161
|
remote_secret_name == o.remote_secret_name &&
|
|
@@ -161,7 +173,7 @@ module Akeyless
|
|
|
161
173
|
# Calculates hash code according to all attributes.
|
|
162
174
|
# @return [Integer] Hash code
|
|
163
175
|
def hash
|
|
164
|
-
[json, name, remote_secret_name, token, uid_token, usc_name].hash
|
|
176
|
+
[delete_from_usc, json, name, remote_secret_name, token, uid_token, usc_name].hash
|
|
165
177
|
end
|
|
166
178
|
|
|
167
179
|
# Builds the object from hash
|
|
@@ -15,6 +15,9 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Akeyless
|
|
17
17
|
class StaticSecretSync
|
|
18
|
+
# Delete the secret from remote secret manager (for association create/update)
|
|
19
|
+
attr_accessor :delete_remote
|
|
20
|
+
|
|
18
21
|
# JQ expression to filter or transform the secret value
|
|
19
22
|
attr_accessor :filter_secret_value
|
|
20
23
|
|
|
@@ -42,6 +45,7 @@ module Akeyless
|
|
|
42
45
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
43
46
|
def self.attribute_map
|
|
44
47
|
{
|
|
48
|
+
:'delete_remote' => :'DeleteRemote',
|
|
45
49
|
:'filter_secret_value' => :'filter-secret-value',
|
|
46
50
|
:'json' => :'json',
|
|
47
51
|
:'name' => :'name',
|
|
@@ -61,6 +65,7 @@ module Akeyless
|
|
|
61
65
|
# Attribute type mapping.
|
|
62
66
|
def self.openapi_types
|
|
63
67
|
{
|
|
68
|
+
:'delete_remote' => :'Boolean',
|
|
64
69
|
:'filter_secret_value' => :'String',
|
|
65
70
|
:'json' => :'Boolean',
|
|
66
71
|
:'name' => :'String',
|
|
@@ -93,6 +98,10 @@ module Akeyless
|
|
|
93
98
|
h[k.to_sym] = v
|
|
94
99
|
}
|
|
95
100
|
|
|
101
|
+
if attributes.key?(:'delete_remote')
|
|
102
|
+
self.delete_remote = attributes[:'delete_remote']
|
|
103
|
+
end
|
|
104
|
+
|
|
96
105
|
if attributes.key?(:'filter_secret_value')
|
|
97
106
|
self.filter_secret_value = attributes[:'filter_secret_value']
|
|
98
107
|
end
|
|
@@ -155,6 +164,7 @@ module Akeyless
|
|
|
155
164
|
def ==(o)
|
|
156
165
|
return true if self.equal?(o)
|
|
157
166
|
self.class == o.class &&
|
|
167
|
+
delete_remote == o.delete_remote &&
|
|
158
168
|
filter_secret_value == o.filter_secret_value &&
|
|
159
169
|
json == o.json &&
|
|
160
170
|
name == o.name &&
|
|
@@ -174,7 +184,7 @@ module Akeyless
|
|
|
174
184
|
# Calculates hash code according to all attributes.
|
|
175
185
|
# @return [Integer] Hash code
|
|
176
186
|
def hash
|
|
177
|
-
[filter_secret_value, json, name, namespace, remote_secret_name, token, uid_token, usc_name].hash
|
|
187
|
+
[delete_remote, filter_secret_value, json, name, namespace, remote_secret_name, token, uid_token, usc_name].hash
|
|
178
188
|
end
|
|
179
189
|
|
|
180
190
|
# 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
|
|
@@ -18,7 +18,7 @@ module Akeyless
|
|
|
18
18
|
# Allow this role to view analytics. Currently only 'none', 'own', 'all' values are supported, allowing associated auth methods to view reports produced by the same auth methods.
|
|
19
19
|
attr_accessor :analytics_access
|
|
20
20
|
|
|
21
|
-
# Allow this role to view audit logs. Currently only 'none', 'own' and 'all' values are supported, allowing associated auth methods to view audit logs produced by the same auth methods.
|
|
21
|
+
# Allow this role to view audit logs. Currently only 'none', 'own', 'scoped' and 'all' values are supported, allowing associated auth methods to view audit logs produced by the same auth methods.
|
|
22
22
|
attr_accessor :audit_access
|
|
23
23
|
|
|
24
24
|
# Protection from accidental deletion of this object [true/false]
|
|
@@ -27,13 +27,13 @@ module Akeyless
|
|
|
27
27
|
# Description of the object
|
|
28
28
|
attr_accessor :description
|
|
29
29
|
|
|
30
|
-
# Allow this role to view Event Center. Currently only 'none', '
|
|
30
|
+
# Allow this role to view Event Center. Currently only 'none', 'scoped' and 'all' values are supported
|
|
31
31
|
attr_accessor :event_center_access
|
|
32
32
|
|
|
33
33
|
# Allow this role to manage Event Forwarders. Currently only 'none' and 'all' values are supported.
|
|
34
34
|
attr_accessor :event_forwarder_access
|
|
35
35
|
|
|
36
|
-
# Allow this role to view gw analytics. Currently only 'none', '
|
|
36
|
+
# Allow this role to view gw analytics. Currently only 'none', 'scoped', 'all' values are supported, allowing associated auth methods to view reports produced by the same auth methods.
|
|
37
37
|
attr_accessor :gw_analytics_access
|
|
38
38
|
|
|
39
39
|
# Set output format to JSON
|
|
@@ -48,10 +48,10 @@ module Akeyless
|
|
|
48
48
|
# New Role name
|
|
49
49
|
attr_accessor :new_name
|
|
50
50
|
|
|
51
|
-
# Allow this role to view Reverse RBAC. Supported values: '
|
|
51
|
+
# Allow this role to view Reverse RBAC. Supported values: 'scoped', 'all'.
|
|
52
52
|
attr_accessor :reverse_rbac_access
|
|
53
53
|
|
|
54
|
-
# Allow this role to view SRA Clusters. Currently only 'none', '
|
|
54
|
+
# Allow this role to view SRA Clusters. Currently only 'none', 'scoped', 'all' values are supported.
|
|
55
55
|
attr_accessor :sra_reports_access
|
|
56
56
|
|
|
57
57
|
# Authentication token (see `/auth` and `/configure`)
|