sendmux-mailbox 2.0.0 → 2.0.2

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