akeyless 5.0.19 → 5.0.21

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 (130) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +28 -1
  3. data/docs/CertificateStore.md +2 -0
  4. data/docs/CreateUSC.md +2 -0
  5. data/docs/GCPPayload.md +5 -1
  6. data/docs/GatewayCreateMigration.md +5 -1
  7. data/docs/GatewayUpdateMigration.md +5 -1
  8. data/docs/GatewayUpdateTlsCert.md +2 -0
  9. data/docs/GeneralConfigPart.md +6 -0
  10. data/docs/GetKubeExecCreds.md +1 -1
  11. data/docs/GetPKICertificate.md +1 -1
  12. data/docs/LetsEncryptTargetDetails.md +38 -0
  13. data/docs/PoliciesCreateOutput.md +18 -0
  14. data/docs/PoliciesDelete.md +24 -0
  15. data/docs/PoliciesGet.md +24 -0
  16. data/docs/PoliciesGetOutput.md +18 -0
  17. data/docs/PoliciesList.md +30 -0
  18. data/docs/PoliciesListOutput.md +18 -0
  19. data/docs/PolicyCreateKeys.md +34 -0
  20. data/docs/PolicyOutput.md +34 -0
  21. data/docs/PolicyUpdateKeys.md +36 -0
  22. data/docs/RotatedSecretCreateAws.md +4 -2
  23. data/docs/RotatedSecretCreateAzure.md +4 -2
  24. data/docs/RotatedSecretCreateCassandra.md +1 -1
  25. data/docs/RotatedSecretCreateCustom.md +1 -1
  26. data/docs/RotatedSecretCreateDockerhub.md +1 -1
  27. data/docs/RotatedSecretCreateGcp.md +4 -2
  28. data/docs/RotatedSecretCreateHanadb.md +1 -1
  29. data/docs/RotatedSecretCreateLdap.md +1 -1
  30. data/docs/RotatedSecretCreateMongodb.md +1 -1
  31. data/docs/RotatedSecretCreateMssql.md +1 -1
  32. data/docs/RotatedSecretCreateMysql.md +1 -1
  33. data/docs/RotatedSecretCreateOpenAI.md +1 -1
  34. data/docs/RotatedSecretCreateOracledb.md +1 -1
  35. data/docs/RotatedSecretCreatePostgresql.md +1 -1
  36. data/docs/RotatedSecretCreateRedis.md +1 -1
  37. data/docs/RotatedSecretCreateRedshift.md +1 -1
  38. data/docs/RotatedSecretCreateSnowflake.md +1 -1
  39. data/docs/RotatedSecretCreateSplunk.md +68 -0
  40. data/docs/RotatedSecretCreateSsh.md +1 -1
  41. data/docs/RotatedSecretCreateWindows.md +1 -1
  42. data/docs/RotatedSecretDetailsInfo.md +2 -0
  43. data/docs/RotatedSecretUpdateAws.md +3 -1
  44. data/docs/RotatedSecretUpdateAzure.md +3 -1
  45. data/docs/RotatedSecretUpdateGcp.md +3 -1
  46. data/docs/RotatedSecretUpdateSplunk.md +64 -0
  47. data/docs/SecretInfo.md +2 -0
  48. data/docs/SplunkPayload.md +30 -0
  49. data/docs/SplunkTargetDetails.md +34 -0
  50. data/docs/TargetCreateLetsEncrypt.md +46 -0
  51. data/docs/TargetCreateSplunk.md +42 -0
  52. data/docs/TargetTypeDetailsInput.md +4 -0
  53. data/docs/TargetUpdateLetsEncrypt.md +50 -0
  54. data/docs/UpdateItem.md +2 -0
  55. data/docs/UscCreate.md +2 -0
  56. data/docs/V2Api.md +659 -29
  57. data/lib/akeyless/api/v2_api.rb +640 -0
  58. data/lib/akeyless/models/certificate_store.rb +12 -1
  59. data/lib/akeyless/models/create_usc.rb +11 -1
  60. data/lib/akeyless/models/gateway_create_migration.rb +24 -4
  61. data/lib/akeyless/models/gateway_update_migration.rb +24 -4
  62. data/lib/akeyless/models/gateway_update_tls_cert.rb +13 -1
  63. data/lib/akeyless/models/gcp_payload.rb +22 -4
  64. data/lib/akeyless/models/general_config_part.rb +30 -1
  65. data/lib/akeyless/models/get_kube_exec_creds.rb +1 -1
  66. data/lib/akeyless/models/get_pki_certificate.rb +1 -1
  67. data/lib/akeyless/models/lets_encrypt_target_details.rb +315 -0
  68. data/lib/akeyless/models/policies_create_output.rb +214 -0
  69. data/lib/akeyless/models/policies_delete.rb +254 -0
  70. data/lib/akeyless/models/policies_get.rb +254 -0
  71. data/lib/akeyless/models/policies_get_output.rb +214 -0
  72. data/lib/akeyless/models/policies_list.rb +283 -0
  73. data/lib/akeyless/models/policies_list_output.rb +216 -0
  74. data/lib/akeyless/models/policy_create_keys.rb +312 -0
  75. data/lib/akeyless/models/policy_output.rb +295 -0
  76. data/lib/akeyless/models/policy_update_keys.rb +322 -0
  77. data/lib/akeyless/models/rotated_secret_create_aws.rb +13 -3
  78. data/lib/akeyless/models/rotated_secret_create_azure.rb +13 -3
  79. data/lib/akeyless/models/rotated_secret_create_cassandra.rb +1 -1
  80. data/lib/akeyless/models/rotated_secret_create_custom.rb +1 -1
  81. data/lib/akeyless/models/rotated_secret_create_dockerhub.rb +1 -1
  82. data/lib/akeyless/models/rotated_secret_create_gcp.rb +13 -3
  83. data/lib/akeyless/models/rotated_secret_create_hanadb.rb +1 -1
  84. data/lib/akeyless/models/rotated_secret_create_ldap.rb +1 -1
  85. data/lib/akeyless/models/rotated_secret_create_mongodb.rb +1 -1
  86. data/lib/akeyless/models/rotated_secret_create_mssql.rb +1 -1
  87. data/lib/akeyless/models/rotated_secret_create_mysql.rb +1 -1
  88. data/lib/akeyless/models/rotated_secret_create_open_ai.rb +1 -1
  89. data/lib/akeyless/models/rotated_secret_create_oracledb.rb +1 -1
  90. data/lib/akeyless/models/rotated_secret_create_postgresql.rb +1 -1
  91. data/lib/akeyless/models/rotated_secret_create_redis.rb +1 -1
  92. data/lib/akeyless/models/rotated_secret_create_redshift.rb +1 -1
  93. data/lib/akeyless/models/rotated_secret_create_snowflake.rb +1 -1
  94. data/lib/akeyless/models/rotated_secret_create_splunk.rb +497 -0
  95. data/lib/akeyless/models/rotated_secret_create_ssh.rb +1 -1
  96. data/lib/akeyless/models/rotated_secret_create_windows.rb +1 -1
  97. data/lib/akeyless/models/rotated_secret_details_info.rb +10 -1
  98. data/lib/akeyless/models/rotated_secret_update_aws.rb +12 -2
  99. data/lib/akeyless/models/rotated_secret_update_azure.rb +12 -2
  100. data/lib/akeyless/models/rotated_secret_update_gcp.rb +12 -2
  101. data/lib/akeyless/models/rotated_secret_update_splunk.rb +467 -0
  102. data/lib/akeyless/models/secret_info.rb +10 -1
  103. data/lib/akeyless/models/splunk_payload.rb +268 -0
  104. data/lib/akeyless/models/splunk_target_details.rb +294 -0
  105. data/lib/akeyless/models/target_create_lets_encrypt.rb +368 -0
  106. data/lib/akeyless/models/target_create_splunk.rb +354 -0
  107. data/lib/akeyless/models/target_type_details_input.rb +19 -1
  108. data/lib/akeyless/models/target_update_lets_encrypt.rb +388 -0
  109. data/lib/akeyless/models/update_item.rb +11 -1
  110. data/lib/akeyless/models/usc_create.rb +11 -1
  111. data/lib/akeyless/version.rb +1 -1
  112. data/lib/akeyless.rb +17 -0
  113. data/spec/models/lets_encrypt_target_details_spec.rb +96 -0
  114. data/spec/models/policies_create_output_spec.rb +36 -0
  115. data/spec/models/policies_delete_spec.rb +54 -0
  116. data/spec/models/policies_get_output_spec.rb +36 -0
  117. data/spec/models/policies_get_spec.rb +54 -0
  118. data/spec/models/policies_list_output_spec.rb +36 -0
  119. data/spec/models/policies_list_spec.rb +72 -0
  120. data/spec/models/policy_create_keys_spec.rb +84 -0
  121. data/spec/models/policy_output_spec.rb +84 -0
  122. data/spec/models/policy_update_keys_spec.rb +90 -0
  123. data/spec/models/rotated_secret_create_splunk_spec.rb +186 -0
  124. data/spec/models/rotated_secret_update_splunk_spec.rb +174 -0
  125. data/spec/models/splunk_payload_spec.rb +72 -0
  126. data/spec/models/splunk_target_details_spec.rb +84 -0
  127. data/spec/models/target_create_lets_encrypt_spec.rb +120 -0
  128. data/spec/models/target_create_splunk_spec.rb +108 -0
  129. data/spec/models/target_update_lets_encrypt_spec.rb +132 -0
  130. metadata +69 -1
@@ -0,0 +1,268 @@
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: 3.0
7
+ Contact: support@akeyless.io
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.10.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Akeyless
17
+ class SplunkPayload
18
+ attr_accessor :audience
19
+
20
+ attr_accessor :expiration_date
21
+
22
+ attr_accessor :hec_token_name
23
+
24
+ attr_accessor :token
25
+
26
+ attr_accessor :token_id
27
+
28
+ attr_accessor :token_owner
29
+
30
+ attr_accessor :validity_period_days
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'audience' => :'audience',
36
+ :'expiration_date' => :'expiration_date',
37
+ :'hec_token_name' => :'hec_token_name',
38
+ :'token' => :'token',
39
+ :'token_id' => :'token_id',
40
+ :'token_owner' => :'token_owner',
41
+ :'validity_period_days' => :'validity_period_days'
42
+ }
43
+ end
44
+
45
+ # Returns all the JSON keys this model knows about
46
+ def self.acceptable_attributes
47
+ attribute_map.values
48
+ end
49
+
50
+ # Attribute type mapping.
51
+ def self.openapi_types
52
+ {
53
+ :'audience' => :'String',
54
+ :'expiration_date' => :'String',
55
+ :'hec_token_name' => :'String',
56
+ :'token' => :'String',
57
+ :'token_id' => :'String',
58
+ :'token_owner' => :'String',
59
+ :'validity_period_days' => :'Integer'
60
+ }
61
+ end
62
+
63
+ # List of attributes with nullable: true
64
+ def self.openapi_nullable
65
+ Set.new([
66
+ ])
67
+ end
68
+
69
+ # Initializes the object
70
+ # @param [Hash] attributes Model attributes in the form of hash
71
+ def initialize(attributes = {})
72
+ if (!attributes.is_a?(Hash))
73
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::SplunkPayload` initialize method"
74
+ end
75
+
76
+ # check to see if the attribute exists and convert string to symbol for hash key
77
+ attributes = attributes.each_with_object({}) { |(k, v), h|
78
+ if (!self.class.attribute_map.key?(k.to_sym))
79
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::SplunkPayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
80
+ end
81
+ h[k.to_sym] = v
82
+ }
83
+
84
+ if attributes.key?(:'audience')
85
+ self.audience = attributes[:'audience']
86
+ end
87
+
88
+ if attributes.key?(:'expiration_date')
89
+ self.expiration_date = attributes[:'expiration_date']
90
+ end
91
+
92
+ if attributes.key?(:'hec_token_name')
93
+ self.hec_token_name = attributes[:'hec_token_name']
94
+ end
95
+
96
+ if attributes.key?(:'token')
97
+ self.token = attributes[:'token']
98
+ end
99
+
100
+ if attributes.key?(:'token_id')
101
+ self.token_id = attributes[:'token_id']
102
+ end
103
+
104
+ if attributes.key?(:'token_owner')
105
+ self.token_owner = attributes[:'token_owner']
106
+ end
107
+
108
+ if attributes.key?(:'validity_period_days')
109
+ self.validity_period_days = attributes[:'validity_period_days']
110
+ end
111
+ end
112
+
113
+ # Show invalid properties with the reasons. Usually used together with valid?
114
+ # @return Array for valid properties with the reasons
115
+ def list_invalid_properties
116
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
117
+ invalid_properties = Array.new
118
+ invalid_properties
119
+ end
120
+
121
+ # Check to see if the all the properties in the model are valid
122
+ # @return true if the model is valid
123
+ def valid?
124
+ warn '[DEPRECATED] the `valid?` method is obsolete'
125
+ true
126
+ end
127
+
128
+ # Checks equality by comparing each attribute.
129
+ # @param [Object] Object to be compared
130
+ def ==(o)
131
+ return true if self.equal?(o)
132
+ self.class == o.class &&
133
+ audience == o.audience &&
134
+ expiration_date == o.expiration_date &&
135
+ hec_token_name == o.hec_token_name &&
136
+ token == o.token &&
137
+ token_id == o.token_id &&
138
+ token_owner == o.token_owner &&
139
+ validity_period_days == o.validity_period_days
140
+ end
141
+
142
+ # @see the `==` method
143
+ # @param [Object] Object to be compared
144
+ def eql?(o)
145
+ self == o
146
+ end
147
+
148
+ # Calculates hash code according to all attributes.
149
+ # @return [Integer] Hash code
150
+ def hash
151
+ [audience, expiration_date, hec_token_name, token, token_id, token_owner, validity_period_days].hash
152
+ end
153
+
154
+ # Builds the object from hash
155
+ # @param [Hash] attributes Model attributes in the form of hash
156
+ # @return [Object] Returns the model itself
157
+ def self.build_from_hash(attributes)
158
+ return nil unless attributes.is_a?(Hash)
159
+ attributes = attributes.transform_keys(&:to_sym)
160
+ transformed_hash = {}
161
+ openapi_types.each_pair do |key, type|
162
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
163
+ transformed_hash["#{key}"] = nil
164
+ elsif type =~ /\AArray<(.*)>/i
165
+ # check to ensure the input is an array given that the attribute
166
+ # is documented as an array but the input is not
167
+ if attributes[attribute_map[key]].is_a?(Array)
168
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
169
+ end
170
+ elsif !attributes[attribute_map[key]].nil?
171
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
172
+ end
173
+ end
174
+ new(transformed_hash)
175
+ end
176
+
177
+ # Deserializes the data based on type
178
+ # @param string type Data type
179
+ # @param string value Value to be deserialized
180
+ # @return [Object] Deserialized data
181
+ def self._deserialize(type, value)
182
+ case type.to_sym
183
+ when :Time
184
+ Time.parse(value)
185
+ when :Date
186
+ Date.parse(value)
187
+ when :String
188
+ value.to_s
189
+ when :Integer
190
+ value.to_i
191
+ when :Float
192
+ value.to_f
193
+ when :Boolean
194
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
195
+ true
196
+ else
197
+ false
198
+ end
199
+ when :Object
200
+ # generic object (usually a Hash), return directly
201
+ value
202
+ when /\AArray<(?<inner_type>.+)>\z/
203
+ inner_type = Regexp.last_match[:inner_type]
204
+ value.map { |v| _deserialize(inner_type, v) }
205
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
206
+ k_type = Regexp.last_match[:k_type]
207
+ v_type = Regexp.last_match[:v_type]
208
+ {}.tap do |hash|
209
+ value.each do |k, v|
210
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
211
+ end
212
+ end
213
+ else # model
214
+ # models (e.g. Pet) or oneOf
215
+ klass = Akeyless.const_get(type)
216
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
217
+ end
218
+ end
219
+
220
+ # Returns the string representation of the object
221
+ # @return [String] String presentation of the object
222
+ def to_s
223
+ to_hash.to_s
224
+ end
225
+
226
+ # to_body is an alias to to_hash (backward compatibility)
227
+ # @return [Hash] Returns the object in the form of hash
228
+ def to_body
229
+ to_hash
230
+ end
231
+
232
+ # Returns the object in the form of hash
233
+ # @return [Hash] Returns the object in the form of hash
234
+ def to_hash
235
+ hash = {}
236
+ self.class.attribute_map.each_pair do |attr, param|
237
+ value = self.send(attr)
238
+ if value.nil?
239
+ is_nullable = self.class.openapi_nullable.include?(attr)
240
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
241
+ end
242
+
243
+ hash[param] = _to_hash(value)
244
+ end
245
+ hash
246
+ end
247
+
248
+ # Outputs non-array value in the form of hash
249
+ # For object, use to_hash. Otherwise, just return the value
250
+ # @param [Object] value Any valid value
251
+ # @return [Hash] Returns the value in the form of hash
252
+ def _to_hash(value)
253
+ if value.is_a?(Array)
254
+ value.compact.map { |v| _to_hash(v) }
255
+ elsif value.is_a?(Hash)
256
+ {}.tap do |hash|
257
+ value.each { |k, v| hash[k] = _to_hash(v) }
258
+ end
259
+ elsif value.respond_to? :to_hash
260
+ value.to_hash
261
+ else
262
+ value
263
+ end
264
+ end
265
+
266
+ end
267
+
268
+ end
@@ -0,0 +1,294 @@
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: 3.0
7
+ Contact: support@akeyless.io
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.10.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Akeyless
17
+ # SplunkTargetDetails defines details related to connecting to a Splunk server
18
+ class SplunkTargetDetails
19
+ # Token audience
20
+ attr_accessor :audience
21
+
22
+ # Authentication mode: \"username\" or \"token\"
23
+ attr_accessor :auth_mode
24
+
25
+ attr_accessor :password
26
+
27
+ attr_accessor :splunk_payload
28
+
29
+ # Splunk server URL
30
+ attr_accessor :splunk_url
31
+
32
+ # Token is used when AuthMode == \"token\"
33
+ attr_accessor :token
34
+
35
+ # Token owner (the Splunk user who owns the token, required for token rotation)
36
+ attr_accessor :token_owner
37
+
38
+ # Use TLS certificate verification when connecting to the Splunk management API.
39
+ attr_accessor :use_tls
40
+
41
+ # Username & Password are used when AuthMode == \"username\"
42
+ attr_accessor :username
43
+
44
+ # Attribute mapping from ruby-style variable name to JSON key.
45
+ def self.attribute_map
46
+ {
47
+ :'audience' => :'audience',
48
+ :'auth_mode' => :'auth_mode',
49
+ :'password' => :'password',
50
+ :'splunk_payload' => :'splunk_payload',
51
+ :'splunk_url' => :'splunk_url',
52
+ :'token' => :'token',
53
+ :'token_owner' => :'token_owner',
54
+ :'use_tls' => :'use_tls',
55
+ :'username' => :'username'
56
+ }
57
+ end
58
+
59
+ # Returns all the JSON keys this model knows about
60
+ def self.acceptable_attributes
61
+ attribute_map.values
62
+ end
63
+
64
+ # Attribute type mapping.
65
+ def self.openapi_types
66
+ {
67
+ :'audience' => :'String',
68
+ :'auth_mode' => :'String',
69
+ :'password' => :'String',
70
+ :'splunk_payload' => :'SplunkPayload',
71
+ :'splunk_url' => :'String',
72
+ :'token' => :'String',
73
+ :'token_owner' => :'String',
74
+ :'use_tls' => :'Boolean',
75
+ :'username' => :'String'
76
+ }
77
+ end
78
+
79
+ # List of attributes with nullable: true
80
+ def self.openapi_nullable
81
+ Set.new([
82
+ ])
83
+ end
84
+
85
+ # Initializes the object
86
+ # @param [Hash] attributes Model attributes in the form of hash
87
+ def initialize(attributes = {})
88
+ if (!attributes.is_a?(Hash))
89
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::SplunkTargetDetails` initialize method"
90
+ end
91
+
92
+ # check to see if the attribute exists and convert string to symbol for hash key
93
+ attributes = attributes.each_with_object({}) { |(k, v), h|
94
+ if (!self.class.attribute_map.key?(k.to_sym))
95
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::SplunkTargetDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
96
+ end
97
+ h[k.to_sym] = v
98
+ }
99
+
100
+ if attributes.key?(:'audience')
101
+ self.audience = attributes[:'audience']
102
+ end
103
+
104
+ if attributes.key?(:'auth_mode')
105
+ self.auth_mode = attributes[:'auth_mode']
106
+ end
107
+
108
+ if attributes.key?(:'password')
109
+ self.password = attributes[:'password']
110
+ end
111
+
112
+ if attributes.key?(:'splunk_payload')
113
+ self.splunk_payload = attributes[:'splunk_payload']
114
+ end
115
+
116
+ if attributes.key?(:'splunk_url')
117
+ self.splunk_url = attributes[:'splunk_url']
118
+ end
119
+
120
+ if attributes.key?(:'token')
121
+ self.token = attributes[:'token']
122
+ end
123
+
124
+ if attributes.key?(:'token_owner')
125
+ self.token_owner = attributes[:'token_owner']
126
+ end
127
+
128
+ if attributes.key?(:'use_tls')
129
+ self.use_tls = attributes[:'use_tls']
130
+ end
131
+
132
+ if attributes.key?(:'username')
133
+ self.username = attributes[:'username']
134
+ end
135
+ end
136
+
137
+ # Show invalid properties with the reasons. Usually used together with valid?
138
+ # @return Array for valid properties with the reasons
139
+ def list_invalid_properties
140
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
141
+ invalid_properties = Array.new
142
+ invalid_properties
143
+ end
144
+
145
+ # Check to see if the all the properties in the model are valid
146
+ # @return true if the model is valid
147
+ def valid?
148
+ warn '[DEPRECATED] the `valid?` method is obsolete'
149
+ true
150
+ end
151
+
152
+ # Checks equality by comparing each attribute.
153
+ # @param [Object] Object to be compared
154
+ def ==(o)
155
+ return true if self.equal?(o)
156
+ self.class == o.class &&
157
+ audience == o.audience &&
158
+ auth_mode == o.auth_mode &&
159
+ password == o.password &&
160
+ splunk_payload == o.splunk_payload &&
161
+ splunk_url == o.splunk_url &&
162
+ token == o.token &&
163
+ token_owner == o.token_owner &&
164
+ use_tls == o.use_tls &&
165
+ username == o.username
166
+ end
167
+
168
+ # @see the `==` method
169
+ # @param [Object] Object to be compared
170
+ def eql?(o)
171
+ self == o
172
+ end
173
+
174
+ # Calculates hash code according to all attributes.
175
+ # @return [Integer] Hash code
176
+ def hash
177
+ [audience, auth_mode, password, splunk_payload, splunk_url, token, token_owner, use_tls, username].hash
178
+ end
179
+
180
+ # Builds the object from hash
181
+ # @param [Hash] attributes Model attributes in the form of hash
182
+ # @return [Object] Returns the model itself
183
+ def self.build_from_hash(attributes)
184
+ return nil unless attributes.is_a?(Hash)
185
+ attributes = attributes.transform_keys(&:to_sym)
186
+ transformed_hash = {}
187
+ openapi_types.each_pair do |key, type|
188
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
189
+ transformed_hash["#{key}"] = nil
190
+ elsif type =~ /\AArray<(.*)>/i
191
+ # check to ensure the input is an array given that the attribute
192
+ # is documented as an array but the input is not
193
+ if attributes[attribute_map[key]].is_a?(Array)
194
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
195
+ end
196
+ elsif !attributes[attribute_map[key]].nil?
197
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
198
+ end
199
+ end
200
+ new(transformed_hash)
201
+ end
202
+
203
+ # Deserializes the data based on type
204
+ # @param string type Data type
205
+ # @param string value Value to be deserialized
206
+ # @return [Object] Deserialized data
207
+ def self._deserialize(type, value)
208
+ case type.to_sym
209
+ when :Time
210
+ Time.parse(value)
211
+ when :Date
212
+ Date.parse(value)
213
+ when :String
214
+ value.to_s
215
+ when :Integer
216
+ value.to_i
217
+ when :Float
218
+ value.to_f
219
+ when :Boolean
220
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
221
+ true
222
+ else
223
+ false
224
+ end
225
+ when :Object
226
+ # generic object (usually a Hash), return directly
227
+ value
228
+ when /\AArray<(?<inner_type>.+)>\z/
229
+ inner_type = Regexp.last_match[:inner_type]
230
+ value.map { |v| _deserialize(inner_type, v) }
231
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
232
+ k_type = Regexp.last_match[:k_type]
233
+ v_type = Regexp.last_match[:v_type]
234
+ {}.tap do |hash|
235
+ value.each do |k, v|
236
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
237
+ end
238
+ end
239
+ else # model
240
+ # models (e.g. Pet) or oneOf
241
+ klass = Akeyless.const_get(type)
242
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
243
+ end
244
+ end
245
+
246
+ # Returns the string representation of the object
247
+ # @return [String] String presentation of the object
248
+ def to_s
249
+ to_hash.to_s
250
+ end
251
+
252
+ # to_body is an alias to to_hash (backward compatibility)
253
+ # @return [Hash] Returns the object in the form of hash
254
+ def to_body
255
+ to_hash
256
+ end
257
+
258
+ # Returns the object in the form of hash
259
+ # @return [Hash] Returns the object in the form of hash
260
+ def to_hash
261
+ hash = {}
262
+ self.class.attribute_map.each_pair do |attr, param|
263
+ value = self.send(attr)
264
+ if value.nil?
265
+ is_nullable = self.class.openapi_nullable.include?(attr)
266
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
267
+ end
268
+
269
+ hash[param] = _to_hash(value)
270
+ end
271
+ hash
272
+ end
273
+
274
+ # Outputs non-array value in the form of hash
275
+ # For object, use to_hash. Otherwise, just return the value
276
+ # @param [Object] value Any valid value
277
+ # @return [Hash] Returns the value in the form of hash
278
+ def _to_hash(value)
279
+ if value.is_a?(Array)
280
+ value.compact.map { |v| _to_hash(v) }
281
+ elsif value.is_a?(Hash)
282
+ {}.tap do |hash|
283
+ value.each { |k, v| hash[k] = _to_hash(v) }
284
+ end
285
+ elsif value.respond_to? :to_hash
286
+ value.to_hash
287
+ else
288
+ value
289
+ end
290
+ end
291
+
292
+ end
293
+
294
+ end