akeyless 3.0.1 → 3.1.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 +36 -3
- data/docs/AttributeTypeAndValue.md +20 -0
- data/docs/CertificateChainInfo.md +22 -0
- data/docs/CertificateExpirationEvent.md +18 -0
- data/docs/CertificateInfo.md +62 -0
- data/docs/Connect.md +2 -0
- data/docs/CreateCertificate.md +38 -0
- data/docs/CreateCertificateOutput.md +18 -0
- data/docs/CreateEventForwarder.md +48 -0
- data/docs/CreateEventForwarderOutput.md +18 -0
- data/docs/CreateRotatedSecret.md +2 -0
- data/docs/DeleteEventForwarder.md +24 -0
- data/docs/EmailEntry.md +20 -0
- data/docs/Extension.md +22 -0
- data/docs/GatewayUpdateItem.md +2 -0
- data/docs/GatewayUpdateTlsCert.md +26 -0
- data/docs/GatewayUpdateTlsCertOutput.md +18 -0
- data/docs/GetCertificateValue.md +26 -0
- data/docs/GetCertificateValueOutput.md +20 -0
- data/docs/GetEventForwarder.md +24 -0
- data/docs/GetEventForwarderOutput.md +18 -0
- data/docs/Item.md +4 -0
- data/docs/ItemGeneralInfo.md +2 -0
- data/docs/ListSRABastions.md +2 -0
- data/docs/ListSharedItems.md +24 -0
- data/docs/Name.md +28 -0
- data/docs/NotiForwarder.md +56 -0
- data/docs/RequestAccess.md +28 -0
- data/docs/RequestAccessOutput.md +18 -0
- data/docs/RotateKey.md +2 -0
- data/docs/Target.md +4 -0
- data/docs/UpdateCertificateOutput.md +18 -0
- data/docs/UpdateCertificateValue.md +32 -0
- data/docs/UpdateEventForwarder.md +40 -0
- data/docs/UpdateRotatedSecret.md +2 -0
- data/docs/V2Api.md +631 -65
- data/lib/akeyless/api/v2_api.rb +664 -88
- data/lib/akeyless/api_error.rb +1 -0
- data/lib/akeyless/configuration.rb +11 -0
- data/lib/akeyless/models/attribute_type_and_value.rb +231 -0
- data/lib/akeyless/models/certificate_chain_info.rb +241 -0
- data/lib/akeyless/models/certificate_expiration_event.rb +219 -0
- data/lib/akeyless/models/certificate_info.rb +434 -0
- data/lib/akeyless/models/connect.rb +11 -1
- data/lib/akeyless/models/create_certificate.rb +329 -0
- data/lib/akeyless/models/create_certificate_output.rb +219 -0
- data/lib/akeyless/models/create_event_forwarder.rb +394 -0
- data/lib/akeyless/models/create_event_forwarder_output.rb +219 -0
- data/lib/akeyless/models/create_rotated_secret.rb +11 -1
- data/lib/akeyless/models/delete_event_forwarder.rb +255 -0
- data/lib/akeyless/models/email_entry.rb +228 -0
- data/lib/akeyless/models/extension.rb +237 -0
- data/lib/akeyless/models/gateway_update_item.rb +11 -1
- data/lib/akeyless/models/gateway_update_tls_cert.rb +261 -0
- data/lib/akeyless/models/gateway_update_tls_cert_output.rb +219 -0
- data/lib/akeyless/models/get_certificate_value.rb +265 -0
- data/lib/akeyless/models/get_certificate_value_output.rb +228 -0
- data/lib/akeyless/models/get_event_forwarder.rb +255 -0
- data/lib/akeyless/models/get_event_forwarder_output.rb +219 -0
- data/lib/akeyless/models/item.rb +19 -1
- data/lib/akeyless/models/item_general_info.rb +10 -1
- data/lib/akeyless/models/list_shared_items.rb +253 -0
- data/lib/akeyless/models/list_sra_bastions.rb +10 -1
- data/lib/akeyless/models/name.rb +277 -0
- data/lib/akeyless/models/noti_forwarder.rb +400 -0
- data/lib/akeyless/models/request_access.rb +282 -0
- data/lib/akeyless/models/request_access_output.rb +219 -0
- data/lib/akeyless/models/rotate_key.rb +11 -1
- data/lib/akeyless/models/target.rb +19 -1
- data/lib/akeyless/models/update_certificate_output.rb +219 -0
- data/lib/akeyless/models/update_certificate_value.rb +297 -0
- data/lib/akeyless/models/update_event_forwarder.rb +341 -0
- data/lib/akeyless/models/update_rotated_secret.rb +11 -1
- data/lib/akeyless/version.rb +1 -1
- data/lib/akeyless.rb +25 -1
- data/spec/models/attribute_type_and_value_spec.rb +40 -0
- data/spec/models/certificate_chain_info_spec.rb +46 -0
- data/spec/models/certificate_expiration_event_spec.rb +34 -0
- data/spec/models/certificate_info_spec.rb +166 -0
- data/spec/models/create_certificate_output_spec.rb +34 -0
- data/spec/models/create_certificate_spec.rb +94 -0
- data/spec/models/create_event_forwarder_output_spec.rb +34 -0
- data/spec/models/create_event_forwarder_spec.rb +124 -0
- data/spec/models/delete_event_forwarder_spec.rb +52 -0
- data/spec/models/email_entry_spec.rb +40 -0
- data/spec/models/extension_spec.rb +46 -0
- data/spec/models/gateway_update_tls_cert_output_spec.rb +34 -0
- data/spec/models/gateway_update_tls_cert_spec.rb +58 -0
- data/spec/models/get_certificate_value_output_spec.rb +40 -0
- data/spec/models/get_certificate_value_spec.rb +58 -0
- data/spec/models/get_event_forwarder_output_spec.rb +34 -0
- data/spec/models/get_event_forwarder_spec.rb +52 -0
- data/spec/models/list_shared_items_spec.rb +52 -0
- data/spec/models/name_spec.rb +64 -0
- data/spec/models/noti_forwarder_spec.rb +148 -0
- data/spec/models/request_access_output_spec.rb +34 -0
- data/spec/models/request_access_spec.rb +64 -0
- data/spec/models/update_certificate_output_spec.rb +34 -0
- data/spec/models/update_certificate_value_spec.rb +76 -0
- data/spec/models/update_event_forwarder_spec.rb +100 -0
- metadata +630 -530
@@ -0,0 +1,255 @@
|
|
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 GetEventForwarder
|
18
|
+
# Set output format to JSON
|
19
|
+
attr_accessor :json
|
20
|
+
|
21
|
+
# EventForwarder name
|
22
|
+
attr_accessor :name
|
23
|
+
|
24
|
+
# Authentication token (see `/auth` and `/configure`)
|
25
|
+
attr_accessor :token
|
26
|
+
|
27
|
+
# The universal identity token, Required only for universal_identity authentication
|
28
|
+
attr_accessor :uid_token
|
29
|
+
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
31
|
+
def self.attribute_map
|
32
|
+
{
|
33
|
+
:'json' => :'json',
|
34
|
+
:'name' => :'name',
|
35
|
+
:'token' => :'token',
|
36
|
+
:'uid_token' => :'uid-token'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# Returns all the JSON keys this model knows about
|
41
|
+
def self.acceptable_attributes
|
42
|
+
attribute_map.values
|
43
|
+
end
|
44
|
+
|
45
|
+
# Attribute type mapping.
|
46
|
+
def self.openapi_types
|
47
|
+
{
|
48
|
+
:'json' => :'Boolean',
|
49
|
+
:'name' => :'String',
|
50
|
+
:'token' => :'String',
|
51
|
+
:'uid_token' => :'String'
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
# List of attributes with nullable: true
|
56
|
+
def self.openapi_nullable
|
57
|
+
Set.new([
|
58
|
+
])
|
59
|
+
end
|
60
|
+
|
61
|
+
# Initializes the object
|
62
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
63
|
+
def initialize(attributes = {})
|
64
|
+
if (!attributes.is_a?(Hash))
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::GetEventForwarder` initialize method"
|
66
|
+
end
|
67
|
+
|
68
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
69
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
70
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
71
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::GetEventForwarder`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
72
|
+
end
|
73
|
+
h[k.to_sym] = v
|
74
|
+
}
|
75
|
+
|
76
|
+
if attributes.key?(:'json')
|
77
|
+
self.json = attributes[:'json']
|
78
|
+
end
|
79
|
+
|
80
|
+
if attributes.key?(:'name')
|
81
|
+
self.name = attributes[:'name']
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes.key?(:'token')
|
85
|
+
self.token = attributes[:'token']
|
86
|
+
end
|
87
|
+
|
88
|
+
if attributes.key?(:'uid_token')
|
89
|
+
self.uid_token = attributes[:'uid_token']
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
94
|
+
# @return Array for valid properties with the reasons
|
95
|
+
def list_invalid_properties
|
96
|
+
invalid_properties = Array.new
|
97
|
+
if @name.nil?
|
98
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
99
|
+
end
|
100
|
+
|
101
|
+
invalid_properties
|
102
|
+
end
|
103
|
+
|
104
|
+
# Check to see if the all the properties in the model are valid
|
105
|
+
# @return true if the model is valid
|
106
|
+
def valid?
|
107
|
+
return false if @name.nil?
|
108
|
+
true
|
109
|
+
end
|
110
|
+
|
111
|
+
# Checks equality by comparing each attribute.
|
112
|
+
# @param [Object] Object to be compared
|
113
|
+
def ==(o)
|
114
|
+
return true if self.equal?(o)
|
115
|
+
self.class == o.class &&
|
116
|
+
json == o.json &&
|
117
|
+
name == o.name &&
|
118
|
+
token == o.token &&
|
119
|
+
uid_token == o.uid_token
|
120
|
+
end
|
121
|
+
|
122
|
+
# @see the `==` method
|
123
|
+
# @param [Object] Object to be compared
|
124
|
+
def eql?(o)
|
125
|
+
self == o
|
126
|
+
end
|
127
|
+
|
128
|
+
# Calculates hash code according to all attributes.
|
129
|
+
# @return [Integer] Hash code
|
130
|
+
def hash
|
131
|
+
[json, name, token, uid_token].hash
|
132
|
+
end
|
133
|
+
|
134
|
+
# Builds the object from hash
|
135
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
136
|
+
# @return [Object] Returns the model itself
|
137
|
+
def self.build_from_hash(attributes)
|
138
|
+
new.build_from_hash(attributes)
|
139
|
+
end
|
140
|
+
|
141
|
+
# Builds the object from hash
|
142
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
143
|
+
# @return [Object] Returns the model itself
|
144
|
+
def build_from_hash(attributes)
|
145
|
+
return nil unless attributes.is_a?(Hash)
|
146
|
+
attributes = attributes.transform_keys(&:to_sym)
|
147
|
+
self.class.openapi_types.each_pair do |key, type|
|
148
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
149
|
+
self.send("#{key}=", nil)
|
150
|
+
elsif type =~ /\AArray<(.*)>/i
|
151
|
+
# check to ensure the input is an array given that the attribute
|
152
|
+
# is documented as an array but the input is not
|
153
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
154
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
155
|
+
end
|
156
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
157
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
161
|
+
self
|
162
|
+
end
|
163
|
+
|
164
|
+
# Deserializes the data based on type
|
165
|
+
# @param string type Data type
|
166
|
+
# @param string value Value to be deserialized
|
167
|
+
# @return [Object] Deserialized data
|
168
|
+
def _deserialize(type, value)
|
169
|
+
case type.to_sym
|
170
|
+
when :Time
|
171
|
+
Time.parse(value)
|
172
|
+
when :Date
|
173
|
+
Date.parse(value)
|
174
|
+
when :String
|
175
|
+
value.to_s
|
176
|
+
when :Integer
|
177
|
+
value.to_i
|
178
|
+
when :Float
|
179
|
+
value.to_f
|
180
|
+
when :Boolean
|
181
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
182
|
+
true
|
183
|
+
else
|
184
|
+
false
|
185
|
+
end
|
186
|
+
when :Object
|
187
|
+
# generic object (usually a Hash), return directly
|
188
|
+
value
|
189
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
190
|
+
inner_type = Regexp.last_match[:inner_type]
|
191
|
+
value.map { |v| _deserialize(inner_type, v) }
|
192
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
193
|
+
k_type = Regexp.last_match[:k_type]
|
194
|
+
v_type = Regexp.last_match[:v_type]
|
195
|
+
{}.tap do |hash|
|
196
|
+
value.each do |k, v|
|
197
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
198
|
+
end
|
199
|
+
end
|
200
|
+
else # model
|
201
|
+
# models (e.g. Pet) or oneOf
|
202
|
+
klass = Akeyless.const_get(type)
|
203
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
204
|
+
end
|
205
|
+
end
|
206
|
+
|
207
|
+
# Returns the string representation of the object
|
208
|
+
# @return [String] String presentation of the object
|
209
|
+
def to_s
|
210
|
+
to_hash.to_s
|
211
|
+
end
|
212
|
+
|
213
|
+
# to_body is an alias to to_hash (backward compatibility)
|
214
|
+
# @return [Hash] Returns the object in the form of hash
|
215
|
+
def to_body
|
216
|
+
to_hash
|
217
|
+
end
|
218
|
+
|
219
|
+
# Returns the object in the form of hash
|
220
|
+
# @return [Hash] Returns the object in the form of hash
|
221
|
+
def to_hash
|
222
|
+
hash = {}
|
223
|
+
self.class.attribute_map.each_pair do |attr, param|
|
224
|
+
value = self.send(attr)
|
225
|
+
if value.nil?
|
226
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
227
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
228
|
+
end
|
229
|
+
|
230
|
+
hash[param] = _to_hash(value)
|
231
|
+
end
|
232
|
+
hash
|
233
|
+
end
|
234
|
+
|
235
|
+
# Outputs non-array value in the form of hash
|
236
|
+
# For object, use to_hash. Otherwise, just return the value
|
237
|
+
# @param [Object] value Any valid value
|
238
|
+
# @return [Hash] Returns the value in the form of hash
|
239
|
+
def _to_hash(value)
|
240
|
+
if value.is_a?(Array)
|
241
|
+
value.compact.map { |v| _to_hash(v) }
|
242
|
+
elsif value.is_a?(Hash)
|
243
|
+
{}.tap do |hash|
|
244
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
245
|
+
end
|
246
|
+
elsif value.respond_to? :to_hash
|
247
|
+
value.to_hash
|
248
|
+
else
|
249
|
+
value
|
250
|
+
end
|
251
|
+
end
|
252
|
+
|
253
|
+
end
|
254
|
+
|
255
|
+
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 GetEventForwarderOutput
|
18
|
+
attr_accessor :event_forwarder
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'event_forwarder' => :'event_forwarder'
|
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' => :'NotiForwarder'
|
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::GetEventForwarderOutput` 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::GetEventForwarderOutput`. 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')
|
61
|
+
self.event_forwarder = attributes[:'event_forwarder']
|
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 == o.event_forwarder
|
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].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
|
data/lib/akeyless/models/item.rb
CHANGED
@@ -17,6 +17,8 @@ module Akeyless
|
|
17
17
|
class Item
|
18
18
|
attr_accessor :access_date
|
19
19
|
|
20
|
+
attr_accessor :access_request_status
|
21
|
+
|
20
22
|
attr_accessor :auto_rotate
|
21
23
|
|
22
24
|
attr_accessor :cert_issuer_signer_key_name
|
@@ -37,6 +39,8 @@ module Akeyless
|
|
37
39
|
|
38
40
|
attr_accessor :display_id
|
39
41
|
|
42
|
+
attr_accessor :is_access_request_enabled
|
43
|
+
|
40
44
|
attr_accessor :is_enabled
|
41
45
|
|
42
46
|
attr_accessor :item_accessibility
|
@@ -88,6 +92,7 @@ module Akeyless
|
|
88
92
|
def self.attribute_map
|
89
93
|
{
|
90
94
|
:'access_date' => :'access_date',
|
95
|
+
:'access_request_status' => :'access_request_status',
|
91
96
|
:'auto_rotate' => :'auto_rotate',
|
92
97
|
:'cert_issuer_signer_key_name' => :'cert_issuer_signer_key_name',
|
93
98
|
:'certificate_issue_details' => :'certificate_issue_details',
|
@@ -98,6 +103,7 @@ module Akeyless
|
|
98
103
|
:'delete_protection' => :'delete_protection',
|
99
104
|
:'deletion_date' => :'deletion_date',
|
100
105
|
:'display_id' => :'display_id',
|
106
|
+
:'is_access_request_enabled' => :'is_access_request_enabled',
|
101
107
|
:'is_enabled' => :'is_enabled',
|
102
108
|
:'item_accessibility' => :'item_accessibility',
|
103
109
|
:'item_general_info' => :'item_general_info',
|
@@ -133,6 +139,7 @@ module Akeyless
|
|
133
139
|
def self.openapi_types
|
134
140
|
{
|
135
141
|
:'access_date' => :'Time',
|
142
|
+
:'access_request_status' => :'String',
|
136
143
|
:'auto_rotate' => :'Boolean',
|
137
144
|
:'cert_issuer_signer_key_name' => :'String',
|
138
145
|
:'certificate_issue_details' => :'CertificateIssueInfo',
|
@@ -143,6 +150,7 @@ module Akeyless
|
|
143
150
|
:'delete_protection' => :'Boolean',
|
144
151
|
:'deletion_date' => :'Time',
|
145
152
|
:'display_id' => :'String',
|
153
|
+
:'is_access_request_enabled' => :'Boolean',
|
146
154
|
:'is_enabled' => :'Boolean',
|
147
155
|
:'item_accessibility' => :'Integer',
|
148
156
|
:'item_general_info' => :'ItemGeneralInfo',
|
@@ -194,6 +202,10 @@ module Akeyless
|
|
194
202
|
self.access_date = attributes[:'access_date']
|
195
203
|
end
|
196
204
|
|
205
|
+
if attributes.key?(:'access_request_status')
|
206
|
+
self.access_request_status = attributes[:'access_request_status']
|
207
|
+
end
|
208
|
+
|
197
209
|
if attributes.key?(:'auto_rotate')
|
198
210
|
self.auto_rotate = attributes[:'auto_rotate']
|
199
211
|
end
|
@@ -236,6 +248,10 @@ module Akeyless
|
|
236
248
|
self.display_id = attributes[:'display_id']
|
237
249
|
end
|
238
250
|
|
251
|
+
if attributes.key?(:'is_access_request_enabled')
|
252
|
+
self.is_access_request_enabled = attributes[:'is_access_request_enabled']
|
253
|
+
end
|
254
|
+
|
239
255
|
if attributes.key?(:'is_enabled')
|
240
256
|
self.is_enabled = attributes[:'is_enabled']
|
241
257
|
end
|
@@ -356,6 +372,7 @@ module Akeyless
|
|
356
372
|
return true if self.equal?(o)
|
357
373
|
self.class == o.class &&
|
358
374
|
access_date == o.access_date &&
|
375
|
+
access_request_status == o.access_request_status &&
|
359
376
|
auto_rotate == o.auto_rotate &&
|
360
377
|
cert_issuer_signer_key_name == o.cert_issuer_signer_key_name &&
|
361
378
|
certificate_issue_details == o.certificate_issue_details &&
|
@@ -366,6 +383,7 @@ module Akeyless
|
|
366
383
|
delete_protection == o.delete_protection &&
|
367
384
|
deletion_date == o.deletion_date &&
|
368
385
|
display_id == o.display_id &&
|
386
|
+
is_access_request_enabled == o.is_access_request_enabled &&
|
369
387
|
is_enabled == o.is_enabled &&
|
370
388
|
item_accessibility == o.item_accessibility &&
|
371
389
|
item_general_info == o.item_general_info &&
|
@@ -400,7 +418,7 @@ module Akeyless
|
|
400
418
|
# Calculates hash code according to all attributes.
|
401
419
|
# @return [Integer] Hash code
|
402
420
|
def hash
|
403
|
-
[access_date, auto_rotate, cert_issuer_signer_key_name, certificate_issue_details, certificates, client_permissions, creation_date, customer_fragment_id, delete_protection, deletion_date, display_id, is_enabled, item_accessibility, item_general_info, item_id, item_metadata, item_name, item_size, item_state, item_sub_type, item_tags, item_targets_assoc, item_type, item_versions, last_version, modification_date, next_rotation_date, protection_key_name, protection_key_type, public_value, rotation_interval, shared_by, target_versions, with_customer_fragment].hash
|
421
|
+
[access_date, access_request_status, auto_rotate, cert_issuer_signer_key_name, certificate_issue_details, certificates, client_permissions, creation_date, customer_fragment_id, delete_protection, deletion_date, display_id, is_access_request_enabled, is_enabled, item_accessibility, item_general_info, item_id, item_metadata, item_name, item_size, item_state, item_sub_type, item_tags, item_targets_assoc, item_type, item_versions, last_version, modification_date, next_rotation_date, protection_key_name, protection_key_type, public_value, rotation_interval, shared_by, target_versions, with_customer_fragment].hash
|
404
422
|
end
|
405
423
|
|
406
424
|
# Builds the object from hash
|
@@ -17,6 +17,8 @@ module Akeyless
|
|
17
17
|
class ItemGeneralInfo
|
18
18
|
attr_accessor :cert_issue_details
|
19
19
|
|
20
|
+
attr_accessor :certificate_chain_info
|
21
|
+
|
20
22
|
attr_accessor :classic_key_details
|
21
23
|
|
22
24
|
attr_accessor :cluster_gw_url
|
@@ -39,6 +41,7 @@ module Akeyless
|
|
39
41
|
def self.attribute_map
|
40
42
|
{
|
41
43
|
:'cert_issue_details' => :'cert_issue_details',
|
44
|
+
:'certificate_chain_info' => :'certificate_chain_info',
|
42
45
|
:'classic_key_details' => :'classic_key_details',
|
43
46
|
:'cluster_gw_url' => :'cluster_gw_url',
|
44
47
|
:'display_metadata' => :'display_metadata',
|
@@ -60,6 +63,7 @@ module Akeyless
|
|
60
63
|
def self.openapi_types
|
61
64
|
{
|
62
65
|
:'cert_issue_details' => :'CertificateIssueInfo',
|
66
|
+
:'certificate_chain_info' => :'CertificateChainInfo',
|
63
67
|
:'classic_key_details' => :'ClassicKeyDetailsInfo',
|
64
68
|
:'cluster_gw_url' => :'String',
|
65
69
|
:'display_metadata' => :'String',
|
@@ -97,6 +101,10 @@ module Akeyless
|
|
97
101
|
self.cert_issue_details = attributes[:'cert_issue_details']
|
98
102
|
end
|
99
103
|
|
104
|
+
if attributes.key?(:'certificate_chain_info')
|
105
|
+
self.certificate_chain_info = attributes[:'certificate_chain_info']
|
106
|
+
end
|
107
|
+
|
100
108
|
if attributes.key?(:'classic_key_details')
|
101
109
|
self.classic_key_details = attributes[:'classic_key_details']
|
102
110
|
end
|
@@ -153,6 +161,7 @@ module Akeyless
|
|
153
161
|
return true if self.equal?(o)
|
154
162
|
self.class == o.class &&
|
155
163
|
cert_issue_details == o.cert_issue_details &&
|
164
|
+
certificate_chain_info == o.certificate_chain_info &&
|
156
165
|
classic_key_details == o.classic_key_details &&
|
157
166
|
cluster_gw_url == o.cluster_gw_url &&
|
158
167
|
display_metadata == o.display_metadata &&
|
@@ -173,7 +182,7 @@ module Akeyless
|
|
173
182
|
# Calculates hash code according to all attributes.
|
174
183
|
# @return [Integer] Hash code
|
175
184
|
def hash
|
176
|
-
[cert_issue_details, classic_key_details, cluster_gw_url, display_metadata, dynamic_secret_producer_details, password_policy, rotated_secret_details, secure_remote_access_details, static_secret_info, tokenizer_info].hash
|
185
|
+
[cert_issue_details, certificate_chain_info, classic_key_details, cluster_gw_url, display_metadata, dynamic_secret_producer_details, password_policy, rotated_secret_details, secure_remote_access_details, static_secret_info, tokenizer_info].hash
|
177
186
|
end
|
178
187
|
|
179
188
|
# Builds the object from hash
|