akeyless 2.16.4 → 2.16.7

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -0,0 +1,228 @@
1
+ =begin
2
+ #Akeyless API
3
+
4
+ #The purpose of this application is to provide access to Akeyless API.
5
+
6
+ The version of the OpenAPI document: 2.0
7
+ Contact: support@akeyless.io
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Akeyless
17
+ class TokenizeOutput
18
+ attr_accessor :result
19
+
20
+ attr_accessor :tweak
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'result' => :'result',
26
+ :'tweak' => :'tweak'
27
+ }
28
+ end
29
+
30
+ # Returns all the JSON keys this model knows about
31
+ def self.acceptable_attributes
32
+ attribute_map.values
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.openapi_types
37
+ {
38
+ :'result' => :'String',
39
+ :'tweak' => :'String'
40
+ }
41
+ end
42
+
43
+ # List of attributes with nullable: true
44
+ def self.openapi_nullable
45
+ Set.new([
46
+ ])
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::TokenizeOutput` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::TokenizeOutput`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'result')
65
+ self.result = attributes[:'result']
66
+ end
67
+
68
+ if attributes.key?(:'tweak')
69
+ self.tweak = attributes[:'tweak']
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ invalid_properties = Array.new
77
+ invalid_properties
78
+ end
79
+
80
+ # Check to see if the all the properties in the model are valid
81
+ # @return true if the model is valid
82
+ def valid?
83
+ true
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param [Object] Object to be compared
88
+ def ==(o)
89
+ return true if self.equal?(o)
90
+ self.class == o.class &&
91
+ result == o.result &&
92
+ tweak == o.tweak
93
+ end
94
+
95
+ # @see the `==` method
96
+ # @param [Object] Object to be compared
97
+ def eql?(o)
98
+ self == o
99
+ end
100
+
101
+ # Calculates hash code according to all attributes.
102
+ # @return [Integer] Hash code
103
+ def hash
104
+ [result, tweak].hash
105
+ end
106
+
107
+ # Builds the object from hash
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ # @return [Object] Returns the model itself
110
+ def self.build_from_hash(attributes)
111
+ new.build_from_hash(attributes)
112
+ end
113
+
114
+ # Builds the object from hash
115
+ # @param [Hash] attributes Model attributes in the form of hash
116
+ # @return [Object] Returns the model itself
117
+ def build_from_hash(attributes)
118
+ return nil unless attributes.is_a?(Hash)
119
+ attributes = attributes.transform_keys(&:to_sym)
120
+ self.class.openapi_types.each_pair do |key, type|
121
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
122
+ self.send("#{key}=", nil)
123
+ elsif type =~ /\AArray<(.*)>/i
124
+ # check to ensure the input is an array given that the attribute
125
+ # is documented as an array but the input is not
126
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
127
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
128
+ end
129
+ elsif !attributes[self.class.attribute_map[key]].nil?
130
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
131
+ end
132
+ end
133
+
134
+ self
135
+ end
136
+
137
+ # Deserializes the data based on type
138
+ # @param string type Data type
139
+ # @param string value Value to be deserialized
140
+ # @return [Object] Deserialized data
141
+ def _deserialize(type, value)
142
+ case type.to_sym
143
+ when :Time
144
+ Time.parse(value)
145
+ when :Date
146
+ Date.parse(value)
147
+ when :String
148
+ value.to_s
149
+ when :Integer
150
+ value.to_i
151
+ when :Float
152
+ value.to_f
153
+ when :Boolean
154
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
155
+ true
156
+ else
157
+ false
158
+ end
159
+ when :Object
160
+ # generic object (usually a Hash), return directly
161
+ value
162
+ when /\AArray<(?<inner_type>.+)>\z/
163
+ inner_type = Regexp.last_match[:inner_type]
164
+ value.map { |v| _deserialize(inner_type, v) }
165
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
166
+ k_type = Regexp.last_match[:k_type]
167
+ v_type = Regexp.last_match[:v_type]
168
+ {}.tap do |hash|
169
+ value.each do |k, v|
170
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
171
+ end
172
+ end
173
+ else # model
174
+ # models (e.g. Pet) or oneOf
175
+ klass = Akeyless.const_get(type)
176
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
177
+ end
178
+ end
179
+
180
+ # Returns the string representation of the object
181
+ # @return [String] String presentation of the object
182
+ def to_s
183
+ to_hash.to_s
184
+ end
185
+
186
+ # to_body is an alias to to_hash (backward compatibility)
187
+ # @return [Hash] Returns the object in the form of hash
188
+ def to_body
189
+ to_hash
190
+ end
191
+
192
+ # Returns the object in the form of hash
193
+ # @return [Hash] Returns the object in the form of hash
194
+ def to_hash
195
+ hash = {}
196
+ self.class.attribute_map.each_pair do |attr, param|
197
+ value = self.send(attr)
198
+ if value.nil?
199
+ is_nullable = self.class.openapi_nullable.include?(attr)
200
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
201
+ end
202
+
203
+ hash[param] = _to_hash(value)
204
+ end
205
+ hash
206
+ end
207
+
208
+ # Outputs non-array value in the form of hash
209
+ # For object, use to_hash. Otherwise, just return the value
210
+ # @param [Object] value Any valid value
211
+ # @return [Hash] Returns the value in the form of hash
212
+ def _to_hash(value)
213
+ if value.is_a?(Array)
214
+ value.compact.map { |v| _to_hash(v) }
215
+ elsif value.is_a?(Hash)
216
+ {}.tap do |hash|
217
+ value.each { |k, v| hash[k] = _to_hash(v) }
218
+ end
219
+ elsif value.respond_to? :to_hash
220
+ value.to_hash
221
+ else
222
+ value
223
+ end
224
+ end
225
+
226
+ end
227
+
228
+ end
@@ -0,0 +1,219 @@
1
+ =begin
2
+ #Akeyless API
3
+
4
+ #The purpose of this application is to provide access to Akeyless API.
5
+
6
+ The version of the OpenAPI document: 2.0
7
+ Contact: support@akeyless.io
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Akeyless
17
+ class TokenizerInfo
18
+ attr_accessor :vaultless_tokenizer_info
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'vaultless_tokenizer_info' => :'vaultless_tokenizer_info'
24
+ }
25
+ end
26
+
27
+ # Returns all the JSON keys this model knows about
28
+ def self.acceptable_attributes
29
+ attribute_map.values
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.openapi_types
34
+ {
35
+ :'vaultless_tokenizer_info' => :'VaultlessTokenizerInfo'
36
+ }
37
+ end
38
+
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([
42
+ ])
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ if (!attributes.is_a?(Hash))
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::TokenizerInfo` initialize method"
50
+ end
51
+
52
+ # check to see if the attribute exists and convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}) { |(k, v), h|
54
+ if (!self.class.attribute_map.key?(k.to_sym))
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::TokenizerInfo`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ end
57
+ h[k.to_sym] = v
58
+ }
59
+
60
+ if attributes.key?(:'vaultless_tokenizer_info')
61
+ self.vaultless_tokenizer_info = attributes[:'vaultless_tokenizer_info']
62
+ end
63
+ end
64
+
65
+ # Show invalid properties with the reasons. Usually used together with valid?
66
+ # @return Array for valid properties with the reasons
67
+ def list_invalid_properties
68
+ invalid_properties = Array.new
69
+ invalid_properties
70
+ end
71
+
72
+ # Check to see if the all the properties in the model are valid
73
+ # @return true if the model is valid
74
+ def valid?
75
+ true
76
+ end
77
+
78
+ # Checks equality by comparing each attribute.
79
+ # @param [Object] Object to be compared
80
+ def ==(o)
81
+ return true if self.equal?(o)
82
+ self.class == o.class &&
83
+ vaultless_tokenizer_info == o.vaultless_tokenizer_info
84
+ end
85
+
86
+ # @see the `==` method
87
+ # @param [Object] Object to be compared
88
+ def eql?(o)
89
+ self == o
90
+ end
91
+
92
+ # Calculates hash code according to all attributes.
93
+ # @return [Integer] Hash code
94
+ def hash
95
+ [vaultless_tokenizer_info].hash
96
+ end
97
+
98
+ # Builds the object from hash
99
+ # @param [Hash] attributes Model attributes in the form of hash
100
+ # @return [Object] Returns the model itself
101
+ def self.build_from_hash(attributes)
102
+ new.build_from_hash(attributes)
103
+ end
104
+
105
+ # Builds the object from hash
106
+ # @param [Hash] attributes Model attributes in the form of hash
107
+ # @return [Object] Returns the model itself
108
+ def build_from_hash(attributes)
109
+ return nil unless attributes.is_a?(Hash)
110
+ attributes = attributes.transform_keys(&:to_sym)
111
+ self.class.openapi_types.each_pair do |key, type|
112
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
113
+ self.send("#{key}=", nil)
114
+ elsif type =~ /\AArray<(.*)>/i
115
+ # check to ensure the input is an array given that the attribute
116
+ # is documented as an array but the input is not
117
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
118
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
119
+ end
120
+ elsif !attributes[self.class.attribute_map[key]].nil?
121
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
122
+ end
123
+ end
124
+
125
+ self
126
+ end
127
+
128
+ # Deserializes the data based on type
129
+ # @param string type Data type
130
+ # @param string value Value to be deserialized
131
+ # @return [Object] Deserialized data
132
+ def _deserialize(type, value)
133
+ case type.to_sym
134
+ when :Time
135
+ Time.parse(value)
136
+ when :Date
137
+ Date.parse(value)
138
+ when :String
139
+ value.to_s
140
+ when :Integer
141
+ value.to_i
142
+ when :Float
143
+ value.to_f
144
+ when :Boolean
145
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
146
+ true
147
+ else
148
+ false
149
+ end
150
+ when :Object
151
+ # generic object (usually a Hash), return directly
152
+ value
153
+ when /\AArray<(?<inner_type>.+)>\z/
154
+ inner_type = Regexp.last_match[:inner_type]
155
+ value.map { |v| _deserialize(inner_type, v) }
156
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
157
+ k_type = Regexp.last_match[:k_type]
158
+ v_type = Regexp.last_match[:v_type]
159
+ {}.tap do |hash|
160
+ value.each do |k, v|
161
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
162
+ end
163
+ end
164
+ else # model
165
+ # models (e.g. Pet) or oneOf
166
+ klass = Akeyless.const_get(type)
167
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
168
+ end
169
+ end
170
+
171
+ # Returns the string representation of the object
172
+ # @return [String] String presentation of the object
173
+ def to_s
174
+ to_hash.to_s
175
+ end
176
+
177
+ # to_body is an alias to to_hash (backward compatibility)
178
+ # @return [Hash] Returns the object in the form of hash
179
+ def to_body
180
+ to_hash
181
+ end
182
+
183
+ # Returns the object in the form of hash
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_hash
186
+ hash = {}
187
+ self.class.attribute_map.each_pair do |attr, param|
188
+ value = self.send(attr)
189
+ if value.nil?
190
+ is_nullable = self.class.openapi_nullable.include?(attr)
191
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
192
+ end
193
+
194
+ hash[param] = _to_hash(value)
195
+ end
196
+ hash
197
+ end
198
+
199
+ # Outputs non-array value in the form of hash
200
+ # For object, use to_hash. Otherwise, just return the value
201
+ # @param [Object] value Any valid value
202
+ # @return [Hash] Returns the value in the form of hash
203
+ def _to_hash(value)
204
+ if value.is_a?(Array)
205
+ value.compact.map { |v| _to_hash(v) }
206
+ elsif value.is_a?(Hash)
207
+ {}.tap do |hash|
208
+ value.each { |k, v| hash[k] = _to_hash(v) }
209
+ end
210
+ elsif value.respond_to? :to_hash
211
+ value.to_hash
212
+ else
213
+ value
214
+ end
215
+ end
216
+
217
+ end
218
+
219
+ end
@@ -111,8 +111,6 @@ module Akeyless
111
111
 
112
112
  if attributes.key?(:'jwt_ttl')
113
113
  self.jwt_ttl = attributes[:'jwt_ttl']
114
- else
115
- self.jwt_ttl = 0
116
114
  end
117
115
 
118
116
  if attributes.key?(:'name')
@@ -194,8 +194,6 @@ module Akeyless
194
194
 
195
195
  if attributes.key?(:'jwt_ttl')
196
196
  self.jwt_ttl = attributes[:'jwt_ttl']
197
- else
198
- self.jwt_ttl = 0
199
197
  end
200
198
 
201
199
  if attributes.key?(:'name')
@@ -242,8 +242,6 @@ module Akeyless
242
242
 
243
243
  if attributes.key?(:'jwt_ttl')
244
244
  self.jwt_ttl = attributes[:'jwt_ttl']
245
- else
246
- self.jwt_ttl = 0
247
245
  end
248
246
 
249
247
  if attributes.key?(:'name')
@@ -197,8 +197,6 @@ module Akeyless
197
197
 
198
198
  if attributes.key?(:'jwt_ttl')
199
199
  self.jwt_ttl = attributes[:'jwt_ttl']
200
- else
201
- self.jwt_ttl = 0
202
200
  end
203
201
 
204
202
  if attributes.key?(:'name')
@@ -188,8 +188,6 @@ module Akeyless
188
188
 
189
189
  if attributes.key?(:'jwt_ttl')
190
190
  self.jwt_ttl = attributes[:'jwt_ttl']
191
- else
192
- self.jwt_ttl = 0
193
191
  end
194
192
 
195
193
  if attributes.key?(:'name')
@@ -170,8 +170,6 @@ module Akeyless
170
170
 
171
171
  if attributes.key?(:'jwt_ttl')
172
172
  self.jwt_ttl = attributes[:'jwt_ttl']
173
- else
174
- self.jwt_ttl = 0
175
173
  end
176
174
 
177
175
  if attributes.key?(:'name')
@@ -122,8 +122,6 @@ module Akeyless
122
122
 
123
123
  if attributes.key?(:'jwt_ttl')
124
124
  self.jwt_ttl = attributes[:'jwt_ttl']
125
- else
126
- self.jwt_ttl = 0
127
125
  end
128
126
 
129
127
  if attributes.key?(:'name')
@@ -155,8 +155,6 @@ module Akeyless
155
155
 
156
156
  if attributes.key?(:'jwt_ttl')
157
157
  self.jwt_ttl = attributes[:'jwt_ttl']
158
- else
159
- self.jwt_ttl = 0
160
158
  end
161
159
 
162
160
  if attributes.key?(:'name')
@@ -165,8 +165,6 @@ module Akeyless
165
165
 
166
166
  if attributes.key?(:'jwt_ttl')
167
167
  self.jwt_ttl = attributes[:'jwt_ttl']
168
- else
169
- self.jwt_ttl = 0
170
168
  end
171
169
 
172
170
  if attributes.key?(:'name')
@@ -146,8 +146,6 @@ module Akeyless
146
146
 
147
147
  if attributes.key?(:'jwt_ttl')
148
148
  self.jwt_ttl = attributes[:'jwt_ttl']
149
- else
150
- self.jwt_ttl = 0
151
149
  end
152
150
 
153
151
  if attributes.key?(:'name')
@@ -135,8 +135,6 @@ module Akeyless
135
135
 
136
136
  if attributes.key?(:'jwt_ttl')
137
137
  self.jwt_ttl = attributes[:'jwt_ttl']
138
- else
139
- self.jwt_ttl = 0
140
138
  end
141
139
 
142
140
  if attributes.key?(:'name')
@@ -33,6 +33,15 @@ module Akeyless
33
33
  # New target name
34
34
  attr_accessor :new_name
35
35
 
36
+ # The Resource Group name in your Azure subscription
37
+ attr_accessor :resource_group_name
38
+
39
+ # The name of the relevant Resource
40
+ attr_accessor :resource_name
41
+
42
+ # Azure Subscription Id
43
+ attr_accessor :subscription_id
44
+
36
45
  attr_accessor :tenant_id
37
46
 
38
47
  # Authentication token (see `/auth` and `/configure`)
@@ -56,6 +65,9 @@ module Akeyless
56
65
  :'key' => :'key',
57
66
  :'name' => :'name',
58
67
  :'new_name' => :'new-name',
68
+ :'resource_group_name' => :'resource-group-name',
69
+ :'resource_name' => :'resource-name',
70
+ :'subscription_id' => :'subscription-id',
59
71
  :'tenant_id' => :'tenant-id',
60
72
  :'token' => :'token',
61
73
  :'uid_token' => :'uid-token',
@@ -79,6 +91,9 @@ module Akeyless
79
91
  :'key' => :'String',
80
92
  :'name' => :'String',
81
93
  :'new_name' => :'String',
94
+ :'resource_group_name' => :'String',
95
+ :'resource_name' => :'String',
96
+ :'subscription_id' => :'String',
82
97
  :'tenant_id' => :'String',
83
98
  :'token' => :'String',
84
99
  :'uid_token' => :'String',
@@ -136,6 +151,18 @@ module Akeyless
136
151
  self.new_name = attributes[:'new_name']
137
152
  end
138
153
 
154
+ if attributes.key?(:'resource_group_name')
155
+ self.resource_group_name = attributes[:'resource_group_name']
156
+ end
157
+
158
+ if attributes.key?(:'resource_name')
159
+ self.resource_name = attributes[:'resource_name']
160
+ end
161
+
162
+ if attributes.key?(:'subscription_id')
163
+ self.subscription_id = attributes[:'subscription_id']
164
+ end
165
+
139
166
  if attributes.key?(:'tenant_id')
140
167
  self.tenant_id = attributes[:'tenant_id']
141
168
  end
@@ -187,6 +214,9 @@ module Akeyless
187
214
  key == o.key &&
188
215
  name == o.name &&
189
216
  new_name == o.new_name &&
217
+ resource_group_name == o.resource_group_name &&
218
+ resource_name == o.resource_name &&
219
+ subscription_id == o.subscription_id &&
190
220
  tenant_id == o.tenant_id &&
191
221
  token == o.token &&
192
222
  uid_token == o.uid_token &&
@@ -203,7 +233,7 @@ module Akeyless
203
233
  # Calculates hash code according to all attributes.
204
234
  # @return [Integer] Hash code
205
235
  def hash
206
- [client_id, client_secret, comment, keep_prev_version, key, name, new_name, tenant_id, token, uid_token, update_version, use_gw_cloud_identity].hash
236
+ [client_id, client_secret, comment, keep_prev_version, key, name, new_name, resource_group_name, resource_name, subscription_id, tenant_id, token, uid_token, update_version, use_gw_cloud_identity].hash
207
237
  end
208
238
 
209
239
  # Builds the object from hash