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