mailslurp_client 15.20.0 → 15.21.1

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 (67) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mailslurp_client/api/attachment_controller_api.rb +6 -0
  3. data/lib/mailslurp_client/api/bounce_controller_api.rb +79 -0
  4. data/lib/mailslurp_client/api/inbox_controller_api.rb +56 -2
  5. data/lib/mailslurp_client/api/o_auth_connection_api.rb +170 -0
  6. data/lib/mailslurp_client/api/phone_controller_api.rb +381 -1
  7. data/lib/mailslurp_client/api/user_controller_api.rb +267 -0
  8. data/lib/mailslurp_client/models/alias_projection.rb +29 -29
  9. data/lib/mailslurp_client/models/alias_thread_projection.rb +39 -39
  10. data/lib/mailslurp_client/models/attachment_projection.rb +25 -25
  11. data/lib/mailslurp_client/models/bounce_projection.rb +22 -22
  12. data/lib/mailslurp_client/models/bounce_recipient_projection.rb +10 -10
  13. data/lib/mailslurp_client/models/connector_event_projection.rb +15 -15
  14. data/lib/mailslurp_client/models/connector_projection.rb +15 -15
  15. data/lib/mailslurp_client/models/contact_projection.rb +10 -10
  16. data/lib/mailslurp_client/models/create_emergency_address_options.rb +2 -2
  17. data/lib/mailslurp_client/models/create_o_auth_connection_result.rb +211 -0
  18. data/lib/mailslurp_client/models/create_o_auth_exchange_result.rb +229 -0
  19. data/lib/mailslurp_client/models/create_phone_number_options.rb +284 -0
  20. data/lib/mailslurp_client/models/domain_dto.rb +27 -1
  21. data/lib/mailslurp_client/models/email.rb +12 -1
  22. data/lib/mailslurp_client/models/email_preview.rb +15 -5
  23. data/lib/mailslurp_client/models/email_projection.rb +35 -25
  24. data/lib/mailslurp_client/models/email_thread_projection.rb +52 -52
  25. data/lib/mailslurp_client/models/emergency_address.rb +2 -2
  26. data/lib/mailslurp_client/models/emergency_address_dto.rb +2 -2
  27. data/lib/mailslurp_client/models/entity_automation_item_projection.rb +295 -0
  28. data/lib/mailslurp_client/models/entity_event_item_projection.rb +303 -0
  29. data/lib/mailslurp_client/models/entity_favourite_item_projection.rb +296 -0
  30. data/lib/mailslurp_client/models/expired_inbox_record_projection.rb +15 -15
  31. data/lib/mailslurp_client/models/guest_portal_user_projection.rb +39 -39
  32. data/lib/mailslurp_client/models/inbox_dto.rb +2 -2
  33. data/lib/mailslurp_client/models/inbox_forwarder_event_projection.rb +10 -10
  34. data/lib/mailslurp_client/models/inbox_preview.rb +2 -2
  35. data/lib/mailslurp_client/models/inbox_replier_event_projection.rb +10 -10
  36. data/lib/mailslurp_client/models/list_unsubscribe_recipient_projection.rb +15 -15
  37. data/lib/mailslurp_client/models/missed_email_projection.rb +14 -14
  38. data/lib/mailslurp_client/models/opt_in_identity_projection.rb +29 -29
  39. data/lib/mailslurp_client/models/organization_inbox_projection.rb +2 -2
  40. data/lib/mailslurp_client/models/page_entity_automation_items.rb +309 -0
  41. data/lib/mailslurp_client/models/page_entity_event_items.rb +309 -0
  42. data/lib/mailslurp_client/models/page_entity_favourite_items.rb +309 -0
  43. data/lib/mailslurp_client/models/page_phone_message_thread_item_projection.rb +309 -0
  44. data/lib/mailslurp_client/models/page_phone_message_thread_projection.rb +309 -0
  45. data/lib/mailslurp_client/models/page_reputation_items.rb +309 -0
  46. data/lib/mailslurp_client/models/phone_message_thread_item_projection.rb +315 -0
  47. data/lib/mailslurp_client/models/phone_message_thread_projection.rb +315 -0
  48. data/lib/mailslurp_client/models/phone_number_dto.rb +2 -2
  49. data/lib/mailslurp_client/models/phone_number_projection.rb +17 -17
  50. data/lib/mailslurp_client/models/phone_plan_availability_item.rb +2 -2
  51. data/lib/mailslurp_client/models/phone_plan_dto.rb +2 -2
  52. data/lib/mailslurp_client/models/plus_address_projection.rb +29 -29
  53. data/lib/mailslurp_client/models/reputation_item_projection.rb +317 -0
  54. data/lib/mailslurp_client/models/search_inboxes_options.rb +2 -2
  55. data/lib/mailslurp_client/models/sent_email_dto.rb +12 -1
  56. data/lib/mailslurp_client/models/sent_email_projection.rb +25 -25
  57. data/lib/mailslurp_client/models/sent_sms_projection.rb +15 -15
  58. data/lib/mailslurp_client/models/sms_preview.rb +15 -1
  59. data/lib/mailslurp_client/models/sms_projection.rb +15 -15
  60. data/lib/mailslurp_client/models/template_projection.rb +15 -15
  61. data/lib/mailslurp_client/models/tracking_pixel_projection.rb +15 -15
  62. data/lib/mailslurp_client/models/unknown_missed_email_projection.rb +10 -10
  63. data/lib/mailslurp_client/models/wait_for_sms_conditions.rb +1 -1
  64. data/lib/mailslurp_client/models/webhook_projection.rb +47 -47
  65. data/lib/mailslurp_client/version.rb +1 -1
  66. data/lib/mailslurp_client.rb +16 -0
  67. metadata +18 -2
@@ -0,0 +1,296 @@
1
+ =begin
2
+ #MailSlurp API
3
+
4
+ #MailSlurp is an API for sending and receiving emails and SMS from dynamically allocated email addresses and phone numbers. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository
5
+
6
+ The version of the OpenAPI document: 6.5.2
7
+ Contact: contact@mailslurp.dev
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module MailSlurpClient
16
+ class EntityFavouriteItemProjection
17
+ attr_accessor :created_at
18
+
19
+ attr_accessor :entity_type
20
+
21
+ attr_accessor :name
22
+
23
+ attr_accessor :id
24
+
25
+ attr_accessor :description
26
+
27
+ class EnumAttributeValidator
28
+ attr_reader :datatype
29
+ attr_reader :allowable_values
30
+
31
+ def initialize(datatype, allowable_values)
32
+ @allowable_values = allowable_values.map do |value|
33
+ case datatype.to_s
34
+ when /Integer/i
35
+ value.to_i
36
+ when /Float/i
37
+ value.to_f
38
+ else
39
+ value
40
+ end
41
+ end
42
+ end
43
+
44
+ def valid?(value)
45
+ !value || allowable_values.include?(value)
46
+ end
47
+ end
48
+
49
+ # Attribute mapping from ruby-style variable name to JSON key.
50
+ def self.attribute_map
51
+ {
52
+ :'created_at' => :'createdAt',
53
+ :'entity_type' => :'entityType',
54
+ :'name' => :'name',
55
+ :'id' => :'id',
56
+ :'description' => :'description'
57
+ }
58
+ end
59
+
60
+ # Attribute type mapping.
61
+ def self.openapi_types
62
+ {
63
+ :'created_at' => :'DateTime',
64
+ :'entity_type' => :'String',
65
+ :'name' => :'String',
66
+ :'id' => :'String',
67
+ :'description' => :'String'
68
+ }
69
+ end
70
+
71
+ # List of attributes with nullable: true
72
+ def self.openapi_nullable
73
+ Set.new([
74
+ ])
75
+ end
76
+
77
+ # Initializes the object
78
+ # @param [Hash] attributes Model attributes in the form of hash
79
+ def initialize(attributes = {})
80
+ if (!attributes.is_a?(Hash))
81
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::EntityFavouriteItemProjection` initialize method"
82
+ end
83
+
84
+ # check to see if the attribute exists and convert string to symbol for hash key
85
+ attributes = attributes.each_with_object({}) { |(k, v), h|
86
+ if (!self.class.attribute_map.key?(k.to_sym))
87
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::EntityFavouriteItemProjection`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
88
+ end
89
+ h[k.to_sym] = v
90
+ }
91
+
92
+ if attributes.key?(:'created_at')
93
+ self.created_at = attributes[:'created_at']
94
+ end
95
+
96
+ if attributes.key?(:'entity_type')
97
+ self.entity_type = attributes[:'entity_type']
98
+ end
99
+
100
+ if attributes.key?(:'name')
101
+ self.name = attributes[:'name']
102
+ end
103
+
104
+ if attributes.key?(:'id')
105
+ self.id = attributes[:'id']
106
+ end
107
+
108
+ if attributes.key?(:'description')
109
+ self.description = attributes[:'description']
110
+ end
111
+ end
112
+
113
+ # Show invalid properties with the reasons. Usually used together with valid?
114
+ # @return Array for valid properties with the reasons
115
+ def list_invalid_properties
116
+ invalid_properties = Array.new
117
+ if @created_at.nil?
118
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
119
+ end
120
+
121
+ if @entity_type.nil?
122
+ invalid_properties.push('invalid value for "entity_type", entity_type cannot be nil.')
123
+ end
124
+
125
+ if @name.nil?
126
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
127
+ end
128
+
129
+ if @id.nil?
130
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
131
+ end
132
+
133
+ invalid_properties
134
+ end
135
+
136
+ # Check to see if the all the properties in the model are valid
137
+ # @return true if the model is valid
138
+ def valid?
139
+ return false if @created_at.nil?
140
+ return false if @entity_type.nil?
141
+ entity_type_validator = EnumAttributeValidator.new('String', ["INBOX", "EMAIL", "ATTACHMENT", "PHONE", "SMS"])
142
+ return false unless entity_type_validator.valid?(@entity_type)
143
+ return false if @name.nil?
144
+ return false if @id.nil?
145
+ true
146
+ end
147
+
148
+ # Custom attribute writer method checking allowed values (enum).
149
+ # @param [Object] entity_type Object to be assigned
150
+ def entity_type=(entity_type)
151
+ validator = EnumAttributeValidator.new('String', ["INBOX", "EMAIL", "ATTACHMENT", "PHONE", "SMS"])
152
+ unless validator.valid?(entity_type)
153
+ fail ArgumentError, "invalid value for \"entity_type\", must be one of #{validator.allowable_values}."
154
+ end
155
+ @entity_type = entity_type
156
+ end
157
+
158
+ # Checks equality by comparing each attribute.
159
+ # @param [Object] Object to be compared
160
+ def ==(o)
161
+ return true if self.equal?(o)
162
+ self.class == o.class &&
163
+ created_at == o.created_at &&
164
+ entity_type == o.entity_type &&
165
+ name == o.name &&
166
+ id == o.id &&
167
+ description == o.description
168
+ end
169
+
170
+ # @see the `==` method
171
+ # @param [Object] Object to be compared
172
+ def eql?(o)
173
+ self == o
174
+ end
175
+
176
+ # Calculates hash code according to all attributes.
177
+ # @return [Integer] Hash code
178
+ def hash
179
+ [created_at, entity_type, name, id, description].hash
180
+ end
181
+
182
+ # Builds the object from hash
183
+ # @param [Hash] attributes Model attributes in the form of hash
184
+ # @return [Object] Returns the model itself
185
+ def self.build_from_hash(attributes)
186
+ new.build_from_hash(attributes)
187
+ end
188
+
189
+ # Builds the object from hash
190
+ # @param [Hash] attributes Model attributes in the form of hash
191
+ # @return [Object] Returns the model itself
192
+ def build_from_hash(attributes)
193
+ return nil unless attributes.is_a?(Hash)
194
+ self.class.openapi_types.each_pair do |key, type|
195
+ if type =~ /\AArray<(.*)>/i
196
+ # check to ensure the input is an array given that the attribute
197
+ # is documented as an array but the input is not
198
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
199
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
200
+ end
201
+ elsif !attributes[self.class.attribute_map[key]].nil?
202
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
203
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
204
+ end
205
+
206
+ self
207
+ end
208
+
209
+ # Deserializes the data based on type
210
+ # @param string type Data type
211
+ # @param string value Value to be deserialized
212
+ # @return [Object] Deserialized data
213
+ def _deserialize(type, value)
214
+ case type.to_sym
215
+ when :DateTime
216
+ DateTime.parse(value)
217
+ when :Date
218
+ Date.parse(value)
219
+ when :String
220
+ value.to_s
221
+ when :Integer
222
+ value.to_i
223
+ when :Float
224
+ value.to_f
225
+ when :Boolean
226
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
227
+ true
228
+ else
229
+ false
230
+ end
231
+ when :Object
232
+ # generic object (usually a Hash), return directly
233
+ value
234
+ when /\AArray<(?<inner_type>.+)>\z/
235
+ inner_type = Regexp.last_match[:inner_type]
236
+ value.map { |v| _deserialize(inner_type, v) }
237
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
238
+ k_type = Regexp.last_match[:k_type]
239
+ v_type = Regexp.last_match[:v_type]
240
+ {}.tap do |hash|
241
+ value.each do |k, v|
242
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
243
+ end
244
+ end
245
+ else # model
246
+ MailSlurpClient.const_get(type).build_from_hash(value)
247
+ end
248
+ end
249
+
250
+ # Returns the string representation of the object
251
+ # @return [String] String presentation of the object
252
+ def to_s
253
+ to_hash.to_s
254
+ end
255
+
256
+ # to_body is an alias to to_hash (backward compatibility)
257
+ # @return [Hash] Returns the object in the form of hash
258
+ def to_body
259
+ to_hash
260
+ end
261
+
262
+ # Returns the object in the form of hash
263
+ # @return [Hash] Returns the object in the form of hash
264
+ def to_hash
265
+ hash = {}
266
+ self.class.attribute_map.each_pair do |attr, param|
267
+ value = self.send(attr)
268
+ if value.nil?
269
+ is_nullable = self.class.openapi_nullable.include?(attr)
270
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
271
+ end
272
+
273
+ hash[param] = _to_hash(value)
274
+ end
275
+ hash
276
+ end
277
+
278
+ # Outputs non-array value in the form of hash
279
+ # For object, use to_hash. Otherwise, just return the value
280
+ # @param [Object] value Any valid value
281
+ # @return [Hash] Returns the value in the form of hash
282
+ def _to_hash(value)
283
+ if value.is_a?(Array)
284
+ value.compact.map { |v| _to_hash(v) }
285
+ elsif value.is_a?(Hash)
286
+ {}.tap do |hash|
287
+ value.each { |k, v| hash[k] = _to_hash(v) }
288
+ end
289
+ elsif value.respond_to? :to_hash
290
+ value.to_hash
291
+ else
292
+ value
293
+ end
294
+ end
295
+ end
296
+ end
@@ -15,20 +15,20 @@ require 'date'
15
15
  module MailSlurpClient
16
16
  # Record of inbox expiration
17
17
  class ExpiredInboxRecordProjection
18
- attr_accessor :created_at
19
-
20
18
  attr_accessor :user_id
21
19
 
22
20
  attr_accessor :email_address
23
21
 
22
+ attr_accessor :created_at
23
+
24
24
  attr_accessor :id
25
25
 
26
26
  # Attribute mapping from ruby-style variable name to JSON key.
27
27
  def self.attribute_map
28
28
  {
29
- :'created_at' => :'createdAt',
30
29
  :'user_id' => :'userId',
31
30
  :'email_address' => :'emailAddress',
31
+ :'created_at' => :'createdAt',
32
32
  :'id' => :'id'
33
33
  }
34
34
  end
@@ -36,9 +36,9 @@ module MailSlurpClient
36
36
  # Attribute type mapping.
37
37
  def self.openapi_types
38
38
  {
39
- :'created_at' => :'DateTime',
40
39
  :'user_id' => :'String',
41
40
  :'email_address' => :'String',
41
+ :'created_at' => :'DateTime',
42
42
  :'id' => :'String'
43
43
  }
44
44
  end
@@ -64,10 +64,6 @@ module MailSlurpClient
64
64
  h[k.to_sym] = v
65
65
  }
66
66
 
67
- if attributes.key?(:'created_at')
68
- self.created_at = attributes[:'created_at']
69
- end
70
-
71
67
  if attributes.key?(:'user_id')
72
68
  self.user_id = attributes[:'user_id']
73
69
  end
@@ -76,6 +72,10 @@ module MailSlurpClient
76
72
  self.email_address = attributes[:'email_address']
77
73
  end
78
74
 
75
+ if attributes.key?(:'created_at')
76
+ self.created_at = attributes[:'created_at']
77
+ end
78
+
79
79
  if attributes.key?(:'id')
80
80
  self.id = attributes[:'id']
81
81
  end
@@ -85,10 +85,6 @@ module MailSlurpClient
85
85
  # @return Array for valid properties with the reasons
86
86
  def list_invalid_properties
87
87
  invalid_properties = Array.new
88
- if @created_at.nil?
89
- invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
90
- end
91
-
92
88
  if @user_id.nil?
93
89
  invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
94
90
  end
@@ -97,6 +93,10 @@ module MailSlurpClient
97
93
  invalid_properties.push('invalid value for "email_address", email_address cannot be nil.')
98
94
  end
99
95
 
96
+ if @created_at.nil?
97
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
98
+ end
99
+
100
100
  if @id.nil?
101
101
  invalid_properties.push('invalid value for "id", id cannot be nil.')
102
102
  end
@@ -107,9 +107,9 @@ module MailSlurpClient
107
107
  # Check to see if the all the properties in the model are valid
108
108
  # @return true if the model is valid
109
109
  def valid?
110
- return false if @created_at.nil?
111
110
  return false if @user_id.nil?
112
111
  return false if @email_address.nil?
112
+ return false if @created_at.nil?
113
113
  return false if @id.nil?
114
114
  true
115
115
  end
@@ -119,9 +119,9 @@ module MailSlurpClient
119
119
  def ==(o)
120
120
  return true if self.equal?(o)
121
121
  self.class == o.class &&
122
- created_at == o.created_at &&
123
122
  user_id == o.user_id &&
124
123
  email_address == o.email_address &&
124
+ created_at == o.created_at &&
125
125
  id == o.id
126
126
  end
127
127
 
@@ -134,7 +134,7 @@ module MailSlurpClient
134
134
  # Calculates hash code according to all attributes.
135
135
  # @return [Integer] Hash code
136
136
  def hash
137
- [created_at, user_id, email_address, id].hash
137
+ [user_id, email_address, created_at, id].hash
138
138
  end
139
139
 
140
140
  # Builds the object from hash
@@ -15,9 +15,7 @@ require 'date'
15
15
  module MailSlurpClient
16
16
  # Representation of a guest portal user
17
17
  class GuestPortalUserProjection
18
- attr_accessor :created_at
19
-
20
- attr_accessor :updated_at
18
+ attr_accessor :username
21
19
 
22
20
  attr_accessor :user_id
23
21
 
@@ -25,41 +23,43 @@ module MailSlurpClient
25
23
 
26
24
  attr_accessor :inbox_id
27
25
 
26
+ attr_accessor :updated_at
27
+
28
+ attr_accessor :created_at
29
+
28
30
  attr_accessor :portal_id
29
31
 
30
32
  attr_accessor :name
31
33
 
32
34
  attr_accessor :id
33
35
 
34
- attr_accessor :username
35
-
36
36
  # Attribute mapping from ruby-style variable name to JSON key.
37
37
  def self.attribute_map
38
38
  {
39
- :'created_at' => :'createdAt',
40
- :'updated_at' => :'updatedAt',
39
+ :'username' => :'username',
41
40
  :'user_id' => :'userId',
42
41
  :'email_address' => :'emailAddress',
43
42
  :'inbox_id' => :'inboxId',
43
+ :'updated_at' => :'updatedAt',
44
+ :'created_at' => :'createdAt',
44
45
  :'portal_id' => :'portalId',
45
46
  :'name' => :'name',
46
- :'id' => :'id',
47
- :'username' => :'username'
47
+ :'id' => :'id'
48
48
  }
49
49
  end
50
50
 
51
51
  # Attribute type mapping.
52
52
  def self.openapi_types
53
53
  {
54
- :'created_at' => :'DateTime',
55
- :'updated_at' => :'DateTime',
54
+ :'username' => :'String',
56
55
  :'user_id' => :'String',
57
56
  :'email_address' => :'String',
58
57
  :'inbox_id' => :'String',
58
+ :'updated_at' => :'DateTime',
59
+ :'created_at' => :'DateTime',
59
60
  :'portal_id' => :'String',
60
61
  :'name' => :'String',
61
- :'id' => :'String',
62
- :'username' => :'String'
62
+ :'id' => :'String'
63
63
  }
64
64
  end
65
65
 
@@ -84,12 +84,8 @@ module MailSlurpClient
84
84
  h[k.to_sym] = v
85
85
  }
86
86
 
87
- if attributes.key?(:'created_at')
88
- self.created_at = attributes[:'created_at']
89
- end
90
-
91
- if attributes.key?(:'updated_at')
92
- self.updated_at = attributes[:'updated_at']
87
+ if attributes.key?(:'username')
88
+ self.username = attributes[:'username']
93
89
  end
94
90
 
95
91
  if attributes.key?(:'user_id')
@@ -104,6 +100,14 @@ module MailSlurpClient
104
100
  self.inbox_id = attributes[:'inbox_id']
105
101
  end
106
102
 
103
+ if attributes.key?(:'updated_at')
104
+ self.updated_at = attributes[:'updated_at']
105
+ end
106
+
107
+ if attributes.key?(:'created_at')
108
+ self.created_at = attributes[:'created_at']
109
+ end
110
+
107
111
  if attributes.key?(:'portal_id')
108
112
  self.portal_id = attributes[:'portal_id']
109
113
  end
@@ -115,26 +119,26 @@ module MailSlurpClient
115
119
  if attributes.key?(:'id')
116
120
  self.id = attributes[:'id']
117
121
  end
118
-
119
- if attributes.key?(:'username')
120
- self.username = attributes[:'username']
121
- end
122
122
  end
123
123
 
124
124
  # Show invalid properties with the reasons. Usually used together with valid?
125
125
  # @return Array for valid properties with the reasons
126
126
  def list_invalid_properties
127
127
  invalid_properties = Array.new
128
- if @created_at.nil?
129
- invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
128
+ if @username.nil?
129
+ invalid_properties.push('invalid value for "username", username cannot be nil.')
130
+ end
131
+
132
+ if @user_id.nil?
133
+ invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
130
134
  end
131
135
 
132
136
  if @updated_at.nil?
133
137
  invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
134
138
  end
135
139
 
136
- if @user_id.nil?
137
- invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
140
+ if @created_at.nil?
141
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
138
142
  end
139
143
 
140
144
  if @portal_id.nil?
@@ -145,22 +149,18 @@ module MailSlurpClient
145
149
  invalid_properties.push('invalid value for "id", id cannot be nil.')
146
150
  end
147
151
 
148
- if @username.nil?
149
- invalid_properties.push('invalid value for "username", username cannot be nil.')
150
- end
151
-
152
152
  invalid_properties
153
153
  end
154
154
 
155
155
  # Check to see if the all the properties in the model are valid
156
156
  # @return true if the model is valid
157
157
  def valid?
158
- return false if @created_at.nil?
159
- return false if @updated_at.nil?
158
+ return false if @username.nil?
160
159
  return false if @user_id.nil?
160
+ return false if @updated_at.nil?
161
+ return false if @created_at.nil?
161
162
  return false if @portal_id.nil?
162
163
  return false if @id.nil?
163
- return false if @username.nil?
164
164
  true
165
165
  end
166
166
 
@@ -169,15 +169,15 @@ module MailSlurpClient
169
169
  def ==(o)
170
170
  return true if self.equal?(o)
171
171
  self.class == o.class &&
172
- created_at == o.created_at &&
173
- updated_at == o.updated_at &&
172
+ username == o.username &&
174
173
  user_id == o.user_id &&
175
174
  email_address == o.email_address &&
176
175
  inbox_id == o.inbox_id &&
176
+ updated_at == o.updated_at &&
177
+ created_at == o.created_at &&
177
178
  portal_id == o.portal_id &&
178
179
  name == o.name &&
179
- id == o.id &&
180
- username == o.username
180
+ id == o.id
181
181
  end
182
182
 
183
183
  # @see the `==` method
@@ -189,7 +189,7 @@ module MailSlurpClient
189
189
  # Calculates hash code according to all attributes.
190
190
  # @return [Integer] Hash code
191
191
  def hash
192
- [created_at, updated_at, user_id, email_address, inbox_id, portal_id, name, id, username].hash
192
+ [username, user_id, email_address, inbox_id, updated_at, created_at, portal_id, name, id].hash
193
193
  end
194
194
 
195
195
  # Builds the object from hash
@@ -279,7 +279,7 @@ module MailSlurpClient
279
279
  return false unless inbox_type_validator.valid?(@inbox_type)
280
280
  return false if @read_only.nil?
281
281
  return false if @virtual_inbox.nil?
282
- functions_as_validator = EnumAttributeValidator.new('String', ["ALIAS", "THREAD", "CATCH_ALL", "CONNECTOR", "ACCOUNT", "GUEST"])
282
+ functions_as_validator = EnumAttributeValidator.new('String', ["ALIAS", "THREAD", "CATCH_ALL", "CONNECTOR", "ACCOUNT", "GUEST", "OAUTH_CONNECTION_GMAIL"])
283
283
  return false unless functions_as_validator.valid?(@functions_as)
284
284
  account_region_validator = EnumAttributeValidator.new('String', ["US_WEST_2"])
285
285
  return false unless account_region_validator.valid?(@account_region)
@@ -299,7 +299,7 @@ module MailSlurpClient
299
299
  # Custom attribute writer method checking allowed values (enum).
300
300
  # @param [Object] functions_as Object to be assigned
301
301
  def functions_as=(functions_as)
302
- validator = EnumAttributeValidator.new('String', ["ALIAS", "THREAD", "CATCH_ALL", "CONNECTOR", "ACCOUNT", "GUEST"])
302
+ validator = EnumAttributeValidator.new('String', ["ALIAS", "THREAD", "CATCH_ALL", "CONNECTOR", "ACCOUNT", "GUEST", "OAUTH_CONNECTION_GMAIL"])
303
303
  unless validator.valid?(functions_as)
304
304
  fail ArgumentError, "invalid value for \"functions_as\", must be one of #{validator.allowable_values}."
305
305
  end
@@ -15,14 +15,14 @@ require 'date'
15
15
  module MailSlurpClient
16
16
  # Inbox forwarder event
17
17
  class InboxForwarderEventProjection
18
- attr_accessor :created_at
19
-
20
18
  attr_accessor :user_id
21
19
 
22
20
  attr_accessor :email_id
23
21
 
24
22
  attr_accessor :inbox_id
25
23
 
24
+ attr_accessor :created_at
25
+
26
26
  attr_accessor :sent_id
27
27
 
28
28
  attr_accessor :forwarder_id
@@ -58,10 +58,10 @@ module MailSlurpClient
58
58
  # Attribute mapping from ruby-style variable name to JSON key.
59
59
  def self.attribute_map
60
60
  {
61
- :'created_at' => :'createdAt',
62
61
  :'user_id' => :'userId',
63
62
  :'email_id' => :'emailId',
64
63
  :'inbox_id' => :'inboxId',
64
+ :'created_at' => :'createdAt',
65
65
  :'sent_id' => :'sentId',
66
66
  :'forwarder_id' => :'forwarderId',
67
67
  :'message' => :'message',
@@ -73,10 +73,10 @@ module MailSlurpClient
73
73
  # Attribute type mapping.
74
74
  def self.openapi_types
75
75
  {
76
- :'created_at' => :'DateTime',
77
76
  :'user_id' => :'String',
78
77
  :'email_id' => :'String',
79
78
  :'inbox_id' => :'String',
79
+ :'created_at' => :'DateTime',
80
80
  :'sent_id' => :'String',
81
81
  :'forwarder_id' => :'String',
82
82
  :'message' => :'String',
@@ -114,10 +114,6 @@ module MailSlurpClient
114
114
  h[k.to_sym] = v
115
115
  }
116
116
 
117
- if attributes.key?(:'created_at')
118
- self.created_at = attributes[:'created_at']
119
- end
120
-
121
117
  if attributes.key?(:'user_id')
122
118
  self.user_id = attributes[:'user_id']
123
119
  end
@@ -130,6 +126,10 @@ module MailSlurpClient
130
126
  self.inbox_id = attributes[:'inbox_id']
131
127
  end
132
128
 
129
+ if attributes.key?(:'created_at')
130
+ self.created_at = attributes[:'created_at']
131
+ end
132
+
133
133
  if attributes.key?(:'sent_id')
134
134
  self.sent_id = attributes[:'sent_id']
135
135
  end
@@ -186,10 +186,10 @@ module MailSlurpClient
186
186
  def ==(o)
187
187
  return true if self.equal?(o)
188
188
  self.class == o.class &&
189
- created_at == o.created_at &&
190
189
  user_id == o.user_id &&
191
190
  email_id == o.email_id &&
192
191
  inbox_id == o.inbox_id &&
192
+ created_at == o.created_at &&
193
193
  sent_id == o.sent_id &&
194
194
  forwarder_id == o.forwarder_id &&
195
195
  message == o.message &&
@@ -206,7 +206,7 @@ module MailSlurpClient
206
206
  # Calculates hash code according to all attributes.
207
207
  # @return [Integer] Hash code
208
208
  def hash
209
- [created_at, user_id, email_id, inbox_id, sent_id, forwarder_id, message, id, status].hash
209
+ [user_id, email_id, inbox_id, created_at, sent_id, forwarder_id, message, id, status].hash
210
210
  end
211
211
 
212
212
  # Builds the object from hash