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,594 +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 MailboxMessage < 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
- attr_accessor :html_body
34
-
35
- # Message ID
36
- attr_accessor :id
37
-
38
- # `In-Reply-To` header values, with the surrounding angle brackets removed — the message this one replies to. Empty when the message is not a reply.
39
- attr_accessor :in_reply_to
40
-
41
- # Active message keywords, including system flags and custom labels.
42
- attr_accessor :keywords
43
-
44
- # `Message-ID` header values for this message, with the surrounding angle brackets removed. Empty when the message carries no `Message-ID`.
45
- attr_accessor :message_id
46
-
47
- attr_accessor :preview
48
-
49
- attr_accessor :received_at
50
-
51
- # `References` header values, with the surrounding angle brackets removed — the ancestor chain of this message, oldest first. Empty when the message starts a conversation.
52
- attr_accessor :references
53
-
54
- # `Reply-To` addresses. Address replies here rather than to `from` whenever this is non-empty. Empty when the message carries no `Reply-To`.
55
- attr_accessor :reply_to
56
-
57
- attr_accessor :sent_at
58
-
59
- attr_accessor :size_bytes
60
-
61
- attr_accessor :subject
62
-
63
- attr_accessor :text_body
64
-
65
- attr_accessor :thread_id
66
-
67
- attr_accessor :to
68
-
69
- # Attribute mapping from ruby-style variable name to JSON key.
70
- def self.attribute_map
71
- {
72
- :'attachments' => :'attachments',
73
- :'bcc' => :'bcc',
74
- :'cc' => :'cc',
75
- :'flags' => :'flags',
76
- :'folder_ids' => :'folder_ids',
77
- :'from' => :'from',
78
- :'has_attachments' => :'has_attachments',
79
- :'html_body' => :'html_body',
80
- :'id' => :'id',
81
- :'in_reply_to' => :'in_reply_to',
82
- :'keywords' => :'keywords',
83
- :'message_id' => :'message_id',
84
- :'preview' => :'preview',
85
- :'received_at' => :'received_at',
86
- :'references' => :'references',
87
- :'reply_to' => :'reply_to',
88
- :'sent_at' => :'sent_at',
89
- :'size_bytes' => :'size_bytes',
90
- :'subject' => :'subject',
91
- :'text_body' => :'text_body',
92
- :'thread_id' => :'thread_id',
93
- :'to' => :'to'
94
- }
95
- end
96
-
97
- # Returns attribute mapping this model knows about
98
- def self.acceptable_attribute_map
99
- attribute_map
100
- end
101
-
102
- # Returns all the JSON keys this model knows about
103
- def self.acceptable_attributes
104
- acceptable_attribute_map.values
105
- end
106
-
107
- # Attribute type mapping.
108
- def self.openapi_types
109
- {
110
- :'attachments' => :'Array<MailboxAttachment>',
111
- :'bcc' => :'Array<MailboxAddress>',
112
- :'cc' => :'Array<MailboxAddress>',
113
- :'flags' => :'MailboxMessageFlags',
114
- :'folder_ids' => :'Array<String>',
115
- :'from' => :'MailboxAddress',
116
- :'has_attachments' => :'Boolean',
117
- :'html_body' => :'String',
118
- :'id' => :'String',
119
- :'in_reply_to' => :'Array<String>',
120
- :'keywords' => :'Array<String>',
121
- :'message_id' => :'Array<String>',
122
- :'preview' => :'String',
123
- :'received_at' => :'String',
124
- :'references' => :'Array<String>',
125
- :'reply_to' => :'Array<MailboxAddress>',
126
- :'sent_at' => :'String',
127
- :'size_bytes' => :'Integer',
128
- :'subject' => :'String',
129
- :'text_body' => :'String',
130
- :'thread_id' => :'String',
131
- :'to' => :'Array<MailboxAddress>'
132
- }
133
- end
134
-
135
- # List of attributes with nullable: true
136
- def self.openapi_nullable
137
- Set.new([
138
- :'from',
139
- :'html_body',
140
- :'preview',
141
- :'received_at',
142
- :'sent_at',
143
- :'size_bytes',
144
- :'subject',
145
- :'text_body',
146
- :'thread_id',
147
- ])
148
- end
149
-
150
- # Initializes the object
151
- # @param [Hash] attributes Model attributes in the form of hash
152
- def initialize(attributes = {})
153
- if (!attributes.is_a?(Hash))
154
- fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Mailbox::Generated::MailboxMessage` initialize method"
155
- end
156
-
157
- # check to see if the attribute exists and convert string to symbol for hash key
158
- acceptable_attribute_map = self.class.acceptable_attribute_map
159
- attributes = attributes.each_with_object({}) { |(k, v), h|
160
- if (!acceptable_attribute_map.key?(k.to_sym))
161
- fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Mailbox::Generated::MailboxMessage`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
162
- end
163
- h[k.to_sym] = v
164
- }
165
-
166
- if attributes.key?(:'attachments')
167
- if (value = attributes[:'attachments']).is_a?(Array)
168
- self.attachments = value
169
- end
170
- end
171
-
172
- if attributes.key?(:'bcc')
173
- if (value = attributes[:'bcc']).is_a?(Array)
174
- self.bcc = value
175
- end
176
- else
177
- self.bcc = nil
178
- end
179
-
180
- if attributes.key?(:'cc')
181
- if (value = attributes[:'cc']).is_a?(Array)
182
- self.cc = value
183
- end
184
- else
185
- self.cc = nil
186
- end
187
-
188
- if attributes.key?(:'flags')
189
- self.flags = attributes[:'flags']
190
- else
191
- self.flags = nil
192
- end
193
-
194
- if attributes.key?(:'folder_ids')
195
- if (value = attributes[:'folder_ids']).is_a?(Array)
196
- self.folder_ids = value
197
- end
198
- else
199
- self.folder_ids = nil
200
- end
201
-
202
- if attributes.key?(:'from')
203
- self.from = attributes[:'from']
204
- else
205
- self.from = nil
206
- end
207
-
208
- if attributes.key?(:'has_attachments')
209
- self.has_attachments = attributes[:'has_attachments']
210
- else
211
- self.has_attachments = nil
212
- end
213
-
214
- if attributes.key?(:'html_body')
215
- self.html_body = attributes[:'html_body']
216
- else
217
- self.html_body = nil
218
- end
219
-
220
- if attributes.key?(:'id')
221
- self.id = attributes[:'id']
222
- else
223
- self.id = nil
224
- end
225
-
226
- if attributes.key?(:'in_reply_to')
227
- if (value = attributes[:'in_reply_to']).is_a?(Array)
228
- self.in_reply_to = value
229
- end
230
- else
231
- self.in_reply_to = nil
232
- end
233
-
234
- if attributes.key?(:'keywords')
235
- if (value = attributes[:'keywords']).is_a?(Array)
236
- self.keywords = value
237
- end
238
- else
239
- self.keywords = nil
240
- end
241
-
242
- if attributes.key?(:'message_id')
243
- if (value = attributes[:'message_id']).is_a?(Array)
244
- self.message_id = value
245
- end
246
- else
247
- self.message_id = nil
248
- end
249
-
250
- if attributes.key?(:'preview')
251
- self.preview = attributes[:'preview']
252
- else
253
- self.preview = nil
254
- end
255
-
256
- if attributes.key?(:'received_at')
257
- self.received_at = attributes[:'received_at']
258
- else
259
- self.received_at = nil
260
- end
261
-
262
- if attributes.key?(:'references')
263
- if (value = attributes[:'references']).is_a?(Array)
264
- self.references = value
265
- end
266
- else
267
- self.references = nil
268
- end
269
-
270
- if attributes.key?(:'reply_to')
271
- if (value = attributes[:'reply_to']).is_a?(Array)
272
- self.reply_to = value
273
- end
274
- else
275
- self.reply_to = nil
276
- end
277
-
278
- if attributes.key?(:'sent_at')
279
- self.sent_at = attributes[:'sent_at']
280
- else
281
- self.sent_at = nil
282
- end
283
-
284
- if attributes.key?(:'size_bytes')
285
- self.size_bytes = attributes[:'size_bytes']
286
- else
287
- self.size_bytes = nil
288
- end
289
-
290
- if attributes.key?(:'subject')
291
- self.subject = attributes[:'subject']
292
- else
293
- self.subject = nil
294
- end
295
-
296
- if attributes.key?(:'text_body')
297
- self.text_body = attributes[:'text_body']
298
- else
299
- self.text_body = nil
300
- end
301
-
302
- if attributes.key?(:'thread_id')
303
- self.thread_id = attributes[:'thread_id']
304
- else
305
- self.thread_id = nil
306
- end
307
-
308
- if attributes.key?(:'to')
309
- if (value = attributes[:'to']).is_a?(Array)
310
- self.to = value
311
- end
312
- else
313
- self.to = nil
314
- end
315
- end
316
-
317
- # Show invalid properties with the reasons. Usually used together with valid?
318
- # @return Array for valid properties with the reasons
319
- def list_invalid_properties
320
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
321
- invalid_properties = Array.new
322
- if @bcc.nil?
323
- invalid_properties.push('invalid value for "bcc", bcc cannot be nil.')
324
- end
325
-
326
- if @cc.nil?
327
- invalid_properties.push('invalid value for "cc", cc cannot be nil.')
328
- end
329
-
330
- if @flags.nil?
331
- invalid_properties.push('invalid value for "flags", flags cannot be nil.')
332
- end
333
-
334
- if @folder_ids.nil?
335
- invalid_properties.push('invalid value for "folder_ids", folder_ids cannot be nil.')
336
- end
337
-
338
- if @has_attachments.nil?
339
- invalid_properties.push('invalid value for "has_attachments", has_attachments cannot be nil.')
340
- end
341
-
342
- if @id.nil?
343
- invalid_properties.push('invalid value for "id", id cannot be nil.')
344
- end
345
-
346
- if @in_reply_to.nil?
347
- invalid_properties.push('invalid value for "in_reply_to", in_reply_to cannot be nil.')
348
- end
349
-
350
- if @keywords.nil?
351
- invalid_properties.push('invalid value for "keywords", keywords cannot be nil.')
352
- end
353
-
354
- if @message_id.nil?
355
- invalid_properties.push('invalid value for "message_id", message_id cannot be nil.')
356
- end
357
-
358
- if @references.nil?
359
- invalid_properties.push('invalid value for "references", references cannot be nil.')
360
- end
361
-
362
- if @reply_to.nil?
363
- invalid_properties.push('invalid value for "reply_to", reply_to cannot be nil.')
364
- end
365
-
366
- if @to.nil?
367
- invalid_properties.push('invalid value for "to", to cannot be nil.')
368
- end
369
-
370
- invalid_properties
371
- end
372
-
373
- # Check to see if the all the properties in the model are valid
374
- # @return true if the model is valid
375
- def valid?
376
- warn '[DEPRECATED] the `valid?` method is obsolete'
377
- return false if @bcc.nil?
378
- return false if @cc.nil?
379
- return false if @flags.nil?
380
- return false if @folder_ids.nil?
381
- return false if @has_attachments.nil?
382
- return false if @id.nil?
383
- return false if @in_reply_to.nil?
384
- return false if @keywords.nil?
385
- return false if @message_id.nil?
386
- return false if @references.nil?
387
- return false if @reply_to.nil?
388
- return false if @to.nil?
389
- true
390
- end
391
-
392
- # Custom attribute writer method with validation
393
- # @param [Object] bcc Value to be assigned
394
- def bcc=(bcc)
395
- if bcc.nil?
396
- fail ArgumentError, 'bcc cannot be nil'
397
- end
398
-
399
- @bcc = bcc
400
- end
401
-
402
- # Custom attribute writer method with validation
403
- # @param [Object] cc Value to be assigned
404
- def cc=(cc)
405
- if cc.nil?
406
- fail ArgumentError, 'cc cannot be nil'
407
- end
408
-
409
- @cc = cc
410
- end
411
-
412
- # Custom attribute writer method with validation
413
- # @param [Object] flags Value to be assigned
414
- def flags=(flags)
415
- if flags.nil?
416
- fail ArgumentError, 'flags cannot be nil'
417
- end
418
-
419
- @flags = flags
420
- end
421
-
422
- # Custom attribute writer method with validation
423
- # @param [Object] folder_ids Value to be assigned
424
- def folder_ids=(folder_ids)
425
- if folder_ids.nil?
426
- fail ArgumentError, 'folder_ids cannot be nil'
427
- end
428
-
429
- @folder_ids = folder_ids
430
- end
431
-
432
- # Custom attribute writer method with validation
433
- # @param [Object] has_attachments Value to be assigned
434
- def has_attachments=(has_attachments)
435
- if has_attachments.nil?
436
- fail ArgumentError, 'has_attachments cannot be nil'
437
- end
438
-
439
- @has_attachments = has_attachments
440
- end
441
-
442
- # Custom attribute writer method with validation
443
- # @param [Object] id Value to be assigned
444
- def id=(id)
445
- if id.nil?
446
- fail ArgumentError, 'id cannot be nil'
447
- end
448
-
449
- @id = id
450
- end
451
-
452
- # Custom attribute writer method with validation
453
- # @param [Object] in_reply_to Value to be assigned
454
- def in_reply_to=(in_reply_to)
455
- if in_reply_to.nil?
456
- fail ArgumentError, 'in_reply_to cannot be nil'
457
- end
458
-
459
- @in_reply_to = in_reply_to
460
- end
461
-
462
- # Custom attribute writer method with validation
463
- # @param [Object] keywords Value to be assigned
464
- def keywords=(keywords)
465
- if keywords.nil?
466
- fail ArgumentError, 'keywords cannot be nil'
467
- end
468
-
469
- @keywords = keywords
470
- end
471
-
472
- # Custom attribute writer method with validation
473
- # @param [Object] message_id Value to be assigned
474
- def message_id=(message_id)
475
- if message_id.nil?
476
- fail ArgumentError, 'message_id cannot be nil'
477
- end
478
-
479
- @message_id = message_id
480
- end
481
-
482
- # Custom attribute writer method with validation
483
- # @param [Object] references Value to be assigned
484
- def references=(references)
485
- if references.nil?
486
- fail ArgumentError, 'references cannot be nil'
487
- end
488
-
489
- @references = references
490
- end
491
-
492
- # Custom attribute writer method with validation
493
- # @param [Object] reply_to Value to be assigned
494
- def reply_to=(reply_to)
495
- if reply_to.nil?
496
- fail ArgumentError, 'reply_to cannot be nil'
497
- end
498
-
499
- @reply_to = reply_to
500
- end
501
-
502
- # Custom attribute writer method with validation
503
- # @param [Object] to Value to be assigned
504
- def to=(to)
505
- if to.nil?
506
- fail ArgumentError, 'to cannot be nil'
507
- end
508
-
509
- @to = to
510
- end
511
-
512
- # Checks equality by comparing each attribute.
513
- # @param [Object] Object to be compared
514
- def ==(o)
515
- return true if self.equal?(o)
516
- self.class == o.class &&
517
- attachments == o.attachments &&
518
- bcc == o.bcc &&
519
- cc == o.cc &&
520
- flags == o.flags &&
521
- folder_ids == o.folder_ids &&
522
- from == o.from &&
523
- has_attachments == o.has_attachments &&
524
- html_body == o.html_body &&
525
- id == o.id &&
526
- in_reply_to == o.in_reply_to &&
527
- keywords == o.keywords &&
528
- message_id == o.message_id &&
529
- preview == o.preview &&
530
- received_at == o.received_at &&
531
- references == o.references &&
532
- reply_to == o.reply_to &&
533
- sent_at == o.sent_at &&
534
- size_bytes == o.size_bytes &&
535
- subject == o.subject &&
536
- text_body == o.text_body &&
537
- thread_id == o.thread_id &&
538
- to == o.to
539
- end
540
-
541
- # @see the `==` method
542
- # @param [Object] Object to be compared
543
- def eql?(o)
544
- self == o
545
- end
546
-
547
- # Calculates hash code according to all attributes.
548
- # @return [Integer] Hash code
549
- def hash
550
- [attachments, bcc, cc, flags, folder_ids, from, has_attachments, html_body, id, in_reply_to, keywords, message_id, preview, received_at, references, reply_to, sent_at, size_bytes, subject, text_body, thread_id, to].hash
551
- end
552
-
553
- # Builds the object from hash
554
- # @param [Hash] attributes Model attributes in the form of hash
555
- # @return [Object] Returns the model itself
556
- def self.build_from_hash(attributes)
557
- return nil unless attributes.is_a?(Hash)
558
- attributes = attributes.transform_keys(&:to_sym)
559
- transformed_hash = {}
560
- openapi_types.each_pair do |key, type|
561
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
562
- transformed_hash["#{key}"] = nil
563
- elsif type =~ /\AArray<(.*)>/i
564
- # check to ensure the input is an array given that the attribute
565
- # is documented as an array but the input is not
566
- if attributes[attribute_map[key]].is_a?(Array)
567
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
568
- end
569
- elsif !attributes[attribute_map[key]].nil?
570
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
571
- end
572
- end
573
- new(transformed_hash)
574
- end
575
-
576
- # Returns the object in the form of hash
577
- # @return [Hash] Returns the object in the form of hash
578
- def to_hash
579
- hash = {}
580
- self.class.attribute_map.each_pair do |attr, param|
581
- value = self.send(attr)
582
- if value.nil?
583
- is_nullable = self.class.openapi_nullable.include?(attr)
584
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
585
- end
586
-
587
- hash[param] = _to_hash(value)
588
- end
589
- hash
590
- end
591
-
592
- end
593
-
594
- end