sendmux-mailbox 2.0.1 → 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,185 +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 MailboxSubmissionEnvelopeRcptToInner < ApiModelBase
18
- attr_accessor :email
19
-
20
- attr_accessor :parameters
21
-
22
- # Attribute mapping from ruby-style variable name to JSON key.
23
- def self.attribute_map
24
- {
25
- :'email' => :'email',
26
- :'parameters' => :'parameters'
27
- }
28
- end
29
-
30
- # Returns attribute mapping this model knows about
31
- def self.acceptable_attribute_map
32
- attribute_map
33
- end
34
-
35
- # Returns all the JSON keys this model knows about
36
- def self.acceptable_attributes
37
- acceptable_attribute_map.values
38
- end
39
-
40
- # Attribute type mapping.
41
- def self.openapi_types
42
- {
43
- :'email' => :'String',
44
- :'parameters' => :'Hash<String, String>'
45
- }
46
- end
47
-
48
- # List of attributes with nullable: true
49
- def self.openapi_nullable
50
- Set.new([
51
- :'parameters'
52
- ])
53
- end
54
-
55
- # List of class defined in allOf (OpenAPI v3)
56
- def self.openapi_all_of
57
- [
58
- :'MailboxSubmissionEnvelopeAddress'
59
- ]
60
- end
61
-
62
- # Initializes the object
63
- # @param [Hash] attributes Model attributes in the form of hash
64
- def initialize(attributes = {})
65
- if (!attributes.is_a?(Hash))
66
- fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Mailbox::Generated::MailboxSubmissionEnvelopeRcptToInner` initialize method"
67
- end
68
-
69
- # check to see if the attribute exists and convert string to symbol for hash key
70
- acceptable_attribute_map = self.class.acceptable_attribute_map
71
- attributes = attributes.each_with_object({}) { |(k, v), h|
72
- if (!acceptable_attribute_map.key?(k.to_sym))
73
- fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Mailbox::Generated::MailboxSubmissionEnvelopeRcptToInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
74
- end
75
- h[k.to_sym] = v
76
- }
77
-
78
- if attributes.key?(:'email')
79
- self.email = attributes[:'email']
80
- else
81
- self.email = nil
82
- end
83
-
84
- if attributes.key?(:'parameters')
85
- if (value = attributes[:'parameters']).is_a?(Hash)
86
- self.parameters = value
87
- end
88
- else
89
- self.parameters = nil
90
- end
91
- end
92
-
93
- # Show invalid properties with the reasons. Usually used together with valid?
94
- # @return Array for valid properties with the reasons
95
- def list_invalid_properties
96
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
97
- invalid_properties = Array.new
98
- if @email.nil?
99
- invalid_properties.push('invalid value for "email", email cannot be nil.')
100
- end
101
-
102
- invalid_properties
103
- end
104
-
105
- # Check to see if the all the properties in the model are valid
106
- # @return true if the model is valid
107
- def valid?
108
- warn '[DEPRECATED] the `valid?` method is obsolete'
109
- return false if @email.nil?
110
- true
111
- end
112
-
113
- # Custom attribute writer method with validation
114
- # @param [Object] email Value to be assigned
115
- def email=(email)
116
- if email.nil?
117
- fail ArgumentError, 'email cannot be nil'
118
- end
119
-
120
- @email = email
121
- end
122
-
123
- # Checks equality by comparing each attribute.
124
- # @param [Object] Object to be compared
125
- def ==(o)
126
- return true if self.equal?(o)
127
- self.class == o.class &&
128
- email == o.email &&
129
- parameters == o.parameters
130
- end
131
-
132
- # @see the `==` method
133
- # @param [Object] Object to be compared
134
- def eql?(o)
135
- self == o
136
- end
137
-
138
- # Calculates hash code according to all attributes.
139
- # @return [Integer] Hash code
140
- def hash
141
- [email, parameters].hash
142
- end
143
-
144
- # Builds the object from hash
145
- # @param [Hash] attributes Model attributes in the form of hash
146
- # @return [Object] Returns the model itself
147
- def self.build_from_hash(attributes)
148
- return nil unless attributes.is_a?(Hash)
149
- attributes = attributes.transform_keys(&:to_sym)
150
- transformed_hash = {}
151
- openapi_types.each_pair do |key, type|
152
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
153
- transformed_hash["#{key}"] = nil
154
- elsif type =~ /\AArray<(.*)>/i
155
- # check to ensure the input is an array given that the attribute
156
- # is documented as an array but the input is not
157
- if attributes[attribute_map[key]].is_a?(Array)
158
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
159
- end
160
- elsif !attributes[attribute_map[key]].nil?
161
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
162
- end
163
- end
164
- new(transformed_hash)
165
- end
166
-
167
- # Returns the object in the form of hash
168
- # @return [Hash] Returns the object in the form of hash
169
- def to_hash
170
- hash = {}
171
- self.class.attribute_map.each_pair do |attr, param|
172
- value = self.send(attr)
173
- if value.nil?
174
- is_nullable = self.class.openapi_nullable.include?(attr)
175
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
176
- end
177
-
178
- hash[param] = _to_hash(value)
179
- end
180
- hash
181
- end
182
-
183
- end
184
-
185
- 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 MailboxThreadContentResponseAllOfData < 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::MailboxThreadContentResponseAllOfData` 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::MailboxThreadContentResponseAllOfData`. 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