akeyless 3.1.2 → 3.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -1
- data/docs/CreateAWSTarget.md +3 -1
- data/docs/CreateArtifactoryTarget.md +3 -1
- data/docs/CreateAzureTarget.md +3 -1
- data/docs/CreateDBTarget.md +3 -1
- data/docs/CreateDockerhubTarget.md +3 -1
- data/docs/CreateEKSTarget.md +3 -1
- data/docs/CreateEventForwarder.md +3 -1
- data/docs/CreateGKETarget.md +3 -1
- data/docs/CreateGcpTarget.md +3 -1
- data/docs/CreateGithubTarget.md +3 -1
- data/docs/CreateLdapTarget.md +3 -1
- data/docs/CreateNativeK8STarget.md +3 -1
- data/docs/CreatePingTarget.md +40 -0
- data/docs/CreatePingTargetOutput.md +18 -0
- data/docs/CreateRabbitMQTarget.md +3 -1
- data/docs/CreateRole.md +3 -1
- data/docs/CreateRotatedSecret.md +2 -0
- data/docs/CreateSSHTarget.md +3 -1
- data/docs/CreateSalesforceTarget.md +3 -1
- data/docs/CreateWebTarget.md +3 -1
- data/docs/DSProducerDetails.md +40 -0
- data/docs/GatewayCreateProducerEks.md +1 -1
- data/docs/GatewayCreateProducerPing.md +66 -0
- data/docs/GatewayCreateProducerPingOutput.md +18 -0
- data/docs/GatewayUpdateProducerEks.md +1 -1
- data/docs/GatewayUpdateProducerPing.md +68 -0
- data/docs/GatewayUpdateProducerPingOutput.md +18 -0
- data/docs/GetKubeExecCreds.md +5 -3
- data/docs/GetPKICertificate.md +5 -3
- data/docs/ImporterInfo.md +20 -0
- data/docs/ItemGeneralInfo.md +2 -0
- data/docs/RequestAccess.md +3 -1
- data/docs/SecureRemoteAccess.md +2 -0
- data/docs/TargetTypeDetailsInput.md +10 -0
- data/docs/UidCreateChildToken.md +3 -1
- data/docs/UpdateAWSTarget.md +3 -1
- data/docs/UpdateArtifactoryTarget.md +3 -1
- data/docs/UpdateAzureTarget.md +3 -1
- data/docs/UpdateDBTarget.md +3 -1
- data/docs/UpdateDockerhubTarget.md +3 -1
- data/docs/UpdateEKSTarget.md +3 -1
- data/docs/UpdateEventForwarder.md +3 -1
- data/docs/UpdateGKETarget.md +3 -1
- data/docs/UpdateGcpTarget.md +3 -1
- data/docs/UpdateGithubTarget.md +3 -1
- data/docs/UpdateLdapTarget.md +3 -1
- data/docs/UpdateNativeK8STarget.md +3 -1
- data/docs/UpdatePingTarget.md +46 -0
- data/docs/UpdateRabbitMQTarget.md +3 -1
- data/docs/UpdateRole.md +3 -1
- data/docs/UpdateRotatedSecret.md +2 -0
- data/docs/UpdateSSHTarget.md +3 -1
- data/docs/UpdateSalesforceTarget.md +3 -1
- data/docs/UpdateTarget.md +3 -1
- data/docs/UpdateWebTarget.md +3 -1
- data/docs/V2Api.md +252 -0
- data/lib/akeyless/api/v2_api.rb +256 -0
- data/lib/akeyless/models/create_artifactory_target.rb +12 -2
- data/lib/akeyless/models/create_aws_target.rb +12 -2
- data/lib/akeyless/models/create_azure_target.rb +12 -2
- data/lib/akeyless/models/create_db_target.rb +12 -2
- data/lib/akeyless/models/create_dockerhub_target.rb +12 -2
- data/lib/akeyless/models/create_eks_target.rb +12 -2
- data/lib/akeyless/models/create_event_forwarder.rb +12 -2
- data/lib/akeyless/models/create_gcp_target.rb +12 -2
- data/lib/akeyless/models/create_github_target.rb +12 -2
- data/lib/akeyless/models/create_gke_target.rb +12 -2
- data/lib/akeyless/models/create_ldap_target.rb +12 -2
- data/lib/akeyless/models/create_native_k8_s_target.rb +12 -2
- data/lib/akeyless/models/create_ping_target.rb +339 -0
- data/lib/akeyless/models/create_ping_target_output.rb +219 -0
- data/lib/akeyless/models/create_rabbit_mq_target.rb +12 -2
- data/lib/akeyless/models/create_role.rb +12 -2
- data/lib/akeyless/models/create_rotated_secret.rb +13 -1
- data/lib/akeyless/models/create_salesforce_target.rb +12 -2
- data/lib/akeyless/models/create_ssh_target.rb +12 -2
- data/lib/akeyless/models/create_web_target.rb +12 -2
- data/lib/akeyless/models/ds_producer_details.rb +196 -1
- data/lib/akeyless/models/gateway_create_producer_eks.rb +1 -1
- data/lib/akeyless/models/gateway_create_producer_ping.rb +482 -0
- data/lib/akeyless/models/gateway_create_producer_ping_output.rb +219 -0
- data/lib/akeyless/models/gateway_update_producer_eks.rb +1 -1
- data/lib/akeyless/models/gateway_update_producer_ping.rb +492 -0
- data/lib/akeyless/models/gateway_update_producer_ping_output.rb +219 -0
- data/lib/akeyless/models/get_kube_exec_creds.rb +14 -4
- data/lib/akeyless/models/get_pki_certificate.rb +14 -4
- data/lib/akeyless/models/importer_info.rb +228 -0
- data/lib/akeyless/models/item_general_info.rb +10 -1
- data/lib/akeyless/models/request_access.rb +12 -2
- data/lib/akeyless/models/secure_remote_access.rb +10 -1
- data/lib/akeyless/models/target_type_details_input.rb +46 -1
- data/lib/akeyless/models/uid_create_child_token.rb +12 -2
- data/lib/akeyless/models/update_artifactory_target.rb +12 -2
- data/lib/akeyless/models/update_aws_target.rb +12 -2
- data/lib/akeyless/models/update_azure_target.rb +12 -2
- data/lib/akeyless/models/update_db_target.rb +12 -2
- data/lib/akeyless/models/update_dockerhub_target.rb +12 -2
- data/lib/akeyless/models/update_eks_target.rb +12 -2
- data/lib/akeyless/models/update_event_forwarder.rb +14 -2
- data/lib/akeyless/models/update_gcp_target.rb +12 -2
- data/lib/akeyless/models/update_github_target.rb +12 -2
- data/lib/akeyless/models/update_gke_target.rb +12 -2
- data/lib/akeyless/models/update_ldap_target.rb +12 -2
- data/lib/akeyless/models/update_native_k8_s_target.rb +12 -2
- data/lib/akeyless/models/update_ping_target.rb +368 -0
- data/lib/akeyless/models/update_rabbit_mq_target.rb +12 -2
- data/lib/akeyless/models/update_role.rb +14 -2
- data/lib/akeyless/models/update_rotated_secret.rb +13 -1
- data/lib/akeyless/models/update_salesforce_target.rb +12 -2
- data/lib/akeyless/models/update_ssh_target.rb +12 -2
- data/lib/akeyless/models/update_target.rb +14 -2
- data/lib/akeyless/models/update_web_target.rb +12 -2
- data/lib/akeyless/version.rb +1 -1
- data/lib/akeyless.rb +8 -0
- data/spec/models/create_ping_target_output_spec.rb +34 -0
- data/spec/models/create_ping_target_spec.rb +94 -0
- data/spec/models/gateway_create_producer_ping_output_spec.rb +34 -0
- data/spec/models/gateway_create_producer_ping_spec.rb +178 -0
- data/spec/models/gateway_update_producer_ping_output_spec.rb +34 -0
- data/spec/models/gateway_update_producer_ping_spec.rb +184 -0
- data/spec/models/importer_info_spec.rb +40 -0
- data/spec/models/update_ping_target_spec.rb +112 -0
- metadata +594 -562
@@ -0,0 +1,339 @@
|
|
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 CreatePingTarget
|
18
|
+
# Ping Federate administrative port
|
19
|
+
attr_accessor :administrative_port
|
20
|
+
|
21
|
+
# Ping Federate authorization port
|
22
|
+
attr_accessor :authorization_port
|
23
|
+
|
24
|
+
# Deprecated - use description
|
25
|
+
attr_accessor :comment
|
26
|
+
|
27
|
+
# Description of the object
|
28
|
+
attr_accessor :description
|
29
|
+
|
30
|
+
# Set output format to JSON
|
31
|
+
attr_accessor :json
|
32
|
+
|
33
|
+
# The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
|
34
|
+
attr_accessor :key
|
35
|
+
|
36
|
+
# Target name
|
37
|
+
attr_accessor :name
|
38
|
+
|
39
|
+
# Ping Federate privileged user password
|
40
|
+
attr_accessor :password
|
41
|
+
|
42
|
+
# Ping URL
|
43
|
+
attr_accessor :ping_url
|
44
|
+
|
45
|
+
# Ping Federate privileged user
|
46
|
+
attr_accessor :privileged_user
|
47
|
+
|
48
|
+
# Authentication token (see `/auth` and `/configure`)
|
49
|
+
attr_accessor :token
|
50
|
+
|
51
|
+
# The universal identity token, Required only for universal_identity authentication
|
52
|
+
attr_accessor :uid_token
|
53
|
+
|
54
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
55
|
+
def self.attribute_map
|
56
|
+
{
|
57
|
+
:'administrative_port' => :'administrative-port',
|
58
|
+
:'authorization_port' => :'authorization-port',
|
59
|
+
:'comment' => :'comment',
|
60
|
+
:'description' => :'description',
|
61
|
+
:'json' => :'json',
|
62
|
+
:'key' => :'key',
|
63
|
+
:'name' => :'name',
|
64
|
+
:'password' => :'password',
|
65
|
+
:'ping_url' => :'ping-url',
|
66
|
+
:'privileged_user' => :'privileged-user',
|
67
|
+
:'token' => :'token',
|
68
|
+
:'uid_token' => :'uid-token'
|
69
|
+
}
|
70
|
+
end
|
71
|
+
|
72
|
+
# Returns all the JSON keys this model knows about
|
73
|
+
def self.acceptable_attributes
|
74
|
+
attribute_map.values
|
75
|
+
end
|
76
|
+
|
77
|
+
# Attribute type mapping.
|
78
|
+
def self.openapi_types
|
79
|
+
{
|
80
|
+
:'administrative_port' => :'String',
|
81
|
+
:'authorization_port' => :'String',
|
82
|
+
:'comment' => :'String',
|
83
|
+
:'description' => :'String',
|
84
|
+
:'json' => :'Boolean',
|
85
|
+
:'key' => :'String',
|
86
|
+
:'name' => :'String',
|
87
|
+
:'password' => :'String',
|
88
|
+
:'ping_url' => :'String',
|
89
|
+
:'privileged_user' => :'String',
|
90
|
+
:'token' => :'String',
|
91
|
+
:'uid_token' => :'String'
|
92
|
+
}
|
93
|
+
end
|
94
|
+
|
95
|
+
# List of attributes with nullable: true
|
96
|
+
def self.openapi_nullable
|
97
|
+
Set.new([
|
98
|
+
])
|
99
|
+
end
|
100
|
+
|
101
|
+
# Initializes the object
|
102
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
103
|
+
def initialize(attributes = {})
|
104
|
+
if (!attributes.is_a?(Hash))
|
105
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::CreatePingTarget` initialize method"
|
106
|
+
end
|
107
|
+
|
108
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
109
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
110
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
111
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::CreatePingTarget`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
112
|
+
end
|
113
|
+
h[k.to_sym] = v
|
114
|
+
}
|
115
|
+
|
116
|
+
if attributes.key?(:'administrative_port')
|
117
|
+
self.administrative_port = attributes[:'administrative_port']
|
118
|
+
else
|
119
|
+
self.administrative_port = '9999'
|
120
|
+
end
|
121
|
+
|
122
|
+
if attributes.key?(:'authorization_port')
|
123
|
+
self.authorization_port = attributes[:'authorization_port']
|
124
|
+
else
|
125
|
+
self.authorization_port = '9031'
|
126
|
+
end
|
127
|
+
|
128
|
+
if attributes.key?(:'comment')
|
129
|
+
self.comment = attributes[:'comment']
|
130
|
+
end
|
131
|
+
|
132
|
+
if attributes.key?(:'description')
|
133
|
+
self.description = attributes[:'description']
|
134
|
+
end
|
135
|
+
|
136
|
+
if attributes.key?(:'json')
|
137
|
+
self.json = attributes[:'json']
|
138
|
+
end
|
139
|
+
|
140
|
+
if attributes.key?(:'key')
|
141
|
+
self.key = attributes[:'key']
|
142
|
+
end
|
143
|
+
|
144
|
+
if attributes.key?(:'name')
|
145
|
+
self.name = attributes[:'name']
|
146
|
+
end
|
147
|
+
|
148
|
+
if attributes.key?(:'password')
|
149
|
+
self.password = attributes[:'password']
|
150
|
+
end
|
151
|
+
|
152
|
+
if attributes.key?(:'ping_url')
|
153
|
+
self.ping_url = attributes[:'ping_url']
|
154
|
+
end
|
155
|
+
|
156
|
+
if attributes.key?(:'privileged_user')
|
157
|
+
self.privileged_user = attributes[:'privileged_user']
|
158
|
+
end
|
159
|
+
|
160
|
+
if attributes.key?(:'token')
|
161
|
+
self.token = attributes[:'token']
|
162
|
+
end
|
163
|
+
|
164
|
+
if attributes.key?(:'uid_token')
|
165
|
+
self.uid_token = attributes[:'uid_token']
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
170
|
+
# @return Array for valid properties with the reasons
|
171
|
+
def list_invalid_properties
|
172
|
+
invalid_properties = Array.new
|
173
|
+
if @name.nil?
|
174
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
175
|
+
end
|
176
|
+
|
177
|
+
invalid_properties
|
178
|
+
end
|
179
|
+
|
180
|
+
# Check to see if the all the properties in the model are valid
|
181
|
+
# @return true if the model is valid
|
182
|
+
def valid?
|
183
|
+
return false if @name.nil?
|
184
|
+
true
|
185
|
+
end
|
186
|
+
|
187
|
+
# Checks equality by comparing each attribute.
|
188
|
+
# @param [Object] Object to be compared
|
189
|
+
def ==(o)
|
190
|
+
return true if self.equal?(o)
|
191
|
+
self.class == o.class &&
|
192
|
+
administrative_port == o.administrative_port &&
|
193
|
+
authorization_port == o.authorization_port &&
|
194
|
+
comment == o.comment &&
|
195
|
+
description == o.description &&
|
196
|
+
json == o.json &&
|
197
|
+
key == o.key &&
|
198
|
+
name == o.name &&
|
199
|
+
password == o.password &&
|
200
|
+
ping_url == o.ping_url &&
|
201
|
+
privileged_user == o.privileged_user &&
|
202
|
+
token == o.token &&
|
203
|
+
uid_token == o.uid_token
|
204
|
+
end
|
205
|
+
|
206
|
+
# @see the `==` method
|
207
|
+
# @param [Object] Object to be compared
|
208
|
+
def eql?(o)
|
209
|
+
self == o
|
210
|
+
end
|
211
|
+
|
212
|
+
# Calculates hash code according to all attributes.
|
213
|
+
# @return [Integer] Hash code
|
214
|
+
def hash
|
215
|
+
[administrative_port, authorization_port, comment, description, json, key, name, password, ping_url, privileged_user, token, uid_token].hash
|
216
|
+
end
|
217
|
+
|
218
|
+
# Builds the object from hash
|
219
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
220
|
+
# @return [Object] Returns the model itself
|
221
|
+
def self.build_from_hash(attributes)
|
222
|
+
new.build_from_hash(attributes)
|
223
|
+
end
|
224
|
+
|
225
|
+
# Builds the object from hash
|
226
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
227
|
+
# @return [Object] Returns the model itself
|
228
|
+
def build_from_hash(attributes)
|
229
|
+
return nil unless attributes.is_a?(Hash)
|
230
|
+
attributes = attributes.transform_keys(&:to_sym)
|
231
|
+
self.class.openapi_types.each_pair do |key, type|
|
232
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
233
|
+
self.send("#{key}=", nil)
|
234
|
+
elsif type =~ /\AArray<(.*)>/i
|
235
|
+
# check to ensure the input is an array given that the attribute
|
236
|
+
# is documented as an array but the input is not
|
237
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
238
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
239
|
+
end
|
240
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
241
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
242
|
+
end
|
243
|
+
end
|
244
|
+
|
245
|
+
self
|
246
|
+
end
|
247
|
+
|
248
|
+
# Deserializes the data based on type
|
249
|
+
# @param string type Data type
|
250
|
+
# @param string value Value to be deserialized
|
251
|
+
# @return [Object] Deserialized data
|
252
|
+
def _deserialize(type, value)
|
253
|
+
case type.to_sym
|
254
|
+
when :Time
|
255
|
+
Time.parse(value)
|
256
|
+
when :Date
|
257
|
+
Date.parse(value)
|
258
|
+
when :String
|
259
|
+
value.to_s
|
260
|
+
when :Integer
|
261
|
+
value.to_i
|
262
|
+
when :Float
|
263
|
+
value.to_f
|
264
|
+
when :Boolean
|
265
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
266
|
+
true
|
267
|
+
else
|
268
|
+
false
|
269
|
+
end
|
270
|
+
when :Object
|
271
|
+
# generic object (usually a Hash), return directly
|
272
|
+
value
|
273
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
274
|
+
inner_type = Regexp.last_match[:inner_type]
|
275
|
+
value.map { |v| _deserialize(inner_type, v) }
|
276
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
277
|
+
k_type = Regexp.last_match[:k_type]
|
278
|
+
v_type = Regexp.last_match[:v_type]
|
279
|
+
{}.tap do |hash|
|
280
|
+
value.each do |k, v|
|
281
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
282
|
+
end
|
283
|
+
end
|
284
|
+
else # model
|
285
|
+
# models (e.g. Pet) or oneOf
|
286
|
+
klass = Akeyless.const_get(type)
|
287
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
288
|
+
end
|
289
|
+
end
|
290
|
+
|
291
|
+
# Returns the string representation of the object
|
292
|
+
# @return [String] String presentation of the object
|
293
|
+
def to_s
|
294
|
+
to_hash.to_s
|
295
|
+
end
|
296
|
+
|
297
|
+
# to_body is an alias to to_hash (backward compatibility)
|
298
|
+
# @return [Hash] Returns the object in the form of hash
|
299
|
+
def to_body
|
300
|
+
to_hash
|
301
|
+
end
|
302
|
+
|
303
|
+
# Returns the object in the form of hash
|
304
|
+
# @return [Hash] Returns the object in the form of hash
|
305
|
+
def to_hash
|
306
|
+
hash = {}
|
307
|
+
self.class.attribute_map.each_pair do |attr, param|
|
308
|
+
value = self.send(attr)
|
309
|
+
if value.nil?
|
310
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
311
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
312
|
+
end
|
313
|
+
|
314
|
+
hash[param] = _to_hash(value)
|
315
|
+
end
|
316
|
+
hash
|
317
|
+
end
|
318
|
+
|
319
|
+
# Outputs non-array value in the form of hash
|
320
|
+
# For object, use to_hash. Otherwise, just return the value
|
321
|
+
# @param [Object] value Any valid value
|
322
|
+
# @return [Hash] Returns the value in the form of hash
|
323
|
+
def _to_hash(value)
|
324
|
+
if value.is_a?(Array)
|
325
|
+
value.compact.map { |v| _to_hash(v) }
|
326
|
+
elsif value.is_a?(Hash)
|
327
|
+
{}.tap do |hash|
|
328
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
329
|
+
end
|
330
|
+
elsif value.respond_to? :to_hash
|
331
|
+
value.to_hash
|
332
|
+
else
|
333
|
+
value
|
334
|
+
end
|
335
|
+
end
|
336
|
+
|
337
|
+
end
|
338
|
+
|
339
|
+
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 CreatePingTargetOutput
|
18
|
+
attr_accessor :target_id
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'target_id' => :'target_id'
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
# Returns all the JSON keys this model knows about
|
28
|
+
def self.acceptable_attributes
|
29
|
+
attribute_map.values
|
30
|
+
end
|
31
|
+
|
32
|
+
# Attribute type mapping.
|
33
|
+
def self.openapi_types
|
34
|
+
{
|
35
|
+
:'target_id' => :'Integer'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# List of attributes with nullable: true
|
40
|
+
def self.openapi_nullable
|
41
|
+
Set.new([
|
42
|
+
])
|
43
|
+
end
|
44
|
+
|
45
|
+
# Initializes the object
|
46
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
47
|
+
def initialize(attributes = {})
|
48
|
+
if (!attributes.is_a?(Hash))
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::CreatePingTargetOutput` 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::CreatePingTargetOutput`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
56
|
+
end
|
57
|
+
h[k.to_sym] = v
|
58
|
+
}
|
59
|
+
|
60
|
+
if attributes.key?(:'target_id')
|
61
|
+
self.target_id = attributes[:'target_id']
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
66
|
+
# @return Array for valid properties with the reasons
|
67
|
+
def list_invalid_properties
|
68
|
+
invalid_properties = Array.new
|
69
|
+
invalid_properties
|
70
|
+
end
|
71
|
+
|
72
|
+
# Check to see if the all the properties in the model are valid
|
73
|
+
# @return true if the model is valid
|
74
|
+
def valid?
|
75
|
+
true
|
76
|
+
end
|
77
|
+
|
78
|
+
# Checks equality by comparing each attribute.
|
79
|
+
# @param [Object] Object to be compared
|
80
|
+
def ==(o)
|
81
|
+
return true if self.equal?(o)
|
82
|
+
self.class == o.class &&
|
83
|
+
target_id == o.target_id
|
84
|
+
end
|
85
|
+
|
86
|
+
# @see the `==` method
|
87
|
+
# @param [Object] Object to be compared
|
88
|
+
def eql?(o)
|
89
|
+
self == o
|
90
|
+
end
|
91
|
+
|
92
|
+
# Calculates hash code according to all attributes.
|
93
|
+
# @return [Integer] Hash code
|
94
|
+
def hash
|
95
|
+
[target_id].hash
|
96
|
+
end
|
97
|
+
|
98
|
+
# Builds the object from hash
|
99
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
100
|
+
# @return [Object] Returns the model itself
|
101
|
+
def self.build_from_hash(attributes)
|
102
|
+
new.build_from_hash(attributes)
|
103
|
+
end
|
104
|
+
|
105
|
+
# Builds the object from hash
|
106
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
107
|
+
# @return [Object] Returns the model itself
|
108
|
+
def build_from_hash(attributes)
|
109
|
+
return nil unless attributes.is_a?(Hash)
|
110
|
+
attributes = attributes.transform_keys(&:to_sym)
|
111
|
+
self.class.openapi_types.each_pair do |key, type|
|
112
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
113
|
+
self.send("#{key}=", nil)
|
114
|
+
elsif type =~ /\AArray<(.*)>/i
|
115
|
+
# check to ensure the input is an array given that the attribute
|
116
|
+
# is documented as an array but the input is not
|
117
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
118
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
119
|
+
end
|
120
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
121
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
self
|
126
|
+
end
|
127
|
+
|
128
|
+
# Deserializes the data based on type
|
129
|
+
# @param string type Data type
|
130
|
+
# @param string value Value to be deserialized
|
131
|
+
# @return [Object] Deserialized data
|
132
|
+
def _deserialize(type, value)
|
133
|
+
case type.to_sym
|
134
|
+
when :Time
|
135
|
+
Time.parse(value)
|
136
|
+
when :Date
|
137
|
+
Date.parse(value)
|
138
|
+
when :String
|
139
|
+
value.to_s
|
140
|
+
when :Integer
|
141
|
+
value.to_i
|
142
|
+
when :Float
|
143
|
+
value.to_f
|
144
|
+
when :Boolean
|
145
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
146
|
+
true
|
147
|
+
else
|
148
|
+
false
|
149
|
+
end
|
150
|
+
when :Object
|
151
|
+
# generic object (usually a Hash), return directly
|
152
|
+
value
|
153
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
154
|
+
inner_type = Regexp.last_match[:inner_type]
|
155
|
+
value.map { |v| _deserialize(inner_type, v) }
|
156
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
157
|
+
k_type = Regexp.last_match[:k_type]
|
158
|
+
v_type = Regexp.last_match[:v_type]
|
159
|
+
{}.tap do |hash|
|
160
|
+
value.each do |k, v|
|
161
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
162
|
+
end
|
163
|
+
end
|
164
|
+
else # model
|
165
|
+
# models (e.g. Pet) or oneOf
|
166
|
+
klass = Akeyless.const_get(type)
|
167
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
171
|
+
# Returns the string representation of the object
|
172
|
+
# @return [String] String presentation of the object
|
173
|
+
def to_s
|
174
|
+
to_hash.to_s
|
175
|
+
end
|
176
|
+
|
177
|
+
# to_body is an alias to to_hash (backward compatibility)
|
178
|
+
# @return [Hash] Returns the object in the form of hash
|
179
|
+
def to_body
|
180
|
+
to_hash
|
181
|
+
end
|
182
|
+
|
183
|
+
# Returns the object in the form of hash
|
184
|
+
# @return [Hash] Returns the object in the form of hash
|
185
|
+
def to_hash
|
186
|
+
hash = {}
|
187
|
+
self.class.attribute_map.each_pair do |attr, param|
|
188
|
+
value = self.send(attr)
|
189
|
+
if value.nil?
|
190
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
191
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
192
|
+
end
|
193
|
+
|
194
|
+
hash[param] = _to_hash(value)
|
195
|
+
end
|
196
|
+
hash
|
197
|
+
end
|
198
|
+
|
199
|
+
# Outputs non-array value in the form of hash
|
200
|
+
# For object, use to_hash. Otherwise, just return the value
|
201
|
+
# @param [Object] value Any valid value
|
202
|
+
# @return [Hash] Returns the value in the form of hash
|
203
|
+
def _to_hash(value)
|
204
|
+
if value.is_a?(Array)
|
205
|
+
value.compact.map { |v| _to_hash(v) }
|
206
|
+
elsif value.is_a?(Hash)
|
207
|
+
{}.tap do |hash|
|
208
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
209
|
+
end
|
210
|
+
elsif value.respond_to? :to_hash
|
211
|
+
value.to_hash
|
212
|
+
else
|
213
|
+
value
|
214
|
+
end
|
215
|
+
end
|
216
|
+
|
217
|
+
end
|
218
|
+
|
219
|
+
end
|
@@ -15,9 +15,12 @@ require 'time'
|
|
15
15
|
|
16
16
|
module Akeyless
|
17
17
|
class CreateRabbitMQTarget
|
18
|
-
#
|
18
|
+
# Deprecated - use description
|
19
19
|
attr_accessor :comment
|
20
20
|
|
21
|
+
# Description of the object
|
22
|
+
attr_accessor :description
|
23
|
+
|
21
24
|
# Set output format to JSON
|
22
25
|
attr_accessor :json
|
23
26
|
|
@@ -43,6 +46,7 @@ module Akeyless
|
|
43
46
|
def self.attribute_map
|
44
47
|
{
|
45
48
|
:'comment' => :'comment',
|
49
|
+
:'description' => :'description',
|
46
50
|
:'json' => :'json',
|
47
51
|
:'key' => :'key',
|
48
52
|
:'name' => :'name',
|
@@ -63,6 +67,7 @@ module Akeyless
|
|
63
67
|
def self.openapi_types
|
64
68
|
{
|
65
69
|
:'comment' => :'String',
|
70
|
+
:'description' => :'String',
|
66
71
|
:'json' => :'Boolean',
|
67
72
|
:'key' => :'String',
|
68
73
|
:'name' => :'String',
|
@@ -99,6 +104,10 @@ module Akeyless
|
|
99
104
|
self.comment = attributes[:'comment']
|
100
105
|
end
|
101
106
|
|
107
|
+
if attributes.key?(:'description')
|
108
|
+
self.description = attributes[:'description']
|
109
|
+
end
|
110
|
+
|
102
111
|
if attributes.key?(:'json')
|
103
112
|
self.json = attributes[:'json']
|
104
113
|
end
|
@@ -156,6 +165,7 @@ module Akeyless
|
|
156
165
|
return true if self.equal?(o)
|
157
166
|
self.class == o.class &&
|
158
167
|
comment == o.comment &&
|
168
|
+
description == o.description &&
|
159
169
|
json == o.json &&
|
160
170
|
key == o.key &&
|
161
171
|
name == o.name &&
|
@@ -175,7 +185,7 @@ module Akeyless
|
|
175
185
|
# Calculates hash code according to all attributes.
|
176
186
|
# @return [Integer] Hash code
|
177
187
|
def hash
|
178
|
-
[comment, json, key, name, rabbitmq_server_password, rabbitmq_server_uri, rabbitmq_server_user, token, uid_token].hash
|
188
|
+
[comment, description, json, key, name, rabbitmq_server_password, rabbitmq_server_uri, rabbitmq_server_user, token, uid_token].hash
|
179
189
|
end
|
180
190
|
|
181
191
|
# Builds the object from hash
|
@@ -21,9 +21,12 @@ module Akeyless
|
|
21
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.
|
22
22
|
attr_accessor :audit_access
|
23
23
|
|
24
|
-
#
|
24
|
+
# Deprecated - use description
|
25
25
|
attr_accessor :comment
|
26
26
|
|
27
|
+
# Description of the object
|
28
|
+
attr_accessor :description
|
29
|
+
|
27
30
|
# Allow this role to view gw analytics. Currently only 'none', 'own', 'all' values are supported, allowing associated auth methods to view reports produced by the same auth methods.
|
28
31
|
attr_accessor :gw_analytics_access
|
29
32
|
|
@@ -48,6 +51,7 @@ module Akeyless
|
|
48
51
|
:'analytics_access' => :'analytics-access',
|
49
52
|
:'audit_access' => :'audit-access',
|
50
53
|
:'comment' => :'comment',
|
54
|
+
:'description' => :'description',
|
51
55
|
:'gw_analytics_access' => :'gw-analytics-access',
|
52
56
|
:'json' => :'json',
|
53
57
|
:'name' => :'name',
|
@@ -68,6 +72,7 @@ module Akeyless
|
|
68
72
|
:'analytics_access' => :'String',
|
69
73
|
:'audit_access' => :'String',
|
70
74
|
:'comment' => :'String',
|
75
|
+
:'description' => :'String',
|
71
76
|
:'gw_analytics_access' => :'String',
|
72
77
|
:'json' => :'Boolean',
|
73
78
|
:'name' => :'String',
|
@@ -110,6 +115,10 @@ module Akeyless
|
|
110
115
|
self.comment = attributes[:'comment']
|
111
116
|
end
|
112
117
|
|
118
|
+
if attributes.key?(:'description')
|
119
|
+
self.description = attributes[:'description']
|
120
|
+
end
|
121
|
+
|
113
122
|
if attributes.key?(:'gw_analytics_access')
|
114
123
|
self.gw_analytics_access = attributes[:'gw_analytics_access']
|
115
124
|
end
|
@@ -161,6 +170,7 @@ module Akeyless
|
|
161
170
|
analytics_access == o.analytics_access &&
|
162
171
|
audit_access == o.audit_access &&
|
163
172
|
comment == o.comment &&
|
173
|
+
description == o.description &&
|
164
174
|
gw_analytics_access == o.gw_analytics_access &&
|
165
175
|
json == o.json &&
|
166
176
|
name == o.name &&
|
@@ -178,7 +188,7 @@ module Akeyless
|
|
178
188
|
# Calculates hash code according to all attributes.
|
179
189
|
# @return [Integer] Hash code
|
180
190
|
def hash
|
181
|
-
[analytics_access, audit_access, comment, gw_analytics_access, json, name, sra_reports_access, token, uid_token].hash
|
191
|
+
[analytics_access, audit_access, comment, description, gw_analytics_access, json, name, sra_reports_access, token, uid_token].hash
|
182
192
|
end
|
183
193
|
|
184
194
|
# Builds the object from hash
|