sendmux-mailbox 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +22 -0
  3. data/LICENSE +21 -0
  4. data/README.md +105 -0
  5. data/lib/sendmux/mailbox/version.rb +1 -1
  6. data/lib/sendmux_mailbox_generated/api/mailbox_api_api.rb +275 -14
  7. data/lib/sendmux_mailbox_generated/models/batch_delete_mailbox_messages_body.rb +1 -0
  8. data/lib/sendmux_mailbox_generated/models/batch_update_mailbox_messages_body.rb +3 -0
  9. data/lib/sendmux_mailbox_generated/models/{mailbox_message_summary_from.rb → granted_mailbox.rb} +28 -19
  10. data/lib/sendmux_mailbox_generated/models/granted_mailbox_list_response.rb +251 -0
  11. data/lib/sendmux_mailbox_generated/models/mailbox_attachment.rb +3 -1
  12. data/lib/sendmux_mailbox_generated/models/mailbox_attachment_upload_intent_body.rb +228 -0
  13. data/lib/sendmux_mailbox_generated/models/mailbox_attachment_upload_intent_result.rb +323 -0
  14. data/lib/sendmux_mailbox_generated/models/mailbox_attachment_upload_intent_result_headers.rb +191 -0
  15. data/lib/sendmux_mailbox_generated/models/mailbox_attachment_upload_intent_result_response.rb +223 -0
  16. data/lib/sendmux_mailbox_generated/models/mailbox_batch_get_body.rb +10 -0
  17. data/lib/sendmux_mailbox_generated/models/mailbox_changes.rb +11 -1
  18. data/lib/sendmux_mailbox_generated/models/mailbox_message.rb +14 -45
  19. data/lib/sendmux_mailbox_generated/models/mailbox_message_content_participants.rb +2 -16
  20. data/lib/sendmux_mailbox_generated/models/mailbox_message_summary.rb +15 -17
  21. data/lib/sendmux_mailbox_generated/models/mailbox_realtime_event.rb +1 -15
  22. data/lib/sendmux_mailbox_generated/models/mailbox_realtime_message.rb +14 -45
  23. data/lib/sendmux_mailbox_generated/models/mailbox_thread.rb +2 -16
  24. data/lib/sendmux_mailbox_generated/models/mailbox_thread_summary.rb +2 -16
  25. data/lib/sendmux_mailbox_generated/models/send_mailbox_message_body.rb +10 -0
  26. data/lib/sendmux_mailbox_generated.rb +6 -2
  27. metadata +9 -4
  28. data/lib/sendmux_mailbox_generated/models/mailbox_thread_summary_last_message.rb +0 -463
@@ -0,0 +1,223 @@
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 MailboxAttachmentUploadIntentResultResponse < ApiModelBase
18
+ attr_accessor :meta
19
+
20
+ attr_accessor :ok
21
+
22
+ attr_accessor :data
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'meta' => :'meta',
28
+ :'ok' => :'ok',
29
+ :'data' => :'data'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'meta' => :'ResponseMeta',
47
+ :'ok' => :'Boolean',
48
+ :'data' => :'MailboxAttachmentUploadIntentResult'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ ])
56
+ end
57
+
58
+ # List of class defined in allOf (OpenAPI v3)
59
+ def self.openapi_all_of
60
+ [
61
+ :'SuccessEnvelope'
62
+ ]
63
+ end
64
+
65
+ # Initializes the object
66
+ # @param [Hash] attributes Model attributes in the form of hash
67
+ def initialize(attributes = {})
68
+ if (!attributes.is_a?(Hash))
69
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Mailbox::Generated::MailboxAttachmentUploadIntentResultResponse` initialize method"
70
+ end
71
+
72
+ # check to see if the attribute exists and convert string to symbol for hash key
73
+ acceptable_attribute_map = self.class.acceptable_attribute_map
74
+ attributes = attributes.each_with_object({}) { |(k, v), h|
75
+ if (!acceptable_attribute_map.key?(k.to_sym))
76
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Mailbox::Generated::MailboxAttachmentUploadIntentResultResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
77
+ end
78
+ h[k.to_sym] = v
79
+ }
80
+
81
+ if attributes.key?(:'meta')
82
+ self.meta = attributes[:'meta']
83
+ else
84
+ self.meta = nil
85
+ end
86
+
87
+ if attributes.key?(:'ok')
88
+ self.ok = attributes[:'ok']
89
+ else
90
+ self.ok = nil
91
+ end
92
+
93
+ if attributes.key?(:'data')
94
+ self.data = attributes[:'data']
95
+ else
96
+ self.data = nil
97
+ end
98
+ end
99
+
100
+ # Show invalid properties with the reasons. Usually used together with valid?
101
+ # @return Array for valid properties with the reasons
102
+ def list_invalid_properties
103
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
104
+ invalid_properties = Array.new
105
+ if @meta.nil?
106
+ invalid_properties.push('invalid value for "meta", meta cannot be nil.')
107
+ end
108
+
109
+ if @ok.nil?
110
+ invalid_properties.push('invalid value for "ok", ok cannot be nil.')
111
+ end
112
+
113
+ if @data.nil?
114
+ invalid_properties.push('invalid value for "data", data cannot be nil.')
115
+ end
116
+
117
+ invalid_properties
118
+ end
119
+
120
+ # Check to see if the all the properties in the model are valid
121
+ # @return true if the model is valid
122
+ def valid?
123
+ warn '[DEPRECATED] the `valid?` method is obsolete'
124
+ return false if @meta.nil?
125
+ return false if @ok.nil?
126
+ return false if @data.nil?
127
+ true
128
+ end
129
+
130
+ # Custom attribute writer method with validation
131
+ # @param [Object] meta Value to be assigned
132
+ def meta=(meta)
133
+ if meta.nil?
134
+ fail ArgumentError, 'meta cannot be nil'
135
+ end
136
+
137
+ @meta = meta
138
+ end
139
+
140
+ # Custom attribute writer method with validation
141
+ # @param [Object] ok Value to be assigned
142
+ def ok=(ok)
143
+ if ok.nil?
144
+ fail ArgumentError, 'ok cannot be nil'
145
+ end
146
+
147
+ @ok = ok
148
+ end
149
+
150
+ # Custom attribute writer method with validation
151
+ # @param [Object] data Value to be assigned
152
+ def data=(data)
153
+ if data.nil?
154
+ fail ArgumentError, 'data cannot be nil'
155
+ end
156
+
157
+ @data = data
158
+ end
159
+
160
+ # Checks equality by comparing each attribute.
161
+ # @param [Object] Object to be compared
162
+ def ==(o)
163
+ return true if self.equal?(o)
164
+ self.class == o.class &&
165
+ meta == o.meta &&
166
+ ok == o.ok &&
167
+ data == o.data
168
+ end
169
+
170
+ # @see the `==` method
171
+ # @param [Object] Object to be compared
172
+ def eql?(o)
173
+ self == o
174
+ end
175
+
176
+ # Calculates hash code according to all attributes.
177
+ # @return [Integer] Hash code
178
+ def hash
179
+ [meta, ok, data].hash
180
+ end
181
+
182
+ # Builds the object from hash
183
+ # @param [Hash] attributes Model attributes in the form of hash
184
+ # @return [Object] Returns the model itself
185
+ def self.build_from_hash(attributes)
186
+ return nil unless attributes.is_a?(Hash)
187
+ attributes = attributes.transform_keys(&:to_sym)
188
+ transformed_hash = {}
189
+ openapi_types.each_pair do |key, type|
190
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
191
+ transformed_hash["#{key}"] = nil
192
+ elsif type =~ /\AArray<(.*)>/i
193
+ # check to ensure the input is an array given that the attribute
194
+ # is documented as an array but the input is not
195
+ if attributes[attribute_map[key]].is_a?(Array)
196
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
197
+ end
198
+ elsif !attributes[attribute_map[key]].nil?
199
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
200
+ end
201
+ end
202
+ new(transformed_hash)
203
+ end
204
+
205
+ # Returns the object in the form of hash
206
+ # @return [Hash] Returns the object in the form of hash
207
+ def to_hash
208
+ hash = {}
209
+ self.class.attribute_map.each_pair do |attr, param|
210
+ value = self.send(attr)
211
+ if value.nil?
212
+ is_nullable = self.class.openapi_nullable.include?(attr)
213
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
214
+ end
215
+
216
+ hash[param] = _to_hash(value)
217
+ end
218
+ hash
219
+ end
220
+
221
+ end
222
+
223
+ end
@@ -15,24 +15,34 @@ require 'time'
15
15
 
16
16
  module Sendmux::Mailbox::Generated
17
17
  class MailboxBatchGetBody < ApiModelBase
18
+ # Body shape to include for each message.
18
19
  attr_accessor :body_mode
19
20
 
21
+ # Message IDs to fetch, maximum 100.
20
22
  attr_accessor :ids
21
23
 
24
+ # Attachment detail to include. Contents are not returned.
22
25
  attr_accessor :include_attachments
23
26
 
27
+ # Header detail to include in each message.
24
28
  attr_accessor :include_headers
25
29
 
30
+ # When true, include HTML content when available.
26
31
  attr_accessor :include_html
27
32
 
33
+ # When true, include links extracted from the body.
28
34
  attr_accessor :include_links
29
35
 
36
+ # Maximum body characters per message before truncation.
30
37
  attr_accessor :max_body_chars
31
38
 
39
+ # Body part to return when body_mode is not `none`.
32
40
  attr_accessor :part
33
41
 
42
+ # When true, remove quoted reply text.
34
43
  attr_accessor :strip_quotes
35
44
 
45
+ # When true, remove detected email signatures.
36
46
  attr_accessor :strip_signature
37
47
 
38
48
  class EnumAttributeValidator
@@ -25,6 +25,9 @@ module Sendmux::Mailbox::Generated
25
25
 
26
26
  attr_accessor :old_state
27
27
 
28
+ # When true, refetch this resource list instead of applying the incremental arrays.
29
+ attr_accessor :sync_required
30
+
28
31
  attr_accessor :updated
29
32
 
30
33
  attr_accessor :updated_properties
@@ -37,6 +40,7 @@ module Sendmux::Mailbox::Generated
37
40
  :'has_more' => :'has_more',
38
41
  :'new_state' => :'new_state',
39
42
  :'old_state' => :'old_state',
43
+ :'sync_required' => :'sync_required',
40
44
  :'updated' => :'updated',
41
45
  :'updated_properties' => :'updated_properties'
42
46
  }
@@ -60,6 +64,7 @@ module Sendmux::Mailbox::Generated
60
64
  :'has_more' => :'Boolean',
61
65
  :'new_state' => :'String',
62
66
  :'old_state' => :'String',
67
+ :'sync_required' => :'Boolean',
63
68
  :'updated' => :'Array<String>',
64
69
  :'updated_properties' => :'Array<String>'
65
70
  }
@@ -122,6 +127,10 @@ module Sendmux::Mailbox::Generated
122
127
  self.old_state = nil
123
128
  end
124
129
 
130
+ if attributes.key?(:'sync_required')
131
+ self.sync_required = attributes[:'sync_required']
132
+ end
133
+
125
134
  if attributes.key?(:'updated')
126
135
  if (value = attributes[:'updated']).is_a?(Array)
127
136
  self.updated = value
@@ -237,6 +246,7 @@ module Sendmux::Mailbox::Generated
237
246
  has_more == o.has_more &&
238
247
  new_state == o.new_state &&
239
248
  old_state == o.old_state &&
249
+ sync_required == o.sync_required &&
240
250
  updated == o.updated &&
241
251
  updated_properties == o.updated_properties
242
252
  end
@@ -250,7 +260,7 @@ module Sendmux::Mailbox::Generated
250
260
  # Calculates hash code according to all attributes.
251
261
  # @return [Integer] Hash code
252
262
  def hash
253
- [created, destroyed, has_more, new_state, old_state, updated, updated_properties].hash
263
+ [created, destroyed, has_more, new_state, old_state, sync_required, updated, updated_properties].hash
254
264
  end
255
265
 
256
266
  # Builds the object from hash
@@ -15,6 +15,8 @@ require 'time'
15
15
 
16
16
  module Sendmux::Mailbox::Generated
17
17
  class MailboxMessage < ApiModelBase
18
+ attr_accessor :attachments
19
+
18
20
  attr_accessor :bcc
19
21
 
20
22
  attr_accessor :cc
@@ -47,8 +49,6 @@ module Sendmux::Mailbox::Generated
47
49
 
48
50
  attr_accessor :to
49
51
 
50
- attr_accessor :attachments
51
-
52
52
  attr_accessor :html_body
53
53
 
54
54
  attr_accessor :text_body
@@ -56,6 +56,7 @@ module Sendmux::Mailbox::Generated
56
56
  # Attribute mapping from ruby-style variable name to JSON key.
57
57
  def self.attribute_map
58
58
  {
59
+ :'attachments' => :'attachments',
59
60
  :'bcc' => :'bcc',
60
61
  :'cc' => :'cc',
61
62
  :'flags' => :'flags',
@@ -71,7 +72,6 @@ module Sendmux::Mailbox::Generated
71
72
  :'subject' => :'subject',
72
73
  :'thread_id' => :'thread_id',
73
74
  :'to' => :'to',
74
- :'attachments' => :'attachments',
75
75
  :'html_body' => :'html_body',
76
76
  :'text_body' => :'text_body'
77
77
  }
@@ -90,11 +90,12 @@ module Sendmux::Mailbox::Generated
90
90
  # Attribute type mapping.
91
91
  def self.openapi_types
92
92
  {
93
+ :'attachments' => :'Array<MailboxAttachment>',
93
94
  :'bcc' => :'Array<MailboxAddress>',
94
95
  :'cc' => :'Array<MailboxAddress>',
95
96
  :'flags' => :'MailboxMessageFlags',
96
97
  :'folder_ids' => :'Array<String>',
97
- :'from' => :'MailboxMessageSummaryFrom',
98
+ :'from' => :'MailboxAddress',
98
99
  :'has_attachments' => :'Boolean',
99
100
  :'id' => :'String',
100
101
  :'keywords' => :'Array<String>',
@@ -105,7 +106,6 @@ module Sendmux::Mailbox::Generated
105
106
  :'subject' => :'String',
106
107
  :'thread_id' => :'String',
107
108
  :'to' => :'Array<MailboxAddress>',
108
- :'attachments' => :'Array<MailboxAttachment>',
109
109
  :'html_body' => :'String',
110
110
  :'text_body' => :'String'
111
111
  }
@@ -114,6 +114,7 @@ module Sendmux::Mailbox::Generated
114
114
  # List of attributes with nullable: true
115
115
  def self.openapi_nullable
116
116
  Set.new([
117
+ :'from',
117
118
  :'preview',
118
119
  :'received_at',
119
120
  :'sent_at',
@@ -148,6 +149,12 @@ module Sendmux::Mailbox::Generated
148
149
  h[k.to_sym] = v
149
150
  }
150
151
 
152
+ if attributes.key?(:'attachments')
153
+ if (value = attributes[:'attachments']).is_a?(Array)
154
+ self.attachments = value
155
+ end
156
+ end
157
+
151
158
  if attributes.key?(:'bcc')
152
159
  if (value = attributes[:'bcc']).is_a?(Array)
153
160
  self.bcc = value
@@ -248,14 +255,6 @@ module Sendmux::Mailbox::Generated
248
255
  self.to = nil
249
256
  end
250
257
 
251
- if attributes.key?(:'attachments')
252
- if (value = attributes[:'attachments']).is_a?(Array)
253
- self.attachments = value
254
- end
255
- else
256
- self.attachments = nil
257
- end
258
-
259
258
  if attributes.key?(:'html_body')
260
259
  self.html_body = attributes[:'html_body']
261
260
  else
@@ -290,10 +289,6 @@ module Sendmux::Mailbox::Generated
290
289
  invalid_properties.push('invalid value for "folder_ids", folder_ids cannot be nil.')
291
290
  end
292
291
 
293
- if @from.nil?
294
- invalid_properties.push('invalid value for "from", from cannot be nil.')
295
- end
296
-
297
292
  if @has_attachments.nil?
298
293
  invalid_properties.push('invalid value for "has_attachments", has_attachments cannot be nil.')
299
294
  end
@@ -310,10 +305,6 @@ module Sendmux::Mailbox::Generated
310
305
  invalid_properties.push('invalid value for "to", to cannot be nil.')
311
306
  end
312
307
 
313
- if @attachments.nil?
314
- invalid_properties.push('invalid value for "attachments", attachments cannot be nil.')
315
- end
316
-
317
308
  invalid_properties
318
309
  end
319
310
 
@@ -325,12 +316,10 @@ module Sendmux::Mailbox::Generated
325
316
  return false if @cc.nil?
326
317
  return false if @flags.nil?
327
318
  return false if @folder_ids.nil?
328
- return false if @from.nil?
329
319
  return false if @has_attachments.nil?
330
320
  return false if @id.nil?
331
321
  return false if @keywords.nil?
332
322
  return false if @to.nil?
333
- return false if @attachments.nil?
334
323
  true
335
324
  end
336
325
 
@@ -374,16 +363,6 @@ module Sendmux::Mailbox::Generated
374
363
  @folder_ids = folder_ids
375
364
  end
376
365
 
377
- # Custom attribute writer method with validation
378
- # @param [Object] from Value to be assigned
379
- def from=(from)
380
- if from.nil?
381
- fail ArgumentError, 'from cannot be nil'
382
- end
383
-
384
- @from = from
385
- end
386
-
387
366
  # Custom attribute writer method with validation
388
367
  # @param [Object] has_attachments Value to be assigned
389
368
  def has_attachments=(has_attachments)
@@ -424,21 +403,12 @@ module Sendmux::Mailbox::Generated
424
403
  @to = to
425
404
  end
426
405
 
427
- # Custom attribute writer method with validation
428
- # @param [Object] attachments Value to be assigned
429
- def attachments=(attachments)
430
- if attachments.nil?
431
- fail ArgumentError, 'attachments cannot be nil'
432
- end
433
-
434
- @attachments = attachments
435
- end
436
-
437
406
  # Checks equality by comparing each attribute.
438
407
  # @param [Object] Object to be compared
439
408
  def ==(o)
440
409
  return true if self.equal?(o)
441
410
  self.class == o.class &&
411
+ attachments == o.attachments &&
442
412
  bcc == o.bcc &&
443
413
  cc == o.cc &&
444
414
  flags == o.flags &&
@@ -454,7 +424,6 @@ module Sendmux::Mailbox::Generated
454
424
  subject == o.subject &&
455
425
  thread_id == o.thread_id &&
456
426
  to == o.to &&
457
- attachments == o.attachments &&
458
427
  html_body == o.html_body &&
459
428
  text_body == o.text_body
460
429
  end
@@ -468,7 +437,7 @@ module Sendmux::Mailbox::Generated
468
437
  # Calculates hash code according to all attributes.
469
438
  # @return [Integer] Hash code
470
439
  def hash
471
- [bcc, cc, flags, folder_ids, from, has_attachments, id, keywords, preview, received_at, sent_at, size_bytes, subject, thread_id, to, attachments, html_body, text_body].hash
440
+ [attachments, bcc, cc, flags, folder_ids, from, has_attachments, id, keywords, preview, received_at, sent_at, size_bytes, subject, thread_id, to, html_body, text_body].hash
472
441
  end
473
442
 
474
443
  # Builds the object from hash
@@ -51,7 +51,7 @@ module Sendmux::Mailbox::Generated
51
51
  {
52
52
  :'bcc' => :'Array<MailboxAddress>',
53
53
  :'cc' => :'Array<MailboxAddress>',
54
- :'from' => :'MailboxMessageSummaryFrom',
54
+ :'from' => :'MailboxAddress',
55
55
  :'reply_to' => :'Array<MailboxAddress>',
56
56
  :'to' => :'Array<MailboxAddress>'
57
57
  }
@@ -60,6 +60,7 @@ module Sendmux::Mailbox::Generated
60
60
  # List of attributes with nullable: true
61
61
  def self.openapi_nullable
62
62
  Set.new([
63
+ :'from',
63
64
  ])
64
65
  end
65
66
 
@@ -131,10 +132,6 @@ module Sendmux::Mailbox::Generated
131
132
  invalid_properties.push('invalid value for "cc", cc cannot be nil.')
132
133
  end
133
134
 
134
- if @from.nil?
135
- invalid_properties.push('invalid value for "from", from cannot be nil.')
136
- end
137
-
138
135
  if @reply_to.nil?
139
136
  invalid_properties.push('invalid value for "reply_to", reply_to cannot be nil.')
140
137
  end
@@ -152,7 +149,6 @@ module Sendmux::Mailbox::Generated
152
149
  warn '[DEPRECATED] the `valid?` method is obsolete'
153
150
  return false if @bcc.nil?
154
151
  return false if @cc.nil?
155
- return false if @from.nil?
156
152
  return false if @reply_to.nil?
157
153
  return false if @to.nil?
158
154
  true
@@ -178,16 +174,6 @@ module Sendmux::Mailbox::Generated
178
174
  @cc = cc
179
175
  end
180
176
 
181
- # Custom attribute writer method with validation
182
- # @param [Object] from Value to be assigned
183
- def from=(from)
184
- if from.nil?
185
- fail ArgumentError, 'from cannot be nil'
186
- end
187
-
188
- @from = from
189
- end
190
-
191
177
  # Custom attribute writer method with validation
192
178
  # @param [Object] reply_to Value to be assigned
193
179
  def reply_to=(reply_to)
@@ -15,6 +15,9 @@ require 'time'
15
15
 
16
16
  module Sendmux::Mailbox::Generated
17
17
  class MailboxMessageSummary < ApiModelBase
18
+ # Attachment metadata for this message. Each item includes a short-lived `download_url`; if it expires, fetch message metadata again.
19
+ attr_accessor :attachments
20
+
18
21
  attr_accessor :bcc
19
22
 
20
23
  attr_accessor :cc
@@ -50,6 +53,7 @@ module Sendmux::Mailbox::Generated
50
53
  # Attribute mapping from ruby-style variable name to JSON key.
51
54
  def self.attribute_map
52
55
  {
56
+ :'attachments' => :'attachments',
53
57
  :'bcc' => :'bcc',
54
58
  :'cc' => :'cc',
55
59
  :'flags' => :'flags',
@@ -81,11 +85,12 @@ module Sendmux::Mailbox::Generated
81
85
  # Attribute type mapping.
82
86
  def self.openapi_types
83
87
  {
88
+ :'attachments' => :'Array<MailboxAttachment>',
84
89
  :'bcc' => :'Array<MailboxAddress>',
85
90
  :'cc' => :'Array<MailboxAddress>',
86
91
  :'flags' => :'MailboxMessageFlags',
87
92
  :'folder_ids' => :'Array<String>',
88
- :'from' => :'MailboxMessageSummaryFrom',
93
+ :'from' => :'MailboxAddress',
89
94
  :'has_attachments' => :'Boolean',
90
95
  :'id' => :'String',
91
96
  :'keywords' => :'Array<String>',
@@ -102,6 +107,7 @@ module Sendmux::Mailbox::Generated
102
107
  # List of attributes with nullable: true
103
108
  def self.openapi_nullable
104
109
  Set.new([
110
+ :'from',
105
111
  :'preview',
106
112
  :'received_at',
107
113
  :'sent_at',
@@ -127,6 +133,12 @@ module Sendmux::Mailbox::Generated
127
133
  h[k.to_sym] = v
128
134
  }
129
135
 
136
+ if attributes.key?(:'attachments')
137
+ if (value = attributes[:'attachments']).is_a?(Array)
138
+ self.attachments = value
139
+ end
140
+ end
141
+
130
142
  if attributes.key?(:'bcc')
131
143
  if (value = attributes[:'bcc']).is_a?(Array)
132
144
  self.bcc = value
@@ -249,10 +261,6 @@ module Sendmux::Mailbox::Generated
249
261
  invalid_properties.push('invalid value for "folder_ids", folder_ids cannot be nil.')
250
262
  end
251
263
 
252
- if @from.nil?
253
- invalid_properties.push('invalid value for "from", from cannot be nil.')
254
- end
255
-
256
264
  if @has_attachments.nil?
257
265
  invalid_properties.push('invalid value for "has_attachments", has_attachments cannot be nil.')
258
266
  end
@@ -280,7 +288,6 @@ module Sendmux::Mailbox::Generated
280
288
  return false if @cc.nil?
281
289
  return false if @flags.nil?
282
290
  return false if @folder_ids.nil?
283
- return false if @from.nil?
284
291
  return false if @has_attachments.nil?
285
292
  return false if @id.nil?
286
293
  return false if @keywords.nil?
@@ -328,16 +335,6 @@ module Sendmux::Mailbox::Generated
328
335
  @folder_ids = folder_ids
329
336
  end
330
337
 
331
- # Custom attribute writer method with validation
332
- # @param [Object] from Value to be assigned
333
- def from=(from)
334
- if from.nil?
335
- fail ArgumentError, 'from cannot be nil'
336
- end
337
-
338
- @from = from
339
- end
340
-
341
338
  # Custom attribute writer method with validation
342
339
  # @param [Object] has_attachments Value to be assigned
343
340
  def has_attachments=(has_attachments)
@@ -383,6 +380,7 @@ module Sendmux::Mailbox::Generated
383
380
  def ==(o)
384
381
  return true if self.equal?(o)
385
382
  self.class == o.class &&
383
+ attachments == o.attachments &&
386
384
  bcc == o.bcc &&
387
385
  cc == o.cc &&
388
386
  flags == o.flags &&
@@ -409,7 +407,7 @@ module Sendmux::Mailbox::Generated
409
407
  # Calculates hash code according to all attributes.
410
408
  # @return [Integer] Hash code
411
409
  def hash
412
- [bcc, cc, flags, folder_ids, from, has_attachments, id, keywords, preview, received_at, sent_at, size_bytes, subject, thread_id, to].hash
410
+ [attachments, bcc, cc, flags, folder_ids, from, has_attachments, id, keywords, preview, received_at, sent_at, size_bytes, subject, thread_id, to].hash
413
411
  end
414
412
 
415
413
  # Builds the object from hash
@@ -103,6 +103,7 @@ module Sendmux::Mailbox::Generated
103
103
  def self.openapi_nullable
104
104
  Set.new([
105
105
  :'is_spam',
106
+ :'message',
106
107
  :'message_id',
107
108
  :'message_id_kind',
108
109
  :'sender',
@@ -201,10 +202,6 @@ module Sendmux::Mailbox::Generated
201
202
  invalid_properties.push('invalid value for "mailbox_id", mailbox_id cannot be nil.')
202
203
  end
203
204
 
204
- if @message.nil?
205
- invalid_properties.push('invalid value for "message", message cannot be nil.')
206
- end
207
-
208
205
  if @occurred_at.nil?
209
206
  invalid_properties.push('invalid value for "occurred_at", occurred_at cannot be nil.')
210
207
  end
@@ -228,7 +225,6 @@ module Sendmux::Mailbox::Generated
228
225
  event_type_validator = EnumAttributeValidator.new('String', ["message.received", "message.received.spam", "sync_required", "unknown_default_open_api"])
229
226
  return false unless event_type_validator.valid?(@event_type)
230
227
  return false if @mailbox_id.nil?
231
- return false if @message.nil?
232
228
  message_id_kind_validator = EnumAttributeValidator.new('String', ["provider", "rfc5322", "unknown_default_open_api"])
233
229
  return false unless message_id_kind_validator.valid?(@message_id_kind)
234
230
  return false if @occurred_at.nil?
@@ -257,16 +253,6 @@ module Sendmux::Mailbox::Generated
257
253
  @mailbox_id = mailbox_id
258
254
  end
259
255
 
260
- # Custom attribute writer method with validation
261
- # @param [Object] message Value to be assigned
262
- def message=(message)
263
- if message.nil?
264
- fail ArgumentError, 'message cannot be nil'
265
- end
266
-
267
- @message = message
268
- end
269
-
270
256
  # Custom attribute writer method checking allowed values (enum).
271
257
  # @param [Object] message_id_kind Object to be assigned
272
258
  def message_id_kind=(message_id_kind)