mailslurp_client 16.2.1 → 16.2.4

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 (69) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mailslurp_client/api/ai_controller_api.rb +193 -79
  3. data/lib/mailslurp_client/api/attachment_controller_api.rb +6 -3
  4. data/lib/mailslurp_client/api/email_controller_api.rb +3 -0
  5. data/lib/mailslurp_client/api/form_controller_api.rb +8 -9
  6. data/lib/mailslurp_client/api/inbox_controller_api.rb +28 -2
  7. data/lib/mailslurp_client/api/mfa_controller_api.rb +73 -9
  8. data/lib/mailslurp_client/api/sms_controller_api.rb +3 -0
  9. data/lib/mailslurp_client/api/webhook_controller_api.rb +63 -9
  10. data/lib/mailslurp_client/models/abstract_webhook_payload.rb +2 -2
  11. data/lib/mailslurp_client/models/{ai_tranform_create_options.rb → ai_transform_create_options.rb} +31 -7
  12. data/lib/mailslurp_client/models/ai_transform_dto.rb +1 -0
  13. data/lib/mailslurp_client/models/ai_transform_mapping_dto.rb +18 -9
  14. data/lib/mailslurp_client/models/ai_transform_mapping_projection.rb +15 -6
  15. data/lib/mailslurp_client/models/ai_transform_projection.rb +16 -1
  16. data/lib/mailslurp_client/models/ai_transform_result_dto.rb +5 -1
  17. data/lib/mailslurp_client/models/{ai_transform_result_projection.rb → ai_transform_result_projection_dto.rb} +56 -53
  18. data/lib/mailslurp_client/models/conditional_structured_content_result.rb +221 -0
  19. data/lib/mailslurp_client/models/create_ai_transformer_mapping_options.rb +5 -10
  20. data/lib/mailslurp_client/models/create_domain_options.rb +19 -0
  21. data/lib/mailslurp_client/models/create_inbox_forwarder_options.rb +19 -0
  22. data/lib/mailslurp_client/models/create_inbox_replier_options.rb +19 -0
  23. data/lib/mailslurp_client/models/create_inbox_ruleset_options.rb +2 -2
  24. data/lib/mailslurp_client/models/create_totp_device_base32_secret_key_options.rb +306 -0
  25. data/lib/mailslurp_client/models/create_totp_device_custom_options.rb +306 -0
  26. data/lib/mailslurp_client/models/create_totp_device_otp_auth_url_options.rb +35 -0
  27. data/lib/mailslurp_client/models/create_webhook_options.rb +2 -2
  28. data/lib/mailslurp_client/models/describe_domain_options.rb +19 -0
  29. data/lib/mailslurp_client/models/dns_lookup_options.rb +19 -0
  30. data/lib/mailslurp_client/models/email_projection.rb +11 -11
  31. data/lib/mailslurp_client/models/email_thread_projection.rb +10 -10
  32. data/lib/mailslurp_client/models/entity_automation_item_projection.rb +10 -10
  33. data/lib/mailslurp_client/models/expiration_defaults.rb +1 -0
  34. data/lib/mailslurp_client/models/fake_email_dto.rb +1 -0
  35. data/lib/mailslurp_client/models/generate_structured_content_attachment_options.rb +1 -0
  36. data/lib/mailslurp_client/models/generate_structured_content_email_options.rb +1 -0
  37. data/lib/mailslurp_client/models/generate_structured_content_sms_options.rb +1 -0
  38. data/lib/mailslurp_client/models/inbox_exists_dto.rb +26 -4
  39. data/lib/mailslurp_client/models/inbox_ruleset_dto.rb +2 -2
  40. data/lib/mailslurp_client/models/inline_object.rb +58 -12
  41. data/lib/mailslurp_client/models/inline_object1.rb +211 -0
  42. data/lib/mailslurp_client/models/invoke_transformer_options.rb +329 -0
  43. data/lib/mailslurp_client/models/match_option.rb +19 -0
  44. data/lib/mailslurp_client/models/missed_email_dto.rb +1 -0
  45. data/lib/mailslurp_client/models/page_ai_transform_result_projection.rb +1 -1
  46. data/lib/mailslurp_client/models/phone_message_thread_item_projection.rb +19 -19
  47. data/lib/mailslurp_client/models/phone_message_thread_projection.rb +0 -10
  48. data/lib/mailslurp_client/models/sent_email_projection.rb +15 -30
  49. data/lib/mailslurp_client/models/sms_match_option.rb +19 -0
  50. data/lib/mailslurp_client/models/sms_preview.rb +4 -0
  51. data/lib/mailslurp_client/models/structured_output_schema.rb +12 -9
  52. data/lib/mailslurp_client/models/update_inbox_replier_options.rb +19 -0
  53. data/lib/mailslurp_client/models/upload_attachment_options.rb +19 -0
  54. data/lib/mailslurp_client/models/webhook_bounce_payload.rb +2 -2
  55. data/lib/mailslurp_client/models/webhook_bounce_recipient_payload.rb +2 -2
  56. data/lib/mailslurp_client/models/webhook_delivery_status_payload.rb +2 -2
  57. data/lib/mailslurp_client/models/webhook_dto.rb +2 -2
  58. data/lib/mailslurp_client/models/webhook_email_opened_payload.rb +2 -2
  59. data/lib/mailslurp_client/models/webhook_email_read_payload.rb +2 -2
  60. data/lib/mailslurp_client/models/webhook_new_ai_transform_result_payload.rb +389 -0
  61. data/lib/mailslurp_client/models/webhook_new_attachment_payload.rb +2 -2
  62. data/lib/mailslurp_client/models/webhook_new_contact_payload.rb +2 -2
  63. data/lib/mailslurp_client/models/webhook_new_email_payload.rb +2 -2
  64. data/lib/mailslurp_client/models/webhook_new_sms_payload.rb +2 -2
  65. data/lib/mailslurp_client/models/webhook_projection.rb +2 -2
  66. data/lib/mailslurp_client/models/webhook_result_dto.rb +2 -2
  67. data/lib/mailslurp_client/version.rb +1 -1
  68. data/lib/mailslurp_client.rb +8 -2
  69. metadata +10 -4
@@ -0,0 +1,211 @@
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 InlineObject1
17
+ attr_accessor :file
18
+
19
+ # Attribute mapping from ruby-style variable name to JSON key.
20
+ def self.attribute_map
21
+ {
22
+ :'file' => :'file'
23
+ }
24
+ end
25
+
26
+ # Attribute type mapping.
27
+ def self.openapi_types
28
+ {
29
+ :'file' => :'File'
30
+ }
31
+ end
32
+
33
+ # List of attributes with nullable: true
34
+ def self.openapi_nullable
35
+ Set.new([
36
+ ])
37
+ end
38
+
39
+ # Initializes the object
40
+ # @param [Hash] attributes Model attributes in the form of hash
41
+ def initialize(attributes = {})
42
+ if (!attributes.is_a?(Hash))
43
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::InlineObject1` initialize method"
44
+ end
45
+
46
+ # check to see if the attribute exists and convert string to symbol for hash key
47
+ attributes = attributes.each_with_object({}) { |(k, v), h|
48
+ if (!self.class.attribute_map.key?(k.to_sym))
49
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::InlineObject1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
50
+ end
51
+ h[k.to_sym] = v
52
+ }
53
+
54
+ if attributes.key?(:'file')
55
+ self.file = attributes[:'file']
56
+ end
57
+ end
58
+
59
+ # Show invalid properties with the reasons. Usually used together with valid?
60
+ # @return Array for valid properties with the reasons
61
+ def list_invalid_properties
62
+ invalid_properties = Array.new
63
+ if @file.nil?
64
+ invalid_properties.push('invalid value for "file", file cannot be nil.')
65
+ end
66
+
67
+ invalid_properties
68
+ end
69
+
70
+ # Check to see if the all the properties in the model are valid
71
+ # @return true if the model is valid
72
+ def valid?
73
+ return false if @file.nil?
74
+ true
75
+ end
76
+
77
+ # Checks equality by comparing each attribute.
78
+ # @param [Object] Object to be compared
79
+ def ==(o)
80
+ return true if self.equal?(o)
81
+ self.class == o.class &&
82
+ file == o.file
83
+ end
84
+
85
+ # @see the `==` method
86
+ # @param [Object] Object to be compared
87
+ def eql?(o)
88
+ self == o
89
+ end
90
+
91
+ # Calculates hash code according to all attributes.
92
+ # @return [Integer] Hash code
93
+ def hash
94
+ [file].hash
95
+ end
96
+
97
+ # Builds the object from hash
98
+ # @param [Hash] attributes Model attributes in the form of hash
99
+ # @return [Object] Returns the model itself
100
+ def self.build_from_hash(attributes)
101
+ new.build_from_hash(attributes)
102
+ end
103
+
104
+ # Builds the object from hash
105
+ # @param [Hash] attributes Model attributes in the form of hash
106
+ # @return [Object] Returns the model itself
107
+ def build_from_hash(attributes)
108
+ return nil unless attributes.is_a?(Hash)
109
+ self.class.openapi_types.each_pair do |key, type|
110
+ if type =~ /\AArray<(.*)>/i
111
+ # check to ensure the input is an array given that the attribute
112
+ # is documented as an array but the input is not
113
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
114
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
115
+ end
116
+ elsif !attributes[self.class.attribute_map[key]].nil?
117
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
118
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
119
+ end
120
+
121
+ self
122
+ end
123
+
124
+ # Deserializes the data based on type
125
+ # @param string type Data type
126
+ # @param string value Value to be deserialized
127
+ # @return [Object] Deserialized data
128
+ def _deserialize(type, value)
129
+ case type.to_sym
130
+ when :DateTime
131
+ DateTime.parse(value)
132
+ when :Date
133
+ Date.parse(value)
134
+ when :String
135
+ value.to_s
136
+ when :Integer
137
+ value.to_i
138
+ when :Float
139
+ value.to_f
140
+ when :Boolean
141
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
142
+ true
143
+ else
144
+ false
145
+ end
146
+ when :Object
147
+ # generic object (usually a Hash), return directly
148
+ value
149
+ when /\AArray<(?<inner_type>.+)>\z/
150
+ inner_type = Regexp.last_match[:inner_type]
151
+ value.map { |v| _deserialize(inner_type, v) }
152
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
153
+ k_type = Regexp.last_match[:k_type]
154
+ v_type = Regexp.last_match[:v_type]
155
+ {}.tap do |hash|
156
+ value.each do |k, v|
157
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
158
+ end
159
+ end
160
+ else # model
161
+ MailSlurpClient.const_get(type).build_from_hash(value)
162
+ end
163
+ end
164
+
165
+ # Returns the string representation of the object
166
+ # @return [String] String presentation of the object
167
+ def to_s
168
+ to_hash.to_s
169
+ end
170
+
171
+ # to_body is an alias to to_hash (backward compatibility)
172
+ # @return [Hash] Returns the object in the form of hash
173
+ def to_body
174
+ to_hash
175
+ end
176
+
177
+ # Returns the object in the form of hash
178
+ # @return [Hash] Returns the object in the form of hash
179
+ def to_hash
180
+ hash = {}
181
+ self.class.attribute_map.each_pair do |attr, param|
182
+ value = self.send(attr)
183
+ if value.nil?
184
+ is_nullable = self.class.openapi_nullable.include?(attr)
185
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
186
+ end
187
+
188
+ hash[param] = _to_hash(value)
189
+ end
190
+ hash
191
+ end
192
+
193
+ # Outputs non-array value in the form of hash
194
+ # For object, use to_hash. Otherwise, just return the value
195
+ # @param [Object] value Any valid value
196
+ # @return [Hash] Returns the value in the form of hash
197
+ def _to_hash(value)
198
+ if value.is_a?(Array)
199
+ value.compact.map { |v| _to_hash(v) }
200
+ elsif value.is_a?(Hash)
201
+ {}.tap do |hash|
202
+ value.each { |k, v| hash[k] = _to_hash(v) }
203
+ end
204
+ elsif value.respond_to? :to_hash
205
+ value.to_hash
206
+ else
207
+ value
208
+ end
209
+ end
210
+ end
211
+ end
@@ -0,0 +1,329 @@
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 InvokeTransformerOptions
17
+ attr_accessor :ai_transform_id
18
+
19
+ attr_accessor :ai_transform_mapping_id
20
+
21
+ attr_accessor :raw_input
22
+
23
+ attr_accessor :entity_id
24
+
25
+ attr_accessor :entity_type
26
+
27
+ attr_accessor :raw_conditions
28
+
29
+ attr_accessor :raw_instructions
30
+
31
+ attr_accessor :raw_output_schema
32
+
33
+ attr_accessor :content_selector
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
+ :'ai_transform_id' => :'aiTransformId',
61
+ :'ai_transform_mapping_id' => :'aiTransformMappingId',
62
+ :'raw_input' => :'rawInput',
63
+ :'entity_id' => :'entityId',
64
+ :'entity_type' => :'entityType',
65
+ :'raw_conditions' => :'rawConditions',
66
+ :'raw_instructions' => :'rawInstructions',
67
+ :'raw_output_schema' => :'rawOutputSchema',
68
+ :'content_selector' => :'contentSelector'
69
+ }
70
+ end
71
+
72
+ # Attribute type mapping.
73
+ def self.openapi_types
74
+ {
75
+ :'ai_transform_id' => :'String',
76
+ :'ai_transform_mapping_id' => :'String',
77
+ :'raw_input' => :'String',
78
+ :'entity_id' => :'String',
79
+ :'entity_type' => :'String',
80
+ :'raw_conditions' => :'Array<String>',
81
+ :'raw_instructions' => :'Array<String>',
82
+ :'raw_output_schema' => :'StructuredOutputSchema',
83
+ :'content_selector' => :'String'
84
+ }
85
+ end
86
+
87
+ # List of attributes with nullable: true
88
+ def self.openapi_nullable
89
+ Set.new([
90
+ :'raw_output_schema',
91
+ ])
92
+ end
93
+
94
+ # Initializes the object
95
+ # @param [Hash] attributes Model attributes in the form of hash
96
+ def initialize(attributes = {})
97
+ if (!attributes.is_a?(Hash))
98
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::InvokeTransformerOptions` initialize method"
99
+ end
100
+
101
+ # check to see if the attribute exists and convert string to symbol for hash key
102
+ attributes = attributes.each_with_object({}) { |(k, v), h|
103
+ if (!self.class.attribute_map.key?(k.to_sym))
104
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::InvokeTransformerOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
105
+ end
106
+ h[k.to_sym] = v
107
+ }
108
+
109
+ if attributes.key?(:'ai_transform_id')
110
+ self.ai_transform_id = attributes[:'ai_transform_id']
111
+ end
112
+
113
+ if attributes.key?(:'ai_transform_mapping_id')
114
+ self.ai_transform_mapping_id = attributes[:'ai_transform_mapping_id']
115
+ end
116
+
117
+ if attributes.key?(:'raw_input')
118
+ self.raw_input = attributes[:'raw_input']
119
+ end
120
+
121
+ if attributes.key?(:'entity_id')
122
+ self.entity_id = attributes[:'entity_id']
123
+ end
124
+
125
+ if attributes.key?(:'entity_type')
126
+ self.entity_type = attributes[:'entity_type']
127
+ end
128
+
129
+ if attributes.key?(:'raw_conditions')
130
+ if (value = attributes[:'raw_conditions']).is_a?(Array)
131
+ self.raw_conditions = value
132
+ end
133
+ end
134
+
135
+ if attributes.key?(:'raw_instructions')
136
+ if (value = attributes[:'raw_instructions']).is_a?(Array)
137
+ self.raw_instructions = value
138
+ end
139
+ end
140
+
141
+ if attributes.key?(:'raw_output_schema')
142
+ self.raw_output_schema = attributes[:'raw_output_schema']
143
+ end
144
+
145
+ if attributes.key?(:'content_selector')
146
+ self.content_selector = attributes[:'content_selector']
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
+ invalid_properties = Array.new
154
+ invalid_properties
155
+ end
156
+
157
+ # Check to see if the all the properties in the model are valid
158
+ # @return true if the model is valid
159
+ def valid?
160
+ entity_type_validator = EnumAttributeValidator.new('String', ["EMAIL", "SMS", "ATTACHMENT"])
161
+ return false unless entity_type_validator.valid?(@entity_type)
162
+ content_selector_validator = EnumAttributeValidator.new('String', ["RAW", "BODY", "BODY_ATTACHMENTS"])
163
+ return false unless content_selector_validator.valid?(@content_selector)
164
+ true
165
+ end
166
+
167
+ # Custom attribute writer method checking allowed values (enum).
168
+ # @param [Object] entity_type Object to be assigned
169
+ def entity_type=(entity_type)
170
+ validator = EnumAttributeValidator.new('String', ["EMAIL", "SMS", "ATTACHMENT"])
171
+ unless validator.valid?(entity_type)
172
+ fail ArgumentError, "invalid value for \"entity_type\", must be one of #{validator.allowable_values}."
173
+ end
174
+ @entity_type = entity_type
175
+ end
176
+
177
+ # Custom attribute writer method checking allowed values (enum).
178
+ # @param [Object] content_selector Object to be assigned
179
+ def content_selector=(content_selector)
180
+ validator = EnumAttributeValidator.new('String', ["RAW", "BODY", "BODY_ATTACHMENTS"])
181
+ unless validator.valid?(content_selector)
182
+ fail ArgumentError, "invalid value for \"content_selector\", must be one of #{validator.allowable_values}."
183
+ end
184
+ @content_selector = content_selector
185
+ end
186
+
187
+ # Checks equality by comparing each attribute.
188
+ # @param [Object] Object to be compared
189
+ def ==(o)
190
+ return true if self.equal?(o)
191
+ self.class == o.class &&
192
+ ai_transform_id == o.ai_transform_id &&
193
+ ai_transform_mapping_id == o.ai_transform_mapping_id &&
194
+ raw_input == o.raw_input &&
195
+ entity_id == o.entity_id &&
196
+ entity_type == o.entity_type &&
197
+ raw_conditions == o.raw_conditions &&
198
+ raw_instructions == o.raw_instructions &&
199
+ raw_output_schema == o.raw_output_schema &&
200
+ content_selector == o.content_selector
201
+ end
202
+
203
+ # @see the `==` method
204
+ # @param [Object] Object to be compared
205
+ def eql?(o)
206
+ self == o
207
+ end
208
+
209
+ # Calculates hash code according to all attributes.
210
+ # @return [Integer] Hash code
211
+ def hash
212
+ [ai_transform_id, ai_transform_mapping_id, raw_input, entity_id, entity_type, raw_conditions, raw_instructions, raw_output_schema, content_selector].hash
213
+ end
214
+
215
+ # Builds the object from hash
216
+ # @param [Hash] attributes Model attributes in the form of hash
217
+ # @return [Object] Returns the model itself
218
+ def self.build_from_hash(attributes)
219
+ new.build_from_hash(attributes)
220
+ end
221
+
222
+ # Builds the object from hash
223
+ # @param [Hash] attributes Model attributes in the form of hash
224
+ # @return [Object] Returns the model itself
225
+ def build_from_hash(attributes)
226
+ return nil unless attributes.is_a?(Hash)
227
+ self.class.openapi_types.each_pair do |key, type|
228
+ if type =~ /\AArray<(.*)>/i
229
+ # check to ensure the input is an array given that the attribute
230
+ # is documented as an array but the input is not
231
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
232
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
233
+ end
234
+ elsif !attributes[self.class.attribute_map[key]].nil?
235
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
236
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
237
+ end
238
+
239
+ self
240
+ end
241
+
242
+ # Deserializes the data based on type
243
+ # @param string type Data type
244
+ # @param string value Value to be deserialized
245
+ # @return [Object] Deserialized data
246
+ def _deserialize(type, value)
247
+ case type.to_sym
248
+ when :DateTime
249
+ DateTime.parse(value)
250
+ when :Date
251
+ Date.parse(value)
252
+ when :String
253
+ value.to_s
254
+ when :Integer
255
+ value.to_i
256
+ when :Float
257
+ value.to_f
258
+ when :Boolean
259
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
260
+ true
261
+ else
262
+ false
263
+ end
264
+ when :Object
265
+ # generic object (usually a Hash), return directly
266
+ value
267
+ when /\AArray<(?<inner_type>.+)>\z/
268
+ inner_type = Regexp.last_match[:inner_type]
269
+ value.map { |v| _deserialize(inner_type, v) }
270
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
271
+ k_type = Regexp.last_match[:k_type]
272
+ v_type = Regexp.last_match[:v_type]
273
+ {}.tap do |hash|
274
+ value.each do |k, v|
275
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
276
+ end
277
+ end
278
+ else # model
279
+ MailSlurpClient.const_get(type).build_from_hash(value)
280
+ end
281
+ end
282
+
283
+ # Returns the string representation of the object
284
+ # @return [String] String presentation of the object
285
+ def to_s
286
+ to_hash.to_s
287
+ end
288
+
289
+ # to_body is an alias to to_hash (backward compatibility)
290
+ # @return [Hash] Returns the object in the form of hash
291
+ def to_body
292
+ to_hash
293
+ end
294
+
295
+ # Returns the object in the form of hash
296
+ # @return [Hash] Returns the object in the form of hash
297
+ def to_hash
298
+ hash = {}
299
+ self.class.attribute_map.each_pair do |attr, param|
300
+ value = self.send(attr)
301
+ if value.nil?
302
+ is_nullable = self.class.openapi_nullable.include?(attr)
303
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
304
+ end
305
+
306
+ hash[param] = _to_hash(value)
307
+ end
308
+ hash
309
+ end
310
+
311
+ # Outputs non-array value in the form of hash
312
+ # For object, use to_hash. Otherwise, just return the value
313
+ # @param [Object] value Any valid value
314
+ # @return [Hash] Returns the value in the form of hash
315
+ def _to_hash(value)
316
+ if value.is_a?(Array)
317
+ value.compact.map { |v| _to_hash(v) }
318
+ elsif value.is_a?(Hash)
319
+ {}.tap do |hash|
320
+ value.each { |k, v| hash[k] = _to_hash(v) }
321
+ end
322
+ elsif value.respond_to? :to_hash
323
+ value.to_hash
324
+ else
325
+ value
326
+ end
327
+ end
328
+ end
329
+ end
@@ -114,6 +114,10 @@ module MailSlurpClient
114
114
  invalid_properties.push('invalid value for "value", value cannot be nil.')
115
115
  end
116
116
 
117
+ if @value.to_s.length < 1
118
+ invalid_properties.push('invalid value for "value", the character length must be great than or equal to 1.')
119
+ end
120
+
117
121
  invalid_properties
118
122
  end
119
123
 
@@ -127,6 +131,7 @@ module MailSlurpClient
127
131
  should_validator = EnumAttributeValidator.new('String', ["MATCH", "CONTAIN", "EQUAL"])
128
132
  return false unless should_validator.valid?(@should)
129
133
  return false if @value.nil?
134
+ return false if @value.to_s.length < 1
130
135
  true
131
136
  end
132
137
 
@@ -150,6 +155,20 @@ module MailSlurpClient
150
155
  @should = should
151
156
  end
152
157
 
158
+ # Custom attribute writer method with validation
159
+ # @param [Object] value Value to be assigned
160
+ def value=(value)
161
+ if value.nil?
162
+ fail ArgumentError, 'value cannot be nil'
163
+ end
164
+
165
+ if value.to_s.length < 1
166
+ fail ArgumentError, 'invalid value for "value", the character length must be great than or equal to 1.'
167
+ end
168
+
169
+ @value = value
170
+ end
171
+
153
172
  # Checks equality by comparing each attribute.
154
173
  # @param [Object] Object to be compared
155
174
  def ==(o)
@@ -27,6 +27,7 @@ module MailSlurpClient
27
27
 
28
28
  attr_accessor :from
29
29
 
30
+ # use raw key and raw bucket
30
31
  attr_accessor :raw_url
31
32
 
32
33
  attr_accessor :raw_key
@@ -57,7 +57,7 @@ module MailSlurpClient
57
57
  # Attribute type mapping.
58
58
  def self.openapi_types
59
59
  {
60
- :'content' => :'Array<AITransformResultProjection>',
60
+ :'content' => :'Array<AITransformResultProjectionDto>',
61
61
  :'pageable' => :'PageableObject',
62
62
  :'total_elements' => :'Integer',
63
63
  :'total_pages' => :'Integer',