sendmux-mailbox 1.0.0

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 (139) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +12 -0
  3. data/README.md +3 -0
  4. data/lib/sendmux/mailbox/client.rb +34 -0
  5. data/lib/sendmux/mailbox/version.rb +7 -0
  6. data/lib/sendmux/mailbox.rb +12 -0
  7. data/lib/sendmux_mailbox_generated/api/mailbox_api_api.rb +3226 -0
  8. data/lib/sendmux_mailbox_generated/api_client.rb +441 -0
  9. data/lib/sendmux_mailbox_generated/api_error.rb +58 -0
  10. data/lib/sendmux_mailbox_generated/api_model_base.rb +88 -0
  11. data/lib/sendmux_mailbox_generated/configuration.rb +393 -0
  12. data/lib/sendmux_mailbox_generated/models/api_error_detail.rb +219 -0
  13. data/lib/sendmux_mailbox_generated/models/api_error_error.rb +275 -0
  14. data/lib/sendmux_mailbox_generated/models/api_error_meta.rb +164 -0
  15. data/lib/sendmux_mailbox_generated/models/api_error_response.rb +216 -0
  16. data/lib/sendmux_mailbox_generated/models/batch_delete_mailbox_messages_body.rb +204 -0
  17. data/lib/sendmux_mailbox_generated/models/batch_update_mailbox_messages_body.rb +224 -0
  18. data/lib/sendmux_mailbox_generated/models/create_mailbox_folder_body.rb +183 -0
  19. data/lib/sendmux_mailbox_generated/models/cursor_pagination.rb +173 -0
  20. data/lib/sendmux_mailbox_generated/models/mailbox.rb +284 -0
  21. data/lib/sendmux_mailbox_generated/models/mailbox_address.rb +176 -0
  22. data/lib/sendmux_mailbox_generated/models/mailbox_attachment.rb +248 -0
  23. data/lib/sendmux_mailbox_generated/models/mailbox_attachment_upload_result.rb +243 -0
  24. data/lib/sendmux_mailbox_generated/models/mailbox_attachment_upload_result_response.rb +223 -0
  25. data/lib/sendmux_mailbox_generated/models/mailbox_batch_delete_messages_result.rb +248 -0
  26. data/lib/sendmux_mailbox_generated/models/mailbox_batch_delete_messages_result_response.rb +223 -0
  27. data/lib/sendmux_mailbox_generated/models/mailbox_batch_get_body.rb +363 -0
  28. data/lib/sendmux_mailbox_generated/models/mailbox_batch_get_item.rb +188 -0
  29. data/lib/sendmux_mailbox_generated/models/mailbox_batch_get_result.rb +220 -0
  30. data/lib/sendmux_mailbox_generated/models/mailbox_batch_get_result_response.rb +223 -0
  31. data/lib/sendmux_mailbox_generated/models/mailbox_batch_get_result_states.rb +150 -0
  32. data/lib/sendmux_mailbox_generated/models/mailbox_batch_message_failure.rb +216 -0
  33. data/lib/sendmux_mailbox_generated/models/mailbox_batch_message_states.rb +162 -0
  34. data/lib/sendmux_mailbox_generated/models/mailbox_batch_update_messages_result.rb +248 -0
  35. data/lib/sendmux_mailbox_generated/models/mailbox_batch_update_messages_result_response.rb +223 -0
  36. data/lib/sendmux_mailbox_generated/models/mailbox_changes.rb +297 -0
  37. data/lib/sendmux_mailbox_generated/models/mailbox_changes_response.rb +223 -0
  38. data/lib/sendmux_mailbox_generated/models/mailbox_content_headers.rb +214 -0
  39. data/lib/sendmux_mailbox_generated/models/mailbox_content_headers_full_inner.rb +190 -0
  40. data/lib/sendmux_mailbox_generated/models/mailbox_content_headers_selected.rb +234 -0
  41. data/lib/sendmux_mailbox_generated/models/mailbox_folder.rb +307 -0
  42. data/lib/sendmux_mailbox_generated/models/mailbox_folder_cursor_list_response.rb +251 -0
  43. data/lib/sendmux_mailbox_generated/models/mailbox_folder_deleted_response.rb +223 -0
  44. data/lib/sendmux_mailbox_generated/models/mailbox_folder_deleted_response_all_of_data.rb +190 -0
  45. data/lib/sendmux_mailbox_generated/models/mailbox_folder_query_changes.rb +270 -0
  46. data/lib/sendmux_mailbox_generated/models/mailbox_folder_query_changes_added_inner.rb +190 -0
  47. data/lib/sendmux_mailbox_generated/models/mailbox_folder_query_changes_response.rb +223 -0
  48. data/lib/sendmux_mailbox_generated/models/mailbox_folder_response.rb +223 -0
  49. data/lib/sendmux_mailbox_generated/models/mailbox_get_changes200_response.rb +103 -0
  50. data/lib/sendmux_mailbox_generated/models/mailbox_identity.rb +352 -0
  51. data/lib/sendmux_mailbox_generated/models/mailbox_identity_cursor_list_response.rb +251 -0
  52. data/lib/sendmux_mailbox_generated/models/mailbox_identity_response.rb +223 -0
  53. data/lib/sendmux_mailbox_generated/models/mailbox_me.rb +301 -0
  54. data/lib/sendmux_mailbox_generated/models/mailbox_me_item_response.rb +223 -0
  55. data/lib/sendmux_mailbox_generated/models/mailbox_message.rb +515 -0
  56. data/lib/sendmux_mailbox_generated/models/mailbox_message_content.rb +348 -0
  57. data/lib/sendmux_mailbox_generated/models/mailbox_message_content_body.rb +327 -0
  58. data/lib/sendmux_mailbox_generated/models/mailbox_message_content_dates.rb +162 -0
  59. data/lib/sendmux_mailbox_generated/models/mailbox_message_content_participants.rb +276 -0
  60. data/lib/sendmux_mailbox_generated/models/mailbox_message_content_response.rb +223 -0
  61. data/lib/sendmux_mailbox_generated/models/mailbox_message_content_response_all_of_data.rb +355 -0
  62. data/lib/sendmux_mailbox_generated/models/mailbox_message_content_states.rb +176 -0
  63. data/lib/sendmux_mailbox_generated/models/mailbox_message_count.rb +176 -0
  64. data/lib/sendmux_mailbox_generated/models/mailbox_message_count_response.rb +223 -0
  65. data/lib/sendmux_mailbox_generated/models/mailbox_message_deleted_response.rb +223 -0
  66. data/lib/sendmux_mailbox_generated/models/mailbox_message_detail_response.rb +223 -0
  67. data/lib/sendmux_mailbox_generated/models/mailbox_message_flags.rb +242 -0
  68. data/lib/sendmux_mailbox_generated/models/mailbox_message_query_changes.rb +270 -0
  69. data/lib/sendmux_mailbox_generated/models/mailbox_message_query_changes_response.rb +223 -0
  70. data/lib/sendmux_mailbox_generated/models/mailbox_message_summary.rb +456 -0
  71. data/lib/sendmux_mailbox_generated/models/mailbox_message_summary_cursor_list_response.rb +251 -0
  72. data/lib/sendmux_mailbox_generated/models/mailbox_message_summary_from.rb +183 -0
  73. data/lib/sendmux_mailbox_generated/models/mailbox_quota.rb +359 -0
  74. data/lib/sendmux_mailbox_generated/models/mailbox_quota_cursor_list_response.rb +251 -0
  75. data/lib/sendmux_mailbox_generated/models/mailbox_raw_body.rb +279 -0
  76. data/lib/sendmux_mailbox_generated/models/mailbox_raw_body_body.rb +200 -0
  77. data/lib/sendmux_mailbox_generated/models/mailbox_raw_body_response.rb +223 -0
  78. data/lib/sendmux_mailbox_generated/models/mailbox_raw_body_response_all_of_data.rb +286 -0
  79. data/lib/sendmux_mailbox_generated/models/mailbox_realtime_event.rb +380 -0
  80. data/lib/sendmux_mailbox_generated/models/mailbox_realtime_message.rb +529 -0
  81. data/lib/sendmux_mailbox_generated/models/mailbox_realtime_message_all_of_body.rb +214 -0
  82. data/lib/sendmux_mailbox_generated/models/mailbox_search_snippet.rb +190 -0
  83. data/lib/sendmux_mailbox_generated/models/mailbox_search_snippets_result.rb +206 -0
  84. data/lib/sendmux_mailbox_generated/models/mailbox_search_snippets_result_response.rb +223 -0
  85. data/lib/sendmux_mailbox_generated/models/mailbox_send_result_response.rb +223 -0
  86. data/lib/sendmux_mailbox_generated/models/mailbox_send_scope.rb +213 -0
  87. data/lib/sendmux_mailbox_generated/models/mailbox_session.rb +294 -0
  88. data/lib/sendmux_mailbox_generated/models/mailbox_session_capabilities.rb +346 -0
  89. data/lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_attachments.rb +294 -0
  90. data/lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_folders.rb +320 -0
  91. data/lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_identities.rb +268 -0
  92. data/lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_messages.rb +516 -0
  93. data/lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_quotas.rb +242 -0
  94. data/lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_submissions.rb +242 -0
  95. data/lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_sync.rb +222 -0
  96. data/lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_threads.rb +268 -0
  97. data/lib/sendmux_mailbox_generated/models/mailbox_session_endpoints.rb +334 -0
  98. data/lib/sendmux_mailbox_generated/models/mailbox_session_gated.rb +451 -0
  99. data/lib/sendmux_mailbox_generated/models/mailbox_session_limits.rb +398 -0
  100. data/lib/sendmux_mailbox_generated/models/mailbox_session_mailbox.rb +203 -0
  101. data/lib/sendmux_mailbox_generated/models/mailbox_session_response.rb +223 -0
  102. data/lib/sendmux_mailbox_generated/models/mailbox_session_states.rb +294 -0
  103. data/lib/sendmux_mailbox_generated/models/mailbox_submission.rb +321 -0
  104. data/lib/sendmux_mailbox_generated/models/mailbox_submission_cursor_list_response.rb +251 -0
  105. data/lib/sendmux_mailbox_generated/models/mailbox_submission_delivery_status.rb +200 -0
  106. data/lib/sendmux_mailbox_generated/models/mailbox_submission_envelope.rb +178 -0
  107. data/lib/sendmux_mailbox_generated/models/mailbox_submission_envelope_address.rb +178 -0
  108. data/lib/sendmux_mailbox_generated/models/mailbox_submission_envelope_rcpt_to_inner.rb +185 -0
  109. data/lib/sendmux_mailbox_generated/models/mailbox_submission_response.rb +223 -0
  110. data/lib/sendmux_mailbox_generated/models/mailbox_thread.rb +398 -0
  111. data/lib/sendmux_mailbox_generated/models/mailbox_thread_content_meta.rb +244 -0
  112. data/lib/sendmux_mailbox_generated/models/mailbox_thread_content_meta_states.rb +188 -0
  113. data/lib/sendmux_mailbox_generated/models/mailbox_thread_content_response.rb +251 -0
  114. data/lib/sendmux_mailbox_generated/models/mailbox_thread_content_response_all_of_data.rb +355 -0
  115. data/lib/sendmux_mailbox_generated/models/mailbox_thread_detail_response.rb +223 -0
  116. data/lib/sendmux_mailbox_generated/models/mailbox_thread_summary.rb +363 -0
  117. data/lib/sendmux_mailbox_generated/models/mailbox_thread_summary_cursor_list_response.rb +251 -0
  118. data/lib/sendmux_mailbox_generated/models/mailbox_thread_summary_last_message.rb +463 -0
  119. data/lib/sendmux_mailbox_generated/models/mailbox_thread_summary_states.rb +162 -0
  120. data/lib/sendmux_mailbox_generated/models/mailbox_typed_changes.rb +164 -0
  121. data/lib/sendmux_mailbox_generated/models/mailbox_typed_changes_response.rb +223 -0
  122. data/lib/sendmux_mailbox_generated/models/mailbox_typed_changes_types.rb +192 -0
  123. data/lib/sendmux_mailbox_generated/models/mailbox_usage.rb +192 -0
  124. data/lib/sendmux_mailbox_generated/models/mailbox_usage_resource.rb +408 -0
  125. data/lib/sendmux_mailbox_generated/models/mailbox_usage_response.rb +223 -0
  126. data/lib/sendmux_mailbox_generated/models/mailbox_usage_states.rb +150 -0
  127. data/lib/sendmux_mailbox_generated/models/patch_mailbox_folder_body.rb +166 -0
  128. data/lib/sendmux_mailbox_generated/models/patch_mailbox_message_body.rb +168 -0
  129. data/lib/sendmux_mailbox_generated/models/response_meta.rb +164 -0
  130. data/lib/sendmux_mailbox_generated/models/send_mailbox_message_body.rb +283 -0
  131. data/lib/sendmux_mailbox_generated/models/send_mailbox_message_body_attachments_inner.rb +103 -0
  132. data/lib/sendmux_mailbox_generated/models/send_mailbox_message_body_attachments_inner_any_of.rb +217 -0
  133. data/lib/sendmux_mailbox_generated/models/send_mailbox_message_body_attachments_inner_any_of1.rb +217 -0
  134. data/lib/sendmux_mailbox_generated/models/send_mailbox_message_result.rb +214 -0
  135. data/lib/sendmux_mailbox_generated/models/success_envelope.rb +192 -0
  136. data/lib/sendmux_mailbox_generated/models/update_mailbox_identity_body.rb +216 -0
  137. data/lib/sendmux_mailbox_generated/version.rb +15 -0
  138. data/lib/sendmux_mailbox_generated.rb +166 -0
  139. metadata +255 -0
@@ -0,0 +1,516 @@
1
+ =begin
2
+ #Sendmux API
3
+
4
+ #Programmatic access to your Sendmux email infrastructure.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Sendmux::Mailbox::Generated
17
+ class MailboxSessionCapabilitiesMessages < ApiModelBase
18
+ attr_accessor :batch_get
19
+
20
+ attr_accessor :batch_update
21
+
22
+ attr_accessor :changes
23
+
24
+ attr_accessor :clean_content
25
+
26
+ attr_accessor :count
27
+
28
+ attr_accessor :delete
29
+
30
+ attr_accessor :detail
31
+
32
+ attr_accessor :keywords
33
+
34
+ attr_accessor :list
35
+
36
+ attr_accessor :permanent_delete
37
+
38
+ attr_accessor :query_changes
39
+
40
+ attr_accessor :raw_body
41
+
42
+ attr_accessor :search_snippets
43
+
44
+ attr_accessor :update_fields
45
+
46
+ class EnumAttributeValidator
47
+ attr_reader :datatype
48
+ attr_reader :allowable_values
49
+
50
+ def initialize(datatype, allowable_values)
51
+ @allowable_values = allowable_values.map do |value|
52
+ case datatype.to_s
53
+ when /Integer/i
54
+ value.to_i
55
+ when /Float/i
56
+ value.to_f
57
+ else
58
+ value
59
+ end
60
+ end
61
+ end
62
+
63
+ def valid?(value)
64
+ !value || allowable_values.include?(value)
65
+ end
66
+ end
67
+
68
+ # Attribute mapping from ruby-style variable name to JSON key.
69
+ def self.attribute_map
70
+ {
71
+ :'batch_get' => :'batch_get',
72
+ :'batch_update' => :'batch_update',
73
+ :'changes' => :'changes',
74
+ :'clean_content' => :'clean_content',
75
+ :'count' => :'count',
76
+ :'delete' => :'delete',
77
+ :'detail' => :'detail',
78
+ :'keywords' => :'keywords',
79
+ :'list' => :'list',
80
+ :'permanent_delete' => :'permanent_delete',
81
+ :'query_changes' => :'query_changes',
82
+ :'raw_body' => :'raw_body',
83
+ :'search_snippets' => :'search_snippets',
84
+ :'update_fields' => :'update_fields'
85
+ }
86
+ end
87
+
88
+ # Returns attribute mapping this model knows about
89
+ def self.acceptable_attribute_map
90
+ attribute_map
91
+ end
92
+
93
+ # Returns all the JSON keys this model knows about
94
+ def self.acceptable_attributes
95
+ acceptable_attribute_map.values
96
+ end
97
+
98
+ # Attribute type mapping.
99
+ def self.openapi_types
100
+ {
101
+ :'batch_get' => :'Boolean',
102
+ :'batch_update' => :'Boolean',
103
+ :'changes' => :'Boolean',
104
+ :'clean_content' => :'Boolean',
105
+ :'count' => :'Boolean',
106
+ :'delete' => :'Boolean',
107
+ :'detail' => :'Boolean',
108
+ :'keywords' => :'Boolean',
109
+ :'list' => :'Boolean',
110
+ :'permanent_delete' => :'Boolean',
111
+ :'query_changes' => :'Boolean',
112
+ :'raw_body' => :'Boolean',
113
+ :'search_snippets' => :'Boolean',
114
+ :'update_fields' => :'Array<String>'
115
+ }
116
+ end
117
+
118
+ # List of attributes with nullable: true
119
+ def self.openapi_nullable
120
+ Set.new([
121
+ ])
122
+ end
123
+
124
+ # Initializes the object
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ def initialize(attributes = {})
127
+ if (!attributes.is_a?(Hash))
128
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Mailbox::Generated::MailboxSessionCapabilitiesMessages` initialize method"
129
+ end
130
+
131
+ # check to see if the attribute exists and convert string to symbol for hash key
132
+ acceptable_attribute_map = self.class.acceptable_attribute_map
133
+ attributes = attributes.each_with_object({}) { |(k, v), h|
134
+ if (!acceptable_attribute_map.key?(k.to_sym))
135
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Mailbox::Generated::MailboxSessionCapabilitiesMessages`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
136
+ end
137
+ h[k.to_sym] = v
138
+ }
139
+
140
+ if attributes.key?(:'batch_get')
141
+ self.batch_get = attributes[:'batch_get']
142
+ else
143
+ self.batch_get = nil
144
+ end
145
+
146
+ if attributes.key?(:'batch_update')
147
+ self.batch_update = attributes[:'batch_update']
148
+ else
149
+ self.batch_update = nil
150
+ end
151
+
152
+ if attributes.key?(:'changes')
153
+ self.changes = attributes[:'changes']
154
+ else
155
+ self.changes = nil
156
+ end
157
+
158
+ if attributes.key?(:'clean_content')
159
+ self.clean_content = attributes[:'clean_content']
160
+ else
161
+ self.clean_content = nil
162
+ end
163
+
164
+ if attributes.key?(:'count')
165
+ self.count = attributes[:'count']
166
+ else
167
+ self.count = nil
168
+ end
169
+
170
+ if attributes.key?(:'delete')
171
+ self.delete = attributes[:'delete']
172
+ else
173
+ self.delete = nil
174
+ end
175
+
176
+ if attributes.key?(:'detail')
177
+ self.detail = attributes[:'detail']
178
+ else
179
+ self.detail = nil
180
+ end
181
+
182
+ if attributes.key?(:'keywords')
183
+ self.keywords = attributes[:'keywords']
184
+ else
185
+ self.keywords = nil
186
+ end
187
+
188
+ if attributes.key?(:'list')
189
+ self.list = attributes[:'list']
190
+ else
191
+ self.list = nil
192
+ end
193
+
194
+ if attributes.key?(:'permanent_delete')
195
+ self.permanent_delete = attributes[:'permanent_delete']
196
+ else
197
+ self.permanent_delete = nil
198
+ end
199
+
200
+ if attributes.key?(:'query_changes')
201
+ self.query_changes = attributes[:'query_changes']
202
+ else
203
+ self.query_changes = nil
204
+ end
205
+
206
+ if attributes.key?(:'raw_body')
207
+ self.raw_body = attributes[:'raw_body']
208
+ else
209
+ self.raw_body = nil
210
+ end
211
+
212
+ if attributes.key?(:'search_snippets')
213
+ self.search_snippets = attributes[:'search_snippets']
214
+ else
215
+ self.search_snippets = nil
216
+ end
217
+
218
+ if attributes.key?(:'update_fields')
219
+ if (value = attributes[:'update_fields']).is_a?(Array)
220
+ self.update_fields = value
221
+ end
222
+ else
223
+ self.update_fields = nil
224
+ end
225
+ end
226
+
227
+ # Show invalid properties with the reasons. Usually used together with valid?
228
+ # @return Array for valid properties with the reasons
229
+ def list_invalid_properties
230
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
231
+ invalid_properties = Array.new
232
+ if @batch_get.nil?
233
+ invalid_properties.push('invalid value for "batch_get", batch_get cannot be nil.')
234
+ end
235
+
236
+ if @batch_update.nil?
237
+ invalid_properties.push('invalid value for "batch_update", batch_update cannot be nil.')
238
+ end
239
+
240
+ if @changes.nil?
241
+ invalid_properties.push('invalid value for "changes", changes cannot be nil.')
242
+ end
243
+
244
+ if @clean_content.nil?
245
+ invalid_properties.push('invalid value for "clean_content", clean_content cannot be nil.')
246
+ end
247
+
248
+ if @count.nil?
249
+ invalid_properties.push('invalid value for "count", count cannot be nil.')
250
+ end
251
+
252
+ if @delete.nil?
253
+ invalid_properties.push('invalid value for "delete", delete cannot be nil.')
254
+ end
255
+
256
+ if @detail.nil?
257
+ invalid_properties.push('invalid value for "detail", detail cannot be nil.')
258
+ end
259
+
260
+ if @keywords.nil?
261
+ invalid_properties.push('invalid value for "keywords", keywords cannot be nil.')
262
+ end
263
+
264
+ if @list.nil?
265
+ invalid_properties.push('invalid value for "list", list cannot be nil.')
266
+ end
267
+
268
+ if @permanent_delete.nil?
269
+ invalid_properties.push('invalid value for "permanent_delete", permanent_delete cannot be nil.')
270
+ end
271
+
272
+ if @query_changes.nil?
273
+ invalid_properties.push('invalid value for "query_changes", query_changes cannot be nil.')
274
+ end
275
+
276
+ if @raw_body.nil?
277
+ invalid_properties.push('invalid value for "raw_body", raw_body cannot be nil.')
278
+ end
279
+
280
+ if @search_snippets.nil?
281
+ invalid_properties.push('invalid value for "search_snippets", search_snippets cannot be nil.')
282
+ end
283
+
284
+ if @update_fields.nil?
285
+ invalid_properties.push('invalid value for "update_fields", update_fields cannot be nil.')
286
+ end
287
+
288
+ invalid_properties
289
+ end
290
+
291
+ # Check to see if the all the properties in the model are valid
292
+ # @return true if the model is valid
293
+ def valid?
294
+ warn '[DEPRECATED] the `valid?` method is obsolete'
295
+ return false if @batch_get.nil?
296
+ return false if @batch_update.nil?
297
+ return false if @changes.nil?
298
+ return false if @clean_content.nil?
299
+ return false if @count.nil?
300
+ return false if @delete.nil?
301
+ return false if @detail.nil?
302
+ return false if @keywords.nil?
303
+ return false if @list.nil?
304
+ return false if @permanent_delete.nil?
305
+ return false if @query_changes.nil?
306
+ return false if @raw_body.nil?
307
+ return false if @search_snippets.nil?
308
+ return false if @update_fields.nil?
309
+ true
310
+ end
311
+
312
+ # Custom attribute writer method with validation
313
+ # @param [Object] batch_get Value to be assigned
314
+ def batch_get=(batch_get)
315
+ if batch_get.nil?
316
+ fail ArgumentError, 'batch_get cannot be nil'
317
+ end
318
+
319
+ @batch_get = batch_get
320
+ end
321
+
322
+ # Custom attribute writer method with validation
323
+ # @param [Object] batch_update Value to be assigned
324
+ def batch_update=(batch_update)
325
+ if batch_update.nil?
326
+ fail ArgumentError, 'batch_update cannot be nil'
327
+ end
328
+
329
+ @batch_update = batch_update
330
+ end
331
+
332
+ # Custom attribute writer method with validation
333
+ # @param [Object] changes Value to be assigned
334
+ def changes=(changes)
335
+ if changes.nil?
336
+ fail ArgumentError, 'changes cannot be nil'
337
+ end
338
+
339
+ @changes = changes
340
+ end
341
+
342
+ # Custom attribute writer method with validation
343
+ # @param [Object] clean_content Value to be assigned
344
+ def clean_content=(clean_content)
345
+ if clean_content.nil?
346
+ fail ArgumentError, 'clean_content cannot be nil'
347
+ end
348
+
349
+ @clean_content = clean_content
350
+ end
351
+
352
+ # Custom attribute writer method with validation
353
+ # @param [Object] count Value to be assigned
354
+ def count=(count)
355
+ if count.nil?
356
+ fail ArgumentError, 'count cannot be nil'
357
+ end
358
+
359
+ @count = count
360
+ end
361
+
362
+ # Custom attribute writer method with validation
363
+ # @param [Object] delete Value to be assigned
364
+ def delete=(delete)
365
+ if delete.nil?
366
+ fail ArgumentError, 'delete cannot be nil'
367
+ end
368
+
369
+ @delete = delete
370
+ end
371
+
372
+ # Custom attribute writer method with validation
373
+ # @param [Object] detail Value to be assigned
374
+ def detail=(detail)
375
+ if detail.nil?
376
+ fail ArgumentError, 'detail cannot be nil'
377
+ end
378
+
379
+ @detail = detail
380
+ end
381
+
382
+ # Custom attribute writer method with validation
383
+ # @param [Object] keywords Value to be assigned
384
+ def keywords=(keywords)
385
+ if keywords.nil?
386
+ fail ArgumentError, 'keywords cannot be nil'
387
+ end
388
+
389
+ @keywords = keywords
390
+ end
391
+
392
+ # Custom attribute writer method with validation
393
+ # @param [Object] list Value to be assigned
394
+ def list=(list)
395
+ if list.nil?
396
+ fail ArgumentError, 'list cannot be nil'
397
+ end
398
+
399
+ @list = list
400
+ end
401
+
402
+ # Custom attribute writer method with validation
403
+ # @param [Object] permanent_delete Value to be assigned
404
+ def permanent_delete=(permanent_delete)
405
+ if permanent_delete.nil?
406
+ fail ArgumentError, 'permanent_delete cannot be nil'
407
+ end
408
+
409
+ @permanent_delete = permanent_delete
410
+ end
411
+
412
+ # Custom attribute writer method with validation
413
+ # @param [Object] query_changes Value to be assigned
414
+ def query_changes=(query_changes)
415
+ if query_changes.nil?
416
+ fail ArgumentError, 'query_changes cannot be nil'
417
+ end
418
+
419
+ @query_changes = query_changes
420
+ end
421
+
422
+ # Custom attribute writer method with validation
423
+ # @param [Object] raw_body Value to be assigned
424
+ def raw_body=(raw_body)
425
+ if raw_body.nil?
426
+ fail ArgumentError, 'raw_body cannot be nil'
427
+ end
428
+
429
+ @raw_body = raw_body
430
+ end
431
+
432
+ # Custom attribute writer method with validation
433
+ # @param [Object] search_snippets Value to be assigned
434
+ def search_snippets=(search_snippets)
435
+ if search_snippets.nil?
436
+ fail ArgumentError, 'search_snippets cannot be nil'
437
+ end
438
+
439
+ @search_snippets = search_snippets
440
+ end
441
+
442
+ # Checks equality by comparing each attribute.
443
+ # @param [Object] Object to be compared
444
+ def ==(o)
445
+ return true if self.equal?(o)
446
+ self.class == o.class &&
447
+ batch_get == o.batch_get &&
448
+ batch_update == o.batch_update &&
449
+ changes == o.changes &&
450
+ clean_content == o.clean_content &&
451
+ count == o.count &&
452
+ delete == o.delete &&
453
+ detail == o.detail &&
454
+ keywords == o.keywords &&
455
+ list == o.list &&
456
+ permanent_delete == o.permanent_delete &&
457
+ query_changes == o.query_changes &&
458
+ raw_body == o.raw_body &&
459
+ search_snippets == o.search_snippets &&
460
+ update_fields == o.update_fields
461
+ end
462
+
463
+ # @see the `==` method
464
+ # @param [Object] Object to be compared
465
+ def eql?(o)
466
+ self == o
467
+ end
468
+
469
+ # Calculates hash code according to all attributes.
470
+ # @return [Integer] Hash code
471
+ def hash
472
+ [batch_get, batch_update, changes, clean_content, count, delete, detail, keywords, list, permanent_delete, query_changes, raw_body, search_snippets, update_fields].hash
473
+ end
474
+
475
+ # Builds the object from hash
476
+ # @param [Hash] attributes Model attributes in the form of hash
477
+ # @return [Object] Returns the model itself
478
+ def self.build_from_hash(attributes)
479
+ return nil unless attributes.is_a?(Hash)
480
+ attributes = attributes.transform_keys(&:to_sym)
481
+ transformed_hash = {}
482
+ openapi_types.each_pair do |key, type|
483
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
484
+ transformed_hash["#{key}"] = nil
485
+ elsif type =~ /\AArray<(.*)>/i
486
+ # check to ensure the input is an array given that the attribute
487
+ # is documented as an array but the input is not
488
+ if attributes[attribute_map[key]].is_a?(Array)
489
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
490
+ end
491
+ elsif !attributes[attribute_map[key]].nil?
492
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
493
+ end
494
+ end
495
+ new(transformed_hash)
496
+ end
497
+
498
+ # Returns the object in the form of hash
499
+ # @return [Hash] Returns the object in the form of hash
500
+ def to_hash
501
+ hash = {}
502
+ self.class.attribute_map.each_pair do |attr, param|
503
+ value = self.send(attr)
504
+ if value.nil?
505
+ is_nullable = self.class.openapi_nullable.include?(attr)
506
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
507
+ end
508
+
509
+ hash[param] = _to_hash(value)
510
+ end
511
+ hash
512
+ end
513
+
514
+ end
515
+
516
+ end