mailslurp_client 15.17.6 → 15.17.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -0
  3. data/lib/mailslurp_client/api/connector_controller_api.rb +619 -0
  4. data/lib/mailslurp_client/models/bounce_projection.rb +15 -15
  5. data/lib/mailslurp_client/models/connector_dto.rb +407 -0
  6. data/lib/mailslurp_client/models/connector_projection.rb +346 -0
  7. data/lib/mailslurp_client/models/connector_sync_event_dto.rb +310 -0
  8. data/lib/mailslurp_client/models/connector_sync_event_projection.rb +306 -0
  9. data/lib/mailslurp_client/models/connector_sync_request_result.rb +224 -0
  10. data/lib/mailslurp_client/models/connector_sync_request_result_exception.rb +246 -0
  11. data/lib/mailslurp_client/models/connector_sync_request_result_exception_cause.rb +237 -0
  12. data/lib/mailslurp_client/models/connector_sync_request_result_exception_cause_stack_trace.rb +269 -0
  13. data/lib/mailslurp_client/models/connector_sync_request_result_exception_cause_suppressed.rb +226 -0
  14. data/lib/mailslurp_client/models/connector_sync_result.rb +222 -0
  15. data/lib/mailslurp_client/models/create_connector_imap_options.rb +267 -0
  16. data/lib/mailslurp_client/models/create_connector_options.rb +338 -0
  17. data/lib/mailslurp_client/models/email_projection.rb +10 -10
  18. data/lib/mailslurp_client/models/inbox_replier_event_projection.rb +13 -13
  19. data/lib/mailslurp_client/models/inbox_ruleset_dto.rb +1 -0
  20. data/lib/mailslurp_client/models/missed_email_projection.rb +11 -11
  21. data/lib/mailslurp_client/models/page_connector.rb +308 -0
  22. data/lib/mailslurp_client/models/page_connector_sync_events.rb +308 -0
  23. data/lib/mailslurp_client/models/thread_projection.rb +11 -11
  24. data/lib/mailslurp_client/version.rb +1 -1
  25. data/lib/mailslurp_client.rb +15 -0
  26. metadata +17 -2
@@ -0,0 +1,222 @@
1
+ =begin
2
+ #MailSlurp API
3
+
4
+ #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. 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 ConnectorSyncResult
17
+ attr_accessor :email_sync_count
18
+
19
+ attr_accessor :log_lines
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'email_sync_count' => :'emailSyncCount',
25
+ :'log_lines' => :'logLines'
26
+ }
27
+ end
28
+
29
+ # Attribute type mapping.
30
+ def self.openapi_types
31
+ {
32
+ :'email_sync_count' => :'Integer',
33
+ :'log_lines' => :'Array<String>'
34
+ }
35
+ end
36
+
37
+ # List of attributes with nullable: true
38
+ def self.openapi_nullable
39
+ Set.new([
40
+ ])
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param [Hash] attributes Model attributes in the form of hash
45
+ def initialize(attributes = {})
46
+ if (!attributes.is_a?(Hash))
47
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::ConnectorSyncResult` initialize method"
48
+ end
49
+
50
+ # check to see if the attribute exists and convert string to symbol for hash key
51
+ attributes = attributes.each_with_object({}) { |(k, v), h|
52
+ if (!self.class.attribute_map.key?(k.to_sym))
53
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::ConnectorSyncResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
54
+ end
55
+ h[k.to_sym] = v
56
+ }
57
+
58
+ if attributes.key?(:'email_sync_count')
59
+ self.email_sync_count = attributes[:'email_sync_count']
60
+ end
61
+
62
+ if attributes.key?(:'log_lines')
63
+ if (value = attributes[:'log_lines']).is_a?(Array)
64
+ self.log_lines = value
65
+ end
66
+ end
67
+ end
68
+
69
+ # Show invalid properties with the reasons. Usually used together with valid?
70
+ # @return Array for valid properties with the reasons
71
+ def list_invalid_properties
72
+ invalid_properties = Array.new
73
+ if @email_sync_count.nil?
74
+ invalid_properties.push('invalid value for "email_sync_count", email_sync_count cannot be nil.')
75
+ end
76
+
77
+ invalid_properties
78
+ end
79
+
80
+ # Check to see if the all the properties in the model are valid
81
+ # @return true if the model is valid
82
+ def valid?
83
+ return false if @email_sync_count.nil?
84
+ true
85
+ end
86
+
87
+ # Checks equality by comparing each attribute.
88
+ # @param [Object] Object to be compared
89
+ def ==(o)
90
+ return true if self.equal?(o)
91
+ self.class == o.class &&
92
+ email_sync_count == o.email_sync_count &&
93
+ log_lines == o.log_lines
94
+ end
95
+
96
+ # @see the `==` method
97
+ # @param [Object] Object to be compared
98
+ def eql?(o)
99
+ self == o
100
+ end
101
+
102
+ # Calculates hash code according to all attributes.
103
+ # @return [Integer] Hash code
104
+ def hash
105
+ [email_sync_count, log_lines].hash
106
+ end
107
+
108
+ # Builds the object from hash
109
+ # @param [Hash] attributes Model attributes in the form of hash
110
+ # @return [Object] Returns the model itself
111
+ def self.build_from_hash(attributes)
112
+ new.build_from_hash(attributes)
113
+ end
114
+
115
+ # Builds the object from hash
116
+ # @param [Hash] attributes Model attributes in the form of hash
117
+ # @return [Object] Returns the model itself
118
+ def build_from_hash(attributes)
119
+ return nil unless attributes.is_a?(Hash)
120
+ self.class.openapi_types.each_pair do |key, type|
121
+ if type =~ /\AArray<(.*)>/i
122
+ # check to ensure the input is an array given that the attribute
123
+ # is documented as an array but the input is not
124
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
125
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
126
+ end
127
+ elsif !attributes[self.class.attribute_map[key]].nil?
128
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
129
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
130
+ end
131
+
132
+ self
133
+ end
134
+
135
+ # Deserializes the data based on type
136
+ # @param string type Data type
137
+ # @param string value Value to be deserialized
138
+ # @return [Object] Deserialized data
139
+ def _deserialize(type, value)
140
+ case type.to_sym
141
+ when :DateTime
142
+ DateTime.parse(value)
143
+ when :Date
144
+ Date.parse(value)
145
+ when :String
146
+ value.to_s
147
+ when :Integer
148
+ value.to_i
149
+ when :Float
150
+ value.to_f
151
+ when :Boolean
152
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
153
+ true
154
+ else
155
+ false
156
+ end
157
+ when :Object
158
+ # generic object (usually a Hash), return directly
159
+ value
160
+ when /\AArray<(?<inner_type>.+)>\z/
161
+ inner_type = Regexp.last_match[:inner_type]
162
+ value.map { |v| _deserialize(inner_type, v) }
163
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
164
+ k_type = Regexp.last_match[:k_type]
165
+ v_type = Regexp.last_match[:v_type]
166
+ {}.tap do |hash|
167
+ value.each do |k, v|
168
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
169
+ end
170
+ end
171
+ else # model
172
+ MailSlurpClient.const_get(type).build_from_hash(value)
173
+ end
174
+ end
175
+
176
+ # Returns the string representation of the object
177
+ # @return [String] String presentation of the object
178
+ def to_s
179
+ to_hash.to_s
180
+ end
181
+
182
+ # to_body is an alias to to_hash (backward compatibility)
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_body
185
+ to_hash
186
+ end
187
+
188
+ # Returns the object in the form of hash
189
+ # @return [Hash] Returns the object in the form of hash
190
+ def to_hash
191
+ hash = {}
192
+ self.class.attribute_map.each_pair do |attr, param|
193
+ value = self.send(attr)
194
+ if value.nil?
195
+ is_nullable = self.class.openapi_nullable.include?(attr)
196
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
197
+ end
198
+
199
+ hash[param] = _to_hash(value)
200
+ end
201
+ hash
202
+ end
203
+
204
+ # Outputs non-array value in the form of hash
205
+ # For object, use to_hash. Otherwise, just return the value
206
+ # @param [Object] value Any valid value
207
+ # @return [Hash] Returns the value in the form of hash
208
+ def _to_hash(value)
209
+ if value.is_a?(Array)
210
+ value.compact.map { |v| _to_hash(v) }
211
+ elsif value.is_a?(Hash)
212
+ {}.tap do |hash|
213
+ value.each { |k, v| hash[k] = _to_hash(v) }
214
+ end
215
+ elsif value.respond_to? :to_hash
216
+ value.to_hash
217
+ else
218
+ value
219
+ end
220
+ end
221
+ end
222
+ end
@@ -0,0 +1,267 @@
1
+ =begin
2
+ #MailSlurp API
3
+
4
+ #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. 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 CreateConnectorImapOptions
17
+ attr_accessor :host
18
+
19
+ attr_accessor :port
20
+
21
+ attr_accessor :username
22
+
23
+ attr_accessor :password
24
+
25
+ attr_accessor :use_ssl
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'host' => :'host',
31
+ :'port' => :'port',
32
+ :'username' => :'username',
33
+ :'password' => :'password',
34
+ :'use_ssl' => :'useSSL'
35
+ }
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'host' => :'String',
42
+ :'port' => :'Integer',
43
+ :'username' => :'String',
44
+ :'password' => :'String',
45
+ :'use_ssl' => :'Boolean'
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 `MailSlurpClient::CreateConnectorImapOptions` initialize method"
60
+ end
61
+
62
+ # check to see if the attribute exists and convert string to symbol for hash key
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!self.class.attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::CreateConnectorImapOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'host')
71
+ self.host = attributes[:'host']
72
+ end
73
+
74
+ if attributes.key?(:'port')
75
+ self.port = attributes[:'port']
76
+ end
77
+
78
+ if attributes.key?(:'username')
79
+ self.username = attributes[:'username']
80
+ end
81
+
82
+ if attributes.key?(:'password')
83
+ self.password = attributes[:'password']
84
+ end
85
+
86
+ if attributes.key?(:'use_ssl')
87
+ self.use_ssl = attributes[:'use_ssl']
88
+ end
89
+ end
90
+
91
+ # Show invalid properties with the reasons. Usually used together with valid?
92
+ # @return Array for valid properties with the reasons
93
+ def list_invalid_properties
94
+ invalid_properties = Array.new
95
+ if @host.nil?
96
+ invalid_properties.push('invalid value for "host", host cannot be nil.')
97
+ end
98
+
99
+ if @port.nil?
100
+ invalid_properties.push('invalid value for "port", port cannot be nil.')
101
+ end
102
+
103
+ if @username.nil?
104
+ invalid_properties.push('invalid value for "username", username cannot be nil.')
105
+ end
106
+
107
+ if @password.nil?
108
+ invalid_properties.push('invalid value for "password", password cannot be nil.')
109
+ end
110
+
111
+ if @use_ssl.nil?
112
+ invalid_properties.push('invalid value for "use_ssl", use_ssl cannot be nil.')
113
+ end
114
+
115
+ invalid_properties
116
+ end
117
+
118
+ # Check to see if the all the properties in the model are valid
119
+ # @return true if the model is valid
120
+ def valid?
121
+ return false if @host.nil?
122
+ return false if @port.nil?
123
+ return false if @username.nil?
124
+ return false if @password.nil?
125
+ return false if @use_ssl.nil?
126
+ true
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
+ host == o.host &&
135
+ port == o.port &&
136
+ username == o.username &&
137
+ password == o.password &&
138
+ use_ssl == o.use_ssl
139
+ end
140
+
141
+ # @see the `==` method
142
+ # @param [Object] Object to be compared
143
+ def eql?(o)
144
+ self == o
145
+ end
146
+
147
+ # Calculates hash code according to all attributes.
148
+ # @return [Integer] Hash code
149
+ def hash
150
+ [host, port, username, password, use_ssl].hash
151
+ end
152
+
153
+ # Builds the object from hash
154
+ # @param [Hash] attributes Model attributes in the form of hash
155
+ # @return [Object] Returns the model itself
156
+ def self.build_from_hash(attributes)
157
+ new.build_from_hash(attributes)
158
+ end
159
+
160
+ # Builds the object from hash
161
+ # @param [Hash] attributes Model attributes in the form of hash
162
+ # @return [Object] Returns the model itself
163
+ def build_from_hash(attributes)
164
+ return nil unless attributes.is_a?(Hash)
165
+ self.class.openapi_types.each_pair do |key, type|
166
+ if type =~ /\AArray<(.*)>/i
167
+ # check to ensure the input is an array given that the attribute
168
+ # is documented as an array but the input is not
169
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
170
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
171
+ end
172
+ elsif !attributes[self.class.attribute_map[key]].nil?
173
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
174
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
175
+ end
176
+
177
+ self
178
+ end
179
+
180
+ # Deserializes the data based on type
181
+ # @param string type Data type
182
+ # @param string value Value to be deserialized
183
+ # @return [Object] Deserialized data
184
+ def _deserialize(type, value)
185
+ case type.to_sym
186
+ when :DateTime
187
+ DateTime.parse(value)
188
+ when :Date
189
+ Date.parse(value)
190
+ when :String
191
+ value.to_s
192
+ when :Integer
193
+ value.to_i
194
+ when :Float
195
+ value.to_f
196
+ when :Boolean
197
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
198
+ true
199
+ else
200
+ false
201
+ end
202
+ when :Object
203
+ # generic object (usually a Hash), return directly
204
+ value
205
+ when /\AArray<(?<inner_type>.+)>\z/
206
+ inner_type = Regexp.last_match[:inner_type]
207
+ value.map { |v| _deserialize(inner_type, v) }
208
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
209
+ k_type = Regexp.last_match[:k_type]
210
+ v_type = Regexp.last_match[:v_type]
211
+ {}.tap do |hash|
212
+ value.each do |k, v|
213
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
214
+ end
215
+ end
216
+ else # model
217
+ MailSlurpClient.const_get(type).build_from_hash(value)
218
+ end
219
+ end
220
+
221
+ # Returns the string representation of the object
222
+ # @return [String] String presentation of the object
223
+ def to_s
224
+ to_hash.to_s
225
+ end
226
+
227
+ # to_body is an alias to to_hash (backward compatibility)
228
+ # @return [Hash] Returns the object in the form of hash
229
+ def to_body
230
+ to_hash
231
+ end
232
+
233
+ # Returns the object in the form of hash
234
+ # @return [Hash] Returns the object in the form of hash
235
+ def to_hash
236
+ hash = {}
237
+ self.class.attribute_map.each_pair do |attr, param|
238
+ value = self.send(attr)
239
+ if value.nil?
240
+ is_nullable = self.class.openapi_nullable.include?(attr)
241
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
242
+ end
243
+
244
+ hash[param] = _to_hash(value)
245
+ end
246
+ hash
247
+ end
248
+
249
+ # Outputs non-array value in the form of hash
250
+ # For object, use to_hash. Otherwise, just return the value
251
+ # @param [Object] value Any valid value
252
+ # @return [Hash] Returns the value in the form of hash
253
+ def _to_hash(value)
254
+ if value.is_a?(Array)
255
+ value.compact.map { |v| _to_hash(v) }
256
+ elsif value.is_a?(Hash)
257
+ {}.tap do |hash|
258
+ value.each { |k, v| hash[k] = _to_hash(v) }
259
+ end
260
+ elsif value.respond_to? :to_hash
261
+ value.to_hash
262
+ else
263
+ value
264
+ end
265
+ end
266
+ end
267
+ end