akeyless 3.3.4 → 3.3.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +12 -1
  3. data/docs/CertificateTemplateInfo.md +32 -0
  4. data/docs/CreateClassicKey.md +16 -0
  5. data/docs/CreateDFCKey.md +16 -0
  6. data/docs/CreateKey.md +16 -0
  7. data/docs/DSProducerDetails.md +8 -2
  8. data/docs/DeriveKey.md +40 -0
  9. data/docs/DeriveKeyOutput.md +20 -0
  10. data/docs/EventAction.md +26 -0
  11. data/docs/GatewayCreateProducerCertificateAutomation.md +6 -4
  12. data/docs/GatewayUpdateProducerCertificateAutomation.md +6 -4
  13. data/docs/ItemGeneralInfo.md +2 -0
  14. data/docs/SignDataWithClassicKey.md +34 -0
  15. data/docs/SignOutput.md +18 -0
  16. data/docs/TargetTypeDetailsInput.md +8 -2
  17. data/docs/V2Api.md +252 -0
  18. data/docs/VerifyDataWithClassicKey.md +36 -0
  19. data/lib/akeyless/api/v2_api.rb +256 -0
  20. data/lib/akeyless/models/certificate_template_info.rb +282 -0
  21. data/lib/akeyless/models/create_classic_key.rb +81 -1
  22. data/lib/akeyless/models/create_dfc_key.rb +81 -1
  23. data/lib/akeyless/models/create_key.rb +81 -1
  24. data/lib/akeyless/models/derive_key.rb +362 -0
  25. data/lib/akeyless/models/derive_key_output.rb +228 -0
  26. data/lib/akeyless/models/ds_producer_details.rb +30 -1
  27. data/lib/akeyless/models/event_action.rb +272 -0
  28. data/lib/akeyless/models/gateway_create_producer_certificate_automation.rb +30 -18
  29. data/lib/akeyless/models/gateway_update_producer_certificate_automation.rb +30 -18
  30. data/lib/akeyless/models/item_general_info.rb +10 -1
  31. data/lib/akeyless/models/sign_data_with_classic_key.rb +326 -0
  32. data/lib/akeyless/models/sign_output.rb +219 -0
  33. data/lib/akeyless/models/target_type_details_input.rb +30 -1
  34. data/lib/akeyless/models/verify_data_with_classic_key.rb +336 -0
  35. data/lib/akeyless/version.rb +1 -1
  36. data/lib/akeyless.rb +7 -0
  37. data/spec/models/certificate_template_info_spec.rb +76 -0
  38. data/spec/models/derive_key_output_spec.rb +40 -0
  39. data/spec/models/derive_key_spec.rb +100 -0
  40. data/spec/models/event_action_spec.rb +58 -0
  41. data/spec/models/sign_data_with_classic_key_spec.rb +82 -0
  42. data/spec/models/sign_output_spec.rb +34 -0
  43. data/spec/models/verify_data_with_classic_key_spec.rb +88 -0
  44. metadata +30 -2
@@ -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: 7.0.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Akeyless
17
+ class SignOutput
18
+ attr_accessor :result
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'result' => :'result'
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
+ :'result' => :'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::SignOutput` 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::SignOutput`. 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?(:'result')
61
+ self.result = attributes[:'result']
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
+ result == o.result
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
+ [result].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
@@ -260,8 +260,16 @@ module Akeyless
260
260
 
261
261
  attr_accessor :venafi_base_url
262
262
 
263
+ attr_accessor :venafi_tpp_access_token
264
+
265
+ attr_accessor :venafi_tpp_client_id
266
+
267
+ # Deprecated: VenafiAccessToken and VenafiRefreshToken should be used instead
263
268
  attr_accessor :venafi_tpp_password
264
269
 
270
+ attr_accessor :venafi_tpp_refresh_token
271
+
272
+ # Deprecated: VenafiAccessToken and VenafiRefreshToken should be used instead
265
273
  attr_accessor :venafi_tpp_username
266
274
 
267
275
  attr_accessor :venafi_use_tpp
@@ -386,7 +394,10 @@ module Akeyless
386
394
  :'validation_email' => :'validation_email',
387
395
  :'venafi_api_key' => :'venafi_api_key',
388
396
  :'venafi_base_url' => :'venafi_base_url',
397
+ :'venafi_tpp_access_token' => :'venafi_tpp_access_token',
398
+ :'venafi_tpp_client_id' => :'venafi_tpp_client_id',
389
399
  :'venafi_tpp_password' => :'venafi_tpp_password',
400
+ :'venafi_tpp_refresh_token' => :'venafi_tpp_refresh_token',
390
401
  :'venafi_tpp_username' => :'venafi_tpp_username',
391
402
  :'venafi_use_tpp' => :'venafi_use_tpp',
392
403
  :'venafi_zone' => :'venafi_zone'
@@ -516,7 +527,10 @@ module Akeyless
516
527
  :'validation_email' => :'String',
517
528
  :'venafi_api_key' => :'String',
518
529
  :'venafi_base_url' => :'String',
530
+ :'venafi_tpp_access_token' => :'String',
531
+ :'venafi_tpp_client_id' => :'String',
519
532
  :'venafi_tpp_password' => :'String',
533
+ :'venafi_tpp_refresh_token' => :'String',
520
534
  :'venafi_tpp_username' => :'String',
521
535
  :'venafi_use_tpp' => :'Boolean',
522
536
  :'venafi_zone' => :'String'
@@ -1010,10 +1024,22 @@ module Akeyless
1010
1024
  self.venafi_base_url = attributes[:'venafi_base_url']
1011
1025
  end
1012
1026
 
1027
+ if attributes.key?(:'venafi_tpp_access_token')
1028
+ self.venafi_tpp_access_token = attributes[:'venafi_tpp_access_token']
1029
+ end
1030
+
1031
+ if attributes.key?(:'venafi_tpp_client_id')
1032
+ self.venafi_tpp_client_id = attributes[:'venafi_tpp_client_id']
1033
+ end
1034
+
1013
1035
  if attributes.key?(:'venafi_tpp_password')
1014
1036
  self.venafi_tpp_password = attributes[:'venafi_tpp_password']
1015
1037
  end
1016
1038
 
1039
+ if attributes.key?(:'venafi_tpp_refresh_token')
1040
+ self.venafi_tpp_refresh_token = attributes[:'venafi_tpp_refresh_token']
1041
+ end
1042
+
1017
1043
  if attributes.key?(:'venafi_tpp_username')
1018
1044
  self.venafi_tpp_username = attributes[:'venafi_tpp_username']
1019
1045
  end
@@ -1160,7 +1186,10 @@ module Akeyless
1160
1186
  validation_email == o.validation_email &&
1161
1187
  venafi_api_key == o.venafi_api_key &&
1162
1188
  venafi_base_url == o.venafi_base_url &&
1189
+ venafi_tpp_access_token == o.venafi_tpp_access_token &&
1190
+ venafi_tpp_client_id == o.venafi_tpp_client_id &&
1163
1191
  venafi_tpp_password == o.venafi_tpp_password &&
1192
+ venafi_tpp_refresh_token == o.venafi_tpp_refresh_token &&
1164
1193
  venafi_tpp_username == o.venafi_tpp_username &&
1165
1194
  venafi_use_tpp == o.venafi_use_tpp &&
1166
1195
  venafi_zone == o.venafi_zone
@@ -1175,7 +1204,7 @@ module Akeyless
1175
1204
  # Calculates hash code according to all attributes.
1176
1205
  # @return [Integer] Hash code
1177
1206
  def hash
1178
- [administrative_port, api_key, app_private_key, artifactory_admin_apikey, artifactory_admin_username, artifactory_base_url, auth_flow, authorization_port, aws_access_key_id, aws_region, aws_secret_access_key, aws_session_token, azure_client_id, azure_client_secret, azure_resource_group_name, azure_resource_name, azure_subscription_id, azure_tenant_id, ca_cert_data, ca_cert_name, certificate, chef_server_host_name, chef_server_key, chef_server_port, chef_server_url, chef_server_username, chef_skip_ssl, client_id, client_secret, db_host_name, db_name, db_port, db_private_key, db_private_key_passphrase, db_pwd, db_server_certificates, db_server_name, db_user_name, domain_name, eks_access_key_id, eks_cluster_ca_certificate, eks_cluster_endpoint, eks_cluster_name, eks_region, eks_secret_access_key, email, first_name, gcp_service_account_email, gcp_service_account_key, gcp_service_account_key_base64, github_app_id, github_app_private_key, github_base_url, gke_cluster_ca_certificate, gke_cluster_endpoint, gke_cluster_name, gke_service_account_key, gke_service_account_name, host, hostname, hosts, imap_fqdn, imap_password, imap_port, imap_user, implementation_type, k8s_bearer_token, k8s_cluster_ca_certificate, k8s_cluster_endpoint, last_name, ldap_audience, ldap_bind_dn, ldap_bind_password, ldap_certificate, ldap_token_expiration, ldap_url, mongodb_atlas_api_private_key, mongodb_atlas_api_public_key, mongodb_atlas_project_id, mongodb_db_name, mongodb_default_auth_db, mongodb_host_port, mongodb_is_atlas, mongodb_password, mongodb_uri_connection, mongodb_uri_options, mongodb_username, password, payload, phone, ping_url, port, private_key, private_key_password, privileged_user, profile_id, rabbitmq_server_password, rabbitmq_server_uri, rabbitmq_server_user, security_token, sf_account, ssl_connection_certificate, ssl_connection_mode, tenant_url, timeout, url, use_gw_cloud_identity, use_gw_service_account, use_tls, user_name, user_password, username, validation_email, venafi_api_key, venafi_base_url, venafi_tpp_password, venafi_tpp_username, venafi_use_tpp, venafi_zone].hash
1207
+ [administrative_port, api_key, app_private_key, artifactory_admin_apikey, artifactory_admin_username, artifactory_base_url, auth_flow, authorization_port, aws_access_key_id, aws_region, aws_secret_access_key, aws_session_token, azure_client_id, azure_client_secret, azure_resource_group_name, azure_resource_name, azure_subscription_id, azure_tenant_id, ca_cert_data, ca_cert_name, certificate, chef_server_host_name, chef_server_key, chef_server_port, chef_server_url, chef_server_username, chef_skip_ssl, client_id, client_secret, db_host_name, db_name, db_port, db_private_key, db_private_key_passphrase, db_pwd, db_server_certificates, db_server_name, db_user_name, domain_name, eks_access_key_id, eks_cluster_ca_certificate, eks_cluster_endpoint, eks_cluster_name, eks_region, eks_secret_access_key, email, first_name, gcp_service_account_email, gcp_service_account_key, gcp_service_account_key_base64, github_app_id, github_app_private_key, github_base_url, gke_cluster_ca_certificate, gke_cluster_endpoint, gke_cluster_name, gke_service_account_key, gke_service_account_name, host, hostname, hosts, imap_fqdn, imap_password, imap_port, imap_user, implementation_type, k8s_bearer_token, k8s_cluster_ca_certificate, k8s_cluster_endpoint, last_name, ldap_audience, ldap_bind_dn, ldap_bind_password, ldap_certificate, ldap_token_expiration, ldap_url, mongodb_atlas_api_private_key, mongodb_atlas_api_public_key, mongodb_atlas_project_id, mongodb_db_name, mongodb_default_auth_db, mongodb_host_port, mongodb_is_atlas, mongodb_password, mongodb_uri_connection, mongodb_uri_options, mongodb_username, password, payload, phone, ping_url, port, private_key, private_key_password, privileged_user, profile_id, rabbitmq_server_password, rabbitmq_server_uri, rabbitmq_server_user, security_token, sf_account, ssl_connection_certificate, ssl_connection_mode, tenant_url, timeout, url, use_gw_cloud_identity, use_gw_service_account, use_tls, user_name, user_password, username, validation_email, venafi_api_key, venafi_base_url, venafi_tpp_access_token, venafi_tpp_client_id, venafi_tpp_password, venafi_tpp_refresh_token, venafi_tpp_username, venafi_use_tpp, venafi_zone].hash
1179
1208
  end
1180
1209
 
1181
1210
  # Builds the object from hash
@@ -0,0 +1,336 @@
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: 7.0.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Akeyless
17
+ class VerifyDataWithClassicKey
18
+ # Data
19
+ attr_accessor :data
20
+
21
+ # The display id of the key to use in the verification process
22
+ attr_accessor :display_id
23
+
24
+ # Defines whether the data should be hashed as part of the signing. If true, the data will not be hashed
25
+ attr_accessor :hashed
26
+
27
+ # HashingMethod
28
+ attr_accessor :hashing_method
29
+
30
+ # Set output format to JSON
31
+ attr_accessor :json
32
+
33
+ # The name of the key to use in the verification process
34
+ attr_accessor :key_name
35
+
36
+ # The data's signature in a Base64 format.
37
+ attr_accessor :signature
38
+
39
+ # Authentication token (see `/auth` and `/configure`)
40
+ attr_accessor :token
41
+
42
+ # The universal identity token, Required only for universal_identity authentication
43
+ attr_accessor :uid_token
44
+
45
+ # classic key version
46
+ attr_accessor :version
47
+
48
+ # Attribute mapping from ruby-style variable name to JSON key.
49
+ def self.attribute_map
50
+ {
51
+ :'data' => :'data',
52
+ :'display_id' => :'display-id',
53
+ :'hashed' => :'hashed',
54
+ :'hashing_method' => :'hashing-method',
55
+ :'json' => :'json',
56
+ :'key_name' => :'key-name',
57
+ :'signature' => :'signature',
58
+ :'token' => :'token',
59
+ :'uid_token' => :'uid-token',
60
+ :'version' => :'version'
61
+ }
62
+ end
63
+
64
+ # Returns all the JSON keys this model knows about
65
+ def self.acceptable_attributes
66
+ attribute_map.values
67
+ end
68
+
69
+ # Attribute type mapping.
70
+ def self.openapi_types
71
+ {
72
+ :'data' => :'String',
73
+ :'display_id' => :'String',
74
+ :'hashed' => :'Boolean',
75
+ :'hashing_method' => :'String',
76
+ :'json' => :'Boolean',
77
+ :'key_name' => :'String',
78
+ :'signature' => :'String',
79
+ :'token' => :'String',
80
+ :'uid_token' => :'String',
81
+ :'version' => :'Integer'
82
+ }
83
+ end
84
+
85
+ # List of attributes with nullable: true
86
+ def self.openapi_nullable
87
+ Set.new([
88
+ ])
89
+ end
90
+
91
+ # Initializes the object
92
+ # @param [Hash] attributes Model attributes in the form of hash
93
+ def initialize(attributes = {})
94
+ if (!attributes.is_a?(Hash))
95
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::VerifyDataWithClassicKey` initialize method"
96
+ end
97
+
98
+ # check to see if the attribute exists and convert string to symbol for hash key
99
+ attributes = attributes.each_with_object({}) { |(k, v), h|
100
+ if (!self.class.attribute_map.key?(k.to_sym))
101
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::VerifyDataWithClassicKey`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
102
+ end
103
+ h[k.to_sym] = v
104
+ }
105
+
106
+ if attributes.key?(:'data')
107
+ self.data = attributes[:'data']
108
+ end
109
+
110
+ if attributes.key?(:'display_id')
111
+ self.display_id = attributes[:'display_id']
112
+ end
113
+
114
+ if attributes.key?(:'hashed')
115
+ self.hashed = attributes[:'hashed']
116
+ else
117
+ self.hashed = false
118
+ end
119
+
120
+ if attributes.key?(:'hashing_method')
121
+ self.hashing_method = attributes[:'hashing_method']
122
+ else
123
+ self.hashing_method = 'SHA256'
124
+ end
125
+
126
+ if attributes.key?(:'json')
127
+ self.json = attributes[:'json']
128
+ else
129
+ self.json = false
130
+ end
131
+
132
+ if attributes.key?(:'key_name')
133
+ self.key_name = attributes[:'key_name']
134
+ end
135
+
136
+ if attributes.key?(:'signature')
137
+ self.signature = attributes[:'signature']
138
+ end
139
+
140
+ if attributes.key?(:'token')
141
+ self.token = attributes[:'token']
142
+ end
143
+
144
+ if attributes.key?(:'uid_token')
145
+ self.uid_token = attributes[:'uid_token']
146
+ end
147
+
148
+ if attributes.key?(:'version')
149
+ self.version = attributes[:'version']
150
+ end
151
+ end
152
+
153
+ # Show invalid properties with the reasons. Usually used together with valid?
154
+ # @return Array for valid properties with the reasons
155
+ def list_invalid_properties
156
+ invalid_properties = Array.new
157
+ if @data.nil?
158
+ invalid_properties.push('invalid value for "data", data cannot be nil.')
159
+ end
160
+
161
+ if @key_name.nil?
162
+ invalid_properties.push('invalid value for "key_name", key_name cannot be nil.')
163
+ end
164
+
165
+ if @signature.nil?
166
+ invalid_properties.push('invalid value for "signature", signature cannot be nil.')
167
+ end
168
+
169
+ if @version.nil?
170
+ invalid_properties.push('invalid value for "version", version cannot be nil.')
171
+ end
172
+
173
+ invalid_properties
174
+ end
175
+
176
+ # Check to see if the all the properties in the model are valid
177
+ # @return true if the model is valid
178
+ def valid?
179
+ return false if @data.nil?
180
+ return false if @key_name.nil?
181
+ return false if @signature.nil?
182
+ return false if @version.nil?
183
+ true
184
+ end
185
+
186
+ # Checks equality by comparing each attribute.
187
+ # @param [Object] Object to be compared
188
+ def ==(o)
189
+ return true if self.equal?(o)
190
+ self.class == o.class &&
191
+ data == o.data &&
192
+ display_id == o.display_id &&
193
+ hashed == o.hashed &&
194
+ hashing_method == o.hashing_method &&
195
+ json == o.json &&
196
+ key_name == o.key_name &&
197
+ signature == o.signature &&
198
+ token == o.token &&
199
+ uid_token == o.uid_token &&
200
+ version == o.version
201
+ end
202
+
203
+ # @see the `==` method
204
+ # @param [Object] Object to be compared
205
+ def eql?(o)
206
+ self == o
207
+ end
208
+
209
+ # Calculates hash code according to all attributes.
210
+ # @return [Integer] Hash code
211
+ def hash
212
+ [data, display_id, hashed, hashing_method, json, key_name, signature, token, uid_token, version].hash
213
+ end
214
+
215
+ # Builds the object from hash
216
+ # @param [Hash] attributes Model attributes in the form of hash
217
+ # @return [Object] Returns the model itself
218
+ def self.build_from_hash(attributes)
219
+ new.build_from_hash(attributes)
220
+ end
221
+
222
+ # Builds the object from hash
223
+ # @param [Hash] attributes Model attributes in the form of hash
224
+ # @return [Object] Returns the model itself
225
+ def build_from_hash(attributes)
226
+ return nil unless attributes.is_a?(Hash)
227
+ attributes = attributes.transform_keys(&:to_sym)
228
+ self.class.openapi_types.each_pair do |key, type|
229
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
230
+ self.send("#{key}=", nil)
231
+ elsif type =~ /\AArray<(.*)>/i
232
+ # check to ensure the input is an array given that the attribute
233
+ # is documented as an array but the input is not
234
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
235
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
236
+ end
237
+ elsif !attributes[self.class.attribute_map[key]].nil?
238
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
239
+ end
240
+ end
241
+
242
+ self
243
+ end
244
+
245
+ # Deserializes the data based on type
246
+ # @param string type Data type
247
+ # @param string value Value to be deserialized
248
+ # @return [Object] Deserialized data
249
+ def _deserialize(type, value)
250
+ case type.to_sym
251
+ when :Time
252
+ Time.parse(value)
253
+ when :Date
254
+ Date.parse(value)
255
+ when :String
256
+ value.to_s
257
+ when :Integer
258
+ value.to_i
259
+ when :Float
260
+ value.to_f
261
+ when :Boolean
262
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
263
+ true
264
+ else
265
+ false
266
+ end
267
+ when :Object
268
+ # generic object (usually a Hash), return directly
269
+ value
270
+ when /\AArray<(?<inner_type>.+)>\z/
271
+ inner_type = Regexp.last_match[:inner_type]
272
+ value.map { |v| _deserialize(inner_type, v) }
273
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
274
+ k_type = Regexp.last_match[:k_type]
275
+ v_type = Regexp.last_match[:v_type]
276
+ {}.tap do |hash|
277
+ value.each do |k, v|
278
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
279
+ end
280
+ end
281
+ else # model
282
+ # models (e.g. Pet) or oneOf
283
+ klass = Akeyless.const_get(type)
284
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
285
+ end
286
+ end
287
+
288
+ # Returns the string representation of the object
289
+ # @return [String] String presentation of the object
290
+ def to_s
291
+ to_hash.to_s
292
+ end
293
+
294
+ # to_body is an alias to to_hash (backward compatibility)
295
+ # @return [Hash] Returns the object in the form of hash
296
+ def to_body
297
+ to_hash
298
+ end
299
+
300
+ # Returns the object in the form of hash
301
+ # @return [Hash] Returns the object in the form of hash
302
+ def to_hash
303
+ hash = {}
304
+ self.class.attribute_map.each_pair do |attr, param|
305
+ value = self.send(attr)
306
+ if value.nil?
307
+ is_nullable = self.class.openapi_nullable.include?(attr)
308
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
309
+ end
310
+
311
+ hash[param] = _to_hash(value)
312
+ end
313
+ hash
314
+ end
315
+
316
+ # Outputs non-array value in the form of hash
317
+ # For object, use to_hash. Otherwise, just return the value
318
+ # @param [Object] value Any valid value
319
+ # @return [Hash] Returns the value in the form of hash
320
+ def _to_hash(value)
321
+ if value.is_a?(Array)
322
+ value.compact.map { |v| _to_hash(v) }
323
+ elsif value.is_a?(Hash)
324
+ {}.tap do |hash|
325
+ value.each { |k, v| hash[k] = _to_hash(v) }
326
+ end
327
+ elsif value.respond_to? :to_hash
328
+ value.to_hash
329
+ else
330
+ value
331
+ end
332
+ end
333
+
334
+ end
335
+
336
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 7.0.0-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module Akeyless
14
- VERSION = '3.3.4'
14
+ VERSION = '3.3.6'
15
15
  end
data/lib/akeyless.rb CHANGED
@@ -55,6 +55,7 @@ require 'akeyless/models/certificate_chain_info'
55
55
  require 'akeyless/models/certificate_expiration_event'
56
56
  require 'akeyless/models/certificate_info'
57
57
  require 'akeyless/models/certificate_issue_info'
58
+ require 'akeyless/models/certificate_template_info'
58
59
  require 'akeyless/models/classic_key_details_info'
59
60
  require 'akeyless/models/classic_key_status_info'
60
61
  require 'akeyless/models/classic_key_target_info'
@@ -190,6 +191,8 @@ require 'akeyless/models/delete_roles'
190
191
  require 'akeyless/models/delete_target'
191
192
  require 'akeyless/models/delete_target_association'
192
193
  require 'akeyless/models/delete_targets'
194
+ require 'akeyless/models/derive_key'
195
+ require 'akeyless/models/derive_key_output'
193
196
  require 'akeyless/models/describe_assoc'
194
197
  require 'akeyless/models/describe_item'
195
198
  require 'akeyless/models/describe_permissions'
@@ -220,6 +223,7 @@ require 'akeyless/models/esm_list'
220
223
  require 'akeyless/models/esm_list_secrets_output'
221
224
  require 'akeyless/models/esm_update'
222
225
  require 'akeyless/models/esm_update_secret_output'
226
+ require 'akeyless/models/event_action'
223
227
  require 'akeyless/models/export_classic_key'
224
228
  require 'akeyless/models/export_classic_key_output'
225
229
  require 'akeyless/models/extension'
@@ -533,10 +537,12 @@ require 'akeyless/models/set_item_state'
533
537
  require 'akeyless/models/set_role_rule'
534
538
  require 'akeyless/models/share_item'
535
539
  require 'akeyless/models/sharing_policy_info'
540
+ require 'akeyless/models/sign_data_with_classic_key'
536
541
  require 'akeyless/models/sign_gpg'
537
542
  require 'akeyless/models/sign_gpg_output'
538
543
  require 'akeyless/models/sign_jwt_output'
539
544
  require 'akeyless/models/sign_jwt_with_classic_key'
545
+ require 'akeyless/models/sign_output'
540
546
  require 'akeyless/models/sign_pkcs1'
541
547
  require 'akeyless/models/sign_pkcs1_output'
542
548
  require 'akeyless/models/sign_pki_cert_output'
@@ -658,6 +664,7 @@ require 'akeyless/models/upload_rsa'
658
664
  require 'akeyless/models/validate_token'
659
665
  require 'akeyless/models/validate_token_output'
660
666
  require 'akeyless/models/vaultless_tokenizer_info'
667
+ require 'akeyless/models/verify_data_with_classic_key'
661
668
  require 'akeyless/models/verify_gpg'
662
669
  require 'akeyless/models/verify_jwt_output'
663
670
  require 'akeyless/models/verify_jwt_with_classic_key'