aspose_email_cloud 20.1.0 → 20.2.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 +10 -0
- data/lib/aspose-email-cloud/api/email_api.rb +24 -0
- data/lib/aspose-email-cloud/models/discover_email_config_oauth.rb +388 -0
- data/lib/aspose-email-cloud/models/discover_email_config_password.rb +301 -0
- data/lib/aspose-email-cloud/models/discover_email_config_rq.rb +265 -0
- data/lib/aspose-email-cloud/models/email_account_config.rb +320 -0
- data/lib/aspose-email-cloud/models/email_account_config_list.rb +212 -0
- data/lib/aspose-email-cloud/models/list_response_of_email_account_config.rb +211 -0
- data/lib/aspose-email-cloud/models/name_value_pair.rb +222 -0
- data/lib/aspose-email-cloud/models/requests/add_calendar_attachment_request_data.rb +18 -8
- data/lib/aspose-email-cloud/models/requests/add_contact_attachment_request_data.rb +23 -10
- data/lib/aspose-email-cloud/models/requests/add_email_attachment_request_data.rb +18 -8
- data/lib/aspose-email-cloud/models/requests/add_mapi_attachment_request_data.rb +18 -8
- data/lib/aspose-email-cloud/models/requests/ai_bcr_ocr_request_data.rb +7 -3
- data/lib/aspose-email-cloud/models/requests/ai_bcr_ocr_storage_request_data.rb +7 -3
- data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_model_request_data.rb +7 -3
- data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_ocr_data_model_request_data.rb +7 -3
- data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_request_data.rb +7 -3
- data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_storage_request_data.rb +7 -3
- data/lib/aspose-email-cloud/models/requests/ai_name_complete_request_data.rb +32 -13
- data/lib/aspose-email-cloud/models/requests/ai_name_expand_parsed_request_data.rb +7 -3
- data/lib/aspose-email-cloud/models/requests/ai_name_expand_request_data.rb +32 -13
- data/lib/aspose-email-cloud/models/requests/ai_name_format_parsed_request_data.rb +7 -3
- data/lib/aspose-email-cloud/models/requests/ai_name_format_request_data.rb +37 -15
- data/lib/aspose-email-cloud/models/requests/ai_name_genderize_parsed_request_data.rb +7 -3
- data/lib/aspose-email-cloud/models/requests/ai_name_genderize_request_data.rb +32 -13
- data/lib/aspose-email-cloud/models/requests/ai_name_match_parsed_request_data.rb +7 -3
- data/lib/aspose-email-cloud/models/requests/ai_name_match_request_data.rb +38 -16
- data/lib/aspose-email-cloud/models/requests/ai_name_parse_email_address_request_data.rb +32 -13
- data/lib/aspose-email-cloud/models/requests/ai_name_parse_request_data.rb +32 -13
- data/lib/aspose-email-cloud/models/requests/append_email_message_request_data.rb +7 -3
- data/lib/aspose-email-cloud/models/requests/append_email_model_message_request_data.rb +7 -3
- data/lib/aspose-email-cloud/models/requests/append_mime_message_request_data.rb +7 -3
- data/lib/aspose-email-cloud/models/requests/convert_calendar_model_to_alternate_request_data.rb +7 -3
- data/lib/aspose-email-cloud/models/requests/convert_email_request_data.rb +13 -6
- data/lib/aspose-email-cloud/models/requests/copy_file_request_data.rb +28 -12
- data/lib/aspose-email-cloud/models/requests/copy_folder_request_data.rb +23 -10
- data/lib/aspose-email-cloud/models/requests/create_calendar_request_data.rb +13 -6
- data/lib/aspose-email-cloud/models/requests/create_contact_request_data.rb +18 -8
- data/lib/aspose-email-cloud/models/requests/create_email_folder_request_data.rb +7 -3
- data/lib/aspose-email-cloud/models/requests/create_email_request_data.rb +14 -7
- data/lib/aspose-email-cloud/models/requests/create_folder_request_data.rb +12 -5
- data/lib/aspose-email-cloud/models/requests/create_mapi_request_data.rb +13 -6
- data/lib/aspose-email-cloud/models/requests/delete_calendar_property_request_data.rb +23 -10
- data/lib/aspose-email-cloud/models/requests/delete_contact_property_request_data.rb +28 -12
- data/lib/aspose-email-cloud/models/requests/delete_email_folder_request_data.rb +7 -3
- data/lib/aspose-email-cloud/models/requests/delete_email_message_request_data.rb +7 -3
- data/lib/aspose-email-cloud/models/requests/delete_file_request_data.rb +17 -7
- data/lib/aspose-email-cloud/models/requests/delete_folder_request_data.rb +17 -7
- data/lib/aspose-email-cloud/models/requests/delete_mapi_attachment_request_data.rb +18 -8
- data/lib/aspose-email-cloud/models/requests/delete_mapi_properties_request_data.rb +13 -6
- data/lib/aspose-email-cloud/models/requests/discover_email_config_oauth_request_data.rb +79 -0
- data/lib/aspose-email-cloud/models/requests/discover_email_config_password_request_data.rb +79 -0
- data/lib/aspose-email-cloud/models/requests/discover_email_config_request_data.rb +86 -0
- data/lib/aspose-email-cloud/models/requests/download_file_request_data.rb +17 -7
- data/lib/aspose-email-cloud/models/requests/fetch_email_message_request_data.rb +28 -12
- data/lib/aspose-email-cloud/models/requests/fetch_email_model_request_data.rb +28 -12
- data/lib/aspose-email-cloud/models/requests/get_calendar_attachment_request_data.rb +23 -10
- data/lib/aspose-email-cloud/models/requests/get_calendar_list_request_data.rb +24 -11
- data/lib/aspose-email-cloud/models/requests/get_calendar_model_as_alternate_request_data.rb +27 -11
- data/lib/aspose-email-cloud/models/requests/get_calendar_model_list_request_data.rb +22 -9
- data/lib/aspose-email-cloud/models/requests/get_calendar_model_request_data.rb +17 -7
- data/lib/aspose-email-cloud/models/requests/get_calendar_request_data.rb +17 -7
- data/lib/aspose-email-cloud/models/requests/get_contact_attachment_request_data.rb +28 -12
- data/lib/aspose-email-cloud/models/requests/get_contact_list_request_data.rb +27 -11
- data/lib/aspose-email-cloud/models/requests/get_contact_model_list_request_data.rb +27 -11
- data/lib/aspose-email-cloud/models/requests/get_contact_model_request_data.rb +22 -9
- data/lib/aspose-email-cloud/models/requests/get_contact_properties_request_data.rb +22 -9
- data/lib/aspose-email-cloud/models/requests/get_disc_usage_request_data.rb +6 -2
- data/lib/aspose-email-cloud/models/requests/get_email_as_file_request_data.rb +23 -10
- data/lib/aspose-email-cloud/models/requests/get_email_attachment_request_data.rb +23 -10
- data/lib/aspose-email-cloud/models/requests/get_email_model_list_request_data.rb +27 -11
- data/lib/aspose-email-cloud/models/requests/get_email_model_request_data.rb +22 -9
- data/lib/aspose-email-cloud/models/requests/get_email_property_request_data.rb +22 -9
- data/lib/aspose-email-cloud/models/requests/get_email_request_data.rb +17 -7
- data/lib/aspose-email-cloud/models/requests/get_file_versions_request_data.rb +12 -5
- data/lib/aspose-email-cloud/models/requests/get_files_list_request_data.rb +12 -5
- data/lib/aspose-email-cloud/models/requests/get_mapi_attachment_request_data.rb +23 -10
- data/lib/aspose-email-cloud/models/requests/get_mapi_attachments_request_data.rb +17 -7
- data/lib/aspose-email-cloud/models/requests/get_mapi_list_request_data.rb +21 -8
- data/lib/aspose-email-cloud/models/requests/get_mapi_properties_request_data.rb +17 -7
- data/lib/aspose-email-cloud/models/requests/list_email_folders_request_data.rb +27 -11
- data/lib/aspose-email-cloud/models/requests/list_email_messages_request_data.rb +39 -17
- data/lib/aspose-email-cloud/models/requests/list_email_models_request_data.rb +39 -17
- data/lib/aspose-email-cloud/models/requests/move_file_request_data.rb +28 -12
- data/lib/aspose-email-cloud/models/requests/move_folder_request_data.rb +23 -10
- data/lib/aspose-email-cloud/models/requests/object_exists_request_data.rb +17 -7
- data/lib/aspose-email-cloud/models/requests/save_calendar_model_request_data.rb +13 -6
- data/lib/aspose-email-cloud/models/requests/save_contact_model_request_data.rb +18 -8
- data/lib/aspose-email-cloud/models/requests/save_email_model_request_data.rb +18 -8
- data/lib/aspose-email-cloud/models/requests/save_mail_account_request_data.rb +7 -3
- data/lib/aspose-email-cloud/models/requests/save_mail_o_auth_account_request_data.rb +7 -3
- data/lib/aspose-email-cloud/models/requests/send_email_mime_request_data.rb +7 -3
- data/lib/aspose-email-cloud/models/requests/send_email_model_request_data.rb +7 -3
- data/lib/aspose-email-cloud/models/requests/send_email_request_data.rb +7 -3
- data/lib/aspose-email-cloud/models/requests/set_email_property_request_data.rb +18 -8
- data/lib/aspose-email-cloud/models/requests/set_email_read_flag_request_data.rb +7 -3
- data/lib/aspose-email-cloud/models/requests/storage_exists_request_data.rb +7 -3
- data/lib/aspose-email-cloud/models/requests/update_calendar_properties_request_data.rb +13 -6
- data/lib/aspose-email-cloud/models/requests/update_contact_properties_request_data.rb +18 -8
- data/lib/aspose-email-cloud/models/requests/update_mapi_properties_request_data.rb +13 -6
- data/lib/aspose-email-cloud/models/requests/upload_file_request_data.rb +18 -8
- data/lib/aspose-email-cloud/version.rb +1 -1
- metadata +12 -2
@@ -32,34 +32,44 @@ module AsposeEmailCloud
|
|
32
32
|
# Request model for delete_mapi_attachment operation.
|
33
33
|
class DeleteMapiAttachmentRequestData < EmailRequest
|
34
34
|
|
35
|
+
# Document file name
|
36
|
+
# @return [String]
|
37
|
+
attr_accessor :name
|
38
|
+
# Attachment name or index
|
39
|
+
# @return [String]
|
40
|
+
attr_accessor :attachment
|
41
|
+
# Document file storage location info
|
42
|
+
# @return [StorageFolderLocation]
|
43
|
+
attr_accessor :storage
|
44
|
+
|
35
45
|
# Remove attachment from document
|
36
46
|
# @param [String] name Document file name
|
37
47
|
# @param [String] attachment Attachment name or index
|
38
48
|
# @param [StorageFolderLocation] storage Document file storage location info
|
39
49
|
def initialize(name, attachment, storage)
|
40
|
-
|
41
|
-
|
42
|
-
|
50
|
+
self.name = name if name
|
51
|
+
self.attachment = attachment if attachment
|
52
|
+
self.storage = storage if storage
|
43
53
|
end
|
44
54
|
|
45
55
|
def to_http_info(api_client)
|
46
56
|
# verify the required parameter 'name' is set
|
47
|
-
if api_client.config.client_side_validation &&
|
57
|
+
if api_client.config.client_side_validation && self.name.nil?
|
48
58
|
raise ArgumentError, "Missing the required parameter 'name' when calling EmailApi.delete_mapi_attachment"
|
49
59
|
end
|
50
60
|
|
51
61
|
# verify the required parameter 'attachment' is set
|
52
|
-
if api_client.config.client_side_validation &&
|
62
|
+
if api_client.config.client_side_validation && self.attachment.nil?
|
53
63
|
raise ArgumentError, "Missing the required parameter 'attachment' when calling EmailApi.delete_mapi_attachment"
|
54
64
|
end
|
55
65
|
|
56
66
|
# verify the required parameter 'storage' is set
|
57
|
-
if api_client.config.client_side_validation &&
|
67
|
+
if api_client.config.client_side_validation && self.storage.nil?
|
58
68
|
raise ArgumentError, "Missing the required parameter 'storage' when calling EmailApi.delete_mapi_attachment"
|
59
69
|
end
|
60
70
|
|
61
71
|
# resource path
|
62
|
-
local_var_path = '/email/Mapi/{name}/attachments/{attachment}'.sub('{' + 'name' + '}',
|
72
|
+
local_var_path = '/email/Mapi/{name}/attachments/{attachment}'.sub('{' + 'name' + '}', self.name.to_s).sub('{' + 'attachment' + '}', self.attachment.to_s)
|
63
73
|
|
64
74
|
# query parameters
|
65
75
|
query_params = {}
|
@@ -68,7 +78,7 @@ module AsposeEmailCloud
|
|
68
78
|
form_params = {}
|
69
79
|
|
70
80
|
# http body (model)
|
71
|
-
post_body = api_client.object_to_http_body(
|
81
|
+
post_body = api_client.object_to_http_body(self.storage)
|
72
82
|
auth_names = ['JWT']
|
73
83
|
|
74
84
|
# header parameters
|
@@ -32,27 +32,34 @@ module AsposeEmailCloud
|
|
32
32
|
# Request model for delete_mapi_properties operation.
|
33
33
|
class DeleteMapiPropertiesRequestData < EmailRequest
|
34
34
|
|
35
|
+
# Document file name
|
36
|
+
# @return [String]
|
37
|
+
attr_accessor :name
|
38
|
+
# Properties that should be deleted
|
39
|
+
# @return [HierarchicalObjectRequest]
|
40
|
+
attr_accessor :request
|
41
|
+
|
35
42
|
# Delete document properties
|
36
43
|
# @param [String] name Document file name
|
37
44
|
# @param [HierarchicalObjectRequest] request Properties that should be deleted
|
38
45
|
def initialize(name, request)
|
39
|
-
|
40
|
-
|
46
|
+
self.name = name if name
|
47
|
+
self.request = request if request
|
41
48
|
end
|
42
49
|
|
43
50
|
def to_http_info(api_client)
|
44
51
|
# verify the required parameter 'name' is set
|
45
|
-
if api_client.config.client_side_validation &&
|
52
|
+
if api_client.config.client_side_validation && self.name.nil?
|
46
53
|
raise ArgumentError, "Missing the required parameter 'name' when calling EmailApi.delete_mapi_properties"
|
47
54
|
end
|
48
55
|
|
49
56
|
# verify the required parameter 'request' is set
|
50
|
-
if api_client.config.client_side_validation &&
|
57
|
+
if api_client.config.client_side_validation && self.request.nil?
|
51
58
|
raise ArgumentError, "Missing the required parameter 'request' when calling EmailApi.delete_mapi_properties"
|
52
59
|
end
|
53
60
|
|
54
61
|
# resource path
|
55
|
-
local_var_path = '/email/Mapi/{name}/properties'.sub('{' + 'name' + '}',
|
62
|
+
local_var_path = '/email/Mapi/{name}/properties'.sub('{' + 'name' + '}', self.name.to_s)
|
56
63
|
|
57
64
|
# query parameters
|
58
65
|
query_params = {}
|
@@ -61,7 +68,7 @@ module AsposeEmailCloud
|
|
61
68
|
form_params = {}
|
62
69
|
|
63
70
|
# http body (model)
|
64
|
-
post_body = api_client.object_to_http_body(
|
71
|
+
post_body = api_client.object_to_http_body(self.request)
|
65
72
|
auth_names = ['JWT']
|
66
73
|
|
67
74
|
# header parameters
|
@@ -0,0 +1,79 @@
|
|
1
|
+
|
2
|
+
# ----------------------------------------------------------------------------
|
3
|
+
# <copyright company="Aspose" file="discover_email_config_oauth_request_data.rb">
|
4
|
+
# Copyright (c) 2018-2019 Aspose Pty Ltd. All rights reserved.
|
5
|
+
# </copyright>
|
6
|
+
# <summary>
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a
|
8
|
+
# copy of this software and associated documentation files (the "Software"),
|
9
|
+
# to deal in the Software without restriction, including without limitation
|
10
|
+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
11
|
+
# and/or sell copies of the Software, and to permit persons to whom the
|
12
|
+
# Software is furnished to do so, subject to the following conditions:
|
13
|
+
#
|
14
|
+
# The above copyright notice and this permission notice shall be included in
|
15
|
+
# all copies or substantial portions of the Software.
|
16
|
+
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
22
|
+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
23
|
+
# DEALINGS IN THE SOFTWARE.
|
24
|
+
# </summary>
|
25
|
+
# ----------------------------------------------------------------------------
|
26
|
+
|
27
|
+
|
28
|
+
require_relative './email_request'
|
29
|
+
require_relative './http_request'
|
30
|
+
|
31
|
+
module AsposeEmailCloud
|
32
|
+
# Request model for discover_email_config_oauth operation.
|
33
|
+
class DiscoverEmailConfigOauthRequestData < EmailRequest
|
34
|
+
|
35
|
+
# Discover email configuration request.
|
36
|
+
# @return [DiscoverEmailConfigOauth]
|
37
|
+
attr_accessor :rq
|
38
|
+
|
39
|
+
# Discover email accounts by email address. Validates discovered accounts using OAuth 2.0.
|
40
|
+
# @param [DiscoverEmailConfigOauth] rq Discover email configuration request.
|
41
|
+
def initialize(rq)
|
42
|
+
self.rq = rq if rq
|
43
|
+
end
|
44
|
+
|
45
|
+
def to_http_info(api_client)
|
46
|
+
# verify the required parameter 'rq' is set
|
47
|
+
if api_client.config.client_side_validation && self.rq.nil?
|
48
|
+
raise ArgumentError, "Missing the required parameter 'rq' when calling EmailApi.discover_email_config_oauth"
|
49
|
+
end
|
50
|
+
|
51
|
+
# resource path
|
52
|
+
local_var_path = '/email/config/discover/oauth'
|
53
|
+
|
54
|
+
# query parameters
|
55
|
+
query_params = {}
|
56
|
+
|
57
|
+
# form parameters
|
58
|
+
form_params = {}
|
59
|
+
|
60
|
+
# http body (model)
|
61
|
+
post_body = api_client.object_to_http_body(self.rq)
|
62
|
+
auth_names = ['JWT']
|
63
|
+
|
64
|
+
# header parameters
|
65
|
+
header_params = {}
|
66
|
+
# HTTP header 'Accept' (if needed)
|
67
|
+
header_params['Accept'] = select_header_accept(['application/json'])
|
68
|
+
# HTTP header 'Content-Type'
|
69
|
+
header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['application/json'])
|
70
|
+
|
71
|
+
AsposeEmailCloud::HttpRequest.new(local_var_path,
|
72
|
+
header_params,
|
73
|
+
query_params,
|
74
|
+
form_params,
|
75
|
+
post_body,
|
76
|
+
auth_names)
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
@@ -0,0 +1,79 @@
|
|
1
|
+
|
2
|
+
# ----------------------------------------------------------------------------
|
3
|
+
# <copyright company="Aspose" file="discover_email_config_password_request_data.rb">
|
4
|
+
# Copyright (c) 2018-2019 Aspose Pty Ltd. All rights reserved.
|
5
|
+
# </copyright>
|
6
|
+
# <summary>
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a
|
8
|
+
# copy of this software and associated documentation files (the "Software"),
|
9
|
+
# to deal in the Software without restriction, including without limitation
|
10
|
+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
11
|
+
# and/or sell copies of the Software, and to permit persons to whom the
|
12
|
+
# Software is furnished to do so, subject to the following conditions:
|
13
|
+
#
|
14
|
+
# The above copyright notice and this permission notice shall be included in
|
15
|
+
# all copies or substantial portions of the Software.
|
16
|
+
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
22
|
+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
23
|
+
# DEALINGS IN THE SOFTWARE.
|
24
|
+
# </summary>
|
25
|
+
# ----------------------------------------------------------------------------
|
26
|
+
|
27
|
+
|
28
|
+
require_relative './email_request'
|
29
|
+
require_relative './http_request'
|
30
|
+
|
31
|
+
module AsposeEmailCloud
|
32
|
+
# Request model for discover_email_config_password operation.
|
33
|
+
class DiscoverEmailConfigPasswordRequestData < EmailRequest
|
34
|
+
|
35
|
+
# Discover email configuration request.
|
36
|
+
# @return [DiscoverEmailConfigPassword]
|
37
|
+
attr_accessor :rq
|
38
|
+
|
39
|
+
# Discover email accounts by email address. Validates discovered accounts using login and password.
|
40
|
+
# @param [DiscoverEmailConfigPassword] rq Discover email configuration request.
|
41
|
+
def initialize(rq)
|
42
|
+
self.rq = rq if rq
|
43
|
+
end
|
44
|
+
|
45
|
+
def to_http_info(api_client)
|
46
|
+
# verify the required parameter 'rq' is set
|
47
|
+
if api_client.config.client_side_validation && self.rq.nil?
|
48
|
+
raise ArgumentError, "Missing the required parameter 'rq' when calling EmailApi.discover_email_config_password"
|
49
|
+
end
|
50
|
+
|
51
|
+
# resource path
|
52
|
+
local_var_path = '/email/config/discover/password'
|
53
|
+
|
54
|
+
# query parameters
|
55
|
+
query_params = {}
|
56
|
+
|
57
|
+
# form parameters
|
58
|
+
form_params = {}
|
59
|
+
|
60
|
+
# http body (model)
|
61
|
+
post_body = api_client.object_to_http_body(self.rq)
|
62
|
+
auth_names = ['JWT']
|
63
|
+
|
64
|
+
# header parameters
|
65
|
+
header_params = {}
|
66
|
+
# HTTP header 'Accept' (if needed)
|
67
|
+
header_params['Accept'] = select_header_accept(['application/json'])
|
68
|
+
# HTTP header 'Content-Type'
|
69
|
+
header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['application/json'])
|
70
|
+
|
71
|
+
AsposeEmailCloud::HttpRequest.new(local_var_path,
|
72
|
+
header_params,
|
73
|
+
query_params,
|
74
|
+
form_params,
|
75
|
+
post_body,
|
76
|
+
auth_names)
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
@@ -0,0 +1,86 @@
|
|
1
|
+
|
2
|
+
# ----------------------------------------------------------------------------
|
3
|
+
# <copyright company="Aspose" file="discover_email_config_request_data.rb">
|
4
|
+
# Copyright (c) 2018-2019 Aspose Pty Ltd. All rights reserved.
|
5
|
+
# </copyright>
|
6
|
+
# <summary>
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a
|
8
|
+
# copy of this software and associated documentation files (the "Software"),
|
9
|
+
# to deal in the Software without restriction, including without limitation
|
10
|
+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
11
|
+
# and/or sell copies of the Software, and to permit persons to whom the
|
12
|
+
# Software is furnished to do so, subject to the following conditions:
|
13
|
+
#
|
14
|
+
# The above copyright notice and this permission notice shall be included in
|
15
|
+
# all copies or substantial portions of the Software.
|
16
|
+
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
22
|
+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
23
|
+
# DEALINGS IN THE SOFTWARE.
|
24
|
+
# </summary>
|
25
|
+
# ----------------------------------------------------------------------------
|
26
|
+
|
27
|
+
|
28
|
+
require_relative './email_request'
|
29
|
+
require_relative './http_request'
|
30
|
+
|
31
|
+
module AsposeEmailCloud
|
32
|
+
# Request model for discover_email_config operation.
|
33
|
+
class DiscoverEmailConfigRequestData < EmailRequest
|
34
|
+
|
35
|
+
# Email address
|
36
|
+
# @return [String]
|
37
|
+
attr_accessor :address
|
38
|
+
# Turns on fast processing. All discover systems will run in parallel. First discovered result will be returned
|
39
|
+
# @return [BOOLEAN]
|
40
|
+
attr_accessor :fast_processing
|
41
|
+
|
42
|
+
# Discover email accounts by email address. Does not validate discovered accounts.
|
43
|
+
# @param [String] address Email address
|
44
|
+
# @param [BOOLEAN] fast_processing Turns on fast processing. All discover systems will run in parallel. First discovered result will be returned
|
45
|
+
def initialize(address, fast_processing = nil)
|
46
|
+
self.address = address if address
|
47
|
+
self.fast_processing = fast_processing if fast_processing
|
48
|
+
end
|
49
|
+
|
50
|
+
def to_http_info(api_client)
|
51
|
+
# verify the required parameter 'address' is set
|
52
|
+
if api_client.config.client_side_validation && self.address.nil?
|
53
|
+
raise ArgumentError, "Missing the required parameter 'address' when calling EmailApi.discover_email_config"
|
54
|
+
end
|
55
|
+
|
56
|
+
# resource path
|
57
|
+
local_var_path = '/email/config/discover'
|
58
|
+
|
59
|
+
# query parameters
|
60
|
+
query_params = {}
|
61
|
+
query_params[:address] = self.address
|
62
|
+
query_params[:fastProcessing] = self.fast_processing unless self.fast_processing.nil?
|
63
|
+
|
64
|
+
# form parameters
|
65
|
+
form_params = {}
|
66
|
+
|
67
|
+
# http body (model)
|
68
|
+
post_body = nil
|
69
|
+
auth_names = ['JWT']
|
70
|
+
|
71
|
+
# header parameters
|
72
|
+
header_params = {}
|
73
|
+
# HTTP header 'Accept' (if needed)
|
74
|
+
header_params['Accept'] = select_header_accept(['application/json'])
|
75
|
+
# HTTP header 'Content-Type'
|
76
|
+
header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['application/json'])
|
77
|
+
|
78
|
+
AsposeEmailCloud::HttpRequest.new(local_var_path,
|
79
|
+
header_params,
|
80
|
+
query_params,
|
81
|
+
form_params,
|
82
|
+
post_body,
|
83
|
+
auth_names)
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
@@ -32,29 +32,39 @@ module AsposeEmailCloud
|
|
32
32
|
# Request model for download_file operation.
|
33
33
|
class DownloadFileRequestData < EmailRequest
|
34
34
|
|
35
|
+
# File path e.g. '/folder/file.ext'
|
36
|
+
# @return [String]
|
37
|
+
attr_accessor :path
|
38
|
+
# Storage name
|
39
|
+
# @return [String]
|
40
|
+
attr_accessor :storage_name
|
41
|
+
# File version ID to download
|
42
|
+
# @return [String]
|
43
|
+
attr_accessor :version_id
|
44
|
+
|
35
45
|
# Download file
|
36
46
|
# @param [String] path File path e.g. '/folder/file.ext'
|
37
47
|
# @param [String] storage_name Storage name
|
38
48
|
# @param [String] version_id File version ID to download
|
39
49
|
def initialize(path, storage_name = nil, version_id = nil)
|
40
|
-
|
41
|
-
|
42
|
-
|
50
|
+
self.path = path if path
|
51
|
+
self.storage_name = storage_name if storage_name
|
52
|
+
self.version_id = version_id if version_id
|
43
53
|
end
|
44
54
|
|
45
55
|
def to_http_info(api_client)
|
46
56
|
# verify the required parameter 'path' is set
|
47
|
-
if api_client.config.client_side_validation &&
|
57
|
+
if api_client.config.client_side_validation && self.path.nil?
|
48
58
|
raise ArgumentError, "Missing the required parameter 'path' when calling EmailApi.download_file"
|
49
59
|
end
|
50
60
|
|
51
61
|
# resource path
|
52
|
-
local_var_path = '/email/storage/file/{path}'.sub('{' + 'path' + '}',
|
62
|
+
local_var_path = '/email/storage/file/{path}'.sub('{' + 'path' + '}', self.path.to_s)
|
53
63
|
|
54
64
|
# query parameters
|
55
65
|
query_params = {}
|
56
|
-
query_params[:storageName] =
|
57
|
-
query_params[:versionId] =
|
66
|
+
query_params[:storageName] = self.storage_name unless self.storage_name.nil?
|
67
|
+
query_params[:versionId] = self.version_id unless self.version_id.nil?
|
58
68
|
|
59
69
|
# form parameters
|
60
70
|
form_params = {}
|
@@ -32,6 +32,22 @@ module AsposeEmailCloud
|
|
32
32
|
# Request model for fetch_email_message operation.
|
33
33
|
class FetchEmailMessageRequestData < EmailRequest
|
34
34
|
|
35
|
+
# Message identifier
|
36
|
+
# @return [String]
|
37
|
+
attr_accessor :message_id
|
38
|
+
# Email account
|
39
|
+
# @return [String]
|
40
|
+
attr_accessor :first_account
|
41
|
+
# Additional email account (should be specified for POP/IMAP accounts and should be SMTP account)
|
42
|
+
# @return [String]
|
43
|
+
attr_accessor :second_account
|
44
|
+
# Storage name where account file(s) located
|
45
|
+
# @return [String]
|
46
|
+
attr_accessor :storage
|
47
|
+
# Folder in storage where account file(s) located
|
48
|
+
# @return [String]
|
49
|
+
attr_accessor :storage_folder
|
50
|
+
|
35
51
|
# Fetch message mime from email account
|
36
52
|
# @param [String] message_id Message identifier
|
37
53
|
# @param [String] first_account Email account
|
@@ -39,21 +55,21 @@ module AsposeEmailCloud
|
|
39
55
|
# @param [String] storage Storage name where account file(s) located
|
40
56
|
# @param [String] storage_folder Folder in storage where account file(s) located
|
41
57
|
def initialize(message_id, first_account, second_account = nil, storage = nil, storage_folder = nil)
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
58
|
+
self.message_id = message_id if message_id
|
59
|
+
self.first_account = first_account if first_account
|
60
|
+
self.second_account = second_account if second_account
|
61
|
+
self.storage = storage if storage
|
62
|
+
self.storage_folder = storage_folder if storage_folder
|
47
63
|
end
|
48
64
|
|
49
65
|
def to_http_info(api_client)
|
50
66
|
# verify the required parameter 'message_id' is set
|
51
|
-
if api_client.config.client_side_validation &&
|
67
|
+
if api_client.config.client_side_validation && self.message_id.nil?
|
52
68
|
raise ArgumentError, "Missing the required parameter 'message_id' when calling EmailApi.fetch_email_message"
|
53
69
|
end
|
54
70
|
|
55
71
|
# verify the required parameter 'first_account' is set
|
56
|
-
if api_client.config.client_side_validation &&
|
72
|
+
if api_client.config.client_side_validation && self.first_account.nil?
|
57
73
|
raise ArgumentError, "Missing the required parameter 'first_account' when calling EmailApi.fetch_email_message"
|
58
74
|
end
|
59
75
|
|
@@ -62,11 +78,11 @@ module AsposeEmailCloud
|
|
62
78
|
|
63
79
|
# query parameters
|
64
80
|
query_params = {}
|
65
|
-
query_params[:messageId] =
|
66
|
-
query_params[:firstAccount] =
|
67
|
-
query_params[:secondAccount] =
|
68
|
-
query_params[:storage] =
|
69
|
-
query_params[:storageFolder] =
|
81
|
+
query_params[:messageId] = self.message_id
|
82
|
+
query_params[:firstAccount] = self.first_account
|
83
|
+
query_params[:secondAccount] = self.second_account unless self.second_account.nil?
|
84
|
+
query_params[:storage] = self.storage unless self.storage.nil?
|
85
|
+
query_params[:storageFolder] = self.storage_folder unless self.storage_folder.nil?
|
70
86
|
|
71
87
|
# form parameters
|
72
88
|
form_params = {}
|