aspose_email_cloud 19.11.0 → 19.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (154) hide show
  1. checksums.yaml +4 -4
  2. data/lib/aspose-email-cloud.rb +43 -1
  3. data/lib/aspose-email-cloud/api/email_api.rb +221 -100
  4. data/lib/aspose-email-cloud/api_client.rb +4 -3
  5. data/lib/aspose-email-cloud/configuration.rb +4 -0
  6. data/lib/aspose-email-cloud/models/account_base_request.rb +123 -113
  7. data/lib/aspose-email-cloud/models/add_attachment_request.rb +86 -82
  8. data/lib/aspose-email-cloud/models/ai_bcr_base64_image.rb +228 -0
  9. data/lib/aspose-email-cloud/models/ai_bcr_base64_rq.rb +225 -0
  10. data/lib/aspose-email-cloud/models/ai_bcr_image.rb +215 -0
  11. data/lib/aspose-email-cloud/models/ai_bcr_image_storage_file.rb +228 -0
  12. data/lib/aspose-email-cloud/models/ai_bcr_ocr_data.rb +253 -0
  13. data/lib/aspose-email-cloud/models/ai_bcr_ocr_data_part.rb +297 -0
  14. data/lib/aspose-email-cloud/models/ai_bcr_options.rb +223 -0
  15. data/lib/aspose-email-cloud/models/ai_bcr_parse_storage_rq.rb +248 -0
  16. data/lib/aspose-email-cloud/models/ai_bcr_rq.rb +210 -0
  17. data/lib/aspose-email-cloud/models/ai_bcr_storage_image_rq.rb +230 -0
  18. data/lib/aspose-email-cloud/models/ai_name_component.rb +264 -0
  19. data/lib/aspose-email-cloud/models/ai_name_cultural_context.rb +267 -0
  20. data/lib/aspose-email-cloud/models/ai_name_extracted.rb +230 -0
  21. data/lib/aspose-email-cloud/models/ai_name_extracted_component.rb +228 -0
  22. data/lib/aspose-email-cloud/models/ai_name_formatted.rb +223 -0
  23. data/lib/aspose-email-cloud/models/ai_name_gender_hypothesis.rb +233 -0
  24. data/lib/aspose-email-cloud/models/ai_name_match_result.rb +230 -0
  25. data/lib/aspose-email-cloud/models/ai_name_mismatch.rb +246 -0
  26. data/lib/aspose-email-cloud/models/ai_name_parsed_match_rq.rb +263 -0
  27. data/lib/aspose-email-cloud/models/ai_name_parsed_rq.rb +243 -0
  28. data/lib/aspose-email-cloud/models/ai_name_weighted.rb +228 -0
  29. data/lib/aspose-email-cloud/models/ai_name_weighted_variants.rb +225 -0
  30. data/lib/aspose-email-cloud/models/append_email_account_base_request.rb +178 -163
  31. data/lib/aspose-email-cloud/models/append_email_base_request.rb +196 -179
  32. data/lib/aspose-email-cloud/models/append_email_mime_base_request.rb +215 -198
  33. data/lib/aspose-email-cloud/models/base_object.rb +9 -5
  34. data/lib/aspose-email-cloud/models/create_email_request.rb +91 -87
  35. data/lib/aspose-email-cloud/models/create_folder_base_request.rb +173 -160
  36. data/lib/aspose-email-cloud/models/delete_folder_base_request.rb +178 -165
  37. data/lib/aspose-email-cloud/models/delete_message_base_request.rb +178 -165
  38. data/lib/aspose-email-cloud/models/disc_usage.rb +96 -92
  39. data/lib/aspose-email-cloud/models/email_account_request.rb +257 -205
  40. data/lib/aspose-email-cloud/models/email_document.rb +93 -89
  41. data/lib/aspose-email-cloud/models/email_document_response.rb +73 -71
  42. data/lib/aspose-email-cloud/models/email_properties.rb +93 -88
  43. data/lib/aspose-email-cloud/models/email_property.rb +128 -119
  44. data/lib/aspose-email-cloud/models/email_property_response.rb +73 -71
  45. data/lib/aspose-email-cloud/models/error.rb +112 -104
  46. data/lib/aspose-email-cloud/models/error_details.rb +91 -87
  47. data/lib/aspose-email-cloud/models/file_version.rb +166 -152
  48. data/lib/aspose-email-cloud/models/file_versions.rb +75 -73
  49. data/lib/aspose-email-cloud/models/files_list.rb +75 -73
  50. data/lib/aspose-email-cloud/models/files_upload_result.rb +90 -86
  51. data/lib/aspose-email-cloud/models/hierarchical_object.rb +13 -7
  52. data/lib/aspose-email-cloud/models/hierarchical_object_request.rb +91 -87
  53. data/lib/aspose-email-cloud/models/hierarchical_object_response.rb +86 -82
  54. data/lib/aspose-email-cloud/models/indexed_hierarchical_object.rb +17 -9
  55. data/lib/aspose-email-cloud/models/indexed_primitive_object.rb +17 -9
  56. data/lib/aspose-email-cloud/models/link.rb +112 -104
  57. data/lib/aspose-email-cloud/models/list_response_of_ai_bcr_ocr_data.rb +211 -0
  58. data/lib/aspose-email-cloud/models/list_response_of_ai_name_component.rb +211 -0
  59. data/lib/aspose-email-cloud/models/list_response_of_ai_name_extracted.rb +211 -0
  60. data/lib/aspose-email-cloud/models/list_response_of_ai_name_gender_hypothesis.rb +211 -0
  61. data/lib/aspose-email-cloud/models/list_response_of_hierarchical_object.rb +211 -0
  62. data/lib/aspose-email-cloud/models/list_response_of_hierarchical_object_response.rb +74 -71
  63. data/lib/aspose-email-cloud/models/list_response_of_mail_server_folder.rb +74 -71
  64. data/lib/aspose-email-cloud/models/list_response_of_storage_file_location.rb +211 -0
  65. data/lib/aspose-email-cloud/models/list_response_of_string.rb +74 -71
  66. data/lib/aspose-email-cloud/models/mail_server_folder.rb +86 -82
  67. data/lib/aspose-email-cloud/models/mime_response.rb +73 -71
  68. data/lib/aspose-email-cloud/models/object_exist.rb +96 -92
  69. data/lib/aspose-email-cloud/models/primitive_object.rb +13 -7
  70. data/lib/aspose-email-cloud/models/requests/add_calendar_attachment_request_data.rb +4 -4
  71. data/lib/aspose-email-cloud/models/requests/add_contact_attachment_request_data.rb +6 -11
  72. data/lib/aspose-email-cloud/models/requests/add_email_attachment_request_data.rb +4 -4
  73. data/lib/aspose-email-cloud/models/requests/add_mapi_attachment_request_data.rb +4 -4
  74. data/lib/aspose-email-cloud/models/requests/ai_bcr_ocr_request_data.rb +75 -0
  75. data/lib/aspose-email-cloud/models/requests/ai_bcr_ocr_storage_request_data.rb +75 -0
  76. data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_request_data.rb +75 -0
  77. data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_storage_request_data.rb +75 -0
  78. data/lib/aspose-email-cloud/models/requests/ai_name_complete_request_data.rb +91 -0
  79. data/lib/aspose-email-cloud/models/requests/ai_name_expand_parsed_request_data.rb +75 -0
  80. data/lib/aspose-email-cloud/models/requests/ai_name_expand_request_data.rb +91 -0
  81. data/lib/aspose-email-cloud/models/requests/ai_name_format_parsed_request_data.rb +75 -0
  82. data/lib/aspose-email-cloud/models/requests/ai_name_format_request_data.rb +94 -0
  83. data/lib/aspose-email-cloud/models/requests/ai_name_genderize_parsed_request_data.rb +75 -0
  84. data/lib/aspose-email-cloud/models/requests/ai_name_genderize_request_data.rb +91 -0
  85. data/lib/aspose-email-cloud/models/requests/ai_name_match_parsed_request_data.rb +75 -0
  86. data/lib/aspose-email-cloud/models/requests/ai_name_match_request_data.rb +99 -0
  87. data/lib/aspose-email-cloud/models/requests/ai_name_parse_email_address_request_data.rb +91 -0
  88. data/lib/aspose-email-cloud/models/requests/ai_name_parse_request_data.rb +91 -0
  89. data/lib/aspose-email-cloud/models/requests/append_email_message_request_data.rb +2 -2
  90. data/lib/aspose-email-cloud/models/requests/append_mime_message_request_data.rb +2 -2
  91. data/lib/aspose-email-cloud/models/requests/copy_file_request_data.rb +5 -5
  92. data/lib/aspose-email-cloud/models/requests/copy_folder_request_data.rb +4 -4
  93. data/lib/aspose-email-cloud/models/requests/create_calendar_request_data.rb +3 -3
  94. data/lib/aspose-email-cloud/models/requests/create_contact_request_data.rb +5 -10
  95. data/lib/aspose-email-cloud/models/requests/create_email_folder_request_data.rb +2 -2
  96. data/lib/aspose-email-cloud/models/requests/create_email_request_data.rb +3 -3
  97. data/lib/aspose-email-cloud/models/requests/create_folder_request_data.rb +2 -2
  98. data/lib/aspose-email-cloud/models/requests/create_mapi_request_data.rb +3 -3
  99. data/lib/aspose-email-cloud/models/requests/delete_calendar_property_request_data.rb +5 -5
  100. data/lib/aspose-email-cloud/models/requests/delete_contact_property_request_data.rb +7 -12
  101. data/lib/aspose-email-cloud/models/requests/delete_email_folder_request_data.rb +2 -2
  102. data/lib/aspose-email-cloud/models/requests/delete_email_message_request_data.rb +2 -2
  103. data/lib/aspose-email-cloud/models/requests/delete_file_request_data.rb +3 -3
  104. data/lib/aspose-email-cloud/models/requests/delete_folder_request_data.rb +3 -3
  105. data/lib/aspose-email-cloud/models/requests/delete_mapi_attachment_request_data.rb +4 -4
  106. data/lib/aspose-email-cloud/models/requests/delete_mapi_properties_request_data.rb +3 -3
  107. data/lib/aspose-email-cloud/models/requests/download_file_request_data.rb +3 -3
  108. data/lib/aspose-email-cloud/models/requests/fetch_email_message_request_data.rb +7 -7
  109. data/lib/aspose-email-cloud/models/requests/get_calendar_attachment_request_data.rb +5 -5
  110. data/lib/aspose-email-cloud/models/requests/get_calendar_list_request_data.rb +5 -5
  111. data/lib/aspose-email-cloud/models/requests/get_calendar_request_data.rb +4 -4
  112. data/lib/aspose-email-cloud/models/requests/get_contact_attachment_request_data.rb +7 -12
  113. data/lib/aspose-email-cloud/models/requests/get_contact_list_request_data.rb +7 -12
  114. data/lib/aspose-email-cloud/models/requests/get_contact_properties_request_data.rb +6 -11
  115. data/lib/aspose-email-cloud/models/requests/get_disc_usage_request_data.rb +1 -1
  116. data/lib/aspose-email-cloud/models/requests/get_email_attachment_request_data.rb +5 -5
  117. data/lib/aspose-email-cloud/models/requests/get_email_property_request_data.rb +5 -5
  118. data/lib/aspose-email-cloud/models/requests/get_email_request_data.rb +4 -4
  119. data/lib/aspose-email-cloud/models/requests/get_file_versions_request_data.rb +2 -2
  120. data/lib/aspose-email-cloud/models/requests/get_files_list_request_data.rb +2 -2
  121. data/lib/aspose-email-cloud/models/requests/get_mapi_attachment_request_data.rb +5 -5
  122. data/lib/aspose-email-cloud/models/requests/get_mapi_attachments_request_data.rb +4 -4
  123. data/lib/aspose-email-cloud/models/requests/get_mapi_list_request_data.rb +5 -5
  124. data/lib/aspose-email-cloud/models/requests/get_mapi_properties_request_data.rb +4 -4
  125. data/lib/aspose-email-cloud/models/requests/list_email_folders_request_data.rb +7 -7
  126. data/lib/aspose-email-cloud/models/requests/list_email_messages_request_data.rb +10 -10
  127. data/lib/aspose-email-cloud/models/requests/move_file_request_data.rb +5 -5
  128. data/lib/aspose-email-cloud/models/requests/move_folder_request_data.rb +4 -4
  129. data/lib/aspose-email-cloud/models/requests/object_exists_request_data.rb +3 -3
  130. data/lib/aspose-email-cloud/models/requests/save_mail_account_request_data.rb +2 -2
  131. data/lib/aspose-email-cloud/models/requests/save_mail_o_auth_account_request_data.rb +2 -2
  132. data/lib/aspose-email-cloud/models/requests/send_email_mime_request_data.rb +2 -2
  133. data/lib/aspose-email-cloud/models/requests/send_email_request_data.rb +2 -2
  134. data/lib/aspose-email-cloud/models/requests/set_email_property_request_data.rb +5 -5
  135. data/lib/aspose-email-cloud/models/requests/set_email_read_flag_request_data.rb +2 -2
  136. data/lib/aspose-email-cloud/models/requests/storage_exists_request_data.rb +1 -1
  137. data/lib/aspose-email-cloud/models/requests/update_calendar_properties_request_data.rb +3 -3
  138. data/lib/aspose-email-cloud/models/requests/update_contact_properties_request_data.rb +5 -10
  139. data/lib/aspose-email-cloud/models/requests/update_mapi_properties_request_data.rb +3 -3
  140. data/lib/aspose-email-cloud/models/requests/upload_file_request_data.rb +3 -3
  141. data/lib/aspose-email-cloud/models/save_email_account_request.rb +294 -240
  142. data/lib/aspose-email-cloud/models/save_o_auth_email_account_request.rb +368 -310
  143. data/lib/aspose-email-cloud/models/send_email_base_request.rb +141 -130
  144. data/lib/aspose-email-cloud/models/send_email_mime_base_request.rb +160 -149
  145. data/lib/aspose-email-cloud/models/set_email_property_request.rb +91 -87
  146. data/lib/aspose-email-cloud/models/set_message_read_flag_account_base_request.rb +178 -165
  147. data/lib/aspose-email-cloud/models/storage_exist.rb +78 -76
  148. data/lib/aspose-email-cloud/models/storage_file.rb +135 -125
  149. data/lib/aspose-email-cloud/models/storage_file_location.rb +123 -117
  150. data/lib/aspose-email-cloud/models/storage_folder_location.rb +86 -82
  151. data/lib/aspose-email-cloud/models/value_response.rb +73 -71
  152. data/lib/aspose-email-cloud/version.rb +1 -1
  153. metadata +45 -3
  154. data/lib/aspose-email-cloud/models/contact_format.rb +0 -45
@@ -27,184 +27,201 @@
27
27
  require 'date'
28
28
 
29
29
  module AsposeEmailCloud
30
- # Append email from storage file to account request
31
- class AppendEmailBaseRequest
32
- attr_accessor :first_account
33
-
34
- attr_accessor :second_account
35
-
36
- attr_accessor :storage_folder
37
-
38
- attr_accessor :folder
39
-
40
- attr_accessor :mark_as_sent
41
-
42
- # Email document file location in storage
43
- attr_accessor :email_file
44
-
45
- # Attribute mapping from ruby-style variable name to JSON key.
46
- def self.attribute_map
47
- {
48
- :'first_account' => :'firstAccount',
49
- :'second_account' => :'secondAccount',
50
- :'storage_folder' => :'storageFolder',
51
- :'folder' => :'folder',
52
- :'mark_as_sent' => :'markAsSent',
53
- :'email_file' => :'emailFile'
54
- }
55
- end
56
-
57
- # Attribute type mapping.
58
- def self.swagger_types
59
- {
60
- :'first_account' => :'String',
61
- :'second_account' => :'String',
62
- :'storage_folder' => :'StorageFolderLocation',
63
- :'folder' => :'String',
64
- :'mark_as_sent' => :'BOOLEAN',
65
- :'email_file' => :'StorageFileLocation'
66
- }
67
- end
68
-
69
- # Initializes the object
70
- # @param [Hash] attributes Model attributes in the form of hash
71
- def initialize(attributes = {})
72
- return unless attributes.is_a?(Hash)
73
-
74
- # convert string to symbol for hash key
75
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
76
-
77
- if attributes.has_key?(:'firstAccount')
78
- self.first_account = attributes[:'firstAccount']
79
- end
80
-
81
- if attributes.has_key?(:'secondAccount')
82
- self.second_account = attributes[:'secondAccount']
83
- end
84
-
85
- if attributes.has_key?(:'storageFolder')
86
- self.storage_folder = attributes[:'storageFolder']
87
- end
88
-
89
- if attributes.has_key?(:'folder')
90
- self.folder = attributes[:'folder']
91
- end
92
-
93
- if attributes.has_key?(:'markAsSent')
94
- self.mark_as_sent = attributes[:'markAsSent']
95
- end
96
-
97
- if attributes.has_key?(:'emailFile')
98
- self.email_file = attributes[:'emailFile']
99
- end
100
- end
101
-
102
- # Initializes the object
103
- def initialize(first_account=nil, second_account=nil, storage_folder=nil, folder=nil, mark_as_sent=nil, email_file=nil)
104
- self.first_account = first_account
105
- self.second_account = second_account
106
- self.storage_folder = storage_folder
107
- self.folder = folder
108
- self.mark_as_sent = mark_as_sent
109
- self.email_file = email_file
110
- end
111
-
112
- # Show invalid properties with the reasons. Usually used together with valid?
113
- # @return Array for valid properties with the reasons
114
- def list_invalid_properties
115
- invalid_properties = Array.new
116
- if @first_account.nil?
117
- invalid_properties.push('invalid value for "first_account", first_account cannot be nil.')
118
- end
119
-
120
- if @first_account.to_s.length < 1
121
- invalid_properties.push('invalid value for "first_account", the character length must be great than or equal to 1.')
122
- end
123
-
124
- if @folder.nil?
125
- invalid_properties.push('invalid value for "folder", folder cannot be nil.')
126
- end
127
-
128
- if @folder.to_s.length < 1
129
- invalid_properties.push('invalid value for "folder", the character length must be great than or equal to 1.')
130
- end
131
-
132
- if @mark_as_sent.nil?
133
- invalid_properties.push('invalid value for "mark_as_sent", mark_as_sent cannot be nil.')
134
- end
135
-
136
- if @email_file.nil?
137
- invalid_properties.push('invalid value for "email_file", email_file cannot be nil.')
138
- end
139
-
140
- invalid_properties
141
- end
142
-
143
- # Check to see if the all the properties in the model are valid
144
- # @return true if the model is valid
145
- def valid?
146
- return false if @first_account.nil?
147
- return false if @first_account.to_s.length < 1
148
- return false if @folder.nil?
149
- return false if @folder.to_s.length < 1
150
- return false if @mark_as_sent.nil?
151
- return false if @email_file.nil?
152
- true
153
- end
154
-
155
- # Custom attribute writer method with validation
156
- # @param [Object] first_account Value to be assigned
157
- def first_account=(first_account)
158
- if first_account.nil?
159
- fail ArgumentError, 'first_account cannot be nil'
160
- end
161
-
162
- if first_account.to_s.length < 1
163
- fail ArgumentError, 'invalid value for "first_account", the character length must be great than or equal to 1.'
164
- end
165
-
166
- @first_account = first_account
167
- end
168
-
169
- # Custom attribute writer method with validation
170
- # @param [Object] folder Value to be assigned
171
- def folder=(folder)
172
- if folder.nil?
173
- fail ArgumentError, 'folder cannot be nil'
174
- end
175
-
176
- if folder.to_s.length < 1
177
- fail ArgumentError, 'invalid value for "folder", the character length must be great than or equal to 1.'
178
- end
179
-
180
- @folder = folder
181
- end
182
-
183
- # Checks equality by comparing each attribute.
184
- # @param [Object] Object to be compared
185
- def ==(o)
186
- return true if self.equal?(o)
187
- self.class == o.class &&
188
- first_account == o.first_account &&
189
- second_account == o.second_account &&
190
- storage_folder == o.storage_folder &&
191
- folder == o.folder &&
192
- mark_as_sent == o.mark_as_sent &&
193
- email_file == o.email_file
194
- end
195
-
196
- # @see the `==` method
197
- # @param [Object] Object to be compared
198
- def eql?(o)
199
- self == o
200
- end
201
-
202
- # Calculates hash code according to all attributes.
203
- # @return [Fixnum] Hash code
204
- def hash
205
- [first_account, second_account, storage_folder, folder, mark_as_sent, email_file].hash
206
- end
207
-
30
+ # Append email from storage file to account request
31
+ class AppendEmailBaseRequest
32
+ # First account storage file name for receiving emails (or universal one)
33
+ # @return [String]
34
+ attr_accessor :first_account
35
+
36
+ # Second account storage file name for sending emails (ignored if first is universal)
37
+ # @return [String]
38
+ attr_accessor :second_account
39
+
40
+ # Storage folder location of account files
41
+ # @return [StorageFolderLocation]
42
+ attr_accessor :storage_folder
43
+
44
+ # Email account folder to store a message
45
+ # @return [String]
46
+ attr_accessor :folder
47
+
48
+ # Mark message as sent
49
+ # @return [BOOLEAN]
50
+ attr_accessor :mark_as_sent
51
+
52
+ # Email document file location in storage
53
+ # @return [StorageFileLocation]
54
+ attr_accessor :email_file
55
+
56
+ # Attribute mapping from ruby-style variable name to JSON key.
57
+ def self.attribute_map
58
+ {
59
+ :'first_account' => :'firstAccount',
60
+ :'second_account' => :'secondAccount',
61
+ :'storage_folder' => :'storageFolder',
62
+ :'folder' => :'folder',
63
+ :'mark_as_sent' => :'markAsSent',
64
+ :'email_file' => :'emailFile'
65
+ }
66
+ end
67
+
68
+ # Attribute type mapping.
69
+ def self.swagger_types
70
+ {
71
+ :'first_account' => :'String',
72
+ :'second_account' => :'String',
73
+ :'storage_folder' => :'StorageFolderLocation',
74
+ :'folder' => :'String',
75
+ :'mark_as_sent' => :'BOOLEAN',
76
+ :'email_file' => :'StorageFileLocation'
77
+ }
78
+ end
79
+
80
+ # Initializes the object
81
+ # @param [Hash] attributes Model attributes in the form of hash
82
+ def initialize(attributes = {})
83
+ return unless attributes.is_a?(Hash)
84
+
85
+ # convert string to symbol for hash key
86
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
87
+
88
+ if attributes.has_key?(:'firstAccount')
89
+ self.first_account = attributes[:'firstAccount']
90
+ end
91
+
92
+ if attributes.has_key?(:'secondAccount')
93
+ self.second_account = attributes[:'secondAccount']
94
+ end
95
+
96
+ if attributes.has_key?(:'storageFolder')
97
+ self.storage_folder = attributes[:'storageFolder']
98
+ end
99
+
100
+ if attributes.has_key?(:'folder')
101
+ self.folder = attributes[:'folder']
102
+ end
103
+
104
+ if attributes.has_key?(:'markAsSent')
105
+ self.mark_as_sent = attributes[:'markAsSent']
106
+ end
107
+
108
+ if attributes.has_key?(:'emailFile')
109
+ self.email_file = attributes[:'emailFile']
110
+ end
111
+ end
112
+
113
+ # Initializes the object
114
+ # @param [String] first_account First account storage file name for receiving emails (or universal one)
115
+ # @param [String] second_account Second account storage file name for sending emails (ignored if first is universal)
116
+ # @param [StorageFolderLocation] storage_folder Storage folder location of account files
117
+ # @param [String] folder Email account folder to store a message
118
+ # @param [BOOLEAN] mark_as_sent Mark message as sent
119
+ # @param [StorageFileLocation] email_file Email document file location in storage
120
+ def initialize(first_account=nil, second_account=nil, storage_folder=nil, folder=nil, mark_as_sent=nil, email_file=nil)
121
+ self.first_account = first_account if first_account
122
+ self.second_account = second_account if second_account
123
+ self.storage_folder = storage_folder if storage_folder
124
+ self.folder = folder if folder
125
+ self.mark_as_sent = mark_as_sent if mark_as_sent
126
+ self.email_file = email_file if email_file
127
+ end
128
+
129
+ # Show invalid properties with the reasons. Usually used together with valid?
130
+ # @return Array for valid properties with the reasons
131
+ def list_invalid_properties
132
+ invalid_properties = Array.new
133
+ if @first_account.nil?
134
+ invalid_properties.push('invalid value for "first_account", first_account cannot be nil.')
135
+ end
136
+
137
+ if @first_account.to_s.length < 1
138
+ invalid_properties.push('invalid value for "first_account", the character length must be great than or equal to 1.')
139
+ end
140
+
141
+ if @folder.nil?
142
+ invalid_properties.push('invalid value for "folder", folder cannot be nil.')
143
+ end
144
+
145
+ if @folder.to_s.length < 1
146
+ invalid_properties.push('invalid value for "folder", the character length must be great than or equal to 1.')
147
+ end
148
+
149
+ if @mark_as_sent.nil?
150
+ invalid_properties.push('invalid value for "mark_as_sent", mark_as_sent cannot be nil.')
151
+ end
152
+
153
+ if @email_file.nil?
154
+ invalid_properties.push('invalid value for "email_file", email_file cannot be nil.')
155
+ end
156
+
157
+ invalid_properties
158
+ end
159
+
160
+ # Check to see if the all the properties in the model are valid
161
+ # @return true if the model is valid
162
+ def valid?
163
+ return false if @first_account.nil?
164
+ return false if @first_account.to_s.length < 1
165
+ return false if @folder.nil?
166
+ return false if @folder.to_s.length < 1
167
+ return false if @mark_as_sent.nil?
168
+ return false if @email_file.nil?
169
+ true
170
+ end
171
+
172
+ # Custom attribute writer method with validation
173
+ # @param [Object] first_account Value to be assigned
174
+ def first_account=(first_account)
175
+ if first_account.nil?
176
+ fail ArgumentError, 'first_account cannot be nil'
177
+ end
178
+
179
+ if first_account.to_s.length < 1
180
+ fail ArgumentError, 'invalid value for "first_account", the character length must be great than or equal to 1.'
181
+ end
182
+
183
+ @first_account = first_account
184
+ end
185
+
186
+ # Custom attribute writer method with validation
187
+ # @param [Object] folder Value to be assigned
188
+ def folder=(folder)
189
+ if folder.nil?
190
+ fail ArgumentError, 'folder cannot be nil'
191
+ end
192
+
193
+ if folder.to_s.length < 1
194
+ fail ArgumentError, 'invalid value for "folder", the character length must be great than or equal to 1.'
195
+ end
196
+
197
+ @folder = folder
198
+ end
199
+
200
+ # Checks equality by comparing each attribute.
201
+ # @param [Object] Object to be compared
202
+ def ==(o)
203
+ return true if self.equal?(o)
204
+ self.class == o.class &&
205
+ first_account == o.first_account &&
206
+ second_account == o.second_account &&
207
+ storage_folder == o.storage_folder &&
208
+ folder == o.folder &&
209
+ mark_as_sent == o.mark_as_sent &&
210
+ email_file == o.email_file
211
+ end
212
+
213
+ # @see the `==` method
214
+ # @param [Object] Object to be compared
215
+ def eql?(o)
216
+ self == o
217
+ end
218
+
219
+ # Calculates hash code according to all attributes.
220
+ # @return [Fixnum] Hash code
221
+ def hash
222
+ [first_account, second_account, storage_folder, folder, mark_as_sent, email_file].hash
223
+ end
224
+
208
225
  # Builds the object from hash
209
226
  # @param [Hash] attributes Model attributes in the form of hash
210
227
  # @return [Object] Returns the model itself
@@ -311,6 +328,6 @@ module AsposeEmailCloud
311
328
  value
312
329
  end
313
330
  end
314
-
331
+
315
332
  end
316
333
  end
@@ -27,203 +27,220 @@
27
27
  require 'date'
28
28
 
29
29
  module AsposeEmailCloud
30
- # Append email from MIME string to account request
31
- class AppendEmailMimeBaseRequest
32
- attr_accessor :first_account
33
-
34
- attr_accessor :second_account
35
-
36
- attr_accessor :storage_folder
37
-
38
- attr_accessor :folder
39
-
40
- attr_accessor :mark_as_sent
41
-
42
- # Email document serialized as MIME string
43
- attr_accessor :base64_mime_message
44
-
45
- # Attribute mapping from ruby-style variable name to JSON key.
46
- def self.attribute_map
47
- {
48
- :'first_account' => :'firstAccount',
49
- :'second_account' => :'secondAccount',
50
- :'storage_folder' => :'storageFolder',
51
- :'folder' => :'folder',
52
- :'mark_as_sent' => :'markAsSent',
53
- :'base64_mime_message' => :'base64MimeMessage'
54
- }
55
- end
56
-
57
- # Attribute type mapping.
58
- def self.swagger_types
59
- {
60
- :'first_account' => :'String',
61
- :'second_account' => :'String',
62
- :'storage_folder' => :'StorageFolderLocation',
63
- :'folder' => :'String',
64
- :'mark_as_sent' => :'BOOLEAN',
65
- :'base64_mime_message' => :'String'
66
- }
67
- end
68
-
69
- # Initializes the object
70
- # @param [Hash] attributes Model attributes in the form of hash
71
- def initialize(attributes = {})
72
- return unless attributes.is_a?(Hash)
73
-
74
- # convert string to symbol for hash key
75
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
76
-
77
- if attributes.has_key?(:'firstAccount')
78
- self.first_account = attributes[:'firstAccount']
79
- end
80
-
81
- if attributes.has_key?(:'secondAccount')
82
- self.second_account = attributes[:'secondAccount']
83
- end
84
-
85
- if attributes.has_key?(:'storageFolder')
86
- self.storage_folder = attributes[:'storageFolder']
87
- end
88
-
89
- if attributes.has_key?(:'folder')
90
- self.folder = attributes[:'folder']
91
- end
92
-
93
- if attributes.has_key?(:'markAsSent')
94
- self.mark_as_sent = attributes[:'markAsSent']
95
- end
96
-
97
- if attributes.has_key?(:'base64MimeMessage')
98
- self.base64_mime_message = attributes[:'base64MimeMessage']
99
- end
100
- end
101
-
102
- # Initializes the object
103
- def initialize(first_account=nil, second_account=nil, storage_folder=nil, folder=nil, mark_as_sent=nil, base64_mime_message=nil)
104
- self.first_account = first_account
105
- self.second_account = second_account
106
- self.storage_folder = storage_folder
107
- self.folder = folder
108
- self.mark_as_sent = mark_as_sent
109
- self.base64_mime_message = base64_mime_message
110
- end
111
-
112
- # Show invalid properties with the reasons. Usually used together with valid?
113
- # @return Array for valid properties with the reasons
114
- def list_invalid_properties
115
- invalid_properties = Array.new
116
- if @first_account.nil?
117
- invalid_properties.push('invalid value for "first_account", first_account cannot be nil.')
118
- end
119
-
120
- if @first_account.to_s.length < 1
121
- invalid_properties.push('invalid value for "first_account", the character length must be great than or equal to 1.')
122
- end
123
-
124
- if @folder.nil?
125
- invalid_properties.push('invalid value for "folder", folder cannot be nil.')
126
- end
127
-
128
- if @folder.to_s.length < 1
129
- invalid_properties.push('invalid value for "folder", the character length must be great than or equal to 1.')
130
- end
131
-
132
- if @mark_as_sent.nil?
133
- invalid_properties.push('invalid value for "mark_as_sent", mark_as_sent cannot be nil.')
134
- end
135
-
136
- if @base64_mime_message.nil?
137
- invalid_properties.push('invalid value for "base64_mime_message", base64_mime_message cannot be nil.')
138
- end
139
-
140
- if @base64_mime_message.to_s.length < 1
141
- invalid_properties.push('invalid value for "base64_mime_message", the character length must be great than or equal to 1.')
142
- end
143
-
144
- invalid_properties
145
- end
146
-
147
- # Check to see if the all the properties in the model are valid
148
- # @return true if the model is valid
149
- def valid?
150
- return false if @first_account.nil?
151
- return false if @first_account.to_s.length < 1
152
- return false if @folder.nil?
153
- return false if @folder.to_s.length < 1
154
- return false if @mark_as_sent.nil?
155
- return false if @base64_mime_message.nil?
156
- return false if @base64_mime_message.to_s.length < 1
157
- true
158
- end
159
-
160
- # Custom attribute writer method with validation
161
- # @param [Object] first_account Value to be assigned
162
- def first_account=(first_account)
163
- if first_account.nil?
164
- fail ArgumentError, 'first_account cannot be nil'
165
- end
166
-
167
- if first_account.to_s.length < 1
168
- fail ArgumentError, 'invalid value for "first_account", the character length must be great than or equal to 1.'
169
- end
170
-
171
- @first_account = first_account
172
- end
173
-
174
- # Custom attribute writer method with validation
175
- # @param [Object] folder Value to be assigned
176
- def folder=(folder)
177
- if folder.nil?
178
- fail ArgumentError, 'folder cannot be nil'
179
- end
180
-
181
- if folder.to_s.length < 1
182
- fail ArgumentError, 'invalid value for "folder", the character length must be great than or equal to 1.'
183
- end
184
-
185
- @folder = folder
186
- end
187
-
188
- # Custom attribute writer method with validation
189
- # @param [Object] base64_mime_message Value to be assigned
190
- def base64_mime_message=(base64_mime_message)
191
- if base64_mime_message.nil?
192
- fail ArgumentError, 'base64_mime_message cannot be nil'
193
- end
194
-
195
- if base64_mime_message.to_s.length < 1
196
- fail ArgumentError, 'invalid value for "base64_mime_message", the character length must be great than or equal to 1.'
197
- end
198
-
199
- @base64_mime_message = base64_mime_message
200
- end
201
-
202
- # Checks equality by comparing each attribute.
203
- # @param [Object] Object to be compared
204
- def ==(o)
205
- return true if self.equal?(o)
206
- self.class == o.class &&
207
- first_account == o.first_account &&
208
- second_account == o.second_account &&
209
- storage_folder == o.storage_folder &&
210
- folder == o.folder &&
211
- mark_as_sent == o.mark_as_sent &&
212
- base64_mime_message == o.base64_mime_message
213
- end
214
-
215
- # @see the `==` method
216
- # @param [Object] Object to be compared
217
- def eql?(o)
218
- self == o
219
- end
220
-
221
- # Calculates hash code according to all attributes.
222
- # @return [Fixnum] Hash code
223
- def hash
224
- [first_account, second_account, storage_folder, folder, mark_as_sent, base64_mime_message].hash
225
- end
226
-
30
+ # Append email from MIME string to account request
31
+ class AppendEmailMimeBaseRequest
32
+ # First account storage file name for receiving emails (or universal one)
33
+ # @return [String]
34
+ attr_accessor :first_account
35
+
36
+ # Second account storage file name for sending emails (ignored if first is universal)
37
+ # @return [String]
38
+ attr_accessor :second_account
39
+
40
+ # Storage folder location of account files
41
+ # @return [StorageFolderLocation]
42
+ attr_accessor :storage_folder
43
+
44
+ # Email account folder to store a message
45
+ # @return [String]
46
+ attr_accessor :folder
47
+
48
+ # Mark message as sent
49
+ # @return [BOOLEAN]
50
+ attr_accessor :mark_as_sent
51
+
52
+ # Email document serialized as MIME string
53
+ # @return [String]
54
+ attr_accessor :base64_mime_message
55
+
56
+ # Attribute mapping from ruby-style variable name to JSON key.
57
+ def self.attribute_map
58
+ {
59
+ :'first_account' => :'firstAccount',
60
+ :'second_account' => :'secondAccount',
61
+ :'storage_folder' => :'storageFolder',
62
+ :'folder' => :'folder',
63
+ :'mark_as_sent' => :'markAsSent',
64
+ :'base64_mime_message' => :'base64MimeMessage'
65
+ }
66
+ end
67
+
68
+ # Attribute type mapping.
69
+ def self.swagger_types
70
+ {
71
+ :'first_account' => :'String',
72
+ :'second_account' => :'String',
73
+ :'storage_folder' => :'StorageFolderLocation',
74
+ :'folder' => :'String',
75
+ :'mark_as_sent' => :'BOOLEAN',
76
+ :'base64_mime_message' => :'String'
77
+ }
78
+ end
79
+
80
+ # Initializes the object
81
+ # @param [Hash] attributes Model attributes in the form of hash
82
+ def initialize(attributes = {})
83
+ return unless attributes.is_a?(Hash)
84
+
85
+ # convert string to symbol for hash key
86
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
87
+
88
+ if attributes.has_key?(:'firstAccount')
89
+ self.first_account = attributes[:'firstAccount']
90
+ end
91
+
92
+ if attributes.has_key?(:'secondAccount')
93
+ self.second_account = attributes[:'secondAccount']
94
+ end
95
+
96
+ if attributes.has_key?(:'storageFolder')
97
+ self.storage_folder = attributes[:'storageFolder']
98
+ end
99
+
100
+ if attributes.has_key?(:'folder')
101
+ self.folder = attributes[:'folder']
102
+ end
103
+
104
+ if attributes.has_key?(:'markAsSent')
105
+ self.mark_as_sent = attributes[:'markAsSent']
106
+ end
107
+
108
+ if attributes.has_key?(:'base64MimeMessage')
109
+ self.base64_mime_message = attributes[:'base64MimeMessage']
110
+ end
111
+ end
112
+
113
+ # Initializes the object
114
+ # @param [String] first_account First account storage file name for receiving emails (or universal one)
115
+ # @param [String] second_account Second account storage file name for sending emails (ignored if first is universal)
116
+ # @param [StorageFolderLocation] storage_folder Storage folder location of account files
117
+ # @param [String] folder Email account folder to store a message
118
+ # @param [BOOLEAN] mark_as_sent Mark message as sent
119
+ # @param [String] base64_mime_message Email document serialized as MIME string
120
+ def initialize(first_account=nil, second_account=nil, storage_folder=nil, folder=nil, mark_as_sent=nil, base64_mime_message=nil)
121
+ self.first_account = first_account if first_account
122
+ self.second_account = second_account if second_account
123
+ self.storage_folder = storage_folder if storage_folder
124
+ self.folder = folder if folder
125
+ self.mark_as_sent = mark_as_sent if mark_as_sent
126
+ self.base64_mime_message = base64_mime_message if base64_mime_message
127
+ end
128
+
129
+ # Show invalid properties with the reasons. Usually used together with valid?
130
+ # @return Array for valid properties with the reasons
131
+ def list_invalid_properties
132
+ invalid_properties = Array.new
133
+ if @first_account.nil?
134
+ invalid_properties.push('invalid value for "first_account", first_account cannot be nil.')
135
+ end
136
+
137
+ if @first_account.to_s.length < 1
138
+ invalid_properties.push('invalid value for "first_account", the character length must be great than or equal to 1.')
139
+ end
140
+
141
+ if @folder.nil?
142
+ invalid_properties.push('invalid value for "folder", folder cannot be nil.')
143
+ end
144
+
145
+ if @folder.to_s.length < 1
146
+ invalid_properties.push('invalid value for "folder", the character length must be great than or equal to 1.')
147
+ end
148
+
149
+ if @mark_as_sent.nil?
150
+ invalid_properties.push('invalid value for "mark_as_sent", mark_as_sent cannot be nil.')
151
+ end
152
+
153
+ if @base64_mime_message.nil?
154
+ invalid_properties.push('invalid value for "base64_mime_message", base64_mime_message cannot be nil.')
155
+ end
156
+
157
+ if @base64_mime_message.to_s.length < 1
158
+ invalid_properties.push('invalid value for "base64_mime_message", the character length must be great than or equal to 1.')
159
+ end
160
+
161
+ invalid_properties
162
+ end
163
+
164
+ # Check to see if the all the properties in the model are valid
165
+ # @return true if the model is valid
166
+ def valid?
167
+ return false if @first_account.nil?
168
+ return false if @first_account.to_s.length < 1
169
+ return false if @folder.nil?
170
+ return false if @folder.to_s.length < 1
171
+ return false if @mark_as_sent.nil?
172
+ return false if @base64_mime_message.nil?
173
+ return false if @base64_mime_message.to_s.length < 1
174
+ true
175
+ end
176
+
177
+ # Custom attribute writer method with validation
178
+ # @param [Object] first_account Value to be assigned
179
+ def first_account=(first_account)
180
+ if first_account.nil?
181
+ fail ArgumentError, 'first_account cannot be nil'
182
+ end
183
+
184
+ if first_account.to_s.length < 1
185
+ fail ArgumentError, 'invalid value for "first_account", the character length must be great than or equal to 1.'
186
+ end
187
+
188
+ @first_account = first_account
189
+ end
190
+
191
+ # Custom attribute writer method with validation
192
+ # @param [Object] folder Value to be assigned
193
+ def folder=(folder)
194
+ if folder.nil?
195
+ fail ArgumentError, 'folder cannot be nil'
196
+ end
197
+
198
+ if folder.to_s.length < 1
199
+ fail ArgumentError, 'invalid value for "folder", the character length must be great than or equal to 1.'
200
+ end
201
+
202
+ @folder = folder
203
+ end
204
+
205
+ # Custom attribute writer method with validation
206
+ # @param [Object] base64_mime_message Value to be assigned
207
+ def base64_mime_message=(base64_mime_message)
208
+ if base64_mime_message.nil?
209
+ fail ArgumentError, 'base64_mime_message cannot be nil'
210
+ end
211
+
212
+ if base64_mime_message.to_s.length < 1
213
+ fail ArgumentError, 'invalid value for "base64_mime_message", the character length must be great than or equal to 1.'
214
+ end
215
+
216
+ @base64_mime_message = base64_mime_message
217
+ end
218
+
219
+ # Checks equality by comparing each attribute.
220
+ # @param [Object] Object to be compared
221
+ def ==(o)
222
+ return true if self.equal?(o)
223
+ self.class == o.class &&
224
+ first_account == o.first_account &&
225
+ second_account == o.second_account &&
226
+ storage_folder == o.storage_folder &&
227
+ folder == o.folder &&
228
+ mark_as_sent == o.mark_as_sent &&
229
+ base64_mime_message == o.base64_mime_message
230
+ end
231
+
232
+ # @see the `==` method
233
+ # @param [Object] Object to be compared
234
+ def eql?(o)
235
+ self == o
236
+ end
237
+
238
+ # Calculates hash code according to all attributes.
239
+ # @return [Fixnum] Hash code
240
+ def hash
241
+ [first_account, second_account, storage_folder, folder, mark_as_sent, base64_mime_message].hash
242
+ end
243
+
227
244
  # Builds the object from hash
228
245
  # @param [Hash] attributes Model attributes in the form of hash
229
246
  # @return [Object] Returns the model itself
@@ -330,6 +347,6 @@ module AsposeEmailCloud
330
347
  value
331
348
  end
332
349
  end
333
-
350
+
334
351
  end
335
352
  end