akeyless 5.0.7 → 5.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +4 -1
- data/docs/Auth.md +4 -0
- data/docs/AuthOutput.md +2 -0
- data/docs/CreateRole.md +2 -0
- data/docs/GatewayCreateAllowedAccess.md +1 -1
- data/docs/GatewayUpdateAllowedAccess.md +1 -1
- data/docs/GeminiTargetDetails.md +2 -2
- data/docs/GetCertChallenge.md +22 -0
- data/docs/GetCertChallengeOutput.md +18 -0
- data/docs/OpenAITargetDetails.md +2 -2
- data/docs/PathRule.md +2 -0
- data/docs/ReverseRBACClient.md +2 -0
- data/docs/RoleAuthMethodAssociation.md +2 -0
- data/docs/SharingItemFullInfo.md +2 -0
- data/docs/TargetItemAssociation.md +2 -0
- data/docs/UpdateRole.md +2 -0
- data/docs/V2Api.md +63 -0
- data/lib/akeyless/api/v2_api.rb +64 -0
- data/lib/akeyless/models/auth.rb +21 -1
- data/lib/akeyless/models/auth_output.rb +10 -1
- data/lib/akeyless/models/create_role.rb +11 -1
- data/lib/akeyless/models/gateway_create_allowed_access.rb +1 -1
- data/lib/akeyless/models/gateway_update_allowed_access.rb +1 -1
- data/lib/akeyless/models/gemini_target_details.rb +7 -7
- data/lib/akeyless/models/get_cert_challenge.rb +238 -0
- data/lib/akeyless/models/get_cert_challenge_output.rb +214 -0
- data/lib/akeyless/models/open_ai_target_details.rb +10 -10
- data/lib/akeyless/models/path_rule.rb +11 -1
- data/lib/akeyless/models/reverse_rbac_client.rb +10 -1
- data/lib/akeyless/models/role_auth_method_association.rb +10 -1
- data/lib/akeyless/models/sharing_item_full_info.rb +11 -1
- data/lib/akeyless/models/target_item_association.rb +10 -1
- data/lib/akeyless/models/update_role.rb +11 -1
- data/lib/akeyless/version.rb +1 -1
- data/lib/akeyless.rb +2 -0
- data/spec/models/get_cert_challenge_output_spec.rb +36 -0
- data/spec/models/get_cert_challenge_spec.rb +48 -0
- metadata +9 -1
@@ -33,7 +33,7 @@ module Akeyless
|
|
33
33
|
# Allowed access name
|
34
34
|
attr_accessor :name
|
35
35
|
|
36
|
-
# Permissions Comma-seperated list of permissions for this allowed access. Available permissions: [defaults,targets,classic_keys,automatic_migration,ldap_auth,dynamic_secret,k8s_auth,log_forwarding,zero_knowledge_encryption,rotated_secret,caching,event_forwarding,admin,kmip,general]
|
36
|
+
# Permissions Comma-seperated list of permissions for this allowed access. Available permissions: [defaults,targets,classic_keys,automatic_migration,ldap_auth,dynamic_secret,k8s_auth,log_forwarding,zero_knowledge_encryption,rotated_secret,caching,event_forwarding,admin,kmip,general,rotate_secret_value]
|
37
37
|
attr_accessor :permissions
|
38
38
|
|
39
39
|
# Sub claims key/val of sub claims, e.g group=admins,developers
|
@@ -36,7 +36,7 @@ module Akeyless
|
|
36
36
|
# New allowed access name
|
37
37
|
attr_accessor :new_name
|
38
38
|
|
39
|
-
# Permissions Comma-seperated list of permissions for this allowed access. Available permissions: [defaults,targets,classic_keys,automatic_migration,ldap_auth,dynamic_secret,k8s_auth,log_forwarding,zero_knowledge_encryption,rotated_secret,caching,event_forwarding,admin,kmip,general]
|
39
|
+
# Permissions Comma-seperated list of permissions for this allowed access. Available permissions: [defaults,targets,classic_keys,automatic_migration,ldap_auth,dynamic_secret,k8s_auth,log_forwarding,zero_knowledge_encryption,rotated_secret,caching,event_forwarding,admin,kmip,general,rotate_secret_value]
|
40
40
|
attr_accessor :permissions
|
41
41
|
|
42
42
|
# Sub claims key/val of sub claims, e.g group=admins,developers
|
@@ -18,7 +18,7 @@ module Akeyless
|
|
18
18
|
class GeminiTargetDetails
|
19
19
|
attr_accessor :api_key
|
20
20
|
|
21
|
-
attr_accessor :
|
21
|
+
attr_accessor :gemini_url
|
22
22
|
|
23
23
|
attr_accessor :model
|
24
24
|
|
@@ -26,7 +26,7 @@ module Akeyless
|
|
26
26
|
def self.attribute_map
|
27
27
|
{
|
28
28
|
:'api_key' => :'api_key',
|
29
|
-
:'
|
29
|
+
:'gemini_url' => :'gemini_url',
|
30
30
|
:'model' => :'model'
|
31
31
|
}
|
32
32
|
end
|
@@ -40,7 +40,7 @@ module Akeyless
|
|
40
40
|
def self.openapi_types
|
41
41
|
{
|
42
42
|
:'api_key' => :'String',
|
43
|
-
:'
|
43
|
+
:'gemini_url' => :'String',
|
44
44
|
:'model' => :'String'
|
45
45
|
}
|
46
46
|
end
|
@@ -70,8 +70,8 @@ module Akeyless
|
|
70
70
|
self.api_key = attributes[:'api_key']
|
71
71
|
end
|
72
72
|
|
73
|
-
if attributes.key?(:'
|
74
|
-
self.
|
73
|
+
if attributes.key?(:'gemini_url')
|
74
|
+
self.gemini_url = attributes[:'gemini_url']
|
75
75
|
end
|
76
76
|
|
77
77
|
if attributes.key?(:'model')
|
@@ -100,7 +100,7 @@ module Akeyless
|
|
100
100
|
return true if self.equal?(o)
|
101
101
|
self.class == o.class &&
|
102
102
|
api_key == o.api_key &&
|
103
|
-
|
103
|
+
gemini_url == o.gemini_url &&
|
104
104
|
model == o.model
|
105
105
|
end
|
106
106
|
|
@@ -113,7 +113,7 @@ module Akeyless
|
|
113
113
|
# Calculates hash code according to all attributes.
|
114
114
|
# @return [Integer] Hash code
|
115
115
|
def hash
|
116
|
-
[api_key,
|
116
|
+
[api_key, gemini_url, model].hash
|
117
117
|
end
|
118
118
|
|
119
119
|
# Builds the object from hash
|
@@ -0,0 +1,238 @@
|
|
1
|
+
=begin
|
2
|
+
#Akeyless API
|
3
|
+
|
4
|
+
#The purpose of this application is to provide access to Akeyless API.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 3.0
|
7
|
+
Contact: support@akeyless.io
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.10.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Akeyless
|
17
|
+
# GetCertChallenge is a command that gets a challenge for certificate authentication
|
18
|
+
class GetCertChallenge
|
19
|
+
# Access ID
|
20
|
+
attr_accessor :access_id
|
21
|
+
|
22
|
+
# Certificate data encoded in base64. Used if file was not provided.
|
23
|
+
attr_accessor :cert_data
|
24
|
+
|
25
|
+
# Set output format to JSON
|
26
|
+
attr_accessor :json
|
27
|
+
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
29
|
+
def self.attribute_map
|
30
|
+
{
|
31
|
+
:'access_id' => :'access-id',
|
32
|
+
:'cert_data' => :'cert-data',
|
33
|
+
:'json' => :'json'
|
34
|
+
}
|
35
|
+
end
|
36
|
+
|
37
|
+
# Returns all the JSON keys this model knows about
|
38
|
+
def self.acceptable_attributes
|
39
|
+
attribute_map.values
|
40
|
+
end
|
41
|
+
|
42
|
+
# Attribute type mapping.
|
43
|
+
def self.openapi_types
|
44
|
+
{
|
45
|
+
:'access_id' => :'String',
|
46
|
+
:'cert_data' => :'String',
|
47
|
+
:'json' => :'Boolean'
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
# List of attributes with nullable: true
|
52
|
+
def self.openapi_nullable
|
53
|
+
Set.new([
|
54
|
+
])
|
55
|
+
end
|
56
|
+
|
57
|
+
# Initializes the object
|
58
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
59
|
+
def initialize(attributes = {})
|
60
|
+
if (!attributes.is_a?(Hash))
|
61
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::GetCertChallenge` initialize method"
|
62
|
+
end
|
63
|
+
|
64
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
66
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::GetCertChallenge`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
68
|
+
end
|
69
|
+
h[k.to_sym] = v
|
70
|
+
}
|
71
|
+
|
72
|
+
if attributes.key?(:'access_id')
|
73
|
+
self.access_id = attributes[:'access_id']
|
74
|
+
end
|
75
|
+
|
76
|
+
if attributes.key?(:'cert_data')
|
77
|
+
self.cert_data = attributes[:'cert_data']
|
78
|
+
end
|
79
|
+
|
80
|
+
if attributes.key?(:'json')
|
81
|
+
self.json = attributes[:'json']
|
82
|
+
else
|
83
|
+
self.json = false
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
88
|
+
# @return Array for valid properties with the reasons
|
89
|
+
def list_invalid_properties
|
90
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
91
|
+
invalid_properties = Array.new
|
92
|
+
invalid_properties
|
93
|
+
end
|
94
|
+
|
95
|
+
# Check to see if the all the properties in the model are valid
|
96
|
+
# @return true if the model is valid
|
97
|
+
def valid?
|
98
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
99
|
+
true
|
100
|
+
end
|
101
|
+
|
102
|
+
# Checks equality by comparing each attribute.
|
103
|
+
# @param [Object] Object to be compared
|
104
|
+
def ==(o)
|
105
|
+
return true if self.equal?(o)
|
106
|
+
self.class == o.class &&
|
107
|
+
access_id == o.access_id &&
|
108
|
+
cert_data == o.cert_data &&
|
109
|
+
json == o.json
|
110
|
+
end
|
111
|
+
|
112
|
+
# @see the `==` method
|
113
|
+
# @param [Object] Object to be compared
|
114
|
+
def eql?(o)
|
115
|
+
self == o
|
116
|
+
end
|
117
|
+
|
118
|
+
# Calculates hash code according to all attributes.
|
119
|
+
# @return [Integer] Hash code
|
120
|
+
def hash
|
121
|
+
[access_id, cert_data, json].hash
|
122
|
+
end
|
123
|
+
|
124
|
+
# Builds the object from hash
|
125
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
126
|
+
# @return [Object] Returns the model itself
|
127
|
+
def self.build_from_hash(attributes)
|
128
|
+
return nil unless attributes.is_a?(Hash)
|
129
|
+
attributes = attributes.transform_keys(&:to_sym)
|
130
|
+
transformed_hash = {}
|
131
|
+
openapi_types.each_pair do |key, type|
|
132
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
133
|
+
transformed_hash["#{key}"] = nil
|
134
|
+
elsif type =~ /\AArray<(.*)>/i
|
135
|
+
# check to ensure the input is an array given that the attribute
|
136
|
+
# is documented as an array but the input is not
|
137
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
138
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
139
|
+
end
|
140
|
+
elsif !attributes[attribute_map[key]].nil?
|
141
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
142
|
+
end
|
143
|
+
end
|
144
|
+
new(transformed_hash)
|
145
|
+
end
|
146
|
+
|
147
|
+
# Deserializes the data based on type
|
148
|
+
# @param string type Data type
|
149
|
+
# @param string value Value to be deserialized
|
150
|
+
# @return [Object] Deserialized data
|
151
|
+
def self._deserialize(type, value)
|
152
|
+
case type.to_sym
|
153
|
+
when :Time
|
154
|
+
Time.parse(value)
|
155
|
+
when :Date
|
156
|
+
Date.parse(value)
|
157
|
+
when :String
|
158
|
+
value.to_s
|
159
|
+
when :Integer
|
160
|
+
value.to_i
|
161
|
+
when :Float
|
162
|
+
value.to_f
|
163
|
+
when :Boolean
|
164
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
165
|
+
true
|
166
|
+
else
|
167
|
+
false
|
168
|
+
end
|
169
|
+
when :Object
|
170
|
+
# generic object (usually a Hash), return directly
|
171
|
+
value
|
172
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
173
|
+
inner_type = Regexp.last_match[:inner_type]
|
174
|
+
value.map { |v| _deserialize(inner_type, v) }
|
175
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
176
|
+
k_type = Regexp.last_match[:k_type]
|
177
|
+
v_type = Regexp.last_match[:v_type]
|
178
|
+
{}.tap do |hash|
|
179
|
+
value.each do |k, v|
|
180
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
181
|
+
end
|
182
|
+
end
|
183
|
+
else # model
|
184
|
+
# models (e.g. Pet) or oneOf
|
185
|
+
klass = Akeyless.const_get(type)
|
186
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
190
|
+
# Returns the string representation of the object
|
191
|
+
# @return [String] String presentation of the object
|
192
|
+
def to_s
|
193
|
+
to_hash.to_s
|
194
|
+
end
|
195
|
+
|
196
|
+
# to_body is an alias to to_hash (backward compatibility)
|
197
|
+
# @return [Hash] Returns the object in the form of hash
|
198
|
+
def to_body
|
199
|
+
to_hash
|
200
|
+
end
|
201
|
+
|
202
|
+
# Returns the object in the form of hash
|
203
|
+
# @return [Hash] Returns the object in the form of hash
|
204
|
+
def to_hash
|
205
|
+
hash = {}
|
206
|
+
self.class.attribute_map.each_pair do |attr, param|
|
207
|
+
value = self.send(attr)
|
208
|
+
if value.nil?
|
209
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
210
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
211
|
+
end
|
212
|
+
|
213
|
+
hash[param] = _to_hash(value)
|
214
|
+
end
|
215
|
+
hash
|
216
|
+
end
|
217
|
+
|
218
|
+
# Outputs non-array value in the form of hash
|
219
|
+
# For object, use to_hash. Otherwise, just return the value
|
220
|
+
# @param [Object] value Any valid value
|
221
|
+
# @return [Hash] Returns the value in the form of hash
|
222
|
+
def _to_hash(value)
|
223
|
+
if value.is_a?(Array)
|
224
|
+
value.compact.map { |v| _to_hash(v) }
|
225
|
+
elsif value.is_a?(Hash)
|
226
|
+
{}.tap do |hash|
|
227
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
228
|
+
end
|
229
|
+
elsif value.respond_to? :to_hash
|
230
|
+
value.to_hash
|
231
|
+
else
|
232
|
+
value
|
233
|
+
end
|
234
|
+
end
|
235
|
+
|
236
|
+
end
|
237
|
+
|
238
|
+
end
|
@@ -0,0 +1,214 @@
|
|
1
|
+
=begin
|
2
|
+
#Akeyless API
|
3
|
+
|
4
|
+
#The purpose of this application is to provide access to Akeyless API.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 3.0
|
7
|
+
Contact: support@akeyless.io
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.10.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Akeyless
|
17
|
+
class GetCertChallengeOutput
|
18
|
+
attr_accessor :challenge
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'challenge' => :'challenge'
|
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
|
+
:'challenge' => :'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::GetCertChallengeOutput` 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::GetCertChallengeOutput`. 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?(:'challenge')
|
61
|
+
self.challenge = attributes[:'challenge']
|
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
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
69
|
+
invalid_properties = Array.new
|
70
|
+
invalid_properties
|
71
|
+
end
|
72
|
+
|
73
|
+
# Check to see if the all the properties in the model are valid
|
74
|
+
# @return true if the model is valid
|
75
|
+
def valid?
|
76
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
77
|
+
true
|
78
|
+
end
|
79
|
+
|
80
|
+
# Checks equality by comparing each attribute.
|
81
|
+
# @param [Object] Object to be compared
|
82
|
+
def ==(o)
|
83
|
+
return true if self.equal?(o)
|
84
|
+
self.class == o.class &&
|
85
|
+
challenge == o.challenge
|
86
|
+
end
|
87
|
+
|
88
|
+
# @see the `==` method
|
89
|
+
# @param [Object] Object to be compared
|
90
|
+
def eql?(o)
|
91
|
+
self == o
|
92
|
+
end
|
93
|
+
|
94
|
+
# Calculates hash code according to all attributes.
|
95
|
+
# @return [Integer] Hash code
|
96
|
+
def hash
|
97
|
+
[challenge].hash
|
98
|
+
end
|
99
|
+
|
100
|
+
# Builds the object from hash
|
101
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
102
|
+
# @return [Object] Returns the model itself
|
103
|
+
def self.build_from_hash(attributes)
|
104
|
+
return nil unless attributes.is_a?(Hash)
|
105
|
+
attributes = attributes.transform_keys(&:to_sym)
|
106
|
+
transformed_hash = {}
|
107
|
+
openapi_types.each_pair do |key, type|
|
108
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
109
|
+
transformed_hash["#{key}"] = nil
|
110
|
+
elsif type =~ /\AArray<(.*)>/i
|
111
|
+
# check to ensure the input is an array given that the attribute
|
112
|
+
# is documented as an array but the input is not
|
113
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
114
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
115
|
+
end
|
116
|
+
elsif !attributes[attribute_map[key]].nil?
|
117
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
118
|
+
end
|
119
|
+
end
|
120
|
+
new(transformed_hash)
|
121
|
+
end
|
122
|
+
|
123
|
+
# Deserializes the data based on type
|
124
|
+
# @param string type Data type
|
125
|
+
# @param string value Value to be deserialized
|
126
|
+
# @return [Object] Deserialized data
|
127
|
+
def self._deserialize(type, value)
|
128
|
+
case type.to_sym
|
129
|
+
when :Time
|
130
|
+
Time.parse(value)
|
131
|
+
when :Date
|
132
|
+
Date.parse(value)
|
133
|
+
when :String
|
134
|
+
value.to_s
|
135
|
+
when :Integer
|
136
|
+
value.to_i
|
137
|
+
when :Float
|
138
|
+
value.to_f
|
139
|
+
when :Boolean
|
140
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
141
|
+
true
|
142
|
+
else
|
143
|
+
false
|
144
|
+
end
|
145
|
+
when :Object
|
146
|
+
# generic object (usually a Hash), return directly
|
147
|
+
value
|
148
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
149
|
+
inner_type = Regexp.last_match[:inner_type]
|
150
|
+
value.map { |v| _deserialize(inner_type, v) }
|
151
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
152
|
+
k_type = Regexp.last_match[:k_type]
|
153
|
+
v_type = Regexp.last_match[:v_type]
|
154
|
+
{}.tap do |hash|
|
155
|
+
value.each do |k, v|
|
156
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
157
|
+
end
|
158
|
+
end
|
159
|
+
else # model
|
160
|
+
# models (e.g. Pet) or oneOf
|
161
|
+
klass = Akeyless.const_get(type)
|
162
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
# Returns the string representation of the object
|
167
|
+
# @return [String] String presentation of the object
|
168
|
+
def to_s
|
169
|
+
to_hash.to_s
|
170
|
+
end
|
171
|
+
|
172
|
+
# to_body is an alias to to_hash (backward compatibility)
|
173
|
+
# @return [Hash] Returns the object in the form of hash
|
174
|
+
def to_body
|
175
|
+
to_hash
|
176
|
+
end
|
177
|
+
|
178
|
+
# Returns the object in the form of hash
|
179
|
+
# @return [Hash] Returns the object in the form of hash
|
180
|
+
def to_hash
|
181
|
+
hash = {}
|
182
|
+
self.class.attribute_map.each_pair do |attr, param|
|
183
|
+
value = self.send(attr)
|
184
|
+
if value.nil?
|
185
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
186
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
187
|
+
end
|
188
|
+
|
189
|
+
hash[param] = _to_hash(value)
|
190
|
+
end
|
191
|
+
hash
|
192
|
+
end
|
193
|
+
|
194
|
+
# Outputs non-array value in the form of hash
|
195
|
+
# For object, use to_hash. Otherwise, just return the value
|
196
|
+
# @param [Object] value Any valid value
|
197
|
+
# @return [Hash] Returns the value in the form of hash
|
198
|
+
def _to_hash(value)
|
199
|
+
if value.is_a?(Array)
|
200
|
+
value.compact.map { |v| _to_hash(v) }
|
201
|
+
elsif value.is_a?(Hash)
|
202
|
+
{}.tap do |hash|
|
203
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
204
|
+
end
|
205
|
+
elsif value.respond_to? :to_hash
|
206
|
+
value.to_hash
|
207
|
+
else
|
208
|
+
value
|
209
|
+
end
|
210
|
+
end
|
211
|
+
|
212
|
+
end
|
213
|
+
|
214
|
+
end
|
@@ -20,10 +20,10 @@ module Akeyless
|
|
20
20
|
|
21
21
|
attr_accessor :api_key_id
|
22
22
|
|
23
|
-
attr_accessor :base_url
|
24
|
-
|
25
23
|
attr_accessor :model
|
26
24
|
|
25
|
+
attr_accessor :openai_url
|
26
|
+
|
27
27
|
attr_accessor :organization_id
|
28
28
|
|
29
29
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -31,8 +31,8 @@ module Akeyless
|
|
31
31
|
{
|
32
32
|
:'api_key' => :'api_key',
|
33
33
|
:'api_key_id' => :'api_key_id',
|
34
|
-
:'base_url' => :'base_url',
|
35
34
|
:'model' => :'model',
|
35
|
+
:'openai_url' => :'openai_url',
|
36
36
|
:'organization_id' => :'organization_id'
|
37
37
|
}
|
38
38
|
end
|
@@ -47,8 +47,8 @@ module Akeyless
|
|
47
47
|
{
|
48
48
|
:'api_key' => :'String',
|
49
49
|
:'api_key_id' => :'String',
|
50
|
-
:'base_url' => :'String',
|
51
50
|
:'model' => :'String',
|
51
|
+
:'openai_url' => :'String',
|
52
52
|
:'organization_id' => :'String'
|
53
53
|
}
|
54
54
|
end
|
@@ -82,14 +82,14 @@ module Akeyless
|
|
82
82
|
self.api_key_id = attributes[:'api_key_id']
|
83
83
|
end
|
84
84
|
|
85
|
-
if attributes.key?(:'base_url')
|
86
|
-
self.base_url = attributes[:'base_url']
|
87
|
-
end
|
88
|
-
|
89
85
|
if attributes.key?(:'model')
|
90
86
|
self.model = attributes[:'model']
|
91
87
|
end
|
92
88
|
|
89
|
+
if attributes.key?(:'openai_url')
|
90
|
+
self.openai_url = attributes[:'openai_url']
|
91
|
+
end
|
92
|
+
|
93
93
|
if attributes.key?(:'organization_id')
|
94
94
|
self.organization_id = attributes[:'organization_id']
|
95
95
|
end
|
@@ -117,8 +117,8 @@ module Akeyless
|
|
117
117
|
self.class == o.class &&
|
118
118
|
api_key == o.api_key &&
|
119
119
|
api_key_id == o.api_key_id &&
|
120
|
-
base_url == o.base_url &&
|
121
120
|
model == o.model &&
|
121
|
+
openai_url == o.openai_url &&
|
122
122
|
organization_id == o.organization_id
|
123
123
|
end
|
124
124
|
|
@@ -131,7 +131,7 @@ module Akeyless
|
|
131
131
|
# Calculates hash code according to all attributes.
|
132
132
|
# @return [Integer] Hash code
|
133
133
|
def hash
|
134
|
-
[api_key, api_key_id,
|
134
|
+
[api_key, api_key_id, model, openai_url, organization_id].hash
|
135
135
|
end
|
136
136
|
|
137
137
|
# Builds the object from hash
|
@@ -25,6 +25,9 @@ module Akeyless
|
|
25
25
|
# flag that indicate that this rule is allowed to be access RemainingAccess of times.
|
26
26
|
attr_accessor :is_limit_access
|
27
27
|
|
28
|
+
# The item id this rule directly refers to (when applicable)
|
29
|
+
attr_accessor :item_id
|
30
|
+
|
28
31
|
attr_accessor :number_of_access_used
|
29
32
|
|
30
33
|
attr_accessor :number_of_allowed_access
|
@@ -45,6 +48,7 @@ module Akeyless
|
|
45
48
|
:'capabilities' => :'capabilities',
|
46
49
|
:'cb' => :'cb',
|
47
50
|
:'is_limit_access' => :'is_limit_access',
|
51
|
+
:'item_id' => :'item_id',
|
48
52
|
:'number_of_access_used' => :'number_of_access_used',
|
49
53
|
:'number_of_allowed_access' => :'number_of_allowed_access',
|
50
54
|
:'path' => :'path',
|
@@ -66,6 +70,7 @@ module Akeyless
|
|
66
70
|
:'capabilities' => :'Array<String>',
|
67
71
|
:'cb' => :'Integer',
|
68
72
|
:'is_limit_access' => :'Boolean',
|
73
|
+
:'item_id' => :'Integer',
|
69
74
|
:'number_of_access_used' => :'Integer',
|
70
75
|
:'number_of_allowed_access' => :'Integer',
|
71
76
|
:'path' => :'String',
|
@@ -116,6 +121,10 @@ module Akeyless
|
|
116
121
|
self.is_limit_access = attributes[:'is_limit_access']
|
117
122
|
end
|
118
123
|
|
124
|
+
if attributes.key?(:'item_id')
|
125
|
+
self.item_id = attributes[:'item_id']
|
126
|
+
end
|
127
|
+
|
119
128
|
if attributes.key?(:'number_of_access_used')
|
120
129
|
self.number_of_access_used = attributes[:'number_of_access_used']
|
121
130
|
end
|
@@ -165,6 +174,7 @@ module Akeyless
|
|
165
174
|
capabilities == o.capabilities &&
|
166
175
|
cb == o.cb &&
|
167
176
|
is_limit_access == o.is_limit_access &&
|
177
|
+
item_id == o.item_id &&
|
168
178
|
number_of_access_used == o.number_of_access_used &&
|
169
179
|
number_of_allowed_access == o.number_of_allowed_access &&
|
170
180
|
path == o.path &&
|
@@ -182,7 +192,7 @@ module Akeyless
|
|
182
192
|
# Calculates hash code according to all attributes.
|
183
193
|
# @return [Integer] Hash code
|
184
194
|
def hash
|
185
|
-
[assigners, capabilities, cb, is_limit_access, number_of_access_used, number_of_allowed_access, path, start_time, ttl, type].hash
|
195
|
+
[assigners, capabilities, cb, is_limit_access, item_id, number_of_access_used, number_of_allowed_access, path, start_time, ttl, type].hash
|
186
196
|
end
|
187
197
|
|
188
198
|
# Builds the object from hash
|
@@ -17,12 +17,15 @@ module Akeyless
|
|
17
17
|
class ReverseRBACClient
|
18
18
|
attr_accessor :assocs
|
19
19
|
|
20
|
+
attr_accessor :auth_method_id
|
21
|
+
|
20
22
|
attr_accessor :auth_method_name
|
21
23
|
|
22
24
|
# Attribute mapping from ruby-style variable name to JSON key.
|
23
25
|
def self.attribute_map
|
24
26
|
{
|
25
27
|
:'assocs' => :'assocs',
|
28
|
+
:'auth_method_id' => :'auth_method_id',
|
26
29
|
:'auth_method_name' => :'auth_method_name'
|
27
30
|
}
|
28
31
|
end
|
@@ -36,6 +39,7 @@ module Akeyless
|
|
36
39
|
def self.openapi_types
|
37
40
|
{
|
38
41
|
:'assocs' => :'Array<AuthMethodRoleAssociation>',
|
42
|
+
:'auth_method_id' => :'Integer',
|
39
43
|
:'auth_method_name' => :'String'
|
40
44
|
}
|
41
45
|
end
|
@@ -67,6 +71,10 @@ module Akeyless
|
|
67
71
|
end
|
68
72
|
end
|
69
73
|
|
74
|
+
if attributes.key?(:'auth_method_id')
|
75
|
+
self.auth_method_id = attributes[:'auth_method_id']
|
76
|
+
end
|
77
|
+
|
70
78
|
if attributes.key?(:'auth_method_name')
|
71
79
|
self.auth_method_name = attributes[:'auth_method_name']
|
72
80
|
end
|
@@ -93,6 +101,7 @@ module Akeyless
|
|
93
101
|
return true if self.equal?(o)
|
94
102
|
self.class == o.class &&
|
95
103
|
assocs == o.assocs &&
|
104
|
+
auth_method_id == o.auth_method_id &&
|
96
105
|
auth_method_name == o.auth_method_name
|
97
106
|
end
|
98
107
|
|
@@ -105,7 +114,7 @@ module Akeyless
|
|
105
114
|
# Calculates hash code according to all attributes.
|
106
115
|
# @return [Integer] Hash code
|
107
116
|
def hash
|
108
|
-
[assocs, auth_method_name].hash
|
117
|
+
[assocs, auth_method_id, auth_method_name].hash
|
109
118
|
end
|
110
119
|
|
111
120
|
# Builds the object from hash
|