aspose_email_cloud 18.7.0 → 19.11.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 +145 -0
- data/lib/aspose-email-cloud/api/email_api.rb +577 -0
- data/{src/asposeemailcloud → lib/aspose-email-cloud}/api_client.rb +125 -133
- data/lib/aspose-email-cloud/api_error.rb +42 -0
- data/{src/asposeemailcloud → lib/aspose-email-cloud}/configuration.rb +56 -43
- data/lib/aspose-email-cloud/models/account_base_request.rb +250 -0
- data/lib/aspose-email-cloud/models/add_attachment_request.rb +219 -0
- data/lib/aspose-email-cloud/models/append_email_account_base_request.rb +300 -0
- data/lib/aspose-email-cloud/models/append_email_base_request.rb +316 -0
- data/lib/aspose-email-cloud/models/append_email_mime_base_request.rb +335 -0
- data/lib/aspose-email-cloud/models/base_object.rb +225 -0
- data/lib/aspose-email-cloud/models/contact_format.rb +45 -0
- data/lib/aspose-email-cloud/models/create_email_request.rb +224 -0
- data/lib/aspose-email-cloud/models/create_folder_base_request.rb +297 -0
- data/lib/aspose-email-cloud/models/delete_folder_base_request.rb +302 -0
- data/lib/aspose-email-cloud/models/delete_message_base_request.rb +302 -0
- data/lib/aspose-email-cloud/models/disc_usage.rb +229 -0
- data/lib/aspose-email-cloud/models/email_account_request.rb +342 -0
- data/lib/aspose-email-cloud/models/email_document.rb +226 -0
- data/{src/asposeemailcloud → lib/aspose-email-cloud}/models/email_document_response.rb +105 -109
- data/{src/asposeemailcloud → lib/aspose-email-cloud}/models/email_properties.rb +122 -97
- data/lib/aspose-email-cloud/models/email_property.rb +256 -0
- data/{src/asposeemailcloud → lib/aspose-email-cloud}/models/email_property_response.rb +105 -109
- data/lib/aspose-email-cloud/models/error.rb +241 -0
- data/lib/aspose-email-cloud/models/error_details.rb +224 -0
- data/lib/aspose-email-cloud/models/file_version.rb +289 -0
- data/lib/aspose-email-cloud/models/file_versions.rb +210 -0
- data/lib/aspose-email-cloud/models/files_list.rb +210 -0
- data/lib/aspose-email-cloud/models/files_upload_result.rb +223 -0
- data/lib/aspose-email-cloud/models/hierarchical_object.rb +238 -0
- data/lib/aspose-email-cloud/models/hierarchical_object_request.rb +224 -0
- data/lib/aspose-email-cloud/models/hierarchical_object_response.rb +219 -0
- data/lib/aspose-email-cloud/models/indexed_hierarchical_object.rb +254 -0
- data/lib/aspose-email-cloud/models/indexed_primitive_object.rb +252 -0
- data/{src/asposeemailcloud → lib/aspose-email-cloud}/models/link.rb +138 -116
- data/lib/aspose-email-cloud/models/list_response_of_hierarchical_object_response.rb +208 -0
- data/{src/asposeemailcloud/models/email_document.rb → lib/aspose-email-cloud/models/list_response_of_mail_server_folder.rb} +105 -98
- data/{src/asposeemailcloud/models/list_folders_response.rb → lib/aspose-email-cloud/models/list_response_of_string.rb} +105 -111
- data/{src/asposeemailcloud → lib/aspose-email-cloud}/models/mail_server_folder.rb +116 -96
- data/{src/asposeemailcloud → lib/aspose-email-cloud}/models/mime_response.rb +105 -109
- data/lib/aspose-email-cloud/models/object_exist.rb +229 -0
- data/lib/aspose-email-cloud/models/primitive_object.rb +236 -0
- data/lib/aspose-email-cloud/models/requests/add_calendar_attachment_request_data.rb +89 -0
- data/lib/aspose-email-cloud/models/requests/add_contact_attachment_request_data.rb +101 -0
- data/lib/aspose-email-cloud/models/requests/add_email_attachment_request_data.rb +89 -0
- data/lib/aspose-email-cloud/models/requests/add_mapi_attachment_request_data.rb +89 -0
- data/lib/aspose-email-cloud/models/requests/append_email_message_request_data.rb +75 -0
- data/lib/aspose-email-cloud/models/requests/append_mime_message_request_data.rb +75 -0
- data/lib/aspose-email-cloud/models/requests/copy_file_request_data.rb +92 -0
- data/lib/aspose-email-cloud/models/requests/copy_folder_request_data.rb +89 -0
- data/lib/aspose-email-cloud/models/requests/create_calendar_request_data.rb +82 -0
- data/lib/aspose-email-cloud/models/requests/create_contact_request_data.rb +94 -0
- data/lib/aspose-email-cloud/models/requests/create_email_folder_request_data.rb +75 -0
- data/lib/aspose-email-cloud/models/requests/create_email_request_data.rb +82 -0
- data/lib/aspose-email-cloud/models/requests/create_folder_request_data.rb +78 -0
- data/lib/aspose-email-cloud/models/requests/create_mapi_request_data.rb +82 -0
- data/lib/aspose-email-cloud/models/requests/delete_calendar_property_request_data.rb +96 -0
- data/lib/aspose-email-cloud/models/requests/delete_contact_property_request_data.rb +108 -0
- data/lib/aspose-email-cloud/models/requests/delete_email_folder_request_data.rb +75 -0
- data/lib/aspose-email-cloud/models/requests/delete_email_message_request_data.rb +75 -0
- data/lib/aspose-email-cloud/models/requests/delete_file_request_data.rb +81 -0
- data/lib/aspose-email-cloud/models/requests/delete_folder_request_data.rb +81 -0
- data/lib/aspose-email-cloud/models/requests/delete_mapi_attachment_request_data.rb +89 -0
- data/lib/aspose-email-cloud/models/requests/delete_mapi_properties_request_data.rb +82 -0
- data/lib/aspose-email-cloud/models/requests/download_file_request_data.rb +81 -0
- data/lib/aspose-email-cloud/models/requests/email_request.rb +75 -0
- data/lib/aspose-email-cloud/models/requests/fetch_email_message_request_data.rb +93 -0
- data/lib/aspose-email-cloud/models/requests/get_calendar_attachment_request_data.rb +88 -0
- data/lib/aspose-email-cloud/models/requests/get_calendar_list_request_data.rb +95 -0
- data/lib/aspose-email-cloud/models/requests/get_calendar_request_data.rb +81 -0
- data/lib/aspose-email-cloud/models/requests/get_contact_attachment_request_data.rb +100 -0
- data/lib/aspose-email-cloud/models/requests/get_contact_list_request_data.rb +92 -0
- data/lib/aspose-email-cloud/models/requests/get_contact_properties_request_data.rb +93 -0
- data/lib/aspose-email-cloud/models/requests/get_disc_usage_request_data.rb +71 -0
- data/lib/aspose-email-cloud/models/requests/get_email_attachment_request_data.rb +88 -0
- data/lib/aspose-email-cloud/models/requests/get_email_property_request_data.rb +88 -0
- data/lib/aspose-email-cloud/models/requests/get_email_request_data.rb +81 -0
- data/lib/aspose-email-cloud/models/requests/get_file_versions_request_data.rb +78 -0
- data/lib/aspose-email-cloud/models/requests/get_files_list_request_data.rb +78 -0
- data/lib/aspose-email-cloud/models/requests/get_mapi_attachment_request_data.rb +88 -0
- data/lib/aspose-email-cloud/models/requests/get_mapi_attachments_request_data.rb +81 -0
- data/lib/aspose-email-cloud/models/requests/get_mapi_list_request_data.rb +80 -0
- data/lib/aspose-email-cloud/models/requests/get_mapi_properties_request_data.rb +81 -0
- data/lib/aspose-email-cloud/models/requests/http_request.rb +51 -0
- data/lib/aspose-email-cloud/models/requests/list_email_folders_request_data.rb +88 -0
- data/lib/aspose-email-cloud/models/requests/list_email_messages_request_data.rb +105 -0
- data/lib/aspose-email-cloud/models/requests/move_file_request_data.rb +92 -0
- data/lib/aspose-email-cloud/models/requests/move_folder_request_data.rb +89 -0
- data/lib/aspose-email-cloud/models/requests/object_exists_request_data.rb +81 -0
- data/lib/aspose-email-cloud/models/requests/save_mail_account_request_data.rb +75 -0
- data/lib/aspose-email-cloud/models/requests/save_mail_o_auth_account_request_data.rb +75 -0
- data/lib/aspose-email-cloud/models/requests/send_email_mime_request_data.rb +75 -0
- data/lib/aspose-email-cloud/models/requests/send_email_request_data.rb +75 -0
- data/lib/aspose-email-cloud/models/requests/set_email_property_request_data.rb +89 -0
- data/lib/aspose-email-cloud/models/requests/set_email_read_flag_request_data.rb +75 -0
- data/lib/aspose-email-cloud/models/requests/storage_exists_request_data.rb +75 -0
- data/lib/aspose-email-cloud/models/requests/update_calendar_properties_request_data.rb +82 -0
- data/lib/aspose-email-cloud/models/requests/update_contact_properties_request_data.rb +94 -0
- data/lib/aspose-email-cloud/models/requests/update_mapi_properties_request_data.rb +82 -0
- data/lib/aspose-email-cloud/models/requests/upload_file_request_data.rb +87 -0
- data/lib/aspose-email-cloud/models/save_email_account_request.rb +377 -0
- data/lib/aspose-email-cloud/models/save_o_auth_email_account_request.rb +447 -0
- data/lib/aspose-email-cloud/models/send_email_base_request.rb +267 -0
- data/lib/aspose-email-cloud/models/send_email_mime_base_request.rb +286 -0
- data/lib/aspose-email-cloud/models/set_email_property_request.rb +224 -0
- data/lib/aspose-email-cloud/models/set_message_read_flag_account_base_request.rb +302 -0
- data/{src/asposeemailcloud/models/email_property.rb → lib/aspose-email-cloud/models/storage_exist.rb} +110 -96
- data/lib/aspose-email-cloud/models/storage_file.rb +262 -0
- data/lib/aspose-email-cloud/models/storage_file_location.rb +254 -0
- data/lib/aspose-email-cloud/models/storage_folder_location.rb +219 -0
- data/{src/asposeemailcloud/models/list_response.rb → lib/aspose-email-cloud/models/value_response.rb} +105 -111
- data/{src/asposeemailcloud → lib/aspose-email-cloud}/version.rb +4 -4
- metadata +128 -38
- data/src/asposeemailcloud.rb +0 -55
- data/src/asposeemailcloud/api/email_api.rb +0 -418
- data/src/asposeemailcloud/api/email_client_api.rb +0 -960
- data/src/asposeemailcloud/api_error.rb +0 -38
- data/src/asposeemailcloud/models/http_status_code.rb +0 -76
- data/src/asposeemailcloud/models/protocol_type.rb +0 -34
- data/src/asposeemailcloud/models/saa_spose_response.rb +0 -202
- data/src/asposeemailcloud/models/security_options.rb +0 -33
@@ -1,109 +1,129 @@
|
|
1
|
-
|
2
|
-
#Aspose.
|
1
|
+
# ----------------------------------------------------------------------------
|
2
|
+
# <copyright company="Aspose" file="MailServerFolder.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
|
+
# ----------------------------------------------------------------------------
|
3
25
|
|
4
|
-
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
-
|
6
|
-
OpenAPI spec version: 1.1
|
7
|
-
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: unset
|
10
|
-
|
11
|
-
=end
|
12
26
|
|
13
27
|
require 'date'
|
14
28
|
|
15
|
-
module
|
16
|
-
|
17
|
-
class MailServerFolder
|
18
|
-
# Gets or sets mail folder name
|
19
|
-
attr_accessor :name
|
20
|
-
|
21
|
-
# Gets or sets mail folder id
|
22
|
-
attr_accessor :id
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
:'
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
:'
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
#
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
29
|
+
module AsposeEmailCloud
|
30
|
+
# Email account folder
|
31
|
+
class MailServerFolder
|
32
|
+
# Gets or sets mail folder name
|
33
|
+
attr_accessor :name
|
34
|
+
|
35
|
+
# Gets or sets mail folder id
|
36
|
+
attr_accessor :id
|
37
|
+
|
38
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
39
|
+
def self.attribute_map
|
40
|
+
{
|
41
|
+
:'name' => :'name',
|
42
|
+
:'id' => :'id'
|
43
|
+
}
|
44
|
+
end
|
45
|
+
|
46
|
+
# Attribute type mapping.
|
47
|
+
def self.swagger_types
|
48
|
+
{
|
49
|
+
:'name' => :'String',
|
50
|
+
:'id' => :'String'
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
# Initializes the object
|
55
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
56
|
+
def initialize(attributes = {})
|
57
|
+
return unless attributes.is_a?(Hash)
|
58
|
+
|
59
|
+
# convert string to symbol for hash key
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
61
|
+
|
62
|
+
if attributes.has_key?(:'name')
|
63
|
+
self.name = attributes[:'name']
|
64
|
+
end
|
65
|
+
|
66
|
+
if attributes.has_key?(:'id')
|
67
|
+
self.id = attributes[:'id']
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
# Initializes the object
|
72
|
+
def initialize(name=nil, id=nil)
|
73
|
+
self.name = name
|
74
|
+
self.id = id
|
75
|
+
end
|
76
|
+
|
77
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
78
|
+
# @return Array for valid properties with the reasons
|
79
|
+
def list_invalid_properties
|
80
|
+
invalid_properties = Array.new
|
81
|
+
invalid_properties
|
82
|
+
end
|
83
|
+
|
84
|
+
# Check to see if the all the properties in the model are valid
|
85
|
+
# @return true if the model is valid
|
86
|
+
def valid?
|
87
|
+
true
|
88
|
+
end
|
89
|
+
|
90
|
+
# Checks equality by comparing each attribute.
|
91
|
+
# @param [Object] Object to be compared
|
92
|
+
def ==(o)
|
93
|
+
return true if self.equal?(o)
|
94
|
+
self.class == o.class &&
|
95
|
+
name == o.name &&
|
96
|
+
id == o.id
|
97
|
+
end
|
98
|
+
|
99
|
+
# @see the `==` method
|
100
|
+
# @param [Object] Object to be compared
|
101
|
+
def eql?(o)
|
102
|
+
self == o
|
103
|
+
end
|
104
|
+
|
105
|
+
# Calculates hash code according to all attributes.
|
106
|
+
# @return [Fixnum] Hash code
|
107
|
+
def hash
|
108
|
+
[name, id].hash
|
109
|
+
end
|
110
|
+
|
93
111
|
# Builds the object from hash
|
94
112
|
# @param [Hash] attributes Model attributes in the form of hash
|
95
113
|
# @return [Object] Returns the model itself
|
96
114
|
def build_from_hash(attributes)
|
97
115
|
return nil unless attributes.is_a?(Hash)
|
98
116
|
self.class.swagger_types.each_pair do |key, type|
|
117
|
+
attribute_key = self.class.attribute_map[key]
|
118
|
+
attribute_key = (attribute_key[0, 1].downcase + attribute_key[1..-1]).to_sym
|
99
119
|
if type =~ /\AArray<(.*)>/i
|
100
120
|
# check to ensure the input is an array given that the the attribute
|
101
121
|
# is documented as an array but the input is not
|
102
|
-
if attributes[
|
103
|
-
self.send("#{key}=", attributes[
|
122
|
+
if attributes[attribute_key].is_a?(Array)
|
123
|
+
self.send("#{key}=", attributes[attribute_key].map { |v| _deserialize($1, v) })
|
104
124
|
end
|
105
|
-
elsif !attributes[
|
106
|
-
self.send("#{key}=", _deserialize(type, attributes[
|
125
|
+
elsif !attributes[attribute_key].nil?
|
126
|
+
self.send("#{key}=", _deserialize(type, attributes[attribute_key]))
|
107
127
|
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
108
128
|
end
|
109
129
|
|
@@ -147,7 +167,8 @@ module asposeemailcloud
|
|
147
167
|
end
|
148
168
|
end
|
149
169
|
else # model
|
150
|
-
|
170
|
+
type = value[:type] || type
|
171
|
+
temp_model = AsposeEmailCloud.const_get(type).new
|
151
172
|
temp_model.build_from_hash(value)
|
152
173
|
end
|
153
174
|
end
|
@@ -182,7 +203,7 @@ module asposeemailcloud
|
|
182
203
|
# @return [Hash] Returns the value in the form of hash
|
183
204
|
def _to_hash(value)
|
184
205
|
if value.is_a?(Array)
|
185
|
-
value.compact.map{ |v| _to_hash(v) }
|
206
|
+
value.compact.map { |v| _to_hash(v) }
|
186
207
|
elsif value.is_a?(Hash)
|
187
208
|
{}.tap do |hash|
|
188
209
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
@@ -193,7 +214,6 @@ module asposeemailcloud
|
|
193
214
|
value
|
194
215
|
end
|
195
216
|
end
|
196
|
-
|
217
|
+
|
197
218
|
end
|
198
|
-
|
199
219
|
end
|
@@ -1,122 +1,118 @@
|
|
1
|
-
|
2
|
-
#Aspose.
|
1
|
+
# ----------------------------------------------------------------------------
|
2
|
+
# <copyright company="Aspose" file="MimeResponse.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
|
+
# ----------------------------------------------------------------------------
|
3
25
|
|
4
|
-
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
-
|
6
|
-
OpenAPI spec version: 1.1
|
7
|
-
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: unset
|
10
|
-
|
11
|
-
=end
|
12
26
|
|
13
27
|
require 'date'
|
14
28
|
|
15
|
-
module
|
16
|
-
# Email document property DTO.
|
17
|
-
class MimeResponse
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
:'mime' => :'
|
32
|
-
}
|
33
|
-
end
|
34
|
-
|
35
|
-
#
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
}
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
end
|
65
|
-
|
66
|
-
#
|
67
|
-
# @
|
68
|
-
def
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
def ==(o)
|
87
|
-
return true if self.equal?(o)
|
88
|
-
self.class == o.class &&
|
89
|
-
code == o.code &&
|
90
|
-
status == o.status &&
|
91
|
-
mime == o.mime
|
92
|
-
end
|
93
|
-
|
94
|
-
# @see the `==` method
|
95
|
-
# @param [Object] Object to be compared
|
96
|
-
def eql?(o)
|
97
|
-
self == o
|
98
|
-
end
|
99
|
-
|
100
|
-
# Calculates hash code according to all attributes.
|
101
|
-
# @return [Fixnum] Hash code
|
102
|
-
def hash
|
103
|
-
[code, status, mime].hash
|
104
|
-
end
|
105
|
-
|
29
|
+
module AsposeEmailCloud
|
30
|
+
# Email document property DTO.
|
31
|
+
class MimeResponse
|
32
|
+
# Gets or sets base64 encoded mime content.
|
33
|
+
attr_accessor :mime
|
34
|
+
|
35
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
36
|
+
def self.attribute_map
|
37
|
+
{
|
38
|
+
:'mime' => :'mime'
|
39
|
+
}
|
40
|
+
end
|
41
|
+
|
42
|
+
# Attribute type mapping.
|
43
|
+
def self.swagger_types
|
44
|
+
{
|
45
|
+
:'mime' => :'String'
|
46
|
+
}
|
47
|
+
end
|
48
|
+
|
49
|
+
# Initializes the object
|
50
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
51
|
+
def initialize(attributes = {})
|
52
|
+
return unless attributes.is_a?(Hash)
|
53
|
+
|
54
|
+
# convert string to symbol for hash key
|
55
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
56
|
+
|
57
|
+
if attributes.has_key?(:'mime')
|
58
|
+
self.mime = attributes[:'mime']
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
# Initializes the object
|
63
|
+
def initialize(mime=nil)
|
64
|
+
self.mime = mime
|
65
|
+
end
|
66
|
+
|
67
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
68
|
+
# @return Array for valid properties with the reasons
|
69
|
+
def list_invalid_properties
|
70
|
+
invalid_properties = Array.new
|
71
|
+
invalid_properties
|
72
|
+
end
|
73
|
+
|
74
|
+
# Check to see if the all the properties in the model are valid
|
75
|
+
# @return true if the model is valid
|
76
|
+
def valid?
|
77
|
+
true
|
78
|
+
end
|
79
|
+
|
80
|
+
# Checks equality by comparing each attribute.
|
81
|
+
# @param [Object] Object to be compared
|
82
|
+
def ==(o)
|
83
|
+
return true if self.equal?(o)
|
84
|
+
self.class == o.class &&
|
85
|
+
mime == o.mime
|
86
|
+
end
|
87
|
+
|
88
|
+
# @see the `==` method
|
89
|
+
# @param [Object] Object to be compared
|
90
|
+
def eql?(o)
|
91
|
+
self == o
|
92
|
+
end
|
93
|
+
|
94
|
+
# Calculates hash code according to all attributes.
|
95
|
+
# @return [Fixnum] Hash code
|
96
|
+
def hash
|
97
|
+
[mime].hash
|
98
|
+
end
|
99
|
+
|
106
100
|
# Builds the object from hash
|
107
101
|
# @param [Hash] attributes Model attributes in the form of hash
|
108
102
|
# @return [Object] Returns the model itself
|
109
103
|
def build_from_hash(attributes)
|
110
104
|
return nil unless attributes.is_a?(Hash)
|
111
105
|
self.class.swagger_types.each_pair do |key, type|
|
106
|
+
attribute_key = self.class.attribute_map[key]
|
107
|
+
attribute_key = (attribute_key[0, 1].downcase + attribute_key[1..-1]).to_sym
|
112
108
|
if type =~ /\AArray<(.*)>/i
|
113
109
|
# check to ensure the input is an array given that the the attribute
|
114
110
|
# is documented as an array but the input is not
|
115
|
-
if attributes[
|
116
|
-
self.send("#{key}=", attributes[
|
111
|
+
if attributes[attribute_key].is_a?(Array)
|
112
|
+
self.send("#{key}=", attributes[attribute_key].map { |v| _deserialize($1, v) })
|
117
113
|
end
|
118
|
-
elsif !attributes[
|
119
|
-
self.send("#{key}=", _deserialize(type, attributes[
|
114
|
+
elsif !attributes[attribute_key].nil?
|
115
|
+
self.send("#{key}=", _deserialize(type, attributes[attribute_key]))
|
120
116
|
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
121
117
|
end
|
122
118
|
|
@@ -160,7 +156,8 @@ module asposeemailcloud
|
|
160
156
|
end
|
161
157
|
end
|
162
158
|
else # model
|
163
|
-
|
159
|
+
type = value[:type] || type
|
160
|
+
temp_model = AsposeEmailCloud.const_get(type).new
|
164
161
|
temp_model.build_from_hash(value)
|
165
162
|
end
|
166
163
|
end
|
@@ -195,7 +192,7 @@ module asposeemailcloud
|
|
195
192
|
# @return [Hash] Returns the value in the form of hash
|
196
193
|
def _to_hash(value)
|
197
194
|
if value.is_a?(Array)
|
198
|
-
value.compact.map{ |v| _to_hash(v) }
|
195
|
+
value.compact.map { |v| _to_hash(v) }
|
199
196
|
elsif value.is_a?(Hash)
|
200
197
|
{}.tap do |hash|
|
201
198
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
@@ -206,7 +203,6 @@ module asposeemailcloud
|
|
206
203
|
value
|
207
204
|
end
|
208
205
|
end
|
209
|
-
|
206
|
+
|
210
207
|
end
|
211
|
-
|
212
208
|
end
|