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,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 CertificateExpirationEvent
|
18
|
+
attr_accessor :seconds_before
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'seconds_before' => :'seconds_before'
|
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
|
+
:'seconds_before' => :'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::CertificateExpirationEvent` 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::CertificateExpirationEvent`. 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?(:'seconds_before')
|
61
|
+
self.seconds_before = attributes[:'seconds_before']
|
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
|
+
seconds_before == o.seconds_before
|
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
|
+
[seconds_before].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
|
@@ -0,0 +1,434 @@
|
|
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 CertificateInfo
|
18
|
+
attr_accessor :ext_key_usage
|
19
|
+
|
20
|
+
# KeyUsage represents the set of actions that are valid for a given key. It's a bitmap of the KeyUsage* constants.
|
21
|
+
attr_accessor :key_usage
|
22
|
+
|
23
|
+
attr_accessor :dns_names
|
24
|
+
|
25
|
+
attr_accessor :email_addresses
|
26
|
+
|
27
|
+
attr_accessor :extensions
|
28
|
+
|
29
|
+
attr_accessor :ip_addresses
|
30
|
+
|
31
|
+
attr_accessor :is_ca
|
32
|
+
|
33
|
+
attr_accessor :issuer
|
34
|
+
|
35
|
+
attr_accessor :issuing_certificate_url
|
36
|
+
|
37
|
+
attr_accessor :key_size
|
38
|
+
|
39
|
+
attr_accessor :not_after
|
40
|
+
|
41
|
+
attr_accessor :not_before
|
42
|
+
|
43
|
+
attr_accessor :ocsp_server
|
44
|
+
|
45
|
+
attr_accessor :public_key_algorithm_name
|
46
|
+
|
47
|
+
attr_accessor :serial_number
|
48
|
+
|
49
|
+
attr_accessor :sha_1_fingerprint
|
50
|
+
|
51
|
+
attr_accessor :sha_256_fingerprint
|
52
|
+
|
53
|
+
attr_accessor :signature
|
54
|
+
|
55
|
+
attr_accessor :signature_algorithm_name
|
56
|
+
|
57
|
+
attr_accessor :subject
|
58
|
+
|
59
|
+
attr_accessor :subject_public_key
|
60
|
+
|
61
|
+
attr_accessor :uris
|
62
|
+
|
63
|
+
attr_accessor :version
|
64
|
+
|
65
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
66
|
+
def self.attribute_map
|
67
|
+
{
|
68
|
+
:'ext_key_usage' => :'ExtKeyUsage',
|
69
|
+
:'key_usage' => :'KeyUsage',
|
70
|
+
:'dns_names' => :'dns_names',
|
71
|
+
:'email_addresses' => :'email_addresses',
|
72
|
+
:'extensions' => :'extensions',
|
73
|
+
:'ip_addresses' => :'ip_addresses',
|
74
|
+
:'is_ca' => :'is_ca',
|
75
|
+
:'issuer' => :'issuer',
|
76
|
+
:'issuing_certificate_url' => :'issuing_certificate_url',
|
77
|
+
:'key_size' => :'key_size',
|
78
|
+
:'not_after' => :'not_after',
|
79
|
+
:'not_before' => :'not_before',
|
80
|
+
:'ocsp_server' => :'ocsp_server',
|
81
|
+
:'public_key_algorithm_name' => :'public_key_algorithm_name',
|
82
|
+
:'serial_number' => :'serial_number',
|
83
|
+
:'sha_1_fingerprint' => :'sha_1_fingerprint',
|
84
|
+
:'sha_256_fingerprint' => :'sha_256_fingerprint',
|
85
|
+
:'signature' => :'signature',
|
86
|
+
:'signature_algorithm_name' => :'signature_algorithm_name',
|
87
|
+
:'subject' => :'subject',
|
88
|
+
:'subject_public_key' => :'subject_public_key',
|
89
|
+
:'uris' => :'uris',
|
90
|
+
:'version' => :'version'
|
91
|
+
}
|
92
|
+
end
|
93
|
+
|
94
|
+
# Returns all the JSON keys this model knows about
|
95
|
+
def self.acceptable_attributes
|
96
|
+
attribute_map.values
|
97
|
+
end
|
98
|
+
|
99
|
+
# Attribute type mapping.
|
100
|
+
def self.openapi_types
|
101
|
+
{
|
102
|
+
:'ext_key_usage' => :'Array<Integer>',
|
103
|
+
:'key_usage' => :'Integer',
|
104
|
+
:'dns_names' => :'Array<String>',
|
105
|
+
:'email_addresses' => :'Array<String>',
|
106
|
+
:'extensions' => :'Array<Extension>',
|
107
|
+
:'ip_addresses' => :'Array<String>',
|
108
|
+
:'is_ca' => :'Boolean',
|
109
|
+
:'issuer' => :'Name',
|
110
|
+
:'issuing_certificate_url' => :'Array<String>',
|
111
|
+
:'key_size' => :'Integer',
|
112
|
+
:'not_after' => :'Time',
|
113
|
+
:'not_before' => :'Time',
|
114
|
+
:'ocsp_server' => :'Array<String>',
|
115
|
+
:'public_key_algorithm_name' => :'String',
|
116
|
+
:'serial_number' => :'String',
|
117
|
+
:'sha_1_fingerprint' => :'String',
|
118
|
+
:'sha_256_fingerprint' => :'String',
|
119
|
+
:'signature' => :'String',
|
120
|
+
:'signature_algorithm_name' => :'String',
|
121
|
+
:'subject' => :'Name',
|
122
|
+
:'subject_public_key' => :'String',
|
123
|
+
:'uris' => :'Array<String>',
|
124
|
+
:'version' => :'Integer'
|
125
|
+
}
|
126
|
+
end
|
127
|
+
|
128
|
+
# List of attributes with nullable: true
|
129
|
+
def self.openapi_nullable
|
130
|
+
Set.new([
|
131
|
+
])
|
132
|
+
end
|
133
|
+
|
134
|
+
# Initializes the object
|
135
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
136
|
+
def initialize(attributes = {})
|
137
|
+
if (!attributes.is_a?(Hash))
|
138
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::CertificateInfo` initialize method"
|
139
|
+
end
|
140
|
+
|
141
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
142
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
143
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
144
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::CertificateInfo`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
145
|
+
end
|
146
|
+
h[k.to_sym] = v
|
147
|
+
}
|
148
|
+
|
149
|
+
if attributes.key?(:'ext_key_usage')
|
150
|
+
if (value = attributes[:'ext_key_usage']).is_a?(Array)
|
151
|
+
self.ext_key_usage = value
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
if attributes.key?(:'key_usage')
|
156
|
+
self.key_usage = attributes[:'key_usage']
|
157
|
+
end
|
158
|
+
|
159
|
+
if attributes.key?(:'dns_names')
|
160
|
+
if (value = attributes[:'dns_names']).is_a?(Array)
|
161
|
+
self.dns_names = value
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
if attributes.key?(:'email_addresses')
|
166
|
+
if (value = attributes[:'email_addresses']).is_a?(Array)
|
167
|
+
self.email_addresses = value
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
171
|
+
if attributes.key?(:'extensions')
|
172
|
+
if (value = attributes[:'extensions']).is_a?(Array)
|
173
|
+
self.extensions = value
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
177
|
+
if attributes.key?(:'ip_addresses')
|
178
|
+
if (value = attributes[:'ip_addresses']).is_a?(Array)
|
179
|
+
self.ip_addresses = value
|
180
|
+
end
|
181
|
+
end
|
182
|
+
|
183
|
+
if attributes.key?(:'is_ca')
|
184
|
+
self.is_ca = attributes[:'is_ca']
|
185
|
+
end
|
186
|
+
|
187
|
+
if attributes.key?(:'issuer')
|
188
|
+
self.issuer = attributes[:'issuer']
|
189
|
+
end
|
190
|
+
|
191
|
+
if attributes.key?(:'issuing_certificate_url')
|
192
|
+
if (value = attributes[:'issuing_certificate_url']).is_a?(Array)
|
193
|
+
self.issuing_certificate_url = value
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
197
|
+
if attributes.key?(:'key_size')
|
198
|
+
self.key_size = attributes[:'key_size']
|
199
|
+
end
|
200
|
+
|
201
|
+
if attributes.key?(:'not_after')
|
202
|
+
self.not_after = attributes[:'not_after']
|
203
|
+
end
|
204
|
+
|
205
|
+
if attributes.key?(:'not_before')
|
206
|
+
self.not_before = attributes[:'not_before']
|
207
|
+
end
|
208
|
+
|
209
|
+
if attributes.key?(:'ocsp_server')
|
210
|
+
if (value = attributes[:'ocsp_server']).is_a?(Array)
|
211
|
+
self.ocsp_server = value
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
215
|
+
if attributes.key?(:'public_key_algorithm_name')
|
216
|
+
self.public_key_algorithm_name = attributes[:'public_key_algorithm_name']
|
217
|
+
end
|
218
|
+
|
219
|
+
if attributes.key?(:'serial_number')
|
220
|
+
self.serial_number = attributes[:'serial_number']
|
221
|
+
end
|
222
|
+
|
223
|
+
if attributes.key?(:'sha_1_fingerprint')
|
224
|
+
self.sha_1_fingerprint = attributes[:'sha_1_fingerprint']
|
225
|
+
end
|
226
|
+
|
227
|
+
if attributes.key?(:'sha_256_fingerprint')
|
228
|
+
self.sha_256_fingerprint = attributes[:'sha_256_fingerprint']
|
229
|
+
end
|
230
|
+
|
231
|
+
if attributes.key?(:'signature')
|
232
|
+
self.signature = attributes[:'signature']
|
233
|
+
end
|
234
|
+
|
235
|
+
if attributes.key?(:'signature_algorithm_name')
|
236
|
+
self.signature_algorithm_name = attributes[:'signature_algorithm_name']
|
237
|
+
end
|
238
|
+
|
239
|
+
if attributes.key?(:'subject')
|
240
|
+
self.subject = attributes[:'subject']
|
241
|
+
end
|
242
|
+
|
243
|
+
if attributes.key?(:'subject_public_key')
|
244
|
+
self.subject_public_key = attributes[:'subject_public_key']
|
245
|
+
end
|
246
|
+
|
247
|
+
if attributes.key?(:'uris')
|
248
|
+
if (value = attributes[:'uris']).is_a?(Array)
|
249
|
+
self.uris = value
|
250
|
+
end
|
251
|
+
end
|
252
|
+
|
253
|
+
if attributes.key?(:'version')
|
254
|
+
self.version = attributes[:'version']
|
255
|
+
end
|
256
|
+
end
|
257
|
+
|
258
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
259
|
+
# @return Array for valid properties with the reasons
|
260
|
+
def list_invalid_properties
|
261
|
+
invalid_properties = Array.new
|
262
|
+
invalid_properties
|
263
|
+
end
|
264
|
+
|
265
|
+
# Check to see if the all the properties in the model are valid
|
266
|
+
# @return true if the model is valid
|
267
|
+
def valid?
|
268
|
+
true
|
269
|
+
end
|
270
|
+
|
271
|
+
# Checks equality by comparing each attribute.
|
272
|
+
# @param [Object] Object to be compared
|
273
|
+
def ==(o)
|
274
|
+
return true if self.equal?(o)
|
275
|
+
self.class == o.class &&
|
276
|
+
ext_key_usage == o.ext_key_usage &&
|
277
|
+
key_usage == o.key_usage &&
|
278
|
+
dns_names == o.dns_names &&
|
279
|
+
email_addresses == o.email_addresses &&
|
280
|
+
extensions == o.extensions &&
|
281
|
+
ip_addresses == o.ip_addresses &&
|
282
|
+
is_ca == o.is_ca &&
|
283
|
+
issuer == o.issuer &&
|
284
|
+
issuing_certificate_url == o.issuing_certificate_url &&
|
285
|
+
key_size == o.key_size &&
|
286
|
+
not_after == o.not_after &&
|
287
|
+
not_before == o.not_before &&
|
288
|
+
ocsp_server == o.ocsp_server &&
|
289
|
+
public_key_algorithm_name == o.public_key_algorithm_name &&
|
290
|
+
serial_number == o.serial_number &&
|
291
|
+
sha_1_fingerprint == o.sha_1_fingerprint &&
|
292
|
+
sha_256_fingerprint == o.sha_256_fingerprint &&
|
293
|
+
signature == o.signature &&
|
294
|
+
signature_algorithm_name == o.signature_algorithm_name &&
|
295
|
+
subject == o.subject &&
|
296
|
+
subject_public_key == o.subject_public_key &&
|
297
|
+
uris == o.uris &&
|
298
|
+
version == o.version
|
299
|
+
end
|
300
|
+
|
301
|
+
# @see the `==` method
|
302
|
+
# @param [Object] Object to be compared
|
303
|
+
def eql?(o)
|
304
|
+
self == o
|
305
|
+
end
|
306
|
+
|
307
|
+
# Calculates hash code according to all attributes.
|
308
|
+
# @return [Integer] Hash code
|
309
|
+
def hash
|
310
|
+
[ext_key_usage, key_usage, dns_names, email_addresses, extensions, ip_addresses, is_ca, issuer, issuing_certificate_url, key_size, not_after, not_before, ocsp_server, public_key_algorithm_name, serial_number, sha_1_fingerprint, sha_256_fingerprint, signature, signature_algorithm_name, subject, subject_public_key, uris, version].hash
|
311
|
+
end
|
312
|
+
|
313
|
+
# Builds the object from hash
|
314
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
315
|
+
# @return [Object] Returns the model itself
|
316
|
+
def self.build_from_hash(attributes)
|
317
|
+
new.build_from_hash(attributes)
|
318
|
+
end
|
319
|
+
|
320
|
+
# Builds the object from hash
|
321
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
322
|
+
# @return [Object] Returns the model itself
|
323
|
+
def build_from_hash(attributes)
|
324
|
+
return nil unless attributes.is_a?(Hash)
|
325
|
+
attributes = attributes.transform_keys(&:to_sym)
|
326
|
+
self.class.openapi_types.each_pair do |key, type|
|
327
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
328
|
+
self.send("#{key}=", nil)
|
329
|
+
elsif type =~ /\AArray<(.*)>/i
|
330
|
+
# check to ensure the input is an array given that the attribute
|
331
|
+
# is documented as an array but the input is not
|
332
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
333
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
334
|
+
end
|
335
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
336
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
337
|
+
end
|
338
|
+
end
|
339
|
+
|
340
|
+
self
|
341
|
+
end
|
342
|
+
|
343
|
+
# Deserializes the data based on type
|
344
|
+
# @param string type Data type
|
345
|
+
# @param string value Value to be deserialized
|
346
|
+
# @return [Object] Deserialized data
|
347
|
+
def _deserialize(type, value)
|
348
|
+
case type.to_sym
|
349
|
+
when :Time
|
350
|
+
Time.parse(value)
|
351
|
+
when :Date
|
352
|
+
Date.parse(value)
|
353
|
+
when :String
|
354
|
+
value.to_s
|
355
|
+
when :Integer
|
356
|
+
value.to_i
|
357
|
+
when :Float
|
358
|
+
value.to_f
|
359
|
+
when :Boolean
|
360
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
361
|
+
true
|
362
|
+
else
|
363
|
+
false
|
364
|
+
end
|
365
|
+
when :Object
|
366
|
+
# generic object (usually a Hash), return directly
|
367
|
+
value
|
368
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
369
|
+
inner_type = Regexp.last_match[:inner_type]
|
370
|
+
value.map { |v| _deserialize(inner_type, v) }
|
371
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
372
|
+
k_type = Regexp.last_match[:k_type]
|
373
|
+
v_type = Regexp.last_match[:v_type]
|
374
|
+
{}.tap do |hash|
|
375
|
+
value.each do |k, v|
|
376
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
377
|
+
end
|
378
|
+
end
|
379
|
+
else # model
|
380
|
+
# models (e.g. Pet) or oneOf
|
381
|
+
klass = Akeyless.const_get(type)
|
382
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
383
|
+
end
|
384
|
+
end
|
385
|
+
|
386
|
+
# Returns the string representation of the object
|
387
|
+
# @return [String] String presentation of the object
|
388
|
+
def to_s
|
389
|
+
to_hash.to_s
|
390
|
+
end
|
391
|
+
|
392
|
+
# to_body is an alias to to_hash (backward compatibility)
|
393
|
+
# @return [Hash] Returns the object in the form of hash
|
394
|
+
def to_body
|
395
|
+
to_hash
|
396
|
+
end
|
397
|
+
|
398
|
+
# Returns the object in the form of hash
|
399
|
+
# @return [Hash] Returns the object in the form of hash
|
400
|
+
def to_hash
|
401
|
+
hash = {}
|
402
|
+
self.class.attribute_map.each_pair do |attr, param|
|
403
|
+
value = self.send(attr)
|
404
|
+
if value.nil?
|
405
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
406
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
407
|
+
end
|
408
|
+
|
409
|
+
hash[param] = _to_hash(value)
|
410
|
+
end
|
411
|
+
hash
|
412
|
+
end
|
413
|
+
|
414
|
+
# Outputs non-array value in the form of hash
|
415
|
+
# For object, use to_hash. Otherwise, just return the value
|
416
|
+
# @param [Object] value Any valid value
|
417
|
+
# @return [Hash] Returns the value in the form of hash
|
418
|
+
def _to_hash(value)
|
419
|
+
if value.is_a?(Array)
|
420
|
+
value.compact.map { |v| _to_hash(v) }
|
421
|
+
elsif value.is_a?(Hash)
|
422
|
+
{}.tap do |hash|
|
423
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
424
|
+
end
|
425
|
+
elsif value.respond_to? :to_hash
|
426
|
+
value.to_hash
|
427
|
+
else
|
428
|
+
value
|
429
|
+
end
|
430
|
+
end
|
431
|
+
|
432
|
+
end
|
433
|
+
|
434
|
+
end
|
@@ -45,6 +45,9 @@ module Akeyless
|
|
45
45
|
# The Secret name (for database and AWS producers - producer name)
|
46
46
|
attr_accessor :name
|
47
47
|
|
48
|
+
# Path to SSH executable. e.g. /usr/bin/ssh
|
49
|
+
attr_accessor :ssh_command
|
50
|
+
|
48
51
|
# The Use to add offical SSH arguments (except -i)
|
49
52
|
attr_accessor :ssh_extra_args
|
50
53
|
|
@@ -76,6 +79,7 @@ module Akeyless
|
|
76
79
|
:'identity_file' => :'identity-file',
|
77
80
|
:'json' => :'json',
|
78
81
|
:'name' => :'name',
|
82
|
+
:'ssh_command' => :'ssh-command',
|
79
83
|
:'ssh_extra_args' => :'ssh-extra-args',
|
80
84
|
:'ssh_legacy_signing_alg' => :'ssh-legacy-signing-alg',
|
81
85
|
:'target' => :'target',
|
@@ -103,6 +107,7 @@ module Akeyless
|
|
103
107
|
:'identity_file' => :'String',
|
104
108
|
:'json' => :'Boolean',
|
105
109
|
:'name' => :'String',
|
110
|
+
:'ssh_command' => :'String',
|
106
111
|
:'ssh_extra_args' => :'String',
|
107
112
|
:'ssh_legacy_signing_alg' => :'Boolean',
|
108
113
|
:'target' => :'String',
|
@@ -177,6 +182,10 @@ module Akeyless
|
|
177
182
|
self.name = attributes[:'name']
|
178
183
|
end
|
179
184
|
|
185
|
+
if attributes.key?(:'ssh_command')
|
186
|
+
self.ssh_command = attributes[:'ssh_command']
|
187
|
+
end
|
188
|
+
|
180
189
|
if attributes.key?(:'ssh_extra_args')
|
181
190
|
self.ssh_extra_args = attributes[:'ssh_extra_args']
|
182
191
|
end
|
@@ -230,6 +239,7 @@ module Akeyless
|
|
230
239
|
identity_file == o.identity_file &&
|
231
240
|
json == o.json &&
|
232
241
|
name == o.name &&
|
242
|
+
ssh_command == o.ssh_command &&
|
233
243
|
ssh_extra_args == o.ssh_extra_args &&
|
234
244
|
ssh_legacy_signing_alg == o.ssh_legacy_signing_alg &&
|
235
245
|
target == o.target &&
|
@@ -247,7 +257,7 @@ module Akeyless
|
|
247
257
|
# Calculates hash code according to all attributes.
|
248
258
|
# @return [Integer] Hash code
|
249
259
|
def hash
|
250
|
-
[helper, rc_file_override, bastion_ctrl_path, bastion_ctrl_port, bastion_ctrl_proto, bastion_ctrl_subdomain, cert_issuer_name, identity_file, json, name, ssh_extra_args, ssh_legacy_signing_alg, target, token, uid_token, via_bastion].hash
|
260
|
+
[helper, rc_file_override, bastion_ctrl_path, bastion_ctrl_port, bastion_ctrl_proto, bastion_ctrl_subdomain, cert_issuer_name, identity_file, json, name, ssh_command, ssh_extra_args, ssh_legacy_signing_alg, target, token, uid_token, via_bastion].hash
|
251
261
|
end
|
252
262
|
|
253
263
|
# Builds the object from hash
|