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