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,268 @@
|
|
|
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 MailboxSessionCapabilitiesThreads < ApiModelBase
|
|
18
|
+
attr_accessor :changes
|
|
19
|
+
|
|
20
|
+
attr_accessor :clean_content
|
|
21
|
+
|
|
22
|
+
attr_accessor :detail
|
|
23
|
+
|
|
24
|
+
attr_accessor :list
|
|
25
|
+
|
|
26
|
+
attr_accessor :messages
|
|
27
|
+
|
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
|
+
def self.attribute_map
|
|
30
|
+
{
|
|
31
|
+
:'changes' => :'changes',
|
|
32
|
+
:'clean_content' => :'clean_content',
|
|
33
|
+
:'detail' => :'detail',
|
|
34
|
+
:'list' => :'list',
|
|
35
|
+
:'messages' => :'messages'
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Returns attribute mapping this model knows about
|
|
40
|
+
def self.acceptable_attribute_map
|
|
41
|
+
attribute_map
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Returns all the JSON keys this model knows about
|
|
45
|
+
def self.acceptable_attributes
|
|
46
|
+
acceptable_attribute_map.values
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Attribute type mapping.
|
|
50
|
+
def self.openapi_types
|
|
51
|
+
{
|
|
52
|
+
:'changes' => :'Boolean',
|
|
53
|
+
:'clean_content' => :'Boolean',
|
|
54
|
+
:'detail' => :'Boolean',
|
|
55
|
+
:'list' => :'Boolean',
|
|
56
|
+
:'messages' => :'Boolean'
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# List of attributes with nullable: true
|
|
61
|
+
def self.openapi_nullable
|
|
62
|
+
Set.new([
|
|
63
|
+
])
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Initializes the object
|
|
67
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
68
|
+
def initialize(attributes = {})
|
|
69
|
+
if (!attributes.is_a?(Hash))
|
|
70
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Mailbox::Generated::MailboxSessionCapabilitiesThreads` initialize method"
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
74
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
75
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
76
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
77
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Mailbox::Generated::MailboxSessionCapabilitiesThreads`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
78
|
+
end
|
|
79
|
+
h[k.to_sym] = v
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'changes')
|
|
83
|
+
self.changes = attributes[:'changes']
|
|
84
|
+
else
|
|
85
|
+
self.changes = nil
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'clean_content')
|
|
89
|
+
self.clean_content = attributes[:'clean_content']
|
|
90
|
+
else
|
|
91
|
+
self.clean_content = nil
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'detail')
|
|
95
|
+
self.detail = attributes[:'detail']
|
|
96
|
+
else
|
|
97
|
+
self.detail = nil
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'list')
|
|
101
|
+
self.list = attributes[:'list']
|
|
102
|
+
else
|
|
103
|
+
self.list = nil
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.key?(:'messages')
|
|
107
|
+
self.messages = attributes[:'messages']
|
|
108
|
+
else
|
|
109
|
+
self.messages = nil
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
114
|
+
# @return Array for valid properties with the reasons
|
|
115
|
+
def list_invalid_properties
|
|
116
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
117
|
+
invalid_properties = Array.new
|
|
118
|
+
if @changes.nil?
|
|
119
|
+
invalid_properties.push('invalid value for "changes", changes cannot be nil.')
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if @clean_content.nil?
|
|
123
|
+
invalid_properties.push('invalid value for "clean_content", clean_content cannot be nil.')
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
if @detail.nil?
|
|
127
|
+
invalid_properties.push('invalid value for "detail", detail cannot be nil.')
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
if @list.nil?
|
|
131
|
+
invalid_properties.push('invalid value for "list", list cannot be nil.')
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
if @messages.nil?
|
|
135
|
+
invalid_properties.push('invalid value for "messages", messages cannot be nil.')
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
invalid_properties
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Check to see if the all the properties in the model are valid
|
|
142
|
+
# @return true if the model is valid
|
|
143
|
+
def valid?
|
|
144
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
145
|
+
return false if @changes.nil?
|
|
146
|
+
return false if @clean_content.nil?
|
|
147
|
+
return false if @detail.nil?
|
|
148
|
+
return false if @list.nil?
|
|
149
|
+
return false if @messages.nil?
|
|
150
|
+
true
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Custom attribute writer method with validation
|
|
154
|
+
# @param [Object] changes Value to be assigned
|
|
155
|
+
def changes=(changes)
|
|
156
|
+
if changes.nil?
|
|
157
|
+
fail ArgumentError, 'changes cannot be nil'
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
@changes = changes
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Custom attribute writer method with validation
|
|
164
|
+
# @param [Object] clean_content Value to be assigned
|
|
165
|
+
def clean_content=(clean_content)
|
|
166
|
+
if clean_content.nil?
|
|
167
|
+
fail ArgumentError, 'clean_content cannot be nil'
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
@clean_content = clean_content
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Custom attribute writer method with validation
|
|
174
|
+
# @param [Object] detail Value to be assigned
|
|
175
|
+
def detail=(detail)
|
|
176
|
+
if detail.nil?
|
|
177
|
+
fail ArgumentError, 'detail cannot be nil'
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
@detail = detail
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Custom attribute writer method with validation
|
|
184
|
+
# @param [Object] list Value to be assigned
|
|
185
|
+
def list=(list)
|
|
186
|
+
if list.nil?
|
|
187
|
+
fail ArgumentError, 'list cannot be nil'
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
@list = list
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Custom attribute writer method with validation
|
|
194
|
+
# @param [Object] messages Value to be assigned
|
|
195
|
+
def messages=(messages)
|
|
196
|
+
if messages.nil?
|
|
197
|
+
fail ArgumentError, 'messages cannot be nil'
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
@messages = messages
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Checks equality by comparing each attribute.
|
|
204
|
+
# @param [Object] Object to be compared
|
|
205
|
+
def ==(o)
|
|
206
|
+
return true if self.equal?(o)
|
|
207
|
+
self.class == o.class &&
|
|
208
|
+
changes == o.changes &&
|
|
209
|
+
clean_content == o.clean_content &&
|
|
210
|
+
detail == o.detail &&
|
|
211
|
+
list == o.list &&
|
|
212
|
+
messages == o.messages
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# @see the `==` method
|
|
216
|
+
# @param [Object] Object to be compared
|
|
217
|
+
def eql?(o)
|
|
218
|
+
self == o
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# Calculates hash code according to all attributes.
|
|
222
|
+
# @return [Integer] Hash code
|
|
223
|
+
def hash
|
|
224
|
+
[changes, clean_content, detail, list, messages].hash
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# Builds the object from hash
|
|
228
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
229
|
+
# @return [Object] Returns the model itself
|
|
230
|
+
def self.build_from_hash(attributes)
|
|
231
|
+
return nil unless attributes.is_a?(Hash)
|
|
232
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
233
|
+
transformed_hash = {}
|
|
234
|
+
openapi_types.each_pair do |key, type|
|
|
235
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
236
|
+
transformed_hash["#{key}"] = nil
|
|
237
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
238
|
+
# check to ensure the input is an array given that the attribute
|
|
239
|
+
# is documented as an array but the input is not
|
|
240
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
241
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
242
|
+
end
|
|
243
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
244
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
245
|
+
end
|
|
246
|
+
end
|
|
247
|
+
new(transformed_hash)
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# Returns the object in the form of hash
|
|
251
|
+
# @return [Hash] Returns the object in the form of hash
|
|
252
|
+
def to_hash
|
|
253
|
+
hash = {}
|
|
254
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
255
|
+
value = self.send(attr)
|
|
256
|
+
if value.nil?
|
|
257
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
258
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
hash[param] = _to_hash(value)
|
|
262
|
+
end
|
|
263
|
+
hash
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
end
|
|
@@ -0,0 +1,334 @@
|
|
|
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 MailboxSessionEndpoints < ApiModelBase
|
|
18
|
+
attr_accessor :folders
|
|
19
|
+
|
|
20
|
+
attr_accessor :mailbox
|
|
21
|
+
|
|
22
|
+
attr_accessor :messages
|
|
23
|
+
|
|
24
|
+
attr_accessor :submissions
|
|
25
|
+
|
|
26
|
+
attr_accessor :sync
|
|
27
|
+
|
|
28
|
+
attr_accessor :threads
|
|
29
|
+
|
|
30
|
+
attr_accessor :usage
|
|
31
|
+
|
|
32
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
33
|
+
def self.attribute_map
|
|
34
|
+
{
|
|
35
|
+
:'folders' => :'folders',
|
|
36
|
+
:'mailbox' => :'mailbox',
|
|
37
|
+
:'messages' => :'messages',
|
|
38
|
+
:'submissions' => :'submissions',
|
|
39
|
+
:'sync' => :'sync',
|
|
40
|
+
:'threads' => :'threads',
|
|
41
|
+
:'usage' => :'usage'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Returns attribute mapping this model knows about
|
|
46
|
+
def self.acceptable_attribute_map
|
|
47
|
+
attribute_map
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Returns all the JSON keys this model knows about
|
|
51
|
+
def self.acceptable_attributes
|
|
52
|
+
acceptable_attribute_map.values
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Attribute type mapping.
|
|
56
|
+
def self.openapi_types
|
|
57
|
+
{
|
|
58
|
+
:'folders' => :'Array<String>',
|
|
59
|
+
:'mailbox' => :'Array<String>',
|
|
60
|
+
:'messages' => :'Array<String>',
|
|
61
|
+
:'submissions' => :'Array<String>',
|
|
62
|
+
:'sync' => :'Array<String>',
|
|
63
|
+
:'threads' => :'Array<String>',
|
|
64
|
+
:'usage' => :'Array<String>'
|
|
65
|
+
}
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# List of attributes with nullable: true
|
|
69
|
+
def self.openapi_nullable
|
|
70
|
+
Set.new([
|
|
71
|
+
])
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Initializes the object
|
|
75
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
76
|
+
def initialize(attributes = {})
|
|
77
|
+
if (!attributes.is_a?(Hash))
|
|
78
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Mailbox::Generated::MailboxSessionEndpoints` initialize method"
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
82
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
83
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
84
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
85
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Mailbox::Generated::MailboxSessionEndpoints`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
86
|
+
end
|
|
87
|
+
h[k.to_sym] = v
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'folders')
|
|
91
|
+
if (value = attributes[:'folders']).is_a?(Array)
|
|
92
|
+
self.folders = value
|
|
93
|
+
end
|
|
94
|
+
else
|
|
95
|
+
self.folders = nil
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
if attributes.key?(:'mailbox')
|
|
99
|
+
if (value = attributes[:'mailbox']).is_a?(Array)
|
|
100
|
+
self.mailbox = value
|
|
101
|
+
end
|
|
102
|
+
else
|
|
103
|
+
self.mailbox = nil
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.key?(:'messages')
|
|
107
|
+
if (value = attributes[:'messages']).is_a?(Array)
|
|
108
|
+
self.messages = value
|
|
109
|
+
end
|
|
110
|
+
else
|
|
111
|
+
self.messages = nil
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if attributes.key?(:'submissions')
|
|
115
|
+
if (value = attributes[:'submissions']).is_a?(Array)
|
|
116
|
+
self.submissions = value
|
|
117
|
+
end
|
|
118
|
+
else
|
|
119
|
+
self.submissions = nil
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if attributes.key?(:'sync')
|
|
123
|
+
if (value = attributes[:'sync']).is_a?(Array)
|
|
124
|
+
self.sync = value
|
|
125
|
+
end
|
|
126
|
+
else
|
|
127
|
+
self.sync = nil
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
if attributes.key?(:'threads')
|
|
131
|
+
if (value = attributes[:'threads']).is_a?(Array)
|
|
132
|
+
self.threads = value
|
|
133
|
+
end
|
|
134
|
+
else
|
|
135
|
+
self.threads = nil
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
if attributes.key?(:'usage')
|
|
139
|
+
if (value = attributes[:'usage']).is_a?(Array)
|
|
140
|
+
self.usage = value
|
|
141
|
+
end
|
|
142
|
+
else
|
|
143
|
+
self.usage = nil
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
148
|
+
# @return Array for valid properties with the reasons
|
|
149
|
+
def list_invalid_properties
|
|
150
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
151
|
+
invalid_properties = Array.new
|
|
152
|
+
if @folders.nil?
|
|
153
|
+
invalid_properties.push('invalid value for "folders", folders cannot be nil.')
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
if @mailbox.nil?
|
|
157
|
+
invalid_properties.push('invalid value for "mailbox", mailbox cannot be nil.')
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
if @messages.nil?
|
|
161
|
+
invalid_properties.push('invalid value for "messages", messages cannot be nil.')
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
if @submissions.nil?
|
|
165
|
+
invalid_properties.push('invalid value for "submissions", submissions cannot be nil.')
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
if @sync.nil?
|
|
169
|
+
invalid_properties.push('invalid value for "sync", sync cannot be nil.')
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
if @threads.nil?
|
|
173
|
+
invalid_properties.push('invalid value for "threads", threads cannot be nil.')
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
if @usage.nil?
|
|
177
|
+
invalid_properties.push('invalid value for "usage", usage cannot be nil.')
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
invalid_properties
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Check to see if the all the properties in the model are valid
|
|
184
|
+
# @return true if the model is valid
|
|
185
|
+
def valid?
|
|
186
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
187
|
+
return false if @folders.nil?
|
|
188
|
+
return false if @mailbox.nil?
|
|
189
|
+
return false if @messages.nil?
|
|
190
|
+
return false if @submissions.nil?
|
|
191
|
+
return false if @sync.nil?
|
|
192
|
+
return false if @threads.nil?
|
|
193
|
+
return false if @usage.nil?
|
|
194
|
+
true
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
# Custom attribute writer method with validation
|
|
198
|
+
# @param [Object] folders Value to be assigned
|
|
199
|
+
def folders=(folders)
|
|
200
|
+
if folders.nil?
|
|
201
|
+
fail ArgumentError, 'folders cannot be nil'
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
@folders = folders
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
# Custom attribute writer method with validation
|
|
208
|
+
# @param [Object] mailbox Value to be assigned
|
|
209
|
+
def mailbox=(mailbox)
|
|
210
|
+
if mailbox.nil?
|
|
211
|
+
fail ArgumentError, 'mailbox cannot be nil'
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
@mailbox = mailbox
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# Custom attribute writer method with validation
|
|
218
|
+
# @param [Object] messages Value to be assigned
|
|
219
|
+
def messages=(messages)
|
|
220
|
+
if messages.nil?
|
|
221
|
+
fail ArgumentError, 'messages cannot be nil'
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
@messages = messages
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# Custom attribute writer method with validation
|
|
228
|
+
# @param [Object] submissions Value to be assigned
|
|
229
|
+
def submissions=(submissions)
|
|
230
|
+
if submissions.nil?
|
|
231
|
+
fail ArgumentError, 'submissions cannot be nil'
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
@submissions = submissions
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Custom attribute writer method with validation
|
|
238
|
+
# @param [Object] sync Value to be assigned
|
|
239
|
+
def sync=(sync)
|
|
240
|
+
if sync.nil?
|
|
241
|
+
fail ArgumentError, 'sync cannot be nil'
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
@sync = sync
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
# Custom attribute writer method with validation
|
|
248
|
+
# @param [Object] threads Value to be assigned
|
|
249
|
+
def threads=(threads)
|
|
250
|
+
if threads.nil?
|
|
251
|
+
fail ArgumentError, 'threads cannot be nil'
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
@threads = threads
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
# Custom attribute writer method with validation
|
|
258
|
+
# @param [Object] usage Value to be assigned
|
|
259
|
+
def usage=(usage)
|
|
260
|
+
if usage.nil?
|
|
261
|
+
fail ArgumentError, 'usage cannot be nil'
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
@usage = usage
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
# Checks equality by comparing each attribute.
|
|
268
|
+
# @param [Object] Object to be compared
|
|
269
|
+
def ==(o)
|
|
270
|
+
return true if self.equal?(o)
|
|
271
|
+
self.class == o.class &&
|
|
272
|
+
folders == o.folders &&
|
|
273
|
+
mailbox == o.mailbox &&
|
|
274
|
+
messages == o.messages &&
|
|
275
|
+
submissions == o.submissions &&
|
|
276
|
+
sync == o.sync &&
|
|
277
|
+
threads == o.threads &&
|
|
278
|
+
usage == o.usage
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
# @see the `==` method
|
|
282
|
+
# @param [Object] Object to be compared
|
|
283
|
+
def eql?(o)
|
|
284
|
+
self == o
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
# Calculates hash code according to all attributes.
|
|
288
|
+
# @return [Integer] Hash code
|
|
289
|
+
def hash
|
|
290
|
+
[folders, mailbox, messages, submissions, sync, threads, usage].hash
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
# Builds the object from hash
|
|
294
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
295
|
+
# @return [Object] Returns the model itself
|
|
296
|
+
def self.build_from_hash(attributes)
|
|
297
|
+
return nil unless attributes.is_a?(Hash)
|
|
298
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
299
|
+
transformed_hash = {}
|
|
300
|
+
openapi_types.each_pair do |key, type|
|
|
301
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
302
|
+
transformed_hash["#{key}"] = nil
|
|
303
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
304
|
+
# check to ensure the input is an array given that the attribute
|
|
305
|
+
# is documented as an array but the input is not
|
|
306
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
307
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
308
|
+
end
|
|
309
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
310
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
311
|
+
end
|
|
312
|
+
end
|
|
313
|
+
new(transformed_hash)
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
# Returns the object in the form of hash
|
|
317
|
+
# @return [Hash] Returns the object in the form of hash
|
|
318
|
+
def to_hash
|
|
319
|
+
hash = {}
|
|
320
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
321
|
+
value = self.send(attr)
|
|
322
|
+
if value.nil?
|
|
323
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
324
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
hash[param] = _to_hash(value)
|
|
328
|
+
end
|
|
329
|
+
hash
|
|
330
|
+
end
|
|
331
|
+
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
end
|