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