mailslurp_client 16.1.2 → 16.1.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.
- checksums.yaml +4 -4
- data/lib/mailslurp_client/api/ai_controller_api.rb +813 -6
- data/lib/mailslurp_client/models/ai_tranform_create_options.rb +237 -0
- data/lib/mailslurp_client/models/ai_transform_dto.rb +251 -0
- data/lib/mailslurp_client/models/ai_transform_mapping_dto.rb +310 -0
- data/lib/mailslurp_client/models/ai_transform_mapping_projection.rb +352 -0
- data/lib/mailslurp_client/models/ai_transform_projection.rb +251 -0
- data/lib/mailslurp_client/models/ai_transform_result_dto.rb +353 -0
- data/lib/mailslurp_client/models/ai_transform_result_projection.rb +324 -0
- data/lib/mailslurp_client/models/alias_projection.rb +15 -15
- data/lib/mailslurp_client/models/alias_thread_projection.rb +16 -16
- data/lib/mailslurp_client/models/attachment_projection.rb +10 -10
- data/lib/mailslurp_client/models/connector_projection.rb +15 -15
- data/lib/mailslurp_client/models/create_ai_transformer_mapping_options.rb +338 -0
- data/lib/mailslurp_client/models/create_webhook_options.rb +12 -1
- data/lib/mailslurp_client/models/email_projection.rb +10 -10
- data/lib/mailslurp_client/models/email_thread_projection.rb +36 -36
- data/lib/mailslurp_client/models/generate_structured_content_attachment_options.rb +27 -9
- data/lib/mailslurp_client/models/generate_structured_content_email_options.rb +19 -11
- data/lib/mailslurp_client/models/generate_structured_content_sms_options.rb +244 -0
- data/lib/mailslurp_client/models/guest_portal_user_projection.rb +10 -10
- data/lib/mailslurp_client/models/inbox_forwarder_event_projection.rb +11 -11
- data/lib/mailslurp_client/models/inbox_replier_event_projection.rb +11 -11
- data/lib/mailslurp_client/models/page_ai_transform_mapping_projection.rb +309 -0
- data/lib/mailslurp_client/models/page_ai_transform_projection.rb +309 -0
- data/lib/mailslurp_client/models/page_ai_transform_result_projection.rb +309 -0
- data/lib/mailslurp_client/models/page_alias.rb +15 -15
- data/lib/mailslurp_client/models/page_alias_thread_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_attachment_entity.rb +15 -15
- data/lib/mailslurp_client/models/page_bounced_email.rb +15 -15
- data/lib/mailslurp_client/models/page_bounced_recipients.rb +15 -15
- data/lib/mailslurp_client/models/page_complaint.rb +15 -15
- data/lib/mailslurp_client/models/page_connector.rb +15 -15
- data/lib/mailslurp_client/models/page_connector_events.rb +15 -15
- data/lib/mailslurp_client/models/page_contact_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_delivery_status.rb +15 -15
- data/lib/mailslurp_client/models/page_email_preview.rb +15 -15
- data/lib/mailslurp_client/models/page_email_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_email_thread_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_email_validation_request.rb +15 -15
- data/lib/mailslurp_client/models/page_entity_automation_items.rb +15 -15
- data/lib/mailslurp_client/models/page_entity_event_items.rb +15 -15
- data/lib/mailslurp_client/models/page_entity_favourite_items.rb +15 -15
- data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_group_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_guest_portal_users.rb +15 -15
- data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +15 -15
- data/lib/mailslurp_client/models/page_inbox_forwarder_events.rb +15 -15
- data/lib/mailslurp_client/models/page_inbox_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_inbox_replier_dto.rb +15 -15
- data/lib/mailslurp_client/models/page_inbox_replier_events.rb +15 -15
- data/lib/mailslurp_client/models/page_inbox_ruleset_dto.rb +15 -15
- data/lib/mailslurp_client/models/page_inbox_tags.rb +15 -15
- data/lib/mailslurp_client/models/page_list_unsubscribe_recipients.rb +15 -15
- data/lib/mailslurp_client/models/page_missed_email_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_opt_in_identity_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_phone_message_thread_item_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_phone_message_thread_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_phone_number_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_plus_address_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_reputation_items.rb +15 -15
- data/lib/mailslurp_client/models/page_scheduled_jobs.rb +15 -15
- data/lib/mailslurp_client/models/page_sent_email_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_sent_email_with_queue_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_sent_sms_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_sms_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_template_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_webhook_endpoint_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_webhook_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_webhook_result.rb +15 -15
- data/lib/mailslurp_client/models/plus_address_projection.rb +15 -15
- data/lib/mailslurp_client/models/sent_email_projection.rb +15 -15
- data/lib/mailslurp_client/models/sort_object.rb +10 -10
- data/lib/mailslurp_client/models/{structured_content_result.rb → structured_content_result_dto.rb} +3 -3
- data/lib/mailslurp_client/models/tracking_pixel_projection.rb +10 -10
- data/lib/mailslurp_client/models/webhook_dto.rb +12 -1
- data/lib/mailslurp_client/models/webhook_projection.rb +19 -10
- data/lib/mailslurp_client/version.rb +1 -1
- data/lib/mailslurp_client.rb +13 -1
- metadata +15 -3
@@ -17,12 +17,12 @@ module MailSlurpClient
|
|
17
17
|
class GuestPortalUserProjection
|
18
18
|
attr_accessor :username
|
19
19
|
|
20
|
+
attr_accessor :inbox_id
|
21
|
+
|
20
22
|
attr_accessor :user_id
|
21
23
|
|
22
24
|
attr_accessor :email_address
|
23
25
|
|
24
|
-
attr_accessor :inbox_id
|
25
|
-
|
26
26
|
attr_accessor :updated_at
|
27
27
|
|
28
28
|
attr_accessor :created_at
|
@@ -37,9 +37,9 @@ module MailSlurpClient
|
|
37
37
|
def self.attribute_map
|
38
38
|
{
|
39
39
|
:'username' => :'username',
|
40
|
+
:'inbox_id' => :'inboxId',
|
40
41
|
:'user_id' => :'userId',
|
41
42
|
:'email_address' => :'emailAddress',
|
42
|
-
:'inbox_id' => :'inboxId',
|
43
43
|
:'updated_at' => :'updatedAt',
|
44
44
|
:'created_at' => :'createdAt',
|
45
45
|
:'portal_id' => :'portalId',
|
@@ -52,9 +52,9 @@ module MailSlurpClient
|
|
52
52
|
def self.openapi_types
|
53
53
|
{
|
54
54
|
:'username' => :'String',
|
55
|
+
:'inbox_id' => :'String',
|
55
56
|
:'user_id' => :'String',
|
56
57
|
:'email_address' => :'String',
|
57
|
-
:'inbox_id' => :'String',
|
58
58
|
:'updated_at' => :'DateTime',
|
59
59
|
:'created_at' => :'DateTime',
|
60
60
|
:'portal_id' => :'String',
|
@@ -88,6 +88,10 @@ module MailSlurpClient
|
|
88
88
|
self.username = attributes[:'username']
|
89
89
|
end
|
90
90
|
|
91
|
+
if attributes.key?(:'inbox_id')
|
92
|
+
self.inbox_id = attributes[:'inbox_id']
|
93
|
+
end
|
94
|
+
|
91
95
|
if attributes.key?(:'user_id')
|
92
96
|
self.user_id = attributes[:'user_id']
|
93
97
|
end
|
@@ -96,10 +100,6 @@ module MailSlurpClient
|
|
96
100
|
self.email_address = attributes[:'email_address']
|
97
101
|
end
|
98
102
|
|
99
|
-
if attributes.key?(:'inbox_id')
|
100
|
-
self.inbox_id = attributes[:'inbox_id']
|
101
|
-
end
|
102
|
-
|
103
103
|
if attributes.key?(:'updated_at')
|
104
104
|
self.updated_at = attributes[:'updated_at']
|
105
105
|
end
|
@@ -170,9 +170,9 @@ module MailSlurpClient
|
|
170
170
|
return true if self.equal?(o)
|
171
171
|
self.class == o.class &&
|
172
172
|
username == o.username &&
|
173
|
+
inbox_id == o.inbox_id &&
|
173
174
|
user_id == o.user_id &&
|
174
175
|
email_address == o.email_address &&
|
175
|
-
inbox_id == o.inbox_id &&
|
176
176
|
updated_at == o.updated_at &&
|
177
177
|
created_at == o.created_at &&
|
178
178
|
portal_id == o.portal_id &&
|
@@ -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
|
-
[username, user_id, email_address,
|
192
|
+
[username, inbox_id, user_id, email_address, updated_at, created_at, portal_id, name, id].hash
|
193
193
|
end
|
194
194
|
|
195
195
|
# Builds the object from hash
|
@@ -15,12 +15,12 @@ require 'date'
|
|
15
15
|
module MailSlurpClient
|
16
16
|
# Inbox forwarder event
|
17
17
|
class InboxForwarderEventProjection
|
18
|
-
attr_accessor :user_id
|
19
|
-
|
20
18
|
attr_accessor :email_id
|
21
19
|
|
22
20
|
attr_accessor :inbox_id
|
23
21
|
|
22
|
+
attr_accessor :user_id
|
23
|
+
|
24
24
|
attr_accessor :created_at
|
25
25
|
|
26
26
|
attr_accessor :sent_id
|
@@ -58,9 +58,9 @@ module MailSlurpClient
|
|
58
58
|
# Attribute mapping from ruby-style variable name to JSON key.
|
59
59
|
def self.attribute_map
|
60
60
|
{
|
61
|
-
:'user_id' => :'userId',
|
62
61
|
:'email_id' => :'emailId',
|
63
62
|
:'inbox_id' => :'inboxId',
|
63
|
+
:'user_id' => :'userId',
|
64
64
|
:'created_at' => :'createdAt',
|
65
65
|
:'sent_id' => :'sentId',
|
66
66
|
:'forwarder_id' => :'forwarderId',
|
@@ -73,9 +73,9 @@ module MailSlurpClient
|
|
73
73
|
# Attribute type mapping.
|
74
74
|
def self.openapi_types
|
75
75
|
{
|
76
|
-
:'user_id' => :'String',
|
77
76
|
:'email_id' => :'String',
|
78
77
|
:'inbox_id' => :'String',
|
78
|
+
:'user_id' => :'String',
|
79
79
|
:'created_at' => :'DateTime',
|
80
80
|
:'sent_id' => :'String',
|
81
81
|
:'forwarder_id' => :'String',
|
@@ -88,9 +88,9 @@ module MailSlurpClient
|
|
88
88
|
# List of attributes with nullable: true
|
89
89
|
def self.openapi_nullable
|
90
90
|
Set.new([
|
91
|
-
:'user_id',
|
92
91
|
:'email_id',
|
93
92
|
:'inbox_id',
|
93
|
+
:'user_id',
|
94
94
|
:'sent_id',
|
95
95
|
:'forwarder_id',
|
96
96
|
:'message',
|
@@ -114,10 +114,6 @@ module MailSlurpClient
|
|
114
114
|
h[k.to_sym] = v
|
115
115
|
}
|
116
116
|
|
117
|
-
if attributes.key?(:'user_id')
|
118
|
-
self.user_id = attributes[:'user_id']
|
119
|
-
end
|
120
|
-
|
121
117
|
if attributes.key?(:'email_id')
|
122
118
|
self.email_id = attributes[:'email_id']
|
123
119
|
end
|
@@ -126,6 +122,10 @@ module MailSlurpClient
|
|
126
122
|
self.inbox_id = attributes[:'inbox_id']
|
127
123
|
end
|
128
124
|
|
125
|
+
if attributes.key?(:'user_id')
|
126
|
+
self.user_id = attributes[:'user_id']
|
127
|
+
end
|
128
|
+
|
129
129
|
if attributes.key?(:'created_at')
|
130
130
|
self.created_at = attributes[:'created_at']
|
131
131
|
end
|
@@ -186,9 +186,9 @@ module MailSlurpClient
|
|
186
186
|
def ==(o)
|
187
187
|
return true if self.equal?(o)
|
188
188
|
self.class == o.class &&
|
189
|
-
user_id == o.user_id &&
|
190
189
|
email_id == o.email_id &&
|
191
190
|
inbox_id == o.inbox_id &&
|
191
|
+
user_id == o.user_id &&
|
192
192
|
created_at == o.created_at &&
|
193
193
|
sent_id == o.sent_id &&
|
194
194
|
forwarder_id == o.forwarder_id &&
|
@@ -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
|
-
[
|
209
|
+
[email_id, inbox_id, user_id, created_at, sent_id, forwarder_id, message, id, status].hash
|
210
210
|
end
|
211
211
|
|
212
212
|
# Builds the object from hash
|
@@ -17,12 +17,12 @@ module MailSlurpClient
|
|
17
17
|
class InboxReplierEventProjection
|
18
18
|
attr_accessor :recipients
|
19
19
|
|
20
|
-
attr_accessor :user_id
|
21
|
-
|
22
20
|
attr_accessor :email_id
|
23
21
|
|
24
22
|
attr_accessor :inbox_id
|
25
23
|
|
24
|
+
attr_accessor :user_id
|
25
|
+
|
26
26
|
attr_accessor :created_at
|
27
27
|
|
28
28
|
attr_accessor :sent_id
|
@@ -61,9 +61,9 @@ module MailSlurpClient
|
|
61
61
|
def self.attribute_map
|
62
62
|
{
|
63
63
|
:'recipients' => :'recipients',
|
64
|
-
:'user_id' => :'userId',
|
65
64
|
:'email_id' => :'emailId',
|
66
65
|
:'inbox_id' => :'inboxId',
|
66
|
+
:'user_id' => :'userId',
|
67
67
|
:'created_at' => :'createdAt',
|
68
68
|
:'sent_id' => :'sentId',
|
69
69
|
:'replier_id' => :'replierId',
|
@@ -77,9 +77,9 @@ module MailSlurpClient
|
|
77
77
|
def self.openapi_types
|
78
78
|
{
|
79
79
|
:'recipients' => :'Array<String>',
|
80
|
-
:'user_id' => :'String',
|
81
80
|
:'email_id' => :'String',
|
82
81
|
:'inbox_id' => :'String',
|
82
|
+
:'user_id' => :'String',
|
83
83
|
:'created_at' => :'DateTime',
|
84
84
|
:'sent_id' => :'String',
|
85
85
|
:'replier_id' => :'String',
|
@@ -93,9 +93,9 @@ module MailSlurpClient
|
|
93
93
|
def self.openapi_nullable
|
94
94
|
Set.new([
|
95
95
|
:'recipients',
|
96
|
-
:'user_id',
|
97
96
|
:'email_id',
|
98
97
|
:'inbox_id',
|
98
|
+
:'user_id',
|
99
99
|
:'sent_id',
|
100
100
|
:'replier_id',
|
101
101
|
:'message',
|
@@ -125,10 +125,6 @@ module MailSlurpClient
|
|
125
125
|
end
|
126
126
|
end
|
127
127
|
|
128
|
-
if attributes.key?(:'user_id')
|
129
|
-
self.user_id = attributes[:'user_id']
|
130
|
-
end
|
131
|
-
|
132
128
|
if attributes.key?(:'email_id')
|
133
129
|
self.email_id = attributes[:'email_id']
|
134
130
|
end
|
@@ -137,6 +133,10 @@ module MailSlurpClient
|
|
137
133
|
self.inbox_id = attributes[:'inbox_id']
|
138
134
|
end
|
139
135
|
|
136
|
+
if attributes.key?(:'user_id')
|
137
|
+
self.user_id = attributes[:'user_id']
|
138
|
+
end
|
139
|
+
|
140
140
|
if attributes.key?(:'created_at')
|
141
141
|
self.created_at = attributes[:'created_at']
|
142
142
|
end
|
@@ -198,9 +198,9 @@ module MailSlurpClient
|
|
198
198
|
return true if self.equal?(o)
|
199
199
|
self.class == o.class &&
|
200
200
|
recipients == o.recipients &&
|
201
|
-
user_id == o.user_id &&
|
202
201
|
email_id == o.email_id &&
|
203
202
|
inbox_id == o.inbox_id &&
|
203
|
+
user_id == o.user_id &&
|
204
204
|
created_at == o.created_at &&
|
205
205
|
sent_id == o.sent_id &&
|
206
206
|
replier_id == o.replier_id &&
|
@@ -218,7 +218,7 @@ module MailSlurpClient
|
|
218
218
|
# Calculates hash code according to all attributes.
|
219
219
|
# @return [Integer] Hash code
|
220
220
|
def hash
|
221
|
-
[recipients,
|
221
|
+
[recipients, email_id, inbox_id, user_id, created_at, sent_id, replier_id, message, id, status].hash
|
222
222
|
end
|
223
223
|
|
224
224
|
# Builds the object from hash
|
@@ -0,0 +1,309 @@
|
|
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
|
+
# Paginated AI Transform mapping entities. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
|
17
|
+
class PageAITransformMappingProjection
|
18
|
+
attr_accessor :content
|
19
|
+
|
20
|
+
attr_accessor :pageable
|
21
|
+
|
22
|
+
attr_accessor :total_elements
|
23
|
+
|
24
|
+
attr_accessor :total_pages
|
25
|
+
|
26
|
+
attr_accessor :last
|
27
|
+
|
28
|
+
attr_accessor :number_of_elements
|
29
|
+
|
30
|
+
attr_accessor :first
|
31
|
+
|
32
|
+
attr_accessor :size
|
33
|
+
|
34
|
+
attr_accessor :number
|
35
|
+
|
36
|
+
attr_accessor :sort
|
37
|
+
|
38
|
+
attr_accessor :empty
|
39
|
+
|
40
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
41
|
+
def self.attribute_map
|
42
|
+
{
|
43
|
+
:'content' => :'content',
|
44
|
+
:'pageable' => :'pageable',
|
45
|
+
:'total_elements' => :'totalElements',
|
46
|
+
:'total_pages' => :'totalPages',
|
47
|
+
:'last' => :'last',
|
48
|
+
:'number_of_elements' => :'numberOfElements',
|
49
|
+
:'first' => :'first',
|
50
|
+
:'size' => :'size',
|
51
|
+
:'number' => :'number',
|
52
|
+
:'sort' => :'sort',
|
53
|
+
:'empty' => :'empty'
|
54
|
+
}
|
55
|
+
end
|
56
|
+
|
57
|
+
# Attribute type mapping.
|
58
|
+
def self.openapi_types
|
59
|
+
{
|
60
|
+
:'content' => :'Array<AITransformMappingProjection>',
|
61
|
+
:'pageable' => :'PageableObject',
|
62
|
+
:'total_elements' => :'Integer',
|
63
|
+
:'total_pages' => :'Integer',
|
64
|
+
:'last' => :'Boolean',
|
65
|
+
:'number_of_elements' => :'Integer',
|
66
|
+
:'first' => :'Boolean',
|
67
|
+
:'size' => :'Integer',
|
68
|
+
:'number' => :'Integer',
|
69
|
+
:'sort' => :'SortObject',
|
70
|
+
:'empty' => :'Boolean'
|
71
|
+
}
|
72
|
+
end
|
73
|
+
|
74
|
+
# List of attributes with nullable: true
|
75
|
+
def self.openapi_nullable
|
76
|
+
Set.new([
|
77
|
+
])
|
78
|
+
end
|
79
|
+
|
80
|
+
# Initializes the object
|
81
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
82
|
+
def initialize(attributes = {})
|
83
|
+
if (!attributes.is_a?(Hash))
|
84
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::PageAITransformMappingProjection` initialize method"
|
85
|
+
end
|
86
|
+
|
87
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
88
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
89
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
90
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::PageAITransformMappingProjection`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
91
|
+
end
|
92
|
+
h[k.to_sym] = v
|
93
|
+
}
|
94
|
+
|
95
|
+
if attributes.key?(:'content')
|
96
|
+
if (value = attributes[:'content']).is_a?(Array)
|
97
|
+
self.content = value
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
if attributes.key?(:'pageable')
|
102
|
+
self.pageable = attributes[:'pageable']
|
103
|
+
end
|
104
|
+
|
105
|
+
if attributes.key?(:'total_elements')
|
106
|
+
self.total_elements = attributes[:'total_elements']
|
107
|
+
end
|
108
|
+
|
109
|
+
if attributes.key?(:'total_pages')
|
110
|
+
self.total_pages = attributes[:'total_pages']
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.key?(:'last')
|
114
|
+
self.last = attributes[:'last']
|
115
|
+
end
|
116
|
+
|
117
|
+
if attributes.key?(:'number_of_elements')
|
118
|
+
self.number_of_elements = attributes[:'number_of_elements']
|
119
|
+
end
|
120
|
+
|
121
|
+
if attributes.key?(:'first')
|
122
|
+
self.first = attributes[:'first']
|
123
|
+
end
|
124
|
+
|
125
|
+
if attributes.key?(:'size')
|
126
|
+
self.size = attributes[:'size']
|
127
|
+
end
|
128
|
+
|
129
|
+
if attributes.key?(:'number')
|
130
|
+
self.number = attributes[:'number']
|
131
|
+
end
|
132
|
+
|
133
|
+
if attributes.key?(:'sort')
|
134
|
+
self.sort = attributes[:'sort']
|
135
|
+
end
|
136
|
+
|
137
|
+
if attributes.key?(:'empty')
|
138
|
+
self.empty = attributes[:'empty']
|
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
|
+
invalid_properties = Array.new
|
146
|
+
if @total_elements.nil?
|
147
|
+
invalid_properties.push('invalid value for "total_elements", total_elements cannot be nil.')
|
148
|
+
end
|
149
|
+
|
150
|
+
if @total_pages.nil?
|
151
|
+
invalid_properties.push('invalid value for "total_pages", total_pages cannot be nil.')
|
152
|
+
end
|
153
|
+
|
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
|
+
return false if @total_elements.nil?
|
161
|
+
return false if @total_pages.nil?
|
162
|
+
true
|
163
|
+
end
|
164
|
+
|
165
|
+
# Checks equality by comparing each attribute.
|
166
|
+
# @param [Object] Object to be compared
|
167
|
+
def ==(o)
|
168
|
+
return true if self.equal?(o)
|
169
|
+
self.class == o.class &&
|
170
|
+
content == o.content &&
|
171
|
+
pageable == o.pageable &&
|
172
|
+
total_elements == o.total_elements &&
|
173
|
+
total_pages == o.total_pages &&
|
174
|
+
last == o.last &&
|
175
|
+
number_of_elements == o.number_of_elements &&
|
176
|
+
first == o.first &&
|
177
|
+
size == o.size &&
|
178
|
+
number == o.number &&
|
179
|
+
sort == o.sort &&
|
180
|
+
empty == o.empty
|
181
|
+
end
|
182
|
+
|
183
|
+
# @see the `==` method
|
184
|
+
# @param [Object] Object to be compared
|
185
|
+
def eql?(o)
|
186
|
+
self == o
|
187
|
+
end
|
188
|
+
|
189
|
+
# Calculates hash code according to all attributes.
|
190
|
+
# @return [Integer] Hash code
|
191
|
+
def hash
|
192
|
+
[content, pageable, total_elements, total_pages, last, number_of_elements, first, size, number, sort, empty].hash
|
193
|
+
end
|
194
|
+
|
195
|
+
# Builds the object from hash
|
196
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
197
|
+
# @return [Object] Returns the model itself
|
198
|
+
def self.build_from_hash(attributes)
|
199
|
+
new.build_from_hash(attributes)
|
200
|
+
end
|
201
|
+
|
202
|
+
# Builds the object from hash
|
203
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
204
|
+
# @return [Object] Returns the model itself
|
205
|
+
def build_from_hash(attributes)
|
206
|
+
return nil unless attributes.is_a?(Hash)
|
207
|
+
self.class.openapi_types.each_pair do |key, type|
|
208
|
+
if type =~ /\AArray<(.*)>/i
|
209
|
+
# check to ensure the input is an array given that the attribute
|
210
|
+
# is documented as an array but the input is not
|
211
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
212
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
213
|
+
end
|
214
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
215
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
216
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
217
|
+
end
|
218
|
+
|
219
|
+
self
|
220
|
+
end
|
221
|
+
|
222
|
+
# Deserializes the data based on type
|
223
|
+
# @param string type Data type
|
224
|
+
# @param string value Value to be deserialized
|
225
|
+
# @return [Object] Deserialized data
|
226
|
+
def _deserialize(type, value)
|
227
|
+
case type.to_sym
|
228
|
+
when :DateTime
|
229
|
+
DateTime.parse(value)
|
230
|
+
when :Date
|
231
|
+
Date.parse(value)
|
232
|
+
when :String
|
233
|
+
value.to_s
|
234
|
+
when :Integer
|
235
|
+
value.to_i
|
236
|
+
when :Float
|
237
|
+
value.to_f
|
238
|
+
when :Boolean
|
239
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
240
|
+
true
|
241
|
+
else
|
242
|
+
false
|
243
|
+
end
|
244
|
+
when :Object
|
245
|
+
# generic object (usually a Hash), return directly
|
246
|
+
value
|
247
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
248
|
+
inner_type = Regexp.last_match[:inner_type]
|
249
|
+
value.map { |v| _deserialize(inner_type, v) }
|
250
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
251
|
+
k_type = Regexp.last_match[:k_type]
|
252
|
+
v_type = Regexp.last_match[:v_type]
|
253
|
+
{}.tap do |hash|
|
254
|
+
value.each do |k, v|
|
255
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
256
|
+
end
|
257
|
+
end
|
258
|
+
else # model
|
259
|
+
MailSlurpClient.const_get(type).build_from_hash(value)
|
260
|
+
end
|
261
|
+
end
|
262
|
+
|
263
|
+
# Returns the string representation of the object
|
264
|
+
# @return [String] String presentation of the object
|
265
|
+
def to_s
|
266
|
+
to_hash.to_s
|
267
|
+
end
|
268
|
+
|
269
|
+
# to_body is an alias to to_hash (backward compatibility)
|
270
|
+
# @return [Hash] Returns the object in the form of hash
|
271
|
+
def to_body
|
272
|
+
to_hash
|
273
|
+
end
|
274
|
+
|
275
|
+
# Returns the object in the form of hash
|
276
|
+
# @return [Hash] Returns the object in the form of hash
|
277
|
+
def to_hash
|
278
|
+
hash = {}
|
279
|
+
self.class.attribute_map.each_pair do |attr, param|
|
280
|
+
value = self.send(attr)
|
281
|
+
if value.nil?
|
282
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
283
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
284
|
+
end
|
285
|
+
|
286
|
+
hash[param] = _to_hash(value)
|
287
|
+
end
|
288
|
+
hash
|
289
|
+
end
|
290
|
+
|
291
|
+
# Outputs non-array value in the form of hash
|
292
|
+
# For object, use to_hash. Otherwise, just return the value
|
293
|
+
# @param [Object] value Any valid value
|
294
|
+
# @return [Hash] Returns the value in the form of hash
|
295
|
+
def _to_hash(value)
|
296
|
+
if value.is_a?(Array)
|
297
|
+
value.compact.map { |v| _to_hash(v) }
|
298
|
+
elsif value.is_a?(Hash)
|
299
|
+
{}.tap do |hash|
|
300
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
301
|
+
end
|
302
|
+
elsif value.respond_to? :to_hash
|
303
|
+
value.to_hash
|
304
|
+
else
|
305
|
+
value
|
306
|
+
end
|
307
|
+
end
|
308
|
+
end
|
309
|
+
end
|