aspose_email_cloud 20.2.0 → 20.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aspose-email-cloud.rb +13 -0
- data/lib/aspose-email-cloud/api/email_api.rb +921 -879
- data/lib/aspose-email-cloud/api_client.rb +386 -382
- data/lib/aspose-email-cloud/api_error.rb +41 -41
- data/lib/aspose-email-cloud/configuration.rb +240 -240
- data/lib/aspose-email-cloud/models/account_base_request.rb +263 -260
- data/lib/aspose-email-cloud/models/add_attachment_request.rb +226 -223
- data/lib/aspose-email-cloud/models/ai_bcr_base64_image.rb +231 -228
- data/lib/aspose-email-cloud/models/ai_bcr_base64_rq.rb +228 -225
- data/lib/aspose-email-cloud/models/ai_bcr_image.rb +218 -215
- data/lib/aspose-email-cloud/models/ai_bcr_image_storage_file.rb +231 -228
- data/lib/aspose-email-cloud/models/ai_bcr_ocr_data.rb +256 -253
- data/lib/aspose-email-cloud/models/ai_bcr_ocr_data_part.rb +300 -297
- data/lib/aspose-email-cloud/models/ai_bcr_options.rb +226 -223
- data/lib/aspose-email-cloud/models/ai_bcr_parse_ocr_data_rq.rb +233 -230
- data/lib/aspose-email-cloud/models/ai_bcr_parse_storage_rq.rb +251 -248
- data/lib/aspose-email-cloud/models/ai_bcr_rq.rb +213 -210
- data/lib/aspose-email-cloud/models/ai_bcr_storage_image_rq.rb +233 -230
- data/lib/aspose-email-cloud/models/ai_name_component.rb +267 -264
- data/lib/aspose-email-cloud/models/ai_name_cultural_context.rb +270 -267
- data/lib/aspose-email-cloud/models/ai_name_extracted.rb +233 -230
- data/lib/aspose-email-cloud/models/ai_name_extracted_component.rb +231 -228
- data/lib/aspose-email-cloud/models/ai_name_formatted.rb +226 -223
- data/lib/aspose-email-cloud/models/ai_name_gender_hypothesis.rb +236 -233
- data/lib/aspose-email-cloud/models/ai_name_match_result.rb +233 -230
- data/lib/aspose-email-cloud/models/ai_name_mismatch.rb +249 -246
- data/lib/aspose-email-cloud/models/ai_name_parsed_match_rq.rb +266 -263
- data/lib/aspose-email-cloud/models/ai_name_parsed_rq.rb +246 -243
- data/lib/aspose-email-cloud/models/ai_name_weighted.rb +231 -228
- data/lib/aspose-email-cloud/models/ai_name_weighted_variants.rb +228 -225
- data/lib/aspose-email-cloud/models/alternate_view.rb +282 -279
- data/lib/aspose-email-cloud/models/append_email_account_base_request.rb +318 -315
- data/lib/aspose-email-cloud/models/append_email_base_request.rb +336 -333
- data/lib/aspose-email-cloud/models/append_email_mime_base_request.rb +355 -352
- data/lib/aspose-email-cloud/models/append_email_model_rq.rb +336 -333
- data/lib/aspose-email-cloud/models/associated_person.rb +244 -241
- data/lib/aspose-email-cloud/models/attachment.rb +324 -321
- data/lib/aspose-email-cloud/models/attachment_base.rb +254 -251
- data/lib/aspose-email-cloud/models/base_object.rb +5 -2
- data/lib/aspose-email-cloud/models/calendar_dto.rb +557 -554
- data/lib/aspose-email-cloud/models/calendar_dto_alternate_rq.rb +268 -265
- data/lib/aspose-email-cloud/models/calendar_dto_list.rb +215 -212
- data/lib/aspose-email-cloud/models/calendar_reminder.rb +318 -315
- data/lib/aspose-email-cloud/models/contact_dto.rb +699 -696
- data/lib/aspose-email-cloud/models/contact_dto_list.rb +215 -212
- data/lib/aspose-email-cloud/models/contact_photo.rb +231 -228
- data/lib/aspose-email-cloud/models/content_type.rb +267 -264
- data/lib/aspose-email-cloud/models/content_type_parameter.rb +226 -223
- data/lib/aspose-email-cloud/models/create_email_request.rb +231 -228
- data/lib/aspose-email-cloud/models/create_folder_base_request.rb +313 -310
- data/lib/aspose-email-cloud/models/customer_event.rb +231 -228
- data/lib/aspose-email-cloud/models/delete_folder_base_request.rb +318 -315
- data/lib/aspose-email-cloud/models/delete_message_base_request.rb +318 -315
- data/lib/aspose-email-cloud/models/disc_usage.rb +236 -233
- data/lib/aspose-email-cloud/models/discover_email_config_oauth.rb +391 -388
- data/lib/aspose-email-cloud/models/discover_email_config_password.rb +304 -301
- data/lib/aspose-email-cloud/models/discover_email_config_rq.rb +268 -265
- data/lib/aspose-email-cloud/models/email_account_config.rb +323 -320
- data/lib/aspose-email-cloud/models/email_account_config_list.rb +215 -212
- data/lib/aspose-email-cloud/models/email_account_request.rb +397 -394
- data/lib/aspose-email-cloud/models/email_address.rb +270 -267
- data/lib/aspose-email-cloud/models/email_client_account.rb +337 -0
- data/lib/aspose-email-cloud/models/email_client_account_credentials.rb +261 -0
- data/lib/aspose-email-cloud/models/email_client_account_oauth_credentials.rb +385 -0
- data/lib/aspose-email-cloud/models/email_client_account_password_credentials.rb +298 -0
- data/lib/aspose-email-cloud/models/email_client_multi_account.rb +233 -0
- data/lib/aspose-email-cloud/models/email_document.rb +233 -230
- data/lib/aspose-email-cloud/models/email_document_response.rb +213 -210
- data/lib/aspose-email-cloud/models/email_dto.rb +681 -678
- data/lib/aspose-email-cloud/models/email_dto_list.rb +215 -212
- data/lib/aspose-email-cloud/models/email_properties.rb +233 -230
- data/lib/aspose-email-cloud/models/email_property.rb +268 -265
- data/lib/aspose-email-cloud/models/email_property_response.rb +213 -210
- data/lib/aspose-email-cloud/models/enum_with_custom_of_associated_person_category.rb +230 -227
- data/lib/aspose-email-cloud/models/enum_with_custom_of_email_address_category.rb +230 -227
- data/lib/aspose-email-cloud/models/enum_with_custom_of_event_category.rb +230 -227
- data/lib/aspose-email-cloud/models/enum_with_custom_of_instant_messenger_category.rb +230 -227
- data/lib/aspose-email-cloud/models/enum_with_custom_of_phone_number_category.rb +230 -227
- data/lib/aspose-email-cloud/models/enum_with_custom_of_postal_address_category.rb +230 -227
- data/lib/aspose-email-cloud/models/enum_with_custom_of_url_category.rb +230 -227
- data/lib/aspose-email-cloud/models/error.rb +252 -249
- data/lib/aspose-email-cloud/models/error_details.rb +231 -228
- data/lib/aspose-email-cloud/models/file_version.rb +306 -303
- data/lib/aspose-email-cloud/models/file_versions.rb +215 -212
- data/lib/aspose-email-cloud/models/files_list.rb +215 -212
- data/lib/aspose-email-cloud/models/files_upload_result.rb +230 -227
- data/lib/aspose-email-cloud/models/hierarchical_object.rb +5 -2
- data/lib/aspose-email-cloud/models/hierarchical_object_request.rb +231 -228
- data/lib/aspose-email-cloud/models/hierarchical_object_response.rb +226 -223
- data/lib/aspose-email-cloud/models/indexed_hierarchical_object.rb +5 -2
- data/lib/aspose-email-cloud/models/indexed_primitive_object.rb +5 -2
- data/lib/aspose-email-cloud/models/instant_messenger_address.rb +244 -241
- data/lib/aspose-email-cloud/models/link.rb +252 -249
- data/lib/aspose-email-cloud/models/linked_resource.rb +267 -264
- data/lib/aspose-email-cloud/models/list_response_of_ai_bcr_ocr_data.rb +214 -211
- data/lib/aspose-email-cloud/models/list_response_of_ai_name_component.rb +214 -211
- data/lib/aspose-email-cloud/models/list_response_of_ai_name_extracted.rb +214 -211
- data/lib/aspose-email-cloud/models/list_response_of_ai_name_gender_hypothesis.rb +214 -211
- data/lib/aspose-email-cloud/models/list_response_of_contact_dto.rb +214 -211
- data/lib/aspose-email-cloud/models/list_response_of_email_account_config.rb +214 -211
- data/lib/aspose-email-cloud/models/list_response_of_email_dto.rb +214 -211
- data/lib/aspose-email-cloud/models/list_response_of_hierarchical_object.rb +214 -211
- data/lib/aspose-email-cloud/models/list_response_of_hierarchical_object_response.rb +214 -211
- data/lib/aspose-email-cloud/models/list_response_of_mail_server_folder.rb +214 -211
- data/lib/aspose-email-cloud/models/list_response_of_storage_file_location.rb +214 -211
- data/lib/aspose-email-cloud/models/list_response_of_storage_model_of_calendar_dto.rb +214 -211
- data/lib/aspose-email-cloud/models/list_response_of_storage_model_of_contact_dto.rb +214 -211
- data/lib/aspose-email-cloud/models/list_response_of_storage_model_of_email_dto.rb +214 -211
- data/lib/aspose-email-cloud/models/list_response_of_string.rb +214 -211
- data/lib/aspose-email-cloud/models/mail_address.rb +244 -241
- data/lib/aspose-email-cloud/models/mail_server_folder.rb +226 -223
- data/lib/aspose-email-cloud/models/mime_response.rb +213 -210
- data/lib/aspose-email-cloud/models/name_value_pair.rb +226 -222
- data/lib/aspose-email-cloud/models/object_exist.rb +236 -233
- data/lib/aspose-email-cloud/models/phone_number.rb +244 -241
- data/lib/aspose-email-cloud/models/postal_address.rb +353 -350
- data/lib/aspose-email-cloud/models/primitive_object.rb +5 -2
- data/lib/aspose-email-cloud/models/reminder_attendee.rb +213 -210
- data/lib/aspose-email-cloud/models/reminder_trigger.rb +249 -246
- data/lib/aspose-email-cloud/models/requests/add_calendar_attachment_request_data.rb +99 -99
- data/lib/aspose-email-cloud/models/requests/add_contact_attachment_request_data.rb +109 -109
- data/lib/aspose-email-cloud/models/requests/add_email_attachment_request_data.rb +99 -99
- data/lib/aspose-email-cloud/models/requests/add_mapi_attachment_request_data.rb +99 -99
- data/lib/aspose-email-cloud/models/requests/ai_bcr_ocr_request_data.rb +79 -79
- data/lib/aspose-email-cloud/models/requests/ai_bcr_ocr_storage_request_data.rb +79 -79
- data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_model_request_data.rb +79 -79
- data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_ocr_data_model_request_data.rb +79 -79
- data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_request_data.rb +79 -79
- data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_storage_request_data.rb +79 -79
- data/lib/aspose-email-cloud/models/requests/ai_name_complete_request_data.rb +110 -110
- data/lib/aspose-email-cloud/models/requests/ai_name_expand_parsed_request_data.rb +79 -79
- data/lib/aspose-email-cloud/models/requests/ai_name_expand_request_data.rb +110 -110
- data/lib/aspose-email-cloud/models/requests/ai_name_format_parsed_request_data.rb +79 -79
- data/lib/aspose-email-cloud/models/requests/ai_name_format_request_data.rb +116 -116
- data/lib/aspose-email-cloud/models/requests/ai_name_genderize_parsed_request_data.rb +79 -79
- data/lib/aspose-email-cloud/models/requests/ai_name_genderize_request_data.rb +110 -110
- data/lib/aspose-email-cloud/models/requests/ai_name_match_parsed_request_data.rb +79 -79
- data/lib/aspose-email-cloud/models/requests/ai_name_match_request_data.rb +121 -121
- data/lib/aspose-email-cloud/models/requests/ai_name_parse_email_address_request_data.rb +110 -110
- data/lib/aspose-email-cloud/models/requests/ai_name_parse_request_data.rb +110 -110
- data/lib/aspose-email-cloud/models/requests/append_email_message_request_data.rb +79 -79
- data/lib/aspose-email-cloud/models/requests/append_email_model_message_request_data.rb +79 -79
- data/lib/aspose-email-cloud/models/requests/append_mime_message_request_data.rb +79 -79
- data/lib/aspose-email-cloud/models/requests/convert_calendar_model_to_alternate_request_data.rb +79 -79
- data/lib/aspose-email-cloud/models/requests/convert_email_request_data.rb +90 -90
- data/lib/aspose-email-cloud/models/requests/copy_file_request_data.rb +108 -108
- data/lib/aspose-email-cloud/models/requests/copy_folder_request_data.rb +102 -102
- data/lib/aspose-email-cloud/models/requests/create_calendar_request_data.rb +89 -89
- data/lib/aspose-email-cloud/models/requests/create_contact_request_data.rb +99 -99
- data/lib/aspose-email-cloud/models/requests/create_email_folder_request_data.rb +79 -79
- data/lib/aspose-email-cloud/models/requests/create_email_request_data.rb +89 -89
- data/lib/aspose-email-cloud/models/requests/create_folder_request_data.rb +85 -85
- data/lib/aspose-email-cloud/models/requests/create_mapi_request_data.rb +89 -89
- data/lib/aspose-email-cloud/models/requests/delete_calendar_property_request_data.rb +109 -109
- data/lib/aspose-email-cloud/models/requests/delete_contact_property_request_data.rb +119 -119
- data/lib/aspose-email-cloud/models/requests/delete_email_folder_request_data.rb +79 -79
- data/lib/aspose-email-cloud/models/requests/delete_email_message_request_data.rb +79 -79
- data/lib/aspose-email-cloud/models/requests/delete_file_request_data.rb +91 -91
- data/lib/aspose-email-cloud/models/requests/delete_folder_request_data.rb +91 -91
- data/lib/aspose-email-cloud/models/requests/delete_mapi_attachment_request_data.rb +99 -99
- data/lib/aspose-email-cloud/models/requests/delete_mapi_properties_request_data.rb +89 -89
- data/lib/aspose-email-cloud/models/requests/discover_email_config_oauth_request_data.rb +79 -79
- data/lib/aspose-email-cloud/models/requests/discover_email_config_password_request_data.rb +79 -79
- data/lib/aspose-email-cloud/models/requests/discover_email_config_request_data.rb +86 -86
- data/lib/aspose-email-cloud/models/requests/download_file_request_data.rb +91 -91
- data/lib/aspose-email-cloud/models/requests/email_request.rb +75 -75
- data/lib/aspose-email-cloud/models/requests/fetch_email_message_request_data.rb +109 -109
- data/lib/aspose-email-cloud/models/requests/fetch_email_model_request_data.rb +109 -109
- data/lib/aspose-email-cloud/models/requests/get_calendar_attachment_request_data.rb +101 -101
- data/lib/aspose-email-cloud/models/requests/get_calendar_list_request_data.rb +108 -108
- data/lib/aspose-email-cloud/models/requests/get_calendar_model_as_alternate_request_data.rb +107 -107
- data/lib/aspose-email-cloud/models/requests/get_calendar_model_list_request_data.rb +98 -98
- data/lib/aspose-email-cloud/models/requests/get_calendar_model_request_data.rb +91 -91
- data/lib/aspose-email-cloud/models/requests/get_calendar_request_data.rb +91 -91
- data/lib/aspose-email-cloud/models/requests/get_contact_attachment_request_data.rb +111 -111
- data/lib/aspose-email-cloud/models/requests/get_contact_list_request_data.rb +103 -103
- data/lib/aspose-email-cloud/models/requests/get_contact_model_list_request_data.rb +103 -103
- data/lib/aspose-email-cloud/models/requests/get_contact_model_request_data.rb +101 -101
- data/lib/aspose-email-cloud/models/requests/get_contact_properties_request_data.rb +101 -101
- data/lib/aspose-email-cloud/models/requests/get_disc_usage_request_data.rb +75 -75
- data/lib/aspose-email-cloud/models/requests/get_email_as_file_request_data.rb +101 -101
- data/lib/aspose-email-cloud/models/requests/get_email_attachment_request_data.rb +101 -101
- data/lib/aspose-email-cloud/models/requests/get_email_client_account_request_data.rb +102 -0
- data/lib/aspose-email-cloud/models/requests/get_email_client_multi_account_request_data.rb +102 -0
- data/lib/aspose-email-cloud/models/requests/get_email_model_list_request_data.rb +103 -103
- data/lib/aspose-email-cloud/models/requests/get_email_model_request_data.rb +101 -101
- data/lib/aspose-email-cloud/models/requests/get_email_property_request_data.rb +101 -101
- data/lib/aspose-email-cloud/models/requests/get_email_request_data.rb +91 -91
- data/lib/aspose-email-cloud/models/requests/get_file_versions_request_data.rb +85 -85
- data/lib/aspose-email-cloud/models/requests/get_files_list_request_data.rb +85 -85
- data/lib/aspose-email-cloud/models/requests/get_mapi_attachment_request_data.rb +101 -101
- data/lib/aspose-email-cloud/models/requests/get_mapi_attachments_request_data.rb +91 -91
- data/lib/aspose-email-cloud/models/requests/get_mapi_list_request_data.rb +93 -93
- data/lib/aspose-email-cloud/models/requests/get_mapi_properties_request_data.rb +91 -91
- data/lib/aspose-email-cloud/models/requests/http_request.rb +51 -51
- data/lib/aspose-email-cloud/models/requests/is_email_address_disposable_request_data.rb +79 -0
- data/lib/aspose-email-cloud/models/requests/list_email_folders_request_data.rb +104 -104
- data/lib/aspose-email-cloud/models/requests/list_email_messages_request_data.rb +127 -127
- data/lib/aspose-email-cloud/models/requests/list_email_models_request_data.rb +127 -127
- data/lib/aspose-email-cloud/models/requests/move_file_request_data.rb +108 -108
- data/lib/aspose-email-cloud/models/requests/move_folder_request_data.rb +102 -102
- data/lib/aspose-email-cloud/models/requests/object_exists_request_data.rb +91 -91
- data/lib/aspose-email-cloud/models/requests/save_calendar_model_request_data.rb +89 -89
- data/lib/aspose-email-cloud/models/requests/save_contact_model_request_data.rb +99 -99
- data/lib/aspose-email-cloud/models/requests/save_email_client_account_request_data.rb +79 -0
- data/lib/aspose-email-cloud/models/requests/save_email_client_multi_account_request_data.rb +79 -0
- data/lib/aspose-email-cloud/models/requests/save_email_model_request_data.rb +99 -99
- data/lib/aspose-email-cloud/models/requests/save_mail_account_request_data.rb +79 -79
- data/lib/aspose-email-cloud/models/requests/save_mail_o_auth_account_request_data.rb +79 -79
- data/lib/aspose-email-cloud/models/requests/send_email_mime_request_data.rb +79 -79
- data/lib/aspose-email-cloud/models/requests/send_email_model_request_data.rb +79 -79
- data/lib/aspose-email-cloud/models/requests/send_email_request_data.rb +79 -79
- data/lib/aspose-email-cloud/models/requests/set_email_property_request_data.rb +99 -99
- data/lib/aspose-email-cloud/models/requests/set_email_read_flag_request_data.rb +79 -79
- data/lib/aspose-email-cloud/models/requests/storage_exists_request_data.rb +79 -79
- data/lib/aspose-email-cloud/models/requests/update_calendar_properties_request_data.rb +89 -89
- data/lib/aspose-email-cloud/models/requests/update_contact_properties_request_data.rb +99 -99
- data/lib/aspose-email-cloud/models/requests/update_mapi_properties_request_data.rb +89 -89
- data/lib/aspose-email-cloud/models/requests/upload_file_request_data.rb +97 -97
- data/lib/aspose-email-cloud/models/save_email_account_request.rb +434 -431
- data/lib/aspose-email-cloud/models/save_o_auth_email_account_request.rb +521 -505
- data/lib/aspose-email-cloud/models/send_email_base_request.rb +281 -278
- data/lib/aspose-email-cloud/models/send_email_mime_base_request.rb +300 -297
- data/lib/aspose-email-cloud/models/send_email_model_rq.rb +276 -273
- data/lib/aspose-email-cloud/models/set_email_property_request.rb +231 -228
- data/lib/aspose-email-cloud/models/set_message_read_flag_account_base_request.rb +318 -315
- data/lib/aspose-email-cloud/models/storage_exist.rb +218 -215
- data/lib/aspose-email-cloud/models/storage_file.rb +275 -272
- data/lib/aspose-email-cloud/models/storage_file_location.rb +263 -260
- data/lib/aspose-email-cloud/models/storage_file_rq_of_email_client_account.rb +225 -0
- data/lib/aspose-email-cloud/models/storage_file_rq_of_email_client_multi_account.rb +225 -0
- data/lib/aspose-email-cloud/models/storage_folder_location.rb +226 -223
- data/lib/aspose-email-cloud/models/storage_model_of_calendar_dto.rb +225 -222
- data/lib/aspose-email-cloud/models/storage_model_of_contact_dto.rb +225 -222
- data/lib/aspose-email-cloud/models/storage_model_of_email_dto.rb +225 -222
- data/lib/aspose-email-cloud/models/storage_model_rq_of_calendar_dto.rb +225 -222
- data/lib/aspose-email-cloud/models/storage_model_rq_of_contact_dto.rb +225 -222
- data/lib/aspose-email-cloud/models/storage_model_rq_of_email_dto.rb +225 -222
- data/lib/aspose-email-cloud/models/url.rb +244 -241
- data/lib/aspose-email-cloud/models/value_response.rb +213 -210
- data/lib/aspose-email-cloud/models/value_t_of_boolean.rb +217 -0
- data/lib/aspose-email-cloud/version.rb +1 -1
- metadata +15 -2
@@ -1,264 +1,267 @@
|
|
1
|
-
# ----------------------------------------------------------------------------
|
2
|
-
# <copyright company="Aspose" file="ContentType.rb">
|
3
|
-
# Copyright (c) 2018-2019 Aspose Pty Ltd. All rights reserved.
|
4
|
-
# </copyright>
|
5
|
-
# <summary>
|
6
|
-
# Permission is hereby granted, free of charge, to any person obtaining a
|
7
|
-
# copy of this software and associated documentation files (the "Software"),
|
8
|
-
# to deal in the Software without restriction, including without limitation
|
9
|
-
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
10
|
-
# and/or sell copies of the Software, and to permit persons to whom the
|
11
|
-
# Software is furnished to do so, subject to the following conditions:
|
12
|
-
#
|
13
|
-
# The above copyright notice and this permission notice shall be included in
|
14
|
-
# all copies or substantial portions of the Software.
|
15
|
-
#
|
16
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
21
|
-
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
22
|
-
# DEALINGS IN THE SOFTWARE.
|
23
|
-
# </summary>
|
24
|
-
# ----------------------------------------------------------------------------
|
25
|
-
|
26
|
-
|
27
|
-
require 'date'
|
28
|
-
|
29
|
-
module AsposeEmailCloud
|
30
|
-
# Represents a Content-Type header.
|
31
|
-
class ContentType
|
32
|
-
# The boundary parameter included in the Content-Type header.
|
33
|
-
# @return [String]
|
34
|
-
attr_accessor :boundary
|
35
|
-
|
36
|
-
# CharSet parameter.
|
37
|
-
# @return [String]
|
38
|
-
attr_accessor :char_set
|
39
|
-
|
40
|
-
# The internet media type.
|
41
|
-
# @return [String]
|
42
|
-
attr_accessor :media_type
|
43
|
-
|
44
|
-
# Name parameter.
|
45
|
-
# @return [String]
|
46
|
-
attr_accessor :name
|
47
|
-
|
48
|
-
# Full list of parameters
|
49
|
-
# @return [Array<ContentTypeParameter>]
|
50
|
-
attr_accessor :parameters
|
51
|
-
|
52
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
53
|
-
def self.attribute_map
|
54
|
-
{
|
55
|
-
:'boundary' => :'boundary',
|
56
|
-
:'char_set' => :'charSet',
|
57
|
-
:'media_type' => :'mediaType',
|
58
|
-
:'name' => :'name',
|
59
|
-
:'parameters' => :'parameters'
|
60
|
-
}
|
61
|
-
end
|
62
|
-
|
63
|
-
# Attribute type mapping.
|
64
|
-
def self.swagger_types
|
65
|
-
{
|
66
|
-
:'boundary' => :'String',
|
67
|
-
:'char_set' => :'String',
|
68
|
-
:'media_type' => :'String',
|
69
|
-
:'name' => :'String',
|
70
|
-
:'parameters' => :'Array<ContentTypeParameter>'
|
71
|
-
}
|
72
|
-
end
|
73
|
-
|
74
|
-
# Initializes the object
|
75
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
76
|
-
def initialize(attributes = {})
|
77
|
-
return unless attributes.is_a?(Hash)
|
78
|
-
|
79
|
-
# convert string to symbol for hash key
|
80
|
-
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
81
|
-
|
82
|
-
if attributes.has_key?(:'boundary')
|
83
|
-
self.boundary = attributes[:'boundary']
|
84
|
-
end
|
85
|
-
|
86
|
-
if attributes.has_key?(:'charSet')
|
87
|
-
self.char_set = attributes[:'charSet']
|
88
|
-
end
|
89
|
-
|
90
|
-
if attributes.has_key?(:'mediaType')
|
91
|
-
self.media_type = attributes[:'mediaType']
|
92
|
-
end
|
93
|
-
|
94
|
-
if attributes.has_key?(:'name')
|
95
|
-
self.name = attributes[:'name']
|
96
|
-
end
|
97
|
-
|
98
|
-
if attributes.has_key?(:'parameters')
|
99
|
-
if (value = attributes[:'parameters']).is_a?(Array)
|
100
|
-
self.parameters = value
|
101
|
-
end
|
102
|
-
end
|
103
|
-
end
|
104
|
-
|
105
|
-
# Initializes the object
|
106
|
-
# @param [String] boundary The boundary parameter included in the Content-Type header.
|
107
|
-
# @param [String] char_set CharSet parameter.
|
108
|
-
# @param [String] media_type The internet media type.
|
109
|
-
# @param [String] name Name parameter.
|
110
|
-
# @param [Array<ContentTypeParameter>] parameters Full list of parameters
|
111
|
-
def initialize(boundary=nil, char_set=nil, media_type=nil, name=nil, parameters=nil)
|
112
|
-
self.boundary = boundary if boundary
|
113
|
-
self.char_set = char_set if char_set
|
114
|
-
self.media_type = media_type if media_type
|
115
|
-
self.name = name if name
|
116
|
-
self.parameters = parameters if parameters
|
117
|
-
end
|
118
|
-
|
119
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
120
|
-
# @return Array for valid properties with the reasons
|
121
|
-
def list_invalid_properties
|
122
|
-
invalid_properties = Array.new
|
123
|
-
invalid_properties
|
124
|
-
end
|
125
|
-
|
126
|
-
# Check to see if the all the properties in the model are valid
|
127
|
-
# @return true if the model is valid
|
128
|
-
def valid?
|
129
|
-
true
|
130
|
-
end
|
131
|
-
|
132
|
-
# Checks equality by comparing each attribute.
|
133
|
-
# @param [Object] Object to be compared
|
134
|
-
def ==(o)
|
135
|
-
return true if self.equal?(o)
|
136
|
-
self.class == o.class &&
|
137
|
-
boundary == o.boundary &&
|
138
|
-
char_set == o.char_set &&
|
139
|
-
media_type == o.media_type &&
|
140
|
-
name == o.name &&
|
141
|
-
parameters == o.parameters
|
142
|
-
end
|
143
|
-
|
144
|
-
# @see the `==` method
|
145
|
-
# @param [Object] Object to be compared
|
146
|
-
def eql?(o)
|
147
|
-
self == o
|
148
|
-
end
|
149
|
-
|
150
|
-
# Calculates hash code according to all attributes.
|
151
|
-
# @return [Fixnum] Hash code
|
152
|
-
def hash
|
153
|
-
[boundary, char_set, media_type, name, parameters].hash
|
154
|
-
end
|
155
|
-
|
156
|
-
# Builds the object from hash
|
157
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
158
|
-
# @return [Object] Returns the model itself
|
159
|
-
def build_from_hash(attributes)
|
160
|
-
return nil unless attributes.is_a?(Hash)
|
161
|
-
self.class.swagger_types.each_pair do |key, type|
|
162
|
-
attribute_key = self.class.attribute_map[key]
|
163
|
-
attribute_key = (attribute_key[0, 1].downcase + attribute_key[1..-1]).to_sym
|
164
|
-
if type =~ /\AArray<(.*)>/i
|
165
|
-
# check to ensure the input is an array given that the the attribute
|
166
|
-
# is documented as an array but the input is not
|
167
|
-
if attributes[attribute_key].is_a?(Array)
|
168
|
-
self.send("#{key}=", attributes[attribute_key].map { |v| _deserialize($1, v) })
|
169
|
-
end
|
170
|
-
elsif !attributes[attribute_key].nil?
|
171
|
-
self.send("#{key}=", _deserialize(type, attributes[attribute_key]))
|
172
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
173
|
-
end
|
174
|
-
|
175
|
-
self
|
176
|
-
end
|
177
|
-
|
178
|
-
# Deserializes the data based on type
|
179
|
-
# @param string type Data type
|
180
|
-
# @param string value Value to be deserialized
|
181
|
-
# @return [Object] Deserialized data
|
182
|
-
def _deserialize(type, value)
|
183
|
-
case type.to_sym
|
184
|
-
when :DateTime
|
185
|
-
DateTime.parse(value)
|
186
|
-
when :Date
|
187
|
-
Date.parse(value)
|
188
|
-
when :String
|
189
|
-
value.to_s
|
190
|
-
when :Integer
|
191
|
-
value.to_i
|
192
|
-
when :Float
|
193
|
-
value.to_f
|
194
|
-
when :BOOLEAN
|
195
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
196
|
-
true
|
197
|
-
else
|
198
|
-
false
|
199
|
-
end
|
200
|
-
when :Object
|
201
|
-
# generic object (usually a Hash), return directly
|
202
|
-
value
|
203
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
204
|
-
inner_type = Regexp.last_match[:inner_type]
|
205
|
-
value.map { |v| _deserialize(inner_type, v) }
|
206
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
207
|
-
k_type = Regexp.last_match[:k_type]
|
208
|
-
v_type = Regexp.last_match[:v_type]
|
209
|
-
{}.tap do |hash|
|
210
|
-
value.each do |k, v|
|
211
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
212
|
-
end
|
213
|
-
end
|
214
|
-
else # model
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
#
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
end
|
1
|
+
# ----------------------------------------------------------------------------
|
2
|
+
# <copyright company="Aspose" file="ContentType.rb">
|
3
|
+
# Copyright (c) 2018-2019 Aspose Pty Ltd. All rights reserved.
|
4
|
+
# </copyright>
|
5
|
+
# <summary>
|
6
|
+
# Permission is hereby granted, free of charge, to any person obtaining a
|
7
|
+
# copy of this software and associated documentation files (the "Software"),
|
8
|
+
# to deal in the Software without restriction, including without limitation
|
9
|
+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
10
|
+
# and/or sell copies of the Software, and to permit persons to whom the
|
11
|
+
# Software is furnished to do so, subject to the following conditions:
|
12
|
+
#
|
13
|
+
# The above copyright notice and this permission notice shall be included in
|
14
|
+
# all copies or substantial portions of the Software.
|
15
|
+
#
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
21
|
+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
22
|
+
# DEALINGS IN THE SOFTWARE.
|
23
|
+
# </summary>
|
24
|
+
# ----------------------------------------------------------------------------
|
25
|
+
|
26
|
+
|
27
|
+
require 'date'
|
28
|
+
|
29
|
+
module AsposeEmailCloud
|
30
|
+
# Represents a Content-Type header.
|
31
|
+
class ContentType
|
32
|
+
# The boundary parameter included in the Content-Type header.
|
33
|
+
# @return [String]
|
34
|
+
attr_accessor :boundary
|
35
|
+
|
36
|
+
# CharSet parameter.
|
37
|
+
# @return [String]
|
38
|
+
attr_accessor :char_set
|
39
|
+
|
40
|
+
# The internet media type.
|
41
|
+
# @return [String]
|
42
|
+
attr_accessor :media_type
|
43
|
+
|
44
|
+
# Name parameter.
|
45
|
+
# @return [String]
|
46
|
+
attr_accessor :name
|
47
|
+
|
48
|
+
# Full list of parameters
|
49
|
+
# @return [Array<ContentTypeParameter>]
|
50
|
+
attr_accessor :parameters
|
51
|
+
|
52
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
53
|
+
def self.attribute_map
|
54
|
+
{
|
55
|
+
:'boundary' => :'boundary',
|
56
|
+
:'char_set' => :'charSet',
|
57
|
+
:'media_type' => :'mediaType',
|
58
|
+
:'name' => :'name',
|
59
|
+
:'parameters' => :'parameters'
|
60
|
+
}
|
61
|
+
end
|
62
|
+
|
63
|
+
# Attribute type mapping.
|
64
|
+
def self.swagger_types
|
65
|
+
{
|
66
|
+
:'boundary' => :'String',
|
67
|
+
:'char_set' => :'String',
|
68
|
+
:'media_type' => :'String',
|
69
|
+
:'name' => :'String',
|
70
|
+
:'parameters' => :'Array<ContentTypeParameter>'
|
71
|
+
}
|
72
|
+
end
|
73
|
+
|
74
|
+
# Initializes the object
|
75
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
76
|
+
def initialize(attributes = {})
|
77
|
+
return unless attributes.is_a?(Hash)
|
78
|
+
|
79
|
+
# convert string to symbol for hash key
|
80
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
81
|
+
|
82
|
+
if attributes.has_key?(:'boundary')
|
83
|
+
self.boundary = attributes[:'boundary']
|
84
|
+
end
|
85
|
+
|
86
|
+
if attributes.has_key?(:'charSet')
|
87
|
+
self.char_set = attributes[:'charSet']
|
88
|
+
end
|
89
|
+
|
90
|
+
if attributes.has_key?(:'mediaType')
|
91
|
+
self.media_type = attributes[:'mediaType']
|
92
|
+
end
|
93
|
+
|
94
|
+
if attributes.has_key?(:'name')
|
95
|
+
self.name = attributes[:'name']
|
96
|
+
end
|
97
|
+
|
98
|
+
if attributes.has_key?(:'parameters')
|
99
|
+
if (value = attributes[:'parameters']).is_a?(Array)
|
100
|
+
self.parameters = value
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
# Initializes the object
|
106
|
+
# @param [String] boundary The boundary parameter included in the Content-Type header.
|
107
|
+
# @param [String] char_set CharSet parameter.
|
108
|
+
# @param [String] media_type The internet media type.
|
109
|
+
# @param [String] name Name parameter.
|
110
|
+
# @param [Array<ContentTypeParameter>] parameters Full list of parameters
|
111
|
+
def initialize(boundary=nil, char_set=nil, media_type=nil, name=nil, parameters=nil)
|
112
|
+
self.boundary = boundary if boundary
|
113
|
+
self.char_set = char_set if char_set
|
114
|
+
self.media_type = media_type if media_type
|
115
|
+
self.name = name if name
|
116
|
+
self.parameters = parameters if parameters
|
117
|
+
end
|
118
|
+
|
119
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
120
|
+
# @return Array for valid properties with the reasons
|
121
|
+
def list_invalid_properties
|
122
|
+
invalid_properties = Array.new
|
123
|
+
invalid_properties
|
124
|
+
end
|
125
|
+
|
126
|
+
# Check to see if the all the properties in the model are valid
|
127
|
+
# @return true if the model is valid
|
128
|
+
def valid?
|
129
|
+
true
|
130
|
+
end
|
131
|
+
|
132
|
+
# Checks equality by comparing each attribute.
|
133
|
+
# @param [Object] Object to be compared
|
134
|
+
def ==(o)
|
135
|
+
return true if self.equal?(o)
|
136
|
+
self.class == o.class &&
|
137
|
+
boundary == o.boundary &&
|
138
|
+
char_set == o.char_set &&
|
139
|
+
media_type == o.media_type &&
|
140
|
+
name == o.name &&
|
141
|
+
parameters == o.parameters
|
142
|
+
end
|
143
|
+
|
144
|
+
# @see the `==` method
|
145
|
+
# @param [Object] Object to be compared
|
146
|
+
def eql?(o)
|
147
|
+
self == o
|
148
|
+
end
|
149
|
+
|
150
|
+
# Calculates hash code according to all attributes.
|
151
|
+
# @return [Fixnum] Hash code
|
152
|
+
def hash
|
153
|
+
[boundary, char_set, media_type, name, parameters].hash
|
154
|
+
end
|
155
|
+
|
156
|
+
# Builds the object from hash
|
157
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
158
|
+
# @return [Object] Returns the model itself
|
159
|
+
def build_from_hash(attributes)
|
160
|
+
return nil unless attributes.is_a?(Hash)
|
161
|
+
self.class.swagger_types.each_pair do |key, type|
|
162
|
+
attribute_key = self.class.attribute_map[key]
|
163
|
+
attribute_key = (attribute_key[0, 1].downcase + attribute_key[1..-1]).to_sym
|
164
|
+
if type =~ /\AArray<(.*)>/i
|
165
|
+
# check to ensure the input is an array given that the the attribute
|
166
|
+
# is documented as an array but the input is not
|
167
|
+
if attributes[attribute_key].is_a?(Array)
|
168
|
+
self.send("#{key}=", attributes[attribute_key].map { |v| _deserialize($1, v) })
|
169
|
+
end
|
170
|
+
elsif !attributes[attribute_key].nil?
|
171
|
+
self.send("#{key}=", _deserialize(type, attributes[attribute_key]))
|
172
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
173
|
+
end
|
174
|
+
|
175
|
+
self
|
176
|
+
end
|
177
|
+
|
178
|
+
# Deserializes the data based on type
|
179
|
+
# @param string type Data type
|
180
|
+
# @param string value Value to be deserialized
|
181
|
+
# @return [Object] Deserialized data
|
182
|
+
def _deserialize(type, value)
|
183
|
+
case type.to_sym
|
184
|
+
when :DateTime
|
185
|
+
DateTime.parse(value)
|
186
|
+
when :Date
|
187
|
+
Date.parse(value)
|
188
|
+
when :String
|
189
|
+
value.to_s
|
190
|
+
when :Integer
|
191
|
+
value.to_i
|
192
|
+
when :Float
|
193
|
+
value.to_f
|
194
|
+
when :BOOLEAN
|
195
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
196
|
+
true
|
197
|
+
else
|
198
|
+
false
|
199
|
+
end
|
200
|
+
when :Object
|
201
|
+
# generic object (usually a Hash), return directly
|
202
|
+
value
|
203
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
204
|
+
inner_type = Regexp.last_match[:inner_type]
|
205
|
+
value.map { |v| _deserialize(inner_type, v) }
|
206
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
207
|
+
k_type = Regexp.last_match[:k_type]
|
208
|
+
v_type = Regexp.last_match[:v_type]
|
209
|
+
{}.tap do |hash|
|
210
|
+
value.each do |k, v|
|
211
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
212
|
+
end
|
213
|
+
end
|
214
|
+
else # model
|
215
|
+
sub_type = value[:type] || value[:discriminator] || type
|
216
|
+
if AsposeEmailCloud.const_defined?(sub_type)
|
217
|
+
type = sub_type
|
218
|
+
end
|
219
|
+
temp_model = AsposeEmailCloud.const_get(type).new
|
220
|
+
temp_model.build_from_hash(value)
|
221
|
+
end
|
222
|
+
end
|
223
|
+
|
224
|
+
# Returns the string representation of the object
|
225
|
+
# @return [String] String presentation of the object
|
226
|
+
def to_s
|
227
|
+
to_hash.to_s
|
228
|
+
end
|
229
|
+
|
230
|
+
# to_body is an alias to to_hash (backward compatibility)
|
231
|
+
# @return [Hash] Returns the object in the form of hash
|
232
|
+
def to_body
|
233
|
+
to_hash
|
234
|
+
end
|
235
|
+
|
236
|
+
# Returns the object in the form of hash
|
237
|
+
# @return [Hash] Returns the object in the form of hash
|
238
|
+
def to_hash
|
239
|
+
hash = {}
|
240
|
+
self.class.attribute_map.each_pair do |attr, param|
|
241
|
+
value = self.send(attr)
|
242
|
+
next if value.nil?
|
243
|
+
hash[param] = _to_hash(value)
|
244
|
+
end
|
245
|
+
hash
|
246
|
+
end
|
247
|
+
|
248
|
+
# Outputs non-array value in the form of hash
|
249
|
+
# For object, use to_hash. Otherwise, just return the value
|
250
|
+
# @param [Object] value Any valid value
|
251
|
+
# @return [Hash] Returns the value in the form of hash
|
252
|
+
def _to_hash(value)
|
253
|
+
if value.is_a?(Array)
|
254
|
+
value.compact.map { |v| _to_hash(v) }
|
255
|
+
elsif value.is_a?(Hash)
|
256
|
+
{}.tap do |hash|
|
257
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
258
|
+
end
|
259
|
+
elsif value.respond_to? :to_hash
|
260
|
+
value.to_hash
|
261
|
+
else
|
262
|
+
value
|
263
|
+
end
|
264
|
+
end
|
265
|
+
|
266
|
+
end
|
267
|
+
end
|