qubrics-mailbox 3.0.0
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 +7 -0
- data/CHANGELOG.md +108 -0
- data/LICENSE +21 -0
- data/README.md +183 -0
- data/lib/qubrics/mailbox/client.rb +63 -0
- data/lib/qubrics/mailbox/version.rb +7 -0
- data/lib/qubrics/mailbox.rb +12 -0
- data/lib/qubrics_mailbox_generated/api/mailbox_api_api.rb +4371 -0
- data/lib/qubrics_mailbox_generated/api_client.rb +447 -0
- data/lib/qubrics_mailbox_generated/api_error.rb +58 -0
- data/lib/qubrics_mailbox_generated/api_model_base.rb +95 -0
- data/lib/qubrics_mailbox_generated/configuration.rb +400 -0
- data/lib/qubrics_mailbox_generated/models/api_error_detail.rb +219 -0
- data/lib/qubrics_mailbox_generated/models/api_error_error.rb +275 -0
- data/lib/qubrics_mailbox_generated/models/api_error_meta.rb +164 -0
- data/lib/qubrics_mailbox_generated/models/api_error_response.rb +216 -0
- data/lib/qubrics_mailbox_generated/models/batch_delete_mailbox_messages_body.rb +205 -0
- data/lib/qubrics_mailbox_generated/models/batch_update_mailbox_messages_body.rb +227 -0
- data/lib/qubrics_mailbox_generated/models/connection.rb +273 -0
- data/lib/qubrics_mailbox_generated/models/connection_credential.rb +226 -0
- data/lib/qubrics_mailbox_generated/models/connection_mailboxes_inner.rb +190 -0
- data/lib/qubrics_mailbox_generated/models/connection_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/connection_team.rb +190 -0
- data/lib/qubrics_mailbox_generated/models/control_mailbox_draft_schedule.rb +232 -0
- data/lib/qubrics_mailbox_generated/models/create_mailbox_draft.rb +448 -0
- data/lib/qubrics_mailbox_generated/models/create_mailbox_draft_attachments_inner.rb +400 -0
- data/lib/qubrics_mailbox_generated/models/create_mailbox_draft_bcc_inner.rb +200 -0
- data/lib/qubrics_mailbox_generated/models/create_mailbox_draft_from.rb +201 -0
- data/lib/qubrics_mailbox_generated/models/create_mailbox_draft_source.rb +235 -0
- data/lib/qubrics_mailbox_generated/models/create_mailbox_folder_body.rb +183 -0
- data/lib/qubrics_mailbox_generated/models/cursor_pagination.rb +173 -0
- data/lib/qubrics_mailbox_generated/models/granted_mailbox.rb +192 -0
- data/lib/qubrics_mailbox_generated/models/granted_mailbox_list_response.rb +251 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_address.rb +176 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_attachment.rb +250 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_attachment_text.rb +337 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_attachment_text_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_attachment_upload_intent_body.rb +228 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_attachment_upload_intent_result.rb +323 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_attachment_upload_intent_result_headers.rb +191 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_attachment_upload_intent_result_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_attachment_upload_result.rb +243 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_attachment_upload_result_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_batch_delete_messages_result.rb +248 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_batch_delete_messages_result_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_batch_get_body.rb +373 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_batch_get_item.rb +188 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_batch_get_result.rb +220 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_batch_get_result_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_batch_get_result_states.rb +150 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_batch_message_failure.rb +216 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_batch_message_states.rb +162 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_batch_update_messages_result.rb +248 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_batch_update_messages_result_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_changes.rb +307 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_changes_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_content_headers.rb +214 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_content_headers_full_inner.rb +190 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_content_headers_selected.rb +234 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_draft.rb +670 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_draft_delete_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_draft_delete_response_all_of_data.rb +190 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_draft_list_response.rb +251 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_draft_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_folder.rb +307 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_folder_cursor_list_response.rb +251 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_folder_deleted_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_folder_query_changes.rb +270 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_folder_query_changes_added_inner.rb +190 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_folder_query_changes_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_folder_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_get_changes200_response.rb +103 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_identity.rb +352 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_identity_cursor_list_response.rb +251 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_identity_list_meta.rb +173 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_identity_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_me.rb +294 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_me_item_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_message.rb +594 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_message_content.rb +348 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_message_content_body.rb +352 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_message_content_body_html_cleaning.rb +241 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_message_content_dates.rb +162 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_message_content_participants.rb +262 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_message_content_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_message_content_states.rb +176 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_message_count.rb +176 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_message_count_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_message_deleted_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_message_detail_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_message_flags.rb +242 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_message_query_changes.rb +270 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_message_query_changes_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_message_summary.rb +454 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_message_summary_cursor_list_response.rb +251 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_query_meta.rb +173 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_quota.rb +359 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_quota_cursor_list_response.rb +251 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_raw_body.rb +279 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_raw_body_body.rb +200 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_raw_body_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_realtime_event.rb +366 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_realtime_message.rb +492 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_realtime_message_body.rb +214 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_search_snippet.rb +190 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_search_snippets_result.rb +206 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_search_snippets_result_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_send_result_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_send_scope.rb +213 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_sender_choices.rb +217 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_sender_choices_from.rb +213 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_sender_choices_reply_to.rb +213 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_sender_choices_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_session.rb +294 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_session_capabilities.rb +346 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_session_capabilities_attachments.rb +294 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_session_capabilities_folders.rb +320 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_session_capabilities_identities.rb +268 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_session_capabilities_messages.rb +516 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_session_capabilities_quotas.rb +242 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_session_capabilities_submissions.rb +242 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_session_capabilities_sync.rb +222 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_session_capabilities_threads.rb +268 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_session_endpoints.rb +334 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_session_gated.rb +451 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_session_limits.rb +448 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_session_mailbox.rb +203 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_session_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_session_states.rb +294 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_submission.rb +321 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_submission_cursor_list_response.rb +251 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_submission_delivery_status.rb +200 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_submission_envelope.rb +178 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_submission_envelope_address.rb +178 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_submission_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_sync_meta.rb +173 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_thread.rb +377 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_thread_content_meta.rb +244 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_thread_content_meta_states.rb +188 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_thread_content_response.rb +251 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_thread_detail_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_thread_message_summary_cursor_list_response.rb +251 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_thread_messages_meta.rb +199 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_thread_summary.rb +349 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_thread_summary_cursor_list_response.rb +251 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_thread_summary_states.rb +162 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_typed_changes.rb +164 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_typed_changes_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_typed_changes_types.rb +192 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_usage.rb +192 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_usage_resource.rb +408 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_usage_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_usage_states.rb +150 -0
- data/lib/qubrics_mailbox_generated/models/patch_mailbox_folder_body.rb +166 -0
- data/lib/qubrics_mailbox_generated/models/patch_mailbox_message_body.rb +168 -0
- data/lib/qubrics_mailbox_generated/models/response_meta.rb +164 -0
- data/lib/qubrics_mailbox_generated/models/send_mailbox_draft.rb +222 -0
- data/lib/qubrics_mailbox_generated/models/send_mailbox_message_body.rb +326 -0
- data/lib/qubrics_mailbox_generated/models/send_mailbox_message_body_attachments_inner.rb +103 -0
- data/lib/qubrics_mailbox_generated/models/send_mailbox_message_body_attachments_inner_any_of.rb +217 -0
- data/lib/qubrics_mailbox_generated/models/send_mailbox_message_body_attachments_inner_any_of1.rb +217 -0
- data/lib/qubrics_mailbox_generated/models/send_mailbox_message_result.rb +214 -0
- data/lib/qubrics_mailbox_generated/models/success_envelope.rb +192 -0
- data/lib/qubrics_mailbox_generated/models/update_mailbox_draft.rb +437 -0
- data/lib/qubrics_mailbox_generated/models/update_mailbox_identity_body.rb +216 -0
- data/lib/qubrics_mailbox_generated/version.rb +15 -0
- data/lib/qubrics_mailbox_generated.rb +210 -0
- metadata +290 -0
|
@@ -0,0 +1,670 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Qubrics API
|
|
3
|
+
|
|
4
|
+
#Programmatic access to your Qubrics email infrastructure.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Qubrics::Mailbox::Generated
|
|
17
|
+
class MailboxDraft < ApiModelBase
|
|
18
|
+
# Attachments and inline images.
|
|
19
|
+
attr_accessor :attachments
|
|
20
|
+
|
|
21
|
+
# Hidden copied recipients.
|
|
22
|
+
attr_accessor :bcc
|
|
23
|
+
|
|
24
|
+
# Visible copied recipients.
|
|
25
|
+
attr_accessor :cc
|
|
26
|
+
|
|
27
|
+
# Custom X-* headers preserved with this revision. Older drafts containing reserved headers remain readable.
|
|
28
|
+
attr_accessor :custom_headers
|
|
29
|
+
|
|
30
|
+
# Safe failure reason. Correct failed draft content or current permissions before retrying. Never retry an uncertain send as a new message.
|
|
31
|
+
attr_accessor :failure_code
|
|
32
|
+
|
|
33
|
+
attr_accessor :from
|
|
34
|
+
|
|
35
|
+
# HTML body, preserved when saved.
|
|
36
|
+
attr_accessor :html_body
|
|
37
|
+
|
|
38
|
+
# Stable draft ID.
|
|
39
|
+
attr_accessor :id
|
|
40
|
+
|
|
41
|
+
# Snapshotted parent message identifiers.
|
|
42
|
+
attr_accessor :in_reply_to
|
|
43
|
+
|
|
44
|
+
# Saved message ID; absent until saving finishes.
|
|
45
|
+
attr_accessor :message_id
|
|
46
|
+
|
|
47
|
+
# Snapshotted conversation identifiers.
|
|
48
|
+
attr_accessor :references
|
|
49
|
+
|
|
50
|
+
# Authorised reply addresses; defaults to this inbox.
|
|
51
|
+
attr_accessor :reply_to
|
|
52
|
+
|
|
53
|
+
# Original message this draft replies to.
|
|
54
|
+
attr_accessor :reply_to_message_id
|
|
55
|
+
|
|
56
|
+
# Current draft revision.
|
|
57
|
+
attr_accessor :revision
|
|
58
|
+
|
|
59
|
+
# Schedule control version. Changes whenever a schedule is created, moved or cancelled.
|
|
60
|
+
attr_accessor :schedule_version
|
|
61
|
+
|
|
62
|
+
# Requested earliest send time, retained after sending. Null when no schedule is set.
|
|
63
|
+
attr_accessor :scheduled_for
|
|
64
|
+
|
|
65
|
+
# Saving or sending state.
|
|
66
|
+
attr_accessor :status
|
|
67
|
+
|
|
68
|
+
# Subject; may be empty.
|
|
69
|
+
attr_accessor :subject
|
|
70
|
+
|
|
71
|
+
# Plain-text body.
|
|
72
|
+
attr_accessor :text_body
|
|
73
|
+
|
|
74
|
+
# Primary recipients; at most 50 total across To, Cc and Bcc.
|
|
75
|
+
attr_accessor :to
|
|
76
|
+
|
|
77
|
+
class EnumAttributeValidator
|
|
78
|
+
attr_reader :datatype
|
|
79
|
+
attr_reader :allowable_values
|
|
80
|
+
|
|
81
|
+
def initialize(datatype, allowable_values)
|
|
82
|
+
@allowable_values = allowable_values.map do |value|
|
|
83
|
+
case datatype.to_s
|
|
84
|
+
when /Integer/i
|
|
85
|
+
value.to_i
|
|
86
|
+
when /Float/i
|
|
87
|
+
value.to_f
|
|
88
|
+
else
|
|
89
|
+
value
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
def valid?(value)
|
|
95
|
+
!value || allowable_values.include?(value)
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
100
|
+
def self.attribute_map
|
|
101
|
+
{
|
|
102
|
+
:'attachments' => :'attachments',
|
|
103
|
+
:'bcc' => :'bcc',
|
|
104
|
+
:'cc' => :'cc',
|
|
105
|
+
:'custom_headers' => :'custom_headers',
|
|
106
|
+
:'failure_code' => :'failure_code',
|
|
107
|
+
:'from' => :'from',
|
|
108
|
+
:'html_body' => :'html_body',
|
|
109
|
+
:'id' => :'id',
|
|
110
|
+
:'in_reply_to' => :'in_reply_to',
|
|
111
|
+
:'message_id' => :'message_id',
|
|
112
|
+
:'references' => :'references',
|
|
113
|
+
:'reply_to' => :'reply_to',
|
|
114
|
+
:'reply_to_message_id' => :'reply_to_message_id',
|
|
115
|
+
:'revision' => :'revision',
|
|
116
|
+
:'schedule_version' => :'schedule_version',
|
|
117
|
+
:'scheduled_for' => :'scheduled_for',
|
|
118
|
+
:'status' => :'status',
|
|
119
|
+
:'subject' => :'subject',
|
|
120
|
+
:'text_body' => :'text_body',
|
|
121
|
+
:'to' => :'to'
|
|
122
|
+
}
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Returns attribute mapping this model knows about
|
|
126
|
+
def self.acceptable_attribute_map
|
|
127
|
+
attribute_map
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Returns all the JSON keys this model knows about
|
|
131
|
+
def self.acceptable_attributes
|
|
132
|
+
acceptable_attribute_map.values
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Attribute type mapping.
|
|
136
|
+
def self.openapi_types
|
|
137
|
+
{
|
|
138
|
+
:'attachments' => :'Array<CreateMailboxDraftAttachmentsInner>',
|
|
139
|
+
:'bcc' => :'Array<CreateMailboxDraftBccInner>',
|
|
140
|
+
:'cc' => :'Array<CreateMailboxDraftBccInner>',
|
|
141
|
+
:'custom_headers' => :'Hash<String, String>',
|
|
142
|
+
:'failure_code' => :'String',
|
|
143
|
+
:'from' => :'CreateMailboxDraftFrom',
|
|
144
|
+
:'html_body' => :'String',
|
|
145
|
+
:'id' => :'String',
|
|
146
|
+
:'in_reply_to' => :'Array<String>',
|
|
147
|
+
:'message_id' => :'String',
|
|
148
|
+
:'references' => :'Array<String>',
|
|
149
|
+
:'reply_to' => :'Array<CreateMailboxDraftBccInner>',
|
|
150
|
+
:'reply_to_message_id' => :'String',
|
|
151
|
+
:'revision' => :'Integer',
|
|
152
|
+
:'schedule_version' => :'Integer',
|
|
153
|
+
:'scheduled_for' => :'Time',
|
|
154
|
+
:'status' => :'String',
|
|
155
|
+
:'subject' => :'String',
|
|
156
|
+
:'text_body' => :'String',
|
|
157
|
+
:'to' => :'Array<CreateMailboxDraftBccInner>'
|
|
158
|
+
}
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# List of attributes with nullable: true
|
|
162
|
+
def self.openapi_nullable
|
|
163
|
+
Set.new([
|
|
164
|
+
:'failure_code',
|
|
165
|
+
:'message_id',
|
|
166
|
+
:'scheduled_for',
|
|
167
|
+
])
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Initializes the object
|
|
171
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
172
|
+
def initialize(attributes = {})
|
|
173
|
+
if (!attributes.is_a?(Hash))
|
|
174
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Qubrics::Mailbox::Generated::MailboxDraft` initialize method"
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
178
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
179
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
180
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
181
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Qubrics::Mailbox::Generated::MailboxDraft`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
182
|
+
end
|
|
183
|
+
h[k.to_sym] = v
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
if attributes.key?(:'attachments')
|
|
187
|
+
if (value = attributes[:'attachments']).is_a?(Array)
|
|
188
|
+
self.attachments = value
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
if attributes.key?(:'bcc')
|
|
193
|
+
if (value = attributes[:'bcc']).is_a?(Array)
|
|
194
|
+
self.bcc = value
|
|
195
|
+
end
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
if attributes.key?(:'cc')
|
|
199
|
+
if (value = attributes[:'cc']).is_a?(Array)
|
|
200
|
+
self.cc = value
|
|
201
|
+
end
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
if attributes.key?(:'custom_headers')
|
|
205
|
+
if (value = attributes[:'custom_headers']).is_a?(Hash)
|
|
206
|
+
self.custom_headers = value
|
|
207
|
+
end
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
if attributes.key?(:'failure_code')
|
|
211
|
+
self.failure_code = attributes[:'failure_code']
|
|
212
|
+
else
|
|
213
|
+
self.failure_code = nil
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
if attributes.key?(:'from')
|
|
217
|
+
self.from = attributes[:'from']
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
if attributes.key?(:'html_body')
|
|
221
|
+
self.html_body = attributes[:'html_body']
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
if attributes.key?(:'id')
|
|
225
|
+
self.id = attributes[:'id']
|
|
226
|
+
else
|
|
227
|
+
self.id = nil
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
if attributes.key?(:'in_reply_to')
|
|
231
|
+
if (value = attributes[:'in_reply_to']).is_a?(Array)
|
|
232
|
+
self.in_reply_to = value
|
|
233
|
+
end
|
|
234
|
+
else
|
|
235
|
+
self.in_reply_to = nil
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
if attributes.key?(:'message_id')
|
|
239
|
+
self.message_id = attributes[:'message_id']
|
|
240
|
+
else
|
|
241
|
+
self.message_id = nil
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
if attributes.key?(:'references')
|
|
245
|
+
if (value = attributes[:'references']).is_a?(Array)
|
|
246
|
+
self.references = value
|
|
247
|
+
end
|
|
248
|
+
else
|
|
249
|
+
self.references = nil
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
if attributes.key?(:'reply_to')
|
|
253
|
+
if (value = attributes[:'reply_to']).is_a?(Array)
|
|
254
|
+
self.reply_to = value
|
|
255
|
+
end
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
if attributes.key?(:'reply_to_message_id')
|
|
259
|
+
self.reply_to_message_id = attributes[:'reply_to_message_id']
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
if attributes.key?(:'revision')
|
|
263
|
+
self.revision = attributes[:'revision']
|
|
264
|
+
else
|
|
265
|
+
self.revision = nil
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
if attributes.key?(:'schedule_version')
|
|
269
|
+
self.schedule_version = attributes[:'schedule_version']
|
|
270
|
+
else
|
|
271
|
+
self.schedule_version = nil
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
if attributes.key?(:'scheduled_for')
|
|
275
|
+
self.scheduled_for = attributes[:'scheduled_for']
|
|
276
|
+
else
|
|
277
|
+
self.scheduled_for = nil
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
if attributes.key?(:'status')
|
|
281
|
+
self.status = attributes[:'status']
|
|
282
|
+
else
|
|
283
|
+
self.status = nil
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
if attributes.key?(:'subject')
|
|
287
|
+
self.subject = attributes[:'subject']
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
if attributes.key?(:'text_body')
|
|
291
|
+
self.text_body = attributes[:'text_body']
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
if attributes.key?(:'to')
|
|
295
|
+
if (value = attributes[:'to']).is_a?(Array)
|
|
296
|
+
self.to = value
|
|
297
|
+
end
|
|
298
|
+
end
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
302
|
+
# @return Array for valid properties with the reasons
|
|
303
|
+
def list_invalid_properties
|
|
304
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
305
|
+
invalid_properties = Array.new
|
|
306
|
+
if !@attachments.nil? && @attachments.length > 10
|
|
307
|
+
invalid_properties.push('invalid value for "attachments", number of items must be less than or equal to 10.')
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
if !@bcc.nil? && @bcc.length > 50
|
|
311
|
+
invalid_properties.push('invalid value for "bcc", number of items must be less than or equal to 50.')
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
if !@cc.nil? && @cc.length > 50
|
|
315
|
+
invalid_properties.push('invalid value for "cc", number of items must be less than or equal to 50.')
|
|
316
|
+
end
|
|
317
|
+
|
|
318
|
+
if !@html_body.nil? && @html_body.to_s.length > 1000000
|
|
319
|
+
invalid_properties.push('invalid value for "html_body", the character length must be smaller than or equal to 1000000.')
|
|
320
|
+
end
|
|
321
|
+
|
|
322
|
+
if @id.nil?
|
|
323
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
if @in_reply_to.nil?
|
|
327
|
+
invalid_properties.push('invalid value for "in_reply_to", in_reply_to cannot be nil.')
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
if @references.nil?
|
|
331
|
+
invalid_properties.push('invalid value for "references", references cannot be nil.')
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
if !@reply_to.nil? && @reply_to.length > 20
|
|
335
|
+
invalid_properties.push('invalid value for "reply_to", number of items must be less than or equal to 20.')
|
|
336
|
+
end
|
|
337
|
+
|
|
338
|
+
if @revision.nil?
|
|
339
|
+
invalid_properties.push('invalid value for "revision", revision cannot be nil.')
|
|
340
|
+
end
|
|
341
|
+
|
|
342
|
+
if @revision <= 0
|
|
343
|
+
invalid_properties.push('invalid value for "revision", must be greater than 0.')
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
if @schedule_version.nil?
|
|
347
|
+
invalid_properties.push('invalid value for "schedule_version", schedule_version cannot be nil.')
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
if @schedule_version < 0
|
|
351
|
+
invalid_properties.push('invalid value for "schedule_version", must be greater than or equal to 0.')
|
|
352
|
+
end
|
|
353
|
+
|
|
354
|
+
if @status.nil?
|
|
355
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
356
|
+
end
|
|
357
|
+
|
|
358
|
+
if !@subject.nil? && @subject.to_s.length > 998
|
|
359
|
+
invalid_properties.push('invalid value for "subject", the character length must be smaller than or equal to 998.')
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
if !@text_body.nil? && @text_body.to_s.length > 1000000
|
|
363
|
+
invalid_properties.push('invalid value for "text_body", the character length must be smaller than or equal to 1000000.')
|
|
364
|
+
end
|
|
365
|
+
|
|
366
|
+
if !@to.nil? && @to.length > 50
|
|
367
|
+
invalid_properties.push('invalid value for "to", number of items must be less than or equal to 50.')
|
|
368
|
+
end
|
|
369
|
+
|
|
370
|
+
invalid_properties
|
|
371
|
+
end
|
|
372
|
+
|
|
373
|
+
# Check to see if the all the properties in the model are valid
|
|
374
|
+
# @return true if the model is valid
|
|
375
|
+
def valid?
|
|
376
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
377
|
+
return false if !@attachments.nil? && @attachments.length > 10
|
|
378
|
+
return false if !@bcc.nil? && @bcc.length > 50
|
|
379
|
+
return false if !@cc.nil? && @cc.length > 50
|
|
380
|
+
failure_code_validator = EnumAttributeValidator.new('String', ["preparation_failed", "authorisation_revoked", "send_rejected", "unknown_default_open_api"])
|
|
381
|
+
return false unless failure_code_validator.valid?(@failure_code)
|
|
382
|
+
return false if !@html_body.nil? && @html_body.to_s.length > 1000000
|
|
383
|
+
return false if @id.nil?
|
|
384
|
+
return false if @in_reply_to.nil?
|
|
385
|
+
return false if @references.nil?
|
|
386
|
+
return false if !@reply_to.nil? && @reply_to.length > 20
|
|
387
|
+
return false if @revision.nil?
|
|
388
|
+
return false if @revision <= 0
|
|
389
|
+
return false if @schedule_version.nil?
|
|
390
|
+
return false if @schedule_version < 0
|
|
391
|
+
return false if @status.nil?
|
|
392
|
+
status_validator = EnumAttributeValidator.new('String', ["preparing", "ready", "scheduled", "sending", "queued", "uncertain", "failed", "deleted", "unknown_default_open_api"])
|
|
393
|
+
return false unless status_validator.valid?(@status)
|
|
394
|
+
return false if !@subject.nil? && @subject.to_s.length > 998
|
|
395
|
+
return false if !@text_body.nil? && @text_body.to_s.length > 1000000
|
|
396
|
+
return false if !@to.nil? && @to.length > 50
|
|
397
|
+
true
|
|
398
|
+
end
|
|
399
|
+
|
|
400
|
+
# Custom attribute writer method with validation
|
|
401
|
+
# @param [Object] attachments Value to be assigned
|
|
402
|
+
def attachments=(attachments)
|
|
403
|
+
if attachments.nil?
|
|
404
|
+
fail ArgumentError, 'attachments cannot be nil'
|
|
405
|
+
end
|
|
406
|
+
|
|
407
|
+
if attachments.length > 10
|
|
408
|
+
fail ArgumentError, 'invalid value for "attachments", number of items must be less than or equal to 10.'
|
|
409
|
+
end
|
|
410
|
+
|
|
411
|
+
@attachments = attachments
|
|
412
|
+
end
|
|
413
|
+
|
|
414
|
+
# Custom attribute writer method with validation
|
|
415
|
+
# @param [Object] bcc Value to be assigned
|
|
416
|
+
def bcc=(bcc)
|
|
417
|
+
if bcc.nil?
|
|
418
|
+
fail ArgumentError, 'bcc cannot be nil'
|
|
419
|
+
end
|
|
420
|
+
|
|
421
|
+
if bcc.length > 50
|
|
422
|
+
fail ArgumentError, 'invalid value for "bcc", number of items must be less than or equal to 50.'
|
|
423
|
+
end
|
|
424
|
+
|
|
425
|
+
@bcc = bcc
|
|
426
|
+
end
|
|
427
|
+
|
|
428
|
+
# Custom attribute writer method with validation
|
|
429
|
+
# @param [Object] cc Value to be assigned
|
|
430
|
+
def cc=(cc)
|
|
431
|
+
if cc.nil?
|
|
432
|
+
fail ArgumentError, 'cc cannot be nil'
|
|
433
|
+
end
|
|
434
|
+
|
|
435
|
+
if cc.length > 50
|
|
436
|
+
fail ArgumentError, 'invalid value for "cc", number of items must be less than or equal to 50.'
|
|
437
|
+
end
|
|
438
|
+
|
|
439
|
+
@cc = cc
|
|
440
|
+
end
|
|
441
|
+
|
|
442
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
443
|
+
# @param [Object] failure_code Object to be assigned
|
|
444
|
+
def failure_code=(failure_code)
|
|
445
|
+
validator = EnumAttributeValidator.new('String', ["preparation_failed", "authorisation_revoked", "send_rejected", "unknown_default_open_api"])
|
|
446
|
+
unless validator.valid?(failure_code)
|
|
447
|
+
fail ArgumentError, "invalid value for \"failure_code\", must be one of #{validator.allowable_values}."
|
|
448
|
+
end
|
|
449
|
+
@failure_code = failure_code
|
|
450
|
+
end
|
|
451
|
+
|
|
452
|
+
# Custom attribute writer method with validation
|
|
453
|
+
# @param [Object] html_body Value to be assigned
|
|
454
|
+
def html_body=(html_body)
|
|
455
|
+
if html_body.nil?
|
|
456
|
+
fail ArgumentError, 'html_body cannot be nil'
|
|
457
|
+
end
|
|
458
|
+
|
|
459
|
+
if html_body.to_s.length > 1000000
|
|
460
|
+
fail ArgumentError, 'invalid value for "html_body", the character length must be smaller than or equal to 1000000.'
|
|
461
|
+
end
|
|
462
|
+
|
|
463
|
+
@html_body = html_body
|
|
464
|
+
end
|
|
465
|
+
|
|
466
|
+
# Custom attribute writer method with validation
|
|
467
|
+
# @param [Object] id Value to be assigned
|
|
468
|
+
def id=(id)
|
|
469
|
+
if id.nil?
|
|
470
|
+
fail ArgumentError, 'id cannot be nil'
|
|
471
|
+
end
|
|
472
|
+
|
|
473
|
+
@id = id
|
|
474
|
+
end
|
|
475
|
+
|
|
476
|
+
# Custom attribute writer method with validation
|
|
477
|
+
# @param [Object] in_reply_to Value to be assigned
|
|
478
|
+
def in_reply_to=(in_reply_to)
|
|
479
|
+
if in_reply_to.nil?
|
|
480
|
+
fail ArgumentError, 'in_reply_to cannot be nil'
|
|
481
|
+
end
|
|
482
|
+
|
|
483
|
+
@in_reply_to = in_reply_to
|
|
484
|
+
end
|
|
485
|
+
|
|
486
|
+
# Custom attribute writer method with validation
|
|
487
|
+
# @param [Object] references Value to be assigned
|
|
488
|
+
def references=(references)
|
|
489
|
+
if references.nil?
|
|
490
|
+
fail ArgumentError, 'references cannot be nil'
|
|
491
|
+
end
|
|
492
|
+
|
|
493
|
+
@references = references
|
|
494
|
+
end
|
|
495
|
+
|
|
496
|
+
# Custom attribute writer method with validation
|
|
497
|
+
# @param [Object] reply_to Value to be assigned
|
|
498
|
+
def reply_to=(reply_to)
|
|
499
|
+
if reply_to.nil?
|
|
500
|
+
fail ArgumentError, 'reply_to cannot be nil'
|
|
501
|
+
end
|
|
502
|
+
|
|
503
|
+
if reply_to.length > 20
|
|
504
|
+
fail ArgumentError, 'invalid value for "reply_to", number of items must be less than or equal to 20.'
|
|
505
|
+
end
|
|
506
|
+
|
|
507
|
+
@reply_to = reply_to
|
|
508
|
+
end
|
|
509
|
+
|
|
510
|
+
# Custom attribute writer method with validation
|
|
511
|
+
# @param [Object] revision Value to be assigned
|
|
512
|
+
def revision=(revision)
|
|
513
|
+
if revision.nil?
|
|
514
|
+
fail ArgumentError, 'revision cannot be nil'
|
|
515
|
+
end
|
|
516
|
+
|
|
517
|
+
if revision <= 0
|
|
518
|
+
fail ArgumentError, 'invalid value for "revision", must be greater than 0.'
|
|
519
|
+
end
|
|
520
|
+
|
|
521
|
+
@revision = revision
|
|
522
|
+
end
|
|
523
|
+
|
|
524
|
+
# Custom attribute writer method with validation
|
|
525
|
+
# @param [Object] schedule_version Value to be assigned
|
|
526
|
+
def schedule_version=(schedule_version)
|
|
527
|
+
if schedule_version.nil?
|
|
528
|
+
fail ArgumentError, 'schedule_version cannot be nil'
|
|
529
|
+
end
|
|
530
|
+
|
|
531
|
+
if schedule_version < 0
|
|
532
|
+
fail ArgumentError, 'invalid value for "schedule_version", must be greater than or equal to 0.'
|
|
533
|
+
end
|
|
534
|
+
|
|
535
|
+
@schedule_version = schedule_version
|
|
536
|
+
end
|
|
537
|
+
|
|
538
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
539
|
+
# @param [Object] status Object to be assigned
|
|
540
|
+
def status=(status)
|
|
541
|
+
validator = EnumAttributeValidator.new('String', ["preparing", "ready", "scheduled", "sending", "queued", "uncertain", "failed", "deleted", "unknown_default_open_api"])
|
|
542
|
+
unless validator.valid?(status)
|
|
543
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
544
|
+
end
|
|
545
|
+
@status = status
|
|
546
|
+
end
|
|
547
|
+
|
|
548
|
+
# Custom attribute writer method with validation
|
|
549
|
+
# @param [Object] subject Value to be assigned
|
|
550
|
+
def subject=(subject)
|
|
551
|
+
if subject.nil?
|
|
552
|
+
fail ArgumentError, 'subject cannot be nil'
|
|
553
|
+
end
|
|
554
|
+
|
|
555
|
+
if subject.to_s.length > 998
|
|
556
|
+
fail ArgumentError, 'invalid value for "subject", the character length must be smaller than or equal to 998.'
|
|
557
|
+
end
|
|
558
|
+
|
|
559
|
+
@subject = subject
|
|
560
|
+
end
|
|
561
|
+
|
|
562
|
+
# Custom attribute writer method with validation
|
|
563
|
+
# @param [Object] text_body Value to be assigned
|
|
564
|
+
def text_body=(text_body)
|
|
565
|
+
if text_body.nil?
|
|
566
|
+
fail ArgumentError, 'text_body cannot be nil'
|
|
567
|
+
end
|
|
568
|
+
|
|
569
|
+
if text_body.to_s.length > 1000000
|
|
570
|
+
fail ArgumentError, 'invalid value for "text_body", the character length must be smaller than or equal to 1000000.'
|
|
571
|
+
end
|
|
572
|
+
|
|
573
|
+
@text_body = text_body
|
|
574
|
+
end
|
|
575
|
+
|
|
576
|
+
# Custom attribute writer method with validation
|
|
577
|
+
# @param [Object] to Value to be assigned
|
|
578
|
+
def to=(to)
|
|
579
|
+
if to.nil?
|
|
580
|
+
fail ArgumentError, 'to cannot be nil'
|
|
581
|
+
end
|
|
582
|
+
|
|
583
|
+
if to.length > 50
|
|
584
|
+
fail ArgumentError, 'invalid value for "to", number of items must be less than or equal to 50.'
|
|
585
|
+
end
|
|
586
|
+
|
|
587
|
+
@to = to
|
|
588
|
+
end
|
|
589
|
+
|
|
590
|
+
# Checks equality by comparing each attribute.
|
|
591
|
+
# @param [Object] Object to be compared
|
|
592
|
+
def ==(o)
|
|
593
|
+
return true if self.equal?(o)
|
|
594
|
+
self.class == o.class &&
|
|
595
|
+
attachments == o.attachments &&
|
|
596
|
+
bcc == o.bcc &&
|
|
597
|
+
cc == o.cc &&
|
|
598
|
+
custom_headers == o.custom_headers &&
|
|
599
|
+
failure_code == o.failure_code &&
|
|
600
|
+
from == o.from &&
|
|
601
|
+
html_body == o.html_body &&
|
|
602
|
+
id == o.id &&
|
|
603
|
+
in_reply_to == o.in_reply_to &&
|
|
604
|
+
message_id == o.message_id &&
|
|
605
|
+
references == o.references &&
|
|
606
|
+
reply_to == o.reply_to &&
|
|
607
|
+
reply_to_message_id == o.reply_to_message_id &&
|
|
608
|
+
revision == o.revision &&
|
|
609
|
+
schedule_version == o.schedule_version &&
|
|
610
|
+
scheduled_for == o.scheduled_for &&
|
|
611
|
+
status == o.status &&
|
|
612
|
+
subject == o.subject &&
|
|
613
|
+
text_body == o.text_body &&
|
|
614
|
+
to == o.to
|
|
615
|
+
end
|
|
616
|
+
|
|
617
|
+
# @see the `==` method
|
|
618
|
+
# @param [Object] Object to be compared
|
|
619
|
+
def eql?(o)
|
|
620
|
+
self == o
|
|
621
|
+
end
|
|
622
|
+
|
|
623
|
+
# Calculates hash code according to all attributes.
|
|
624
|
+
# @return [Integer] Hash code
|
|
625
|
+
def hash
|
|
626
|
+
[attachments, bcc, cc, custom_headers, failure_code, from, html_body, id, in_reply_to, message_id, references, reply_to, reply_to_message_id, revision, schedule_version, scheduled_for, status, subject, text_body, to].hash
|
|
627
|
+
end
|
|
628
|
+
|
|
629
|
+
# Builds the object from hash
|
|
630
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
631
|
+
# @return [Object] Returns the model itself
|
|
632
|
+
def self.build_from_hash(attributes)
|
|
633
|
+
return nil unless attributes.is_a?(Hash)
|
|
634
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
635
|
+
transformed_hash = {}
|
|
636
|
+
openapi_types.each_pair do |key, type|
|
|
637
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
638
|
+
transformed_hash["#{key}"] = nil
|
|
639
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
640
|
+
# check to ensure the input is an array given that the attribute
|
|
641
|
+
# is documented as an array but the input is not
|
|
642
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
643
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
644
|
+
end
|
|
645
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
646
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
647
|
+
end
|
|
648
|
+
end
|
|
649
|
+
new(transformed_hash)
|
|
650
|
+
end
|
|
651
|
+
|
|
652
|
+
# Returns the object in the form of hash
|
|
653
|
+
# @return [Hash] Returns the object in the form of hash
|
|
654
|
+
def to_hash
|
|
655
|
+
hash = {}
|
|
656
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
657
|
+
value = self.send(attr)
|
|
658
|
+
if value.nil?
|
|
659
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
660
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
661
|
+
end
|
|
662
|
+
|
|
663
|
+
hash[param] = _to_hash(value)
|
|
664
|
+
end
|
|
665
|
+
hash
|
|
666
|
+
end
|
|
667
|
+
|
|
668
|
+
end
|
|
669
|
+
|
|
670
|
+
end
|