akeyless 5.0.27 → 5.0.28

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 (128) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +15 -1
  3. data/docs/AccountGeneralSettings.md +2 -0
  4. data/docs/EsmGetSecretOutput.md +7 -1
  5. data/docs/FolderDeleteSync.md +32 -0
  6. data/docs/FolderDeleteSyncOutput.md +24 -0
  7. data/docs/FolderSync.md +34 -0
  8. data/docs/FolderSyncAll.md +26 -0
  9. data/docs/FolderSyncAllOutput.md +18 -0
  10. data/docs/FolderSyncOutput.md +24 -0
  11. data/docs/FolderUSCSyncConfig.md +2 -0
  12. data/docs/OIDCAccessRules.md +2 -0
  13. data/docs/PersonalFolderGlobalMappingSettings.md +20 -0
  14. data/docs/RotatedSecretCreateAws.md +4 -4
  15. data/docs/RotatedSecretCreateAzure.md +6 -4
  16. data/docs/RotatedSecretCreateCassandra.md +4 -4
  17. data/docs/RotatedSecretCreateCustom.md +4 -4
  18. data/docs/RotatedSecretCreateDockerhub.md +4 -4
  19. data/docs/RotatedSecretCreateGcp.md +4 -4
  20. data/docs/RotatedSecretCreateHanadb.md +4 -4
  21. data/docs/RotatedSecretCreateHashiVault.md +60 -0
  22. data/docs/RotatedSecretCreateLdap.md +4 -4
  23. data/docs/RotatedSecretCreateMongodb.md +4 -4
  24. data/docs/RotatedSecretCreateMssql.md +4 -4
  25. data/docs/RotatedSecretCreateMysql.md +4 -4
  26. data/docs/RotatedSecretCreateOpenAI.md +4 -4
  27. data/docs/RotatedSecretCreateOracledb.md +4 -4
  28. data/docs/RotatedSecretCreatePostgresql.md +4 -4
  29. data/docs/RotatedSecretCreateRedis.md +4 -4
  30. data/docs/RotatedSecretCreateRedshift.md +4 -4
  31. data/docs/RotatedSecretCreateSnowflake.md +4 -4
  32. data/docs/RotatedSecretCreateSplunk.md +4 -4
  33. data/docs/RotatedSecretCreateSsh.md +4 -4
  34. data/docs/RotatedSecretCreateWindows.md +4 -4
  35. data/docs/RotatedSecretUpdateAws.md +4 -4
  36. data/docs/RotatedSecretUpdateAzure.md +6 -4
  37. data/docs/RotatedSecretUpdateCassandra.md +4 -4
  38. data/docs/RotatedSecretUpdateCustom.md +4 -4
  39. data/docs/RotatedSecretUpdateDockerhub.md +4 -4
  40. data/docs/RotatedSecretUpdateGcp.md +4 -4
  41. data/docs/RotatedSecretUpdateHanadb.md +4 -4
  42. data/docs/RotatedSecretUpdateHashiVault.md +64 -0
  43. data/docs/RotatedSecretUpdateLdap.md +4 -4
  44. data/docs/RotatedSecretUpdateMongodb.md +4 -4
  45. data/docs/RotatedSecretUpdateMssql.md +4 -4
  46. data/docs/RotatedSecretUpdateMysql.md +4 -4
  47. data/docs/RotatedSecretUpdateOpenAI.md +4 -4
  48. data/docs/RotatedSecretUpdateOracledb.md +4 -4
  49. data/docs/RotatedSecretUpdatePostgresql.md +4 -4
  50. data/docs/RotatedSecretUpdateRedis.md +4 -4
  51. data/docs/RotatedSecretUpdateRedshift.md +4 -4
  52. data/docs/RotatedSecretUpdateSnowflake.md +4 -4
  53. data/docs/RotatedSecretUpdateSplunk.md +4 -4
  54. data/docs/RotatedSecretUpdateSsh.md +4 -4
  55. data/docs/RotatedSecretUpdateWindows.md +4 -4
  56. data/docs/SecretInfo.md +5 -1
  57. data/docs/UscGetSecretOutput.md +7 -1
  58. data/docs/V2Api.md +315 -0
  59. data/lib/akeyless/api/v2_api.rb +320 -0
  60. data/lib/akeyless/models/account_general_settings.rb +10 -1
  61. data/lib/akeyless/models/esm_get_secret_output.rb +35 -4
  62. data/lib/akeyless/models/folder_delete_sync.rb +305 -0
  63. data/lib/akeyless/models/folder_delete_sync_output.rb +245 -0
  64. data/lib/akeyless/models/folder_sync.rb +306 -0
  65. data/lib/akeyless/models/folder_sync_all.rb +266 -0
  66. data/lib/akeyless/models/folder_sync_all_output.rb +214 -0
  67. data/lib/akeyless/models/folder_sync_output.rb +247 -0
  68. data/lib/akeyless/models/folder_usc_sync_config.rb +10 -1
  69. data/lib/akeyless/models/oidc_access_rules.rb +11 -1
  70. data/lib/akeyless/models/personal_folder_global_mapping_settings.rb +223 -0
  71. data/lib/akeyless/models/rotated_secret_create_aws.rb +0 -4
  72. data/lib/akeyless/models/rotated_secret_create_azure.rb +11 -5
  73. data/lib/akeyless/models/rotated_secret_create_cassandra.rb +0 -4
  74. data/lib/akeyless/models/rotated_secret_create_custom.rb +0 -4
  75. data/lib/akeyless/models/rotated_secret_create_dockerhub.rb +0 -4
  76. data/lib/akeyless/models/rotated_secret_create_gcp.rb +0 -4
  77. data/lib/akeyless/models/rotated_secret_create_hanadb.rb +0 -4
  78. data/lib/akeyless/models/rotated_secret_create_hashi_vault.rb +446 -0
  79. data/lib/akeyless/models/rotated_secret_create_ldap.rb +0 -4
  80. data/lib/akeyless/models/rotated_secret_create_mongodb.rb +0 -4
  81. data/lib/akeyless/models/rotated_secret_create_mssql.rb +0 -4
  82. data/lib/akeyless/models/rotated_secret_create_mysql.rb +0 -4
  83. data/lib/akeyless/models/rotated_secret_create_open_ai.rb +0 -4
  84. data/lib/akeyless/models/rotated_secret_create_oracledb.rb +0 -4
  85. data/lib/akeyless/models/rotated_secret_create_postgresql.rb +0 -4
  86. data/lib/akeyless/models/rotated_secret_create_redis.rb +0 -4
  87. data/lib/akeyless/models/rotated_secret_create_redshift.rb +0 -4
  88. data/lib/akeyless/models/rotated_secret_create_snowflake.rb +0 -4
  89. data/lib/akeyless/models/rotated_secret_create_splunk.rb +0 -4
  90. data/lib/akeyless/models/rotated_secret_create_ssh.rb +0 -4
  91. data/lib/akeyless/models/rotated_secret_create_windows.rb +0 -4
  92. data/lib/akeyless/models/rotated_secret_sync.rb +1 -1
  93. data/lib/akeyless/models/rotated_secret_update_aws.rb +0 -4
  94. data/lib/akeyless/models/rotated_secret_update_azure.rb +11 -5
  95. data/lib/akeyless/models/rotated_secret_update_cassandra.rb +0 -4
  96. data/lib/akeyless/models/rotated_secret_update_custom.rb +0 -4
  97. data/lib/akeyless/models/rotated_secret_update_dockerhub.rb +0 -4
  98. data/lib/akeyless/models/rotated_secret_update_gcp.rb +0 -4
  99. data/lib/akeyless/models/rotated_secret_update_hanadb.rb +0 -4
  100. data/lib/akeyless/models/rotated_secret_update_hashi_vault.rb +463 -0
  101. data/lib/akeyless/models/rotated_secret_update_ldap.rb +0 -4
  102. data/lib/akeyless/models/rotated_secret_update_mongodb.rb +0 -4
  103. data/lib/akeyless/models/rotated_secret_update_mssql.rb +0 -4
  104. data/lib/akeyless/models/rotated_secret_update_mysql.rb +0 -4
  105. data/lib/akeyless/models/rotated_secret_update_open_ai.rb +0 -4
  106. data/lib/akeyless/models/rotated_secret_update_oracledb.rb +0 -4
  107. data/lib/akeyless/models/rotated_secret_update_postgresql.rb +0 -4
  108. data/lib/akeyless/models/rotated_secret_update_redis.rb +0 -4
  109. data/lib/akeyless/models/rotated_secret_update_redshift.rb +0 -4
  110. data/lib/akeyless/models/rotated_secret_update_snowflake.rb +0 -4
  111. data/lib/akeyless/models/rotated_secret_update_splunk.rb +0 -4
  112. data/lib/akeyless/models/rotated_secret_update_ssh.rb +0 -4
  113. data/lib/akeyless/models/rotated_secret_update_windows.rb +0 -4
  114. data/lib/akeyless/models/secret_info.rb +24 -4
  115. data/lib/akeyless/models/static_secret_sync.rb +1 -1
  116. data/lib/akeyless/models/usc_get_secret_output.rb +35 -4
  117. data/lib/akeyless/version.rb +1 -1
  118. data/lib/akeyless.rb +9 -0
  119. data/spec/models/folder_delete_sync_output_spec.rb +54 -0
  120. data/spec/models/folder_delete_sync_spec.rb +78 -0
  121. data/spec/models/folder_sync_all_output_spec.rb +36 -0
  122. data/spec/models/folder_sync_all_spec.rb +60 -0
  123. data/spec/models/folder_sync_output_spec.rb +54 -0
  124. data/spec/models/folder_sync_spec.rb +84 -0
  125. data/spec/models/personal_folder_global_mapping_settings_spec.rb +42 -0
  126. data/spec/models/rotated_secret_create_hashi_vault_spec.rb +162 -0
  127. data/spec/models/rotated_secret_update_hashi_vault_spec.rb +174 -0
  128. metadata +38 -2
@@ -0,0 +1,305 @@
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 FolderDeleteSync
18
+ # for personal password manager
19
+ attr_accessor :accessibility
20
+
21
+ # Delete the secrets from the remote target usc as well
22
+ attr_accessor :delete_from_usc
23
+
24
+ # Set output format to JSON
25
+ attr_accessor :json
26
+
27
+ # Folder name
28
+ attr_accessor :name
29
+
30
+ # Remote Secret Name to delete when multiple syncs exist under the same USC
31
+ attr_accessor :remote_secret_name
32
+
33
+ # Authentication token (see `/auth` and `/configure`)
34
+ attr_accessor :token
35
+
36
+ # The universal identity token, Required only for universal_identity authentication
37
+ attr_accessor :uid_token
38
+
39
+ # Universal Secret Connector name
40
+ attr_accessor :usc_name
41
+
42
+ # Attribute mapping from ruby-style variable name to JSON key.
43
+ def self.attribute_map
44
+ {
45
+ :'accessibility' => :'accessibility',
46
+ :'delete_from_usc' => :'delete-from-usc',
47
+ :'json' => :'json',
48
+ :'name' => :'name',
49
+ :'remote_secret_name' => :'remote-secret-name',
50
+ :'token' => :'token',
51
+ :'uid_token' => :'uid-token',
52
+ :'usc_name' => :'usc-name'
53
+ }
54
+ end
55
+
56
+ # Returns all the JSON keys this model knows about
57
+ def self.acceptable_attributes
58
+ attribute_map.values
59
+ end
60
+
61
+ # Attribute type mapping.
62
+ def self.openapi_types
63
+ {
64
+ :'accessibility' => :'String',
65
+ :'delete_from_usc' => :'Boolean',
66
+ :'json' => :'Boolean',
67
+ :'name' => :'String',
68
+ :'remote_secret_name' => :'String',
69
+ :'token' => :'String',
70
+ :'uid_token' => :'String',
71
+ :'usc_name' => :'String'
72
+ }
73
+ end
74
+
75
+ # List of attributes with nullable: true
76
+ def self.openapi_nullable
77
+ Set.new([
78
+ ])
79
+ end
80
+
81
+ # Initializes the object
82
+ # @param [Hash] attributes Model attributes in the form of hash
83
+ def initialize(attributes = {})
84
+ if (!attributes.is_a?(Hash))
85
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::FolderDeleteSync` initialize method"
86
+ end
87
+
88
+ # check to see if the attribute exists and convert string to symbol for hash key
89
+ attributes = attributes.each_with_object({}) { |(k, v), h|
90
+ if (!self.class.attribute_map.key?(k.to_sym))
91
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::FolderDeleteSync`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
92
+ end
93
+ h[k.to_sym] = v
94
+ }
95
+
96
+ if attributes.key?(:'accessibility')
97
+ self.accessibility = attributes[:'accessibility']
98
+ else
99
+ self.accessibility = 'regular'
100
+ end
101
+
102
+ if attributes.key?(:'delete_from_usc')
103
+ self.delete_from_usc = attributes[:'delete_from_usc']
104
+ else
105
+ self.delete_from_usc = false
106
+ end
107
+
108
+ if attributes.key?(:'json')
109
+ self.json = attributes[:'json']
110
+ else
111
+ self.json = false
112
+ end
113
+
114
+ if attributes.key?(:'name')
115
+ self.name = attributes[:'name']
116
+ else
117
+ self.name = nil
118
+ end
119
+
120
+ if attributes.key?(:'remote_secret_name')
121
+ self.remote_secret_name = attributes[:'remote_secret_name']
122
+ end
123
+
124
+ if attributes.key?(:'token')
125
+ self.token = attributes[:'token']
126
+ end
127
+
128
+ if attributes.key?(:'uid_token')
129
+ self.uid_token = attributes[:'uid_token']
130
+ end
131
+
132
+ if attributes.key?(:'usc_name')
133
+ self.usc_name = attributes[:'usc_name']
134
+ else
135
+ self.usc_name = nil
136
+ end
137
+ end
138
+
139
+ # Show invalid properties with the reasons. Usually used together with valid?
140
+ # @return Array for valid properties with the reasons
141
+ def list_invalid_properties
142
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
143
+ invalid_properties = Array.new
144
+ if @name.nil?
145
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
146
+ end
147
+
148
+ if @usc_name.nil?
149
+ invalid_properties.push('invalid value for "usc_name", usc_name cannot be nil.')
150
+ end
151
+
152
+ invalid_properties
153
+ end
154
+
155
+ # Check to see if the all the properties in the model are valid
156
+ # @return true if the model is valid
157
+ def valid?
158
+ warn '[DEPRECATED] the `valid?` method is obsolete'
159
+ return false if @name.nil?
160
+ return false if @usc_name.nil?
161
+ true
162
+ end
163
+
164
+ # Checks equality by comparing each attribute.
165
+ # @param [Object] Object to be compared
166
+ def ==(o)
167
+ return true if self.equal?(o)
168
+ self.class == o.class &&
169
+ accessibility == o.accessibility &&
170
+ delete_from_usc == o.delete_from_usc &&
171
+ json == o.json &&
172
+ name == o.name &&
173
+ remote_secret_name == o.remote_secret_name &&
174
+ token == o.token &&
175
+ uid_token == o.uid_token &&
176
+ usc_name == o.usc_name
177
+ end
178
+
179
+ # @see the `==` method
180
+ # @param [Object] Object to be compared
181
+ def eql?(o)
182
+ self == o
183
+ end
184
+
185
+ # Calculates hash code according to all attributes.
186
+ # @return [Integer] Hash code
187
+ def hash
188
+ [accessibility, delete_from_usc, json, name, remote_secret_name, token, uid_token, usc_name].hash
189
+ end
190
+
191
+ # Builds the object from hash
192
+ # @param [Hash] attributes Model attributes in the form of hash
193
+ # @return [Object] Returns the model itself
194
+ def self.build_from_hash(attributes)
195
+ return nil unless attributes.is_a?(Hash)
196
+ attributes = attributes.transform_keys(&:to_sym)
197
+ transformed_hash = {}
198
+ openapi_types.each_pair do |key, type|
199
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
200
+ transformed_hash["#{key}"] = nil
201
+ elsif type =~ /\AArray<(.*)>/i
202
+ # check to ensure the input is an array given that the attribute
203
+ # is documented as an array but the input is not
204
+ if attributes[attribute_map[key]].is_a?(Array)
205
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
206
+ end
207
+ elsif !attributes[attribute_map[key]].nil?
208
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
209
+ end
210
+ end
211
+ new(transformed_hash)
212
+ end
213
+
214
+ # Deserializes the data based on type
215
+ # @param string type Data type
216
+ # @param string value Value to be deserialized
217
+ # @return [Object] Deserialized data
218
+ def self._deserialize(type, value)
219
+ case type.to_sym
220
+ when :Time
221
+ Time.parse(value)
222
+ when :Date
223
+ Date.parse(value)
224
+ when :String
225
+ value.to_s
226
+ when :Integer
227
+ value.to_i
228
+ when :Float
229
+ value.to_f
230
+ when :Boolean
231
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
232
+ true
233
+ else
234
+ false
235
+ end
236
+ when :Object
237
+ # generic object (usually a Hash), return directly
238
+ value
239
+ when /\AArray<(?<inner_type>.+)>\z/
240
+ inner_type = Regexp.last_match[:inner_type]
241
+ value.map { |v| _deserialize(inner_type, v) }
242
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
243
+ k_type = Regexp.last_match[:k_type]
244
+ v_type = Regexp.last_match[:v_type]
245
+ {}.tap do |hash|
246
+ value.each do |k, v|
247
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
248
+ end
249
+ end
250
+ else # model
251
+ # models (e.g. Pet) or oneOf
252
+ klass = Akeyless.const_get(type)
253
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
254
+ end
255
+ end
256
+
257
+ # Returns the string representation of the object
258
+ # @return [String] String presentation of the object
259
+ def to_s
260
+ to_hash.to_s
261
+ end
262
+
263
+ # to_body is an alias to to_hash (backward compatibility)
264
+ # @return [Hash] Returns the object in the form of hash
265
+ def to_body
266
+ to_hash
267
+ end
268
+
269
+ # Returns the object in the form of hash
270
+ # @return [Hash] Returns the object in the form of hash
271
+ def to_hash
272
+ hash = {}
273
+ self.class.attribute_map.each_pair do |attr, param|
274
+ value = self.send(attr)
275
+ if value.nil?
276
+ is_nullable = self.class.openapi_nullable.include?(attr)
277
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
278
+ end
279
+
280
+ hash[param] = _to_hash(value)
281
+ end
282
+ hash
283
+ end
284
+
285
+ # Outputs non-array value in the form of hash
286
+ # For object, use to_hash. Otherwise, just return the value
287
+ # @param [Object] value Any valid value
288
+ # @return [Hash] Returns the value in the form of hash
289
+ def _to_hash(value)
290
+ if value.is_a?(Array)
291
+ value.compact.map { |v| _to_hash(v) }
292
+ elsif value.is_a?(Hash)
293
+ {}.tap do |hash|
294
+ value.each { |k, v| hash[k] = _to_hash(v) }
295
+ end
296
+ elsif value.respond_to? :to_hash
297
+ value.to_hash
298
+ else
299
+ value
300
+ end
301
+ end
302
+
303
+ end
304
+
305
+ end
@@ -0,0 +1,245 @@
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 FolderDeleteSyncOutput
18
+ attr_accessor :deleted_syncs
19
+
20
+ attr_accessor :failed_items
21
+
22
+ attr_accessor :folder_name
23
+
24
+ attr_accessor :usc_name
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'deleted_syncs' => :'deleted_syncs',
30
+ :'failed_items' => :'failed_items',
31
+ :'folder_name' => :'folder_name',
32
+ :'usc_name' => :'usc_name'
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
+ :'deleted_syncs' => :'Array<String>',
45
+ :'failed_items' => :'Hash<String, String>',
46
+ :'folder_name' => :'String',
47
+ :'usc_name' => :'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::FolderDeleteSyncOutput` 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::FolderDeleteSyncOutput`. 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?(:'deleted_syncs')
73
+ if (value = attributes[:'deleted_syncs']).is_a?(Array)
74
+ self.deleted_syncs = value
75
+ end
76
+ end
77
+
78
+ if attributes.key?(:'failed_items')
79
+ if (value = attributes[:'failed_items']).is_a?(Hash)
80
+ self.failed_items = value
81
+ end
82
+ end
83
+
84
+ if attributes.key?(:'folder_name')
85
+ self.folder_name = attributes[:'folder_name']
86
+ end
87
+
88
+ if attributes.key?(:'usc_name')
89
+ self.usc_name = attributes[:'usc_name']
90
+ end
91
+ end
92
+
93
+ # Show invalid properties with the reasons. Usually used together with valid?
94
+ # @return Array for valid properties with the reasons
95
+ def list_invalid_properties
96
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
97
+ invalid_properties = Array.new
98
+ invalid_properties
99
+ end
100
+
101
+ # Check to see if the all the properties in the model are valid
102
+ # @return true if the model is valid
103
+ def valid?
104
+ warn '[DEPRECATED] the `valid?` method is obsolete'
105
+ true
106
+ end
107
+
108
+ # Checks equality by comparing each attribute.
109
+ # @param [Object] Object to be compared
110
+ def ==(o)
111
+ return true if self.equal?(o)
112
+ self.class == o.class &&
113
+ deleted_syncs == o.deleted_syncs &&
114
+ failed_items == o.failed_items &&
115
+ folder_name == o.folder_name &&
116
+ usc_name == o.usc_name
117
+ end
118
+
119
+ # @see the `==` method
120
+ # @param [Object] Object to be compared
121
+ def eql?(o)
122
+ self == o
123
+ end
124
+
125
+ # Calculates hash code according to all attributes.
126
+ # @return [Integer] Hash code
127
+ def hash
128
+ [deleted_syncs, failed_items, folder_name, usc_name].hash
129
+ end
130
+
131
+ # Builds the object from hash
132
+ # @param [Hash] attributes Model attributes in the form of hash
133
+ # @return [Object] Returns the model itself
134
+ def self.build_from_hash(attributes)
135
+ return nil unless attributes.is_a?(Hash)
136
+ attributes = attributes.transform_keys(&:to_sym)
137
+ transformed_hash = {}
138
+ openapi_types.each_pair do |key, type|
139
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
140
+ transformed_hash["#{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[attribute_map[key]].is_a?(Array)
145
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
146
+ end
147
+ elsif !attributes[attribute_map[key]].nil?
148
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
149
+ end
150
+ end
151
+ new(transformed_hash)
152
+ end
153
+
154
+ # Deserializes the data based on type
155
+ # @param string type Data type
156
+ # @param string value Value to be deserialized
157
+ # @return [Object] Deserialized data
158
+ def self._deserialize(type, value)
159
+ case type.to_sym
160
+ when :Time
161
+ Time.parse(value)
162
+ when :Date
163
+ Date.parse(value)
164
+ when :String
165
+ value.to_s
166
+ when :Integer
167
+ value.to_i
168
+ when :Float
169
+ value.to_f
170
+ when :Boolean
171
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
172
+ true
173
+ else
174
+ false
175
+ end
176
+ when :Object
177
+ # generic object (usually a Hash), return directly
178
+ value
179
+ when /\AArray<(?<inner_type>.+)>\z/
180
+ inner_type = Regexp.last_match[:inner_type]
181
+ value.map { |v| _deserialize(inner_type, v) }
182
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
183
+ k_type = Regexp.last_match[:k_type]
184
+ v_type = Regexp.last_match[:v_type]
185
+ {}.tap do |hash|
186
+ value.each do |k, v|
187
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
188
+ end
189
+ end
190
+ else # model
191
+ # models (e.g. Pet) or oneOf
192
+ klass = Akeyless.const_get(type)
193
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
194
+ end
195
+ end
196
+
197
+ # Returns the string representation of the object
198
+ # @return [String] String presentation of the object
199
+ def to_s
200
+ to_hash.to_s
201
+ end
202
+
203
+ # to_body is an alias to to_hash (backward compatibility)
204
+ # @return [Hash] Returns the object in the form of hash
205
+ def to_body
206
+ to_hash
207
+ end
208
+
209
+ # Returns the object in the form of hash
210
+ # @return [Hash] Returns the object in the form of hash
211
+ def to_hash
212
+ hash = {}
213
+ self.class.attribute_map.each_pair do |attr, param|
214
+ value = self.send(attr)
215
+ if value.nil?
216
+ is_nullable = self.class.openapi_nullable.include?(attr)
217
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
218
+ end
219
+
220
+ hash[param] = _to_hash(value)
221
+ end
222
+ hash
223
+ end
224
+
225
+ # Outputs non-array value in the form of hash
226
+ # For object, use to_hash. Otherwise, just return the value
227
+ # @param [Object] value Any valid value
228
+ # @return [Hash] Returns the value in the form of hash
229
+ def _to_hash(value)
230
+ if value.is_a?(Array)
231
+ value.compact.map { |v| _to_hash(v) }
232
+ elsif value.is_a?(Hash)
233
+ {}.tap do |hash|
234
+ value.each { |k, v| hash[k] = _to_hash(v) }
235
+ end
236
+ elsif value.respond_to? :to_hash
237
+ value.to_hash
238
+ else
239
+ value
240
+ end
241
+ end
242
+
243
+ end
244
+
245
+ end