akeyless 2.16.3 → 2.16.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +39 -1
- data/docs/AwsS3LogForwardingConfig.md +2 -0
- data/docs/CreateAuthMethod.md +1 -1
- data/docs/CreateAuthMethodAWSIAM.md +1 -1
- data/docs/CreateAuthMethodAzureAD.md +1 -1
- data/docs/CreateAuthMethodCert.md +1 -1
- data/docs/CreateAuthMethodGCP.md +1 -1
- data/docs/CreateAuthMethodHuawei.md +1 -1
- data/docs/CreateAuthMethodK8S.md +1 -1
- data/docs/CreateAuthMethodLDAP.md +1 -1
- data/docs/CreateAuthMethodOAuth2.md +1 -1
- data/docs/CreateAuthMethodOIDC.md +1 -1
- data/docs/CreateAuthMethodSAML.md +1 -1
- data/docs/CreateAuthMethodUniversalIdentity.md +1 -1
- data/docs/CreateClassicKey.md +12 -0
- data/docs/CreateRotatedSecret.md +28 -0
- data/docs/CreateSalesforceTarget.md +42 -0
- data/docs/CreateSalesforceTargetOutput.md +18 -0
- data/docs/CreateTokenizer.md +42 -0
- data/docs/CreateTokenizerOutput.md +18 -0
- data/docs/Detokenize.md +26 -0
- data/docs/DetokenizeOutput.md +18 -0
- data/docs/DynamicSecretProducerInfo.md +2 -0
- data/docs/EmailTokenizerInfo.md +22 -0
- data/docs/GatewayCreateMigration.md +50 -0
- data/docs/GatewayDeleteMigration.md +22 -0
- data/docs/GatewayGetMigration.md +22 -0
- data/docs/GatewayMigrationCreateOutput.md +18 -0
- data/docs/GatewayMigrationDeleteOutput.md +18 -0
- data/docs/GatewayMigrationGetOutput.md +18 -0
- data/docs/GatewayMigrationUpdateOutput.md +18 -0
- data/docs/GatewayUpdateMigration.md +52 -0
- data/docs/GetSecretValue.md +2 -0
- data/docs/HashiPayload.md +2 -0
- data/docs/Item.md +2 -0
- data/docs/ItemGeneralInfo.md +5 -1
- data/docs/ListTargets.md +2 -0
- data/docs/LogForwardingConfigPart.md +0 -2
- data/docs/Producer.md +2 -0
- data/docs/RegexpTokenizerInfo.md +24 -0
- data/docs/RotateSecret.md +22 -0
- data/docs/RotatedSecretOutput.md +18 -0
- data/docs/SystemAccessCredentialsReplyObj.md +2 -0
- data/docs/TargetTypeDetailsInput.md +12 -0
- data/docs/Tokenize.md +26 -0
- data/docs/TokenizeOutput.md +20 -0
- data/docs/TokenizerInfo.md +18 -0
- data/docs/UpdateAuthMethod.md +1 -1
- data/docs/UpdateAuthMethodAWSIAM.md +1 -1
- data/docs/UpdateAuthMethodAzureAD.md +1 -1
- data/docs/UpdateAuthMethodCert.md +1 -1
- data/docs/UpdateAuthMethodGCP.md +1 -1
- data/docs/UpdateAuthMethodK8S.md +1 -1
- data/docs/UpdateAuthMethodLDAP.md +1 -1
- data/docs/UpdateAuthMethodOAuth2.md +1 -1
- data/docs/UpdateAuthMethodOIDC.md +1 -1
- data/docs/UpdateAuthMethodSAML.md +1 -1
- data/docs/UpdateAuthMethodUniversalIdentity.md +1 -1
- data/docs/UpdateRotatedSecret.md +28 -0
- data/docs/UpdateSalesforceTarget.md +48 -0
- data/docs/UpdateSalesforceTargetOutput.md +18 -0
- data/docs/UpdateTokenizer.md +46 -0
- data/docs/UpdateTokenizerOutput.md +18 -0
- data/docs/V2Api.md +762 -6
- data/docs/VaultlessTokenizerInfo.md +28 -0
- data/lib/akeyless/api/v2_api.rb +769 -1
- data/lib/akeyless/models/aws_s3_log_forwarding_config.rb +10 -1
- data/lib/akeyless/models/create_auth_method.rb +0 -2
- data/lib/akeyless/models/create_auth_method_awsiam.rb +0 -2
- data/lib/akeyless/models/create_auth_method_azure_ad.rb +0 -2
- data/lib/akeyless/models/create_auth_method_cert.rb +0 -2
- data/lib/akeyless/models/create_auth_method_gcp.rb +0 -2
- data/lib/akeyless/models/create_auth_method_huawei.rb +0 -2
- data/lib/akeyless/models/create_auth_method_k8_s.rb +0 -2
- data/lib/akeyless/models/create_auth_method_ldap.rb +0 -2
- data/lib/akeyless/models/create_auth_method_o_auth2.rb +0 -2
- data/lib/akeyless/models/create_auth_method_oidc.rb +0 -2
- data/lib/akeyless/models/create_auth_method_saml.rb +0 -2
- data/lib/akeyless/models/create_auth_method_universal_identity.rb +0 -2
- data/lib/akeyless/models/create_classic_key.rb +61 -1
- data/lib/akeyless/models/create_rotated_secret.rb +153 -1
- data/lib/akeyless/models/create_salesforce_target.rb +375 -0
- data/lib/akeyless/models/create_salesforce_target_output.rb +219 -0
- data/lib/akeyless/models/create_tokenizer.rb +358 -0
- data/lib/akeyless/models/create_tokenizer_output.rb +219 -0
- data/lib/akeyless/models/detokenize.rb +271 -0
- data/lib/akeyless/models/detokenize_output.rb +219 -0
- data/lib/akeyless/models/dynamic_secret_producer_info.rb +10 -1
- data/lib/akeyless/models/email_tokenizer_info.rb +241 -0
- data/lib/akeyless/models/gateway_create_migration.rb +374 -0
- data/lib/akeyless/models/gateway_delete_migration.rb +246 -0
- data/lib/akeyless/models/gateway_get_migration.rb +240 -0
- data/lib/akeyless/models/gateway_migration_create_output.rb +219 -0
- data/lib/akeyless/models/gateway_migration_delete_output.rb +219 -0
- data/lib/akeyless/models/gateway_migration_get_output.rb +219 -0
- data/lib/akeyless/models/gateway_migration_update_output.rb +219 -0
- data/lib/akeyless/models/gateway_update_migration.rb +383 -0
- data/lib/akeyless/models/gateway_update_producer_hana_db.rb +1 -1
- data/lib/akeyless/models/get_secret_value.rb +10 -1
- data/lib/akeyless/models/hashi_payload.rb +10 -1
- data/lib/akeyless/models/item.rb +10 -1
- data/lib/akeyless/models/item_general_info.rb +22 -4
- data/lib/akeyless/models/list_targets.rb +13 -1
- data/lib/akeyless/models/log_forwarding_config_part.rb +1 -10
- data/lib/akeyless/models/producer.rb +10 -1
- data/lib/akeyless/models/regexp_tokenizer_info.rb +251 -0
- data/lib/akeyless/models/rotate_secret.rb +245 -0
- data/lib/akeyless/models/rotated_secret_output.rb +219 -0
- data/lib/akeyless/models/system_access_credentials_reply_obj.rb +11 -1
- data/lib/akeyless/models/target_type_details_input.rb +59 -1
- data/lib/akeyless/models/tokenize.rb +271 -0
- data/lib/akeyless/models/tokenize_output.rb +228 -0
- data/lib/akeyless/models/tokenizer_info.rb +219 -0
- data/lib/akeyless/models/update_auth_method.rb +0 -2
- data/lib/akeyless/models/update_auth_method_awsiam.rb +0 -2
- data/lib/akeyless/models/update_auth_method_azure_ad.rb +0 -2
- data/lib/akeyless/models/update_auth_method_cert.rb +0 -2
- data/lib/akeyless/models/update_auth_method_gcp.rb +0 -2
- data/lib/akeyless/models/update_auth_method_k8_s.rb +0 -2
- data/lib/akeyless/models/update_auth_method_ldap.rb +0 -2
- data/lib/akeyless/models/update_auth_method_o_auth2.rb +0 -2
- data/lib/akeyless/models/update_auth_method_oidc.rb +0 -2
- data/lib/akeyless/models/update_auth_method_saml.rb +0 -2
- data/lib/akeyless/models/update_auth_method_universal_identity.rb +0 -2
- data/lib/akeyless/models/update_rotated_secret.rb +153 -1
- data/lib/akeyless/models/update_salesforce_target.rb +404 -0
- data/lib/akeyless/models/update_salesforce_target_output.rb +219 -0
- data/lib/akeyless/models/update_tokenizer.rb +382 -0
- data/lib/akeyless/models/update_tokenizer_output.rb +219 -0
- data/lib/akeyless/models/vaultless_tokenizer_info.rb +267 -0
- data/lib/akeyless/version.rb +1 -1
- data/lib/akeyless.rb +26 -0
- data/spec/models/create_salesforce_target_output_spec.rb +34 -0
- data/spec/models/create_salesforce_target_spec.rb +106 -0
- data/spec/models/create_tokenizer_output_spec.rb +34 -0
- data/spec/models/create_tokenizer_spec.rb +106 -0
- data/spec/models/detokenize_output_spec.rb +34 -0
- data/spec/models/detokenize_spec.rb +58 -0
- data/spec/models/email_tokenizer_info_spec.rb +46 -0
- data/spec/models/gateway_create_migration_spec.rb +130 -0
- data/spec/models/gateway_delete_migration_spec.rb +46 -0
- data/spec/models/gateway_get_migration_spec.rb +46 -0
- data/spec/models/gateway_migration_create_output_spec.rb +34 -0
- data/spec/models/gateway_migration_delete_output_spec.rb +34 -0
- data/spec/models/gateway_migration_get_output_spec.rb +34 -0
- data/spec/models/gateway_migration_update_output_spec.rb +34 -0
- data/spec/models/gateway_update_migration_spec.rb +136 -0
- data/spec/models/regexp_tokenizer_info_spec.rb +52 -0
- data/spec/models/rotate_secret_spec.rb +46 -0
- data/spec/models/rotated_secret_output_spec.rb +34 -0
- data/spec/models/tokenize_output_spec.rb +40 -0
- data/spec/models/tokenize_spec.rb +58 -0
- data/spec/models/tokenizer_info_spec.rb +34 -0
- data/spec/models/update_salesforce_target_output_spec.rb +34 -0
- data/spec/models/update_salesforce_target_spec.rb +124 -0
- data/spec/models/update_tokenizer_output_spec.rb +34 -0
- data/spec/models/update_tokenizer_spec.rb +118 -0
- data/spec/models/vaultless_tokenizer_info_spec.rb +64 -0
- metadata +563 -459
@@ -0,0 +1,271 @@
|
|
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.0.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Akeyless
|
17
|
+
# tokenize is a command that encrypts text with a tokenizer
|
18
|
+
class Tokenize
|
19
|
+
# Data to be encrypted
|
20
|
+
attr_accessor :plaintext
|
21
|
+
|
22
|
+
# Authentication token (see `/auth` and `/configure`)
|
23
|
+
attr_accessor :token
|
24
|
+
|
25
|
+
# The name of the tokenizer to use in the encryption process
|
26
|
+
attr_accessor :tokenizer_name
|
27
|
+
|
28
|
+
# Base64 encoded tweak for vaultless encryption
|
29
|
+
attr_accessor :tweak
|
30
|
+
|
31
|
+
# The universal identity token, Required only for universal_identity authentication
|
32
|
+
attr_accessor :uid_token
|
33
|
+
|
34
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
35
|
+
def self.attribute_map
|
36
|
+
{
|
37
|
+
:'plaintext' => :'plaintext',
|
38
|
+
:'token' => :'token',
|
39
|
+
:'tokenizer_name' => :'tokenizer-name',
|
40
|
+
:'tweak' => :'tweak',
|
41
|
+
:'uid_token' => :'uid-token'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# Returns all the JSON keys this model knows about
|
46
|
+
def self.acceptable_attributes
|
47
|
+
attribute_map.values
|
48
|
+
end
|
49
|
+
|
50
|
+
# Attribute type mapping.
|
51
|
+
def self.openapi_types
|
52
|
+
{
|
53
|
+
:'plaintext' => :'String',
|
54
|
+
:'token' => :'String',
|
55
|
+
:'tokenizer_name' => :'String',
|
56
|
+
:'tweak' => :'String',
|
57
|
+
:'uid_token' => :'String'
|
58
|
+
}
|
59
|
+
end
|
60
|
+
|
61
|
+
# List of attributes with nullable: true
|
62
|
+
def self.openapi_nullable
|
63
|
+
Set.new([
|
64
|
+
])
|
65
|
+
end
|
66
|
+
|
67
|
+
# Initializes the object
|
68
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
69
|
+
def initialize(attributes = {})
|
70
|
+
if (!attributes.is_a?(Hash))
|
71
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::Tokenize` initialize method"
|
72
|
+
end
|
73
|
+
|
74
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
75
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
76
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
77
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::Tokenize`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
78
|
+
end
|
79
|
+
h[k.to_sym] = v
|
80
|
+
}
|
81
|
+
|
82
|
+
if attributes.key?(:'plaintext')
|
83
|
+
self.plaintext = attributes[:'plaintext']
|
84
|
+
end
|
85
|
+
|
86
|
+
if attributes.key?(:'token')
|
87
|
+
self.token = attributes[:'token']
|
88
|
+
end
|
89
|
+
|
90
|
+
if attributes.key?(:'tokenizer_name')
|
91
|
+
self.tokenizer_name = attributes[:'tokenizer_name']
|
92
|
+
end
|
93
|
+
|
94
|
+
if attributes.key?(:'tweak')
|
95
|
+
self.tweak = attributes[:'tweak']
|
96
|
+
end
|
97
|
+
|
98
|
+
if attributes.key?(:'uid_token')
|
99
|
+
self.uid_token = attributes[:'uid_token']
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
104
|
+
# @return Array for valid properties with the reasons
|
105
|
+
def list_invalid_properties
|
106
|
+
invalid_properties = Array.new
|
107
|
+
if @plaintext.nil?
|
108
|
+
invalid_properties.push('invalid value for "plaintext", plaintext cannot be nil.')
|
109
|
+
end
|
110
|
+
|
111
|
+
if @tokenizer_name.nil?
|
112
|
+
invalid_properties.push('invalid value for "tokenizer_name", tokenizer_name cannot be nil.')
|
113
|
+
end
|
114
|
+
|
115
|
+
invalid_properties
|
116
|
+
end
|
117
|
+
|
118
|
+
# Check to see if the all the properties in the model are valid
|
119
|
+
# @return true if the model is valid
|
120
|
+
def valid?
|
121
|
+
return false if @plaintext.nil?
|
122
|
+
return false if @tokenizer_name.nil?
|
123
|
+
true
|
124
|
+
end
|
125
|
+
|
126
|
+
# Checks equality by comparing each attribute.
|
127
|
+
# @param [Object] Object to be compared
|
128
|
+
def ==(o)
|
129
|
+
return true if self.equal?(o)
|
130
|
+
self.class == o.class &&
|
131
|
+
plaintext == o.plaintext &&
|
132
|
+
token == o.token &&
|
133
|
+
tokenizer_name == o.tokenizer_name &&
|
134
|
+
tweak == o.tweak &&
|
135
|
+
uid_token == o.uid_token
|
136
|
+
end
|
137
|
+
|
138
|
+
# @see the `==` method
|
139
|
+
# @param [Object] Object to be compared
|
140
|
+
def eql?(o)
|
141
|
+
self == o
|
142
|
+
end
|
143
|
+
|
144
|
+
# Calculates hash code according to all attributes.
|
145
|
+
# @return [Integer] Hash code
|
146
|
+
def hash
|
147
|
+
[plaintext, token, tokenizer_name, tweak, uid_token].hash
|
148
|
+
end
|
149
|
+
|
150
|
+
# Builds the object from hash
|
151
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
152
|
+
# @return [Object] Returns the model itself
|
153
|
+
def self.build_from_hash(attributes)
|
154
|
+
new.build_from_hash(attributes)
|
155
|
+
end
|
156
|
+
|
157
|
+
# Builds the object from hash
|
158
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
159
|
+
# @return [Object] Returns the model itself
|
160
|
+
def build_from_hash(attributes)
|
161
|
+
return nil unless attributes.is_a?(Hash)
|
162
|
+
attributes = attributes.transform_keys(&:to_sym)
|
163
|
+
self.class.openapi_types.each_pair do |key, type|
|
164
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
165
|
+
self.send("#{key}=", nil)
|
166
|
+
elsif type =~ /\AArray<(.*)>/i
|
167
|
+
# check to ensure the input is an array given that the attribute
|
168
|
+
# is documented as an array but the input is not
|
169
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
170
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
171
|
+
end
|
172
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
173
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
177
|
+
self
|
178
|
+
end
|
179
|
+
|
180
|
+
# Deserializes the data based on type
|
181
|
+
# @param string type Data type
|
182
|
+
# @param string value Value to be deserialized
|
183
|
+
# @return [Object] Deserialized data
|
184
|
+
def _deserialize(type, value)
|
185
|
+
case type.to_sym
|
186
|
+
when :Time
|
187
|
+
Time.parse(value)
|
188
|
+
when :Date
|
189
|
+
Date.parse(value)
|
190
|
+
when :String
|
191
|
+
value.to_s
|
192
|
+
when :Integer
|
193
|
+
value.to_i
|
194
|
+
when :Float
|
195
|
+
value.to_f
|
196
|
+
when :Boolean
|
197
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
198
|
+
true
|
199
|
+
else
|
200
|
+
false
|
201
|
+
end
|
202
|
+
when :Object
|
203
|
+
# generic object (usually a Hash), return directly
|
204
|
+
value
|
205
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
206
|
+
inner_type = Regexp.last_match[:inner_type]
|
207
|
+
value.map { |v| _deserialize(inner_type, v) }
|
208
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
209
|
+
k_type = Regexp.last_match[:k_type]
|
210
|
+
v_type = Regexp.last_match[:v_type]
|
211
|
+
{}.tap do |hash|
|
212
|
+
value.each do |k, v|
|
213
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
214
|
+
end
|
215
|
+
end
|
216
|
+
else # model
|
217
|
+
# models (e.g. Pet) or oneOf
|
218
|
+
klass = Akeyless.const_get(type)
|
219
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
220
|
+
end
|
221
|
+
end
|
222
|
+
|
223
|
+
# Returns the string representation of the object
|
224
|
+
# @return [String] String presentation of the object
|
225
|
+
def to_s
|
226
|
+
to_hash.to_s
|
227
|
+
end
|
228
|
+
|
229
|
+
# to_body is an alias to to_hash (backward compatibility)
|
230
|
+
# @return [Hash] Returns the object in the form of hash
|
231
|
+
def to_body
|
232
|
+
to_hash
|
233
|
+
end
|
234
|
+
|
235
|
+
# Returns the object in the form of hash
|
236
|
+
# @return [Hash] Returns the object in the form of hash
|
237
|
+
def to_hash
|
238
|
+
hash = {}
|
239
|
+
self.class.attribute_map.each_pair do |attr, param|
|
240
|
+
value = self.send(attr)
|
241
|
+
if value.nil?
|
242
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
243
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
244
|
+
end
|
245
|
+
|
246
|
+
hash[param] = _to_hash(value)
|
247
|
+
end
|
248
|
+
hash
|
249
|
+
end
|
250
|
+
|
251
|
+
# Outputs non-array value in the form of hash
|
252
|
+
# For object, use to_hash. Otherwise, just return the value
|
253
|
+
# @param [Object] value Any valid value
|
254
|
+
# @return [Hash] Returns the value in the form of hash
|
255
|
+
def _to_hash(value)
|
256
|
+
if value.is_a?(Array)
|
257
|
+
value.compact.map { |v| _to_hash(v) }
|
258
|
+
elsif value.is_a?(Hash)
|
259
|
+
{}.tap do |hash|
|
260
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
261
|
+
end
|
262
|
+
elsif value.respond_to? :to_hash
|
263
|
+
value.to_hash
|
264
|
+
else
|
265
|
+
value
|
266
|
+
end
|
267
|
+
end
|
268
|
+
|
269
|
+
end
|
270
|
+
|
271
|
+
end
|
@@ -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.0.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Akeyless
|
17
|
+
class TokenizeOutput
|
18
|
+
attr_accessor :result
|
19
|
+
|
20
|
+
attr_accessor :tweak
|
21
|
+
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
23
|
+
def self.attribute_map
|
24
|
+
{
|
25
|
+
:'result' => :'result',
|
26
|
+
:'tweak' => :'tweak'
|
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
|
+
:'result' => :'String',
|
39
|
+
:'tweak' => :'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::TokenizeOutput` 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::TokenizeOutput`. 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?(:'result')
|
65
|
+
self.result = attributes[:'result']
|
66
|
+
end
|
67
|
+
|
68
|
+
if attributes.key?(:'tweak')
|
69
|
+
self.tweak = attributes[:'tweak']
|
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
|
+
result == o.result &&
|
92
|
+
tweak == o.tweak
|
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
|
+
[result, tweak].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
|
@@ -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.0.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Akeyless
|
17
|
+
class TokenizerInfo
|
18
|
+
attr_accessor :vaultless_tokenizer_info
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'vaultless_tokenizer_info' => :'vaultless_tokenizer_info'
|
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
|
+
:'vaultless_tokenizer_info' => :'VaultlessTokenizerInfo'
|
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::TokenizerInfo` 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::TokenizerInfo`. 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?(:'vaultless_tokenizer_info')
|
61
|
+
self.vaultless_tokenizer_info = attributes[:'vaultless_tokenizer_info']
|
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
|
+
vaultless_tokenizer_info == o.vaultless_tokenizer_info
|
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
|
+
[vaultless_tokenizer_info].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
|