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