aspose_email_cloud 20.1.0 → 20.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (355) hide show
  1. checksums.yaml +4 -4
  2. data/lib/aspose-email-cloud.rb +215 -174
  3. data/lib/aspose-email-cloud/api/ai_bcr_api.rb +84 -0
  4. data/lib/aspose-email-cloud/api/ai_group.rb +49 -0
  5. data/lib/aspose-email-cloud/api/ai_name_api.rb +213 -0
  6. data/lib/aspose-email-cloud/api/calendar_api.rb +206 -0
  7. data/lib/aspose-email-cloud/api/client_account_api.rb +121 -0
  8. data/lib/aspose-email-cloud/api/client_folder_api.rb +113 -0
  9. data/lib/aspose-email-cloud/api/client_group.rb +59 -0
  10. data/lib/aspose-email-cloud/api/client_message_api.rb +230 -0
  11. data/lib/aspose-email-cloud/api/client_thread_api.rb +149 -0
  12. data/lib/aspose-email-cloud/api/cloud_storage_group.rb +54 -0
  13. data/lib/aspose-email-cloud/api/contact_api.rb +171 -0
  14. data/lib/aspose-email-cloud/api/disposable_email_api.rb +57 -0
  15. data/lib/aspose-email-cloud/api/email_api.rb +171 -855
  16. data/lib/aspose-email-cloud/api/email_cloud.rb +96 -0
  17. data/lib/aspose-email-cloud/api/email_config_api.rb +111 -0
  18. data/lib/aspose-email-cloud/api/file_api.rb +92 -0
  19. data/lib/aspose-email-cloud/api/folder_api.rb +93 -0
  20. data/lib/aspose-email-cloud/api/mapi_calendar_api.rb +147 -0
  21. data/lib/aspose-email-cloud/api/mapi_contact_api.rb +147 -0
  22. data/lib/aspose-email-cloud/api/mapi_group.rb +54 -0
  23. data/lib/aspose-email-cloud/api/mapi_message_api.rb +147 -0
  24. data/lib/aspose-email-cloud/api/storage_api.rb +81 -0
  25. data/lib/aspose-email-cloud/api_client.rb +387 -382
  26. data/lib/aspose-email-cloud/api_error.rb +41 -41
  27. data/lib/aspose-email-cloud/api_invoker.rb +92 -0
  28. data/lib/aspose-email-cloud/configuration.rb +240 -240
  29. data/lib/aspose-email-cloud/models/ai_bcr_image.rb +204 -215
  30. data/lib/aspose-email-cloud/models/ai_bcr_image_storage_file.rb +218 -228
  31. data/lib/aspose-email-cloud/models/ai_bcr_options.rb +208 -223
  32. data/lib/aspose-email-cloud/models/ai_bcr_parse_request.rb +93 -0
  33. data/lib/aspose-email-cloud/models/{ai_bcr_parse_storage_rq.rb → ai_bcr_parse_storage_request.rb} +227 -248
  34. data/lib/aspose-email-cloud/models/{requests/ai_name_complete_request_data.rb → ai_name_complete_request.rb} +104 -91
  35. data/lib/aspose-email-cloud/models/ai_name_component.rb +241 -264
  36. data/lib/aspose-email-cloud/models/ai_name_component_list.rb +199 -0
  37. data/lib/aspose-email-cloud/models/ai_name_cultural_context.rb +240 -267
  38. data/lib/aspose-email-cloud/models/{requests/ai_name_expand_request_data.rb → ai_name_expand_request.rb} +104 -91
  39. data/lib/aspose-email-cloud/models/ai_name_extracted.rb +213 -230
  40. data/lib/aspose-email-cloud/models/ai_name_extracted_component.rb +213 -228
  41. data/lib/aspose-email-cloud/models/ai_name_extracted_list.rb +199 -0
  42. data/lib/aspose-email-cloud/models/ai_name_format_request.rb +110 -0
  43. data/lib/aspose-email-cloud/models/ai_name_formatted.rb +208 -223
  44. data/lib/aspose-email-cloud/models/ai_name_gender_hypothesis.rb +218 -233
  45. data/lib/aspose-email-cloud/models/{list_response_of_ai_bcr_ocr_data.rb → ai_name_gender_hypothesis_list.rb} +199 -211
  46. data/lib/aspose-email-cloud/models/ai_name_genderize_request.rb +104 -0
  47. data/lib/aspose-email-cloud/models/{ai_name_parsed_match_rq.rb → ai_name_match_parsed_request.rb} +236 -263
  48. data/lib/aspose-email-cloud/models/ai_name_match_request.rb +114 -0
  49. data/lib/aspose-email-cloud/models/ai_name_match_result.rb +213 -230
  50. data/lib/aspose-email-cloud/models/ai_name_mismatch.rb +227 -246
  51. data/lib/aspose-email-cloud/models/ai_name_parse_email_address_request.rb +105 -0
  52. data/lib/aspose-email-cloud/models/ai_name_parse_request.rb +104 -0
  53. data/lib/aspose-email-cloud/models/{ai_name_parsed_rq.rb → ai_name_parsed_request.rb} +222 -243
  54. data/lib/aspose-email-cloud/models/ai_name_weighted.rb +213 -228
  55. data/lib/aspose-email-cloud/models/ai_name_weighted_variants.rb +208 -225
  56. data/lib/aspose-email-cloud/models/alternate_view.rb +244 -279
  57. data/lib/aspose-email-cloud/models/associated_person.rb +222 -241
  58. data/lib/aspose-email-cloud/models/attachment.rb +276 -321
  59. data/lib/aspose-email-cloud/models/attachment_base.rb +226 -251
  60. data/lib/aspose-email-cloud/models/{calendar_dto_alternate_rq.rb → calendar_as_alternate_request.rb} +246 -265
  61. data/lib/aspose-email-cloud/models/calendar_as_file_request.rb +218 -0
  62. data/lib/aspose-email-cloud/models/{requests/save_email_model_request_data.rb → calendar_convert_request.rb} +84 -89
  63. data/lib/aspose-email-cloud/models/calendar_dto.rb +462 -554
  64. data/lib/aspose-email-cloud/models/{requests/ai_bcr_ocr_storage_request_data.rb → calendar_from_file_request.rb} +74 -75
  65. data/lib/aspose-email-cloud/models/calendar_get_as_alternate_request.rb +102 -0
  66. data/lib/aspose-email-cloud/models/calendar_get_as_file_request.rb +96 -0
  67. data/lib/aspose-email-cloud/models/{requests/get_email_model_list_request_data.rb → calendar_get_list_request.rb} +93 -87
  68. data/lib/aspose-email-cloud/models/{requests/get_email_request_data.rb → calendar_get_request.rb} +86 -81
  69. data/lib/aspose-email-cloud/models/calendar_reminder.rb +272 -315
  70. data/lib/aspose-email-cloud/models/{storage_model_rq_of_calendar_dto.rb → calendar_save_request.rb} +232 -222
  71. data/lib/aspose-email-cloud/models/{calendar_dto_list.rb → calendar_storage_list.rb} +199 -212
  72. data/lib/aspose-email-cloud/models/client_account_base_request.rb +204 -0
  73. data/lib/aspose-email-cloud/models/{requests/get_email_attachment_request_data.rb → client_account_get_multi_request.rb} +87 -88
  74. data/lib/aspose-email-cloud/models/{requests/create_email_request_data.rb → client_account_get_request.rb} +86 -82
  75. data/lib/aspose-email-cloud/models/client_account_save_multi_request.rb +218 -0
  76. data/lib/aspose-email-cloud/models/client_account_save_request.rb +218 -0
  77. data/lib/aspose-email-cloud/models/{email_property.rb → client_folder_create_request.rb} +246 -265
  78. data/lib/aspose-email-cloud/models/{ai_bcr_base64_image.rb → client_folder_delete_request.rb} +237 -228
  79. data/lib/aspose-email-cloud/models/client_folder_get_list_request.rb +93 -0
  80. data/lib/aspose-email-cloud/models/client_message_append_file_request.rb +114 -0
  81. data/lib/aspose-email-cloud/models/client_message_append_request.rb +241 -0
  82. data/lib/aspose-email-cloud/models/client_message_base_request.rb +237 -0
  83. data/lib/aspose-email-cloud/models/{ai_bcr_ocr_data.rb → client_message_delete_request.rb} +246 -253
  84. data/lib/aspose-email-cloud/models/client_message_fetch_file_request.rb +108 -0
  85. data/lib/aspose-email-cloud/models/client_message_fetch_request.rb +114 -0
  86. data/lib/aspose-email-cloud/models/{requests/list_email_messages_request_data.rb → client_message_list_request.rb} +121 -105
  87. data/lib/aspose-email-cloud/models/{set_message_read_flag_account_base_request.rb → client_message_move_request.rb} +279 -315
  88. data/lib/aspose-email-cloud/models/client_message_send_file_request.rb +103 -0
  89. data/lib/aspose-email-cloud/models/client_message_send_request.rb +218 -0
  90. data/lib/aspose-email-cloud/models/client_message_set_is_read_request.rb +251 -0
  91. data/lib/aspose-email-cloud/models/{hierarchical_object_response.rb → client_thread_base_request.rb} +237 -223
  92. data/lib/aspose-email-cloud/models/{hierarchical_object.rb → client_thread_delete_request.rb} +246 -244
  93. data/lib/aspose-email-cloud/models/client_thread_get_list_request.rb +108 -0
  94. data/lib/aspose-email-cloud/models/client_thread_get_messages_request.rb +103 -0
  95. data/lib/aspose-email-cloud/models/{account_base_request.rb → client_thread_move_request.rb} +270 -260
  96. data/lib/aspose-email-cloud/models/client_thread_set_is_read_request.rb +260 -0
  97. data/lib/aspose-email-cloud/models/contact_as_file_request.rb +218 -0
  98. data/lib/aspose-email-cloud/models/contact_convert_request.rb +94 -0
  99. data/lib/aspose-email-cloud/models/contact_dto.rb +529 -696
  100. data/lib/aspose-email-cloud/models/{requests/convert_email_request_data.rb → contact_from_file_request.rb} +84 -83
  101. data/lib/aspose-email-cloud/models/contact_get_as_file_request.rb +106 -0
  102. data/lib/aspose-email-cloud/models/{requests/get_contact_model_list_request_data.rb → contact_get_list_request.rb} +99 -87
  103. data/lib/aspose-email-cloud/models/{requests/get_contact_model_request_data.rb → contact_get_request.rb} +96 -88
  104. data/lib/aspose-email-cloud/models/contact_list.rb +199 -0
  105. data/lib/aspose-email-cloud/models/contact_photo.rb +252 -228
  106. data/lib/aspose-email-cloud/models/{storage_model_rq_of_contact_dto.rb → contact_save_request.rb} +232 -222
  107. data/lib/aspose-email-cloud/models/{contact_dto_list.rb → contact_storage_list.rb} +199 -212
  108. data/lib/aspose-email-cloud/models/content_type.rb +235 -264
  109. data/lib/aspose-email-cloud/models/content_type_parameter.rb +208 -223
  110. data/lib/aspose-email-cloud/models/{requests/copy_file_request_data.rb → copy_file_request.rb} +101 -92
  111. data/lib/aspose-email-cloud/models/{requests/copy_folder_request_data.rb → copy_folder_request.rb} +95 -89
  112. data/lib/aspose-email-cloud/models/{requests/create_folder_request_data.rb → create_folder_request.rb} +79 -78
  113. data/lib/aspose-email-cloud/models/customer_event.rb +213 -228
  114. data/lib/aspose-email-cloud/models/daily_recurrence_pattern_dto.rb +261 -0
  115. data/lib/aspose-email-cloud/models/{requests/delete_file_request_data.rb → delete_file_request.rb} +85 -81
  116. data/lib/aspose-email-cloud/models/{requests/delete_folder_request_data.rb → delete_folder_request.rb} +85 -81
  117. data/lib/aspose-email-cloud/models/disc_usage.rb +218 -233
  118. data/lib/aspose-email-cloud/models/discover_email_config_request.rb +246 -0
  119. data/lib/aspose-email-cloud/models/{requests/ai_bcr_parse_model_request_data.rb → disposable_email_is_disposable_request.rb} +75 -75
  120. data/lib/aspose-email-cloud/models/{requests/download_file_request_data.rb → download_file_request.rb} +85 -81
  121. data/lib/aspose-email-cloud/models/{link.rb → email_account_config.rb} +277 -249
  122. data/lib/aspose-email-cloud/models/{list_response_of_hierarchical_object.rb → email_account_config_list.rb} +199 -211
  123. data/lib/aspose-email-cloud/models/email_address.rb +273 -267
  124. data/lib/aspose-email-cloud/models/email_as_file_request.rb +218 -0
  125. data/lib/aspose-email-cloud/models/{email_account_request.rb → email_client_account.rb} +316 -394
  126. data/lib/aspose-email-cloud/models/{ai_bcr_parse_ocr_data_rq.rb → email_client_account_credentials.rb} +238 -230
  127. data/lib/aspose-email-cloud/models/{save_o_auth_email_account_request.rb → email_client_account_oauth_credentials.rb} +346 -505
  128. data/lib/aspose-email-cloud/models/{indexed_hierarchical_object.rb → email_client_account_password_credentials.rb} +271 -262
  129. data/lib/aspose-email-cloud/models/email_client_multi_account.rb +213 -0
  130. data/lib/aspose-email-cloud/models/email_config_discover_oauth_request.rb +353 -0
  131. data/lib/aspose-email-cloud/models/email_config_discover_password_request.rb +278 -0
  132. data/lib/aspose-email-cloud/models/email_config_discover_request.rb +81 -0
  133. data/lib/aspose-email-cloud/models/email_convert_request.rb +94 -0
  134. data/lib/aspose-email-cloud/models/email_dto.rb +523 -678
  135. data/lib/aspose-email-cloud/models/email_from_file_request.rb +84 -0
  136. data/lib/aspose-email-cloud/models/{requests/get_email_as_file_request_data.rb → email_get_as_file_request.rb} +96 -88
  137. data/lib/aspose-email-cloud/models/email_get_list_request.rb +99 -0
  138. data/lib/aspose-email-cloud/models/email_get_request.rb +96 -0
  139. data/lib/aspose-email-cloud/models/email_list.rb +199 -0
  140. data/lib/aspose-email-cloud/models/{requests/email_request.rb → email_request.rb} +72 -75
  141. data/lib/aspose-email-cloud/models/{storage_model_rq_of_email_dto.rb → email_save_request.rb} +232 -222
  142. data/lib/aspose-email-cloud/models/{email_dto_list.rb → email_storage_list.rb} +199 -212
  143. data/lib/aspose-email-cloud/models/email_thread.rb +226 -0
  144. data/lib/aspose-email-cloud/models/email_thread_list.rb +199 -0
  145. data/lib/aspose-email-cloud/models/enum_with_custom_of_associated_person_category.rb +231 -227
  146. data/lib/aspose-email-cloud/models/enum_with_custom_of_email_address_category.rb +231 -227
  147. data/lib/aspose-email-cloud/models/enum_with_custom_of_event_category.rb +231 -227
  148. data/lib/aspose-email-cloud/models/enum_with_custom_of_instant_messenger_category.rb +231 -227
  149. data/lib/aspose-email-cloud/models/enum_with_custom_of_phone_number_category.rb +231 -227
  150. data/lib/aspose-email-cloud/models/enum_with_custom_of_postal_address_category.rb +231 -227
  151. data/lib/aspose-email-cloud/models/enum_with_custom_of_url_category.rb +231 -227
  152. data/lib/aspose-email-cloud/models/error.rb +226 -249
  153. data/lib/aspose-email-cloud/models/error_details.rb +213 -228
  154. data/lib/aspose-email-cloud/models/file_version.rb +268 -303
  155. data/lib/aspose-email-cloud/models/file_versions.rb +199 -212
  156. data/lib/aspose-email-cloud/models/files_list.rb +199 -212
  157. data/lib/aspose-email-cloud/models/files_upload_result.rb +208 -227
  158. data/lib/aspose-email-cloud/models/{requests/get_disc_usage_request_data.rb → get_disc_usage_request.rb} +70 -71
  159. data/lib/aspose-email-cloud/models/{requests/get_file_versions_request_data.rb → get_file_versions_request.rb} +79 -78
  160. data/lib/aspose-email-cloud/models/{requests/get_files_list_request_data.rb → get_files_list_request.rb} +79 -78
  161. data/lib/aspose-email-cloud/models/{requests/http_request.rb → http_request.rb} +47 -51
  162. data/lib/aspose-email-cloud/models/instant_messenger_address.rb +222 -241
  163. data/lib/aspose-email-cloud/models/linked_resource.rb +235 -264
  164. data/lib/aspose-email-cloud/models/list_response_of_ai_name_component.rb +198 -211
  165. data/lib/aspose-email-cloud/models/list_response_of_ai_name_extracted.rb +198 -211
  166. data/lib/aspose-email-cloud/models/list_response_of_ai_name_gender_hypothesis.rb +198 -211
  167. data/lib/aspose-email-cloud/models/list_response_of_contact_dto.rb +198 -211
  168. data/lib/aspose-email-cloud/models/list_response_of_email_account_config.rb +198 -0
  169. data/lib/aspose-email-cloud/models/list_response_of_email_dto.rb +198 -211
  170. data/lib/aspose-email-cloud/models/list_response_of_email_thread.rb +198 -0
  171. data/lib/aspose-email-cloud/models/list_response_of_mail_message_base.rb +198 -0
  172. data/lib/aspose-email-cloud/models/list_response_of_mail_server_folder.rb +198 -211
  173. data/lib/aspose-email-cloud/models/list_response_of_storage_file_location.rb +198 -211
  174. data/lib/aspose-email-cloud/models/list_response_of_storage_model_of_calendar_dto.rb +198 -211
  175. data/lib/aspose-email-cloud/models/list_response_of_storage_model_of_contact_dto.rb +198 -211
  176. data/lib/aspose-email-cloud/models/list_response_of_storage_model_of_email_dto.rb +198 -211
  177. data/lib/aspose-email-cloud/models/mail_address.rb +231 -241
  178. data/lib/aspose-email-cloud/models/mail_message_base.rb +205 -0
  179. data/lib/aspose-email-cloud/models/{indexed_primitive_object.rb → mail_message_base64.rb} +252 -260
  180. data/lib/aspose-email-cloud/models/mail_message_base_list.rb +199 -0
  181. data/lib/aspose-email-cloud/models/mail_message_dto.rb +219 -0
  182. data/lib/aspose-email-cloud/models/mail_message_mapi.rb +219 -0
  183. data/lib/aspose-email-cloud/models/mail_server_folder.rb +208 -223
  184. data/lib/aspose-email-cloud/models/mail_server_folder_list.rb +199 -0
  185. data/lib/aspose-email-cloud/models/{mime_response.rb → mapi_attachment_dto.rb} +208 -210
  186. data/lib/aspose-email-cloud/models/{base_object.rb → mapi_binary_property_dto.rb} +223 -229
  187. data/lib/aspose-email-cloud/models/mapi_boolean_property_dto.rb +228 -0
  188. data/lib/aspose-email-cloud/models/mapi_calendar_as_file_request.rb +218 -0
  189. data/lib/aspose-email-cloud/models/{ai_bcr_base64_rq.rb → mapi_calendar_attendees_dto.rb} +236 -225
  190. data/lib/aspose-email-cloud/models/mapi_calendar_daily_recurrence_pattern_dto.rb +381 -0
  191. data/lib/aspose-email-cloud/models/mapi_calendar_dto.rb +561 -0
  192. data/lib/aspose-email-cloud/models/{ai_bcr_ocr_data_part.rb → mapi_calendar_event_recurrence_dto.rb} +259 -297
  193. data/lib/aspose-email-cloud/models/mapi_calendar_exception_info_dto.rb +361 -0
  194. data/lib/aspose-email-cloud/models/{requests/ai_bcr_ocr_request_data.rb → mapi_calendar_from_file_request.rb} +74 -75
  195. data/lib/aspose-email-cloud/models/mapi_calendar_get_request.rb +87 -0
  196. data/lib/aspose-email-cloud/models/mapi_calendar_recurrence_pattern_dto.rb +372 -0
  197. data/lib/aspose-email-cloud/models/mapi_calendar_save_request.rb +232 -0
  198. data/lib/aspose-email-cloud/models/mapi_calendar_time_zone_dto.rb +208 -0
  199. data/lib/aspose-email-cloud/models/{send_email_base_request.rb → mapi_calendar_time_zone_info_dto.rb} +273 -278
  200. data/lib/aspose-email-cloud/models/{delete_folder_base_request.rb → mapi_calendar_time_zone_rule_dto.rb} +344 -315
  201. data/lib/aspose-email-cloud/models/mapi_calendar_weekly_recurrence_pattern_dto.rb +381 -0
  202. data/lib/aspose-email-cloud/models/mapi_calendar_yearly_and_monthly_recurrence_pattern_dto.rb +409 -0
  203. data/lib/aspose-email-cloud/models/mapi_contact_as_file_request.rb +218 -0
  204. data/lib/aspose-email-cloud/models/mapi_contact_dto.rb +440 -0
  205. data/lib/aspose-email-cloud/models/mapi_contact_electronic_address_dto.rb +249 -0
  206. data/lib/aspose-email-cloud/models/mapi_contact_electronic_address_property_set_dto.rb +281 -0
  207. data/lib/aspose-email-cloud/models/mapi_contact_event_property_set_dto.rb +218 -0
  208. data/lib/aspose-email-cloud/models/mapi_contact_from_file_request.rb +84 -0
  209. data/lib/aspose-email-cloud/models/mapi_contact_get_request.rb +97 -0
  210. data/lib/aspose-email-cloud/models/mapi_contact_name_property_set_dto.rb +285 -0
  211. data/lib/aspose-email-cloud/models/mapi_contact_other_property_set_dto.rb +277 -0
  212. data/lib/aspose-email-cloud/models/mapi_contact_personal_info_property_set_dto.rb +366 -0
  213. data/lib/aspose-email-cloud/models/mapi_contact_photo_dto.rb +252 -0
  214. data/lib/aspose-email-cloud/models/mapi_contact_physical_address_dto.rb +276 -0
  215. data/lib/aspose-email-cloud/models/{ai_bcr_storage_image_rq.rb → mapi_contact_physical_address_property_set_dto.rb} +217 -230
  216. data/lib/aspose-email-cloud/models/mapi_contact_professional_property_set_dto.rb +253 -0
  217. data/lib/aspose-email-cloud/models/mapi_contact_save_request.rb +232 -0
  218. data/lib/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb +371 -0
  219. data/lib/aspose-email-cloud/models/mapi_date_time_property_dto.rb +228 -0
  220. data/lib/aspose-email-cloud/models/mapi_electronic_address_dto.rb +235 -0
  221. data/lib/aspose-email-cloud/models/mapi_file_as_property_dto.rb +228 -0
  222. data/lib/aspose-email-cloud/models/mapi_importance_property_dto.rb +228 -0
  223. data/lib/aspose-email-cloud/models/mapi_int_property_dto.rb +228 -0
  224. data/lib/aspose-email-cloud/models/mapi_known_property_descriptor.rb +238 -0
  225. data/lib/aspose-email-cloud/models/mapi_legacy_free_busy_property_dto.rb +228 -0
  226. data/lib/aspose-email-cloud/models/mapi_message_as_file_request.rb +218 -0
  227. data/lib/aspose-email-cloud/models/mapi_message_dto.rb +604 -0
  228. data/lib/aspose-email-cloud/models/{requests/get_email_model_request_data.rb → mapi_message_from_file_request.rb} +84 -88
  229. data/lib/aspose-email-cloud/models/mapi_message_get_request.rb +97 -0
  230. data/lib/aspose-email-cloud/models/mapi_message_item_base_dto.rb +359 -0
  231. data/lib/aspose-email-cloud/models/mapi_message_save_request.rb +232 -0
  232. data/lib/aspose-email-cloud/models/mapi_multi_int_property_dto.rb +223 -0
  233. data/lib/aspose-email-cloud/models/mapi_multi_string_property_dto.rb +223 -0
  234. data/lib/aspose-email-cloud/models/mapi_physical_address_index_property_dto.rb +228 -0
  235. data/lib/aspose-email-cloud/models/mapi_pid_lid_property_descriptor.rb +279 -0
  236. data/lib/aspose-email-cloud/models/mapi_pid_name_property_descriptor.rb +265 -0
  237. data/lib/aspose-email-cloud/models/mapi_pid_property_descriptor.rb +251 -0
  238. data/lib/aspose-email-cloud/models/mapi_pid_tag_property_descriptor.rb +279 -0
  239. data/lib/aspose-email-cloud/models/mapi_property_descriptor.rb +205 -0
  240. data/lib/aspose-email-cloud/models/mapi_property_dto.rb +214 -0
  241. data/lib/aspose-email-cloud/models/mapi_recipient_dto.rb +231 -0
  242. data/lib/aspose-email-cloud/models/{primitive_object.rb → mapi_response_type_property_dto.rb} +228 -242
  243. data/lib/aspose-email-cloud/models/mapi_string_property_dto.rb +223 -0
  244. data/lib/aspose-email-cloud/models/{create_folder_base_request.rb → monthly_recurrence_pattern_dto.rb} +303 -310
  245. data/lib/aspose-email-cloud/models/{requests/move_file_request_data.rb → move_file_request.rb} +101 -92
  246. data/lib/aspose-email-cloud/models/{requests/move_folder_request_data.rb → move_folder_request.rb} +96 -89
  247. data/lib/aspose-email-cloud/models/{value_response.rb → name_value_pair.rb} +208 -210
  248. data/lib/aspose-email-cloud/models/object_exist.rb +218 -233
  249. data/lib/aspose-email-cloud/models/{requests/object_exists_request_data.rb → object_exists_request.rb} +85 -81
  250. data/lib/aspose-email-cloud/models/phone_number.rb +222 -241
  251. data/lib/aspose-email-cloud/models/postal_address.rb +299 -350
  252. data/lib/aspose-email-cloud/models/recurrence_pattern_dto.rb +261 -0
  253. data/lib/aspose-email-cloud/models/reminder_attendee.rb +223 -210
  254. data/lib/aspose-email-cloud/models/reminder_trigger.rb +227 -246
  255. data/lib/aspose-email-cloud/models/storage_exist.rb +204 -215
  256. data/lib/aspose-email-cloud/models/{requests/storage_exists_request_data.rb → storage_exists_request.rb} +74 -75
  257. data/lib/aspose-email-cloud/models/storage_file.rb +245 -272
  258. data/lib/aspose-email-cloud/models/storage_file_location.rb +241 -260
  259. data/lib/aspose-email-cloud/models/storage_file_location_list.rb +199 -0
  260. data/lib/aspose-email-cloud/models/storage_folder_location.rb +208 -223
  261. data/lib/aspose-email-cloud/models/storage_model_of_calendar_dto.rb +217 -222
  262. data/lib/aspose-email-cloud/models/storage_model_of_contact_dto.rb +217 -222
  263. data/lib/aspose-email-cloud/models/storage_model_of_email_client_account.rb +217 -0
  264. data/lib/aspose-email-cloud/models/storage_model_of_email_client_multi_account.rb +217 -0
  265. data/lib/aspose-email-cloud/models/storage_model_of_email_dto.rb +217 -222
  266. data/lib/aspose-email-cloud/models/storage_model_of_mapi_calendar_dto.rb +217 -0
  267. data/lib/aspose-email-cloud/models/storage_model_of_mapi_contact_dto.rb +217 -0
  268. data/lib/aspose-email-cloud/models/storage_model_of_mapi_message_dto.rb +217 -0
  269. data/lib/aspose-email-cloud/models/task_regenerating_pattern_dto.rb +275 -0
  270. data/lib/aspose-email-cloud/models/{requests/upload_file_request_data.rb → upload_file_request.rb} +90 -87
  271. data/lib/aspose-email-cloud/models/url.rb +222 -241
  272. data/lib/aspose-email-cloud/models/{list_response_of_string.rb → value_t_of_boolean.rb} +203 -211
  273. data/lib/aspose-email-cloud/models/value_t_of_string.rb +222 -0
  274. data/lib/aspose-email-cloud/models/weekly_recurrence_pattern_dto.rb +270 -0
  275. data/lib/aspose-email-cloud/models/yearly_recurrence_pattern_dto.rb +317 -0
  276. data/lib/aspose-email-cloud/version.rb +15 -15
  277. metadata +254 -198
  278. data/lib/aspose-email-cloud/models/add_attachment_request.rb +0 -223
  279. data/lib/aspose-email-cloud/models/ai_bcr_rq.rb +0 -210
  280. data/lib/aspose-email-cloud/models/append_email_account_base_request.rb +0 -315
  281. data/lib/aspose-email-cloud/models/append_email_base_request.rb +0 -333
  282. data/lib/aspose-email-cloud/models/append_email_mime_base_request.rb +0 -352
  283. data/lib/aspose-email-cloud/models/append_email_model_rq.rb +0 -333
  284. data/lib/aspose-email-cloud/models/create_email_request.rb +0 -228
  285. data/lib/aspose-email-cloud/models/delete_message_base_request.rb +0 -315
  286. data/lib/aspose-email-cloud/models/email_document.rb +0 -230
  287. data/lib/aspose-email-cloud/models/email_document_response.rb +0 -210
  288. data/lib/aspose-email-cloud/models/email_properties.rb +0 -230
  289. data/lib/aspose-email-cloud/models/email_property_response.rb +0 -210
  290. data/lib/aspose-email-cloud/models/hierarchical_object_request.rb +0 -228
  291. data/lib/aspose-email-cloud/models/list_response_of_hierarchical_object_response.rb +0 -211
  292. data/lib/aspose-email-cloud/models/requests/add_calendar_attachment_request_data.rb +0 -89
  293. data/lib/aspose-email-cloud/models/requests/add_contact_attachment_request_data.rb +0 -96
  294. data/lib/aspose-email-cloud/models/requests/add_email_attachment_request_data.rb +0 -89
  295. data/lib/aspose-email-cloud/models/requests/add_mapi_attachment_request_data.rb +0 -89
  296. data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_ocr_data_model_request_data.rb +0 -75
  297. data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_request_data.rb +0 -75
  298. data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_storage_request_data.rb +0 -75
  299. data/lib/aspose-email-cloud/models/requests/ai_name_expand_parsed_request_data.rb +0 -75
  300. data/lib/aspose-email-cloud/models/requests/ai_name_format_parsed_request_data.rb +0 -75
  301. data/lib/aspose-email-cloud/models/requests/ai_name_format_request_data.rb +0 -94
  302. data/lib/aspose-email-cloud/models/requests/ai_name_genderize_parsed_request_data.rb +0 -75
  303. data/lib/aspose-email-cloud/models/requests/ai_name_genderize_request_data.rb +0 -91
  304. data/lib/aspose-email-cloud/models/requests/ai_name_match_parsed_request_data.rb +0 -75
  305. data/lib/aspose-email-cloud/models/requests/ai_name_match_request_data.rb +0 -99
  306. data/lib/aspose-email-cloud/models/requests/ai_name_parse_email_address_request_data.rb +0 -91
  307. data/lib/aspose-email-cloud/models/requests/ai_name_parse_request_data.rb +0 -91
  308. data/lib/aspose-email-cloud/models/requests/append_email_message_request_data.rb +0 -75
  309. data/lib/aspose-email-cloud/models/requests/append_email_model_message_request_data.rb +0 -75
  310. data/lib/aspose-email-cloud/models/requests/append_mime_message_request_data.rb +0 -75
  311. data/lib/aspose-email-cloud/models/requests/convert_calendar_model_to_alternate_request_data.rb +0 -75
  312. data/lib/aspose-email-cloud/models/requests/create_calendar_request_data.rb +0 -82
  313. data/lib/aspose-email-cloud/models/requests/create_contact_request_data.rb +0 -89
  314. data/lib/aspose-email-cloud/models/requests/create_email_folder_request_data.rb +0 -75
  315. data/lib/aspose-email-cloud/models/requests/create_mapi_request_data.rb +0 -82
  316. data/lib/aspose-email-cloud/models/requests/delete_calendar_property_request_data.rb +0 -96
  317. data/lib/aspose-email-cloud/models/requests/delete_contact_property_request_data.rb +0 -103
  318. data/lib/aspose-email-cloud/models/requests/delete_email_folder_request_data.rb +0 -75
  319. data/lib/aspose-email-cloud/models/requests/delete_email_message_request_data.rb +0 -75
  320. data/lib/aspose-email-cloud/models/requests/delete_mapi_attachment_request_data.rb +0 -89
  321. data/lib/aspose-email-cloud/models/requests/delete_mapi_properties_request_data.rb +0 -82
  322. data/lib/aspose-email-cloud/models/requests/fetch_email_message_request_data.rb +0 -93
  323. data/lib/aspose-email-cloud/models/requests/fetch_email_model_request_data.rb +0 -93
  324. data/lib/aspose-email-cloud/models/requests/get_calendar_attachment_request_data.rb +0 -88
  325. data/lib/aspose-email-cloud/models/requests/get_calendar_list_request_data.rb +0 -95
  326. data/lib/aspose-email-cloud/models/requests/get_calendar_model_as_alternate_request_data.rb +0 -91
  327. data/lib/aspose-email-cloud/models/requests/get_calendar_model_list_request_data.rb +0 -85
  328. data/lib/aspose-email-cloud/models/requests/get_calendar_model_request_data.rb +0 -81
  329. data/lib/aspose-email-cloud/models/requests/get_calendar_request_data.rb +0 -81
  330. data/lib/aspose-email-cloud/models/requests/get_contact_attachment_request_data.rb +0 -95
  331. data/lib/aspose-email-cloud/models/requests/get_contact_list_request_data.rb +0 -87
  332. data/lib/aspose-email-cloud/models/requests/get_contact_properties_request_data.rb +0 -88
  333. data/lib/aspose-email-cloud/models/requests/get_email_property_request_data.rb +0 -88
  334. data/lib/aspose-email-cloud/models/requests/get_mapi_attachment_request_data.rb +0 -88
  335. data/lib/aspose-email-cloud/models/requests/get_mapi_attachments_request_data.rb +0 -81
  336. data/lib/aspose-email-cloud/models/requests/get_mapi_list_request_data.rb +0 -80
  337. data/lib/aspose-email-cloud/models/requests/get_mapi_properties_request_data.rb +0 -81
  338. data/lib/aspose-email-cloud/models/requests/list_email_folders_request_data.rb +0 -88
  339. data/lib/aspose-email-cloud/models/requests/list_email_models_request_data.rb +0 -105
  340. data/lib/aspose-email-cloud/models/requests/save_calendar_model_request_data.rb +0 -82
  341. data/lib/aspose-email-cloud/models/requests/save_contact_model_request_data.rb +0 -89
  342. data/lib/aspose-email-cloud/models/requests/save_mail_account_request_data.rb +0 -75
  343. data/lib/aspose-email-cloud/models/requests/save_mail_o_auth_account_request_data.rb +0 -75
  344. data/lib/aspose-email-cloud/models/requests/send_email_mime_request_data.rb +0 -75
  345. data/lib/aspose-email-cloud/models/requests/send_email_model_request_data.rb +0 -75
  346. data/lib/aspose-email-cloud/models/requests/send_email_request_data.rb +0 -75
  347. data/lib/aspose-email-cloud/models/requests/set_email_property_request_data.rb +0 -89
  348. data/lib/aspose-email-cloud/models/requests/set_email_read_flag_request_data.rb +0 -75
  349. data/lib/aspose-email-cloud/models/requests/update_calendar_properties_request_data.rb +0 -82
  350. data/lib/aspose-email-cloud/models/requests/update_contact_properties_request_data.rb +0 -89
  351. data/lib/aspose-email-cloud/models/requests/update_mapi_properties_request_data.rb +0 -82
  352. data/lib/aspose-email-cloud/models/save_email_account_request.rb +0 -431
  353. data/lib/aspose-email-cloud/models/send_email_mime_base_request.rb +0 -297
  354. data/lib/aspose-email-cloud/models/send_email_model_rq.rb +0 -273
  355. data/lib/aspose-email-cloud/models/set_email_property_request.rb +0 -228
@@ -0,0 +1,108 @@
1
+ # ----------------------------------------------------------------------------
2
+ # <copyright company="Aspose" file="client_message_fetch_file_request.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
+ require_relative './email_request'
27
+ require_relative './http_request'
28
+
29
+ module AsposeEmailCloud
30
+ # Request model for client_message_fetch_file operation.
31
+ class ClientMessageFetchFileRequest < EmailRequest
32
+ # Message identifier
33
+ # @return [String]
34
+ attr_accessor :message_id
35
+ # Email account
36
+ # @return [String]
37
+ attr_accessor :account
38
+ # Account folder to fetch from (should be specified for some protocols such as IMAP)
39
+ # @return [String]
40
+ attr_accessor :folder
41
+ # Storage name where account file located.
42
+ # @return [String]
43
+ attr_accessor :storage
44
+ # Folder in storage where account file located.
45
+ # @return [String]
46
+ attr_accessor :account_storage_folder
47
+ # Fetched message file format. Enum, available values: Eml, Msg, MsgUnicode, Mhtml, Html, Tnef, Oft
48
+ # @return [String]
49
+ attr_accessor :format
50
+
51
+ # Fetch message as file from email account
52
+ # @param [String] message_id Message identifier
53
+ # @param [String] account Email account
54
+ # @param [String] folder Account folder to fetch from (should be specified for some protocols such as IMAP)
55
+ # @param [String] storage Storage name where account file located.
56
+ # @param [String] account_storage_folder Folder in storage where account file located.
57
+ # @param [String] format Fetched message file format. Enum, available values: Eml, Msg, MsgUnicode, Mhtml, Html, Tnef, Oft
58
+ def initialize(message_id:, account:, folder: nil, storage: nil, account_storage_folder: nil, format: nil)
59
+ self.message_id = message_id if message_id
60
+ self.account = account if account
61
+ self.folder = folder if folder
62
+ self.storage = storage if storage
63
+ self.account_storage_folder = account_storage_folder if account_storage_folder
64
+ self.format = format if format
65
+ end
66
+
67
+ def to_http_info(api_client)
68
+ # verify the required parameter 'message_id' is set
69
+ if api_client.config.client_side_validation && self.message_id.nil?
70
+ raise ArgumentError, "Missing the required parameter 'message_id' when calling ClientMessageApi.fetch_file"
71
+ end
72
+ # verify the required parameter 'account' is set
73
+ if api_client.config.client_side_validation && self.account.nil?
74
+ raise ArgumentError, "Missing the required parameter 'account' when calling ClientMessageApi.fetch_file"
75
+ end
76
+ # resource path
77
+ local_var_path = '/email/client/message/file'
78
+
79
+ # query parameters
80
+ query_params = {}
81
+ query_params[:messageId] = self.message_id
82
+ query_params[:account] = self.account
83
+ query_params[:folder] = self.folder unless self.folder.nil?
84
+ query_params[:storage] = self.storage unless self.storage.nil?
85
+ query_params[:accountStorageFolder] = self.account_storage_folder unless self.account_storage_folder.nil?
86
+ query_params[:format] = self.format unless self.format.nil?
87
+
88
+ # form parameters
89
+ form_params = {}
90
+
91
+ # http body (model)
92
+ auth_names = ['JWT']
93
+
94
+ # header parameters
95
+ header_params = {}
96
+ # HTTP header 'Accept' (if needed)
97
+ header_params['Accept'] = EmailRequest.select_header_accept(['multipart/form-data'])
98
+ # HTTP header 'Content-Type'
99
+ header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : EmailRequest.select_header_content_type(['application/json'])
100
+
101
+ AsposeEmailCloud::HttpRequest.new(resource_path: local_var_path,
102
+ header_params: header_params,
103
+ query_params: query_params,
104
+ form_params: form_params,
105
+ auth_names: auth_names)
106
+ end
107
+ end
108
+ end
@@ -0,0 +1,114 @@
1
+ # ----------------------------------------------------------------------------
2
+ # <copyright company="Aspose" file="client_message_fetch_request.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
+ require_relative './email_request'
27
+ require_relative './http_request'
28
+
29
+ module AsposeEmailCloud
30
+ # Request model for client_message_fetch operation.
31
+ class ClientMessageFetchRequest < EmailRequest
32
+ # Message identifier
33
+ # @return [String]
34
+ attr_accessor :message_id
35
+ # Email account
36
+ # @return [String]
37
+ attr_accessor :account
38
+ # Account folder to fetch from (should be specified for some protocols such as IMAP)
39
+ # @return [String]
40
+ attr_accessor :folder
41
+ # Storage name where account file located.
42
+ # @return [String]
43
+ attr_accessor :storage
44
+ # Folder in storage where account file located.
45
+ # @return [String]
46
+ attr_accessor :account_storage_folder
47
+ # MailMessageBase type. Using this property you can fetch message in different formats (as EmailDto, MapiMessageDto or a file represented as Base64 string). Enum, available values: Dto, Mapi, Base64
48
+ # @return [String]
49
+ attr_accessor :type
50
+ # Base64 data format. Used only if type is set to Base64. Enum, available values: Eml, Msg, MsgUnicode, Mhtml, Html, Tnef, Oft
51
+ # @return [String]
52
+ attr_accessor :format
53
+
54
+ # Fetch message from email account
55
+ # @param [String] message_id Message identifier
56
+ # @param [String] account Email account
57
+ # @param [String] folder Account folder to fetch from (should be specified for some protocols such as IMAP)
58
+ # @param [String] storage Storage name where account file located.
59
+ # @param [String] account_storage_folder Folder in storage where account file located.
60
+ # @param [String] type MailMessageBase type. Using this property you can fetch message in different formats (as EmailDto, MapiMessageDto or a file represented as Base64 string). Enum, available values: Dto, Mapi, Base64
61
+ # @param [String] format Base64 data format. Used only if type is set to Base64. Enum, available values: Eml, Msg, MsgUnicode, Mhtml, Html, Tnef, Oft
62
+ def initialize(message_id:, account:, folder: nil, storage: nil, account_storage_folder: nil, type: nil, format: nil)
63
+ self.message_id = message_id if message_id
64
+ self.account = account if account
65
+ self.folder = folder if folder
66
+ self.storage = storage if storage
67
+ self.account_storage_folder = account_storage_folder if account_storage_folder
68
+ self.type = type if type
69
+ self.format = format if format
70
+ end
71
+
72
+ def to_http_info(api_client)
73
+ # verify the required parameter 'message_id' is set
74
+ if api_client.config.client_side_validation && self.message_id.nil?
75
+ raise ArgumentError, "Missing the required parameter 'message_id' when calling ClientMessageApi.fetch"
76
+ end
77
+ # verify the required parameter 'account' is set
78
+ if api_client.config.client_side_validation && self.account.nil?
79
+ raise ArgumentError, "Missing the required parameter 'account' when calling ClientMessageApi.fetch"
80
+ end
81
+ # resource path
82
+ local_var_path = '/email/client/message'
83
+
84
+ # query parameters
85
+ query_params = {}
86
+ query_params[:messageId] = self.message_id
87
+ query_params[:account] = self.account
88
+ query_params[:folder] = self.folder unless self.folder.nil?
89
+ query_params[:storage] = self.storage unless self.storage.nil?
90
+ query_params[:accountStorageFolder] = self.account_storage_folder unless self.account_storage_folder.nil?
91
+ query_params[:type] = self.type unless self.type.nil?
92
+ query_params[:format] = self.format unless self.format.nil?
93
+
94
+ # form parameters
95
+ form_params = {}
96
+
97
+ # http body (model)
98
+ auth_names = ['JWT']
99
+
100
+ # header parameters
101
+ header_params = {}
102
+ # HTTP header 'Accept' (if needed)
103
+ header_params['Accept'] = EmailRequest.select_header_accept(['application/json'])
104
+ # HTTP header 'Content-Type'
105
+ header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : EmailRequest.select_header_content_type(['application/json'])
106
+
107
+ AsposeEmailCloud::HttpRequest.new(resource_path: local_var_path,
108
+ header_params: header_params,
109
+ query_params: query_params,
110
+ form_params: form_params,
111
+ auth_names: auth_names)
112
+ end
113
+ end
114
+ end
@@ -1,105 +1,121 @@
1
-
2
- # ----------------------------------------------------------------------------
3
- # <copyright company="Aspose" file="list_email_messages_request_data.rb">
4
- # Copyright (c) 2018-2019 Aspose Pty Ltd. All rights reserved.
5
- # </copyright>
6
- # <summary>
7
- # Permission is hereby granted, free of charge, to any person obtaining a
8
- # copy of this software and associated documentation files (the "Software"),
9
- # to deal in the Software without restriction, including without limitation
10
- # the rights to use, copy, modify, merge, publish, distribute, sublicense,
11
- # and/or sell copies of the Software, and to permit persons to whom the
12
- # Software is furnished to do so, subject to the following conditions:
13
- #
14
- # The above copyright notice and this permission notice shall be included in
15
- # all copies or substantial portions of the Software.
16
- #
17
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22
- # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23
- # DEALINGS IN THE SOFTWARE.
24
- # </summary>
25
- # ----------------------------------------------------------------------------
26
-
27
-
28
- require_relative './email_request'
29
- require_relative './http_request'
30
-
31
- module AsposeEmailCloud
32
- # Request model for list_email_messages operation.
33
- class ListEmailMessagesRequestData < EmailRequest
34
-
35
- # Get messages from folder, filtered by query
36
- # The query string should have the following view. The example of a simple expression: &#39;&lt;Field name&gt;&#39; &lt;Comparison operator&gt; &#39;&lt;Field value&gt;&#39;, where &amp;lt;Field Name&amp;gt; - the name of a message field through which filtering is made, &amp;lt;Comparison operator&amp;gt; - comparison operators, as their name implies, allow to compare message field and specified value, &amp;lt;Field value&amp;gt; - value to be compared with a message field. The number of simple expressions can make a compound one, ex.: (&lt;Simple expression 1&gt; &amp; &lt;Simple expression 2&gt;) | &lt;Simple expression 3 &gt;, where \&quot;&amp;amp;\&quot; - logical-AND operator, \&quot;|\&quot; - logical-OR operator At present the following values are allowed as a field name (&lt;Field name&gt;): \&quot;To\&quot; - represents a TO field of message, \&quot;Text\&quot; - represents string in the header or body of the message, \&quot;Bcc\&quot; - represents a BCC field of message, \&quot;Body\&quot; - represents a string in the body of message, \&quot;Cc\&quot; - represents a CC field of message, \&quot;From\&quot; - represents a From field of message, \&quot;Subject\&quot; - represents a string in the subject of message, \&quot;InternalDate\&quot; - represents an internal date of message, \&quot;SentDate\&quot; - represents a sent date of message Additionally, the following field names are allowed for IMAP-protocol: \&quot;Answered\&quot; - represents an /Answered flag of message \&quot;Seen\&quot; - represents a /Seen flag of message \&quot;Flagged\&quot; - represents a /Flagged flag of message \&quot;Draft\&quot; - represents a /Draft flag of message \&quot;Deleted\&quot; - represents a Deleted/ flag of message \&quot;Recent\&quot; - represents a Deleted/ flag of message \&quot;MessageSize\&quot; - represents a size (in bytes) of message Additionally, the following field names are allowed for Exchange: \&quot;IsRead\&quot; - Indicates whether the message has been read \&quot;HasAttachment\&quot; - Indicates whether or not the message has attachments \&quot;IsSubmitted\&quot; - Indicates whether the message has been submitted to the Outbox \&quot;ContentClass\&quot; - represents a content class of item Additionally, the following field names are allowed for pst/ost files: \&quot;MessageClass\&quot; - Represents a message class \&quot;ContainerClass\&quot; - Represents a folder container class \&quot;Importance\&quot; - Represents a message importance \&quot;MessageSize\&quot; - represents a size (in bytes) of message \&quot;FolderName\&quot; - represents a folder name \&quot;ContentsCount\&quot; - represents a total number of items in the folder \&quot;UnreadContentsCount\&quot; - represents the number of unread items in the folder. \&quot;Subfolders\&quot; - Indicates whether or not the folder has subfolders \&quot;Read\&quot; - the message is marked as having been read \&quot;HasAttachment\&quot; - the message has at least one attachment \&quot;Unsent\&quot; - the message is still being composed \&quot;Unmodified\&quot; - the message has not been modified since it was first saved (if unsent) or it was delivered (if sent) \&quot;FromMe\&quot; - the user receiving the message was also the user who sent the message \&quot;Resend\&quot; - the message includes a request for a resend operation with a non-delivery report \&quot;NotifyRead\&quot; - the user who sent the message has requested notification when a recipient first reads it \&quot;NotifyUnread\&quot; - the user who sent the message has requested notification when a recipient deletes it before reading or the Message object expires \&quot;EverRead\&quot; - the message has been read at least once The field value (&lt;Field value&gt;) can take the following values: For text fields - any string, For date type fields - the string of \&quot;d-MMM-yyy\&quot; format, ex. \&quot;10-Feb-2009\&quot;, For flags (fields of boolean type) - either \&quot;True\&quot;, or \&quot;False\&quot;
37
- # @param [String] folder A folder in email account
38
- # @param [String] query_string A MailQuery search string
39
- # @param [String] first_account Email account
40
- # @param [String] second_account Additional email account (should be specified for POP/IMAP accounts and should be SMTP account)
41
- # @param [String] storage Storage name where account file(s) located
42
- # @param [String] storage_folder Folder in storage where account file(s) located
43
- # @param [BOOLEAN] recursive Specifies that should message be searched in subfolders recursively
44
- def initialize(folder, query_string, first_account, second_account = nil, storage = nil, storage_folder = nil, recursive = nil)
45
- @folder = folder if folder
46
- @query_string = query_string if query_string
47
- @first_account = first_account if first_account
48
- @second_account = second_account if second_account
49
- @storage = storage if storage
50
- @storage_folder = storage_folder if storage_folder
51
- @recursive = recursive if recursive
52
- end
53
-
54
- def to_http_info(api_client)
55
- # verify the required parameter 'folder' is set
56
- if api_client.config.client_side_validation && @folder.nil?
57
- raise ArgumentError, "Missing the required parameter 'folder' when calling EmailApi.list_email_messages"
58
- end
59
-
60
- # verify the required parameter 'query_string' is set
61
- if api_client.config.client_side_validation && @query_string.nil?
62
- raise ArgumentError, "Missing the required parameter 'query_string' when calling EmailApi.list_email_messages"
63
- end
64
-
65
- # verify the required parameter 'first_account' is set
66
- if api_client.config.client_side_validation && @first_account.nil?
67
- raise ArgumentError, "Missing the required parameter 'first_account' when calling EmailApi.list_email_messages"
68
- end
69
-
70
- # resource path
71
- local_var_path = '/email/client/ListMessages'
72
-
73
- # query parameters
74
- query_params = {}
75
- query_params[:folder] = @folder
76
- query_params[:queryString] = @query_string
77
- query_params[:firstAccount] = @first_account
78
- query_params[:secondAccount] = @second_account unless @second_account.nil?
79
- query_params[:storage] = @storage unless @storage.nil?
80
- query_params[:storageFolder] = @storage_folder unless @storage_folder.nil?
81
- query_params[:recursive] = @recursive unless @recursive.nil?
82
-
83
- # form parameters
84
- form_params = {}
85
-
86
- # http body (model)
87
- post_body = nil
88
- auth_names = ['JWT']
89
-
90
- # header parameters
91
- header_params = {}
92
- # HTTP header 'Accept' (if needed)
93
- header_params['Accept'] = select_header_accept(['application/json'])
94
- # HTTP header 'Content-Type'
95
- header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['application/json'])
96
-
97
- AsposeEmailCloud::HttpRequest.new(local_var_path,
98
- header_params,
99
- query_params,
100
- form_params,
101
- post_body,
102
- auth_names)
103
- end
104
- end
105
- end
1
+ # ----------------------------------------------------------------------------
2
+ # <copyright company="Aspose" file="client_message_list_request.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
+ require_relative './email_request'
27
+ require_relative './http_request'
28
+
29
+ module AsposeEmailCloud
30
+ # Request model for client_message_list operation.
31
+ class ClientMessageListRequest < EmailRequest
32
+ # A folder in email account
33
+ # @return [String]
34
+ attr_accessor :folder
35
+ # Email account
36
+ # @return [String]
37
+ attr_accessor :account
38
+ # A MailQuery search string
39
+ # @return [String]
40
+ attr_accessor :query_string
41
+ # Storage name where account file located
42
+ # @return [String]
43
+ attr_accessor :storage
44
+ # Folder in storage where account file located
45
+ # @return [String]
46
+ attr_accessor :account_storage_folder
47
+ # Specifies that should message be searched in subfolders recursively
48
+ # @return [BOOLEAN]
49
+ attr_accessor :recursive
50
+ # MailMessageBase type. Using this property you can get messages in different formats (as EmailDto, MapiMessageDto or a file represented as Base64 string). Enum, available values: Dto, Mapi, Base64
51
+ # @return [String]
52
+ attr_accessor :type
53
+ # Base64 data format. Used only if type is set to Base64. Enum, available values: Eml, Msg, MsgUnicode, Mhtml, Html, Tnef, Oft
54
+ # @return [String]
55
+ attr_accessor :format
56
+
57
+ # Get messages from folder, filtered by query
58
+ # The query string should have the following view. The example of a simple expression: &#39;&lt;Field name&gt;&#39; &lt;Comparison operator&gt; &#39;&lt;Field value&gt;&#39;, where &amp;lt;Field Name&amp;gt; - the name of a message field through which filtering is made, &amp;lt;Comparison operator&amp;gt; - comparison operators, as their name implies, allow to compare message field and specified value, &amp;lt;Field value&amp;gt; - value to be compared with a message field. The number of simple expressions can make a compound one, ex.: (&lt;Simple expression 1&gt; &amp; &lt;Simple expression 2&gt;) | &lt;Simple expression 3 &gt;, where \&quot;&amp;amp;\&quot; - logical-AND operator, \&quot;|\&quot; - logical-OR operator At present the following values are allowed as a field name (&lt;Field name&gt;): \&quot;To\&quot; - represents a TO field of message, \&quot;Text\&quot; - represents string in the header or body of the message, \&quot;Bcc\&quot; - represents a BCC field of message, \&quot;Body\&quot; - represents a string in the body of message, \&quot;Cc\&quot; - represents a CC field of message, \&quot;From\&quot; - represents a From field of message, \&quot;Subject\&quot; - represents a string in the subject of message, \&quot;InternalDate\&quot; - represents an internal date of message, \&quot;SentDate\&quot; - represents a sent date of message Additionally, the following field names are allowed for IMAP-protocol: \&quot;Answered\&quot; - represents an /Answered flag of message \&quot;Seen\&quot; - represents a /Seen flag of message \&quot;Flagged\&quot; - represents a /Flagged flag of message \&quot;Draft\&quot; - represents a /Draft flag of message \&quot;Deleted\&quot; - represents a Deleted/ flag of message \&quot;Recent\&quot; - represents a Deleted/ flag of message \&quot;MessageSize\&quot; - represents a size (in bytes) of message Additionally, the following field names are allowed for Exchange: \&quot;IsRead\&quot; - Indicates whether the message has been read \&quot;HasAttachment\&quot; - Indicates whether or not the message has attachments \&quot;IsSubmitted\&quot; - Indicates whether the message has been submitted to the Outbox \&quot;ContentClass\&quot; - represents a content class of item Additionally, the following field names are allowed for pst/ost files: \&quot;MessageClass\&quot; - Represents a message class \&quot;ContainerClass\&quot; - Represents a folder container class \&quot;Importance\&quot; - Represents a message importance \&quot;MessageSize\&quot; - represents a size (in bytes) of message \&quot;FolderName\&quot; - represents a folder name \&quot;ContentsCount\&quot; - represents a total number of items in the folder \&quot;UnreadContentsCount\&quot; - represents the number of unread items in the folder. \&quot;Subfolders\&quot; - Indicates whether or not the folder has subfolders \&quot;Read\&quot; - the message is marked as having been read \&quot;HasAttachment\&quot; - the message has at least one attachment \&quot;Unsent\&quot; - the message is still being composed \&quot;Unmodified\&quot; - the message has not been modified since it was first saved (if unsent) or it was delivered (if sent) \&quot;FromMe\&quot; - the user receiving the message was also the user who sent the message \&quot;Resend\&quot; - the message includes a request for a resend operation with a non-delivery report \&quot;NotifyRead\&quot; - the user who sent the message has requested notification when a recipient first reads it \&quot;NotifyUnread\&quot; - the user who sent the message has requested notification when a recipient deletes it before reading or the Message object expires \&quot;EverRead\&quot; - the message has been read at least once The field value (&lt;Field value&gt;) can take the following values: For text fields - any string, For date type fields - the string of \&quot;d-MMM-yyy\&quot; format, ex. \&quot;10-Feb-2009\&quot;, For flags (fields of boolean type) - either \&quot;True\&quot;, or \&quot;False\&quot;
59
+ # @param [String] folder A folder in email account
60
+ # @param [String] account Email account
61
+ # @param [String] query_string A MailQuery search string
62
+ # @param [String] storage Storage name where account file located
63
+ # @param [String] account_storage_folder Folder in storage where account file located
64
+ # @param [BOOLEAN] recursive Specifies that should message be searched in subfolders recursively
65
+ # @param [String] type MailMessageBase type. Using this property you can get messages in different formats (as EmailDto, MapiMessageDto or a file represented as Base64 string). Enum, available values: Dto, Mapi, Base64
66
+ # @param [String] format Base64 data format. Used only if type is set to Base64. Enum, available values: Eml, Msg, MsgUnicode, Mhtml, Html, Tnef, Oft
67
+ def initialize(folder:, account:, query_string: nil, storage: nil, account_storage_folder: nil, recursive: nil, type: nil, format: nil)
68
+ self.folder = folder if folder
69
+ self.account = account if account
70
+ self.query_string = query_string if query_string
71
+ self.storage = storage if storage
72
+ self.account_storage_folder = account_storage_folder if account_storage_folder
73
+ self.recursive = recursive if recursive
74
+ self.type = type if type
75
+ self.format = format if format
76
+ end
77
+
78
+ def to_http_info(api_client)
79
+ # verify the required parameter 'folder' is set
80
+ if api_client.config.client_side_validation && self.folder.nil?
81
+ raise ArgumentError, "Missing the required parameter 'folder' when calling ClientMessageApi.list"
82
+ end
83
+ # verify the required parameter 'account' is set
84
+ if api_client.config.client_side_validation && self.account.nil?
85
+ raise ArgumentError, "Missing the required parameter 'account' when calling ClientMessageApi.list"
86
+ end
87
+ # resource path
88
+ local_var_path = '/email/client/message/list'
89
+
90
+ # query parameters
91
+ query_params = {}
92
+ query_params[:folder] = self.folder
93
+ query_params[:account] = self.account
94
+ query_params[:queryString] = self.query_string unless self.query_string.nil?
95
+ query_params[:storage] = self.storage unless self.storage.nil?
96
+ query_params[:accountStorageFolder] = self.account_storage_folder unless self.account_storage_folder.nil?
97
+ query_params[:recursive] = self.recursive unless self.recursive.nil?
98
+ query_params[:type] = self.type unless self.type.nil?
99
+ query_params[:format] = self.format unless self.format.nil?
100
+
101
+ # form parameters
102
+ form_params = {}
103
+
104
+ # http body (model)
105
+ auth_names = ['JWT']
106
+
107
+ # header parameters
108
+ header_params = {}
109
+ # HTTP header 'Accept' (if needed)
110
+ header_params['Accept'] = EmailRequest.select_header_accept(['application/json'])
111
+ # HTTP header 'Content-Type'
112
+ header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : EmailRequest.select_header_content_type(['application/json'])
113
+
114
+ AsposeEmailCloud::HttpRequest.new(resource_path: local_var_path,
115
+ header_params: header_params,
116
+ query_params: query_params,
117
+ form_params: form_params,
118
+ auth_names: auth_names)
119
+ end
120
+ end
121
+ end
@@ -1,315 +1,279 @@
1
- # ----------------------------------------------------------------------------
2
- # <copyright company="Aspose" file="SetMessageReadFlagAccountBaseRequest.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
- # Set message is read request
31
- class SetMessageReadFlagAccountBaseRequest
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
- # Message identifier
45
- # @return [String]
46
- attr_accessor :message_id
47
-
48
- # Specifies that message should be marked read or unread
49
- # @return [BOOLEAN]
50
- attr_accessor :is_read
51
-
52
- # Attribute mapping from ruby-style variable name to JSON key.
53
- def self.attribute_map
54
- {
55
- :'first_account' => :'firstAccount',
56
- :'second_account' => :'secondAccount',
57
- :'storage_folder' => :'storageFolder',
58
- :'message_id' => :'messageId',
59
- :'is_read' => :'isRead'
60
- }
61
- end
62
-
63
- # Attribute type mapping.
64
- def self.swagger_types
65
- {
66
- :'first_account' => :'String',
67
- :'second_account' => :'String',
68
- :'storage_folder' => :'StorageFolderLocation',
69
- :'message_id' => :'String',
70
- :'is_read' => :'BOOLEAN'
71
- }
72
- end
73
-
74
- # Initializes the object
75
- # @param [Hash] attributes Model attributes in the form of hash
76
- def initialize(attributes = {})
77
- return unless attributes.is_a?(Hash)
78
-
79
- # convert string to symbol for hash key
80
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
81
-
82
- if attributes.has_key?(:'firstAccount')
83
- self.first_account = attributes[:'firstAccount']
84
- end
85
-
86
- if attributes.has_key?(:'secondAccount')
87
- self.second_account = attributes[:'secondAccount']
88
- end
89
-
90
- if attributes.has_key?(:'storageFolder')
91
- self.storage_folder = attributes[:'storageFolder']
92
- end
93
-
94
- if attributes.has_key?(:'messageId')
95
- self.message_id = attributes[:'messageId']
96
- end
97
-
98
- if attributes.has_key?(:'isRead')
99
- self.is_read = attributes[:'isRead']
100
- end
101
- end
102
-
103
- # Initializes the object
104
- # @param [String] first_account First account storage file name for receiving emails (or universal one)
105
- # @param [String] second_account Second account storage file name for sending emails (ignored if first is universal)
106
- # @param [StorageFolderLocation] storage_folder Storage folder location of account files
107
- # @param [String] message_id Message identifier
108
- # @param [BOOLEAN] is_read Specifies that message should be marked read or unread
109
- def initialize(first_account=nil, second_account=nil, storage_folder=nil, message_id=nil, is_read=nil)
110
- self.first_account = first_account if first_account
111
- self.second_account = second_account if second_account
112
- self.storage_folder = storage_folder if storage_folder
113
- self.message_id = message_id if message_id
114
- self.is_read = is_read if is_read
115
- end
116
-
117
- # Show invalid properties with the reasons. Usually used together with valid?
118
- # @return Array for valid properties with the reasons
119
- def list_invalid_properties
120
- invalid_properties = Array.new
121
- if @first_account.nil?
122
- invalid_properties.push('invalid value for "first_account", first_account cannot be nil.')
123
- end
124
-
125
- if @first_account.to_s.length < 1
126
- invalid_properties.push('invalid value for "first_account", the character length must be great than or equal to 1.')
127
- end
128
-
129
- if @message_id.nil?
130
- invalid_properties.push('invalid value for "message_id", message_id cannot be nil.')
131
- end
132
-
133
- if @message_id.to_s.length < 1
134
- invalid_properties.push('invalid value for "message_id", the character length must be great than or equal to 1.')
135
- end
136
-
137
- if @is_read.nil?
138
- invalid_properties.push('invalid value for "is_read", is_read cannot be nil.')
139
- end
140
-
141
- invalid_properties
142
- end
143
-
144
- # Check to see if the all the properties in the model are valid
145
- # @return true if the model is valid
146
- def valid?
147
- return false if @first_account.nil?
148
- return false if @first_account.to_s.length < 1
149
- return false if @message_id.nil?
150
- return false if @message_id.to_s.length < 1
151
- return false if @is_read.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] message_id Value to be assigned
171
- def message_id=(message_id)
172
- if message_id.nil?
173
- fail ArgumentError, 'message_id cannot be nil'
174
- end
175
-
176
- if message_id.to_s.length < 1
177
- fail ArgumentError, 'invalid value for "message_id", the character length must be great than or equal to 1.'
178
- end
179
-
180
- @message_id = message_id
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
- message_id == o.message_id &&
192
- is_read == o.is_read
193
- end
194
-
195
- # @see the `==` method
196
- # @param [Object] Object to be compared
197
- def eql?(o)
198
- self == o
199
- end
200
-
201
- # Calculates hash code according to all attributes.
202
- # @return [Fixnum] Hash code
203
- def hash
204
- [first_account, second_account, storage_folder, message_id, is_read].hash
205
- end
206
-
207
- # Builds the object from hash
208
- # @param [Hash] attributes Model attributes in the form of hash
209
- # @return [Object] Returns the model itself
210
- def build_from_hash(attributes)
211
- return nil unless attributes.is_a?(Hash)
212
- self.class.swagger_types.each_pair do |key, type|
213
- attribute_key = self.class.attribute_map[key]
214
- attribute_key = (attribute_key[0, 1].downcase + attribute_key[1..-1]).to_sym
215
- if type =~ /\AArray<(.*)>/i
216
- # check to ensure the input is an array given that the the attribute
217
- # is documented as an array but the input is not
218
- if attributes[attribute_key].is_a?(Array)
219
- self.send("#{key}=", attributes[attribute_key].map { |v| _deserialize($1, v) })
220
- end
221
- elsif !attributes[attribute_key].nil?
222
- self.send("#{key}=", _deserialize(type, attributes[attribute_key]))
223
- end # or else data not found in attributes(hash), not an issue as the data can be optional
224
- end
225
-
226
- self
227
- end
228
-
229
- # Deserializes the data based on type
230
- # @param string type Data type
231
- # @param string value Value to be deserialized
232
- # @return [Object] Deserialized data
233
- def _deserialize(type, value)
234
- case type.to_sym
235
- when :DateTime
236
- DateTime.parse(value)
237
- when :Date
238
- Date.parse(value)
239
- when :String
240
- value.to_s
241
- when :Integer
242
- value.to_i
243
- when :Float
244
- value.to_f
245
- when :BOOLEAN
246
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
247
- true
248
- else
249
- false
250
- end
251
- when :Object
252
- # generic object (usually a Hash), return directly
253
- value
254
- when /\AArray<(?<inner_type>.+)>\z/
255
- inner_type = Regexp.last_match[:inner_type]
256
- value.map { |v| _deserialize(inner_type, v) }
257
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
258
- k_type = Regexp.last_match[:k_type]
259
- v_type = Regexp.last_match[:v_type]
260
- {}.tap do |hash|
261
- value.each do |k, v|
262
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
263
- end
264
- end
265
- else # model
266
- type = value[:type] || type
267
- temp_model = AsposeEmailCloud.const_get(type).new
268
- temp_model.build_from_hash(value)
269
- end
270
- end
271
-
272
- # Returns the string representation of the object
273
- # @return [String] String presentation of the object
274
- def to_s
275
- to_hash.to_s
276
- end
277
-
278
- # to_body is an alias to to_hash (backward compatibility)
279
- # @return [Hash] Returns the object in the form of hash
280
- def to_body
281
- to_hash
282
- end
283
-
284
- # Returns the object in the form of hash
285
- # @return [Hash] Returns the object in the form of hash
286
- def to_hash
287
- hash = {}
288
- self.class.attribute_map.each_pair do |attr, param|
289
- value = self.send(attr)
290
- next if value.nil?
291
- hash[param] = _to_hash(value)
292
- end
293
- hash
294
- end
295
-
296
- # Outputs non-array value in the form of hash
297
- # For object, use to_hash. Otherwise, just return the value
298
- # @param [Object] value Any valid value
299
- # @return [Hash] Returns the value in the form of hash
300
- def _to_hash(value)
301
- if value.is_a?(Array)
302
- value.compact.map { |v| _to_hash(v) }
303
- elsif value.is_a?(Hash)
304
- {}.tap do |hash|
305
- value.each { |k, v| hash[k] = _to_hash(v) }
306
- end
307
- elsif value.respond_to? :to_hash
308
- value.to_hash
309
- else
310
- value
311
- end
312
- end
313
-
314
- end
315
- end
1
+ # ----------------------------------------------------------------------------
2
+ # <copyright company="Aspose" file="ClientMessageMoveRequest.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
+ require 'date'
27
+
28
+ module AsposeEmailCloud
29
+ # Email client move message request.
30
+ class ClientMessageMoveRequest < ClientMessageBaseRequest
31
+ # Email client account configuration location on storage.
32
+ # @return [StorageFileLocation]
33
+ attr_accessor :account_location
34
+ # Message identifier.
35
+ # @return [String]
36
+ attr_accessor :message_id
37
+ # Folder to move message from.
38
+ # @return [String]
39
+ attr_accessor :source_folder
40
+ # Folder to move message to.
41
+ # @return [String]
42
+ attr_accessor :destination_folder
43
+ # Attribute mapping from ruby-style variable name to JSON key.
44
+ def self.attribute_map
45
+ {
46
+ :'account_location' => :'accountLocation',
47
+ :'message_id' => :'messageId',
48
+ :'source_folder' => :'sourceFolder',
49
+ :'destination_folder' => :'destinationFolder'
50
+ }
51
+ end
52
+
53
+ # Attribute type mapping.
54
+ def self.swagger_types
55
+ {
56
+ :'account_location' => :'StorageFileLocation',
57
+ :'message_id' => :'String',
58
+ :'source_folder' => :'String',
59
+ :'destination_folder' => :'String'
60
+ }
61
+ end
62
+
63
+ # Initializes the object
64
+ # @param [StorageFileLocation] account_location Email client account configuration location on storage.
65
+ # @param [String] message_id Message identifier.
66
+ # @param [String] source_folder Folder to move message from.
67
+ # @param [String] destination_folder Folder to move message to.
68
+ def initialize(
69
+ account_location: nil,
70
+ message_id: nil,
71
+ source_folder: nil,
72
+ destination_folder: nil)
73
+ self.account_location = account_location if account_location
74
+ self.message_id = message_id if message_id
75
+ self.source_folder = source_folder if source_folder
76
+ self.destination_folder = destination_folder if destination_folder
77
+ end
78
+
79
+ # Show invalid properties with the reasons. Usually used together with valid?
80
+ # @return Array for valid properties with the reasons
81
+ def list_invalid_properties
82
+ invalid_properties = Array.new
83
+ if @account_location.nil?
84
+ invalid_properties.push('invalid value for "account_location", account_location cannot be nil.')
85
+ end
86
+
87
+ if @message_id.nil?
88
+ invalid_properties.push('invalid value for "message_id", message_id cannot be nil.')
89
+ end
90
+
91
+ if @message_id.to_s.length < 1
92
+ invalid_properties.push('invalid value for "message_id", the character length must be great than or equal to 1.')
93
+ end
94
+
95
+ if @destination_folder.nil?
96
+ invalid_properties.push('invalid value for "destination_folder", destination_folder cannot be nil.')
97
+ end
98
+
99
+ if @destination_folder.to_s.length < 1
100
+ invalid_properties.push('invalid value for "destination_folder", the character length must be great than or equal to 1.')
101
+ end
102
+
103
+ invalid_properties
104
+ end
105
+
106
+ # Check to see if the all the properties in the model are valid
107
+ # @return true if the model is valid
108
+ def valid?
109
+ return false if @account_location.nil?
110
+ return false if @message_id.nil?
111
+ return false if @message_id.to_s.length < 1
112
+ return false if @destination_folder.nil?
113
+ return false if @destination_folder.to_s.length < 1
114
+ true
115
+ end
116
+
117
+ # Custom attribute writer method with validation
118
+ # @param [Object] message_id Value to be assigned
119
+ def message_id=(message_id)
120
+ if message_id.nil?
121
+ fail ArgumentError, 'message_id cannot be nil'
122
+ end
123
+
124
+ if message_id.to_s.length < 1
125
+ fail ArgumentError, 'invalid value for "message_id", the character length must be great than or equal to 1.'
126
+ end
127
+
128
+ @message_id = message_id
129
+ end
130
+
131
+ # Custom attribute writer method with validation
132
+ # @param [Object] destination_folder Value to be assigned
133
+ def destination_folder=(destination_folder)
134
+ if destination_folder.nil?
135
+ fail ArgumentError, 'destination_folder cannot be nil'
136
+ end
137
+
138
+ if destination_folder.to_s.length < 1
139
+ fail ArgumentError, 'invalid value for "destination_folder", the character length must be great than or equal to 1.'
140
+ end
141
+
142
+ @destination_folder = destination_folder
143
+ end
144
+
145
+ # Checks equality by comparing each attribute.
146
+ # @param [Object] Object to be compared
147
+ def ==(o)
148
+ return true if self.equal?(o)
149
+ self.class == o.class &&
150
+ account_location == o.account_location &&
151
+ message_id == o.message_id &&
152
+ source_folder == o.source_folder &&
153
+ destination_folder == o.destination_folder
154
+ end
155
+
156
+ # @see the `==` method
157
+ # @param [Object] Object to be compared
158
+ def eql?(o)
159
+ self == o
160
+ end
161
+
162
+ # Calculates hash code according to all attributes.
163
+ # @return [Fixnum] Hash code
164
+ def hash
165
+ [account_location, message_id, source_folder, destination_folder].hash
166
+ end
167
+
168
+ # Builds the object from hash
169
+ # @param [Hash] attributes Model attributes in the form of hash
170
+ # @return [Object] Returns the model itself
171
+ def build_from_hash(attributes)
172
+ return nil unless attributes.is_a?(Hash)
173
+ self.class.swagger_types.each_pair do |key, type|
174
+ attribute_key = self.class.attribute_map[key]
175
+ attribute_key = (attribute_key[0, 1].downcase + attribute_key[1..-1]).to_sym
176
+ if type =~ /\AArray<(.*)>/i
177
+ # check to ensure the input is an array given that the the attribute
178
+ # is documented as an array but the input is not
179
+ if attributes[attribute_key].is_a?(Array)
180
+ self.send("#{key}=", attributes[attribute_key].map { |v| _deserialize($1, v) })
181
+ end
182
+ elsif !attributes[attribute_key].nil?
183
+ self.send("#{key}=", _deserialize(type, attributes[attribute_key]))
184
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
185
+ end
186
+
187
+ self
188
+ end
189
+
190
+ # Deserializes the data based on type
191
+ # @param string type Data type
192
+ # @param string value Value to be deserialized
193
+ # @return [Object] Deserialized data
194
+ def _deserialize(type, value)
195
+ case type.to_sym
196
+ when :DateTime
197
+ DateTime.parse(value)
198
+ when :Date
199
+ Date.parse(value)
200
+ when :String
201
+ value.to_s
202
+ when :Integer
203
+ value.to_i
204
+ when :Float
205
+ value.to_f
206
+ when :BOOLEAN
207
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
208
+ true
209
+ else
210
+ false
211
+ end
212
+ when :Object
213
+ # generic object (usually a Hash), return directly
214
+ value
215
+ when /\AArray<(?<inner_type>.+)>\z/
216
+ inner_type = Regexp.last_match[:inner_type]
217
+ value.map { |v| _deserialize(inner_type, v) }
218
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
219
+ k_type = Regexp.last_match[:k_type]
220
+ v_type = Regexp.last_match[:v_type]
221
+ {}.tap do |hash|
222
+ value.each do |k, v|
223
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
224
+ end
225
+ end
226
+ else # model
227
+ sub_type = value[:type] || value[:discriminator] || type
228
+ if AsposeEmailCloud.const_defined?(sub_type)
229
+ type = sub_type
230
+ end
231
+ temp_model = AsposeEmailCloud.const_get(type).new
232
+ temp_model.build_from_hash(value)
233
+ end
234
+ end
235
+
236
+ # Returns the string representation of the object
237
+ # @return [String] String presentation of the object
238
+ def to_s
239
+ to_hash.to_s
240
+ end
241
+
242
+ # to_body is an alias to to_hash (backward compatibility)
243
+ # @return [Hash] Returns the object in the form of hash
244
+ def to_body
245
+ to_hash
246
+ end
247
+
248
+ # Returns the object in the form of hash
249
+ # @return [Hash] Returns the object in the form of hash
250
+ def to_hash
251
+ hash = {}
252
+ self.class.attribute_map.each_pair do |attr, param|
253
+ value = self.send(attr)
254
+ next if value.nil?
255
+ hash[param] = _to_hash(value)
256
+ end
257
+ hash
258
+ end
259
+
260
+ # Outputs non-array value in the form of hash
261
+ # For object, use to_hash. Otherwise, just return the value
262
+ # @param [Object] value Any valid value
263
+ # @return [Hash] Returns the value in the form of hash
264
+ def _to_hash(value)
265
+ if value.is_a?(Array)
266
+ value.compact.map { |v| _to_hash(v) }
267
+ elsif value.is_a?(Hash)
268
+ {}.tap do |hash|
269
+ value.each { |k, v| hash[k] = _to_hash(v) }
270
+ end
271
+ elsif value.respond_to? :to_hash
272
+ value.to_hash
273
+ else
274
+ value
275
+ end
276
+ end
277
+
278
+ end
279
+ end