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,373 +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 MailboxBatchGetBody < ApiModelBase
18
- # Body shape to include for each message.
19
- attr_accessor :body_mode
20
-
21
- # Message IDs to fetch, maximum 100.
22
- attr_accessor :ids
23
-
24
- # Attachment detail to include. Contents are not returned.
25
- attr_accessor :include_attachments
26
-
27
- # Header detail to include in each message.
28
- attr_accessor :include_headers
29
-
30
- # When true, include HTML content when available.
31
- attr_accessor :include_html
32
-
33
- # When true, include links extracted from the body.
34
- attr_accessor :include_links
35
-
36
- # Maximum body characters per message before truncation.
37
- attr_accessor :max_body_chars
38
-
39
- # Body part to return when body_mode is not `none`.
40
- attr_accessor :part
41
-
42
- # When true, remove quoted reply text.
43
- attr_accessor :strip_quotes
44
-
45
- # When true, remove detected email signatures.
46
- attr_accessor :strip_signature
47
-
48
- class EnumAttributeValidator
49
- attr_reader :datatype
50
- attr_reader :allowable_values
51
-
52
- def initialize(datatype, allowable_values)
53
- @allowable_values = allowable_values.map do |value|
54
- case datatype.to_s
55
- when /Integer/i
56
- value.to_i
57
- when /Float/i
58
- value.to_f
59
- else
60
- value
61
- end
62
- end
63
- end
64
-
65
- def valid?(value)
66
- !value || allowable_values.include?(value)
67
- end
68
- end
69
-
70
- # Attribute mapping from ruby-style variable name to JSON key.
71
- def self.attribute_map
72
- {
73
- :'body_mode' => :'body_mode',
74
- :'ids' => :'ids',
75
- :'include_attachments' => :'include_attachments',
76
- :'include_headers' => :'include_headers',
77
- :'include_html' => :'include_html',
78
- :'include_links' => :'include_links',
79
- :'max_body_chars' => :'max_body_chars',
80
- :'part' => :'part',
81
- :'strip_quotes' => :'strip_quotes',
82
- :'strip_signature' => :'strip_signature'
83
- }
84
- end
85
-
86
- # Returns attribute mapping this model knows about
87
- def self.acceptable_attribute_map
88
- attribute_map
89
- end
90
-
91
- # Returns all the JSON keys this model knows about
92
- def self.acceptable_attributes
93
- acceptable_attribute_map.values
94
- end
95
-
96
- # Attribute type mapping.
97
- def self.openapi_types
98
- {
99
- :'body_mode' => :'String',
100
- :'ids' => :'Array<String>',
101
- :'include_attachments' => :'String',
102
- :'include_headers' => :'String',
103
- :'include_html' => :'Boolean',
104
- :'include_links' => :'Boolean',
105
- :'max_body_chars' => :'Integer',
106
- :'part' => :'String',
107
- :'strip_quotes' => :'Boolean',
108
- :'strip_signature' => :'Boolean'
109
- }
110
- end
111
-
112
- # List of attributes with nullable: true
113
- def self.openapi_nullable
114
- Set.new([
115
- ])
116
- end
117
-
118
- # Initializes the object
119
- # @param [Hash] attributes Model attributes in the form of hash
120
- def initialize(attributes = {})
121
- if (!attributes.is_a?(Hash))
122
- fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Mailbox::Generated::MailboxBatchGetBody` initialize method"
123
- end
124
-
125
- # check to see if the attribute exists and convert string to symbol for hash key
126
- acceptable_attribute_map = self.class.acceptable_attribute_map
127
- attributes = attributes.each_with_object({}) { |(k, v), h|
128
- if (!acceptable_attribute_map.key?(k.to_sym))
129
- fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Mailbox::Generated::MailboxBatchGetBody`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
130
- end
131
- h[k.to_sym] = v
132
- }
133
-
134
- if attributes.key?(:'body_mode')
135
- self.body_mode = attributes[:'body_mode']
136
- end
137
-
138
- if attributes.key?(:'ids')
139
- if (value = attributes[:'ids']).is_a?(Array)
140
- self.ids = value
141
- end
142
- else
143
- self.ids = nil
144
- end
145
-
146
- if attributes.key?(:'include_attachments')
147
- self.include_attachments = attributes[:'include_attachments']
148
- end
149
-
150
- if attributes.key?(:'include_headers')
151
- self.include_headers = attributes[:'include_headers']
152
- end
153
-
154
- if attributes.key?(:'include_html')
155
- self.include_html = attributes[:'include_html']
156
- end
157
-
158
- if attributes.key?(:'include_links')
159
- self.include_links = attributes[:'include_links']
160
- end
161
-
162
- if attributes.key?(:'max_body_chars')
163
- self.max_body_chars = attributes[:'max_body_chars']
164
- end
165
-
166
- if attributes.key?(:'part')
167
- self.part = attributes[:'part']
168
- end
169
-
170
- if attributes.key?(:'strip_quotes')
171
- self.strip_quotes = attributes[:'strip_quotes']
172
- end
173
-
174
- if attributes.key?(:'strip_signature')
175
- self.strip_signature = attributes[:'strip_signature']
176
- end
177
- end
178
-
179
- # Show invalid properties with the reasons. Usually used together with valid?
180
- # @return Array for valid properties with the reasons
181
- def list_invalid_properties
182
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
183
- invalid_properties = Array.new
184
- if @ids.nil?
185
- invalid_properties.push('invalid value for "ids", ids cannot be nil.')
186
- end
187
-
188
- if @ids.length > 100
189
- invalid_properties.push('invalid value for "ids", number of items must be less than or equal to 100.')
190
- end
191
-
192
- if @ids.length < 1
193
- invalid_properties.push('invalid value for "ids", number of items must be greater than or equal to 1.')
194
- end
195
-
196
- if !@max_body_chars.nil? && @max_body_chars > 1000000
197
- invalid_properties.push('invalid value for "max_body_chars", must be smaller than or equal to 1000000.')
198
- end
199
-
200
- if !@max_body_chars.nil? && @max_body_chars < 1
201
- invalid_properties.push('invalid value for "max_body_chars", must be greater than or equal to 1.')
202
- end
203
-
204
- invalid_properties
205
- end
206
-
207
- # Check to see if the all the properties in the model are valid
208
- # @return true if the model is valid
209
- def valid?
210
- warn '[DEPRECATED] the `valid?` method is obsolete'
211
- body_mode_validator = EnumAttributeValidator.new('String', ["none", "raw", "clean_json", "unknown_default_open_api"])
212
- return false unless body_mode_validator.valid?(@body_mode)
213
- return false if @ids.nil?
214
- return false if @ids.length > 100
215
- return false if @ids.length < 1
216
- include_attachments_validator = EnumAttributeValidator.new('String', ["none", "metadata", "unknown_default_open_api"])
217
- return false unless include_attachments_validator.valid?(@include_attachments)
218
- include_headers_validator = EnumAttributeValidator.new('String', ["none", "selected", "full", "unknown_default_open_api"])
219
- return false unless include_headers_validator.valid?(@include_headers)
220
- return false if !@max_body_chars.nil? && @max_body_chars > 1000000
221
- return false if !@max_body_chars.nil? && @max_body_chars < 1
222
- part_validator = EnumAttributeValidator.new('String', ["auto", "text", "html", "both", "unknown_default_open_api"])
223
- return false unless part_validator.valid?(@part)
224
- true
225
- end
226
-
227
- # Custom attribute writer method checking allowed values (enum).
228
- # @param [Object] body_mode Object to be assigned
229
- def body_mode=(body_mode)
230
- validator = EnumAttributeValidator.new('String', ["none", "raw", "clean_json", "unknown_default_open_api"])
231
- unless validator.valid?(body_mode)
232
- fail ArgumentError, "invalid value for \"body_mode\", must be one of #{validator.allowable_values}."
233
- end
234
- @body_mode = body_mode
235
- end
236
-
237
- # Custom attribute writer method with validation
238
- # @param [Object] ids Value to be assigned
239
- def ids=(ids)
240
- if ids.nil?
241
- fail ArgumentError, 'ids cannot be nil'
242
- end
243
-
244
- if ids.length > 100
245
- fail ArgumentError, 'invalid value for "ids", number of items must be less than or equal to 100.'
246
- end
247
-
248
- if ids.length < 1
249
- fail ArgumentError, 'invalid value for "ids", number of items must be greater than or equal to 1.'
250
- end
251
-
252
- @ids = ids
253
- end
254
-
255
- # Custom attribute writer method checking allowed values (enum).
256
- # @param [Object] include_attachments Object to be assigned
257
- def include_attachments=(include_attachments)
258
- validator = EnumAttributeValidator.new('String', ["none", "metadata", "unknown_default_open_api"])
259
- unless validator.valid?(include_attachments)
260
- fail ArgumentError, "invalid value for \"include_attachments\", must be one of #{validator.allowable_values}."
261
- end
262
- @include_attachments = include_attachments
263
- end
264
-
265
- # Custom attribute writer method checking allowed values (enum).
266
- # @param [Object] include_headers Object to be assigned
267
- def include_headers=(include_headers)
268
- validator = EnumAttributeValidator.new('String', ["none", "selected", "full", "unknown_default_open_api"])
269
- unless validator.valid?(include_headers)
270
- fail ArgumentError, "invalid value for \"include_headers\", must be one of #{validator.allowable_values}."
271
- end
272
- @include_headers = include_headers
273
- end
274
-
275
- # Custom attribute writer method with validation
276
- # @param [Object] max_body_chars Value to be assigned
277
- def max_body_chars=(max_body_chars)
278
- if max_body_chars.nil?
279
- fail ArgumentError, 'max_body_chars cannot be nil'
280
- end
281
-
282
- if max_body_chars > 1000000
283
- fail ArgumentError, 'invalid value for "max_body_chars", must be smaller than or equal to 1000000.'
284
- end
285
-
286
- if max_body_chars < 1
287
- fail ArgumentError, 'invalid value for "max_body_chars", must be greater than or equal to 1.'
288
- end
289
-
290
- @max_body_chars = max_body_chars
291
- end
292
-
293
- # Custom attribute writer method checking allowed values (enum).
294
- # @param [Object] part Object to be assigned
295
- def part=(part)
296
- validator = EnumAttributeValidator.new('String', ["auto", "text", "html", "both", "unknown_default_open_api"])
297
- unless validator.valid?(part)
298
- fail ArgumentError, "invalid value for \"part\", must be one of #{validator.allowable_values}."
299
- end
300
- @part = part
301
- end
302
-
303
- # Checks equality by comparing each attribute.
304
- # @param [Object] Object to be compared
305
- def ==(o)
306
- return true if self.equal?(o)
307
- self.class == o.class &&
308
- body_mode == o.body_mode &&
309
- ids == o.ids &&
310
- include_attachments == o.include_attachments &&
311
- include_headers == o.include_headers &&
312
- include_html == o.include_html &&
313
- include_links == o.include_links &&
314
- max_body_chars == o.max_body_chars &&
315
- part == o.part &&
316
- strip_quotes == o.strip_quotes &&
317
- strip_signature == o.strip_signature
318
- end
319
-
320
- # @see the `==` method
321
- # @param [Object] Object to be compared
322
- def eql?(o)
323
- self == o
324
- end
325
-
326
- # Calculates hash code according to all attributes.
327
- # @return [Integer] Hash code
328
- def hash
329
- [body_mode, ids, include_attachments, include_headers, include_html, include_links, max_body_chars, part, strip_quotes, strip_signature].hash
330
- end
331
-
332
- # Builds the object from hash
333
- # @param [Hash] attributes Model attributes in the form of hash
334
- # @return [Object] Returns the model itself
335
- def self.build_from_hash(attributes)
336
- return nil unless attributes.is_a?(Hash)
337
- attributes = attributes.transform_keys(&:to_sym)
338
- transformed_hash = {}
339
- openapi_types.each_pair do |key, type|
340
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
341
- transformed_hash["#{key}"] = nil
342
- elsif type =~ /\AArray<(.*)>/i
343
- # check to ensure the input is an array given that the attribute
344
- # is documented as an array but the input is not
345
- if attributes[attribute_map[key]].is_a?(Array)
346
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
347
- end
348
- elsif !attributes[attribute_map[key]].nil?
349
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
350
- end
351
- end
352
- new(transformed_hash)
353
- end
354
-
355
- # Returns the object in the form of hash
356
- # @return [Hash] Returns the object in the form of hash
357
- def to_hash
358
- hash = {}
359
- self.class.attribute_map.each_pair do |attr, param|
360
- value = self.send(attr)
361
- if value.nil?
362
- is_nullable = self.class.openapi_nullable.include?(attr)
363
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
364
- end
365
-
366
- hash[param] = _to_hash(value)
367
- end
368
- hash
369
- end
370
-
371
- end
372
-
373
- end
@@ -1,188 +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 MailboxBatchGetItem < ApiModelBase
18
- attr_accessor :content
19
-
20
- attr_accessor :message
21
-
22
- attr_accessor :raw_body
23
-
24
- # Attribute mapping from ruby-style variable name to JSON key.
25
- def self.attribute_map
26
- {
27
- :'content' => :'content',
28
- :'message' => :'message',
29
- :'raw_body' => :'raw_body'
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
- :'content' => :'MailboxMessageContent',
47
- :'message' => :'MailboxMessageSummary',
48
- :'raw_body' => :'MailboxRawBody'
49
- }
50
- end
51
-
52
- # List of attributes with nullable: true
53
- def self.openapi_nullable
54
- Set.new([
55
- :'content',
56
- :'raw_body'
57
- ])
58
- end
59
-
60
- # Initializes the object
61
- # @param [Hash] attributes Model attributes in the form of hash
62
- def initialize(attributes = {})
63
- if (!attributes.is_a?(Hash))
64
- fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Mailbox::Generated::MailboxBatchGetItem` initialize method"
65
- end
66
-
67
- # check to see if the attribute exists and convert string to symbol for hash key
68
- acceptable_attribute_map = self.class.acceptable_attribute_map
69
- attributes = attributes.each_with_object({}) { |(k, v), h|
70
- if (!acceptable_attribute_map.key?(k.to_sym))
71
- fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Mailbox::Generated::MailboxBatchGetItem`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
72
- end
73
- h[k.to_sym] = v
74
- }
75
-
76
- if attributes.key?(:'content')
77
- self.content = attributes[:'content']
78
- else
79
- self.content = nil
80
- end
81
-
82
- if attributes.key?(:'message')
83
- self.message = attributes[:'message']
84
- else
85
- self.message = nil
86
- end
87
-
88
- if attributes.key?(:'raw_body')
89
- self.raw_body = attributes[:'raw_body']
90
- else
91
- self.raw_body = nil
92
- end
93
- end
94
-
95
- # Show invalid properties with the reasons. Usually used together with valid?
96
- # @return Array for valid properties with the reasons
97
- def list_invalid_properties
98
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
99
- invalid_properties = Array.new
100
- if @message.nil?
101
- invalid_properties.push('invalid value for "message", message 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 @message.nil?
112
- true
113
- end
114
-
115
- # Custom attribute writer method with validation
116
- # @param [Object] message Value to be assigned
117
- def message=(message)
118
- if message.nil?
119
- fail ArgumentError, 'message cannot be nil'
120
- end
121
-
122
- @message = message
123
- end
124
-
125
- # Checks equality by comparing each attribute.
126
- # @param [Object] Object to be compared
127
- def ==(o)
128
- return true if self.equal?(o)
129
- self.class == o.class &&
130
- content == o.content &&
131
- message == o.message &&
132
- raw_body == o.raw_body
133
- end
134
-
135
- # @see the `==` method
136
- # @param [Object] Object to be compared
137
- def eql?(o)
138
- self == o
139
- end
140
-
141
- # Calculates hash code according to all attributes.
142
- # @return [Integer] Hash code
143
- def hash
144
- [content, message, raw_body].hash
145
- end
146
-
147
- # Builds the object from hash
148
- # @param [Hash] attributes Model attributes in the form of hash
149
- # @return [Object] Returns the model itself
150
- def self.build_from_hash(attributes)
151
- return nil unless attributes.is_a?(Hash)
152
- attributes = attributes.transform_keys(&:to_sym)
153
- transformed_hash = {}
154
- openapi_types.each_pair do |key, type|
155
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
156
- transformed_hash["#{key}"] = nil
157
- elsif type =~ /\AArray<(.*)>/i
158
- # check to ensure the input is an array given that the attribute
159
- # is documented as an array but the input is not
160
- if attributes[attribute_map[key]].is_a?(Array)
161
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
162
- end
163
- elsif !attributes[attribute_map[key]].nil?
164
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
165
- end
166
- end
167
- new(transformed_hash)
168
- end
169
-
170
- # Returns the object in the form of hash
171
- # @return [Hash] Returns the object in the form of hash
172
- def to_hash
173
- hash = {}
174
- self.class.attribute_map.each_pair do |attr, param|
175
- value = self.send(attr)
176
- if value.nil?
177
- is_nullable = self.class.openapi_nullable.include?(attr)
178
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
179
- end
180
-
181
- hash[param] = _to_hash(value)
182
- end
183
- hash
184
- end
185
-
186
- end
187
-
188
- end