akeyless 2.16.4 → 2.16.7

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