akeyless 2.17.0 → 2.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -4
- data/docs/AccountGeneralSettings.md +3 -1
- data/docs/CreateAuthMethodK8S.md +2 -2
- data/docs/CreateAuthMethodLDAP.md +3 -1
- data/docs/CreateAuthMethodLDAPOutput.md +3 -1
- data/docs/CreatePKICertIssuer.md +5 -5
- data/docs/CreateSSHCertIssuer.md +1 -1
- data/docs/GatewayCreateK8SAuthConfig.md +2 -2
- data/docs/GatewayRevokeTmpUsers.md +4 -2
- data/docs/GatewayUpdateK8SAuthConfig.md +2 -2
- data/docs/GatewayUpdateLdapAuthConfig.md +2 -2
- data/docs/Item.md +2 -0
- data/docs/KubernetesAccessRules.md +2 -0
- data/docs/LDAPAccessRules.md +2 -0
- data/docs/RuleAssigner.md +20 -0
- data/docs/UpdateAccountSettings.md +11 -1
- data/docs/UpdateAuthMethodK8S.md +2 -2
- data/docs/UpdateAuthMethodLDAP.md +3 -1
- data/docs/UpdateAuthMethodLDAPOutput.md +18 -0
- data/docs/V2Api.md +4 -67
- data/lib/akeyless/api/v2_api.rb +3 -67
- data/lib/akeyless/models/account_general_settings.rb +13 -4
- data/lib/akeyless/models/create_auth_method_k8_s.rb +2 -2
- data/lib/akeyless/models/create_auth_method_ldap.rb +14 -2
- data/lib/akeyless/models/create_auth_method_ldap_output.rb +13 -4
- data/lib/akeyless/models/create_pki_cert_issuer.rb +5 -5
- data/lib/akeyless/models/create_ssh_cert_issuer.rb +1 -1
- data/lib/akeyless/models/gateway_create_k8_s_auth_config.rb +2 -2
- data/lib/akeyless/models/gateway_revoke_tmp_users.rb +14 -2
- data/lib/akeyless/models/gateway_update_k8_s_auth_config.rb +2 -2
- data/lib/akeyless/models/gateway_update_ldap_auth_config.rb +2 -2
- data/lib/akeyless/models/item.rb +10 -1
- data/lib/akeyless/models/kubernetes_access_rules.rb +11 -1
- data/lib/akeyless/models/ldap_access_rules.rb +11 -1
- data/lib/akeyless/models/rule_assigner.rb +228 -0
- data/lib/akeyless/models/update_account_settings.rb +54 -4
- data/lib/akeyless/models/update_auth_method_k8_s.rb +2 -4
- data/lib/akeyless/models/update_auth_method_ldap.rb +12 -2
- data/lib/akeyless/models/update_auth_method_ldap_output.rb +219 -0
- data/lib/akeyless/version.rb +1 -1
- data/lib/akeyless.rb +2 -2
- data/spec/models/rule_assigner_spec.rb +40 -0
- data/spec/models/update_auth_method_ldap_output_spec.rb +34 -0
- metadata +512 -504
@@ -0,0 +1,228 @@
|
|
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.1.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Akeyless
|
17
|
+
class RuleAssigner
|
18
|
+
attr_accessor :access_id
|
19
|
+
|
20
|
+
attr_accessor :unique_id
|
21
|
+
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
23
|
+
def self.attribute_map
|
24
|
+
{
|
25
|
+
:'access_id' => :'access_id',
|
26
|
+
:'unique_id' => :'unique_id'
|
27
|
+
}
|
28
|
+
end
|
29
|
+
|
30
|
+
# Returns all the JSON keys this model knows about
|
31
|
+
def self.acceptable_attributes
|
32
|
+
attribute_map.values
|
33
|
+
end
|
34
|
+
|
35
|
+
# Attribute type mapping.
|
36
|
+
def self.openapi_types
|
37
|
+
{
|
38
|
+
:'access_id' => :'String',
|
39
|
+
:'unique_id' => :'String'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# List of attributes with nullable: true
|
44
|
+
def self.openapi_nullable
|
45
|
+
Set.new([
|
46
|
+
])
|
47
|
+
end
|
48
|
+
|
49
|
+
# Initializes the object
|
50
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
51
|
+
def initialize(attributes = {})
|
52
|
+
if (!attributes.is_a?(Hash))
|
53
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::RuleAssigner` initialize method"
|
54
|
+
end
|
55
|
+
|
56
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
57
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
58
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
59
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::RuleAssigner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
60
|
+
end
|
61
|
+
h[k.to_sym] = v
|
62
|
+
}
|
63
|
+
|
64
|
+
if attributes.key?(:'access_id')
|
65
|
+
self.access_id = attributes[:'access_id']
|
66
|
+
end
|
67
|
+
|
68
|
+
if attributes.key?(:'unique_id')
|
69
|
+
self.unique_id = attributes[:'unique_id']
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
74
|
+
# @return Array for valid properties with the reasons
|
75
|
+
def list_invalid_properties
|
76
|
+
invalid_properties = Array.new
|
77
|
+
invalid_properties
|
78
|
+
end
|
79
|
+
|
80
|
+
# Check to see if the all the properties in the model are valid
|
81
|
+
# @return true if the model is valid
|
82
|
+
def valid?
|
83
|
+
true
|
84
|
+
end
|
85
|
+
|
86
|
+
# Checks equality by comparing each attribute.
|
87
|
+
# @param [Object] Object to be compared
|
88
|
+
def ==(o)
|
89
|
+
return true if self.equal?(o)
|
90
|
+
self.class == o.class &&
|
91
|
+
access_id == o.access_id &&
|
92
|
+
unique_id == o.unique_id
|
93
|
+
end
|
94
|
+
|
95
|
+
# @see the `==` method
|
96
|
+
# @param [Object] Object to be compared
|
97
|
+
def eql?(o)
|
98
|
+
self == o
|
99
|
+
end
|
100
|
+
|
101
|
+
# Calculates hash code according to all attributes.
|
102
|
+
# @return [Integer] Hash code
|
103
|
+
def hash
|
104
|
+
[access_id, unique_id].hash
|
105
|
+
end
|
106
|
+
|
107
|
+
# Builds the object from hash
|
108
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
109
|
+
# @return [Object] Returns the model itself
|
110
|
+
def self.build_from_hash(attributes)
|
111
|
+
new.build_from_hash(attributes)
|
112
|
+
end
|
113
|
+
|
114
|
+
# Builds the object from hash
|
115
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
116
|
+
# @return [Object] Returns the model itself
|
117
|
+
def build_from_hash(attributes)
|
118
|
+
return nil unless attributes.is_a?(Hash)
|
119
|
+
attributes = attributes.transform_keys(&:to_sym)
|
120
|
+
self.class.openapi_types.each_pair do |key, type|
|
121
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
122
|
+
self.send("#{key}=", nil)
|
123
|
+
elsif type =~ /\AArray<(.*)>/i
|
124
|
+
# check to ensure the input is an array given that the attribute
|
125
|
+
# is documented as an array but the input is not
|
126
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
127
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
128
|
+
end
|
129
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
130
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
self
|
135
|
+
end
|
136
|
+
|
137
|
+
# Deserializes the data based on type
|
138
|
+
# @param string type Data type
|
139
|
+
# @param string value Value to be deserialized
|
140
|
+
# @return [Object] Deserialized data
|
141
|
+
def _deserialize(type, value)
|
142
|
+
case type.to_sym
|
143
|
+
when :Time
|
144
|
+
Time.parse(value)
|
145
|
+
when :Date
|
146
|
+
Date.parse(value)
|
147
|
+
when :String
|
148
|
+
value.to_s
|
149
|
+
when :Integer
|
150
|
+
value.to_i
|
151
|
+
when :Float
|
152
|
+
value.to_f
|
153
|
+
when :Boolean
|
154
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
155
|
+
true
|
156
|
+
else
|
157
|
+
false
|
158
|
+
end
|
159
|
+
when :Object
|
160
|
+
# generic object (usually a Hash), return directly
|
161
|
+
value
|
162
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
163
|
+
inner_type = Regexp.last_match[:inner_type]
|
164
|
+
value.map { |v| _deserialize(inner_type, v) }
|
165
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
166
|
+
k_type = Regexp.last_match[:k_type]
|
167
|
+
v_type = Regexp.last_match[:v_type]
|
168
|
+
{}.tap do |hash|
|
169
|
+
value.each do |k, v|
|
170
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
171
|
+
end
|
172
|
+
end
|
173
|
+
else # model
|
174
|
+
# models (e.g. Pet) or oneOf
|
175
|
+
klass = Akeyless.const_get(type)
|
176
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
# Returns the string representation of the object
|
181
|
+
# @return [String] String presentation of the object
|
182
|
+
def to_s
|
183
|
+
to_hash.to_s
|
184
|
+
end
|
185
|
+
|
186
|
+
# to_body is an alias to to_hash (backward compatibility)
|
187
|
+
# @return [Hash] Returns the object in the form of hash
|
188
|
+
def to_body
|
189
|
+
to_hash
|
190
|
+
end
|
191
|
+
|
192
|
+
# Returns the object in the form of hash
|
193
|
+
# @return [Hash] Returns the object in the form of hash
|
194
|
+
def to_hash
|
195
|
+
hash = {}
|
196
|
+
self.class.attribute_map.each_pair do |attr, param|
|
197
|
+
value = self.send(attr)
|
198
|
+
if value.nil?
|
199
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
200
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
201
|
+
end
|
202
|
+
|
203
|
+
hash[param] = _to_hash(value)
|
204
|
+
end
|
205
|
+
hash
|
206
|
+
end
|
207
|
+
|
208
|
+
# Outputs non-array value in the form of hash
|
209
|
+
# For object, use to_hash. Otherwise, just return the value
|
210
|
+
# @param [Object] value Any valid value
|
211
|
+
# @return [Hash] Returns the value in the form of hash
|
212
|
+
def _to_hash(value)
|
213
|
+
if value.is_a?(Array)
|
214
|
+
value.compact.map { |v| _to_hash(v) }
|
215
|
+
elsif value.is_a?(Hash)
|
216
|
+
{}.tap do |hash|
|
217
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
218
|
+
end
|
219
|
+
elsif value.respond_to? :to_hash
|
220
|
+
value.to_hash
|
221
|
+
else
|
222
|
+
value
|
223
|
+
end
|
224
|
+
end
|
225
|
+
|
226
|
+
end
|
227
|
+
|
228
|
+
end
|
@@ -48,6 +48,9 @@ module Akeyless
|
|
48
48
|
# Max versions
|
49
49
|
attr_accessor :max_versions
|
50
50
|
|
51
|
+
# For PasswordPolicy use
|
52
|
+
attr_accessor :password_length
|
53
|
+
|
51
54
|
# Phone number
|
52
55
|
attr_accessor :phone
|
53
56
|
|
@@ -60,6 +63,18 @@ module Akeyless
|
|
60
63
|
# The universal identity token, Required only for universal_identity authentication
|
61
64
|
attr_accessor :uid_token
|
62
65
|
|
66
|
+
# For PasswordPolicy use
|
67
|
+
attr_accessor :use_lower_letters
|
68
|
+
|
69
|
+
# For PasswordPolicy use
|
70
|
+
attr_accessor :use_numbers
|
71
|
+
|
72
|
+
# For PasswordPolicy use
|
73
|
+
attr_accessor :use_special_characters
|
74
|
+
|
75
|
+
# For PasswordPolicy use
|
76
|
+
attr_accessor :use_capital_letters
|
77
|
+
|
63
78
|
# Attribute mapping from ruby-style variable name to JSON key.
|
64
79
|
def self.attribute_map
|
65
80
|
{
|
@@ -74,10 +89,15 @@ module Akeyless
|
|
74
89
|
:'jwt_ttl_max' => :'jwt-ttl-max',
|
75
90
|
:'jwt_ttl_min' => :'jwt-ttl-min',
|
76
91
|
:'max_versions' => :'max-versions',
|
92
|
+
:'password_length' => :'password-length',
|
77
93
|
:'phone' => :'phone',
|
78
94
|
:'postal_code' => :'postal-code',
|
79
95
|
:'token' => :'token',
|
80
|
-
:'uid_token' => :'uid-token'
|
96
|
+
:'uid_token' => :'uid-token',
|
97
|
+
:'use_lower_letters' => :'use-lower-letters',
|
98
|
+
:'use_numbers' => :'use-numbers',
|
99
|
+
:'use_special_characters' => :'use-special-characters',
|
100
|
+
:'use_capital_letters' => :'use_capital-letters'
|
81
101
|
}
|
82
102
|
end
|
83
103
|
|
@@ -100,10 +120,15 @@ module Akeyless
|
|
100
120
|
:'jwt_ttl_max' => :'Integer',
|
101
121
|
:'jwt_ttl_min' => :'Integer',
|
102
122
|
:'max_versions' => :'String',
|
123
|
+
:'password_length' => :'Integer',
|
103
124
|
:'phone' => :'String',
|
104
125
|
:'postal_code' => :'String',
|
105
126
|
:'token' => :'String',
|
106
|
-
:'uid_token' => :'String'
|
127
|
+
:'uid_token' => :'String',
|
128
|
+
:'use_lower_letters' => :'String',
|
129
|
+
:'use_numbers' => :'String',
|
130
|
+
:'use_special_characters' => :'String',
|
131
|
+
:'use_capital_letters' => :'String'
|
107
132
|
}
|
108
133
|
end
|
109
134
|
|
@@ -172,6 +197,10 @@ module Akeyless
|
|
172
197
|
self.max_versions = attributes[:'max_versions']
|
173
198
|
end
|
174
199
|
|
200
|
+
if attributes.key?(:'password_length')
|
201
|
+
self.password_length = attributes[:'password_length']
|
202
|
+
end
|
203
|
+
|
175
204
|
if attributes.key?(:'phone')
|
176
205
|
self.phone = attributes[:'phone']
|
177
206
|
end
|
@@ -187,6 +216,22 @@ module Akeyless
|
|
187
216
|
if attributes.key?(:'uid_token')
|
188
217
|
self.uid_token = attributes[:'uid_token']
|
189
218
|
end
|
219
|
+
|
220
|
+
if attributes.key?(:'use_lower_letters')
|
221
|
+
self.use_lower_letters = attributes[:'use_lower_letters']
|
222
|
+
end
|
223
|
+
|
224
|
+
if attributes.key?(:'use_numbers')
|
225
|
+
self.use_numbers = attributes[:'use_numbers']
|
226
|
+
end
|
227
|
+
|
228
|
+
if attributes.key?(:'use_special_characters')
|
229
|
+
self.use_special_characters = attributes[:'use_special_characters']
|
230
|
+
end
|
231
|
+
|
232
|
+
if attributes.key?(:'use_capital_letters')
|
233
|
+
self.use_capital_letters = attributes[:'use_capital_letters']
|
234
|
+
end
|
190
235
|
end
|
191
236
|
|
192
237
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -218,10 +263,15 @@ module Akeyless
|
|
218
263
|
jwt_ttl_max == o.jwt_ttl_max &&
|
219
264
|
jwt_ttl_min == o.jwt_ttl_min &&
|
220
265
|
max_versions == o.max_versions &&
|
266
|
+
password_length == o.password_length &&
|
221
267
|
phone == o.phone &&
|
222
268
|
postal_code == o.postal_code &&
|
223
269
|
token == o.token &&
|
224
|
-
uid_token == o.uid_token
|
270
|
+
uid_token == o.uid_token &&
|
271
|
+
use_lower_letters == o.use_lower_letters &&
|
272
|
+
use_numbers == o.use_numbers &&
|
273
|
+
use_special_characters == o.use_special_characters &&
|
274
|
+
use_capital_letters == o.use_capital_letters
|
225
275
|
end
|
226
276
|
|
227
277
|
# @see the `==` method
|
@@ -233,7 +283,7 @@ module Akeyless
|
|
233
283
|
# Calculates hash code according to all attributes.
|
234
284
|
# @return [Integer] Hash code
|
235
285
|
def hash
|
236
|
-
[address, city, company_name, country, default_versioning, dp_enable_classic_key_protection, item_type, jwt_ttl_default, jwt_ttl_max, jwt_ttl_min, max_versions, phone, postal_code, token, uid_token].hash
|
286
|
+
[address, city, company_name, country, default_versioning, dp_enable_classic_key_protection, item_type, jwt_ttl_default, jwt_ttl_max, jwt_ttl_min, max_versions, password_length, phone, postal_code, token, uid_token, use_lower_letters, use_numbers, use_special_characters, use_capital_letters].hash
|
237
287
|
end
|
238
288
|
|
239
289
|
# Builds the object from hash
|
@@ -37,7 +37,7 @@ module Akeyless
|
|
37
37
|
# if true: enforce role-association must include sub claims
|
38
38
|
attr_accessor :force_sub_claims
|
39
39
|
|
40
|
-
#
|
40
|
+
# Automatically generate key-pair for K8S configuration. If set to false, a public key needs to be provided
|
41
41
|
attr_accessor :gen_key
|
42
42
|
|
43
43
|
# A CIDR whitelist with the GW IPs that the access is restricted to
|
@@ -52,7 +52,7 @@ module Akeyless
|
|
52
52
|
# Auth Method new name
|
53
53
|
attr_accessor :new_name
|
54
54
|
|
55
|
-
# Base64-encoded public key
|
55
|
+
# Base64-encoded or PEM formatted public key data for K8S authentication method is required [RSA2048]
|
56
56
|
attr_accessor :public_key
|
57
57
|
|
58
58
|
# Authentication token (see `/auth` and `/configure`)
|
@@ -169,8 +169,6 @@ module Akeyless
|
|
169
169
|
|
170
170
|
if attributes.key?(:'gen_key')
|
171
171
|
self.gen_key = attributes[:'gen_key']
|
172
|
-
else
|
173
|
-
self.gen_key = 'true'
|
174
172
|
end
|
175
173
|
|
176
174
|
if attributes.key?(:'gw_bound_ips')
|
@@ -25,6 +25,9 @@ module Akeyless
|
|
25
25
|
# if true: enforce role-association must include sub claims
|
26
26
|
attr_accessor :force_sub_claims
|
27
27
|
|
28
|
+
# Automatically generate key-pair for LDAP configuration. If set to false, a public key needs to be provided
|
29
|
+
attr_accessor :gen_key
|
30
|
+
|
28
31
|
# A CIDR whitelist with the GW IPs that the access is restricted to
|
29
32
|
attr_accessor :gw_bound_ips
|
30
33
|
|
@@ -37,7 +40,7 @@ module Akeyless
|
|
37
40
|
# Auth Method new name
|
38
41
|
attr_accessor :new_name
|
39
42
|
|
40
|
-
# A public key generated for LDAP authentication method on Akeyless in base64 format [RSA2048]
|
43
|
+
# A public key generated for LDAP authentication method on Akeyless in base64 or PEM format [RSA2048]
|
41
44
|
attr_accessor :public_key_data
|
42
45
|
|
43
46
|
# Authentication token (see `/auth` and `/configure`)
|
@@ -55,6 +58,7 @@ module Akeyless
|
|
55
58
|
:'access_expires' => :'access-expires',
|
56
59
|
:'bound_ips' => :'bound-ips',
|
57
60
|
:'force_sub_claims' => :'force-sub-claims',
|
61
|
+
:'gen_key' => :'gen-key',
|
58
62
|
:'gw_bound_ips' => :'gw-bound-ips',
|
59
63
|
:'jwt_ttl' => :'jwt-ttl',
|
60
64
|
:'name' => :'name',
|
@@ -77,6 +81,7 @@ module Akeyless
|
|
77
81
|
:'access_expires' => :'Integer',
|
78
82
|
:'bound_ips' => :'Array<String>',
|
79
83
|
:'force_sub_claims' => :'Boolean',
|
84
|
+
:'gen_key' => :'String',
|
80
85
|
:'gw_bound_ips' => :'Array<String>',
|
81
86
|
:'jwt_ttl' => :'Integer',
|
82
87
|
:'name' => :'String',
|
@@ -125,6 +130,10 @@ module Akeyless
|
|
125
130
|
self.force_sub_claims = attributes[:'force_sub_claims']
|
126
131
|
end
|
127
132
|
|
133
|
+
if attributes.key?(:'gen_key')
|
134
|
+
self.gen_key = attributes[:'gen_key']
|
135
|
+
end
|
136
|
+
|
128
137
|
if attributes.key?(:'gw_bound_ips')
|
129
138
|
if (value = attributes[:'gw_bound_ips']).is_a?(Array)
|
130
139
|
self.gw_bound_ips = value
|
@@ -186,6 +195,7 @@ module Akeyless
|
|
186
195
|
access_expires == o.access_expires &&
|
187
196
|
bound_ips == o.bound_ips &&
|
188
197
|
force_sub_claims == o.force_sub_claims &&
|
198
|
+
gen_key == o.gen_key &&
|
189
199
|
gw_bound_ips == o.gw_bound_ips &&
|
190
200
|
jwt_ttl == o.jwt_ttl &&
|
191
201
|
name == o.name &&
|
@@ -205,7 +215,7 @@ module Akeyless
|
|
205
215
|
# Calculates hash code according to all attributes.
|
206
216
|
# @return [Integer] Hash code
|
207
217
|
def hash
|
208
|
-
[access_expires, bound_ips, force_sub_claims, gw_bound_ips, jwt_ttl, name, new_name, public_key_data, token, uid_token, unique_identifier].hash
|
218
|
+
[access_expires, bound_ips, force_sub_claims, gen_key, gw_bound_ips, jwt_ttl, name, new_name, public_key_data, token, uid_token, unique_identifier].hash
|
209
219
|
end
|
210
220
|
|
211
221
|
# Builds the object from hash
|
@@ -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.1.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Akeyless
|
17
|
+
class UpdateAuthMethodLDAPOutput
|
18
|
+
attr_accessor :prv_key
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'prv_key' => :'prv_key'
|
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
|
+
:'prv_key' => :'String'
|
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::UpdateAuthMethodLDAPOutput` 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::UpdateAuthMethodLDAPOutput`. 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?(:'prv_key')
|
61
|
+
self.prv_key = attributes[:'prv_key']
|
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
|
+
prv_key == o.prv_key
|
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
|
+
[prv_key].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/version.rb
CHANGED
data/lib/akeyless.rb
CHANGED
@@ -171,8 +171,6 @@ require 'akeyless/models/encrypt'
|
|
171
171
|
require 'akeyless/models/encrypt_file'
|
172
172
|
require 'akeyless/models/encrypt_file_output'
|
173
173
|
require 'akeyless/models/encrypt_output'
|
174
|
-
require 'akeyless/models/encrypt_pkcs1'
|
175
|
-
require 'akeyless/models/encrypt_pkcs1_output'
|
176
174
|
require 'akeyless/models/encrypt_with_classic_key'
|
177
175
|
require 'akeyless/models/encrypt_with_classic_key_output'
|
178
176
|
require 'akeyless/models/external_kms_key_id'
|
@@ -436,6 +434,7 @@ require 'akeyless/models/rotated_secret_details_info'
|
|
436
434
|
require 'akeyless/models/rotated_secret_output'
|
437
435
|
require 'akeyless/models/rotator'
|
438
436
|
require 'akeyless/models/rotators_config_part'
|
437
|
+
require 'akeyless/models/rule_assigner'
|
439
438
|
require 'akeyless/models/rules'
|
440
439
|
require 'akeyless/models/saml_access_rules'
|
441
440
|
require 'akeyless/models/saml_attribute'
|
@@ -495,6 +494,7 @@ require 'akeyless/models/update_auth_method_gcp'
|
|
495
494
|
require 'akeyless/models/update_auth_method_k8_s'
|
496
495
|
require 'akeyless/models/update_auth_method_k8_s_output'
|
497
496
|
require 'akeyless/models/update_auth_method_ldap'
|
497
|
+
require 'akeyless/models/update_auth_method_ldap_output'
|
498
498
|
require 'akeyless/models/update_auth_method_o_auth2'
|
499
499
|
require 'akeyless/models/update_auth_method_oidc'
|
500
500
|
require 'akeyless/models/update_auth_method_output'
|