sendmux-mailbox 1.4.0 → 2.0.1

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 (22) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +28 -0
  3. data/README.md +60 -1
  4. data/lib/sendmux/mailbox/version.rb +1 -1
  5. data/lib/sendmux_mailbox_generated/api/mailbox_api_api.rb +6 -6
  6. data/lib/sendmux_mailbox_generated/models/mailbox_identity_cursor_list_response.rb +1 -1
  7. data/lib/sendmux_mailbox_generated/models/mailbox_identity_list_meta.rb +173 -0
  8. data/lib/sendmux_mailbox_generated/models/mailbox_me.rb +14 -21
  9. data/lib/sendmux_mailbox_generated/models/mailbox_message.rb +29 -35
  10. data/lib/sendmux_mailbox_generated/models/mailbox_message_summary_cursor_list_response.rb +1 -1
  11. data/lib/sendmux_mailbox_generated/models/mailbox_query_meta.rb +173 -0
  12. data/lib/sendmux_mailbox_generated/models/mailbox_quota_cursor_list_response.rb +1 -1
  13. data/lib/sendmux_mailbox_generated/models/mailbox_realtime_message.rb +43 -49
  14. data/lib/sendmux_mailbox_generated/models/{mailbox_realtime_message_all_of_body.rb → mailbox_realtime_message_body.rb} +3 -3
  15. data/lib/sendmux_mailbox_generated/models/mailbox_submission_cursor_list_response.rb +1 -1
  16. data/lib/sendmux_mailbox_generated/models/mailbox_sync_meta.rb +173 -0
  17. data/lib/sendmux_mailbox_generated/models/mailbox_thread.rb +32 -39
  18. data/lib/sendmux_mailbox_generated/models/{mailbox.rb → mailbox_thread_message_summary_cursor_list_response.rb} +73 -106
  19. data/lib/sendmux_mailbox_generated/models/mailbox_thread_messages_meta.rb +199 -0
  20. data/lib/sendmux_mailbox_generated/models/mailbox_thread_summary_cursor_list_response.rb +1 -1
  21. data/lib/sendmux_mailbox_generated.rb +12 -2
  22. metadata +8 -4
@@ -26,6 +26,8 @@ module Sendmux::Mailbox::Generated
26
26
 
27
27
  attr_accessor :message_count
28
28
 
29
+ attr_accessor :message_ids
30
+
29
31
  attr_accessor :participants
30
32
 
31
33
  attr_accessor :states
@@ -34,8 +36,6 @@ module Sendmux::Mailbox::Generated
34
36
 
35
37
  attr_accessor :unread_count
36
38
 
37
- attr_accessor :message_ids
38
-
39
39
  # Attribute mapping from ruby-style variable name to JSON key.
40
40
  def self.attribute_map
41
41
  {
@@ -44,11 +44,11 @@ module Sendmux::Mailbox::Generated
44
44
  :'id' => :'id',
45
45
  :'last_message' => :'last_message',
46
46
  :'message_count' => :'message_count',
47
+ :'message_ids' => :'message_ids',
47
48
  :'participants' => :'participants',
48
49
  :'states' => :'states',
49
50
  :'subject' => :'subject',
50
- :'unread_count' => :'unread_count',
51
- :'message_ids' => :'message_ids'
51
+ :'unread_count' => :'unread_count'
52
52
  }
53
53
  end
54
54
 
@@ -70,11 +70,11 @@ module Sendmux::Mailbox::Generated
70
70
  :'id' => :'String',
71
71
  :'last_message' => :'MailboxMessageSummary',
72
72
  :'message_count' => :'Integer',
73
+ :'message_ids' => :'Array<String>',
73
74
  :'participants' => :'Array<MailboxAddress>',
74
75
  :'states' => :'MailboxThreadSummaryStates',
75
76
  :'subject' => :'String',
76
- :'unread_count' => :'Integer',
77
- :'message_ids' => :'Array<String>'
77
+ :'unread_count' => :'Integer'
78
78
  }
79
79
  end
80
80
 
@@ -86,13 +86,6 @@ module Sendmux::Mailbox::Generated
86
86
  ])
87
87
  end
88
88
 
89
- # List of class defined in allOf (OpenAPI v3)
90
- def self.openapi_all_of
91
- [
92
- :'MailboxThreadSummary'
93
- ]
94
- end
95
-
96
89
  # Initializes the object
97
90
  # @param [Hash] attributes Model attributes in the form of hash
98
91
  def initialize(attributes = {})
@@ -141,6 +134,14 @@ module Sendmux::Mailbox::Generated
141
134
  self.message_count = nil
142
135
  end
143
136
 
137
+ if attributes.key?(:'message_ids')
138
+ if (value = attributes[:'message_ids']).is_a?(Array)
139
+ self.message_ids = value
140
+ end
141
+ else
142
+ self.message_ids = nil
143
+ end
144
+
144
145
  if attributes.key?(:'participants')
145
146
  if (value = attributes[:'participants']).is_a?(Array)
146
147
  self.participants = value
@@ -166,14 +167,6 @@ module Sendmux::Mailbox::Generated
166
167
  else
167
168
  self.unread_count = nil
168
169
  end
169
-
170
- if attributes.key?(:'message_ids')
171
- if (value = attributes[:'message_ids']).is_a?(Array)
172
- self.message_ids = value
173
- end
174
- else
175
- self.message_ids = nil
176
- end
177
170
  end
178
171
 
179
172
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -197,6 +190,10 @@ module Sendmux::Mailbox::Generated
197
190
  invalid_properties.push('invalid value for "message_count", message_count cannot be nil.')
198
191
  end
199
192
 
193
+ if @message_ids.nil?
194
+ invalid_properties.push('invalid value for "message_ids", message_ids cannot be nil.')
195
+ end
196
+
200
197
  if @participants.nil?
201
198
  invalid_properties.push('invalid value for "participants", participants cannot be nil.')
202
199
  end
@@ -209,10 +206,6 @@ module Sendmux::Mailbox::Generated
209
206
  invalid_properties.push('invalid value for "unread_count", unread_count cannot be nil.')
210
207
  end
211
208
 
212
- if @message_ids.nil?
213
- invalid_properties.push('invalid value for "message_ids", message_ids cannot be nil.')
214
- end
215
-
216
209
  invalid_properties
217
210
  end
218
211
 
@@ -224,10 +217,10 @@ module Sendmux::Mailbox::Generated
224
217
  return false if @has_attachments.nil?
225
218
  return false if @id.nil?
226
219
  return false if @message_count.nil?
220
+ return false if @message_ids.nil?
227
221
  return false if @participants.nil?
228
222
  return false if @states.nil?
229
223
  return false if @unread_count.nil?
230
- return false if @message_ids.nil?
231
224
  true
232
225
  end
233
226
 
@@ -271,6 +264,16 @@ module Sendmux::Mailbox::Generated
271
264
  @message_count = message_count
272
265
  end
273
266
 
267
+ # Custom attribute writer method with validation
268
+ # @param [Object] message_ids Value to be assigned
269
+ def message_ids=(message_ids)
270
+ if message_ids.nil?
271
+ fail ArgumentError, 'message_ids cannot be nil'
272
+ end
273
+
274
+ @message_ids = message_ids
275
+ end
276
+
274
277
  # Custom attribute writer method with validation
275
278
  # @param [Object] participants Value to be assigned
276
279
  def participants=(participants)
@@ -301,16 +304,6 @@ module Sendmux::Mailbox::Generated
301
304
  @unread_count = unread_count
302
305
  end
303
306
 
304
- # Custom attribute writer method with validation
305
- # @param [Object] message_ids Value to be assigned
306
- def message_ids=(message_ids)
307
- if message_ids.nil?
308
- fail ArgumentError, 'message_ids cannot be nil'
309
- end
310
-
311
- @message_ids = message_ids
312
- end
313
-
314
307
  # Checks equality by comparing each attribute.
315
308
  # @param [Object] Object to be compared
316
309
  def ==(o)
@@ -321,11 +314,11 @@ module Sendmux::Mailbox::Generated
321
314
  id == o.id &&
322
315
  last_message == o.last_message &&
323
316
  message_count == o.message_count &&
317
+ message_ids == o.message_ids &&
324
318
  participants == o.participants &&
325
319
  states == o.states &&
326
320
  subject == o.subject &&
327
- unread_count == o.unread_count &&
328
- message_ids == o.message_ids
321
+ unread_count == o.unread_count
329
322
  end
330
323
 
331
324
  # @see the `==` method
@@ -337,7 +330,7 @@ module Sendmux::Mailbox::Generated
337
330
  # Calculates hash code according to all attributes.
338
331
  # @return [Integer] Hash code
339
332
  def hash
340
- [folder_ids, has_attachments, id, last_message, message_count, participants, states, subject, unread_count, message_ids].hash
333
+ [folder_ids, has_attachments, id, last_message, message_count, message_ids, participants, states, subject, unread_count].hash
341
334
  end
342
335
 
343
336
  # Builds the object from hash
@@ -14,37 +14,22 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Sendmux::Mailbox::Generated
17
- class Mailbox < ApiModelBase
18
- # ISO 8601 creation timestamp
19
- attr_accessor :created_at
17
+ class MailboxThreadMessageSummaryCursorListResponse < ApiModelBase
18
+ attr_accessor :meta
20
19
 
21
- # Optional display name shown in outbound From headers
22
- attr_accessor :display_name
20
+ attr_accessor :ok
23
21
 
24
- # Mailbox email address (lowercase)
25
- attr_accessor :email
22
+ attr_accessor :data
26
23
 
27
- # Public ID
28
- attr_accessor :id
29
-
30
- # Storage quota in bytes. Current writable tiers are 1 GB, 5 GB, and 50 GB.
31
- attr_accessor :quota_bytes
32
-
33
- attr_accessor :send_scope
34
-
35
- # active | suspended | deleted
36
- attr_accessor :status
24
+ attr_accessor :pagination
37
25
 
38
26
  # Attribute mapping from ruby-style variable name to JSON key.
39
27
  def self.attribute_map
40
28
  {
41
- :'created_at' => :'created_at',
42
- :'display_name' => :'display_name',
43
- :'email' => :'email',
44
- :'id' => :'id',
45
- :'quota_bytes' => :'quota_bytes',
46
- :'send_scope' => :'send_scope',
47
- :'status' => :'status'
29
+ :'meta' => :'meta',
30
+ :'ok' => :'ok',
31
+ :'data' => :'data',
32
+ :'pagination' => :'pagination'
48
33
  }
49
34
  end
50
35
 
@@ -61,81 +46,66 @@ module Sendmux::Mailbox::Generated
61
46
  # Attribute type mapping.
62
47
  def self.openapi_types
63
48
  {
64
- :'created_at' => :'String',
65
- :'display_name' => :'String',
66
- :'email' => :'String',
67
- :'id' => :'String',
68
- :'quota_bytes' => :'Integer',
69
- :'send_scope' => :'MailboxSendScope',
70
- :'status' => :'String'
49
+ :'meta' => :'MailboxThreadMessagesMeta',
50
+ :'ok' => :'Boolean',
51
+ :'data' => :'Array<MailboxMessageSummary>',
52
+ :'pagination' => :'CursorPagination'
71
53
  }
72
54
  end
73
55
 
74
56
  # List of attributes with nullable: true
75
57
  def self.openapi_nullable
76
58
  Set.new([
77
- :'display_name',
78
- :'quota_bytes',
79
- :'send_scope',
80
59
  ])
81
60
  end
82
61
 
62
+ # List of class defined in allOf (OpenAPI v3)
63
+ def self.openapi_all_of
64
+ [
65
+ :'SuccessEnvelope'
66
+ ]
67
+ end
68
+
83
69
  # Initializes the object
84
70
  # @param [Hash] attributes Model attributes in the form of hash
85
71
  def initialize(attributes = {})
86
72
  if (!attributes.is_a?(Hash))
87
- fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Mailbox::Generated::Mailbox` initialize method"
73
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Mailbox::Generated::MailboxThreadMessageSummaryCursorListResponse` initialize method"
88
74
  end
89
75
 
90
76
  # check to see if the attribute exists and convert string to symbol for hash key
91
77
  acceptable_attribute_map = self.class.acceptable_attribute_map
92
78
  attributes = attributes.each_with_object({}) { |(k, v), h|
93
79
  if (!acceptable_attribute_map.key?(k.to_sym))
94
- fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Mailbox::Generated::Mailbox`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
80
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Mailbox::Generated::MailboxThreadMessageSummaryCursorListResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
95
81
  end
96
82
  h[k.to_sym] = v
97
83
  }
98
84
 
99
- if attributes.key?(:'created_at')
100
- self.created_at = attributes[:'created_at']
101
- else
102
- self.created_at = nil
103
- end
104
-
105
- if attributes.key?(:'display_name')
106
- self.display_name = attributes[:'display_name']
85
+ if attributes.key?(:'meta')
86
+ self.meta = attributes[:'meta']
107
87
  else
108
- self.display_name = nil
88
+ self.meta = nil
109
89
  end
110
90
 
111
- if attributes.key?(:'email')
112
- self.email = attributes[:'email']
91
+ if attributes.key?(:'ok')
92
+ self.ok = attributes[:'ok']
113
93
  else
114
- self.email = nil
94
+ self.ok = nil
115
95
  end
116
96
 
117
- if attributes.key?(:'id')
118
- self.id = attributes[:'id']
119
- else
120
- self.id = nil
121
- end
122
-
123
- if attributes.key?(:'quota_bytes')
124
- self.quota_bytes = attributes[:'quota_bytes']
125
- else
126
- self.quota_bytes = nil
127
- end
128
-
129
- if attributes.key?(:'send_scope')
130
- self.send_scope = attributes[:'send_scope']
97
+ if attributes.key?(:'data')
98
+ if (value = attributes[:'data']).is_a?(Array)
99
+ self.data = value
100
+ end
131
101
  else
132
- self.send_scope = nil
102
+ self.data = nil
133
103
  end
134
104
 
135
- if attributes.key?(:'status')
136
- self.status = attributes[:'status']
105
+ if attributes.key?(:'pagination')
106
+ self.pagination = attributes[:'pagination']
137
107
  else
138
- self.status = nil
108
+ self.pagination = nil
139
109
  end
140
110
  end
141
111
 
@@ -144,20 +114,20 @@ module Sendmux::Mailbox::Generated
144
114
  def list_invalid_properties
145
115
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
146
116
  invalid_properties = Array.new
147
- if @created_at.nil?
148
- invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
117
+ if @meta.nil?
118
+ invalid_properties.push('invalid value for "meta", meta cannot be nil.')
149
119
  end
150
120
 
151
- if @email.nil?
152
- invalid_properties.push('invalid value for "email", email cannot be nil.')
121
+ if @ok.nil?
122
+ invalid_properties.push('invalid value for "ok", ok cannot be nil.')
153
123
  end
154
124
 
155
- if @id.nil?
156
- invalid_properties.push('invalid value for "id", id cannot be nil.')
125
+ if @data.nil?
126
+ invalid_properties.push('invalid value for "data", data cannot be nil.')
157
127
  end
158
128
 
159
- if @status.nil?
160
- invalid_properties.push('invalid value for "status", status cannot be nil.')
129
+ if @pagination.nil?
130
+ invalid_properties.push('invalid value for "pagination", pagination cannot be nil.')
161
131
  end
162
132
 
163
133
  invalid_properties
@@ -167,51 +137,51 @@ module Sendmux::Mailbox::Generated
167
137
  # @return true if the model is valid
168
138
  def valid?
169
139
  warn '[DEPRECATED] the `valid?` method is obsolete'
170
- return false if @created_at.nil?
171
- return false if @email.nil?
172
- return false if @id.nil?
173
- return false if @status.nil?
140
+ return false if @meta.nil?
141
+ return false if @ok.nil?
142
+ return false if @data.nil?
143
+ return false if @pagination.nil?
174
144
  true
175
145
  end
176
146
 
177
147
  # Custom attribute writer method with validation
178
- # @param [Object] created_at Value to be assigned
179
- def created_at=(created_at)
180
- if created_at.nil?
181
- fail ArgumentError, 'created_at cannot be nil'
148
+ # @param [Object] meta Value to be assigned
149
+ def meta=(meta)
150
+ if meta.nil?
151
+ fail ArgumentError, 'meta cannot be nil'
182
152
  end
183
153
 
184
- @created_at = created_at
154
+ @meta = meta
185
155
  end
186
156
 
187
157
  # Custom attribute writer method with validation
188
- # @param [Object] email Value to be assigned
189
- def email=(email)
190
- if email.nil?
191
- fail ArgumentError, 'email cannot be nil'
158
+ # @param [Object] ok Value to be assigned
159
+ def ok=(ok)
160
+ if ok.nil?
161
+ fail ArgumentError, 'ok cannot be nil'
192
162
  end
193
163
 
194
- @email = email
164
+ @ok = ok
195
165
  end
196
166
 
197
167
  # Custom attribute writer method with validation
198
- # @param [Object] id Value to be assigned
199
- def id=(id)
200
- if id.nil?
201
- fail ArgumentError, 'id cannot be nil'
168
+ # @param [Object] data Value to be assigned
169
+ def data=(data)
170
+ if data.nil?
171
+ fail ArgumentError, 'data cannot be nil'
202
172
  end
203
173
 
204
- @id = id
174
+ @data = data
205
175
  end
206
176
 
207
177
  # Custom attribute writer method with validation
208
- # @param [Object] status Value to be assigned
209
- def status=(status)
210
- if status.nil?
211
- fail ArgumentError, 'status cannot be nil'
178
+ # @param [Object] pagination Value to be assigned
179
+ def pagination=(pagination)
180
+ if pagination.nil?
181
+ fail ArgumentError, 'pagination cannot be nil'
212
182
  end
213
183
 
214
- @status = status
184
+ @pagination = pagination
215
185
  end
216
186
 
217
187
  # Checks equality by comparing each attribute.
@@ -219,13 +189,10 @@ module Sendmux::Mailbox::Generated
219
189
  def ==(o)
220
190
  return true if self.equal?(o)
221
191
  self.class == o.class &&
222
- created_at == o.created_at &&
223
- display_name == o.display_name &&
224
- email == o.email &&
225
- id == o.id &&
226
- quota_bytes == o.quota_bytes &&
227
- send_scope == o.send_scope &&
228
- status == o.status
192
+ meta == o.meta &&
193
+ ok == o.ok &&
194
+ data == o.data &&
195
+ pagination == o.pagination
229
196
  end
230
197
 
231
198
  # @see the `==` method
@@ -237,7 +204,7 @@ module Sendmux::Mailbox::Generated
237
204
  # Calculates hash code according to all attributes.
238
205
  # @return [Integer] Hash code
239
206
  def hash
240
- [created_at, display_name, email, id, quota_bytes, send_scope, status].hash
207
+ [meta, ok, data, pagination].hash
241
208
  end
242
209
 
243
210
  # Builds the object from hash
@@ -0,0 +1,199 @@
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 MailboxThreadMessagesMeta < ApiModelBase
18
+ attr_accessor :request_id
19
+
20
+ attr_accessor :sync_state
21
+
22
+ attr_accessor :thread_id
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'request_id' => :'request_id',
28
+ :'sync_state' => :'sync_state',
29
+ :'thread_id' => :'thread_id'
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
+ :'request_id' => :'String',
47
+ :'sync_state' => :'String',
48
+ :'thread_id' => :'String'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Mailbox::Generated::MailboxThreadMessagesMeta` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Mailbox::Generated::MailboxThreadMessagesMeta`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'request_id')
75
+ self.request_id = attributes[:'request_id']
76
+ else
77
+ self.request_id = nil
78
+ end
79
+
80
+ if attributes.key?(:'sync_state')
81
+ self.sync_state = attributes[:'sync_state']
82
+ end
83
+
84
+ if attributes.key?(:'thread_id')
85
+ self.thread_id = attributes[:'thread_id']
86
+ else
87
+ self.thread_id = nil
88
+ end
89
+ end
90
+
91
+ # Show invalid properties with the reasons. Usually used together with valid?
92
+ # @return Array for valid properties with the reasons
93
+ def list_invalid_properties
94
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
95
+ invalid_properties = Array.new
96
+ if @request_id.nil?
97
+ invalid_properties.push('invalid value for "request_id", request_id cannot be nil.')
98
+ end
99
+
100
+ if @thread_id.nil?
101
+ invalid_properties.push('invalid value for "thread_id", thread_id cannot be nil.')
102
+ end
103
+
104
+ invalid_properties
105
+ end
106
+
107
+ # Check to see if the all the properties in the model are valid
108
+ # @return true if the model is valid
109
+ def valid?
110
+ warn '[DEPRECATED] the `valid?` method is obsolete'
111
+ return false if @request_id.nil?
112
+ return false if @thread_id.nil?
113
+ true
114
+ end
115
+
116
+ # Custom attribute writer method with validation
117
+ # @param [Object] request_id Value to be assigned
118
+ def request_id=(request_id)
119
+ if request_id.nil?
120
+ fail ArgumentError, 'request_id cannot be nil'
121
+ end
122
+
123
+ @request_id = request_id
124
+ end
125
+
126
+ # Custom attribute writer method with validation
127
+ # @param [Object] thread_id Value to be assigned
128
+ def thread_id=(thread_id)
129
+ if thread_id.nil?
130
+ fail ArgumentError, 'thread_id cannot be nil'
131
+ end
132
+
133
+ @thread_id = thread_id
134
+ end
135
+
136
+ # Checks equality by comparing each attribute.
137
+ # @param [Object] Object to be compared
138
+ def ==(o)
139
+ return true if self.equal?(o)
140
+ self.class == o.class &&
141
+ request_id == o.request_id &&
142
+ sync_state == o.sync_state &&
143
+ thread_id == o.thread_id
144
+ end
145
+
146
+ # @see the `==` method
147
+ # @param [Object] Object to be compared
148
+ def eql?(o)
149
+ self == o
150
+ end
151
+
152
+ # Calculates hash code according to all attributes.
153
+ # @return [Integer] Hash code
154
+ def hash
155
+ [request_id, sync_state, thread_id].hash
156
+ end
157
+
158
+ # Builds the object from hash
159
+ # @param [Hash] attributes Model attributes in the form of hash
160
+ # @return [Object] Returns the model itself
161
+ def self.build_from_hash(attributes)
162
+ return nil unless attributes.is_a?(Hash)
163
+ attributes = attributes.transform_keys(&:to_sym)
164
+ transformed_hash = {}
165
+ openapi_types.each_pair do |key, type|
166
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
167
+ transformed_hash["#{key}"] = nil
168
+ elsif type =~ /\AArray<(.*)>/i
169
+ # check to ensure the input is an array given that the attribute
170
+ # is documented as an array but the input is not
171
+ if attributes[attribute_map[key]].is_a?(Array)
172
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
173
+ end
174
+ elsif !attributes[attribute_map[key]].nil?
175
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
176
+ end
177
+ end
178
+ new(transformed_hash)
179
+ end
180
+
181
+ # Returns the object in the form of hash
182
+ # @return [Hash] Returns the object in the form of hash
183
+ def to_hash
184
+ hash = {}
185
+ self.class.attribute_map.each_pair do |attr, param|
186
+ value = self.send(attr)
187
+ if value.nil?
188
+ is_nullable = self.class.openapi_nullable.include?(attr)
189
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
190
+ end
191
+
192
+ hash[param] = _to_hash(value)
193
+ end
194
+ hash
195
+ end
196
+
197
+ end
198
+
199
+ end
@@ -46,7 +46,7 @@ module Sendmux::Mailbox::Generated
46
46
  # Attribute type mapping.
47
47
  def self.openapi_types
48
48
  {
49
- :'meta' => :'ResponseMeta',
49
+ :'meta' => :'MailboxQueryMeta',
50
50
  :'ok' => :'Boolean',
51
51
  :'data' => :'Array<MailboxThreadSummary>',
52
52
  :'pagination' => :'CursorPagination'