aspose_email_cloud 20.7.0 → 20.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (388) hide show
  1. checksums.yaml +4 -4
  2. data/lib/aspose-email-cloud.rb +149 -228
  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 +95 -1110
  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 +5 -3
  26. data/lib/aspose-email-cloud/api_invoker.rb +92 -0
  27. data/lib/aspose-email-cloud/configuration.rb +1 -1
  28. data/lib/aspose-email-cloud/models/ai_bcr_image.rb +4 -18
  29. data/lib/aspose-email-cloud/models/ai_bcr_image_storage_file.rb +11 -24
  30. data/lib/aspose-email-cloud/models/ai_bcr_options.rb +8 -26
  31. data/lib/aspose-email-cloud/models/ai_bcr_parse_request.rb +93 -0
  32. data/lib/aspose-email-cloud/models/{ai_bcr_parse_storage_rq.rb → ai_bcr_parse_storage_request.rb} +28 -52
  33. data/lib/aspose-email-cloud/models/{requests/ai_name_complete_request_data.rb → ai_name_complete_request.rb} +22 -28
  34. data/lib/aspose-email-cloud/models/ai_name_component.rb +5 -31
  35. data/lib/aspose-email-cloud/models/{list_response_of_string.rb → ai_name_component_list.rb} +8 -23
  36. data/lib/aspose-email-cloud/models/ai_name_cultural_context.rb +6 -36
  37. data/lib/aspose-email-cloud/models/{requests/ai_name_expand_request_data.rb → ai_name_expand_request.rb} +22 -28
  38. data/lib/aspose-email-cloud/models/ai_name_extracted.rb +3 -23
  39. data/lib/aspose-email-cloud/models/ai_name_extracted_component.rb +3 -21
  40. data/lib/aspose-email-cloud/models/{value_response.rb → ai_name_extracted_list.rb} +9 -23
  41. data/lib/aspose-email-cloud/models/{requests/ai_name_format_request_data.rb → ai_name_format_request.rb} +22 -28
  42. data/lib/aspose-email-cloud/models/ai_name_formatted.rb +3 -21
  43. data/lib/aspose-email-cloud/models/ai_name_gender_hypothesis.rb +3 -21
  44. data/lib/aspose-email-cloud/models/{list_response_of_ai_bcr_ocr_data.rb → ai_name_gender_hypothesis_list.rb} +8 -23
  45. data/lib/aspose-email-cloud/models/{requests/ai_name_genderize_request_data.rb → ai_name_genderize_request.rb} +22 -28
  46. data/lib/aspose-email-cloud/models/{ai_name_parsed_match_rq.rb → ai_name_match_parsed_request.rb} +7 -37
  47. data/lib/aspose-email-cloud/models/{requests/ai_name_match_request_data.rb → ai_name_match_request.rb} +25 -32
  48. data/lib/aspose-email-cloud/models/ai_name_match_result.rb +3 -23
  49. data/lib/aspose-email-cloud/models/ai_name_mismatch.rb +4 -26
  50. data/lib/aspose-email-cloud/models/{requests/ai_name_parse_email_address_request_data.rb → ai_name_parse_email_address_request.rb} +23 -28
  51. data/lib/aspose-email-cloud/models/{requests/ai_name_parse_request_data.rb → ai_name_parse_request.rb} +24 -30
  52. data/lib/aspose-email-cloud/models/{ai_name_parsed_rq.rb → ai_name_parsed_request.rb} +6 -30
  53. data/lib/aspose-email-cloud/models/ai_name_weighted.rb +3 -21
  54. data/lib/aspose-email-cloud/models/ai_name_weighted_variants.rb +3 -23
  55. data/lib/aspose-email-cloud/models/alternate_view.rb +8 -46
  56. data/lib/aspose-email-cloud/models/associated_person.rb +4 -26
  57. data/lib/aspose-email-cloud/models/attachment.rb +11 -59
  58. data/lib/aspose-email-cloud/models/attachment_base.rb +5 -33
  59. data/lib/aspose-email-cloud/models/{calendar_dto_alternate_rq.rb → calendar_as_alternate_request.rb} +7 -29
  60. data/lib/aspose-email-cloud/models/calendar_as_file_request.rb +218 -0
  61. data/lib/aspose-email-cloud/models/{requests/convert_calendar_request_data.rb → calendar_convert_request.rb} +18 -24
  62. data/lib/aspose-email-cloud/models/calendar_dto.rb +23 -131
  63. data/lib/aspose-email-cloud/models/{requests/get_email_file_as_model_request_data.rb → calendar_from_file_request.rb} +14 -20
  64. data/lib/aspose-email-cloud/models/{requests/get_calendar_model_as_alternate_request_data.rb → calendar_get_as_alternate_request.rb} +21 -26
  65. data/lib/aspose-email-cloud/models/{requests/get_calendar_as_file_request_data.rb → calendar_get_as_file_request.rb} +25 -30
  66. data/lib/aspose-email-cloud/models/{requests/get_calendar_model_list_request_data.rb → calendar_get_list_request.rb} +23 -28
  67. data/lib/aspose-email-cloud/models/{requests/get_calendar_model_request_data.rb → calendar_get_request.rb} +25 -30
  68. data/lib/aspose-email-cloud/models/calendar_reminder.rb +9 -55
  69. data/lib/aspose-email-cloud/models/{storage_model_rq_of_calendar_dto.rb → calendar_save_request.rb} +39 -32
  70. data/lib/aspose-email-cloud/models/{calendar_dto_list.rb → calendar_storage_list.rb} +5 -21
  71. data/lib/aspose-email-cloud/models/{ai_bcr_rq.rb → client_account_base_request.rb} +19 -28
  72. data/lib/aspose-email-cloud/models/{requests/get_email_attachment_request_data.rb → client_account_get_multi_request.rb} +24 -38
  73. data/lib/aspose-email-cloud/models/{requests/get_email_request_data.rb → client_account_get_request.rb} +25 -30
  74. data/lib/aspose-email-cloud/models/{storage_file_rq_of_email_client_multi_account.rb → client_account_save_multi_request.rb} +28 -35
  75. data/lib/aspose-email-cloud/models/{storage_file_rq_of_email_client_account.rb → client_account_save_request.rb} +28 -35
  76. data/lib/aspose-email-cloud/models/{primitive_object.rb → client_folder_create_request.rb} +246 -245
  77. data/lib/aspose-email-cloud/models/{ai_bcr_base64_image.rb → client_folder_delete_request.rb} +49 -43
  78. data/lib/aspose-email-cloud/models/{requests/list_email_folders_request_data.rb → client_folder_get_list_request.rb} +27 -38
  79. data/lib/aspose-email-cloud/models/client_message_append_file_request.rb +114 -0
  80. data/lib/aspose-email-cloud/models/client_message_append_request.rb +241 -0
  81. data/lib/aspose-email-cloud/models/client_message_base_request.rb +237 -0
  82. data/lib/aspose-email-cloud/models/{email_property.rb → client_message_delete_request.rb} +47 -69
  83. data/lib/aspose-email-cloud/models/{requests/fetch_email_model_request_data.rb → client_message_fetch_file_request.rb} +34 -41
  84. data/lib/aspose-email-cloud/models/{requests/fetch_email_message_request_data.rb → client_message_fetch_request.rb} +40 -41
  85. data/lib/aspose-email-cloud/models/{requests/list_email_models_request_data.rb → client_message_list_request.rb} +39 -40
  86. data/lib/aspose-email-cloud/models/{set_message_read_flag_account_base_request.rb → client_message_move_request.rb} +59 -98
  87. data/lib/aspose-email-cloud/models/client_message_send_file_request.rb +103 -0
  88. data/lib/aspose-email-cloud/models/{ai_bcr_base64_rq.rb → client_message_send_request.rb} +33 -43
  89. data/lib/aspose-email-cloud/models/client_message_set_is_read_request.rb +251 -0
  90. data/lib/aspose-email-cloud/models/{hierarchical_object_response.rb → client_thread_base_request.rb} +51 -40
  91. data/lib/aspose-email-cloud/models/{ai_bcr_ocr_data.rb → client_thread_delete_request.rb} +58 -68
  92. data/lib/aspose-email-cloud/models/{requests/list_email_threads_request_data.rb → client_thread_get_list_request.rb} +28 -41
  93. data/lib/aspose-email-cloud/models/{requests/fetch_email_thread_messages_request_data.rb → client_thread_get_messages_request.rb} +29 -40
  94. data/lib/aspose-email-cloud/models/{move_email_thread_rq.rb → client_thread_move_request.rb} +67 -73
  95. data/lib/aspose-email-cloud/models/{indexed_primitive_object.rb → client_thread_set_is_read_request.rb} +260 -263
  96. data/lib/aspose-email-cloud/models/contact_as_file_request.rb +218 -0
  97. data/lib/aspose-email-cloud/models/{requests/convert_contact_request_data.rb → contact_convert_request.rb} +27 -33
  98. data/lib/aspose-email-cloud/models/contact_dto.rb +37 -207
  99. data/lib/aspose-email-cloud/models/{requests/get_contact_file_as_model_request_data.rb → contact_from_file_request.rb} +15 -21
  100. data/lib/aspose-email-cloud/models/{requests/get_contact_as_file_request_data.rb → contact_get_as_file_request.rb} +29 -34
  101. data/lib/aspose-email-cloud/models/{requests/get_contact_model_list_request_data.rb → contact_get_list_request.rb} +15 -19
  102. data/lib/aspose-email-cloud/models/{requests/get_contact_model_request_data.rb → contact_get_request.rb} +22 -27
  103. data/lib/aspose-email-cloud/models/{list_response_of_hierarchical_object.rb → contact_list.rb} +8 -23
  104. data/lib/aspose-email-cloud/models/contact_photo.rb +27 -30
  105. data/lib/aspose-email-cloud/models/{storage_model_rq_of_contact_dto.rb → contact_save_request.rb} +39 -32
  106. data/lib/aspose-email-cloud/models/{contact_dto_list.rb → contact_storage_list.rb} +5 -21
  107. data/lib/aspose-email-cloud/models/content_type.rb +6 -38
  108. data/lib/aspose-email-cloud/models/content_type_parameter.rb +3 -21
  109. data/lib/aspose-email-cloud/models/{requests/copy_file_request_data.rb → copy_file_request.rb} +23 -29
  110. data/lib/aspose-email-cloud/models/{requests/copy_folder_request_data.rb → copy_folder_request.rb} +21 -27
  111. data/lib/aspose-email-cloud/models/{requests/create_folder_request_data.rb → create_folder_request.rb} +16 -21
  112. data/lib/aspose-email-cloud/models/customer_event.rb +3 -21
  113. data/lib/aspose-email-cloud/models/daily_recurrence_pattern_dto.rb +6 -41
  114. data/lib/aspose-email-cloud/models/{requests/delete_file_request_data.rb → delete_file_request.rb} +18 -23
  115. data/lib/aspose-email-cloud/models/{requests/delete_folder_request_data.rb → delete_folder_request.rb} +18 -23
  116. data/lib/aspose-email-cloud/models/disc_usage.rb +8 -25
  117. data/lib/aspose-email-cloud/models/{discover_email_config_rq.rb → discover_email_config_request.rb} +6 -28
  118. data/lib/aspose-email-cloud/models/{requests/is_email_address_disposable_request_data.rb → disposable_email_is_disposable_request.rb} +15 -19
  119. data/lib/aspose-email-cloud/models/{requests/download_file_request_data.rb → download_file_request.rb} +18 -23
  120. data/lib/aspose-email-cloud/models/email_account_config.rb +9 -55
  121. data/lib/aspose-email-cloud/models/email_account_config_list.rb +3 -19
  122. data/lib/aspose-email-cloud/models/email_address.rb +31 -41
  123. data/lib/aspose-email-cloud/models/email_as_file_request.rb +218 -0
  124. data/lib/aspose-email-cloud/models/email_client_account.rb +7 -41
  125. data/lib/aspose-email-cloud/models/email_client_account_credentials.rb +2 -25
  126. data/lib/aspose-email-cloud/models/email_client_account_oauth_credentials.rb +7 -46
  127. data/lib/aspose-email-cloud/models/email_client_account_password_credentials.rb +4 -31
  128. data/lib/aspose-email-cloud/models/email_client_multi_account.rb +3 -23
  129. data/lib/aspose-email-cloud/models/{discover_email_config_oauth.rb → email_config_discover_oauth_request.rb} +10 -48
  130. data/lib/aspose-email-cloud/models/{discover_email_config_password.rb → email_config_discover_password_request.rb} +7 -33
  131. data/lib/aspose-email-cloud/models/{requests/discover_email_config_request_data.rb → email_config_discover_request.rb} +17 -22
  132. data/lib/aspose-email-cloud/models/{requests/get_email_file_as_mapi_model_request_data.rb → email_convert_request.rb} +32 -28
  133. data/lib/aspose-email-cloud/models/email_dto.rb +33 -191
  134. data/lib/aspose-email-cloud/models/email_from_file_request.rb +84 -0
  135. data/lib/aspose-email-cloud/models/{requests/get_email_as_file_request_data.rb → email_get_as_file_request.rb} +18 -23
  136. data/lib/aspose-email-cloud/models/{requests/get_email_model_list_request_data.rb → email_get_list_request.rb} +17 -21
  137. data/lib/aspose-email-cloud/models/{requests/get_email_model_request_data.rb → email_get_request.rb} +24 -29
  138. data/lib/aspose-email-cloud/models/email_list.rb +199 -0
  139. data/lib/aspose-email-cloud/models/{requests/email_request.rb → email_request.rb} +5 -8
  140. data/lib/aspose-email-cloud/models/{storage_model_rq_of_email_dto.rb → email_save_request.rb} +39 -32
  141. data/lib/aspose-email-cloud/models/{email_dto_list.rb → email_storage_list.rb} +5 -21
  142. data/lib/aspose-email-cloud/models/email_thread.rb +5 -33
  143. data/lib/aspose-email-cloud/models/email_thread_list.rb +3 -19
  144. data/lib/aspose-email-cloud/models/enum_with_custom_of_associated_person_category.rb +22 -21
  145. data/lib/aspose-email-cloud/models/enum_with_custom_of_email_address_category.rb +22 -21
  146. data/lib/aspose-email-cloud/models/enum_with_custom_of_event_category.rb +22 -21
  147. data/lib/aspose-email-cloud/models/enum_with_custom_of_instant_messenger_category.rb +22 -21
  148. data/lib/aspose-email-cloud/models/enum_with_custom_of_phone_number_category.rb +22 -21
  149. data/lib/aspose-email-cloud/models/enum_with_custom_of_postal_address_category.rb +22 -21
  150. data/lib/aspose-email-cloud/models/enum_with_custom_of_url_category.rb +22 -21
  151. data/lib/aspose-email-cloud/models/error.rb +14 -39
  152. data/lib/aspose-email-cloud/models/error_details.rb +8 -25
  153. data/lib/aspose-email-cloud/models/file_version.rb +24 -61
  154. data/lib/aspose-email-cloud/models/file_versions.rb +5 -20
  155. data/lib/aspose-email-cloud/models/files_list.rb +5 -20
  156. data/lib/aspose-email-cloud/models/files_upload_result.rb +8 -29
  157. data/lib/aspose-email-cloud/models/{requests/get_disc_usage_request_data.rb → get_disc_usage_request.rb} +13 -17
  158. data/lib/aspose-email-cloud/models/{requests/get_file_versions_request_data.rb → get_file_versions_request.rb} +16 -21
  159. data/lib/aspose-email-cloud/models/{requests/get_files_list_request_data.rb → get_files_list_request.rb} +16 -21
  160. data/lib/aspose-email-cloud/models/{requests/http_request.rb → http_request.rb} +1 -5
  161. data/lib/aspose-email-cloud/models/instant_messenger_address.rb +4 -26
  162. data/lib/aspose-email-cloud/models/linked_resource.rb +7 -39
  163. data/lib/aspose-email-cloud/models/list_response_of_ai_name_component.rb +2 -18
  164. data/lib/aspose-email-cloud/models/list_response_of_ai_name_extracted.rb +2 -18
  165. data/lib/aspose-email-cloud/models/list_response_of_ai_name_gender_hypothesis.rb +2 -18
  166. data/lib/aspose-email-cloud/models/list_response_of_contact_dto.rb +2 -18
  167. data/lib/aspose-email-cloud/models/list_response_of_email_account_config.rb +2 -18
  168. data/lib/aspose-email-cloud/models/list_response_of_email_dto.rb +2 -18
  169. data/lib/aspose-email-cloud/models/list_response_of_email_thread.rb +2 -18
  170. data/lib/aspose-email-cloud/models/list_response_of_mail_message_base.rb +198 -0
  171. data/lib/aspose-email-cloud/models/list_response_of_mail_server_folder.rb +2 -18
  172. data/lib/aspose-email-cloud/models/list_response_of_storage_file_location.rb +2 -18
  173. data/lib/aspose-email-cloud/models/list_response_of_storage_model_of_calendar_dto.rb +2 -18
  174. data/lib/aspose-email-cloud/models/list_response_of_storage_model_of_contact_dto.rb +2 -18
  175. data/lib/aspose-email-cloud/models/list_response_of_storage_model_of_email_dto.rb +2 -18
  176. data/lib/aspose-email-cloud/models/mail_address.rb +5 -31
  177. data/lib/aspose-email-cloud/models/{mime_response.rb → mail_message_base.rb} +19 -27
  178. data/lib/aspose-email-cloud/models/{hierarchical_object.rb → mail_message_base64.rb} +252 -247
  179. data/lib/aspose-email-cloud/models/mail_message_base_list.rb +199 -0
  180. data/lib/aspose-email-cloud/models/mail_message_dto.rb +219 -0
  181. data/lib/aspose-email-cloud/models/mail_message_mapi.rb +219 -0
  182. data/lib/aspose-email-cloud/models/mail_server_folder.rb +3 -21
  183. data/lib/aspose-email-cloud/models/mail_server_folder_list.rb +199 -0
  184. data/lib/aspose-email-cloud/models/mapi_attachment_dto.rb +3 -21
  185. data/lib/aspose-email-cloud/models/mapi_binary_property_dto.rb +4 -31
  186. data/lib/aspose-email-cloud/models/mapi_boolean_property_dto.rb +4 -31
  187. data/lib/aspose-email-cloud/models/mapi_calendar_as_file_request.rb +218 -0
  188. data/lib/aspose-email-cloud/models/mapi_calendar_attendees_dto.rb +5 -35
  189. data/lib/aspose-email-cloud/models/mapi_calendar_daily_recurrence_pattern_dto.rb +16 -99
  190. data/lib/aspose-email-cloud/models/mapi_calendar_dto.rb +36 -203
  191. data/lib/aspose-email-cloud/models/mapi_calendar_event_recurrence_dto.rb +7 -41
  192. data/lib/aspose-email-cloud/models/mapi_calendar_exception_info_dto.rb +15 -85
  193. data/lib/aspose-email-cloud/models/{requests/get_calendar_file_as_model_request_data.rb → mapi_calendar_from_file_request.rb} +14 -20
  194. data/lib/aspose-email-cloud/models/{requests/get_mapi_calendar_model_request_data.rb → mapi_calendar_get_request.rb} +25 -29
  195. data/lib/aspose-email-cloud/models/mapi_calendar_recurrence_pattern_dto.rb +14 -91
  196. data/lib/aspose-email-cloud/models/{storage_model_rq_of_mapi_calendar_dto.rb → mapi_calendar_save_request.rb} +39 -32
  197. data/lib/aspose-email-cloud/models/mapi_calendar_time_zone_dto.rb +3 -23
  198. data/lib/aspose-email-cloud/models/mapi_calendar_time_zone_info_dto.rb +8 -48
  199. data/lib/aspose-email-cloud/models/mapi_calendar_time_zone_rule_dto.rb +38 -56
  200. data/lib/aspose-email-cloud/models/mapi_calendar_weekly_recurrence_pattern_dto.rb +16 -99
  201. data/lib/aspose-email-cloud/models/mapi_calendar_yearly_and_monthly_recurrence_pattern_dto.rb +18 -109
  202. data/lib/aspose-email-cloud/models/mapi_contact_as_file_request.rb +218 -0
  203. data/lib/aspose-email-cloud/models/mapi_contact_dto.rb +27 -156
  204. data/lib/aspose-email-cloud/models/mapi_contact_electronic_address_dto.rb +7 -41
  205. data/lib/aspose-email-cloud/models/mapi_contact_electronic_address_property_set_dto.rb +10 -56
  206. data/lib/aspose-email-cloud/models/mapi_contact_event_property_set_dto.rb +3 -21
  207. data/lib/aspose-email-cloud/models/{requests/get_contact_file_as_mapi_model_request_data.rb → mapi_contact_from_file_request.rb} +21 -27
  208. data/lib/aspose-email-cloud/models/{requests/get_mapi_contact_model_request_data.rb → mapi_contact_get_request.rb} +22 -26
  209. data/lib/aspose-email-cloud/models/mapi_contact_name_property_set_dto.rb +11 -61
  210. data/lib/aspose-email-cloud/models/mapi_contact_other_property_set_dto.rb +9 -51
  211. data/lib/aspose-email-cloud/models/mapi_contact_personal_info_property_set_dto.rb +20 -108
  212. data/lib/aspose-email-cloud/models/mapi_contact_photo_dto.rb +28 -31
  213. data/lib/aspose-email-cloud/models/mapi_contact_physical_address_dto.rb +10 -56
  214. data/lib/aspose-email-cloud/models/mapi_contact_physical_address_property_set_dto.rb +4 -26
  215. data/lib/aspose-email-cloud/models/mapi_contact_professional_property_set_dto.rb +8 -46
  216. data/lib/aspose-email-cloud/models/{storage_model_rq_of_mapi_contact_dto.rb → mapi_contact_save_request.rb} +39 -32
  217. data/lib/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb +20 -106
  218. data/lib/aspose-email-cloud/models/mapi_date_time_property_dto.rb +4 -31
  219. data/lib/aspose-email-cloud/models/mapi_electronic_address_dto.rb +6 -36
  220. data/lib/aspose-email-cloud/models/mapi_file_as_property_dto.rb +4 -31
  221. data/lib/aspose-email-cloud/models/mapi_importance_property_dto.rb +4 -31
  222. data/lib/aspose-email-cloud/models/mapi_int_property_dto.rb +4 -31
  223. data/lib/aspose-email-cloud/models/mapi_known_property_descriptor.rb +27 -26
  224. data/lib/aspose-email-cloud/models/mapi_legacy_free_busy_property_dto.rb +4 -31
  225. data/lib/aspose-email-cloud/models/mapi_message_as_file_request.rb +218 -0
  226. data/lib/aspose-email-cloud/models/mapi_message_dto.rb +43 -240
  227. data/lib/aspose-email-cloud/models/{requests/convert_email_request_data.rb → mapi_message_from_file_request.rb} +18 -24
  228. data/lib/aspose-email-cloud/models/{requests/get_mapi_message_model_request_data.rb → mapi_message_get_request.rb} +24 -28
  229. data/lib/aspose-email-cloud/models/mapi_message_item_base_dto.rb +17 -110
  230. data/lib/aspose-email-cloud/models/{storage_model_rq_of_mapi_message_dto.rb → mapi_message_save_request.rb} +39 -32
  231. data/lib/aspose-email-cloud/models/mapi_multi_int_property_dto.rb +4 -33
  232. data/lib/aspose-email-cloud/models/mapi_multi_string_property_dto.rb +4 -33
  233. data/lib/aspose-email-cloud/models/mapi_physical_address_index_property_dto.rb +4 -31
  234. data/lib/aspose-email-cloud/models/mapi_pid_lid_property_descriptor.rb +8 -51
  235. data/lib/aspose-email-cloud/models/mapi_pid_name_property_descriptor.rb +7 -46
  236. data/lib/aspose-email-cloud/models/mapi_pid_property_descriptor.rb +6 -41
  237. data/lib/aspose-email-cloud/models/mapi_pid_tag_property_descriptor.rb +8 -51
  238. data/lib/aspose-email-cloud/models/mapi_property_descriptor.rb +1 -20
  239. data/lib/aspose-email-cloud/models/mapi_property_dto.rb +2 -25
  240. data/lib/aspose-email-cloud/models/mapi_recipient_dto.rb +5 -31
  241. data/lib/aspose-email-cloud/models/mapi_response_type_property_dto.rb +4 -31
  242. data/lib/aspose-email-cloud/models/mapi_string_property_dto.rb +4 -31
  243. data/lib/aspose-email-cloud/models/monthly_recurrence_pattern_dto.rb +9 -56
  244. data/lib/aspose-email-cloud/models/{requests/move_file_request_data.rb → move_file_request.rb} +23 -29
  245. data/lib/aspose-email-cloud/models/{requests/move_folder_request_data.rb → move_folder_request.rb} +22 -27
  246. data/lib/aspose-email-cloud/models/name_value_pair.rb +3 -21
  247. data/lib/aspose-email-cloud/models/object_exist.rb +8 -25
  248. data/lib/aspose-email-cloud/models/{requests/object_exists_request_data.rb → object_exists_request.rb} +18 -23
  249. data/lib/aspose-email-cloud/models/phone_number.rb +4 -26
  250. data/lib/aspose-email-cloud/models/postal_address.rb +12 -66
  251. data/lib/aspose-email-cloud/models/recurrence_pattern_dto.rb +5 -40
  252. data/lib/aspose-email-cloud/models/reminder_attendee.rb +26 -16
  253. data/lib/aspose-email-cloud/models/reminder_trigger.rb +4 -26
  254. data/lib/aspose-email-cloud/models/storage_exist.rb +5 -18
  255. data/lib/aspose-email-cloud/models/{requests/storage_exists_request_data.rb → storage_exists_request.rb} +15 -19
  256. data/lib/aspose-email-cloud/models/storage_file.rb +17 -46
  257. data/lib/aspose-email-cloud/models/storage_file_location.rb +5 -27
  258. data/lib/aspose-email-cloud/models/storage_file_location_list.rb +199 -0
  259. data/lib/aspose-email-cloud/models/storage_folder_location.rb +3 -21
  260. data/lib/aspose-email-cloud/models/storage_model_of_calendar_dto.rb +13 -21
  261. data/lib/aspose-email-cloud/models/storage_model_of_contact_dto.rb +13 -21
  262. data/lib/aspose-email-cloud/models/storage_model_of_email_client_account.rb +217 -0
  263. data/lib/aspose-email-cloud/models/storage_model_of_email_client_multi_account.rb +217 -0
  264. data/lib/aspose-email-cloud/models/storage_model_of_email_dto.rb +13 -21
  265. data/lib/aspose-email-cloud/models/storage_model_of_mapi_calendar_dto.rb +217 -0
  266. data/lib/aspose-email-cloud/models/storage_model_of_mapi_contact_dto.rb +217 -0
  267. data/lib/aspose-email-cloud/models/storage_model_of_mapi_message_dto.rb +217 -0
  268. data/lib/aspose-email-cloud/models/task_regenerating_pattern_dto.rb +7 -46
  269. data/lib/aspose-email-cloud/models/{requests/upload_file_request_data.rb → upload_file_request.rb} +17 -23
  270. data/lib/aspose-email-cloud/models/url.rb +4 -26
  271. data/lib/aspose-email-cloud/models/value_t_of_boolean.rb +2 -16
  272. data/lib/aspose-email-cloud/models/value_t_of_string.rb +222 -0
  273. data/lib/aspose-email-cloud/models/weekly_recurrence_pattern_dto.rb +7 -48
  274. data/lib/aspose-email-cloud/models/yearly_recurrence_pattern_dto.rb +10 -61
  275. data/lib/aspose-email-cloud/version.rb +2 -2
  276. metadata +138 -202
  277. data/lib/aspose-email-cloud/models/account_base_request.rb +0 -263
  278. data/lib/aspose-email-cloud/models/add_attachment_request.rb +0 -226
  279. data/lib/aspose-email-cloud/models/ai_bcr_ocr_data_part.rb +0 -300
  280. data/lib/aspose-email-cloud/models/ai_bcr_parse_ocr_data_rq.rb +0 -233
  281. data/lib/aspose-email-cloud/models/ai_bcr_storage_image_rq.rb +0 -233
  282. data/lib/aspose-email-cloud/models/append_email_account_base_request.rb +0 -318
  283. data/lib/aspose-email-cloud/models/append_email_base_request.rb +0 -336
  284. data/lib/aspose-email-cloud/models/append_email_mime_base_request.rb +0 -355
  285. data/lib/aspose-email-cloud/models/append_email_model_rq.rb +0 -336
  286. data/lib/aspose-email-cloud/models/base_object.rb +0 -232
  287. data/lib/aspose-email-cloud/models/create_email_request.rb +0 -231
  288. data/lib/aspose-email-cloud/models/create_folder_base_request.rb +0 -313
  289. data/lib/aspose-email-cloud/models/delete_email_thread_account_rq.rb +0 -276
  290. data/lib/aspose-email-cloud/models/delete_folder_base_request.rb +0 -318
  291. data/lib/aspose-email-cloud/models/delete_message_base_request.rb +0 -331
  292. data/lib/aspose-email-cloud/models/email_account_request.rb +0 -397
  293. data/lib/aspose-email-cloud/models/email_document.rb +0 -233
  294. data/lib/aspose-email-cloud/models/email_document_response.rb +0 -213
  295. data/lib/aspose-email-cloud/models/email_properties.rb +0 -233
  296. data/lib/aspose-email-cloud/models/email_property_response.rb +0 -213
  297. data/lib/aspose-email-cloud/models/email_thread_read_flag_rq.rb +0 -294
  298. data/lib/aspose-email-cloud/models/hierarchical_object_request.rb +0 -231
  299. data/lib/aspose-email-cloud/models/indexed_hierarchical_object.rb +0 -265
  300. data/lib/aspose-email-cloud/models/link.rb +0 -252
  301. data/lib/aspose-email-cloud/models/list_response_of_hierarchical_object_response.rb +0 -214
  302. data/lib/aspose-email-cloud/models/move_email_message_rq.rb +0 -302
  303. data/lib/aspose-email-cloud/models/requests/add_calendar_attachment_request_data.rb +0 -99
  304. data/lib/aspose-email-cloud/models/requests/add_contact_attachment_request_data.rb +0 -109
  305. data/lib/aspose-email-cloud/models/requests/add_email_attachment_request_data.rb +0 -99
  306. data/lib/aspose-email-cloud/models/requests/add_mapi_attachment_request_data.rb +0 -99
  307. data/lib/aspose-email-cloud/models/requests/ai_bcr_ocr_request_data.rb +0 -79
  308. data/lib/aspose-email-cloud/models/requests/ai_bcr_ocr_storage_request_data.rb +0 -79
  309. data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_model_request_data.rb +0 -79
  310. data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_ocr_data_model_request_data.rb +0 -79
  311. data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_request_data.rb +0 -79
  312. data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_storage_request_data.rb +0 -79
  313. data/lib/aspose-email-cloud/models/requests/ai_name_expand_parsed_request_data.rb +0 -79
  314. data/lib/aspose-email-cloud/models/requests/ai_name_format_parsed_request_data.rb +0 -79
  315. data/lib/aspose-email-cloud/models/requests/ai_name_genderize_parsed_request_data.rb +0 -79
  316. data/lib/aspose-email-cloud/models/requests/ai_name_match_parsed_request_data.rb +0 -79
  317. data/lib/aspose-email-cloud/models/requests/append_email_message_request_data.rb +0 -79
  318. data/lib/aspose-email-cloud/models/requests/append_email_model_message_request_data.rb +0 -79
  319. data/lib/aspose-email-cloud/models/requests/append_mime_message_request_data.rb +0 -79
  320. data/lib/aspose-email-cloud/models/requests/convert_calendar_model_to_alternate_request_data.rb +0 -79
  321. data/lib/aspose-email-cloud/models/requests/convert_calendar_model_to_file_request_data.rb +0 -89
  322. data/lib/aspose-email-cloud/models/requests/convert_calendar_model_to_mapi_model_request_data.rb +0 -79
  323. data/lib/aspose-email-cloud/models/requests/convert_contact_model_to_file_request_data.rb +0 -89
  324. data/lib/aspose-email-cloud/models/requests/convert_contact_model_to_mapi_model_request_data.rb +0 -79
  325. data/lib/aspose-email-cloud/models/requests/convert_email_model_to_file_request_data.rb +0 -89
  326. data/lib/aspose-email-cloud/models/requests/convert_email_model_to_mapi_model_request_data.rb +0 -79
  327. data/lib/aspose-email-cloud/models/requests/convert_mapi_calendar_model_to_calendar_model_request_data.rb +0 -79
  328. data/lib/aspose-email-cloud/models/requests/convert_mapi_calendar_model_to_file_request_data.rb +0 -89
  329. data/lib/aspose-email-cloud/models/requests/convert_mapi_contact_model_to_contact_model_request_data.rb +0 -79
  330. data/lib/aspose-email-cloud/models/requests/convert_mapi_contact_model_to_file_request_data.rb +0 -89
  331. data/lib/aspose-email-cloud/models/requests/convert_mapi_message_model_to_email_model_request_data.rb +0 -79
  332. data/lib/aspose-email-cloud/models/requests/convert_mapi_message_model_to_file_request_data.rb +0 -89
  333. data/lib/aspose-email-cloud/models/requests/create_calendar_request_data.rb +0 -89
  334. data/lib/aspose-email-cloud/models/requests/create_contact_request_data.rb +0 -99
  335. data/lib/aspose-email-cloud/models/requests/create_email_folder_request_data.rb +0 -79
  336. data/lib/aspose-email-cloud/models/requests/create_email_request_data.rb +0 -89
  337. data/lib/aspose-email-cloud/models/requests/create_mapi_request_data.rb +0 -89
  338. data/lib/aspose-email-cloud/models/requests/delete_calendar_property_request_data.rb +0 -109
  339. data/lib/aspose-email-cloud/models/requests/delete_contact_property_request_data.rb +0 -119
  340. data/lib/aspose-email-cloud/models/requests/delete_email_folder_request_data.rb +0 -79
  341. data/lib/aspose-email-cloud/models/requests/delete_email_message_request_data.rb +0 -79
  342. data/lib/aspose-email-cloud/models/requests/delete_email_thread_request_data.rb +0 -89
  343. data/lib/aspose-email-cloud/models/requests/delete_mapi_attachment_request_data.rb +0 -99
  344. data/lib/aspose-email-cloud/models/requests/delete_mapi_properties_request_data.rb +0 -89
  345. data/lib/aspose-email-cloud/models/requests/discover_email_config_oauth_request_data.rb +0 -79
  346. data/lib/aspose-email-cloud/models/requests/discover_email_config_password_request_data.rb +0 -79
  347. data/lib/aspose-email-cloud/models/requests/get_calendar_attachment_request_data.rb +0 -101
  348. data/lib/aspose-email-cloud/models/requests/get_calendar_file_as_mapi_model_request_data.rb +0 -80
  349. data/lib/aspose-email-cloud/models/requests/get_calendar_list_request_data.rb +0 -108
  350. data/lib/aspose-email-cloud/models/requests/get_calendar_request_data.rb +0 -91
  351. data/lib/aspose-email-cloud/models/requests/get_contact_attachment_request_data.rb +0 -111
  352. data/lib/aspose-email-cloud/models/requests/get_contact_list_request_data.rb +0 -103
  353. data/lib/aspose-email-cloud/models/requests/get_contact_properties_request_data.rb +0 -101
  354. data/lib/aspose-email-cloud/models/requests/get_email_client_account_request_data.rb +0 -102
  355. data/lib/aspose-email-cloud/models/requests/get_email_client_multi_account_request_data.rb +0 -102
  356. data/lib/aspose-email-cloud/models/requests/get_email_property_request_data.rb +0 -101
  357. data/lib/aspose-email-cloud/models/requests/get_mapi_attachment_request_data.rb +0 -101
  358. data/lib/aspose-email-cloud/models/requests/get_mapi_attachments_request_data.rb +0 -91
  359. data/lib/aspose-email-cloud/models/requests/get_mapi_list_request_data.rb +0 -93
  360. data/lib/aspose-email-cloud/models/requests/get_mapi_properties_request_data.rb +0 -91
  361. data/lib/aspose-email-cloud/models/requests/list_email_messages_request_data.rb +0 -127
  362. data/lib/aspose-email-cloud/models/requests/move_email_message_request_data.rb +0 -79
  363. data/lib/aspose-email-cloud/models/requests/move_email_thread_request_data.rb +0 -89
  364. data/lib/aspose-email-cloud/models/requests/save_calendar_model_request_data.rb +0 -89
  365. data/lib/aspose-email-cloud/models/requests/save_contact_model_request_data.rb +0 -99
  366. data/lib/aspose-email-cloud/models/requests/save_email_client_account_request_data.rb +0 -79
  367. data/lib/aspose-email-cloud/models/requests/save_email_client_multi_account_request_data.rb +0 -79
  368. data/lib/aspose-email-cloud/models/requests/save_email_model_request_data.rb +0 -99
  369. data/lib/aspose-email-cloud/models/requests/save_mail_account_request_data.rb +0 -79
  370. data/lib/aspose-email-cloud/models/requests/save_mail_o_auth_account_request_data.rb +0 -79
  371. data/lib/aspose-email-cloud/models/requests/save_mapi_calendar_model_request_data.rb +0 -99
  372. data/lib/aspose-email-cloud/models/requests/save_mapi_contact_model_request_data.rb +0 -99
  373. data/lib/aspose-email-cloud/models/requests/save_mapi_message_model_request_data.rb +0 -99
  374. data/lib/aspose-email-cloud/models/requests/send_email_mime_request_data.rb +0 -79
  375. data/lib/aspose-email-cloud/models/requests/send_email_model_request_data.rb +0 -79
  376. data/lib/aspose-email-cloud/models/requests/send_email_request_data.rb +0 -79
  377. data/lib/aspose-email-cloud/models/requests/set_email_property_request_data.rb +0 -99
  378. data/lib/aspose-email-cloud/models/requests/set_email_read_flag_request_data.rb +0 -79
  379. data/lib/aspose-email-cloud/models/requests/set_email_thread_read_flag_request_data.rb +0 -89
  380. data/lib/aspose-email-cloud/models/requests/update_calendar_properties_request_data.rb +0 -89
  381. data/lib/aspose-email-cloud/models/requests/update_contact_properties_request_data.rb +0 -99
  382. data/lib/aspose-email-cloud/models/requests/update_mapi_properties_request_data.rb +0 -89
  383. data/lib/aspose-email-cloud/models/save_email_account_request.rb +0 -434
  384. data/lib/aspose-email-cloud/models/save_o_auth_email_account_request.rb +0 -521
  385. data/lib/aspose-email-cloud/models/send_email_base_request.rb +0 -281
  386. data/lib/aspose-email-cloud/models/send_email_mime_base_request.rb +0 -300
  387. data/lib/aspose-email-cloud/models/send_email_model_rq.rb +0 -276
  388. data/lib/aspose-email-cloud/models/set_email_property_request.rb +0 -231
@@ -1,6 +1,5 @@
1
-
2
1
  # ----------------------------------------------------------------------------
3
- # <copyright company="Aspose" file="fetch_email_thread_messages_request_data.rb">
2
+ # <copyright company="Aspose" file="client_thread_get_messages_request.rb">
4
3
  # Copyright (c) 2018-2020 Aspose Pty Ltd. All rights reserved.
5
4
  # </copyright>
6
5
  # <summary>
@@ -24,91 +23,81 @@
24
23
  # </summary>
25
24
  # ----------------------------------------------------------------------------
26
25
 
27
-
28
26
  require_relative './email_request'
29
27
  require_relative './http_request'
30
28
 
31
29
  module AsposeEmailCloud
32
- # Request model for fetch_email_thread_messages operation.
33
- class FetchEmailThreadMessagesRequestData < EmailRequest
34
-
30
+ # Request model for client_thread_get_messages operation.
31
+ class ClientThreadGetMessagesRequest < EmailRequest
35
32
  # Thread identifier
36
33
  # @return [String]
37
34
  attr_accessor :thread_id
38
35
  # Email account
39
36
  # @return [String]
40
- attr_accessor :first_account
41
- # Additional email account (for example, firstAccount could be IMAP, and second one could be SMTP)
42
- # @return [String]
43
- attr_accessor :second_account
37
+ attr_accessor :account
44
38
  # Specifies account folder to get thread from
45
39
  # @return [String]
46
40
  attr_accessor :folder
47
- # Storage name where account file(s) located
41
+ # Storage name where account file located
48
42
  # @return [String]
49
43
  attr_accessor :storage
50
- # Folder in storage where account file(s) located
44
+ # Folder in storage where account file located
51
45
  # @return [String]
52
- attr_accessor :storage_folder
46
+ attr_accessor :account_storage_folder
53
47
 
54
48
  # Get messages from thread by id. All messages are fully fetched. For accounts with CacheFile only cached messages will be returned.
55
49
  # @param [String] thread_id Thread identifier
56
- # @param [String] first_account Email account
57
- # @param [String] second_account Additional email account (for example, firstAccount could be IMAP, and second one could be SMTP)
50
+ # @param [String] account Email account
58
51
  # @param [String] folder Specifies account folder to get thread from
59
- # @param [String] storage Storage name where account file(s) located
60
- # @param [String] storage_folder Folder in storage where account file(s) located
61
- def initialize(thread_id, first_account, second_account = nil, folder = nil, storage = nil, storage_folder = nil)
52
+ # @param [String] storage Storage name where account file located
53
+ # @param [String] account_storage_folder Folder in storage where account file located
54
+ def initialize(thread_id:, account:, folder: nil, storage: nil, account_storage_folder: nil)
62
55
  self.thread_id = thread_id if thread_id
63
- self.first_account = first_account if first_account
64
- self.second_account = second_account if second_account
56
+ self.account = account if account
65
57
  self.folder = folder if folder
66
58
  self.storage = storage if storage
67
- self.storage_folder = storage_folder if storage_folder
59
+ self.account_storage_folder = account_storage_folder if account_storage_folder
68
60
  end
69
61
 
70
62
  def to_http_info(api_client)
71
63
  # verify the required parameter 'thread_id' is set
72
64
  if api_client.config.client_side_validation && self.thread_id.nil?
73
- raise ArgumentError, "Missing the required parameter 'thread_id' when calling EmailApi.fetch_email_thread_messages"
65
+ raise ArgumentError, "Missing the required parameter 'thread_id' when calling ClientThreadApi.get_messages"
74
66
  end
75
-
76
- # verify the required parameter 'first_account' is set
77
- if api_client.config.client_side_validation && self.first_account.nil?
78
- raise ArgumentError, "Missing the required parameter 'first_account' when calling EmailApi.fetch_email_thread_messages"
67
+ # verify the required parameter 'account' is set
68
+ if api_client.config.client_side_validation && self.account.nil?
69
+ raise ArgumentError, "Missing the required parameter 'account' when calling ClientThreadApi.get_messages"
79
70
  end
80
-
81
71
  # resource path
82
- local_var_path = '/email/client/threads/{threadId}/messages'.sub('{' + 'threadId' + '}', self.thread_id.to_s)
72
+ local_var_path = '/email/client/thread/messages'
83
73
 
84
74
  # query parameters
85
75
  query_params = {}
86
- query_params[:firstAccount] = self.first_account
87
- query_params[:secondAccount] = self.second_account unless self.second_account.nil?
76
+ query_params[:threadId] = self.thread_id
77
+ query_params[:account] = self.account
88
78
  query_params[:folder] = self.folder unless self.folder.nil?
89
79
  query_params[:storage] = self.storage unless self.storage.nil?
90
- query_params[:storageFolder] = self.storage_folder unless self.storage_folder.nil?
80
+ query_params[:accountStorageFolder] = self.account_storage_folder unless self.account_storage_folder.nil?
91
81
 
92
82
  # form parameters
93
83
  form_params = {}
94
84
 
95
85
  # http body (model)
96
- post_body = nil
97
86
  auth_names = ['JWT']
98
87
 
99
88
  # header parameters
100
89
  header_params = {}
101
90
  # HTTP header 'Accept' (if needed)
102
- header_params['Accept'] = select_header_accept(['application/json'])
91
+ header_params['Accept'] = EmailRequest.select_header_accept(['application/json'])
103
92
  # HTTP header 'Content-Type'
104
- header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['application/json'])
93
+ header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : EmailRequest.select_header_content_type(['application/json'])
105
94
 
106
- AsposeEmailCloud::HttpRequest.new(local_var_path,
107
- header_params,
108
- query_params,
109
- form_params,
110
- post_body,
111
- auth_names)
95
+ AsposeEmailCloud::HttpRequest.new(resource_path: local_var_path,
96
+ header_params: header_params,
97
+ query_params: query_params,
98
+ form_params: form_params,
99
+ auth_names: auth_names)
112
100
  end
113
101
  end
114
102
  end
103
+
@@ -1,5 +1,5 @@
1
1
  # ----------------------------------------------------------------------------
2
- # <copyright company="Aspose" file="MoveEmailThreadRq.rb">
2
+ # <copyright company="Aspose" file="ClientThreadMoveRequest.rb">
3
3
  # Copyright (c) 2018-2020 Aspose Pty Ltd. All rights reserved.
4
4
  # </copyright>
5
5
  # <summary>
@@ -23,34 +23,25 @@
23
23
  # </summary>
24
24
  # ----------------------------------------------------------------------------
25
25
 
26
-
27
26
  require 'date'
28
27
 
29
28
  module AsposeEmailCloud
30
- # Email thread move request
31
- class MoveEmailThreadRq
32
- # First account storage file name
33
- # @return [String]
34
- attr_accessor :first_account
35
-
36
- # Additional email account (for example, FirstAccount could be IMAP, and second one could be SMTP)
29
+ # Email client move thread request.
30
+ class ClientThreadMoveRequest < ClientThreadBaseRequest
31
+ # Email client account configuration location on storage.
32
+ # @return [StorageFileLocation]
33
+ attr_accessor :account_location
34
+ # Thread identifier.
37
35
  # @return [String]
38
- attr_accessor :second_account
39
-
40
- # Storage folder location of account files
41
- # @return [StorageFolderLocation]
42
- attr_accessor :storage_folder
43
-
44
- # Email account folder to move thread to
36
+ attr_accessor :thread_id
37
+ # Email account folder to move thread to.
45
38
  # @return [String]
46
39
  attr_accessor :destination_folder
47
-
48
40
  # Attribute mapping from ruby-style variable name to JSON key.
49
41
  def self.attribute_map
50
42
  {
51
- :'first_account' => :'firstAccount',
52
- :'second_account' => :'secondAccount',
53
- :'storage_folder' => :'storageFolder',
43
+ :'account_location' => :'accountLocation',
44
+ :'thread_id' => :'threadId',
54
45
  :'destination_folder' => :'destinationFolder'
55
46
  }
56
47
  end
@@ -58,47 +49,22 @@ module AsposeEmailCloud
58
49
  # Attribute type mapping.
59
50
  def self.swagger_types
60
51
  {
61
- :'first_account' => :'String',
62
- :'second_account' => :'String',
63
- :'storage_folder' => :'StorageFolderLocation',
52
+ :'account_location' => :'StorageFileLocation',
53
+ :'thread_id' => :'String',
64
54
  :'destination_folder' => :'String'
65
55
  }
66
56
  end
67
57
 
68
58
  # Initializes the object
69
- # @param [Hash] attributes Model attributes in the form of hash
70
- def initialize(attributes = {})
71
- return unless attributes.is_a?(Hash)
72
-
73
- # convert string to symbol for hash key
74
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
75
-
76
- if attributes.has_key?(:'firstAccount')
77
- self.first_account = attributes[:'firstAccount']
78
- end
79
-
80
- if attributes.has_key?(:'secondAccount')
81
- self.second_account = attributes[:'secondAccount']
82
- end
83
-
84
- if attributes.has_key?(:'storageFolder')
85
- self.storage_folder = attributes[:'storageFolder']
86
- end
87
-
88
- if attributes.has_key?(:'destinationFolder')
89
- self.destination_folder = attributes[:'destinationFolder']
90
- end
91
- end
92
-
93
- # Initializes the object
94
- # @param [String] first_account First account storage file name
95
- # @param [String] second_account Additional email account (for example, FirstAccount could be IMAP, and second one could be SMTP)
96
- # @param [StorageFolderLocation] storage_folder Storage folder location of account files
97
- # @param [String] destination_folder Email account folder to move thread to
98
- def initialize(first_account=nil, second_account=nil, storage_folder=nil, destination_folder=nil)
99
- self.first_account = first_account if first_account
100
- self.second_account = second_account if second_account
101
- self.storage_folder = storage_folder if storage_folder
59
+ # @param [StorageFileLocation] account_location Email client account configuration location on storage.
60
+ # @param [String] thread_id Thread identifier.
61
+ # @param [String] destination_folder Email account folder to move thread to.
62
+ def initialize(
63
+ account_location: nil,
64
+ thread_id: nil,
65
+ destination_folder: nil)
66
+ self.account_location = account_location if account_location
67
+ self.thread_id = thread_id if thread_id
102
68
  self.destination_folder = destination_folder if destination_folder
103
69
  end
104
70
 
@@ -106,12 +72,24 @@ module AsposeEmailCloud
106
72
  # @return Array for valid properties with the reasons
107
73
  def list_invalid_properties
108
74
  invalid_properties = Array.new
109
- if @first_account.nil?
110
- invalid_properties.push('invalid value for "first_account", first_account cannot be nil.')
75
+ if @account_location.nil?
76
+ invalid_properties.push('invalid value for "account_location", account_location cannot be nil.')
77
+ end
78
+
79
+ if @thread_id.nil?
80
+ invalid_properties.push('invalid value for "thread_id", thread_id cannot be nil.')
81
+ end
82
+
83
+ if @thread_id.to_s.length < 1
84
+ invalid_properties.push('invalid value for "thread_id", the character length must be great than or equal to 1.')
85
+ end
86
+
87
+ if @destination_folder.nil?
88
+ invalid_properties.push('invalid value for "destination_folder", destination_folder cannot be nil.')
111
89
  end
112
90
 
113
- if @first_account.to_s.length < 1
114
- invalid_properties.push('invalid value for "first_account", the character length must be great than or equal to 1.')
91
+ if @destination_folder.to_s.length < 1
92
+ invalid_properties.push('invalid value for "destination_folder", the character length must be great than or equal to 1.')
115
93
  end
116
94
 
117
95
  invalid_properties
@@ -120,23 +98,40 @@ module AsposeEmailCloud
120
98
  # Check to see if the all the properties in the model are valid
121
99
  # @return true if the model is valid
122
100
  def valid?
123
- return false if @first_account.nil?
124
- return false if @first_account.to_s.length < 1
101
+ return false if @account_location.nil?
102
+ return false if @thread_id.nil?
103
+ return false if @thread_id.to_s.length < 1
104
+ return false if @destination_folder.nil?
105
+ return false if @destination_folder.to_s.length < 1
125
106
  true
126
107
  end
127
108
 
128
109
  # Custom attribute writer method with validation
129
- # @param [Object] first_account Value to be assigned
130
- def first_account=(first_account)
131
- if first_account.nil?
132
- fail ArgumentError, 'first_account cannot be nil'
110
+ # @param [Object] thread_id Value to be assigned
111
+ def thread_id=(thread_id)
112
+ if thread_id.nil?
113
+ fail ArgumentError, 'thread_id cannot be nil'
114
+ end
115
+
116
+ if thread_id.to_s.length < 1
117
+ fail ArgumentError, 'invalid value for "thread_id", the character length must be great than or equal to 1.'
118
+ end
119
+
120
+ @thread_id = thread_id
121
+ end
122
+
123
+ # Custom attribute writer method with validation
124
+ # @param [Object] destination_folder Value to be assigned
125
+ def destination_folder=(destination_folder)
126
+ if destination_folder.nil?
127
+ fail ArgumentError, 'destination_folder cannot be nil'
133
128
  end
134
129
 
135
- if first_account.to_s.length < 1
136
- fail ArgumentError, 'invalid value for "first_account", the character length must be great than or equal to 1.'
130
+ if destination_folder.to_s.length < 1
131
+ fail ArgumentError, 'invalid value for "destination_folder", the character length must be great than or equal to 1.'
137
132
  end
138
133
 
139
- @first_account = first_account
134
+ @destination_folder = destination_folder
140
135
  end
141
136
 
142
137
  # Checks equality by comparing each attribute.
@@ -144,9 +139,8 @@ module AsposeEmailCloud
144
139
  def ==(o)
145
140
  return true if self.equal?(o)
146
141
  self.class == o.class &&
147
- first_account == o.first_account &&
148
- second_account == o.second_account &&
149
- storage_folder == o.storage_folder &&
142
+ account_location == o.account_location &&
143
+ thread_id == o.thread_id &&
150
144
  destination_folder == o.destination_folder
151
145
  end
152
146
 
@@ -159,7 +153,7 @@ module AsposeEmailCloud
159
153
  # Calculates hash code according to all attributes.
160
154
  # @return [Fixnum] Hash code
161
155
  def hash
162
- [first_account, second_account, storage_folder, destination_folder].hash
156
+ [account_location, thread_id, destination_folder].hash
163
157
  end
164
158
 
165
159
  # Builds the object from hash
@@ -1,263 +1,260 @@
1
- # ----------------------------------------------------------------------------
2
- # <copyright company="Aspose" file="IndexedPrimitiveObject.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
- # Simple indexed property
31
- class IndexedPrimitiveObject
32
- # Gets or sets the name of an object.
33
- # @return [String]
34
- attr_accessor :name
35
-
36
- # Property type. Used for deserialization purposes
37
- # @return [String]
38
- def type #getter method
39
- self.class.name.split('::').last
40
- end
41
-
42
- def type=(type) #setter method, parameter ignored
43
- @type = self.class.name.split('::').last
44
- end
45
-
46
- # Index of property in list
47
- # @return [Integer]
48
- attr_accessor :index
49
-
50
- # Gets or sets the name of a property.
51
- # @return [String]
52
- attr_accessor :value
53
-
54
- # Attribute mapping from ruby-style variable name to JSON key.
55
- def self.attribute_map
56
- {
57
- :'name' => :'name',
58
- :'type' => :'type',
59
- :'index' => :'index',
60
- :'value' => :'value'
61
- }
62
- end
63
-
64
- # Attribute type mapping.
65
- def self.swagger_types
66
- {
67
- :'name' => :'String',
68
- :'type' => :'String',
69
- :'index' => :'Integer',
70
- :'value' => :'String'
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?(:'name')
83
- self.name = attributes[:'name']
84
- end
85
-
86
- if attributes.has_key?(:'type')
87
- @type = self.class.name.split('::').last
88
- end
89
-
90
- if attributes.has_key?(:'index')
91
- self.index = attributes[:'index']
92
- end
93
-
94
- if attributes.has_key?(:'value')
95
- self.value = attributes[:'value']
96
- end
97
- end
98
-
99
- # Initializes the object
100
- # @param [String] name Gets or sets the name of an object.
101
- # @param [String] type Property type. Used for deserialization purposes
102
- # @param [Integer] index Index of property in list
103
- # @param [String] value Gets or sets the name of a property.
104
- def initialize(name=nil, type=nil, index=nil, value=nil)
105
- self.name = name if name
106
- @type = self.class.name.split('::').last
107
- self.index = index if index
108
- self.value = value if value
109
- end
110
-
111
- # Show invalid properties with the reasons. Usually used together with valid?
112
- # @return Array for valid properties with the reasons
113
- def list_invalid_properties
114
- invalid_properties = Array.new
115
- if @index.nil?
116
- invalid_properties.push('invalid value for "index", index cannot be nil.')
117
- end
118
-
119
- invalid_properties
120
- end
121
-
122
- # Check to see if the all the properties in the model are valid
123
- # @return true if the model is valid
124
- def valid?
125
- return false if @index.nil?
126
- true
127
- end
128
-
129
- # Checks equality by comparing each attribute.
130
- # @param [Object] Object to be compared
131
- def ==(o)
132
- return true if self.equal?(o)
133
- self.class == o.class &&
134
- name == o.name &&
135
- type == o.type &&
136
- index == o.index &&
137
- value == o.value
138
- end
139
-
140
- # @see the `==` method
141
- # @param [Object] Object to be compared
142
- def eql?(o)
143
- self == o
144
- end
145
-
146
- # Calculates hash code according to all attributes.
147
- # @return [Fixnum] Hash code
148
- def hash
149
- [name, type, index, value].hash
150
- end
151
-
152
- # Builds the object from hash
153
- # @param [Hash] attributes Model attributes in the form of hash
154
- # @return [Object] Returns the model itself
155
- def build_from_hash(attributes)
156
- return nil unless attributes.is_a?(Hash)
157
- self.class.swagger_types.each_pair do |key, type|
158
- attribute_key = self.class.attribute_map[key]
159
- attribute_key = (attribute_key[0, 1].downcase + attribute_key[1..-1]).to_sym
160
- if type =~ /\AArray<(.*)>/i
161
- # check to ensure the input is an array given that the the attribute
162
- # is documented as an array but the input is not
163
- if attributes[attribute_key].is_a?(Array)
164
- self.send("#{key}=", attributes[attribute_key].map { |v| _deserialize($1, v) })
165
- end
166
- elsif !attributes[attribute_key].nil?
167
- self.send("#{key}=", _deserialize(type, attributes[attribute_key]))
168
- end # or else data not found in attributes(hash), not an issue as the data can be optional
169
- end
170
-
171
- self
172
- end
173
-
174
- # Deserializes the data based on type
175
- # @param string type Data type
176
- # @param string value Value to be deserialized
177
- # @return [Object] Deserialized data
178
- def _deserialize(type, value)
179
- case type.to_sym
180
- when :DateTime
181
- DateTime.parse(value)
182
- when :Date
183
- Date.parse(value)
184
- when :String
185
- value.to_s
186
- when :Integer
187
- value.to_i
188
- when :Float
189
- value.to_f
190
- when :BOOLEAN
191
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
192
- true
193
- else
194
- false
195
- end
196
- when :Object
197
- # generic object (usually a Hash), return directly
198
- value
199
- when /\AArray<(?<inner_type>.+)>\z/
200
- inner_type = Regexp.last_match[:inner_type]
201
- value.map { |v| _deserialize(inner_type, v) }
202
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
203
- k_type = Regexp.last_match[:k_type]
204
- v_type = Regexp.last_match[:v_type]
205
- {}.tap do |hash|
206
- value.each do |k, v|
207
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
208
- end
209
- end
210
- else # model
211
- sub_type = value[:type] || value[:discriminator] || type
212
- if AsposeEmailCloud.const_defined?(sub_type)
213
- type = sub_type
214
- end
215
- temp_model = AsposeEmailCloud.const_get(type).new
216
- temp_model.build_from_hash(value)
217
- end
218
- end
219
-
220
- # Returns the string representation of the object
221
- # @return [String] String presentation of the object
222
- def to_s
223
- to_hash.to_s
224
- end
225
-
226
- # to_body is an alias to to_hash (backward compatibility)
227
- # @return [Hash] Returns the object in the form of hash
228
- def to_body
229
- to_hash
230
- end
231
-
232
- # Returns the object in the form of hash
233
- # @return [Hash] Returns the object in the form of hash
234
- def to_hash
235
- hash = {}
236
- self.class.attribute_map.each_pair do |attr, param|
237
- value = self.send(attr)
238
- next if value.nil?
239
- hash[param] = _to_hash(value)
240
- end
241
- hash
242
- end
243
-
244
- # Outputs non-array value in the form of hash
245
- # For object, use to_hash. Otherwise, just return the value
246
- # @param [Object] value Any valid value
247
- # @return [Hash] Returns the value in the form of hash
248
- def _to_hash(value)
249
- if value.is_a?(Array)
250
- value.compact.map { |v| _to_hash(v) }
251
- elsif value.is_a?(Hash)
252
- {}.tap do |hash|
253
- value.each { |k, v| hash[k] = _to_hash(v) }
254
- end
255
- elsif value.respond_to? :to_hash
256
- value.to_hash
257
- else
258
- value
259
- end
260
- end
261
-
262
- end
263
- end
1
+ # ----------------------------------------------------------------------------
2
+ # <copyright company="Aspose" file="ClientThreadSetIsReadRequest.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
+ # Mark thread messages as read or unread request.
30
+ class ClientThreadSetIsReadRequest < ClientThreadBaseRequest
31
+ # Email client account configuration location on storage.
32
+ # @return [StorageFileLocation]
33
+ attr_accessor :account_location
34
+ # Thread identifier.
35
+ # @return [String]
36
+ attr_accessor :thread_id
37
+ # Message is read flag.
38
+ # @return [BOOLEAN]
39
+ attr_accessor :is_read
40
+ # Folder on email server, where thread is stored.
41
+ # @return [String]
42
+ attr_accessor :folder
43
+ # Attribute mapping from ruby-style variable name to JSON key.
44
+ def self.attribute_map
45
+ {
46
+ :'account_location' => :'accountLocation',
47
+ :'thread_id' => :'threadId',
48
+ :'is_read' => :'isRead',
49
+ :'folder' => :'folder'
50
+ }
51
+ end
52
+
53
+ # Attribute type mapping.
54
+ def self.swagger_types
55
+ {
56
+ :'account_location' => :'StorageFileLocation',
57
+ :'thread_id' => :'String',
58
+ :'is_read' => :'BOOLEAN',
59
+ :'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] thread_id Thread identifier.
66
+ # @param [BOOLEAN] is_read Message is read flag.
67
+ # @param [String] folder Folder on email server, where thread is stored.
68
+ def initialize(
69
+ account_location: nil,
70
+ thread_id: nil,
71
+ is_read: nil,
72
+ folder: nil)
73
+ self.account_location = account_location if account_location
74
+ self.thread_id = thread_id if thread_id
75
+ self.is_read = is_read if is_read
76
+ self.folder = folder if 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 @thread_id.nil?
88
+ invalid_properties.push('invalid value for "thread_id", thread_id cannot be nil.')
89
+ end
90
+
91
+ if @thread_id.to_s.length < 1
92
+ invalid_properties.push('invalid value for "thread_id", the character length must be great than or equal to 1.')
93
+ end
94
+
95
+ if @is_read.nil?
96
+ invalid_properties.push('invalid value for "is_read", is_read cannot be nil.')
97
+ end
98
+
99
+ invalid_properties
100
+ end
101
+
102
+ # Check to see if the all the properties in the model are valid
103
+ # @return true if the model is valid
104
+ def valid?
105
+ return false if @account_location.nil?
106
+ return false if @thread_id.nil?
107
+ return false if @thread_id.to_s.length < 1
108
+ return false if @is_read.nil?
109
+ true
110
+ end
111
+
112
+ # Custom attribute writer method with validation
113
+ # @param [Object] thread_id Value to be assigned
114
+ def thread_id=(thread_id)
115
+ if thread_id.nil?
116
+ fail ArgumentError, 'thread_id cannot be nil'
117
+ end
118
+
119
+ if thread_id.to_s.length < 1
120
+ fail ArgumentError, 'invalid value for "thread_id", the character length must be great than or equal to 1.'
121
+ end
122
+
123
+ @thread_id = thread_id
124
+ end
125
+
126
+ # Checks equality by comparing each attribute.
127
+ # @param [Object] Object to be compared
128
+ def ==(o)
129
+ return true if self.equal?(o)
130
+ self.class == o.class &&
131
+ account_location == o.account_location &&
132
+ thread_id == o.thread_id &&
133
+ is_read == o.is_read &&
134
+ folder == o.folder
135
+ end
136
+
137
+ # @see the `==` method
138
+ # @param [Object] Object to be compared
139
+ def eql?(o)
140
+ self == o
141
+ end
142
+
143
+ # Calculates hash code according to all attributes.
144
+ # @return [Fixnum] Hash code
145
+ def hash
146
+ [account_location, thread_id, is_read, folder].hash
147
+ end
148
+
149
+ # Builds the object from hash
150
+ # @param [Hash] attributes Model attributes in the form of hash
151
+ # @return [Object] Returns the model itself
152
+ def build_from_hash(attributes)
153
+ return nil unless attributes.is_a?(Hash)
154
+ self.class.swagger_types.each_pair do |key, type|
155
+ attribute_key = self.class.attribute_map[key]
156
+ attribute_key = (attribute_key[0, 1].downcase + attribute_key[1..-1]).to_sym
157
+ if type =~ /\AArray<(.*)>/i
158
+ # check to ensure the input is an array given that the the attribute
159
+ # is documented as an array but the input is not
160
+ if attributes[attribute_key].is_a?(Array)
161
+ self.send("#{key}=", attributes[attribute_key].map { |v| _deserialize($1, v) })
162
+ end
163
+ elsif !attributes[attribute_key].nil?
164
+ self.send("#{key}=", _deserialize(type, attributes[attribute_key]))
165
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
166
+ end
167
+
168
+ self
169
+ end
170
+
171
+ # Deserializes the data based on type
172
+ # @param string type Data type
173
+ # @param string value Value to be deserialized
174
+ # @return [Object] Deserialized data
175
+ def _deserialize(type, value)
176
+ case type.to_sym
177
+ when :DateTime
178
+ DateTime.parse(value)
179
+ when :Date
180
+ Date.parse(value)
181
+ when :String
182
+ value.to_s
183
+ when :Integer
184
+ value.to_i
185
+ when :Float
186
+ value.to_f
187
+ when :BOOLEAN
188
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
189
+ true
190
+ else
191
+ false
192
+ end
193
+ when :Object
194
+ # generic object (usually a Hash), return directly
195
+ value
196
+ when /\AArray<(?<inner_type>.+)>\z/
197
+ inner_type = Regexp.last_match[:inner_type]
198
+ value.map { |v| _deserialize(inner_type, v) }
199
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
200
+ k_type = Regexp.last_match[:k_type]
201
+ v_type = Regexp.last_match[:v_type]
202
+ {}.tap do |hash|
203
+ value.each do |k, v|
204
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
205
+ end
206
+ end
207
+ else # model
208
+ sub_type = value[:type] || value[:discriminator] || type
209
+ if AsposeEmailCloud.const_defined?(sub_type)
210
+ type = sub_type
211
+ end
212
+ temp_model = AsposeEmailCloud.const_get(type).new
213
+ temp_model.build_from_hash(value)
214
+ end
215
+ end
216
+
217
+ # Returns the string representation of the object
218
+ # @return [String] String presentation of the object
219
+ def to_s
220
+ to_hash.to_s
221
+ end
222
+
223
+ # to_body is an alias to to_hash (backward compatibility)
224
+ # @return [Hash] Returns the object in the form of hash
225
+ def to_body
226
+ to_hash
227
+ end
228
+
229
+ # Returns the object in the form of hash
230
+ # @return [Hash] Returns the object in the form of hash
231
+ def to_hash
232
+ hash = {}
233
+ self.class.attribute_map.each_pair do |attr, param|
234
+ value = self.send(attr)
235
+ next if value.nil?
236
+ hash[param] = _to_hash(value)
237
+ end
238
+ hash
239
+ end
240
+
241
+ # Outputs non-array value in the form of hash
242
+ # For object, use to_hash. Otherwise, just return the value
243
+ # @param [Object] value Any valid value
244
+ # @return [Hash] Returns the value in the form of hash
245
+ def _to_hash(value)
246
+ if value.is_a?(Array)
247
+ value.compact.map { |v| _to_hash(v) }
248
+ elsif value.is_a?(Hash)
249
+ {}.tap do |hash|
250
+ value.each { |k, v| hash[k] = _to_hash(v) }
251
+ end
252
+ elsif value.respond_to? :to_hash
253
+ value.to_hash
254
+ else
255
+ value
256
+ end
257
+ end
258
+
259
+ end
260
+ end