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