aspose_email_cloud 19.11.0 → 20.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (268) hide show
  1. checksums.yaml +4 -4
  2. data/lib/aspose-email-cloud.rb +155 -2
  3. data/lib/aspose-email-cloud/api/email_api.rb +1039 -577
  4. data/lib/aspose-email-cloud/api_client.rb +385 -381
  5. data/lib/aspose-email-cloud/api_error.rb +41 -41
  6. data/lib/aspose-email-cloud/configuration.rb +240 -236
  7. data/lib/aspose-email-cloud/models/account_base_request.rb +154 -141
  8. data/lib/aspose-email-cloud/models/add_attachment_request.rb +150 -143
  9. data/lib/aspose-email-cloud/models/ai_bcr_base64_image.rb +231 -0
  10. data/lib/aspose-email-cloud/models/ai_bcr_base64_rq.rb +228 -0
  11. data/lib/aspose-email-cloud/models/ai_bcr_image.rb +218 -0
  12. data/lib/aspose-email-cloud/models/ai_bcr_image_storage_file.rb +231 -0
  13. data/lib/aspose-email-cloud/models/ai_bcr_ocr_data.rb +256 -0
  14. data/lib/aspose-email-cloud/models/ai_bcr_ocr_data_part.rb +300 -0
  15. data/lib/aspose-email-cloud/models/ai_bcr_options.rb +226 -0
  16. data/lib/aspose-email-cloud/models/ai_bcr_parse_ocr_data_rq.rb +233 -0
  17. data/lib/aspose-email-cloud/models/ai_bcr_parse_storage_rq.rb +251 -0
  18. data/lib/aspose-email-cloud/models/ai_bcr_rq.rb +213 -0
  19. data/lib/aspose-email-cloud/models/ai_bcr_storage_image_rq.rb +233 -0
  20. data/lib/aspose-email-cloud/models/ai_name_component.rb +267 -0
  21. data/lib/aspose-email-cloud/models/ai_name_cultural_context.rb +270 -0
  22. data/lib/aspose-email-cloud/models/ai_name_extracted.rb +233 -0
  23. data/lib/aspose-email-cloud/models/ai_name_extracted_component.rb +231 -0
  24. data/lib/aspose-email-cloud/models/ai_name_formatted.rb +226 -0
  25. data/lib/aspose-email-cloud/models/ai_name_gender_hypothesis.rb +236 -0
  26. data/lib/aspose-email-cloud/models/ai_name_match_result.rb +233 -0
  27. data/lib/aspose-email-cloud/models/ai_name_mismatch.rb +249 -0
  28. data/lib/aspose-email-cloud/models/ai_name_parsed_match_rq.rb +266 -0
  29. data/lib/aspose-email-cloud/models/ai_name_parsed_rq.rb +246 -0
  30. data/lib/aspose-email-cloud/models/ai_name_weighted.rb +231 -0
  31. data/lib/aspose-email-cloud/models/ai_name_weighted_variants.rb +228 -0
  32. data/lib/aspose-email-cloud/models/alternate_view.rb +282 -0
  33. data/lib/aspose-email-cloud/models/append_email_account_base_request.rb +162 -144
  34. data/lib/aspose-email-cloud/models/append_email_base_request.rb +167 -147
  35. data/lib/aspose-email-cloud/models/append_email_mime_base_request.rb +166 -146
  36. data/lib/aspose-email-cloud/models/append_email_model_rq.rb +336 -0
  37. data/lib/aspose-email-cloud/models/associated_person.rb +244 -0
  38. data/lib/aspose-email-cloud/models/attachment.rb +324 -0
  39. data/lib/aspose-email-cloud/models/attachment_base.rb +254 -0
  40. data/lib/aspose-email-cloud/models/base_object.rb +91 -84
  41. data/lib/aspose-email-cloud/models/calendar_dto.rb +557 -0
  42. data/lib/aspose-email-cloud/models/calendar_dto_alternate_rq.rb +268 -0
  43. data/lib/aspose-email-cloud/models/calendar_dto_list.rb +215 -0
  44. data/lib/aspose-email-cloud/models/calendar_reminder.rb +318 -0
  45. data/lib/aspose-email-cloud/models/contact_dto.rb +699 -0
  46. data/lib/aspose-email-cloud/models/contact_dto_list.rb +215 -0
  47. data/lib/aspose-email-cloud/models/contact_photo.rb +231 -0
  48. data/lib/aspose-email-cloud/models/content_type.rb +267 -0
  49. data/lib/aspose-email-cloud/models/content_type_parameter.rb +226 -0
  50. data/lib/aspose-email-cloud/models/create_email_request.rb +150 -143
  51. data/lib/aspose-email-cloud/models/create_folder_base_request.rb +162 -146
  52. data/lib/aspose-email-cloud/models/customer_event.rb +231 -0
  53. data/lib/aspose-email-cloud/models/delete_email_thread_account_rq.rb +276 -0
  54. data/lib/aspose-email-cloud/models/delete_folder_base_request.rb +162 -146
  55. data/lib/aspose-email-cloud/models/delete_message_base_request.rb +177 -148
  56. data/lib/aspose-email-cloud/models/disc_usage.rb +149 -143
  57. data/lib/aspose-email-cloud/models/discover_email_config_oauth.rb +391 -0
  58. data/lib/aspose-email-cloud/models/discover_email_config_password.rb +304 -0
  59. data/lib/aspose-email-cloud/models/discover_email_config_rq.rb +268 -0
  60. data/lib/aspose-email-cloud/models/email_account_config.rb +323 -0
  61. data/lib/aspose-email-cloud/models/email_account_config_list.rb +215 -0
  62. data/lib/aspose-email-cloud/models/email_account_request.rb +210 -155
  63. data/lib/aspose-email-cloud/models/email_address.rb +283 -0
  64. data/lib/aspose-email-cloud/models/email_client_account.rb +350 -0
  65. data/lib/aspose-email-cloud/models/email_client_account_credentials.rb +261 -0
  66. data/lib/aspose-email-cloud/models/email_client_account_oauth_credentials.rb +385 -0
  67. data/lib/aspose-email-cloud/models/email_client_account_password_credentials.rb +298 -0
  68. data/lib/aspose-email-cloud/models/email_client_multi_account.rb +233 -0
  69. data/lib/aspose-email-cloud/models/email_document.rb +150 -143
  70. data/lib/aspose-email-cloud/models/email_document_response.rb +146 -141
  71. data/lib/aspose-email-cloud/models/email_dto.rb +681 -0
  72. data/lib/aspose-email-cloud/models/email_dto_list.rb +215 -0
  73. data/lib/aspose-email-cloud/models/email_properties.rb +150 -142
  74. data/lib/aspose-email-cloud/models/email_property.rb +154 -142
  75. data/lib/aspose-email-cloud/models/email_property_response.rb +146 -141
  76. data/lib/aspose-email-cloud/models/email_thread.rb +254 -0
  77. data/lib/aspose-email-cloud/models/email_thread_list.rb +215 -0
  78. data/lib/aspose-email-cloud/models/email_thread_read_flag_rq.rb +294 -0
  79. data/lib/aspose-email-cloud/models/enum_with_custom_of_associated_person_category.rb +230 -0
  80. data/lib/aspose-email-cloud/models/enum_with_custom_of_email_address_category.rb +230 -0
  81. data/lib/aspose-email-cloud/models/enum_with_custom_of_event_category.rb +230 -0
  82. data/lib/aspose-email-cloud/models/enum_with_custom_of_instant_messenger_category.rb +230 -0
  83. data/lib/aspose-email-cloud/models/enum_with_custom_of_phone_number_category.rb +230 -0
  84. data/lib/aspose-email-cloud/models/enum_with_custom_of_postal_address_category.rb +230 -0
  85. data/lib/aspose-email-cloud/models/enum_with_custom_of_url_category.rb +230 -0
  86. data/lib/aspose-email-cloud/models/error.rb +157 -147
  87. data/lib/aspose-email-cloud/models/error_details.rb +149 -143
  88. data/lib/aspose-email-cloud/models/file_version.rb +169 -153
  89. data/lib/aspose-email-cloud/models/file_versions.rb +145 -141
  90. data/lib/aspose-email-cloud/models/files_list.rb +145 -141
  91. data/lib/aspose-email-cloud/models/files_upload_result.rb +149 -143
  92. data/lib/aspose-email-cloud/models/hierarchical_object.rb +106 -97
  93. data/lib/aspose-email-cloud/models/hierarchical_object_request.rb +150 -143
  94. data/lib/aspose-email-cloud/models/hierarchical_object_response.rb +150 -143
  95. data/lib/aspose-email-cloud/models/indexed_hierarchical_object.rb +124 -113
  96. data/lib/aspose-email-cloud/models/indexed_primitive_object.rb +122 -111
  97. data/lib/aspose-email-cloud/models/instant_messenger_address.rb +244 -0
  98. data/lib/aspose-email-cloud/models/link.rb +158 -147
  99. data/lib/aspose-email-cloud/models/linked_resource.rb +267 -0
  100. data/lib/aspose-email-cloud/models/list_response_of_ai_bcr_ocr_data.rb +214 -0
  101. data/lib/aspose-email-cloud/models/list_response_of_ai_name_component.rb +214 -0
  102. data/lib/aspose-email-cloud/models/list_response_of_ai_name_extracted.rb +214 -0
  103. data/lib/aspose-email-cloud/models/list_response_of_ai_name_gender_hypothesis.rb +214 -0
  104. data/lib/aspose-email-cloud/models/list_response_of_contact_dto.rb +214 -0
  105. data/lib/aspose-email-cloud/models/list_response_of_email_account_config.rb +214 -0
  106. data/lib/aspose-email-cloud/models/list_response_of_email_dto.rb +214 -0
  107. data/lib/aspose-email-cloud/models/list_response_of_email_thread.rb +214 -0
  108. data/lib/aspose-email-cloud/models/list_response_of_hierarchical_object.rb +214 -0
  109. data/lib/aspose-email-cloud/models/list_response_of_hierarchical_object_response.rb +145 -139
  110. data/lib/aspose-email-cloud/models/list_response_of_mail_server_folder.rb +145 -139
  111. data/lib/aspose-email-cloud/models/list_response_of_storage_file_location.rb +214 -0
  112. data/lib/aspose-email-cloud/models/list_response_of_storage_model_of_calendar_dto.rb +214 -0
  113. data/lib/aspose-email-cloud/models/list_response_of_storage_model_of_contact_dto.rb +214 -0
  114. data/lib/aspose-email-cloud/models/list_response_of_storage_model_of_email_dto.rb +214 -0
  115. data/lib/aspose-email-cloud/models/list_response_of_string.rb +145 -139
  116. data/lib/aspose-email-cloud/models/mail_address.rb +257 -0
  117. data/lib/aspose-email-cloud/models/mail_server_folder.rb +150 -143
  118. data/lib/aspose-email-cloud/models/mime_response.rb +146 -141
  119. data/lib/aspose-email-cloud/models/move_email_message_rq.rb +302 -0
  120. data/lib/aspose-email-cloud/models/move_email_thread_rq.rb +276 -0
  121. data/lib/aspose-email-cloud/models/name_value_pair.rb +226 -0
  122. data/lib/aspose-email-cloud/models/object_exist.rb +149 -143
  123. data/lib/aspose-email-cloud/models/phone_number.rb +244 -0
  124. data/lib/aspose-email-cloud/models/postal_address.rb +353 -0
  125. data/lib/aspose-email-cloud/models/primitive_object.rb +104 -95
  126. data/lib/aspose-email-cloud/models/reminder_attendee.rb +213 -0
  127. data/lib/aspose-email-cloud/models/reminder_trigger.rb +249 -0
  128. data/lib/aspose-email-cloud/models/requests/add_calendar_attachment_request_data.rb +99 -89
  129. data/lib/aspose-email-cloud/models/requests/add_contact_attachment_request_data.rb +109 -101
  130. data/lib/aspose-email-cloud/models/requests/add_email_attachment_request_data.rb +99 -89
  131. data/lib/aspose-email-cloud/models/requests/add_mapi_attachment_request_data.rb +99 -89
  132. data/lib/aspose-email-cloud/models/requests/ai_bcr_ocr_request_data.rb +79 -0
  133. data/lib/aspose-email-cloud/models/requests/ai_bcr_ocr_storage_request_data.rb +79 -0
  134. data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_model_request_data.rb +79 -0
  135. data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_ocr_data_model_request_data.rb +79 -0
  136. data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_request_data.rb +79 -0
  137. data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_storage_request_data.rb +79 -0
  138. data/lib/aspose-email-cloud/models/requests/ai_name_complete_request_data.rb +110 -0
  139. data/lib/aspose-email-cloud/models/requests/ai_name_expand_parsed_request_data.rb +79 -0
  140. data/lib/aspose-email-cloud/models/requests/ai_name_expand_request_data.rb +110 -0
  141. data/lib/aspose-email-cloud/models/requests/ai_name_format_parsed_request_data.rb +79 -0
  142. data/lib/aspose-email-cloud/models/requests/ai_name_format_request_data.rb +116 -0
  143. data/lib/aspose-email-cloud/models/requests/ai_name_genderize_parsed_request_data.rb +79 -0
  144. data/lib/aspose-email-cloud/models/requests/ai_name_genderize_request_data.rb +110 -0
  145. data/lib/aspose-email-cloud/models/requests/ai_name_match_parsed_request_data.rb +79 -0
  146. data/lib/aspose-email-cloud/models/requests/ai_name_match_request_data.rb +121 -0
  147. data/lib/aspose-email-cloud/models/requests/ai_name_parse_email_address_request_data.rb +110 -0
  148. data/lib/aspose-email-cloud/models/requests/ai_name_parse_request_data.rb +110 -0
  149. data/lib/aspose-email-cloud/models/requests/append_email_message_request_data.rb +79 -75
  150. data/lib/aspose-email-cloud/models/requests/append_email_model_message_request_data.rb +79 -0
  151. data/lib/aspose-email-cloud/models/requests/append_mime_message_request_data.rb +79 -75
  152. data/lib/aspose-email-cloud/models/requests/convert_calendar_model_to_alternate_request_data.rb +79 -0
  153. data/lib/aspose-email-cloud/models/requests/convert_calendar_model_to_file_request_data.rb +89 -0
  154. data/lib/aspose-email-cloud/models/requests/convert_calendar_request_data.rb +90 -0
  155. data/lib/aspose-email-cloud/models/requests/convert_contact_model_to_file_request_data.rb +89 -0
  156. data/lib/aspose-email-cloud/models/requests/convert_contact_request_data.rb +100 -0
  157. data/lib/aspose-email-cloud/models/requests/convert_email_model_to_file_request_data.rb +89 -0
  158. data/lib/aspose-email-cloud/models/requests/convert_email_request_data.rb +90 -0
  159. data/lib/aspose-email-cloud/models/requests/copy_file_request_data.rb +107 -92
  160. data/lib/aspose-email-cloud/models/requests/copy_folder_request_data.rb +101 -89
  161. data/lib/aspose-email-cloud/models/requests/create_calendar_request_data.rb +89 -82
  162. data/lib/aspose-email-cloud/models/requests/create_contact_request_data.rb +99 -94
  163. data/lib/aspose-email-cloud/models/requests/create_email_folder_request_data.rb +79 -75
  164. data/lib/aspose-email-cloud/models/requests/create_email_request_data.rb +89 -82
  165. data/lib/aspose-email-cloud/models/requests/create_folder_request_data.rb +84 -78
  166. data/lib/aspose-email-cloud/models/requests/create_mapi_request_data.rb +89 -82
  167. data/lib/aspose-email-cloud/models/requests/delete_calendar_property_request_data.rb +109 -96
  168. data/lib/aspose-email-cloud/models/requests/delete_contact_property_request_data.rb +119 -108
  169. data/lib/aspose-email-cloud/models/requests/delete_email_folder_request_data.rb +79 -75
  170. data/lib/aspose-email-cloud/models/requests/delete_email_message_request_data.rb +79 -75
  171. data/lib/aspose-email-cloud/models/requests/delete_email_thread_request_data.rb +89 -0
  172. data/lib/aspose-email-cloud/models/requests/delete_file_request_data.rb +90 -81
  173. data/lib/aspose-email-cloud/models/requests/delete_folder_request_data.rb +90 -81
  174. data/lib/aspose-email-cloud/models/requests/delete_mapi_attachment_request_data.rb +99 -89
  175. data/lib/aspose-email-cloud/models/requests/delete_mapi_properties_request_data.rb +89 -82
  176. data/lib/aspose-email-cloud/models/requests/discover_email_config_oauth_request_data.rb +79 -0
  177. data/lib/aspose-email-cloud/models/requests/discover_email_config_password_request_data.rb +79 -0
  178. data/lib/aspose-email-cloud/models/requests/discover_email_config_request_data.rb +86 -0
  179. data/lib/aspose-email-cloud/models/requests/download_file_request_data.rb +90 -81
  180. data/lib/aspose-email-cloud/models/requests/email_request.rb +75 -75
  181. data/lib/aspose-email-cloud/models/requests/fetch_email_message_request_data.rb +115 -93
  182. data/lib/aspose-email-cloud/models/requests/fetch_email_model_request_data.rb +115 -0
  183. data/lib/aspose-email-cloud/models/requests/fetch_email_thread_messages_request_data.rb +114 -0
  184. data/lib/aspose-email-cloud/models/requests/get_calendar_as_file_request_data.rb +101 -0
  185. data/lib/aspose-email-cloud/models/requests/get_calendar_attachment_request_data.rb +101 -88
  186. data/lib/aspose-email-cloud/models/requests/get_calendar_file_as_model_request_data.rb +80 -0
  187. data/lib/aspose-email-cloud/models/requests/get_calendar_list_request_data.rb +108 -95
  188. data/lib/aspose-email-cloud/models/requests/get_calendar_model_as_alternate_request_data.rb +107 -0
  189. data/lib/aspose-email-cloud/models/requests/get_calendar_model_list_request_data.rb +98 -0
  190. data/lib/aspose-email-cloud/models/requests/get_calendar_model_request_data.rb +91 -0
  191. data/lib/aspose-email-cloud/models/requests/get_calendar_request_data.rb +91 -81
  192. data/lib/aspose-email-cloud/models/requests/get_contact_as_file_request_data.rb +111 -0
  193. data/lib/aspose-email-cloud/models/requests/get_contact_attachment_request_data.rb +111 -100
  194. data/lib/aspose-email-cloud/models/requests/get_contact_file_as_model_request_data.rb +90 -0
  195. data/lib/aspose-email-cloud/models/requests/get_contact_list_request_data.rb +103 -92
  196. data/lib/aspose-email-cloud/models/requests/get_contact_model_list_request_data.rb +103 -0
  197. data/lib/aspose-email-cloud/models/requests/get_contact_model_request_data.rb +101 -0
  198. data/lib/aspose-email-cloud/models/requests/get_contact_properties_request_data.rb +101 -93
  199. data/lib/aspose-email-cloud/models/requests/get_disc_usage_request_data.rb +74 -71
  200. data/lib/aspose-email-cloud/models/requests/get_email_as_file_request_data.rb +101 -0
  201. data/lib/aspose-email-cloud/models/requests/get_email_attachment_request_data.rb +101 -88
  202. data/lib/aspose-email-cloud/models/requests/get_email_client_account_request_data.rb +102 -0
  203. data/lib/aspose-email-cloud/models/requests/get_email_client_multi_account_request_data.rb +102 -0
  204. data/lib/aspose-email-cloud/models/requests/get_email_file_as_model_request_data.rb +80 -0
  205. data/lib/aspose-email-cloud/models/requests/get_email_model_list_request_data.rb +103 -0
  206. data/lib/aspose-email-cloud/models/requests/get_email_model_request_data.rb +101 -0
  207. data/lib/aspose-email-cloud/models/requests/get_email_property_request_data.rb +101 -88
  208. data/lib/aspose-email-cloud/models/requests/get_email_request_data.rb +91 -81
  209. data/lib/aspose-email-cloud/models/requests/get_file_versions_request_data.rb +84 -78
  210. data/lib/aspose-email-cloud/models/requests/get_files_list_request_data.rb +84 -78
  211. data/lib/aspose-email-cloud/models/requests/get_mapi_attachment_request_data.rb +101 -88
  212. data/lib/aspose-email-cloud/models/requests/get_mapi_attachments_request_data.rb +91 -81
  213. data/lib/aspose-email-cloud/models/requests/get_mapi_list_request_data.rb +93 -80
  214. data/lib/aspose-email-cloud/models/requests/get_mapi_properties_request_data.rb +91 -81
  215. data/lib/aspose-email-cloud/models/requests/http_request.rb +51 -51
  216. data/lib/aspose-email-cloud/models/requests/is_email_address_disposable_request_data.rb +79 -0
  217. data/lib/aspose-email-cloud/models/requests/list_email_folders_request_data.rb +104 -88
  218. data/lib/aspose-email-cloud/models/requests/list_email_messages_request_data.rb +127 -105
  219. data/lib/aspose-email-cloud/models/requests/list_email_models_request_data.rb +122 -0
  220. data/lib/aspose-email-cloud/models/requests/list_email_threads_request_data.rb +121 -0
  221. data/lib/aspose-email-cloud/models/requests/move_email_message_request_data.rb +79 -0
  222. data/lib/aspose-email-cloud/models/requests/move_email_thread_request_data.rb +89 -0
  223. data/lib/aspose-email-cloud/models/requests/move_file_request_data.rb +107 -92
  224. data/lib/aspose-email-cloud/models/requests/move_folder_request_data.rb +101 -89
  225. data/lib/aspose-email-cloud/models/requests/object_exists_request_data.rb +90 -81
  226. data/lib/aspose-email-cloud/models/requests/save_calendar_model_request_data.rb +89 -0
  227. data/lib/aspose-email-cloud/models/requests/save_contact_model_request_data.rb +99 -0
  228. data/lib/aspose-email-cloud/models/requests/save_email_client_account_request_data.rb +79 -0
  229. data/lib/aspose-email-cloud/models/requests/save_email_client_multi_account_request_data.rb +79 -0
  230. data/lib/aspose-email-cloud/models/requests/save_email_model_request_data.rb +99 -0
  231. data/lib/aspose-email-cloud/models/requests/save_mail_account_request_data.rb +79 -75
  232. data/lib/aspose-email-cloud/models/requests/save_mail_o_auth_account_request_data.rb +79 -75
  233. data/lib/aspose-email-cloud/models/requests/send_email_mime_request_data.rb +79 -75
  234. data/lib/aspose-email-cloud/models/requests/send_email_model_request_data.rb +79 -0
  235. data/lib/aspose-email-cloud/models/requests/send_email_request_data.rb +79 -75
  236. data/lib/aspose-email-cloud/models/requests/set_email_property_request_data.rb +99 -89
  237. data/lib/aspose-email-cloud/models/requests/set_email_read_flag_request_data.rb +79 -75
  238. data/lib/aspose-email-cloud/models/requests/set_email_thread_read_flag_request_data.rb +89 -0
  239. data/lib/aspose-email-cloud/models/requests/storage_exists_request_data.rb +78 -75
  240. data/lib/aspose-email-cloud/models/requests/update_calendar_properties_request_data.rb +89 -82
  241. data/lib/aspose-email-cloud/models/requests/update_contact_properties_request_data.rb +99 -94
  242. data/lib/aspose-email-cloud/models/requests/update_mapi_properties_request_data.rb +89 -82
  243. data/lib/aspose-email-cloud/models/requests/upload_file_request_data.rb +96 -87
  244. data/lib/aspose-email-cloud/models/save_email_account_request.rb +214 -157
  245. data/lib/aspose-email-cloud/models/save_o_auth_email_account_request.rb +240 -166
  246. data/lib/aspose-email-cloud/models/send_email_base_request.rb +159 -145
  247. data/lib/aspose-email-cloud/models/send_email_mime_base_request.rb +158 -144
  248. data/lib/aspose-email-cloud/models/send_email_model_rq.rb +276 -0
  249. data/lib/aspose-email-cloud/models/set_email_property_request.rb +150 -143
  250. data/lib/aspose-email-cloud/models/set_message_read_flag_account_base_request.rb +162 -146
  251. data/lib/aspose-email-cloud/models/storage_exist.rb +145 -141
  252. data/lib/aspose-email-cloud/models/storage_file.rb +161 -149
  253. data/lib/aspose-email-cloud/models/storage_file_location.rb +154 -145
  254. data/lib/aspose-email-cloud/models/storage_file_rq_of_email_client_account.rb +225 -0
  255. data/lib/aspose-email-cloud/models/storage_file_rq_of_email_client_multi_account.rb +225 -0
  256. data/lib/aspose-email-cloud/models/storage_folder_location.rb +150 -143
  257. data/lib/aspose-email-cloud/models/storage_model_of_calendar_dto.rb +225 -0
  258. data/lib/aspose-email-cloud/models/storage_model_of_contact_dto.rb +225 -0
  259. data/lib/aspose-email-cloud/models/storage_model_of_email_dto.rb +225 -0
  260. data/lib/aspose-email-cloud/models/storage_model_rq_of_calendar_dto.rb +225 -0
  261. data/lib/aspose-email-cloud/models/storage_model_rq_of_contact_dto.rb +225 -0
  262. data/lib/aspose-email-cloud/models/storage_model_rq_of_email_dto.rb +225 -0
  263. data/lib/aspose-email-cloud/models/url.rb +244 -0
  264. data/lib/aspose-email-cloud/models/value_response.rb +146 -141
  265. data/lib/aspose-email-cloud/models/value_t_of_boolean.rb +217 -0
  266. data/lib/aspose-email-cloud/version.rb +15 -15
  267. metadata +206 -53
  268. data/lib/aspose-email-cloud/models/contact_format.rb +0 -45
@@ -1,64 +1,78 @@
1
- # ----------------------------------------------------------------------------
2
- # <copyright company="Aspose" file="SaveOAuthEmailAccountRequest.rb">
3
- # Copyright (c) 2018-2019 Aspose Pty Ltd. All rights reserved.
4
- # </copyright>
5
- # <summary>
6
- # Permission is hereby granted, free of charge, to any person obtaining a
7
- # copy of this software and associated documentation files (the "Software"),
8
- # to deal in the Software without restriction, including without limitation
9
- # the rights to use, copy, modify, merge, publish, distribute, sublicense,
10
- # and/or sell copies of the Software, and to permit persons to whom the
11
- # Software is furnished to do so, subject to the following conditions:
12
- #
13
- # The above copyright notice and this permission notice shall be included in
14
- # all copies or substantial portions of the Software.
15
- #
16
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
- # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22
- # DEALINGS IN THE SOFTWARE.
23
- # </summary>
24
- # ----------------------------------------------------------------------------
25
-
26
-
27
- require 'date'
28
-
29
- module AsposeEmailCloud
30
- # Save email account settings with OAuth request
1
+ # ----------------------------------------------------------------------------
2
+ # <copyright company="Aspose" file="SaveOAuthEmailAccountRequest.rb">
3
+ # Copyright (c) 2018-2020 Aspose Pty Ltd. All rights reserved.
4
+ # </copyright>
5
+ # <summary>
6
+ # Permission is hereby granted, free of charge, to any person obtaining a
7
+ # copy of this software and associated documentation files (the "Software"),
8
+ # to deal in the Software without restriction, including without limitation
9
+ # the rights to use, copy, modify, merge, publish, distribute, sublicense,
10
+ # and/or sell copies of the Software, and to permit persons to whom the
11
+ # Software is furnished to do so, subject to the following conditions:
12
+ #
13
+ # The above copyright notice and this permission notice shall be included in
14
+ # all copies or substantial portions of the Software.
15
+ #
16
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
+ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22
+ # DEALINGS IN THE SOFTWARE.
23
+ # </summary>
24
+ # ----------------------------------------------------------------------------
25
+
26
+
27
+ require 'date'
28
+
29
+ module AsposeEmailCloud
30
+ # Save email account settings with OAuth request
31
31
  class SaveOAuthEmailAccountRequest
32
- # Email account host
32
+ # Email account host
33
+ # @return [String]
33
34
  attr_accessor :host
34
35
 
35
- # Email account port
36
+ # Email account port
37
+ # @return [Integer]
36
38
  attr_accessor :port
37
39
 
38
- # Email account login
40
+ # Email account login
41
+ # @return [String]
39
42
  attr_accessor :login
40
43
 
41
- # Email account security options
44
+ # Email account security mode Enum, available values: None, SSLExplicit, SSLImplicit, SSLAuto, Auto
45
+ # @return [String]
42
46
  attr_accessor :security_options
43
47
 
44
- # Email account protocol type
48
+ # Type of connection protocol. Enum, available values: IMAP, POP3, SMTP, EWS, WebDav
49
+ # @return [String]
45
50
  attr_accessor :protocol_type
46
51
 
47
- # Email account description
52
+ # Email account description
53
+ # @return [String]
48
54
  attr_accessor :description
49
55
 
50
- # A storage file location info to store email account
56
+ # A storage file location info to store email account
57
+ # @return [StorageFileLocation]
51
58
  attr_accessor :storage_file
52
59
 
53
- # OAuth client identifier
60
+ # OAuth client identifier
61
+ # @return [String]
54
62
  attr_accessor :client_id
55
63
 
56
- # OAuth client secret
64
+ # OAuth client secret
65
+ # @return [String]
57
66
  attr_accessor :client_secret
58
67
 
59
- # OAuth refresh token
68
+ # OAuth refresh token
69
+ # @return [String]
60
70
  attr_accessor :refresh_token
61
71
 
72
+ # The url to obtain access token. If not specified, will try to discover from email account host.
73
+ # @return [String]
74
+ attr_accessor :request_url
75
+
62
76
  # Attribute mapping from ruby-style variable name to JSON key.
63
77
  def self.attribute_map
64
78
  {
@@ -71,7 +85,8 @@ module AsposeEmailCloud
71
85
  :'storage_file' => :'storageFile',
72
86
  :'client_id' => :'clientId',
73
87
  :'client_secret' => :'clientSecret',
74
- :'refresh_token' => :'refreshToken'
88
+ :'refresh_token' => :'refreshToken',
89
+ :'request_url' => :'requestUrl'
75
90
  }
76
91
  end
77
92
 
@@ -81,13 +96,14 @@ module AsposeEmailCloud
81
96
  :'host' => :'String',
82
97
  :'port' => :'Integer',
83
98
  :'login' => :'String',
84
- :'security_options' => :'Object',
85
- :'protocol_type' => :'Object',
99
+ :'security_options' => :'String',
100
+ :'protocol_type' => :'String',
86
101
  :'description' => :'String',
87
102
  :'storage_file' => :'StorageFileLocation',
88
103
  :'client_id' => :'String',
89
104
  :'client_secret' => :'String',
90
- :'refresh_token' => :'String'
105
+ :'refresh_token' => :'String',
106
+ :'request_url' => :'String'
91
107
  }
92
108
  end
93
109
 
@@ -138,20 +154,36 @@ module AsposeEmailCloud
138
154
  if attributes.has_key?(:'refreshToken')
139
155
  self.refresh_token = attributes[:'refreshToken']
140
156
  end
157
+
158
+ if attributes.has_key?(:'requestUrl')
159
+ self.request_url = attributes[:'requestUrl']
160
+ end
141
161
  end
142
162
 
143
163
  # Initializes the object
144
- def initialize(host=nil, port=nil, login=nil, security_options=nil, protocol_type=nil, description=nil, storage_file=nil, client_id=nil, client_secret=nil, refresh_token=nil)
145
- self.host = host
146
- self.port = port
147
- self.login = login
148
- self.security_options = security_options
149
- self.protocol_type = protocol_type
150
- self.description = description
151
- self.storage_file = storage_file
152
- self.client_id = client_id
153
- self.client_secret = client_secret
154
- self.refresh_token = refresh_token
164
+ # @param [String] host Email account host
165
+ # @param [Integer] port Email account port
166
+ # @param [String] login Email account login
167
+ # @param [String] security_options Email account security mode Enum, available values: None, SSLExplicit, SSLImplicit, SSLAuto, Auto
168
+ # @param [String] protocol_type Type of connection protocol. Enum, available values: IMAP, POP3, SMTP, EWS, WebDav
169
+ # @param [String] description Email account description
170
+ # @param [StorageFileLocation] storage_file A storage file location info to store email account
171
+ # @param [String] client_id OAuth client identifier
172
+ # @param [String] client_secret OAuth client secret
173
+ # @param [String] refresh_token OAuth refresh token
174
+ # @param [String] request_url The url to obtain access token. If not specified, will try to discover from email account host.
175
+ def initialize(host=nil, port=nil, login=nil, security_options=nil, protocol_type=nil, description=nil, storage_file=nil, client_id=nil, client_secret=nil, refresh_token=nil, request_url=nil)
176
+ self.host = host if host
177
+ self.port = port if port
178
+ self.login = login if login
179
+ self.security_options = security_options if security_options
180
+ self.protocol_type = protocol_type if protocol_type
181
+ self.description = description if description
182
+ self.storage_file = storage_file if storage_file
183
+ self.client_id = client_id if client_id
184
+ self.client_secret = client_secret if client_secret
185
+ self.refresh_token = refresh_token if refresh_token
186
+ self.request_url = request_url if request_url
155
187
  end
156
188
 
157
189
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -182,10 +214,18 @@ module AsposeEmailCloud
182
214
  invalid_properties.push('invalid value for "security_options", security_options cannot be nil.')
183
215
  end
184
216
 
217
+ if @security_options.to_s.length < 1
218
+ invalid_properties.push('invalid value for "security_options", the character length must be great than or equal to 1.')
219
+ end
220
+
185
221
  if @protocol_type.nil?
186
222
  invalid_properties.push('invalid value for "protocol_type", protocol_type cannot be nil.')
187
223
  end
188
224
 
225
+ if @protocol_type.to_s.length < 1
226
+ invalid_properties.push('invalid value for "protocol_type", the character length must be great than or equal to 1.')
227
+ end
228
+
189
229
  if @storage_file.nil?
190
230
  invalid_properties.push('invalid value for "storage_file", storage_file cannot be nil.')
191
231
  end
@@ -226,7 +266,9 @@ module AsposeEmailCloud
226
266
  return false if @login.nil?
227
267
  return false if @login.to_s.length < 1
228
268
  return false if @security_options.nil?
269
+ return false if @security_options.to_s.length < 1
229
270
  return false if @protocol_type.nil?
271
+ return false if @protocol_type.to_s.length < 1
230
272
  return false if @storage_file.nil?
231
273
  return false if @client_id.nil?
232
274
  return false if @client_id.to_s.length < 1
@@ -265,6 +307,34 @@ module AsposeEmailCloud
265
307
  @login = login
266
308
  end
267
309
 
310
+ # Custom attribute writer method with validation
311
+ # @param [Object] security_options Value to be assigned
312
+ def security_options=(security_options)
313
+ if security_options.nil?
314
+ fail ArgumentError, 'security_options cannot be nil'
315
+ end
316
+
317
+ if security_options.to_s.length < 1
318
+ fail ArgumentError, 'invalid value for "security_options", the character length must be great than or equal to 1.'
319
+ end
320
+
321
+ @security_options = security_options
322
+ end
323
+
324
+ # Custom attribute writer method with validation
325
+ # @param [Object] protocol_type Value to be assigned
326
+ def protocol_type=(protocol_type)
327
+ if protocol_type.nil?
328
+ fail ArgumentError, 'protocol_type cannot be nil'
329
+ end
330
+
331
+ if protocol_type.to_s.length < 1
332
+ fail ArgumentError, 'invalid value for "protocol_type", the character length must be great than or equal to 1.'
333
+ end
334
+
335
+ @protocol_type = protocol_type
336
+ end
337
+
268
338
  # Custom attribute writer method with validation
269
339
  # @param [Object] client_id Value to be assigned
270
340
  def client_id=(client_id)
@@ -321,7 +391,8 @@ module AsposeEmailCloud
321
391
  storage_file == o.storage_file &&
322
392
  client_id == o.client_id &&
323
393
  client_secret == o.client_secret &&
324
- refresh_token == o.refresh_token
394
+ refresh_token == o.refresh_token &&
395
+ request_url == o.request_url
325
396
  end
326
397
 
327
398
  # @see the `==` method
@@ -333,115 +404,118 @@ module AsposeEmailCloud
333
404
  # Calculates hash code according to all attributes.
334
405
  # @return [Fixnum] Hash code
335
406
  def hash
336
- [host, port, login, security_options, protocol_type, description, storage_file, client_id, client_secret, refresh_token].hash
407
+ [host, port, login, security_options, protocol_type, description, storage_file, client_id, client_secret, refresh_token, request_url].hash
408
+ end
409
+
410
+ # Builds the object from hash
411
+ # @param [Hash] attributes Model attributes in the form of hash
412
+ # @return [Object] Returns the model itself
413
+ def build_from_hash(attributes)
414
+ return nil unless attributes.is_a?(Hash)
415
+ self.class.swagger_types.each_pair do |key, type|
416
+ attribute_key = self.class.attribute_map[key]
417
+ attribute_key = (attribute_key[0, 1].downcase + attribute_key[1..-1]).to_sym
418
+ if type =~ /\AArray<(.*)>/i
419
+ # check to ensure the input is an array given that the the attribute
420
+ # is documented as an array but the input is not
421
+ if attributes[attribute_key].is_a?(Array)
422
+ self.send("#{key}=", attributes[attribute_key].map { |v| _deserialize($1, v) })
423
+ end
424
+ elsif !attributes[attribute_key].nil?
425
+ self.send("#{key}=", _deserialize(type, attributes[attribute_key]))
426
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
427
+ end
428
+
429
+ self
430
+ end
431
+
432
+ # Deserializes the data based on type
433
+ # @param string type Data type
434
+ # @param string value Value to be deserialized
435
+ # @return [Object] Deserialized data
436
+ def _deserialize(type, value)
437
+ case type.to_sym
438
+ when :DateTime
439
+ DateTime.parse(value)
440
+ when :Date
441
+ Date.parse(value)
442
+ when :String
443
+ value.to_s
444
+ when :Integer
445
+ value.to_i
446
+ when :Float
447
+ value.to_f
448
+ when :BOOLEAN
449
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
450
+ true
451
+ else
452
+ false
453
+ end
454
+ when :Object
455
+ # generic object (usually a Hash), return directly
456
+ value
457
+ when /\AArray<(?<inner_type>.+)>\z/
458
+ inner_type = Regexp.last_match[:inner_type]
459
+ value.map { |v| _deserialize(inner_type, v) }
460
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
461
+ k_type = Regexp.last_match[:k_type]
462
+ v_type = Regexp.last_match[:v_type]
463
+ {}.tap do |hash|
464
+ value.each do |k, v|
465
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
466
+ end
467
+ end
468
+ else # model
469
+ sub_type = value[:type] || value[:discriminator] || type
470
+ if AsposeEmailCloud.const_defined?(sub_type)
471
+ type = sub_type
472
+ end
473
+ temp_model = AsposeEmailCloud.const_get(type).new
474
+ temp_model.build_from_hash(value)
475
+ end
476
+ end
477
+
478
+ # Returns the string representation of the object
479
+ # @return [String] String presentation of the object
480
+ def to_s
481
+ to_hash.to_s
482
+ end
483
+
484
+ # to_body is an alias to to_hash (backward compatibility)
485
+ # @return [Hash] Returns the object in the form of hash
486
+ def to_body
487
+ to_hash
488
+ end
489
+
490
+ # Returns the object in the form of hash
491
+ # @return [Hash] Returns the object in the form of hash
492
+ def to_hash
493
+ hash = {}
494
+ self.class.attribute_map.each_pair do |attr, param|
495
+ value = self.send(attr)
496
+ next if value.nil?
497
+ hash[param] = _to_hash(value)
498
+ end
499
+ hash
500
+ end
501
+
502
+ # Outputs non-array value in the form of hash
503
+ # For object, use to_hash. Otherwise, just return the value
504
+ # @param [Object] value Any valid value
505
+ # @return [Hash] Returns the value in the form of hash
506
+ def _to_hash(value)
507
+ if value.is_a?(Array)
508
+ value.compact.map { |v| _to_hash(v) }
509
+ elsif value.is_a?(Hash)
510
+ {}.tap do |hash|
511
+ value.each { |k, v| hash[k] = _to_hash(v) }
512
+ end
513
+ elsif value.respond_to? :to_hash
514
+ value.to_hash
515
+ else
516
+ value
517
+ end
337
518
  end
338
519
 
339
- # Builds the object from hash
340
- # @param [Hash] attributes Model attributes in the form of hash
341
- # @return [Object] Returns the model itself
342
- def build_from_hash(attributes)
343
- return nil unless attributes.is_a?(Hash)
344
- self.class.swagger_types.each_pair do |key, type|
345
- attribute_key = self.class.attribute_map[key]
346
- attribute_key = (attribute_key[0, 1].downcase + attribute_key[1..-1]).to_sym
347
- if type =~ /\AArray<(.*)>/i
348
- # check to ensure the input is an array given that the the attribute
349
- # is documented as an array but the input is not
350
- if attributes[attribute_key].is_a?(Array)
351
- self.send("#{key}=", attributes[attribute_key].map { |v| _deserialize($1, v) })
352
- end
353
- elsif !attributes[attribute_key].nil?
354
- self.send("#{key}=", _deserialize(type, attributes[attribute_key]))
355
- end # or else data not found in attributes(hash), not an issue as the data can be optional
356
- end
357
-
358
- self
359
- end
360
-
361
- # Deserializes the data based on type
362
- # @param string type Data type
363
- # @param string value Value to be deserialized
364
- # @return [Object] Deserialized data
365
- def _deserialize(type, value)
366
- case type.to_sym
367
- when :DateTime
368
- DateTime.parse(value)
369
- when :Date
370
- Date.parse(value)
371
- when :String
372
- value.to_s
373
- when :Integer
374
- value.to_i
375
- when :Float
376
- value.to_f
377
- when :BOOLEAN
378
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
379
- true
380
- else
381
- false
382
- end
383
- when :Object
384
- # generic object (usually a Hash), return directly
385
- value
386
- when /\AArray<(?<inner_type>.+)>\z/
387
- inner_type = Regexp.last_match[:inner_type]
388
- value.map { |v| _deserialize(inner_type, v) }
389
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
390
- k_type = Regexp.last_match[:k_type]
391
- v_type = Regexp.last_match[:v_type]
392
- {}.tap do |hash|
393
- value.each do |k, v|
394
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
395
- end
396
- end
397
- else # model
398
- type = value[:type] || type
399
- temp_model = AsposeEmailCloud.const_get(type).new
400
- temp_model.build_from_hash(value)
401
- end
402
- end
403
-
404
- # Returns the string representation of the object
405
- # @return [String] String presentation of the object
406
- def to_s
407
- to_hash.to_s
408
- end
409
-
410
- # to_body is an alias to to_hash (backward compatibility)
411
- # @return [Hash] Returns the object in the form of hash
412
- def to_body
413
- to_hash
414
- end
415
-
416
- # Returns the object in the form of hash
417
- # @return [Hash] Returns the object in the form of hash
418
- def to_hash
419
- hash = {}
420
- self.class.attribute_map.each_pair do |attr, param|
421
- value = self.send(attr)
422
- next if value.nil?
423
- hash[param] = _to_hash(value)
424
- end
425
- hash
426
- end
427
-
428
- # Outputs non-array value in the form of hash
429
- # For object, use to_hash. Otherwise, just return the value
430
- # @param [Object] value Any valid value
431
- # @return [Hash] Returns the value in the form of hash
432
- def _to_hash(value)
433
- if value.is_a?(Array)
434
- value.compact.map { |v| _to_hash(v) }
435
- elsif value.is_a?(Hash)
436
- {}.tap do |hash|
437
- value.each { |k, v| hash[k] = _to_hash(v) }
438
- end
439
- elsif value.respond_to? :to_hash
440
- value.to_hash
441
- else
442
- value
443
- end
444
- end
445
-
446
- end
447
- end
520
+ end
521
+ end