akeyless 2.16.11 → 2.18.0
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 +9 -8
- data/docs/AccountGeneralSettings.md +20 -0
- data/docs/CreateArtifactoryTarget.md +1 -1
- data/docs/CreateAuthMethodK8S.md +2 -2
- data/docs/CreateAuthMethodLDAP.md +3 -1
- data/docs/CreateAuthMethodLDAPOutput.md +3 -1
- data/docs/CreateKeyOutput.md +5 -1
- data/docs/CreateLdapTarget.md +2 -0
- data/docs/CreatePKICertIssuer.md +5 -5
- data/docs/CreateSSHCertIssuer.md +1 -1
- data/docs/CreateSalesforceTarget.md +7 -3
- data/docs/CreateSecret.md +11 -19
- data/docs/DSProducerDetails.md +2 -0
- data/docs/DataProtectionSection.md +18 -0
- data/docs/Decrypt.md +3 -1
- data/docs/DecryptFile.md +6 -0
- data/docs/DecryptPKCS1.md +5 -1
- data/docs/DeleteItem.md +2 -2
- data/docs/DescribeItem.md +4 -0
- data/docs/DescribeSubClaims.md +20 -0
- data/docs/DescribeSubClaimsOutput.md +18 -0
- data/docs/Encrypt.md +3 -1
- data/docs/EncryptFile.md +4 -0
- data/docs/EncryptPKCS1.md +5 -1
- data/docs/GatewayCreateK8SAuthConfig.md +10 -4
- data/docs/GatewayCreateProducerDockerhub.md +1 -1
- data/docs/GatewayGetK8SAuthConfigOutput.md +7 -1
- data/docs/GatewayRevokeTmpUsers.md +4 -2
- data/docs/GatewayUpdateK8SAuthConfig.md +10 -4
- data/docs/GatewayUpdateLdapAuthConfig.md +2 -2
- data/docs/GatewayUpdateProducerDockerhub.md +1 -1
- data/docs/GetAccountSettingsCommandOutput.md +2 -0
- data/docs/GetSecretValue.md +2 -2
- data/docs/Item.md +2 -0
- data/docs/K8SAuth.md +7 -1
- data/docs/KubernetesAccessRules.md +2 -0
- data/docs/LDAPAccessRules.md +2 -0
- data/docs/ListItems.md +2 -2
- data/docs/LogForwardingConfigPart.md +2 -0
- data/docs/RuleAssigner.md +20 -0
- data/docs/SignPKCS1.md +5 -1
- data/docs/TargetTypeDetailsInput.md +5 -1
- data/docs/UpdateAccountSettings.md +13 -1
- data/docs/UpdateAuthMethodK8S.md +2 -2
- data/docs/UpdateAuthMethodLDAP.md +3 -1
- data/docs/UpdateAuthMethodLDAPOutput.md +18 -0
- data/docs/UpdateItem.md +2 -2
- data/docs/UpdateLdapTarget.md +2 -0
- data/docs/UpdateSalesforceTarget.md +7 -3
- data/docs/UpdateSecretVal.md +11 -9
- data/docs/V2Api.md +46 -109
- data/docs/VerifyPKCS1.md +4 -0
- data/lib/akeyless/api/v2_api.rb +43 -107
- data/lib/akeyless/models/account_general_settings.rb +229 -0
- data/lib/akeyless/models/create_artifactory_target.rb +1 -1
- 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_key_output.rb +22 -4
- data/lib/akeyless/models/create_ldap_target.rb +13 -1
- data/lib/akeyless/models/create_pki_cert_issuer.rb +5 -5
- data/lib/akeyless/models/create_salesforce_target.rb +29 -19
- data/lib/akeyless/models/create_secret.rb +50 -90
- data/lib/akeyless/models/create_ssh_cert_issuer.rb +1 -1
- data/lib/akeyless/models/data_protection_section.rb +220 -0
- data/lib/akeyless/models/decrypt.rb +16 -1
- data/lib/akeyless/models/decrypt_file.rb +36 -1
- data/lib/akeyless/models/decrypt_pkcs1.rb +22 -2
- data/lib/akeyless/models/delete_item.rb +11 -11
- data/lib/akeyless/models/describe_item.rb +21 -1
- data/lib/akeyless/models/describe_sub_claims.rb +231 -0
- data/lib/akeyless/models/describe_sub_claims_output.rb +221 -0
- data/lib/akeyless/models/ds_producer_details.rb +10 -1
- data/lib/akeyless/models/encrypt.rb +16 -1
- data/lib/akeyless/models/encrypt_file.rb +21 -1
- data/lib/akeyless/models/encrypt_pkcs1.rb +22 -2
- data/lib/akeyless/models/gateway_create_k8_s_auth_config.rb +38 -4
- data/lib/akeyless/models/gateway_create_producer_dockerhub.rb +1 -1
- data/lib/akeyless/models/gateway_get_k8_s_auth_config_output.rb +32 -2
- data/lib/akeyless/models/gateway_revoke_tmp_users.rb +14 -2
- data/lib/akeyless/models/gateway_update_k8_s_auth_config.rb +38 -4
- data/lib/akeyless/models/gateway_update_ldap_auth_config.rb +2 -2
- data/lib/akeyless/models/gateway_update_producer_dockerhub.rb +1 -1
- data/lib/akeyless/models/get_account_settings_command_output.rb +10 -1
- data/lib/akeyless/models/get_secret_value.rb +7 -7
- data/lib/akeyless/models/item.rb +10 -1
- data/lib/akeyless/models/k8_s_auth.rb +32 -2
- data/lib/akeyless/models/kubernetes_access_rules.rb +11 -1
- data/lib/akeyless/models/ldap_access_rules.rb +11 -1
- data/lib/akeyless/models/list_items.rb +11 -11
- data/lib/akeyless/models/log_forwarding_config_part.rb +10 -1
- data/lib/akeyless/models/rule_assigner.rb +228 -0
- data/lib/akeyless/models/sign_pkcs1.rb +21 -6
- data/lib/akeyless/models/target_type_details_input.rb +23 -1
- data/lib/akeyless/models/update_account_settings.rb +64 -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/models/update_item.rb +11 -11
- data/lib/akeyless/models/update_ldap_target.rb +11 -1
- data/lib/akeyless/models/update_salesforce_target.rb +29 -19
- data/lib/akeyless/models/update_secret_val.rb +52 -42
- data/lib/akeyless/models/verify_pkcs1.rb +21 -1
- data/lib/akeyless/version.rb +1 -1
- data/lib/akeyless.rb +6 -4
- data/spec/models/account_general_settings_spec.rb +34 -0
- data/spec/models/data_protection_section_spec.rb +34 -0
- data/spec/models/describe_sub_claims_output_spec.rb +34 -0
- data/spec/models/describe_sub_claims_spec.rb +40 -0
- data/spec/models/rule_assigner_spec.rb +40 -0
- data/spec/models/update_auth_method_ldap_output_spec.rb +34 -0
- metadata +525 -501
|
@@ -0,0 +1,231 @@
|
|
|
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
|
+
# describe-sub-claims Get the sub-claims associated with the provided token or authentication profile
|
|
18
|
+
class DescribeSubClaims
|
|
19
|
+
# Authentication token (see `/auth` and `/configure`)
|
|
20
|
+
attr_accessor :token
|
|
21
|
+
|
|
22
|
+
# The universal identity token, Required only for universal_identity authentication
|
|
23
|
+
attr_accessor :uid_token
|
|
24
|
+
|
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
|
+
def self.attribute_map
|
|
27
|
+
{
|
|
28
|
+
:'token' => :'token',
|
|
29
|
+
:'uid_token' => :'uid-token'
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns all the JSON keys this model knows about
|
|
34
|
+
def self.acceptable_attributes
|
|
35
|
+
attribute_map.values
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Attribute type mapping.
|
|
39
|
+
def self.openapi_types
|
|
40
|
+
{
|
|
41
|
+
:'token' => :'String',
|
|
42
|
+
:'uid_token' => :'String'
|
|
43
|
+
}
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# List of attributes with nullable: true
|
|
47
|
+
def self.openapi_nullable
|
|
48
|
+
Set.new([
|
|
49
|
+
])
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Initializes the object
|
|
53
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
54
|
+
def initialize(attributes = {})
|
|
55
|
+
if (!attributes.is_a?(Hash))
|
|
56
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::DescribeSubClaims` initialize method"
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
61
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::DescribeSubClaims`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
63
|
+
end
|
|
64
|
+
h[k.to_sym] = v
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if attributes.key?(:'token')
|
|
68
|
+
self.token = attributes[:'token']
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
if attributes.key?(:'uid_token')
|
|
72
|
+
self.uid_token = attributes[:'uid_token']
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
77
|
+
# @return Array for valid properties with the reasons
|
|
78
|
+
def list_invalid_properties
|
|
79
|
+
invalid_properties = Array.new
|
|
80
|
+
invalid_properties
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Check to see if the all the properties in the model are valid
|
|
84
|
+
# @return true if the model is valid
|
|
85
|
+
def valid?
|
|
86
|
+
true
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Checks equality by comparing each attribute.
|
|
90
|
+
# @param [Object] Object to be compared
|
|
91
|
+
def ==(o)
|
|
92
|
+
return true if self.equal?(o)
|
|
93
|
+
self.class == o.class &&
|
|
94
|
+
token == o.token &&
|
|
95
|
+
uid_token == o.uid_token
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# @see the `==` method
|
|
99
|
+
# @param [Object] Object to be compared
|
|
100
|
+
def eql?(o)
|
|
101
|
+
self == o
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Calculates hash code according to all attributes.
|
|
105
|
+
# @return [Integer] Hash code
|
|
106
|
+
def hash
|
|
107
|
+
[token, uid_token].hash
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Builds the object from hash
|
|
111
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
112
|
+
# @return [Object] Returns the model itself
|
|
113
|
+
def self.build_from_hash(attributes)
|
|
114
|
+
new.build_from_hash(attributes)
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Builds the object from hash
|
|
118
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
119
|
+
# @return [Object] Returns the model itself
|
|
120
|
+
def build_from_hash(attributes)
|
|
121
|
+
return nil unless attributes.is_a?(Hash)
|
|
122
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
123
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
124
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
125
|
+
self.send("#{key}=", nil)
|
|
126
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
127
|
+
# check to ensure the input is an array given that the attribute
|
|
128
|
+
# is documented as an array but the input is not
|
|
129
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
130
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
131
|
+
end
|
|
132
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
133
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
self
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Deserializes the data based on type
|
|
141
|
+
# @param string type Data type
|
|
142
|
+
# @param string value Value to be deserialized
|
|
143
|
+
# @return [Object] Deserialized data
|
|
144
|
+
def _deserialize(type, value)
|
|
145
|
+
case type.to_sym
|
|
146
|
+
when :Time
|
|
147
|
+
Time.parse(value)
|
|
148
|
+
when :Date
|
|
149
|
+
Date.parse(value)
|
|
150
|
+
when :String
|
|
151
|
+
value.to_s
|
|
152
|
+
when :Integer
|
|
153
|
+
value.to_i
|
|
154
|
+
when :Float
|
|
155
|
+
value.to_f
|
|
156
|
+
when :Boolean
|
|
157
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
158
|
+
true
|
|
159
|
+
else
|
|
160
|
+
false
|
|
161
|
+
end
|
|
162
|
+
when :Object
|
|
163
|
+
# generic object (usually a Hash), return directly
|
|
164
|
+
value
|
|
165
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
166
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
167
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
168
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
169
|
+
k_type = Regexp.last_match[:k_type]
|
|
170
|
+
v_type = Regexp.last_match[:v_type]
|
|
171
|
+
{}.tap do |hash|
|
|
172
|
+
value.each do |k, v|
|
|
173
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
174
|
+
end
|
|
175
|
+
end
|
|
176
|
+
else # model
|
|
177
|
+
# models (e.g. Pet) or oneOf
|
|
178
|
+
klass = Akeyless.const_get(type)
|
|
179
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Returns the string representation of the object
|
|
184
|
+
# @return [String] String presentation of the object
|
|
185
|
+
def to_s
|
|
186
|
+
to_hash.to_s
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
190
|
+
# @return [Hash] Returns the object in the form of hash
|
|
191
|
+
def to_body
|
|
192
|
+
to_hash
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# Returns the object in the form of hash
|
|
196
|
+
# @return [Hash] Returns the object in the form of hash
|
|
197
|
+
def to_hash
|
|
198
|
+
hash = {}
|
|
199
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
200
|
+
value = self.send(attr)
|
|
201
|
+
if value.nil?
|
|
202
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
203
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
hash[param] = _to_hash(value)
|
|
207
|
+
end
|
|
208
|
+
hash
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# Outputs non-array value in the form of hash
|
|
212
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
213
|
+
# @param [Object] value Any valid value
|
|
214
|
+
# @return [Hash] Returns the value in the form of hash
|
|
215
|
+
def _to_hash(value)
|
|
216
|
+
if value.is_a?(Array)
|
|
217
|
+
value.compact.map { |v| _to_hash(v) }
|
|
218
|
+
elsif value.is_a?(Hash)
|
|
219
|
+
{}.tap do |hash|
|
|
220
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
221
|
+
end
|
|
222
|
+
elsif value.respond_to? :to_hash
|
|
223
|
+
value.to_hash
|
|
224
|
+
else
|
|
225
|
+
value
|
|
226
|
+
end
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
end
|
|
@@ -0,0 +1,221 @@
|
|
|
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 DescribeSubClaimsOutput
|
|
18
|
+
attr_accessor :sub_claims
|
|
19
|
+
|
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
+
def self.attribute_map
|
|
22
|
+
{
|
|
23
|
+
:'sub_claims' => :'sub_claims'
|
|
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
|
+
:'sub_claims' => :'Hash<String, Array<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::DescribeSubClaimsOutput` 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::DescribeSubClaimsOutput`. 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?(:'sub_claims')
|
|
61
|
+
if (value = attributes[:'sub_claims']).is_a?(Hash)
|
|
62
|
+
self.sub_claims = value
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
68
|
+
# @return Array for valid properties with the reasons
|
|
69
|
+
def list_invalid_properties
|
|
70
|
+
invalid_properties = Array.new
|
|
71
|
+
invalid_properties
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Check to see if the all the properties in the model are valid
|
|
75
|
+
# @return true if the model is valid
|
|
76
|
+
def valid?
|
|
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
|
+
sub_claims == o.sub_claims
|
|
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
|
+
[sub_claims].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
|
+
new.build_from_hash(attributes)
|
|
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 build_from_hash(attributes)
|
|
111
|
+
return nil unless attributes.is_a?(Hash)
|
|
112
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
113
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
114
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
115
|
+
self.send("#{key}=", nil)
|
|
116
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
117
|
+
# check to ensure the input is an array given that the attribute
|
|
118
|
+
# is documented as an array but the input is not
|
|
119
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
120
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
121
|
+
end
|
|
122
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
123
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
self
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Deserializes the data based on type
|
|
131
|
+
# @param string type Data type
|
|
132
|
+
# @param string value Value to be deserialized
|
|
133
|
+
# @return [Object] Deserialized data
|
|
134
|
+
def _deserialize(type, value)
|
|
135
|
+
case type.to_sym
|
|
136
|
+
when :Time
|
|
137
|
+
Time.parse(value)
|
|
138
|
+
when :Date
|
|
139
|
+
Date.parse(value)
|
|
140
|
+
when :String
|
|
141
|
+
value.to_s
|
|
142
|
+
when :Integer
|
|
143
|
+
value.to_i
|
|
144
|
+
when :Float
|
|
145
|
+
value.to_f
|
|
146
|
+
when :Boolean
|
|
147
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
148
|
+
true
|
|
149
|
+
else
|
|
150
|
+
false
|
|
151
|
+
end
|
|
152
|
+
when :Object
|
|
153
|
+
# generic object (usually a Hash), return directly
|
|
154
|
+
value
|
|
155
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
156
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
157
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
158
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
159
|
+
k_type = Regexp.last_match[:k_type]
|
|
160
|
+
v_type = Regexp.last_match[:v_type]
|
|
161
|
+
{}.tap do |hash|
|
|
162
|
+
value.each do |k, v|
|
|
163
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
164
|
+
end
|
|
165
|
+
end
|
|
166
|
+
else # model
|
|
167
|
+
# models (e.g. Pet) or oneOf
|
|
168
|
+
klass = Akeyless.const_get(type)
|
|
169
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
170
|
+
end
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Returns the string representation of the object
|
|
174
|
+
# @return [String] String presentation of the object
|
|
175
|
+
def to_s
|
|
176
|
+
to_hash.to_s
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
180
|
+
# @return [Hash] Returns the object in the form of hash
|
|
181
|
+
def to_body
|
|
182
|
+
to_hash
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# Returns the object in the form of hash
|
|
186
|
+
# @return [Hash] Returns the object in the form of hash
|
|
187
|
+
def to_hash
|
|
188
|
+
hash = {}
|
|
189
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
190
|
+
value = self.send(attr)
|
|
191
|
+
if value.nil?
|
|
192
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
193
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
hash[param] = _to_hash(value)
|
|
197
|
+
end
|
|
198
|
+
hash
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Outputs non-array value in the form of hash
|
|
202
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
203
|
+
# @param [Object] value Any valid value
|
|
204
|
+
# @return [Hash] Returns the value in the form of hash
|
|
205
|
+
def _to_hash(value)
|
|
206
|
+
if value.is_a?(Array)
|
|
207
|
+
value.compact.map { |v| _to_hash(v) }
|
|
208
|
+
elsif value.is_a?(Hash)
|
|
209
|
+
{}.tap do |hash|
|
|
210
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
211
|
+
end
|
|
212
|
+
elsif value.respond_to? :to_hash
|
|
213
|
+
value.to_hash
|
|
214
|
+
else
|
|
215
|
+
value
|
|
216
|
+
end
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
end
|
|
@@ -201,6 +201,8 @@ module Akeyless
|
|
|
201
201
|
|
|
202
202
|
attr_accessor :host_port
|
|
203
203
|
|
|
204
|
+
attr_accessor :implementation_type
|
|
205
|
+
|
|
204
206
|
attr_accessor :is_fixed_user
|
|
205
207
|
|
|
206
208
|
attr_accessor :item_targets_assoc
|
|
@@ -468,6 +470,7 @@ module Akeyless
|
|
|
468
470
|
:'hanadb_revocation_statements' => :'hanadb_revocation_statements',
|
|
469
471
|
:'host_name' => :'host_name',
|
|
470
472
|
:'host_port' => :'host_port',
|
|
473
|
+
:'implementation_type' => :'implementation_type',
|
|
471
474
|
:'is_fixed_user' => :'is_fixed_user',
|
|
472
475
|
:'item_targets_assoc' => :'item_targets_assoc',
|
|
473
476
|
:'k8s_bearer_token' => :'k8s_bearer_token',
|
|
@@ -653,6 +656,7 @@ module Akeyless
|
|
|
653
656
|
:'hanadb_revocation_statements' => :'String',
|
|
654
657
|
:'host_name' => :'String',
|
|
655
658
|
:'host_port' => :'String',
|
|
659
|
+
:'implementation_type' => :'String',
|
|
656
660
|
:'is_fixed_user' => :'String',
|
|
657
661
|
:'item_targets_assoc' => :'Array<ItemTargetAssociation>',
|
|
658
662
|
:'k8s_bearer_token' => :'String',
|
|
@@ -1133,6 +1137,10 @@ module Akeyless
|
|
|
1133
1137
|
self.host_port = attributes[:'host_port']
|
|
1134
1138
|
end
|
|
1135
1139
|
|
|
1140
|
+
if attributes.key?(:'implementation_type')
|
|
1141
|
+
self.implementation_type = attributes[:'implementation_type']
|
|
1142
|
+
end
|
|
1143
|
+
|
|
1136
1144
|
if attributes.key?(:'is_fixed_user')
|
|
1137
1145
|
self.is_fixed_user = attributes[:'is_fixed_user']
|
|
1138
1146
|
end
|
|
@@ -1580,6 +1588,7 @@ module Akeyless
|
|
|
1580
1588
|
hanadb_revocation_statements == o.hanadb_revocation_statements &&
|
|
1581
1589
|
host_name == o.host_name &&
|
|
1582
1590
|
host_port == o.host_port &&
|
|
1591
|
+
implementation_type == o.implementation_type &&
|
|
1583
1592
|
is_fixed_user == o.is_fixed_user &&
|
|
1584
1593
|
item_targets_assoc == o.item_targets_assoc &&
|
|
1585
1594
|
k8s_bearer_token == o.k8s_bearer_token &&
|
|
@@ -1673,7 +1682,7 @@ module Akeyless
|
|
|
1673
1682
|
# Calculates hash code according to all attributes.
|
|
1674
1683
|
# @return [Integer] Hash code
|
|
1675
1684
|
def hash
|
|
1676
|
-
[active, admin_name, admin_pwd, admin_rotation_interval_days, artifactory_admin_apikey, artifactory_admin_username, artifactory_base_url, artifactory_token_audience, artifactory_token_scope, aws_access_key_id, aws_access_mode, aws_region, aws_role_arns, aws_secret_access_key, aws_session_token, aws_user_console_access, aws_user_groups, aws_user_policies, aws_user_programmatic_access, azure_app_object_id, azure_client_id, azure_client_secret, azure_fixed_user_name_sub_claim_key, azure_fixed_user_only, azure_resource_group_name, azure_resource_name, azure_subscription_id, azure_tenant_id, azure_user_groups_obj_id, azure_user_portal_access, azure_user_programmatic_access, azure_user_roles_template_id, cassandra_creation_statements, chef_organizations, chef_server_access_mode, chef_server_host_name, chef_server_key, chef_server_port, chef_server_url, chef_server_username, chef_skip_ssl, create_sync_url, db_host_name, db_isolation_level, db_max_idle_conns, db_max_open_conns, db_name, db_port, db_pwd, db_server_certificates, db_server_name, db_user_name, delete_protection, dynamic_secret_id, dynamic_secret_key, dynamic_secret_name, dynamic_secret_type, eks_access_key_id, eks_assume_role, eks_cluster_ca_certificate, eks_cluster_endpoint, eks_cluster_name, eks_region, eks_secret_access_key, enable_admin_rotation, externally_provided_user, failure_message, fixed_user_only, gcp_key_algo, gcp_service_account_email, gcp_service_account_key, gcp_token_lifetime, gcp_token_scope, gcp_token_type, github_app_id, github_app_private_key, github_base_url, github_installation_id, github_installation_token_permissions, github_installation_token_repositories, github_installation_token_repositories_ids, github_repository_path, gke_cluster_ca_certificate, gke_cluster_endpoint, gke_cluster_name, gke_service_account_key, gke_service_account_name, groups, hanadb_creation_statements, hanadb_revocation_statements, host_name, host_port, is_fixed_user, item_targets_assoc, k8s_bearer_token, k8s_cluster_ca_certificate, k8s_cluster_endpoint, k8s_namespace, k8s_service_account, last_admin_rotation, ldap_audience, ldap_bind_dn, ldap_bind_password, ldap_certificate, ldap_token_expiration, ldap_url, ldap_user_attr, ldap_user_dn, metadata, mongodb_atlas_api_private_key, mongodb_atlas_api_public_key, mongodb_atlas_project_id, mongodb_custom_data, mongodb_db_name, mongodb_default_auth_db, mongodb_host_port, mongodb_is_atlas, mongodb_password, mongodb_roles, mongodb_uri_connection, mongodb_uri_options, mongodb_username, mssql_creation_statements, mssql_revocation_statements, mysql_creation_statements, oracle_creation_statements, password, password_length, password_policy, payload, postgres_creation_statements, postgres_revocation_statements, rabbitmq_server_password, rabbitmq_server_uri, rabbitmq_server_user, rabbitmq_user_conf_permission, rabbitmq_user_read_permission, rabbitmq_user_tags, rabbitmq_user_vhost, rabbitmq_user_write_permission, redshift_creation_statements, revoke_sync_url, rotate_sync_url, scopes, secure_remote_access_details, session_extension_warn_interval_min, sf_account, sf_user_role, sf_warehouse_name, should_stop, ssl_connection_certificate, ssl_connection_mode, tags, timeout_seconds, use_gw_cloud_identity, user_name, user_principal_name, user_ttl, username_length, username_policy, venafi_allow_subdomains, venafi_allowed_domains, venafi_api_key, venafi_auto_generated_folder, venafi_base_url, venafi_root_first_in_chain, venafi_sign_using_akeyless_pki, venafi_signer_key_name, venafi_store_private_key, venafi_tpp_password, venafi_tpp_username, venafi_use_tpp, venafi_zone, warn_before_user_expiration_min].hash
|
|
1685
|
+
[active, admin_name, admin_pwd, admin_rotation_interval_days, artifactory_admin_apikey, artifactory_admin_username, artifactory_base_url, artifactory_token_audience, artifactory_token_scope, aws_access_key_id, aws_access_mode, aws_region, aws_role_arns, aws_secret_access_key, aws_session_token, aws_user_console_access, aws_user_groups, aws_user_policies, aws_user_programmatic_access, azure_app_object_id, azure_client_id, azure_client_secret, azure_fixed_user_name_sub_claim_key, azure_fixed_user_only, azure_resource_group_name, azure_resource_name, azure_subscription_id, azure_tenant_id, azure_user_groups_obj_id, azure_user_portal_access, azure_user_programmatic_access, azure_user_roles_template_id, cassandra_creation_statements, chef_organizations, chef_server_access_mode, chef_server_host_name, chef_server_key, chef_server_port, chef_server_url, chef_server_username, chef_skip_ssl, create_sync_url, db_host_name, db_isolation_level, db_max_idle_conns, db_max_open_conns, db_name, db_port, db_pwd, db_server_certificates, db_server_name, db_user_name, delete_protection, dynamic_secret_id, dynamic_secret_key, dynamic_secret_name, dynamic_secret_type, eks_access_key_id, eks_assume_role, eks_cluster_ca_certificate, eks_cluster_endpoint, eks_cluster_name, eks_region, eks_secret_access_key, enable_admin_rotation, externally_provided_user, failure_message, fixed_user_only, gcp_key_algo, gcp_service_account_email, gcp_service_account_key, gcp_token_lifetime, gcp_token_scope, gcp_token_type, github_app_id, github_app_private_key, github_base_url, github_installation_id, github_installation_token_permissions, github_installation_token_repositories, github_installation_token_repositories_ids, github_repository_path, gke_cluster_ca_certificate, gke_cluster_endpoint, gke_cluster_name, gke_service_account_key, gke_service_account_name, groups, hanadb_creation_statements, hanadb_revocation_statements, host_name, host_port, implementation_type, is_fixed_user, item_targets_assoc, k8s_bearer_token, k8s_cluster_ca_certificate, k8s_cluster_endpoint, k8s_namespace, k8s_service_account, last_admin_rotation, ldap_audience, ldap_bind_dn, ldap_bind_password, ldap_certificate, ldap_token_expiration, ldap_url, ldap_user_attr, ldap_user_dn, metadata, mongodb_atlas_api_private_key, mongodb_atlas_api_public_key, mongodb_atlas_project_id, mongodb_custom_data, mongodb_db_name, mongodb_default_auth_db, mongodb_host_port, mongodb_is_atlas, mongodb_password, mongodb_roles, mongodb_uri_connection, mongodb_uri_options, mongodb_username, mssql_creation_statements, mssql_revocation_statements, mysql_creation_statements, oracle_creation_statements, password, password_length, password_policy, payload, postgres_creation_statements, postgres_revocation_statements, rabbitmq_server_password, rabbitmq_server_uri, rabbitmq_server_user, rabbitmq_user_conf_permission, rabbitmq_user_read_permission, rabbitmq_user_tags, rabbitmq_user_vhost, rabbitmq_user_write_permission, redshift_creation_statements, revoke_sync_url, rotate_sync_url, scopes, secure_remote_access_details, session_extension_warn_interval_min, sf_account, sf_user_role, sf_warehouse_name, should_stop, ssl_connection_certificate, ssl_connection_mode, tags, timeout_seconds, use_gw_cloud_identity, user_name, user_principal_name, user_ttl, username_length, username_policy, venafi_allow_subdomains, venafi_allowed_domains, venafi_api_key, venafi_auto_generated_folder, venafi_base_url, venafi_root_first_in_chain, venafi_sign_using_akeyless_pki, venafi_signer_key_name, venafi_store_private_key, venafi_tpp_password, venafi_tpp_username, venafi_use_tpp, venafi_zone, warn_before_user_expiration_min].hash
|
|
1677
1686
|
end
|
|
1678
1687
|
|
|
1679
1688
|
# Builds the object from hash
|
|
@@ -21,6 +21,9 @@ module Akeyless
|
|
|
21
21
|
# name-value pair that specifies the encryption context to be used for authenticated encryption. If used here, the same value must be supplied to the decrypt command or decryption will fail
|
|
22
22
|
attr_accessor :encryption_context
|
|
23
23
|
|
|
24
|
+
# The item id of the key to use in the encryption process
|
|
25
|
+
attr_accessor :item_id
|
|
26
|
+
|
|
24
27
|
# The name of the key to use in the encryption process
|
|
25
28
|
attr_accessor :key_name
|
|
26
29
|
|
|
@@ -38,6 +41,7 @@ module Akeyless
|
|
|
38
41
|
{
|
|
39
42
|
:'display_id' => :'display-id',
|
|
40
43
|
:'encryption_context' => :'encryption-context',
|
|
44
|
+
:'item_id' => :'item-id',
|
|
41
45
|
:'key_name' => :'key-name',
|
|
42
46
|
:'plaintext' => :'plaintext',
|
|
43
47
|
:'token' => :'token',
|
|
@@ -55,6 +59,7 @@ module Akeyless
|
|
|
55
59
|
{
|
|
56
60
|
:'display_id' => :'String',
|
|
57
61
|
:'encryption_context' => :'Hash<String, String>',
|
|
62
|
+
:'item_id' => :'Integer',
|
|
58
63
|
:'key_name' => :'String',
|
|
59
64
|
:'plaintext' => :'String',
|
|
60
65
|
:'token' => :'String',
|
|
@@ -93,6 +98,10 @@ module Akeyless
|
|
|
93
98
|
end
|
|
94
99
|
end
|
|
95
100
|
|
|
101
|
+
if attributes.key?(:'item_id')
|
|
102
|
+
self.item_id = attributes[:'item_id']
|
|
103
|
+
end
|
|
104
|
+
|
|
96
105
|
if attributes.key?(:'key_name')
|
|
97
106
|
self.key_name = attributes[:'key_name']
|
|
98
107
|
end
|
|
@@ -114,12 +123,17 @@ module Akeyless
|
|
|
114
123
|
# @return Array for valid properties with the reasons
|
|
115
124
|
def list_invalid_properties
|
|
116
125
|
invalid_properties = Array.new
|
|
126
|
+
if @key_name.nil?
|
|
127
|
+
invalid_properties.push('invalid value for "key_name", key_name cannot be nil.')
|
|
128
|
+
end
|
|
129
|
+
|
|
117
130
|
invalid_properties
|
|
118
131
|
end
|
|
119
132
|
|
|
120
133
|
# Check to see if the all the properties in the model are valid
|
|
121
134
|
# @return true if the model is valid
|
|
122
135
|
def valid?
|
|
136
|
+
return false if @key_name.nil?
|
|
123
137
|
true
|
|
124
138
|
end
|
|
125
139
|
|
|
@@ -130,6 +144,7 @@ module Akeyless
|
|
|
130
144
|
self.class == o.class &&
|
|
131
145
|
display_id == o.display_id &&
|
|
132
146
|
encryption_context == o.encryption_context &&
|
|
147
|
+
item_id == o.item_id &&
|
|
133
148
|
key_name == o.key_name &&
|
|
134
149
|
plaintext == o.plaintext &&
|
|
135
150
|
token == o.token &&
|
|
@@ -145,7 +160,7 @@ module Akeyless
|
|
|
145
160
|
# Calculates hash code according to all attributes.
|
|
146
161
|
# @return [Integer] Hash code
|
|
147
162
|
def hash
|
|
148
|
-
[display_id, encryption_context, key_name, plaintext, token, uid_token].hash
|
|
163
|
+
[display_id, encryption_context, item_id, key_name, plaintext, token, uid_token].hash
|
|
149
164
|
end
|
|
150
165
|
|
|
151
166
|
# Builds the object from hash
|
|
@@ -15,12 +15,18 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Akeyless
|
|
17
17
|
class EncryptFile
|
|
18
|
+
# The display id of the key to use in the encryption process
|
|
19
|
+
attr_accessor :display_id
|
|
20
|
+
|
|
18
21
|
# name-value pair that specifies the encryption context to be used for authenticated encryption. If used here, the same value must be supplied to the decrypt command or decryption will fail
|
|
19
22
|
attr_accessor :encryption_context
|
|
20
23
|
|
|
21
24
|
# Path to the file to be encrypted. If not provided, the content will be taken from stdin
|
|
22
25
|
attr_accessor :_in
|
|
23
26
|
|
|
27
|
+
# The item id of the key to use in the encryption process
|
|
28
|
+
attr_accessor :item_id
|
|
29
|
+
|
|
24
30
|
# The name of the key to use in the encryption process
|
|
25
31
|
attr_accessor :key_name
|
|
26
32
|
|
|
@@ -36,8 +42,10 @@ module Akeyless
|
|
|
36
42
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
37
43
|
def self.attribute_map
|
|
38
44
|
{
|
|
45
|
+
:'display_id' => :'display-id',
|
|
39
46
|
:'encryption_context' => :'encryption-context',
|
|
40
47
|
:'_in' => :'in',
|
|
48
|
+
:'item_id' => :'item-id',
|
|
41
49
|
:'key_name' => :'key-name',
|
|
42
50
|
:'out' => :'out',
|
|
43
51
|
:'token' => :'token',
|
|
@@ -53,8 +61,10 @@ module Akeyless
|
|
|
53
61
|
# Attribute type mapping.
|
|
54
62
|
def self.openapi_types
|
|
55
63
|
{
|
|
64
|
+
:'display_id' => :'String',
|
|
56
65
|
:'encryption_context' => :'Hash<String, String>',
|
|
57
66
|
:'_in' => :'String',
|
|
67
|
+
:'item_id' => :'Integer',
|
|
58
68
|
:'key_name' => :'String',
|
|
59
69
|
:'out' => :'String',
|
|
60
70
|
:'token' => :'String',
|
|
@@ -83,6 +93,10 @@ module Akeyless
|
|
|
83
93
|
h[k.to_sym] = v
|
|
84
94
|
}
|
|
85
95
|
|
|
96
|
+
if attributes.key?(:'display_id')
|
|
97
|
+
self.display_id = attributes[:'display_id']
|
|
98
|
+
end
|
|
99
|
+
|
|
86
100
|
if attributes.key?(:'encryption_context')
|
|
87
101
|
if (value = attributes[:'encryption_context']).is_a?(Hash)
|
|
88
102
|
self.encryption_context = value
|
|
@@ -93,6 +107,10 @@ module Akeyless
|
|
|
93
107
|
self._in = attributes[:'_in']
|
|
94
108
|
end
|
|
95
109
|
|
|
110
|
+
if attributes.key?(:'item_id')
|
|
111
|
+
self.item_id = attributes[:'item_id']
|
|
112
|
+
end
|
|
113
|
+
|
|
96
114
|
if attributes.key?(:'key_name')
|
|
97
115
|
self.key_name = attributes[:'key_name']
|
|
98
116
|
end
|
|
@@ -138,8 +156,10 @@ module Akeyless
|
|
|
138
156
|
def ==(o)
|
|
139
157
|
return true if self.equal?(o)
|
|
140
158
|
self.class == o.class &&
|
|
159
|
+
display_id == o.display_id &&
|
|
141
160
|
encryption_context == o.encryption_context &&
|
|
142
161
|
_in == o._in &&
|
|
162
|
+
item_id == o.item_id &&
|
|
143
163
|
key_name == o.key_name &&
|
|
144
164
|
out == o.out &&
|
|
145
165
|
token == o.token &&
|
|
@@ -155,7 +175,7 @@ module Akeyless
|
|
|
155
175
|
# Calculates hash code according to all attributes.
|
|
156
176
|
# @return [Integer] Hash code
|
|
157
177
|
def hash
|
|
158
|
-
[encryption_context, _in, key_name, out, token, uid_token].hash
|
|
178
|
+
[display_id, encryption_context, _in, item_id, key_name, out, token, uid_token].hash
|
|
159
179
|
end
|
|
160
180
|
|
|
161
181
|
# Builds the object from hash
|