aspose_email_cloud 19.11.0 → 20.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (268) hide show
  1. checksums.yaml +4 -4
  2. data/lib/aspose-email-cloud.rb +155 -2
  3. data/lib/aspose-email-cloud/api/email_api.rb +1039 -577
  4. data/lib/aspose-email-cloud/api_client.rb +385 -381
  5. data/lib/aspose-email-cloud/api_error.rb +41 -41
  6. data/lib/aspose-email-cloud/configuration.rb +240 -236
  7. data/lib/aspose-email-cloud/models/account_base_request.rb +154 -141
  8. data/lib/aspose-email-cloud/models/add_attachment_request.rb +150 -143
  9. data/lib/aspose-email-cloud/models/ai_bcr_base64_image.rb +231 -0
  10. data/lib/aspose-email-cloud/models/ai_bcr_base64_rq.rb +228 -0
  11. data/lib/aspose-email-cloud/models/ai_bcr_image.rb +218 -0
  12. data/lib/aspose-email-cloud/models/ai_bcr_image_storage_file.rb +231 -0
  13. data/lib/aspose-email-cloud/models/ai_bcr_ocr_data.rb +256 -0
  14. data/lib/aspose-email-cloud/models/ai_bcr_ocr_data_part.rb +300 -0
  15. data/lib/aspose-email-cloud/models/ai_bcr_options.rb +226 -0
  16. data/lib/aspose-email-cloud/models/ai_bcr_parse_ocr_data_rq.rb +233 -0
  17. data/lib/aspose-email-cloud/models/ai_bcr_parse_storage_rq.rb +251 -0
  18. data/lib/aspose-email-cloud/models/ai_bcr_rq.rb +213 -0
  19. data/lib/aspose-email-cloud/models/ai_bcr_storage_image_rq.rb +233 -0
  20. data/lib/aspose-email-cloud/models/ai_name_component.rb +267 -0
  21. data/lib/aspose-email-cloud/models/ai_name_cultural_context.rb +270 -0
  22. data/lib/aspose-email-cloud/models/ai_name_extracted.rb +233 -0
  23. data/lib/aspose-email-cloud/models/ai_name_extracted_component.rb +231 -0
  24. data/lib/aspose-email-cloud/models/ai_name_formatted.rb +226 -0
  25. data/lib/aspose-email-cloud/models/ai_name_gender_hypothesis.rb +236 -0
  26. data/lib/aspose-email-cloud/models/ai_name_match_result.rb +233 -0
  27. data/lib/aspose-email-cloud/models/ai_name_mismatch.rb +249 -0
  28. data/lib/aspose-email-cloud/models/ai_name_parsed_match_rq.rb +266 -0
  29. data/lib/aspose-email-cloud/models/ai_name_parsed_rq.rb +246 -0
  30. data/lib/aspose-email-cloud/models/ai_name_weighted.rb +231 -0
  31. data/lib/aspose-email-cloud/models/ai_name_weighted_variants.rb +228 -0
  32. data/lib/aspose-email-cloud/models/alternate_view.rb +282 -0
  33. data/lib/aspose-email-cloud/models/append_email_account_base_request.rb +162 -144
  34. data/lib/aspose-email-cloud/models/append_email_base_request.rb +167 -147
  35. data/lib/aspose-email-cloud/models/append_email_mime_base_request.rb +166 -146
  36. data/lib/aspose-email-cloud/models/append_email_model_rq.rb +336 -0
  37. data/lib/aspose-email-cloud/models/associated_person.rb +244 -0
  38. data/lib/aspose-email-cloud/models/attachment.rb +324 -0
  39. data/lib/aspose-email-cloud/models/attachment_base.rb +254 -0
  40. data/lib/aspose-email-cloud/models/base_object.rb +91 -84
  41. data/lib/aspose-email-cloud/models/calendar_dto.rb +557 -0
  42. data/lib/aspose-email-cloud/models/calendar_dto_alternate_rq.rb +268 -0
  43. data/lib/aspose-email-cloud/models/calendar_dto_list.rb +215 -0
  44. data/lib/aspose-email-cloud/models/calendar_reminder.rb +318 -0
  45. data/lib/aspose-email-cloud/models/contact_dto.rb +699 -0
  46. data/lib/aspose-email-cloud/models/contact_dto_list.rb +215 -0
  47. data/lib/aspose-email-cloud/models/contact_photo.rb +231 -0
  48. data/lib/aspose-email-cloud/models/content_type.rb +267 -0
  49. data/lib/aspose-email-cloud/models/content_type_parameter.rb +226 -0
  50. data/lib/aspose-email-cloud/models/create_email_request.rb +150 -143
  51. data/lib/aspose-email-cloud/models/create_folder_base_request.rb +162 -146
  52. data/lib/aspose-email-cloud/models/customer_event.rb +231 -0
  53. data/lib/aspose-email-cloud/models/delete_email_thread_account_rq.rb +276 -0
  54. data/lib/aspose-email-cloud/models/delete_folder_base_request.rb +162 -146
  55. data/lib/aspose-email-cloud/models/delete_message_base_request.rb +177 -148
  56. data/lib/aspose-email-cloud/models/disc_usage.rb +149 -143
  57. data/lib/aspose-email-cloud/models/discover_email_config_oauth.rb +391 -0
  58. data/lib/aspose-email-cloud/models/discover_email_config_password.rb +304 -0
  59. data/lib/aspose-email-cloud/models/discover_email_config_rq.rb +268 -0
  60. data/lib/aspose-email-cloud/models/email_account_config.rb +323 -0
  61. data/lib/aspose-email-cloud/models/email_account_config_list.rb +215 -0
  62. data/lib/aspose-email-cloud/models/email_account_request.rb +210 -155
  63. data/lib/aspose-email-cloud/models/email_address.rb +283 -0
  64. data/lib/aspose-email-cloud/models/email_client_account.rb +350 -0
  65. data/lib/aspose-email-cloud/models/email_client_account_credentials.rb +261 -0
  66. data/lib/aspose-email-cloud/models/email_client_account_oauth_credentials.rb +385 -0
  67. data/lib/aspose-email-cloud/models/email_client_account_password_credentials.rb +298 -0
  68. data/lib/aspose-email-cloud/models/email_client_multi_account.rb +233 -0
  69. data/lib/aspose-email-cloud/models/email_document.rb +150 -143
  70. data/lib/aspose-email-cloud/models/email_document_response.rb +146 -141
  71. data/lib/aspose-email-cloud/models/email_dto.rb +681 -0
  72. data/lib/aspose-email-cloud/models/email_dto_list.rb +215 -0
  73. data/lib/aspose-email-cloud/models/email_properties.rb +150 -142
  74. data/lib/aspose-email-cloud/models/email_property.rb +154 -142
  75. data/lib/aspose-email-cloud/models/email_property_response.rb +146 -141
  76. data/lib/aspose-email-cloud/models/email_thread.rb +254 -0
  77. data/lib/aspose-email-cloud/models/email_thread_list.rb +215 -0
  78. data/lib/aspose-email-cloud/models/email_thread_read_flag_rq.rb +294 -0
  79. data/lib/aspose-email-cloud/models/enum_with_custom_of_associated_person_category.rb +230 -0
  80. data/lib/aspose-email-cloud/models/enum_with_custom_of_email_address_category.rb +230 -0
  81. data/lib/aspose-email-cloud/models/enum_with_custom_of_event_category.rb +230 -0
  82. data/lib/aspose-email-cloud/models/enum_with_custom_of_instant_messenger_category.rb +230 -0
  83. data/lib/aspose-email-cloud/models/enum_with_custom_of_phone_number_category.rb +230 -0
  84. data/lib/aspose-email-cloud/models/enum_with_custom_of_postal_address_category.rb +230 -0
  85. data/lib/aspose-email-cloud/models/enum_with_custom_of_url_category.rb +230 -0
  86. data/lib/aspose-email-cloud/models/error.rb +157 -147
  87. data/lib/aspose-email-cloud/models/error_details.rb +149 -143
  88. data/lib/aspose-email-cloud/models/file_version.rb +169 -153
  89. data/lib/aspose-email-cloud/models/file_versions.rb +145 -141
  90. data/lib/aspose-email-cloud/models/files_list.rb +145 -141
  91. data/lib/aspose-email-cloud/models/files_upload_result.rb +149 -143
  92. data/lib/aspose-email-cloud/models/hierarchical_object.rb +106 -97
  93. data/lib/aspose-email-cloud/models/hierarchical_object_request.rb +150 -143
  94. data/lib/aspose-email-cloud/models/hierarchical_object_response.rb +150 -143
  95. data/lib/aspose-email-cloud/models/indexed_hierarchical_object.rb +124 -113
  96. data/lib/aspose-email-cloud/models/indexed_primitive_object.rb +122 -111
  97. data/lib/aspose-email-cloud/models/instant_messenger_address.rb +244 -0
  98. data/lib/aspose-email-cloud/models/link.rb +158 -147
  99. data/lib/aspose-email-cloud/models/linked_resource.rb +267 -0
  100. data/lib/aspose-email-cloud/models/list_response_of_ai_bcr_ocr_data.rb +214 -0
  101. data/lib/aspose-email-cloud/models/list_response_of_ai_name_component.rb +214 -0
  102. data/lib/aspose-email-cloud/models/list_response_of_ai_name_extracted.rb +214 -0
  103. data/lib/aspose-email-cloud/models/list_response_of_ai_name_gender_hypothesis.rb +214 -0
  104. data/lib/aspose-email-cloud/models/list_response_of_contact_dto.rb +214 -0
  105. data/lib/aspose-email-cloud/models/list_response_of_email_account_config.rb +214 -0
  106. data/lib/aspose-email-cloud/models/list_response_of_email_dto.rb +214 -0
  107. data/lib/aspose-email-cloud/models/list_response_of_email_thread.rb +214 -0
  108. data/lib/aspose-email-cloud/models/list_response_of_hierarchical_object.rb +214 -0
  109. data/lib/aspose-email-cloud/models/list_response_of_hierarchical_object_response.rb +145 -139
  110. data/lib/aspose-email-cloud/models/list_response_of_mail_server_folder.rb +145 -139
  111. data/lib/aspose-email-cloud/models/list_response_of_storage_file_location.rb +214 -0
  112. data/lib/aspose-email-cloud/models/list_response_of_storage_model_of_calendar_dto.rb +214 -0
  113. data/lib/aspose-email-cloud/models/list_response_of_storage_model_of_contact_dto.rb +214 -0
  114. data/lib/aspose-email-cloud/models/list_response_of_storage_model_of_email_dto.rb +214 -0
  115. data/lib/aspose-email-cloud/models/list_response_of_string.rb +145 -139
  116. data/lib/aspose-email-cloud/models/mail_address.rb +257 -0
  117. data/lib/aspose-email-cloud/models/mail_server_folder.rb +150 -143
  118. data/lib/aspose-email-cloud/models/mime_response.rb +146 -141
  119. data/lib/aspose-email-cloud/models/move_email_message_rq.rb +302 -0
  120. data/lib/aspose-email-cloud/models/move_email_thread_rq.rb +276 -0
  121. data/lib/aspose-email-cloud/models/name_value_pair.rb +226 -0
  122. data/lib/aspose-email-cloud/models/object_exist.rb +149 -143
  123. data/lib/aspose-email-cloud/models/phone_number.rb +244 -0
  124. data/lib/aspose-email-cloud/models/postal_address.rb +353 -0
  125. data/lib/aspose-email-cloud/models/primitive_object.rb +104 -95
  126. data/lib/aspose-email-cloud/models/reminder_attendee.rb +213 -0
  127. data/lib/aspose-email-cloud/models/reminder_trigger.rb +249 -0
  128. data/lib/aspose-email-cloud/models/requests/add_calendar_attachment_request_data.rb +99 -89
  129. data/lib/aspose-email-cloud/models/requests/add_contact_attachment_request_data.rb +109 -101
  130. data/lib/aspose-email-cloud/models/requests/add_email_attachment_request_data.rb +99 -89
  131. data/lib/aspose-email-cloud/models/requests/add_mapi_attachment_request_data.rb +99 -89
  132. data/lib/aspose-email-cloud/models/requests/ai_bcr_ocr_request_data.rb +79 -0
  133. data/lib/aspose-email-cloud/models/requests/ai_bcr_ocr_storage_request_data.rb +79 -0
  134. data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_model_request_data.rb +79 -0
  135. data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_ocr_data_model_request_data.rb +79 -0
  136. data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_request_data.rb +79 -0
  137. data/lib/aspose-email-cloud/models/requests/ai_bcr_parse_storage_request_data.rb +79 -0
  138. data/lib/aspose-email-cloud/models/requests/ai_name_complete_request_data.rb +110 -0
  139. data/lib/aspose-email-cloud/models/requests/ai_name_expand_parsed_request_data.rb +79 -0
  140. data/lib/aspose-email-cloud/models/requests/ai_name_expand_request_data.rb +110 -0
  141. data/lib/aspose-email-cloud/models/requests/ai_name_format_parsed_request_data.rb +79 -0
  142. data/lib/aspose-email-cloud/models/requests/ai_name_format_request_data.rb +116 -0
  143. data/lib/aspose-email-cloud/models/requests/ai_name_genderize_parsed_request_data.rb +79 -0
  144. data/lib/aspose-email-cloud/models/requests/ai_name_genderize_request_data.rb +110 -0
  145. data/lib/aspose-email-cloud/models/requests/ai_name_match_parsed_request_data.rb +79 -0
  146. data/lib/aspose-email-cloud/models/requests/ai_name_match_request_data.rb +121 -0
  147. data/lib/aspose-email-cloud/models/requests/ai_name_parse_email_address_request_data.rb +110 -0
  148. data/lib/aspose-email-cloud/models/requests/ai_name_parse_request_data.rb +110 -0
  149. data/lib/aspose-email-cloud/models/requests/append_email_message_request_data.rb +79 -75
  150. data/lib/aspose-email-cloud/models/requests/append_email_model_message_request_data.rb +79 -0
  151. data/lib/aspose-email-cloud/models/requests/append_mime_message_request_data.rb +79 -75
  152. data/lib/aspose-email-cloud/models/requests/convert_calendar_model_to_alternate_request_data.rb +79 -0
  153. data/lib/aspose-email-cloud/models/requests/convert_calendar_model_to_file_request_data.rb +89 -0
  154. data/lib/aspose-email-cloud/models/requests/convert_calendar_request_data.rb +90 -0
  155. data/lib/aspose-email-cloud/models/requests/convert_contact_model_to_file_request_data.rb +89 -0
  156. data/lib/aspose-email-cloud/models/requests/convert_contact_request_data.rb +100 -0
  157. data/lib/aspose-email-cloud/models/requests/convert_email_model_to_file_request_data.rb +89 -0
  158. data/lib/aspose-email-cloud/models/requests/convert_email_request_data.rb +90 -0
  159. data/lib/aspose-email-cloud/models/requests/copy_file_request_data.rb +107 -92
  160. data/lib/aspose-email-cloud/models/requests/copy_folder_request_data.rb +101 -89
  161. data/lib/aspose-email-cloud/models/requests/create_calendar_request_data.rb +89 -82
  162. data/lib/aspose-email-cloud/models/requests/create_contact_request_data.rb +99 -94
  163. data/lib/aspose-email-cloud/models/requests/create_email_folder_request_data.rb +79 -75
  164. data/lib/aspose-email-cloud/models/requests/create_email_request_data.rb +89 -82
  165. data/lib/aspose-email-cloud/models/requests/create_folder_request_data.rb +84 -78
  166. data/lib/aspose-email-cloud/models/requests/create_mapi_request_data.rb +89 -82
  167. data/lib/aspose-email-cloud/models/requests/delete_calendar_property_request_data.rb +109 -96
  168. data/lib/aspose-email-cloud/models/requests/delete_contact_property_request_data.rb +119 -108
  169. data/lib/aspose-email-cloud/models/requests/delete_email_folder_request_data.rb +79 -75
  170. data/lib/aspose-email-cloud/models/requests/delete_email_message_request_data.rb +79 -75
  171. data/lib/aspose-email-cloud/models/requests/delete_email_thread_request_data.rb +89 -0
  172. data/lib/aspose-email-cloud/models/requests/delete_file_request_data.rb +90 -81
  173. data/lib/aspose-email-cloud/models/requests/delete_folder_request_data.rb +90 -81
  174. data/lib/aspose-email-cloud/models/requests/delete_mapi_attachment_request_data.rb +99 -89
  175. data/lib/aspose-email-cloud/models/requests/delete_mapi_properties_request_data.rb +89 -82
  176. data/lib/aspose-email-cloud/models/requests/discover_email_config_oauth_request_data.rb +79 -0
  177. data/lib/aspose-email-cloud/models/requests/discover_email_config_password_request_data.rb +79 -0
  178. data/lib/aspose-email-cloud/models/requests/discover_email_config_request_data.rb +86 -0
  179. data/lib/aspose-email-cloud/models/requests/download_file_request_data.rb +90 -81
  180. data/lib/aspose-email-cloud/models/requests/email_request.rb +75 -75
  181. data/lib/aspose-email-cloud/models/requests/fetch_email_message_request_data.rb +115 -93
  182. data/lib/aspose-email-cloud/models/requests/fetch_email_model_request_data.rb +115 -0
  183. data/lib/aspose-email-cloud/models/requests/fetch_email_thread_messages_request_data.rb +114 -0
  184. data/lib/aspose-email-cloud/models/requests/get_calendar_as_file_request_data.rb +101 -0
  185. data/lib/aspose-email-cloud/models/requests/get_calendar_attachment_request_data.rb +101 -88
  186. data/lib/aspose-email-cloud/models/requests/get_calendar_file_as_model_request_data.rb +80 -0
  187. data/lib/aspose-email-cloud/models/requests/get_calendar_list_request_data.rb +108 -95
  188. data/lib/aspose-email-cloud/models/requests/get_calendar_model_as_alternate_request_data.rb +107 -0
  189. data/lib/aspose-email-cloud/models/requests/get_calendar_model_list_request_data.rb +98 -0
  190. data/lib/aspose-email-cloud/models/requests/get_calendar_model_request_data.rb +91 -0
  191. data/lib/aspose-email-cloud/models/requests/get_calendar_request_data.rb +91 -81
  192. data/lib/aspose-email-cloud/models/requests/get_contact_as_file_request_data.rb +111 -0
  193. data/lib/aspose-email-cloud/models/requests/get_contact_attachment_request_data.rb +111 -100
  194. data/lib/aspose-email-cloud/models/requests/get_contact_file_as_model_request_data.rb +90 -0
  195. data/lib/aspose-email-cloud/models/requests/get_contact_list_request_data.rb +103 -92
  196. data/lib/aspose-email-cloud/models/requests/get_contact_model_list_request_data.rb +103 -0
  197. data/lib/aspose-email-cloud/models/requests/get_contact_model_request_data.rb +101 -0
  198. data/lib/aspose-email-cloud/models/requests/get_contact_properties_request_data.rb +101 -93
  199. data/lib/aspose-email-cloud/models/requests/get_disc_usage_request_data.rb +74 -71
  200. data/lib/aspose-email-cloud/models/requests/get_email_as_file_request_data.rb +101 -0
  201. data/lib/aspose-email-cloud/models/requests/get_email_attachment_request_data.rb +101 -88
  202. data/lib/aspose-email-cloud/models/requests/get_email_client_account_request_data.rb +102 -0
  203. data/lib/aspose-email-cloud/models/requests/get_email_client_multi_account_request_data.rb +102 -0
  204. data/lib/aspose-email-cloud/models/requests/get_email_file_as_model_request_data.rb +80 -0
  205. data/lib/aspose-email-cloud/models/requests/get_email_model_list_request_data.rb +103 -0
  206. data/lib/aspose-email-cloud/models/requests/get_email_model_request_data.rb +101 -0
  207. data/lib/aspose-email-cloud/models/requests/get_email_property_request_data.rb +101 -88
  208. data/lib/aspose-email-cloud/models/requests/get_email_request_data.rb +91 -81
  209. data/lib/aspose-email-cloud/models/requests/get_file_versions_request_data.rb +84 -78
  210. data/lib/aspose-email-cloud/models/requests/get_files_list_request_data.rb +84 -78
  211. data/lib/aspose-email-cloud/models/requests/get_mapi_attachment_request_data.rb +101 -88
  212. data/lib/aspose-email-cloud/models/requests/get_mapi_attachments_request_data.rb +91 -81
  213. data/lib/aspose-email-cloud/models/requests/get_mapi_list_request_data.rb +93 -80
  214. data/lib/aspose-email-cloud/models/requests/get_mapi_properties_request_data.rb +91 -81
  215. data/lib/aspose-email-cloud/models/requests/http_request.rb +51 -51
  216. data/lib/aspose-email-cloud/models/requests/is_email_address_disposable_request_data.rb +79 -0
  217. data/lib/aspose-email-cloud/models/requests/list_email_folders_request_data.rb +104 -88
  218. data/lib/aspose-email-cloud/models/requests/list_email_messages_request_data.rb +127 -105
  219. data/lib/aspose-email-cloud/models/requests/list_email_models_request_data.rb +122 -0
  220. data/lib/aspose-email-cloud/models/requests/list_email_threads_request_data.rb +121 -0
  221. data/lib/aspose-email-cloud/models/requests/move_email_message_request_data.rb +79 -0
  222. data/lib/aspose-email-cloud/models/requests/move_email_thread_request_data.rb +89 -0
  223. data/lib/aspose-email-cloud/models/requests/move_file_request_data.rb +107 -92
  224. data/lib/aspose-email-cloud/models/requests/move_folder_request_data.rb +101 -89
  225. data/lib/aspose-email-cloud/models/requests/object_exists_request_data.rb +90 -81
  226. data/lib/aspose-email-cloud/models/requests/save_calendar_model_request_data.rb +89 -0
  227. data/lib/aspose-email-cloud/models/requests/save_contact_model_request_data.rb +99 -0
  228. data/lib/aspose-email-cloud/models/requests/save_email_client_account_request_data.rb +79 -0
  229. data/lib/aspose-email-cloud/models/requests/save_email_client_multi_account_request_data.rb +79 -0
  230. data/lib/aspose-email-cloud/models/requests/save_email_model_request_data.rb +99 -0
  231. data/lib/aspose-email-cloud/models/requests/save_mail_account_request_data.rb +79 -75
  232. data/lib/aspose-email-cloud/models/requests/save_mail_o_auth_account_request_data.rb +79 -75
  233. data/lib/aspose-email-cloud/models/requests/send_email_mime_request_data.rb +79 -75
  234. data/lib/aspose-email-cloud/models/requests/send_email_model_request_data.rb +79 -0
  235. data/lib/aspose-email-cloud/models/requests/send_email_request_data.rb +79 -75
  236. data/lib/aspose-email-cloud/models/requests/set_email_property_request_data.rb +99 -89
  237. data/lib/aspose-email-cloud/models/requests/set_email_read_flag_request_data.rb +79 -75
  238. data/lib/aspose-email-cloud/models/requests/set_email_thread_read_flag_request_data.rb +89 -0
  239. data/lib/aspose-email-cloud/models/requests/storage_exists_request_data.rb +78 -75
  240. data/lib/aspose-email-cloud/models/requests/update_calendar_properties_request_data.rb +89 -82
  241. data/lib/aspose-email-cloud/models/requests/update_contact_properties_request_data.rb +99 -94
  242. data/lib/aspose-email-cloud/models/requests/update_mapi_properties_request_data.rb +89 -82
  243. data/lib/aspose-email-cloud/models/requests/upload_file_request_data.rb +96 -87
  244. data/lib/aspose-email-cloud/models/save_email_account_request.rb +214 -157
  245. data/lib/aspose-email-cloud/models/save_o_auth_email_account_request.rb +240 -166
  246. data/lib/aspose-email-cloud/models/send_email_base_request.rb +159 -145
  247. data/lib/aspose-email-cloud/models/send_email_mime_base_request.rb +158 -144
  248. data/lib/aspose-email-cloud/models/send_email_model_rq.rb +276 -0
  249. data/lib/aspose-email-cloud/models/set_email_property_request.rb +150 -143
  250. data/lib/aspose-email-cloud/models/set_message_read_flag_account_base_request.rb +162 -146
  251. data/lib/aspose-email-cloud/models/storage_exist.rb +145 -141
  252. data/lib/aspose-email-cloud/models/storage_file.rb +161 -149
  253. data/lib/aspose-email-cloud/models/storage_file_location.rb +154 -145
  254. data/lib/aspose-email-cloud/models/storage_file_rq_of_email_client_account.rb +225 -0
  255. data/lib/aspose-email-cloud/models/storage_file_rq_of_email_client_multi_account.rb +225 -0
  256. data/lib/aspose-email-cloud/models/storage_folder_location.rb +150 -143
  257. data/lib/aspose-email-cloud/models/storage_model_of_calendar_dto.rb +225 -0
  258. data/lib/aspose-email-cloud/models/storage_model_of_contact_dto.rb +225 -0
  259. data/lib/aspose-email-cloud/models/storage_model_of_email_dto.rb +225 -0
  260. data/lib/aspose-email-cloud/models/storage_model_rq_of_calendar_dto.rb +225 -0
  261. data/lib/aspose-email-cloud/models/storage_model_rq_of_contact_dto.rb +225 -0
  262. data/lib/aspose-email-cloud/models/storage_model_rq_of_email_dto.rb +225 -0
  263. data/lib/aspose-email-cloud/models/url.rb +244 -0
  264. data/lib/aspose-email-cloud/models/value_response.rb +146 -141
  265. data/lib/aspose-email-cloud/models/value_t_of_boolean.rb +217 -0
  266. data/lib/aspose-email-cloud/version.rb +15 -15
  267. metadata +206 -53
  268. data/lib/aspose-email-cloud/models/contact_format.rb +0 -45
@@ -0,0 +1,318 @@
1
+ # ----------------------------------------------------------------------------
2
+ # <copyright company="Aspose" file="CalendarReminder.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
+ # Provides a grouping of component properties that define an alarm.
31
+ class CalendarReminder
32
+ # Defines the action to be invoked when an alarm is triggered. Enum, available values: Audio, Display, Email, Procedure, None
33
+ # @return [String]
34
+ attr_accessor :action
35
+
36
+ # Collection of Reminder Attachments. Could be an absolute URI or Base64 string representation of attachment content
37
+ # @return [Array<String>]
38
+ attr_accessor :attachments
39
+
40
+ # Contains collection of ReminderAttendee objects.
41
+ # @return [Array<ReminderAttendee>]
42
+ attr_accessor :attendees
43
+
44
+ # Provides a more complete description of the alarm.
45
+ # @return [String]
46
+ attr_accessor :description
47
+
48
+ # Specifies the delay period in ticks, after which the alarm will repeat.
49
+ # @return [Integer]
50
+ attr_accessor :duration
51
+
52
+ # Defines the number of time the alarm should be repeated, after the initial trigger.
53
+ # @return [Integer]
54
+ attr_accessor :repeat
55
+
56
+ # Defines a short summary or subject for the alarm.
57
+ # @return [String]
58
+ attr_accessor :summary
59
+
60
+ # Specifies when an alarm will trigger.
61
+ # @return [ReminderTrigger]
62
+ attr_accessor :trigger
63
+
64
+ # Attribute mapping from ruby-style variable name to JSON key.
65
+ def self.attribute_map
66
+ {
67
+ :'action' => :'action',
68
+ :'attachments' => :'attachments',
69
+ :'attendees' => :'attendees',
70
+ :'description' => :'description',
71
+ :'duration' => :'duration',
72
+ :'repeat' => :'repeat',
73
+ :'summary' => :'summary',
74
+ :'trigger' => :'trigger'
75
+ }
76
+ end
77
+
78
+ # Attribute type mapping.
79
+ def self.swagger_types
80
+ {
81
+ :'action' => :'String',
82
+ :'attachments' => :'Array<String>',
83
+ :'attendees' => :'Array<ReminderAttendee>',
84
+ :'description' => :'String',
85
+ :'duration' => :'Integer',
86
+ :'repeat' => :'Integer',
87
+ :'summary' => :'String',
88
+ :'trigger' => :'ReminderTrigger'
89
+ }
90
+ end
91
+
92
+ # Initializes the object
93
+ # @param [Hash] attributes Model attributes in the form of hash
94
+ def initialize(attributes = {})
95
+ return unless attributes.is_a?(Hash)
96
+
97
+ # convert string to symbol for hash key
98
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
99
+
100
+ if attributes.has_key?(:'action')
101
+ self.action = attributes[:'action']
102
+ end
103
+
104
+ if attributes.has_key?(:'attachments')
105
+ if (value = attributes[:'attachments']).is_a?(Array)
106
+ self.attachments = value
107
+ end
108
+ end
109
+
110
+ if attributes.has_key?(:'attendees')
111
+ if (value = attributes[:'attendees']).is_a?(Array)
112
+ self.attendees = value
113
+ end
114
+ end
115
+
116
+ if attributes.has_key?(:'description')
117
+ self.description = attributes[:'description']
118
+ end
119
+
120
+ if attributes.has_key?(:'duration')
121
+ self.duration = attributes[:'duration']
122
+ end
123
+
124
+ if attributes.has_key?(:'repeat')
125
+ self.repeat = attributes[:'repeat']
126
+ end
127
+
128
+ if attributes.has_key?(:'summary')
129
+ self.summary = attributes[:'summary']
130
+ end
131
+
132
+ if attributes.has_key?(:'trigger')
133
+ self.trigger = attributes[:'trigger']
134
+ end
135
+ end
136
+
137
+ # Initializes the object
138
+ # @param [String] action Defines the action to be invoked when an alarm is triggered. Enum, available values: Audio, Display, Email, Procedure, None
139
+ # @param [Array<String>] attachments Collection of Reminder Attachments. Could be an absolute URI or Base64 string representation of attachment content
140
+ # @param [Array<ReminderAttendee>] attendees Contains collection of ReminderAttendee objects.
141
+ # @param [String] description Provides a more complete description of the alarm.
142
+ # @param [Integer] duration Specifies the delay period in ticks, after which the alarm will repeat.
143
+ # @param [Integer] repeat Defines the number of time the alarm should be repeated, after the initial trigger.
144
+ # @param [String] summary Defines a short summary or subject for the alarm.
145
+ # @param [ReminderTrigger] trigger Specifies when an alarm will trigger.
146
+ def initialize(action=nil, attachments=nil, attendees=nil, description=nil, duration=nil, repeat=nil, summary=nil, trigger=nil)
147
+ self.action = action if action
148
+ self.attachments = attachments if attachments
149
+ self.attendees = attendees if attendees
150
+ self.description = description if description
151
+ self.duration = duration if duration
152
+ self.repeat = repeat if repeat
153
+ self.summary = summary if summary
154
+ self.trigger = trigger if trigger
155
+ end
156
+
157
+ # Show invalid properties with the reasons. Usually used together with valid?
158
+ # @return Array for valid properties with the reasons
159
+ def list_invalid_properties
160
+ invalid_properties = Array.new
161
+ if @action.nil?
162
+ invalid_properties.push('invalid value for "action", action cannot be nil.')
163
+ end
164
+
165
+ if @repeat.nil?
166
+ invalid_properties.push('invalid value for "repeat", repeat cannot be nil.')
167
+ end
168
+
169
+ invalid_properties
170
+ end
171
+
172
+ # Check to see if the all the properties in the model are valid
173
+ # @return true if the model is valid
174
+ def valid?
175
+ return false if @action.nil?
176
+ return false if @repeat.nil?
177
+ true
178
+ end
179
+
180
+ # Checks equality by comparing each attribute.
181
+ # @param [Object] Object to be compared
182
+ def ==(o)
183
+ return true if self.equal?(o)
184
+ self.class == o.class &&
185
+ action == o.action &&
186
+ attachments == o.attachments &&
187
+ attendees == o.attendees &&
188
+ description == o.description &&
189
+ duration == o.duration &&
190
+ repeat == o.repeat &&
191
+ summary == o.summary &&
192
+ trigger == o.trigger
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
+ [action, attachments, attendees, description, duration, repeat, summary, trigger].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
+ sub_type = value[:type] || value[:discriminator] || type
267
+ if AsposeEmailCloud.const_defined?(sub_type)
268
+ type = sub_type
269
+ end
270
+ temp_model = AsposeEmailCloud.const_get(type).new
271
+ temp_model.build_from_hash(value)
272
+ end
273
+ end
274
+
275
+ # Returns the string representation of the object
276
+ # @return [String] String presentation of the object
277
+ def to_s
278
+ to_hash.to_s
279
+ end
280
+
281
+ # to_body is an alias to to_hash (backward compatibility)
282
+ # @return [Hash] Returns the object in the form of hash
283
+ def to_body
284
+ to_hash
285
+ end
286
+
287
+ # Returns the object in the form of hash
288
+ # @return [Hash] Returns the object in the form of hash
289
+ def to_hash
290
+ hash = {}
291
+ self.class.attribute_map.each_pair do |attr, param|
292
+ value = self.send(attr)
293
+ next if value.nil?
294
+ hash[param] = _to_hash(value)
295
+ end
296
+ hash
297
+ end
298
+
299
+ # Outputs non-array value in the form of hash
300
+ # For object, use to_hash. Otherwise, just return the value
301
+ # @param [Object] value Any valid value
302
+ # @return [Hash] Returns the value in the form of hash
303
+ def _to_hash(value)
304
+ if value.is_a?(Array)
305
+ value.compact.map { |v| _to_hash(v) }
306
+ elsif value.is_a?(Hash)
307
+ {}.tap do |hash|
308
+ value.each { |k, v| hash[k] = _to_hash(v) }
309
+ end
310
+ elsif value.respond_to? :to_hash
311
+ value.to_hash
312
+ else
313
+ value
314
+ end
315
+ end
316
+
317
+ end
318
+ end
@@ -0,0 +1,699 @@
1
+ # ----------------------------------------------------------------------------
2
+ # <copyright company="Aspose" file="ContactDto.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
+ # VCard document representation.
31
+ class ContactDto
32
+ # Associated persons.
33
+ # @return [Array<AssociatedPerson>]
34
+ attr_accessor :associated_persons
35
+
36
+ # Document attachments.
37
+ # @return [Array<Attachment>]
38
+ attr_accessor :attachments
39
+
40
+ # Company name.
41
+ # @return [String]
42
+ attr_accessor :company_name
43
+
44
+ # Computer network.
45
+ # @return [String]
46
+ attr_accessor :computer_network_name
47
+
48
+ # Customer id.
49
+ # @return [String]
50
+ attr_accessor :customer_id
51
+
52
+ # Department name.
53
+ # @return [String]
54
+ attr_accessor :department_name
55
+
56
+ # Display name.
57
+ # @return [String]
58
+ attr_accessor :display_name
59
+
60
+ # Person's email addresses.
61
+ # @return [Array<EmailAddress>]
62
+ attr_accessor :email_addresses
63
+
64
+ # Person's events.
65
+ # @return [Array<CustomerEvent>]
66
+ attr_accessor :events
67
+
68
+ # A name used for sorting.
69
+ # @return [String]
70
+ attr_accessor :file_as
71
+
72
+ # Specifies how to generate and recompute the value of the dispidFileAs property when other contact name properties change. Coincides MS-OXPROPS revision 16.2 from 7/31/2014. Enum, available values: Empty, DisplayName, FirstName, LastName, Organization, LastFirstMiddle, OrgLastFirstMiddle, LastFirstMiddleOrg, LastFirstMiddle2, LastFirstMiddle3, OrgLastFirstMiddle2, OrgLastFirstMiddle3, LastFirstMiddleOrg2, LastFirstMiddleOrg3, LastFirstMiddleGen, FirstMiddleLastGen, LastFirstMiddleGen2, BestMatch, AccordingToLocale, None
73
+ # @return [String]
74
+ attr_accessor :file_as_mapping
75
+
76
+ # URL path from which a client can retrieve free/busy information for the contact as an iCal file.
77
+ # @return [String]
78
+ attr_accessor :free_busy_location
79
+
80
+ # Enum defines gender of a person. Enum, available values: Unspecified, Female, Male
81
+ # @return [String]
82
+ attr_accessor :gender
83
+
84
+ # Person's given name.
85
+ # @return [String]
86
+ attr_accessor :given_name
87
+
88
+ # Government id number.
89
+ # @return [String]
90
+ attr_accessor :government_id_number
91
+
92
+ # Person's hobbies.
93
+ # @return [String]
94
+ attr_accessor :hobbies
95
+
96
+ # Person's initials.
97
+ # @return [String]
98
+ attr_accessor :initials
99
+
100
+ # Person's instant messenger addresses.
101
+ # @return [Array<InstantMessengerAddress>]
102
+ attr_accessor :instant_messengers
103
+
104
+ # Person's job title.
105
+ # @return [String]
106
+ attr_accessor :job_title
107
+
108
+ # Language.
109
+ # @return [String]
110
+ attr_accessor :language
111
+
112
+ # Person's location.
113
+ # @return [String]
114
+ attr_accessor :location
115
+
116
+ # Person's middle name.
117
+ # @return [String]
118
+ attr_accessor :middle_name
119
+
120
+ # Person's nickname.
121
+ # @return [String]
122
+ attr_accessor :nickname
123
+
124
+ # Notes.
125
+ # @return [String]
126
+ attr_accessor :notes
127
+
128
+ # Defines format of a text. Enum, available values: Text, Html
129
+ # @return [String]
130
+ attr_accessor :notes_format
131
+
132
+ # Office location.
133
+ # @return [String]
134
+ attr_accessor :office_location
135
+
136
+ # Contains an identifier for the mail user used within the mail user's organization.
137
+ # @return [String]
138
+ attr_accessor :organizational_id_number
139
+
140
+ # Person's phone numbers.
141
+ # @return [Array<PhoneNumber>]
142
+ attr_accessor :phone_numbers
143
+
144
+ # Person's photo.
145
+ # @return [ContactPhoto]
146
+ attr_accessor :photo
147
+
148
+ # Person's physical addresses.
149
+ # @return [Array<PostalAddress>]
150
+ attr_accessor :physical_addresses
151
+
152
+ # Encoding for all text properties.
153
+ # @return [String]
154
+ attr_accessor :preferred_text_encoding
155
+
156
+ # A prefix of a full name such like Mr.(mister), Dr.(doctor) and so on.
157
+ # @return [String]
158
+ attr_accessor :prefix
159
+
160
+ # A job position of a person in a company.
161
+ # @return [String]
162
+ attr_accessor :profession
163
+
164
+ # A suffix of a full name such like Jr.(junior), Sr.(senior) and so on.
165
+ # @return [String]
166
+ attr_accessor :suffix
167
+
168
+ # Person's surname.
169
+ # @return [String]
170
+ attr_accessor :surname
171
+
172
+ # Person's urls.
173
+ # @return [Array<Url>]
174
+ attr_accessor :urls
175
+
176
+ # Attribute mapping from ruby-style variable name to JSON key.
177
+ def self.attribute_map
178
+ {
179
+ :'associated_persons' => :'associatedPersons',
180
+ :'attachments' => :'attachments',
181
+ :'company_name' => :'companyName',
182
+ :'computer_network_name' => :'computerNetworkName',
183
+ :'customer_id' => :'customerId',
184
+ :'department_name' => :'departmentName',
185
+ :'display_name' => :'displayName',
186
+ :'email_addresses' => :'emailAddresses',
187
+ :'events' => :'events',
188
+ :'file_as' => :'fileAs',
189
+ :'file_as_mapping' => :'fileAsMapping',
190
+ :'free_busy_location' => :'freeBusyLocation',
191
+ :'gender' => :'gender',
192
+ :'given_name' => :'givenName',
193
+ :'government_id_number' => :'governmentIdNumber',
194
+ :'hobbies' => :'hobbies',
195
+ :'initials' => :'initials',
196
+ :'instant_messengers' => :'instantMessengers',
197
+ :'job_title' => :'jobTitle',
198
+ :'language' => :'language',
199
+ :'location' => :'location',
200
+ :'middle_name' => :'middleName',
201
+ :'nickname' => :'nickname',
202
+ :'notes' => :'notes',
203
+ :'notes_format' => :'notesFormat',
204
+ :'office_location' => :'officeLocation',
205
+ :'organizational_id_number' => :'organizationalIdNumber',
206
+ :'phone_numbers' => :'phoneNumbers',
207
+ :'photo' => :'photo',
208
+ :'physical_addresses' => :'physicalAddresses',
209
+ :'preferred_text_encoding' => :'preferredTextEncoding',
210
+ :'prefix' => :'prefix',
211
+ :'profession' => :'profession',
212
+ :'suffix' => :'suffix',
213
+ :'surname' => :'surname',
214
+ :'urls' => :'urls'
215
+ }
216
+ end
217
+
218
+ # Attribute type mapping.
219
+ def self.swagger_types
220
+ {
221
+ :'associated_persons' => :'Array<AssociatedPerson>',
222
+ :'attachments' => :'Array<Attachment>',
223
+ :'company_name' => :'String',
224
+ :'computer_network_name' => :'String',
225
+ :'customer_id' => :'String',
226
+ :'department_name' => :'String',
227
+ :'display_name' => :'String',
228
+ :'email_addresses' => :'Array<EmailAddress>',
229
+ :'events' => :'Array<CustomerEvent>',
230
+ :'file_as' => :'String',
231
+ :'file_as_mapping' => :'String',
232
+ :'free_busy_location' => :'String',
233
+ :'gender' => :'String',
234
+ :'given_name' => :'String',
235
+ :'government_id_number' => :'String',
236
+ :'hobbies' => :'String',
237
+ :'initials' => :'String',
238
+ :'instant_messengers' => :'Array<InstantMessengerAddress>',
239
+ :'job_title' => :'String',
240
+ :'language' => :'String',
241
+ :'location' => :'String',
242
+ :'middle_name' => :'String',
243
+ :'nickname' => :'String',
244
+ :'notes' => :'String',
245
+ :'notes_format' => :'String',
246
+ :'office_location' => :'String',
247
+ :'organizational_id_number' => :'String',
248
+ :'phone_numbers' => :'Array<PhoneNumber>',
249
+ :'photo' => :'ContactPhoto',
250
+ :'physical_addresses' => :'Array<PostalAddress>',
251
+ :'preferred_text_encoding' => :'String',
252
+ :'prefix' => :'String',
253
+ :'profession' => :'String',
254
+ :'suffix' => :'String',
255
+ :'surname' => :'String',
256
+ :'urls' => :'Array<Url>'
257
+ }
258
+ end
259
+
260
+ # Initializes the object
261
+ # @param [Hash] attributes Model attributes in the form of hash
262
+ def initialize(attributes = {})
263
+ return unless attributes.is_a?(Hash)
264
+
265
+ # convert string to symbol for hash key
266
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
267
+
268
+ if attributes.has_key?(:'associatedPersons')
269
+ if (value = attributes[:'associatedPersons']).is_a?(Array)
270
+ self.associated_persons = value
271
+ end
272
+ end
273
+
274
+ if attributes.has_key?(:'attachments')
275
+ if (value = attributes[:'attachments']).is_a?(Array)
276
+ self.attachments = value
277
+ end
278
+ end
279
+
280
+ if attributes.has_key?(:'companyName')
281
+ self.company_name = attributes[:'companyName']
282
+ end
283
+
284
+ if attributes.has_key?(:'computerNetworkName')
285
+ self.computer_network_name = attributes[:'computerNetworkName']
286
+ end
287
+
288
+ if attributes.has_key?(:'customerId')
289
+ self.customer_id = attributes[:'customerId']
290
+ end
291
+
292
+ if attributes.has_key?(:'departmentName')
293
+ self.department_name = attributes[:'departmentName']
294
+ end
295
+
296
+ if attributes.has_key?(:'displayName')
297
+ self.display_name = attributes[:'displayName']
298
+ end
299
+
300
+ if attributes.has_key?(:'emailAddresses')
301
+ if (value = attributes[:'emailAddresses']).is_a?(Array)
302
+ self.email_addresses = value
303
+ end
304
+ end
305
+
306
+ if attributes.has_key?(:'events')
307
+ if (value = attributes[:'events']).is_a?(Array)
308
+ self.events = value
309
+ end
310
+ end
311
+
312
+ if attributes.has_key?(:'fileAs')
313
+ self.file_as = attributes[:'fileAs']
314
+ end
315
+
316
+ if attributes.has_key?(:'fileAsMapping')
317
+ self.file_as_mapping = attributes[:'fileAsMapping']
318
+ end
319
+
320
+ if attributes.has_key?(:'freeBusyLocation')
321
+ self.free_busy_location = attributes[:'freeBusyLocation']
322
+ end
323
+
324
+ if attributes.has_key?(:'gender')
325
+ self.gender = attributes[:'gender']
326
+ end
327
+
328
+ if attributes.has_key?(:'givenName')
329
+ self.given_name = attributes[:'givenName']
330
+ end
331
+
332
+ if attributes.has_key?(:'governmentIdNumber')
333
+ self.government_id_number = attributes[:'governmentIdNumber']
334
+ end
335
+
336
+ if attributes.has_key?(:'hobbies')
337
+ self.hobbies = attributes[:'hobbies']
338
+ end
339
+
340
+ if attributes.has_key?(:'initials')
341
+ self.initials = attributes[:'initials']
342
+ end
343
+
344
+ if attributes.has_key?(:'instantMessengers')
345
+ if (value = attributes[:'instantMessengers']).is_a?(Array)
346
+ self.instant_messengers = value
347
+ end
348
+ end
349
+
350
+ if attributes.has_key?(:'jobTitle')
351
+ self.job_title = attributes[:'jobTitle']
352
+ end
353
+
354
+ if attributes.has_key?(:'language')
355
+ self.language = attributes[:'language']
356
+ end
357
+
358
+ if attributes.has_key?(:'location')
359
+ self.location = attributes[:'location']
360
+ end
361
+
362
+ if attributes.has_key?(:'middleName')
363
+ self.middle_name = attributes[:'middleName']
364
+ end
365
+
366
+ if attributes.has_key?(:'nickname')
367
+ self.nickname = attributes[:'nickname']
368
+ end
369
+
370
+ if attributes.has_key?(:'notes')
371
+ self.notes = attributes[:'notes']
372
+ end
373
+
374
+ if attributes.has_key?(:'notesFormat')
375
+ self.notes_format = attributes[:'notesFormat']
376
+ end
377
+
378
+ if attributes.has_key?(:'officeLocation')
379
+ self.office_location = attributes[:'officeLocation']
380
+ end
381
+
382
+ if attributes.has_key?(:'organizationalIdNumber')
383
+ self.organizational_id_number = attributes[:'organizationalIdNumber']
384
+ end
385
+
386
+ if attributes.has_key?(:'phoneNumbers')
387
+ if (value = attributes[:'phoneNumbers']).is_a?(Array)
388
+ self.phone_numbers = value
389
+ end
390
+ end
391
+
392
+ if attributes.has_key?(:'photo')
393
+ self.photo = attributes[:'photo']
394
+ end
395
+
396
+ if attributes.has_key?(:'physicalAddresses')
397
+ if (value = attributes[:'physicalAddresses']).is_a?(Array)
398
+ self.physical_addresses = value
399
+ end
400
+ end
401
+
402
+ if attributes.has_key?(:'preferredTextEncoding')
403
+ self.preferred_text_encoding = attributes[:'preferredTextEncoding']
404
+ end
405
+
406
+ if attributes.has_key?(:'prefix')
407
+ self.prefix = attributes[:'prefix']
408
+ end
409
+
410
+ if attributes.has_key?(:'profession')
411
+ self.profession = attributes[:'profession']
412
+ end
413
+
414
+ if attributes.has_key?(:'suffix')
415
+ self.suffix = attributes[:'suffix']
416
+ end
417
+
418
+ if attributes.has_key?(:'surname')
419
+ self.surname = attributes[:'surname']
420
+ end
421
+
422
+ if attributes.has_key?(:'urls')
423
+ if (value = attributes[:'urls']).is_a?(Array)
424
+ self.urls = value
425
+ end
426
+ end
427
+ end
428
+
429
+ # Initializes the object
430
+ # @param [Array<AssociatedPerson>] associated_persons Associated persons.
431
+ # @param [Array<Attachment>] attachments Document attachments.
432
+ # @param [String] company_name Company name.
433
+ # @param [String] computer_network_name Computer network.
434
+ # @param [String] customer_id Customer id.
435
+ # @param [String] department_name Department name.
436
+ # @param [String] display_name Display name.
437
+ # @param [Array<EmailAddress>] email_addresses Person's email addresses.
438
+ # @param [Array<CustomerEvent>] events Person's events.
439
+ # @param [String] file_as A name used for sorting.
440
+ # @param [String] file_as_mapping Specifies how to generate and recompute the value of the dispidFileAs property when other contact name properties change. Coincides MS-OXPROPS revision 16.2 from 7/31/2014. Enum, available values: Empty, DisplayName, FirstName, LastName, Organization, LastFirstMiddle, OrgLastFirstMiddle, LastFirstMiddleOrg, LastFirstMiddle2, LastFirstMiddle3, OrgLastFirstMiddle2, OrgLastFirstMiddle3, LastFirstMiddleOrg2, LastFirstMiddleOrg3, LastFirstMiddleGen, FirstMiddleLastGen, LastFirstMiddleGen2, BestMatch, AccordingToLocale, None
441
+ # @param [String] free_busy_location URL path from which a client can retrieve free/busy information for the contact as an iCal file.
442
+ # @param [String] gender Enum defines gender of a person. Enum, available values: Unspecified, Female, Male
443
+ # @param [String] given_name Person's given name.
444
+ # @param [String] government_id_number Government id number.
445
+ # @param [String] hobbies Person's hobbies.
446
+ # @param [String] initials Person's initials.
447
+ # @param [Array<InstantMessengerAddress>] instant_messengers Person's instant messenger addresses.
448
+ # @param [String] job_title Person's job title.
449
+ # @param [String] language Language.
450
+ # @param [String] location Person's location.
451
+ # @param [String] middle_name Person's middle name.
452
+ # @param [String] nickname Person's nickname.
453
+ # @param [String] notes Notes.
454
+ # @param [String] notes_format Defines format of a text. Enum, available values: Text, Html
455
+ # @param [String] office_location Office location.
456
+ # @param [String] organizational_id_number Contains an identifier for the mail user used within the mail user's organization.
457
+ # @param [Array<PhoneNumber>] phone_numbers Person's phone numbers.
458
+ # @param [ContactPhoto] photo Person's photo.
459
+ # @param [Array<PostalAddress>] physical_addresses Person's physical addresses.
460
+ # @param [String] preferred_text_encoding Encoding for all text properties.
461
+ # @param [String] prefix A prefix of a full name such like Mr.(mister), Dr.(doctor) and so on.
462
+ # @param [String] profession A job position of a person in a company.
463
+ # @param [String] suffix A suffix of a full name such like Jr.(junior), Sr.(senior) and so on.
464
+ # @param [String] surname Person's surname.
465
+ # @param [Array<Url>] urls Person's urls.
466
+ def initialize(associated_persons=nil, attachments=nil, company_name=nil, computer_network_name=nil, customer_id=nil, department_name=nil, display_name=nil, email_addresses=nil, events=nil, file_as=nil, file_as_mapping=nil, free_busy_location=nil, gender=nil, given_name=nil, government_id_number=nil, hobbies=nil, initials=nil, instant_messengers=nil, job_title=nil, language=nil, location=nil, middle_name=nil, nickname=nil, notes=nil, notes_format=nil, office_location=nil, organizational_id_number=nil, phone_numbers=nil, photo=nil, physical_addresses=nil, preferred_text_encoding=nil, prefix=nil, profession=nil, suffix=nil, surname=nil, urls=nil)
467
+ self.associated_persons = associated_persons if associated_persons
468
+ self.attachments = attachments if attachments
469
+ self.company_name = company_name if company_name
470
+ self.computer_network_name = computer_network_name if computer_network_name
471
+ self.customer_id = customer_id if customer_id
472
+ self.department_name = department_name if department_name
473
+ self.display_name = display_name if display_name
474
+ self.email_addresses = email_addresses if email_addresses
475
+ self.events = events if events
476
+ self.file_as = file_as if file_as
477
+ self.file_as_mapping = file_as_mapping if file_as_mapping
478
+ self.free_busy_location = free_busy_location if free_busy_location
479
+ self.gender = gender if gender
480
+ self.given_name = given_name if given_name
481
+ self.government_id_number = government_id_number if government_id_number
482
+ self.hobbies = hobbies if hobbies
483
+ self.initials = initials if initials
484
+ self.instant_messengers = instant_messengers if instant_messengers
485
+ self.job_title = job_title if job_title
486
+ self.language = language if language
487
+ self.location = location if location
488
+ self.middle_name = middle_name if middle_name
489
+ self.nickname = nickname if nickname
490
+ self.notes = notes if notes
491
+ self.notes_format = notes_format if notes_format
492
+ self.office_location = office_location if office_location
493
+ self.organizational_id_number = organizational_id_number if organizational_id_number
494
+ self.phone_numbers = phone_numbers if phone_numbers
495
+ self.photo = photo if photo
496
+ self.physical_addresses = physical_addresses if physical_addresses
497
+ self.preferred_text_encoding = preferred_text_encoding if preferred_text_encoding
498
+ self.prefix = prefix if prefix
499
+ self.profession = profession if profession
500
+ self.suffix = suffix if suffix
501
+ self.surname = surname if surname
502
+ self.urls = urls if urls
503
+ end
504
+
505
+ # Show invalid properties with the reasons. Usually used together with valid?
506
+ # @return Array for valid properties with the reasons
507
+ def list_invalid_properties
508
+ invalid_properties = Array.new
509
+ if @file_as_mapping.nil?
510
+ invalid_properties.push('invalid value for "file_as_mapping", file_as_mapping cannot be nil.')
511
+ end
512
+
513
+ if @gender.nil?
514
+ invalid_properties.push('invalid value for "gender", gender cannot be nil.')
515
+ end
516
+
517
+ if @notes_format.nil?
518
+ invalid_properties.push('invalid value for "notes_format", notes_format cannot be nil.')
519
+ end
520
+
521
+ invalid_properties
522
+ end
523
+
524
+ # Check to see if the all the properties in the model are valid
525
+ # @return true if the model is valid
526
+ def valid?
527
+ return false if @file_as_mapping.nil?
528
+ return false if @gender.nil?
529
+ return false if @notes_format.nil?
530
+ true
531
+ end
532
+
533
+ # Checks equality by comparing each attribute.
534
+ # @param [Object] Object to be compared
535
+ def ==(o)
536
+ return true if self.equal?(o)
537
+ self.class == o.class &&
538
+ associated_persons == o.associated_persons &&
539
+ attachments == o.attachments &&
540
+ company_name == o.company_name &&
541
+ computer_network_name == o.computer_network_name &&
542
+ customer_id == o.customer_id &&
543
+ department_name == o.department_name &&
544
+ display_name == o.display_name &&
545
+ email_addresses == o.email_addresses &&
546
+ events == o.events &&
547
+ file_as == o.file_as &&
548
+ file_as_mapping == o.file_as_mapping &&
549
+ free_busy_location == o.free_busy_location &&
550
+ gender == o.gender &&
551
+ given_name == o.given_name &&
552
+ government_id_number == o.government_id_number &&
553
+ hobbies == o.hobbies &&
554
+ initials == o.initials &&
555
+ instant_messengers == o.instant_messengers &&
556
+ job_title == o.job_title &&
557
+ language == o.language &&
558
+ location == o.location &&
559
+ middle_name == o.middle_name &&
560
+ nickname == o.nickname &&
561
+ notes == o.notes &&
562
+ notes_format == o.notes_format &&
563
+ office_location == o.office_location &&
564
+ organizational_id_number == o.organizational_id_number &&
565
+ phone_numbers == o.phone_numbers &&
566
+ photo == o.photo &&
567
+ physical_addresses == o.physical_addresses &&
568
+ preferred_text_encoding == o.preferred_text_encoding &&
569
+ prefix == o.prefix &&
570
+ profession == o.profession &&
571
+ suffix == o.suffix &&
572
+ surname == o.surname &&
573
+ urls == o.urls
574
+ end
575
+
576
+ # @see the `==` method
577
+ # @param [Object] Object to be compared
578
+ def eql?(o)
579
+ self == o
580
+ end
581
+
582
+ # Calculates hash code according to all attributes.
583
+ # @return [Fixnum] Hash code
584
+ def hash
585
+ [associated_persons, attachments, company_name, computer_network_name, customer_id, department_name, display_name, email_addresses, events, file_as, file_as_mapping, free_busy_location, gender, given_name, government_id_number, hobbies, initials, instant_messengers, job_title, language, location, middle_name, nickname, notes, notes_format, office_location, organizational_id_number, phone_numbers, photo, physical_addresses, preferred_text_encoding, prefix, profession, suffix, surname, urls].hash
586
+ end
587
+
588
+ # Builds the object from hash
589
+ # @param [Hash] attributes Model attributes in the form of hash
590
+ # @return [Object] Returns the model itself
591
+ def build_from_hash(attributes)
592
+ return nil unless attributes.is_a?(Hash)
593
+ self.class.swagger_types.each_pair do |key, type|
594
+ attribute_key = self.class.attribute_map[key]
595
+ attribute_key = (attribute_key[0, 1].downcase + attribute_key[1..-1]).to_sym
596
+ if type =~ /\AArray<(.*)>/i
597
+ # check to ensure the input is an array given that the the attribute
598
+ # is documented as an array but the input is not
599
+ if attributes[attribute_key].is_a?(Array)
600
+ self.send("#{key}=", attributes[attribute_key].map { |v| _deserialize($1, v) })
601
+ end
602
+ elsif !attributes[attribute_key].nil?
603
+ self.send("#{key}=", _deserialize(type, attributes[attribute_key]))
604
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
605
+ end
606
+
607
+ self
608
+ end
609
+
610
+ # Deserializes the data based on type
611
+ # @param string type Data type
612
+ # @param string value Value to be deserialized
613
+ # @return [Object] Deserialized data
614
+ def _deserialize(type, value)
615
+ case type.to_sym
616
+ when :DateTime
617
+ DateTime.parse(value)
618
+ when :Date
619
+ Date.parse(value)
620
+ when :String
621
+ value.to_s
622
+ when :Integer
623
+ value.to_i
624
+ when :Float
625
+ value.to_f
626
+ when :BOOLEAN
627
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
628
+ true
629
+ else
630
+ false
631
+ end
632
+ when :Object
633
+ # generic object (usually a Hash), return directly
634
+ value
635
+ when /\AArray<(?<inner_type>.+)>\z/
636
+ inner_type = Regexp.last_match[:inner_type]
637
+ value.map { |v| _deserialize(inner_type, v) }
638
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
639
+ k_type = Regexp.last_match[:k_type]
640
+ v_type = Regexp.last_match[:v_type]
641
+ {}.tap do |hash|
642
+ value.each do |k, v|
643
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
644
+ end
645
+ end
646
+ else # model
647
+ sub_type = value[:type] || value[:discriminator] || type
648
+ if AsposeEmailCloud.const_defined?(sub_type)
649
+ type = sub_type
650
+ end
651
+ temp_model = AsposeEmailCloud.const_get(type).new
652
+ temp_model.build_from_hash(value)
653
+ end
654
+ end
655
+
656
+ # Returns the string representation of the object
657
+ # @return [String] String presentation of the object
658
+ def to_s
659
+ to_hash.to_s
660
+ end
661
+
662
+ # to_body is an alias to to_hash (backward compatibility)
663
+ # @return [Hash] Returns the object in the form of hash
664
+ def to_body
665
+ to_hash
666
+ end
667
+
668
+ # Returns the object in the form of hash
669
+ # @return [Hash] Returns the object in the form of hash
670
+ def to_hash
671
+ hash = {}
672
+ self.class.attribute_map.each_pair do |attr, param|
673
+ value = self.send(attr)
674
+ next if value.nil?
675
+ hash[param] = _to_hash(value)
676
+ end
677
+ hash
678
+ end
679
+
680
+ # Outputs non-array value in the form of hash
681
+ # For object, use to_hash. Otherwise, just return the value
682
+ # @param [Object] value Any valid value
683
+ # @return [Hash] Returns the value in the form of hash
684
+ def _to_hash(value)
685
+ if value.is_a?(Array)
686
+ value.compact.map { |v| _to_hash(v) }
687
+ elsif value.is_a?(Hash)
688
+ {}.tap do |hash|
689
+ value.each { |k, v| hash[k] = _to_hash(v) }
690
+ end
691
+ elsif value.respond_to? :to_hash
692
+ value.to_hash
693
+ else
694
+ value
695
+ end
696
+ end
697
+
698
+ end
699
+ end