aspose_words_cloud 20.3.0 → 20.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (378) hide show
  1. checksums.yaml +4 -4
  2. data/lib/aspose_words_cloud.rb +259 -234
  3. data/lib/aspose_words_cloud/api/words_api.rb +16553 -16721
  4. data/lib/aspose_words_cloud/api_client.rb +411 -405
  5. data/lib/aspose_words_cloud/api_error.rb +58 -58
  6. data/lib/aspose_words_cloud/configuration.rb +157 -173
  7. data/lib/aspose_words_cloud/models/available_fonts_response.rb +243 -243
  8. data/lib/aspose_words_cloud/models/bmp_save_options_data.rb +475 -477
  9. data/lib/aspose_words_cloud/models/bookmark.rb +226 -227
  10. data/lib/aspose_words_cloud/models/bookmark_data.rb +217 -217
  11. data/lib/aspose_words_cloud/models/bookmark_response.rb +216 -217
  12. data/lib/aspose_words_cloud/models/bookmarks.rb +218 -219
  13. data/lib/aspose_words_cloud/models/bookmarks_outline_level_data.rb +217 -222
  14. data/lib/aspose_words_cloud/models/bookmarks_response.rb +216 -217
  15. data/lib/aspose_words_cloud/models/border.rb +318 -320
  16. data/lib/aspose_words_cloud/models/border_response.rb +216 -217
  17. data/lib/aspose_words_cloud/models/borders_collection.rb +218 -219
  18. data/lib/aspose_words_cloud/models/borders_response.rb +216 -217
  19. data/lib/aspose_words_cloud/models/classification_response.rb +239 -239
  20. data/lib/aspose_words_cloud/models/classification_result.rb +217 -222
  21. data/lib/aspose_words_cloud/models/comment.rb +273 -277
  22. data/lib/aspose_words_cloud/models/comment_base.rb +255 -0
  23. data/lib/aspose_words_cloud/models/comment_insert.rb +255 -0
  24. data/lib/aspose_words_cloud/models/comment_link.rb +206 -207
  25. data/lib/aspose_words_cloud/models/comment_response.rb +216 -217
  26. data/lib/aspose_words_cloud/models/comment_update.rb +255 -0
  27. data/lib/aspose_words_cloud/models/comments_collection.rb +218 -219
  28. data/lib/aspose_words_cloud/models/comments_response.rb +216 -217
  29. data/lib/aspose_words_cloud/models/compare_data.rb +236 -227
  30. data/lib/aspose_words_cloud/models/compare_options.rb +324 -0
  31. data/lib/aspose_words_cloud/models/doc_save_options_data.rb +317 -317
  32. data/lib/aspose_words_cloud/models/document.rb +295 -311
  33. data/lib/aspose_words_cloud/models/document_entry.rb +217 -217
  34. data/lib/aspose_words_cloud/models/document_entry_list.rb +209 -209
  35. data/lib/aspose_words_cloud/models/document_position.rb +216 -217
  36. data/lib/aspose_words_cloud/models/document_properties.rb +218 -219
  37. data/lib/aspose_words_cloud/models/document_properties_response.rb +216 -217
  38. data/lib/aspose_words_cloud/models/document_property.rb +236 -237
  39. data/lib/aspose_words_cloud/models/document_property_base.rb +207 -0
  40. data/lib/aspose_words_cloud/models/document_property_create_or_update.rb +207 -0
  41. data/lib/aspose_words_cloud/models/document_property_response.rb +216 -217
  42. data/lib/aspose_words_cloud/models/document_response.rb +216 -217
  43. data/lib/aspose_words_cloud/models/document_stat_data.rb +248 -264
  44. data/lib/aspose_words_cloud/models/downsample_options_data.rb +227 -227
  45. data/lib/aspose_words_cloud/models/drawing_object.rb +385 -388
  46. data/lib/aspose_words_cloud/models/drawing_object_collection.rb +218 -219
  47. data/lib/aspose_words_cloud/models/drawing_object_link.rb +216 -217
  48. data/lib/aspose_words_cloud/models/drawing_object_response.rb +216 -217
  49. data/lib/aspose_words_cloud/models/drawing_objects_response.rb +216 -217
  50. data/lib/aspose_words_cloud/models/emf_save_options_data.rb +475 -477
  51. data/lib/aspose_words_cloud/models/epub_save_options_data.rb +746 -746
  52. data/lib/aspose_words_cloud/models/error.rb +236 -237
  53. data/lib/aspose_words_cloud/models/error_details.rb +217 -222
  54. data/lib/aspose_words_cloud/models/field.rb +246 -247
  55. data/lib/aspose_words_cloud/models/field_base.rb +217 -0
  56. data/lib/aspose_words_cloud/models/field_collection.rb +218 -219
  57. data/lib/aspose_words_cloud/models/field_insert.rb +217 -0
  58. data/lib/aspose_words_cloud/models/field_link.rb +226 -227
  59. data/lib/aspose_words_cloud/models/field_names.rb +218 -219
  60. data/lib/aspose_words_cloud/models/field_names_response.rb +216 -217
  61. data/lib/aspose_words_cloud/models/field_response.rb +216 -217
  62. data/lib/aspose_words_cloud/models/field_update.rb +217 -0
  63. data/lib/aspose_words_cloud/models/fields_response.rb +216 -217
  64. data/lib/aspose_words_cloud/models/file_link.rb +237 -237
  65. data/lib/aspose_words_cloud/models/files_list.rb +209 -209
  66. data/lib/aspose_words_cloud/models/files_upload_result.rb +221 -221
  67. data/lib/aspose_words_cloud/models/fixed_page_save_options_data.rb +346 -347
  68. data/lib/aspose_words_cloud/models/font.rb +671 -676
  69. data/lib/aspose_words_cloud/models/font_info.rb +237 -237
  70. data/lib/aspose_words_cloud/models/font_response.rb +216 -217
  71. data/lib/aspose_words_cloud/models/footnote.rb +301 -304
  72. data/lib/aspose_words_cloud/models/footnote_base.rb +273 -0
  73. data/lib/aspose_words_cloud/models/footnote_collection.rb +218 -219
  74. data/lib/aspose_words_cloud/models/footnote_insert.rb +273 -0
  75. data/lib/aspose_words_cloud/models/footnote_link.rb +216 -217
  76. data/lib/aspose_words_cloud/models/footnote_response.rb +216 -217
  77. data/lib/aspose_words_cloud/models/footnote_update.rb +273 -0
  78. data/lib/aspose_words_cloud/models/footnotes_response.rb +216 -217
  79. data/lib/aspose_words_cloud/models/footnotes_stat_data.rb +217 -227
  80. data/lib/aspose_words_cloud/models/form_field.rb +306 -307
  81. data/lib/aspose_words_cloud/models/form_field_checkbox.rb +336 -337
  82. data/lib/aspose_words_cloud/models/form_field_collection.rb +218 -219
  83. data/lib/aspose_words_cloud/models/form_field_drop_down.rb +328 -329
  84. data/lib/aspose_words_cloud/models/form_field_response.rb +216 -217
  85. data/lib/aspose_words_cloud/models/form_field_text_input.rb +383 -384
  86. data/lib/aspose_words_cloud/models/form_fields_response.rb +216 -217
  87. data/lib/aspose_words_cloud/models/gif_save_options_data.rb +475 -477
  88. data/lib/aspose_words_cloud/models/graphics_quality_options_data.rb +357 -358
  89. data/lib/aspose_words_cloud/models/header_footer.rb +283 -286
  90. data/lib/aspose_words_cloud/models/header_footer_link.rb +253 -254
  91. data/lib/aspose_words_cloud/models/header_footer_link_collection.rb +218 -219
  92. data/lib/aspose_words_cloud/models/header_footer_response.rb +216 -217
  93. data/lib/aspose_words_cloud/models/header_footers_response.rb +216 -217
  94. data/lib/aspose_words_cloud/models/html_fixed_save_options_data.rb +476 -477
  95. data/lib/aspose_words_cloud/models/html_save_options_data.rb +736 -736
  96. data/lib/aspose_words_cloud/models/hyperlink.rb +226 -227
  97. data/lib/aspose_words_cloud/models/hyperlink_response.rb +216 -217
  98. data/lib/aspose_words_cloud/models/hyperlinks.rb +218 -219
  99. data/lib/aspose_words_cloud/models/hyperlinks_response.rb +216 -217
  100. data/lib/aspose_words_cloud/models/image_save_options_data.rb +475 -477
  101. data/lib/aspose_words_cloud/models/jpeg_save_options_data.rb +475 -477
  102. data/lib/aspose_words_cloud/models/link.rb +237 -237
  103. data/lib/aspose_words_cloud/models/link_element.rb +206 -207
  104. data/lib/aspose_words_cloud/models/load_web_document_data.rb +216 -217
  105. data/lib/aspose_words_cloud/models/metafile_rendering_options_data.rb +247 -247
  106. data/lib/aspose_words_cloud/models/mhtml_save_options_data.rb +746 -746
  107. data/lib/aspose_words_cloud/models/modification_operation_result.rb +215 -217
  108. data/lib/aspose_words_cloud/models/node_link.rb +216 -217
  109. data/lib/aspose_words_cloud/models/odt_save_options_data.rb +344 -344
  110. data/lib/aspose_words_cloud/models/office_math_link.rb +216 -217
  111. data/lib/aspose_words_cloud/models/office_math_object.rb +324 -326
  112. data/lib/aspose_words_cloud/models/office_math_object_response.rb +216 -217
  113. data/lib/aspose_words_cloud/models/office_math_objects_collection.rb +218 -219
  114. data/lib/aspose_words_cloud/models/office_math_objects_response.rb +216 -217
  115. data/lib/aspose_words_cloud/models/ooxml_save_options_data.rb +307 -307
  116. data/lib/aspose_words_cloud/models/outline_options_data.rb +259 -259
  117. data/lib/aspose_words_cloud/models/page_number.rb +237 -247
  118. data/lib/aspose_words_cloud/models/page_setup.rb +645 -646
  119. data/lib/aspose_words_cloud/models/page_stat_data.rb +236 -252
  120. data/lib/aspose_words_cloud/models/paragraph.rb +228 -229
  121. data/lib/aspose_words_cloud/models/paragraph_format.rb +567 -568
  122. data/lib/aspose_words_cloud/models/paragraph_format_response.rb +216 -217
  123. data/lib/aspose_words_cloud/models/paragraph_insert.rb +207 -207
  124. data/lib/aspose_words_cloud/models/paragraph_link.rb +226 -227
  125. data/lib/aspose_words_cloud/models/paragraph_link_collection.rb +218 -219
  126. data/lib/aspose_words_cloud/models/paragraph_link_collection_response.rb +216 -217
  127. data/lib/aspose_words_cloud/models/paragraph_response.rb +216 -217
  128. data/lib/aspose_words_cloud/models/pcl_save_options_data.rb +366 -367
  129. data/lib/aspose_words_cloud/models/pdf_digital_signature_details_data.rb +247 -247
  130. data/lib/aspose_words_cloud/models/pdf_encryption_details_data.rb +237 -237
  131. data/lib/aspose_words_cloud/models/pdf_save_options_data.rb +619 -624
  132. data/lib/aspose_words_cloud/models/png_save_options_data.rb +475 -477
  133. data/lib/aspose_words_cloud/models/preferred_width.rb +254 -259
  134. data/lib/aspose_words_cloud/models/protection_data.rb +207 -207
  135. data/lib/aspose_words_cloud/models/protection_data_response.rb +225 -227
  136. data/lib/aspose_words_cloud/models/protection_request.rb +227 -227
  137. data/lib/aspose_words_cloud/models/ps_save_options_data.rb +356 -357
  138. data/lib/aspose_words_cloud/models/range_document.rb +207 -207
  139. data/lib/aspose_words_cloud/models/range_text_response.rb +217 -217
  140. data/lib/aspose_words_cloud/models/replace_range.rb +254 -254
  141. data/lib/aspose_words_cloud/models/replace_text_parameters.rb +247 -262
  142. data/lib/aspose_words_cloud/models/replace_text_response.rb +226 -227
  143. data/lib/aspose_words_cloud/models/requests/AcceptAllRevisionsRequest.rb +65 -65
  144. data/lib/aspose_words_cloud/models/requests/AppendDocumentRequest.rb +77 -77
  145. data/lib/aspose_words_cloud/models/requests/ClassifyDocumentRequest.rb +69 -69
  146. data/lib/aspose_words_cloud/models/requests/ClassifyRequest.rb +49 -49
  147. data/lib/aspose_words_cloud/models/requests/CompareDocumentRequest.rb +69 -69
  148. data/lib/aspose_words_cloud/models/requests/ConvertDocumentRequest.rb +65 -65
  149. data/lib/aspose_words_cloud/models/requests/CopyFileRequest.rb +61 -61
  150. data/lib/aspose_words_cloud/models/requests/CopyFolderRequest.rb +57 -57
  151. data/lib/aspose_words_cloud/models/requests/CreateDocumentRequest.rb +53 -53
  152. data/lib/aspose_words_cloud/models/requests/CreateFolderRequest.rb +49 -49
  153. data/lib/aspose_words_cloud/models/requests/CreateOrUpdateDocumentPropertyRequest.rb +81 -81
  154. data/lib/aspose_words_cloud/models/requests/DeleteBorderRequest.rb +81 -81
  155. data/lib/aspose_words_cloud/models/requests/DeleteBordersRequest.rb +77 -77
  156. data/lib/aspose_words_cloud/models/requests/DeleteCommentRequest.rb +77 -77
  157. data/lib/aspose_words_cloud/models/requests/DeleteDocumentPropertyRequest.rb +77 -77
  158. data/lib/aspose_words_cloud/models/requests/DeleteDrawingObjectRequest.rb +81 -81
  159. data/lib/aspose_words_cloud/models/requests/DeleteDrawingObjectWithoutNodePathRequest.rb +77 -77
  160. data/lib/aspose_words_cloud/models/requests/DeleteFieldRequest.rb +81 -81
  161. data/lib/aspose_words_cloud/models/requests/DeleteFieldWithoutNodePathRequest.rb +77 -77
  162. data/lib/aspose_words_cloud/models/requests/DeleteFieldsRequest.rb +77 -77
  163. data/lib/aspose_words_cloud/models/requests/DeleteFieldsWithoutNodePathRequest.rb +73 -73
  164. data/lib/aspose_words_cloud/models/requests/DeleteFileRequest.rb +53 -53
  165. data/lib/aspose_words_cloud/models/requests/DeleteFolderRequest.rb +53 -53
  166. data/lib/aspose_words_cloud/models/requests/DeleteFootnoteRequest.rb +81 -81
  167. data/lib/aspose_words_cloud/models/requests/DeleteFootnoteWithoutNodePathRequest.rb +77 -77
  168. data/lib/aspose_words_cloud/models/requests/DeleteFormFieldRequest.rb +81 -81
  169. data/lib/aspose_words_cloud/models/requests/DeleteFormFieldWithoutNodePathRequest.rb +77 -77
  170. data/lib/aspose_words_cloud/models/requests/DeleteHeaderFooterRequest.rb +81 -81
  171. data/lib/aspose_words_cloud/models/requests/DeleteHeadersFootersRequest.rb +81 -81
  172. data/lib/aspose_words_cloud/models/requests/DeleteMacrosRequest.rb +73 -73
  173. data/lib/aspose_words_cloud/models/requests/DeleteOfficeMathObjectRequest.rb +81 -81
  174. data/lib/aspose_words_cloud/models/requests/DeleteOfficeMathObjectWithoutNodePathRequest.rb +77 -77
  175. data/lib/aspose_words_cloud/models/requests/DeleteParagraphRequest.rb +81 -81
  176. data/lib/aspose_words_cloud/models/requests/DeleteParagraphWithoutNodePathRequest.rb +77 -77
  177. data/lib/aspose_words_cloud/models/requests/DeleteRunRequest.rb +81 -81
  178. data/lib/aspose_words_cloud/models/requests/DeleteSectionRequest.rb +77 -77
  179. data/lib/aspose_words_cloud/models/requests/DeleteTableCellRequest.rb +81 -81
  180. data/lib/aspose_words_cloud/models/requests/DeleteTableRequest.rb +81 -81
  181. data/lib/aspose_words_cloud/models/requests/DeleteTableRowRequest.rb +81 -81
  182. data/lib/aspose_words_cloud/models/requests/DeleteTableWithoutNodePathRequest.rb +77 -77
  183. data/lib/aspose_words_cloud/models/requests/DeleteWatermarkRequest.rb +73 -73
  184. data/lib/aspose_words_cloud/models/requests/DownloadFileRequest.rb +53 -53
  185. data/lib/aspose_words_cloud/models/requests/ExecuteMailMergeOnlineRequest.rb +61 -61
  186. data/lib/aspose_words_cloud/models/requests/ExecuteMailMergeRequest.rb +85 -85
  187. data/lib/aspose_words_cloud/models/requests/GetAvailableFontsRequest.rb +45 -45
  188. data/lib/aspose_words_cloud/models/requests/GetBookmarkByNameRequest.rb +65 -65
  189. data/lib/aspose_words_cloud/models/requests/GetBookmarksRequest.rb +61 -61
  190. data/lib/aspose_words_cloud/models/requests/GetBorderRequest.rb +69 -69
  191. data/lib/aspose_words_cloud/models/requests/GetBordersRequest.rb +65 -65
  192. data/lib/aspose_words_cloud/models/requests/GetCommentRequest.rb +65 -65
  193. data/lib/aspose_words_cloud/models/requests/GetCommentsRequest.rb +61 -61
  194. data/lib/aspose_words_cloud/models/requests/GetDocumentDrawingObjectByIndexRequest.rb +69 -69
  195. data/lib/aspose_words_cloud/models/requests/GetDocumentDrawingObjectByIndexWithoutNodePathRequest.rb +65 -65
  196. data/lib/aspose_words_cloud/models/requests/GetDocumentDrawingObjectImageDataRequest.rb +69 -69
  197. data/lib/aspose_words_cloud/models/requests/GetDocumentDrawingObjectImageDataWithoutNodePathRequest.rb +65 -65
  198. data/lib/aspose_words_cloud/models/requests/GetDocumentDrawingObjectOleDataRequest.rb +69 -69
  199. data/lib/aspose_words_cloud/models/requests/GetDocumentDrawingObjectOleDataWithoutNodePathRequest.rb +65 -65
  200. data/lib/aspose_words_cloud/models/requests/GetDocumentDrawingObjectsRequest.rb +65 -65
  201. data/lib/aspose_words_cloud/models/requests/GetDocumentDrawingObjectsWithoutNodePathRequest.rb +61 -61
  202. data/lib/aspose_words_cloud/models/requests/GetDocumentFieldNamesOnlineRequest.rb +49 -49
  203. data/lib/aspose_words_cloud/models/requests/GetDocumentFieldNamesRequest.rb +65 -65
  204. data/lib/aspose_words_cloud/models/requests/GetDocumentHyperlinkByIndexRequest.rb +65 -65
  205. data/lib/aspose_words_cloud/models/requests/GetDocumentHyperlinksRequest.rb +61 -61
  206. data/lib/aspose_words_cloud/models/requests/GetDocumentPropertiesRequest.rb +61 -61
  207. data/lib/aspose_words_cloud/models/requests/GetDocumentPropertyRequest.rb +65 -65
  208. data/lib/aspose_words_cloud/models/requests/GetDocumentProtectionRequest.rb +61 -61
  209. data/lib/aspose_words_cloud/models/requests/GetDocumentRequest.rb +61 -61
  210. data/lib/aspose_words_cloud/models/requests/GetDocumentStatisticsRequest.rb +73 -73
  211. data/lib/aspose_words_cloud/models/requests/GetDocumentWithFormatRequest.rb +73 -73
  212. data/lib/aspose_words_cloud/models/requests/GetFieldRequest.rb +69 -69
  213. data/lib/aspose_words_cloud/models/requests/GetFieldWithoutNodePathRequest.rb +65 -65
  214. data/lib/aspose_words_cloud/models/requests/GetFieldsRequest.rb +65 -65
  215. data/lib/aspose_words_cloud/models/requests/GetFieldsWithoutNodePathRequest.rb +61 -61
  216. data/lib/aspose_words_cloud/models/requests/GetFilesListRequest.rb +49 -49
  217. data/lib/aspose_words_cloud/models/requests/GetFootnoteRequest.rb +69 -69
  218. data/lib/aspose_words_cloud/models/requests/GetFootnoteWithoutNodePathRequest.rb +65 -65
  219. data/lib/aspose_words_cloud/models/requests/GetFootnotesRequest.rb +65 -65
  220. data/lib/aspose_words_cloud/models/requests/GetFootnotesWithoutNodePathRequest.rb +61 -61
  221. data/lib/aspose_words_cloud/models/requests/GetFormFieldRequest.rb +69 -69
  222. data/lib/aspose_words_cloud/models/requests/GetFormFieldWithoutNodePathRequest.rb +65 -65
  223. data/lib/aspose_words_cloud/models/requests/GetFormFieldsRequest.rb +65 -65
  224. data/lib/aspose_words_cloud/models/requests/GetFormFieldsWithoutNodePathRequest.rb +61 -61
  225. data/lib/aspose_words_cloud/models/requests/GetHeaderFooterOfSectionRequest.rb +73 -73
  226. data/lib/aspose_words_cloud/models/requests/GetHeaderFooterRequest.rb +69 -69
  227. data/lib/aspose_words_cloud/models/requests/GetHeaderFootersRequest.rb +69 -69
  228. data/lib/aspose_words_cloud/models/requests/GetOfficeMathObjectRequest.rb +69 -69
  229. data/lib/aspose_words_cloud/models/requests/GetOfficeMathObjectWithoutNodePathRequest.rb +65 -65
  230. data/lib/aspose_words_cloud/models/requests/GetOfficeMathObjectsRequest.rb +65 -65
  231. data/lib/aspose_words_cloud/models/requests/GetOfficeMathObjectsWithoutNodePathRequest.rb +61 -61
  232. data/lib/aspose_words_cloud/models/requests/GetParagraphFormatRequest.rb +69 -69
  233. data/lib/aspose_words_cloud/models/requests/GetParagraphFormatWithoutNodePathRequest.rb +65 -65
  234. data/lib/aspose_words_cloud/models/requests/GetParagraphRequest.rb +69 -69
  235. data/lib/aspose_words_cloud/models/requests/GetParagraphWithoutNodePathRequest.rb +65 -65
  236. data/lib/aspose_words_cloud/models/requests/GetParagraphsRequest.rb +65 -65
  237. data/lib/aspose_words_cloud/models/requests/GetParagraphsWithoutNodePathRequest.rb +61 -61
  238. data/lib/aspose_words_cloud/models/requests/GetRangeTextRequest.rb +69 -69
  239. data/lib/aspose_words_cloud/models/requests/GetRunFontRequest.rb +69 -69
  240. data/lib/aspose_words_cloud/models/requests/GetRunRequest.rb +69 -69
  241. data/lib/aspose_words_cloud/models/requests/GetRunsRequest.rb +65 -65
  242. data/lib/aspose_words_cloud/models/requests/GetSectionPageSetupRequest.rb +65 -65
  243. data/lib/aspose_words_cloud/models/requests/GetSectionRequest.rb +65 -65
  244. data/lib/aspose_words_cloud/models/requests/GetSectionsRequest.rb +61 -61
  245. data/lib/aspose_words_cloud/models/requests/GetTableCellFormatRequest.rb +69 -69
  246. data/lib/aspose_words_cloud/models/requests/GetTableCellRequest.rb +69 -69
  247. data/lib/aspose_words_cloud/models/requests/GetTablePropertiesRequest.rb +69 -69
  248. data/lib/aspose_words_cloud/models/requests/GetTablePropertiesWithoutNodePathRequest.rb +65 -65
  249. data/lib/aspose_words_cloud/models/requests/GetTableRequest.rb +69 -69
  250. data/lib/aspose_words_cloud/models/requests/GetTableRowFormatRequest.rb +69 -69
  251. data/lib/aspose_words_cloud/models/requests/GetTableRowRequest.rb +69 -69
  252. data/lib/aspose_words_cloud/models/requests/GetTableWithoutNodePathRequest.rb +65 -65
  253. data/lib/aspose_words_cloud/models/requests/GetTablesRequest.rb +65 -65
  254. data/lib/aspose_words_cloud/models/requests/GetTablesWithoutNodePathRequest.rb +61 -61
  255. data/lib/aspose_words_cloud/models/requests/InsertCommentRequest.rb +77 -77
  256. data/lib/aspose_words_cloud/models/requests/InsertDrawingObjectRequest.rb +85 -85
  257. data/lib/aspose_words_cloud/models/requests/InsertDrawingObjectWithoutNodePathRequest.rb +81 -81
  258. data/lib/aspose_words_cloud/models/requests/InsertFieldRequest.rb +85 -85
  259. data/lib/aspose_words_cloud/models/requests/InsertFieldWithoutNodePathRequest.rb +81 -81
  260. data/lib/aspose_words_cloud/models/requests/InsertFootnoteRequest.rb +81 -81
  261. data/lib/aspose_words_cloud/models/requests/InsertFootnoteWithoutNodePathRequest.rb +77 -77
  262. data/lib/aspose_words_cloud/models/requests/InsertFormFieldRequest.rb +85 -85
  263. data/lib/aspose_words_cloud/models/requests/InsertFormFieldWithoutNodePathRequest.rb +81 -81
  264. data/lib/aspose_words_cloud/models/requests/InsertHeaderFooterRequest.rb +81 -81
  265. data/lib/aspose_words_cloud/models/requests/InsertPageNumbersRequest.rb +77 -77
  266. data/lib/aspose_words_cloud/models/requests/InsertParagraphRequest.rb +85 -85
  267. data/lib/aspose_words_cloud/models/requests/InsertRunRequest.rb +85 -85
  268. data/lib/aspose_words_cloud/models/requests/InsertTableCellRequest.rb +81 -81
  269. data/lib/aspose_words_cloud/models/requests/InsertTableRequest.rb +81 -81
  270. data/lib/aspose_words_cloud/models/requests/InsertTableRowRequest.rb +81 -81
  271. data/lib/aspose_words_cloud/models/requests/InsertTableWithoutNodePathRequest.rb +77 -77
  272. data/lib/aspose_words_cloud/models/requests/InsertWatermarkImageRequest.rb +85 -85
  273. data/lib/aspose_words_cloud/models/requests/InsertWatermarkTextRequest.rb +77 -77
  274. data/lib/aspose_words_cloud/models/requests/LoadWebDocumentRequest.rb +49 -49
  275. data/lib/aspose_words_cloud/models/requests/MoveFileRequest.rb +61 -61
  276. data/lib/aspose_words_cloud/models/requests/MoveFolderRequest.rb +57 -57
  277. data/lib/aspose_words_cloud/models/requests/ProtectDocumentRequest.rb +69 -69
  278. data/lib/aspose_words_cloud/models/requests/RejectAllRevisionsRequest.rb +65 -65
  279. data/lib/aspose_words_cloud/models/requests/RemoveRangeRequest.rb +73 -73
  280. data/lib/aspose_words_cloud/models/requests/RenderDrawingObjectRequest.rb +77 -77
  281. data/lib/aspose_words_cloud/models/requests/RenderDrawingObjectWithoutNodePathRequest.rb +73 -73
  282. data/lib/aspose_words_cloud/models/requests/RenderMathObjectRequest.rb +77 -77
  283. data/lib/aspose_words_cloud/models/requests/RenderMathObjectWithoutNodePathRequest.rb +73 -73
  284. data/lib/aspose_words_cloud/models/requests/RenderPageRequest.rb +73 -73
  285. data/lib/aspose_words_cloud/models/requests/RenderParagraphRequest.rb +77 -77
  286. data/lib/aspose_words_cloud/models/requests/RenderParagraphWithoutNodePathRequest.rb +73 -73
  287. data/lib/aspose_words_cloud/models/requests/RenderTableRequest.rb +77 -77
  288. data/lib/aspose_words_cloud/models/requests/RenderTableWithoutNodePathRequest.rb +73 -73
  289. data/lib/aspose_words_cloud/models/requests/ReplaceTextRequest.rb +77 -77
  290. data/lib/aspose_words_cloud/models/requests/ReplaceWithTextRequest.rb +77 -77
  291. data/lib/aspose_words_cloud/models/requests/ResetCacheRequest.rb +36 -36
  292. data/lib/aspose_words_cloud/models/requests/SaveAsRangeRequest.rb +73 -73
  293. data/lib/aspose_words_cloud/models/requests/SaveAsRequest.rb +69 -69
  294. data/lib/aspose_words_cloud/models/requests/SaveAsTiffRequest.rb +137 -137
  295. data/lib/aspose_words_cloud/models/requests/SearchRequest.rb +65 -65
  296. data/lib/aspose_words_cloud/models/requests/SplitDocumentRequest.rb +85 -85
  297. data/lib/aspose_words_cloud/models/requests/UnprotectDocumentRequest.rb +69 -69
  298. data/lib/aspose_words_cloud/models/requests/UpdateBookmarkRequest.rb +81 -81
  299. data/lib/aspose_words_cloud/models/requests/UpdateBorderRequest.rb +85 -85
  300. data/lib/aspose_words_cloud/models/requests/UpdateCommentRequest.rb +81 -81
  301. data/lib/aspose_words_cloud/models/requests/UpdateDrawingObjectRequest.rb +89 -89
  302. data/lib/aspose_words_cloud/models/requests/UpdateDrawingObjectWithoutNodePathRequest.rb +85 -85
  303. data/lib/aspose_words_cloud/models/requests/UpdateFieldRequest.rb +85 -85
  304. data/lib/aspose_words_cloud/models/requests/UpdateFieldsRequest.rb +65 -65
  305. data/lib/aspose_words_cloud/models/requests/UpdateFootnoteRequest.rb +85 -85
  306. data/lib/aspose_words_cloud/models/requests/UpdateFootnoteWithoutNodePathRequest.rb +81 -81
  307. data/lib/aspose_words_cloud/models/requests/UpdateFormFieldRequest.rb +85 -85
  308. data/lib/aspose_words_cloud/models/requests/UpdateFormFieldWithoutNodePathRequest.rb +81 -81
  309. data/lib/aspose_words_cloud/models/requests/UpdateParagraphFormatRequest.rb +85 -85
  310. data/lib/aspose_words_cloud/models/requests/UpdateRunFontRequest.rb +85 -85
  311. data/lib/aspose_words_cloud/models/requests/UpdateRunRequest.rb +85 -85
  312. data/lib/aspose_words_cloud/models/requests/UpdateSectionPageSetupRequest.rb +81 -81
  313. data/lib/aspose_words_cloud/models/requests/UpdateTableCellFormatRequest.rb +85 -85
  314. data/lib/aspose_words_cloud/models/requests/UpdateTablePropertiesRequest.rb +85 -85
  315. data/lib/aspose_words_cloud/models/requests/UpdateTablePropertiesWithoutNodePathRequest.rb +81 -81
  316. data/lib/aspose_words_cloud/models/requests/UpdateTableRowFormatRequest.rb +85 -85
  317. data/lib/aspose_words_cloud/models/requests/UploadFileRequest.rb +53 -53
  318. data/lib/aspose_words_cloud/models/response_error.rb +246 -247
  319. data/lib/aspose_words_cloud/models/revisions_modification_response.rb +216 -217
  320. data/lib/aspose_words_cloud/models/rtf_save_options_data.rb +317 -317
  321. data/lib/aspose_words_cloud/models/run.rb +226 -227
  322. data/lib/aspose_words_cloud/models/run_base.rb +207 -0
  323. data/lib/aspose_words_cloud/models/run_insert.rb +207 -0
  324. data/lib/aspose_words_cloud/models/run_link.rb +226 -227
  325. data/lib/aspose_words_cloud/models/run_response.rb +216 -217
  326. data/lib/aspose_words_cloud/models/run_update.rb +207 -0
  327. data/lib/aspose_words_cloud/models/runs.rb +218 -219
  328. data/lib/aspose_words_cloud/models/runs_response.rb +216 -217
  329. data/lib/aspose_words_cloud/models/save_options_data.rb +277 -277
  330. data/lib/aspose_words_cloud/models/save_response.rb +216 -217
  331. data/lib/aspose_words_cloud/models/save_result.rb +227 -229
  332. data/lib/aspose_words_cloud/models/search_response.rb +226 -227
  333. data/lib/aspose_words_cloud/models/search_result.rb +215 -217
  334. data/lib/aspose_words_cloud/models/search_results_collection.rb +218 -219
  335. data/lib/aspose_words_cloud/models/section.rb +254 -259
  336. data/lib/aspose_words_cloud/models/section_link.rb +216 -217
  337. data/lib/aspose_words_cloud/models/section_link_collection.rb +218 -219
  338. data/lib/aspose_words_cloud/models/section_link_collection_response.rb +216 -217
  339. data/lib/aspose_words_cloud/models/section_page_setup_response.rb +216 -217
  340. data/lib/aspose_words_cloud/models/section_response.rb +216 -217
  341. data/lib/aspose_words_cloud/models/split_document_response.rb +216 -217
  342. data/lib/aspose_words_cloud/models/split_document_result.rb +227 -229
  343. data/lib/aspose_words_cloud/models/stat_data_response.rb +225 -227
  344. data/lib/aspose_words_cloud/models/storage_file.rb +247 -257
  345. data/lib/aspose_words_cloud/models/story_child_nodes.rb +209 -209
  346. data/lib/aspose_words_cloud/models/string_format_data.rb +348 -348
  347. data/lib/aspose_words_cloud/models/svg_save_options_data.rb +406 -407
  348. data/lib/aspose_words_cloud/models/table.rb +237 -239
  349. data/lib/aspose_words_cloud/models/table_cell.rb +228 -229
  350. data/lib/aspose_words_cloud/models/table_cell_format.rb +410 -412
  351. data/lib/aspose_words_cloud/models/table_cell_format_response.rb +216 -217
  352. data/lib/aspose_words_cloud/models/table_cell_insert.rb +207 -207
  353. data/lib/aspose_words_cloud/models/table_cell_response.rb +216 -217
  354. data/lib/aspose_words_cloud/models/table_insert.rb +226 -237
  355. data/lib/aspose_words_cloud/models/table_link.rb +216 -217
  356. data/lib/aspose_words_cloud/models/table_link_collection.rb +218 -219
  357. data/lib/aspose_words_cloud/models/table_link_collection_response.rb +216 -217
  358. data/lib/aspose_words_cloud/models/table_properties.rb +430 -432
  359. data/lib/aspose_words_cloud/models/table_properties_response.rb +216 -217
  360. data/lib/aspose_words_cloud/models/table_response.rb +216 -217
  361. data/lib/aspose_words_cloud/models/table_row.rb +237 -239
  362. data/lib/aspose_words_cloud/models/table_row_format.rb +283 -284
  363. data/lib/aspose_words_cloud/models/table_row_format_response.rb +216 -217
  364. data/lib/aspose_words_cloud/models/table_row_insert.rb +217 -222
  365. data/lib/aspose_words_cloud/models/table_row_response.rb +216 -217
  366. data/lib/aspose_words_cloud/models/text_save_options_data.rb +384 -384
  367. data/lib/aspose_words_cloud/models/tiff_save_options_data.rb +505 -507
  368. data/lib/aspose_words_cloud/models/watermark_text.rb +217 -222
  369. data/lib/aspose_words_cloud/models/word_ml_save_options_data.rb +287 -287
  370. data/lib/aspose_words_cloud/models/words_api_error_response.rb +216 -217
  371. data/lib/aspose_words_cloud/models/words_api_link.rb +237 -237
  372. data/lib/aspose_words_cloud/models/words_response.rb +207 -207
  373. data/lib/aspose_words_cloud/models/xaml_fixed_save_options_data.rb +366 -367
  374. data/lib/aspose_words_cloud/models/xaml_flow_save_options_data.rb +297 -297
  375. data/lib/aspose_words_cloud/models/xml_color.rb +217 -217
  376. data/lib/aspose_words_cloud/models/xps_save_options_data.rb +385 -387
  377. data/lib/aspose_words_cloud/version.rb +29 -29
  378. metadata +19 -5
@@ -1,217 +1,216 @@
1
-
2
- require 'date'
3
-
4
- module AsposeWordsCloud
5
- #
6
- # --------------------------------------------------------------------------------------------------------------------
7
- # <copyright company="Aspose" file="OfficeMathLink.rb">
8
- # Copyright (c) 2019 Aspose.Words for Cloud
9
- # </copyright>
10
- # <summary>
11
- # Permission is hereby granted, free of charge, to any person obtaining a copy
12
- # of this software and associated documentation files (the "Software"), to deal
13
- # in the Software without restriction, including without limitation the rights
14
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
- # copies of the Software, and to permit persons to whom the Software is
16
- # furnished to do so, subject to the following conditions:
17
- #
18
- # The above copyright notice and this permission notice shall be included in all
19
- # copies or substantial portions of the Software.
20
- #
21
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
- # SOFTWARE.
28
- # </summary>
29
- # --------------------------------------------------------------------------------------------------------------------
30
- #
31
-
32
- # OfficeMath object link element.
33
- class OfficeMathLink
34
- # Gets or sets link to the document.
35
- attr_accessor :link
36
-
37
- # Gets or sets node id.
38
- attr_accessor :node_id
39
-
40
-
41
- # Attribute mapping from ruby-style variable name to JSON key.
42
- def self.attribute_map
43
- {
44
- :'link' => :'link',
45
- :'node_id' => :'NodeId'
46
- }
47
- end
48
-
49
- # Attribute type mapping.
50
- def self.swagger_types
51
- {
52
- :'link' => :'WordsApiLink',
53
- :'node_id' => :'String'
54
- }
55
- end
56
-
57
- # Initializes the object
58
- # @param [Hash] attributes Model attributes in the form of hash
59
- def initialize(attributes = {})
60
- return unless attributes.is_a?(Hash)
61
-
62
- # convert string to symbol for hash key
63
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
64
-
65
- if attributes.key?(:'link')
66
- self.link = attributes[:'link']
67
- end
68
-
69
- if attributes.key?(:'NodeId')
70
- self.node_id = attributes[:'NodeId']
71
- end
72
-
73
- end
74
-
75
- # Show invalid properties with the reasons. Usually used together with valid?
76
- # @return Array for valid properies with the reasons
77
- def list_invalid_properties
78
- invalid_properties = []
79
- return invalid_properties
80
- end
81
-
82
- # Check to see if the all the properties in the model are valid
83
- # @return true if the model is valid
84
- def valid?
85
- return true
86
- end
87
-
88
- # Checks equality by comparing each attribute.
89
- # @param [Object] Object to be compared
90
- def ==(other)
91
- return true if self.equal?(other)
92
- self.class == other.class &&
93
- link == other.link &&
94
- node_id == other.node_id
95
- end
96
-
97
- # @see the `==` method
98
- # @param [Object] Object to be compared
99
- def eql?(other)
100
- self == other
101
- end
102
-
103
- # Calculates hash code according to all attributes.
104
- # @return [Fixnum] Hash code
105
- def hash
106
- [link, node_id].hash
107
- end
108
-
109
- # Builds the object from hash
110
- # @param [Hash] attributes Model attributes in the form of hash
111
- # @return [Object] Returns the model itself
112
- def build_from_hash(attributes)
113
- return nil unless attributes.is_a?(Hash)
114
- self.class.swagger_types.each_pair do |key, type|
115
- if type =~ /\AArray<(.*)>/i
116
- # check to ensure the input is an array given that the the attribute
117
- # is documented as an array but the input is not
118
- if attributes[self.class.attribute_map[key]].is_a?(Array)
119
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
120
- end
121
- elsif !attributes[self.class.attribute_map[key]].nil?
122
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
123
- end
124
- # or else data not found in attributes(hash), not an issue as the data can be optional
125
- end
126
-
127
- self
128
- end
129
-
130
- # Deserializes the data based on type
131
- # @param string type Data type
132
- # @param string value Value to be deserialized
133
- # @return [Object] Deserialized data
134
- def _deserialize(type, value)
135
- case type.to_sym
136
- when :DateTime
137
- Time.at(/\d/.match(value)[0].to_f).to_datetime
138
- when :Date
139
- Time.at(/\d/.match(value)[0].to_f).to_date
140
- when :String
141
- value.to_s
142
- when :Integer
143
- value.to_i
144
- when :Float
145
- value.to_f
146
- when :BOOLEAN
147
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
148
- true
149
- else
150
- false
151
- end
152
- when :Object
153
- # generic object (usually a Hash), return directly
154
- value
155
- when /\AArray<(?<inner_type>.+)>\z/
156
- inner_type = Regexp.last_match[:inner_type]
157
- value.map { |v| _deserialize(inner_type, v) }
158
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
159
- k_type = Regexp.last_match[:k_type]
160
- v_type = Regexp.last_match[:v_type]
161
- {}.tap do |hash|
162
- value.each do |k, v|
163
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
164
- end
165
- end
166
- else
167
- # model
168
- temp_model = AsposeWordsCloud.const_get(type).new
169
- temp_model.build_from_hash(value)
170
- end
171
- end
172
-
173
- # Returns the string representation of the object
174
- # @return [String] String presentation of the object
175
- def to_s
176
- to_hash.to_s
177
- end
178
-
179
- # to_body is an alias to to_hash (backward compatibility)
180
- # @return [Hash] Returns the object in the form of hash
181
- def to_body
182
- to_hash
183
- end
184
-
185
- # Returns the object in the form of hash
186
- # @return [Hash] Returns the object in the form of hash
187
- def to_hash
188
- hash = {}
189
- self.class.attribute_map.each_pair do |attr, param|
190
- value = self.send(attr)
191
- next if value.nil?
192
- hash[param] = _to_hash(value)
193
- end
194
- hash
195
- end
196
-
197
- # Outputs non-array value in the form of hash
198
- # For object, use to_hash. Otherwise, just return the value
199
- # @param [Object] value Any valid value
200
- # @return [Hash] Returns the value in the form of hash
201
- def _to_hash(value)
202
- if value.is_a?(Array)
203
- value.compact.map { |v| _to_hash(v) }
204
- elsif value.is_a?(Hash)
205
- {}.tap do |hash|
206
- value.each { |k, v| hash[k] = _to_hash(v) }
207
- end
208
- elsif value.respond_to? :to_hash
209
- value.to_hash
210
- else
211
- value
212
- end
213
- end
214
-
215
- end
216
-
217
- end
1
+
2
+ require 'date'
3
+
4
+ module AsposeWordsCloud
5
+ #
6
+ # --------------------------------------------------------------------------------------------------------------------
7
+ # <copyright company="Aspose" file="OfficeMathLink.rb">
8
+ # Copyright (c) 2019 Aspose.Words for Cloud
9
+ # </copyright>
10
+ # <summary>
11
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ # of this software and associated documentation files (the "Software"), to deal
13
+ # in the Software without restriction, including without limitation the rights
14
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ # copies of the Software, and to permit persons to whom the Software is
16
+ # furnished to do so, subject to the following conditions:
17
+ #
18
+ # The above copyright notice and this permission notice shall be included in all
19
+ # copies or substantial portions of the Software.
20
+ #
21
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
+ # SOFTWARE.
28
+ # </summary>
29
+ # --------------------------------------------------------------------------------------------------------------------
30
+ #
31
+
32
+ # OfficeMath object link element.
33
+ class OfficeMathLink
34
+ # Gets or sets node id.
35
+ attr_accessor :node_id
36
+
37
+ attr_accessor :link
38
+
39
+
40
+ # Attribute mapping from ruby-style variable name to JSON key.
41
+ def self.attribute_map
42
+ {
43
+ :'node_id' => :'NodeId',
44
+ :'link' => :'link'
45
+ }
46
+ end
47
+
48
+ # Attribute type mapping.
49
+ def self.swagger_types
50
+ {
51
+ :'node_id' => :'String',
52
+ :'link' => :'WordsApiLink'
53
+ }
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ return unless attributes.is_a?(Hash)
60
+
61
+ # convert string to symbol for hash key
62
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
63
+
64
+ if attributes.key?(:'NodeId')
65
+ self.node_id = attributes[:'NodeId']
66
+ end
67
+
68
+ if attributes.key?(:'link')
69
+ self.link = attributes[:'link']
70
+ end
71
+
72
+ end
73
+
74
+ # Show invalid properties with the reasons. Usually used together with valid?
75
+ # @return Array for valid properies with the reasons
76
+ def list_invalid_properties
77
+ invalid_properties = []
78
+ return invalid_properties
79
+ end
80
+
81
+ # Check to see if the all the properties in the model are valid
82
+ # @return true if the model is valid
83
+ def valid?
84
+ return true
85
+ end
86
+
87
+ # Checks equality by comparing each attribute.
88
+ # @param [Object] Object to be compared
89
+ def ==(other)
90
+ return true if self.equal?(other)
91
+ self.class == other.class &&
92
+ node_id == other.node_id &&
93
+ link == other.link
94
+ end
95
+
96
+ # @see the `==` method
97
+ # @param [Object] Object to be compared
98
+ def eql?(other)
99
+ self == other
100
+ end
101
+
102
+ # Calculates hash code according to all attributes.
103
+ # @return [Fixnum] Hash code
104
+ def hash
105
+ [node_id, link].hash
106
+ end
107
+
108
+ # Builds the object from hash
109
+ # @param [Hash] attributes Model attributes in the form of hash
110
+ # @return [Object] Returns the model itself
111
+ def build_from_hash(attributes)
112
+ return nil unless attributes.is_a?(Hash)
113
+ self.class.swagger_types.each_pair do |key, type|
114
+ if type =~ /\AArray<(.*)>/i
115
+ # check to ensure the input is an array given that the the attribute
116
+ # is documented as an array but the input is not
117
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
118
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
119
+ end
120
+ elsif !attributes[self.class.attribute_map[key]].nil?
121
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
122
+ end
123
+ # or else data not found in attributes(hash), not an issue as the data can be optional
124
+ end
125
+
126
+ self
127
+ end
128
+
129
+ # Deserializes the data based on type
130
+ # @param string type Data type
131
+ # @param string value Value to be deserialized
132
+ # @return [Object] Deserialized data
133
+ def _deserialize(type, value)
134
+ case type.to_sym
135
+ when :DateTime
136
+ Time.at(/\d/.match(value)[0].to_f).to_datetime
137
+ when :Date
138
+ Time.at(/\d/.match(value)[0].to_f).to_date
139
+ when :String
140
+ value.to_s
141
+ when :Integer
142
+ value.to_i
143
+ when :Float
144
+ value.to_f
145
+ when :BOOLEAN
146
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
147
+ true
148
+ else
149
+ false
150
+ end
151
+ when :Object
152
+ # generic object (usually a Hash), return directly
153
+ value
154
+ when /\AArray<(?<inner_type>.+)>\z/
155
+ inner_type = Regexp.last_match[:inner_type]
156
+ value.map { |v| _deserialize(inner_type, v) }
157
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
158
+ k_type = Regexp.last_match[:k_type]
159
+ v_type = Regexp.last_match[:v_type]
160
+ {}.tap do |hash|
161
+ value.each do |k, v|
162
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
163
+ end
164
+ end
165
+ else
166
+ # model
167
+ temp_model = AsposeWordsCloud.const_get(type).new
168
+ temp_model.build_from_hash(value)
169
+ end
170
+ end
171
+
172
+ # Returns the string representation of the object
173
+ # @return [String] String presentation of the object
174
+ def to_s
175
+ to_hash.to_s
176
+ end
177
+
178
+ # to_body is an alias to to_hash (backward compatibility)
179
+ # @return [Hash] Returns the object in the form of hash
180
+ def to_body
181
+ to_hash
182
+ end
183
+
184
+ # Returns the object in the form of hash
185
+ # @return [Hash] Returns the object in the form of hash
186
+ def to_hash
187
+ hash = {}
188
+ self.class.attribute_map.each_pair do |attr, param|
189
+ value = self.send(attr)
190
+ next if value.nil?
191
+ hash[param] = _to_hash(value)
192
+ end
193
+ hash
194
+ end
195
+
196
+ # Outputs non-array value in the form of hash
197
+ # For object, use to_hash. Otherwise, just return the value
198
+ # @param [Object] value Any valid value
199
+ # @return [Hash] Returns the value in the form of hash
200
+ def _to_hash(value)
201
+ if value.is_a?(Array)
202
+ value.compact.map { |v| _to_hash(v) }
203
+ elsif value.is_a?(Hash)
204
+ {}.tap do |hash|
205
+ value.each { |k, v| hash[k] = _to_hash(v) }
206
+ end
207
+ elsif value.respond_to? :to_hash
208
+ value.to_hash
209
+ else
210
+ value
211
+ end
212
+ end
213
+
214
+ end
215
+
216
+ end
@@ -1,326 +1,324 @@
1
-
2
- require 'date'
3
-
4
- module AsposeWordsCloud
5
- #
6
- # --------------------------------------------------------------------------------------------------------------------
7
- # <copyright company="Aspose" file="OfficeMathObject.rb">
8
- # Copyright (c) 2019 Aspose.Words for Cloud
9
- # </copyright>
10
- # <summary>
11
- # Permission is hereby granted, free of charge, to any person obtaining a copy
12
- # of this software and associated documentation files (the "Software"), to deal
13
- # in the Software without restriction, including without limitation the rights
14
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
- # copies of the Software, and to permit persons to whom the Software is
16
- # furnished to do so, subject to the following conditions:
17
- #
18
- # The above copyright notice and this permission notice shall be included in all
19
- # copies or substantial portions of the Software.
20
- #
21
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
- # SOFTWARE.
28
- # </summary>
29
- # --------------------------------------------------------------------------------------------------------------------
30
- #
31
-
32
- # OfficeMath object.
33
- class OfficeMathObject
34
- # Gets or sets link to the document.
35
- attr_accessor :link
36
-
37
- # Gets or sets node id.
38
- attr_accessor :node_id
39
-
40
- # Gets or sets content of footnote.
41
- attr_accessor :content
42
-
43
- # Gets or sets /sets Office Math display format type which represents whether an equation is displayed inline with the text or displayed on its own line.
44
- attr_accessor :display_type
45
-
46
- # Gets or sets /sets Office Math justification.
47
- attr_accessor :justification
48
-
49
- # Gets or sets type Aspose.Words.Math.OfficeMath.MathObjectType of this Office Math object.
50
- attr_accessor :math_object_type
51
-
52
- class EnumAttributeValidator
53
- attr_reader :datatype
54
- attr_reader :allowable_values
55
-
56
- def initialize(datatype, allowable_values)
57
- @allowable_values = allowable_values.map do |value|
58
- case datatype.to_s
59
- when /Integer/i
60
- value.to_i
61
- when /Float/i
62
- value.to_f
63
- else
64
- value
65
- end
66
- end
67
- end
68
-
69
- def valid?(value)
70
- !value || allowable_values.include?(value)
71
- end
72
- end
73
-
74
- # Attribute mapping from ruby-style variable name to JSON key.
75
- def self.attribute_map
76
- {
77
- :'link' => :'link',
78
- :'node_id' => :'NodeId',
79
- :'content' => :'Content',
80
- :'display_type' => :'DisplayType',
81
- :'justification' => :'Justification',
82
- :'math_object_type' => :'MathObjectType'
83
- }
84
- end
85
-
86
- # Attribute type mapping.
87
- def self.swagger_types
88
- {
89
- :'link' => :'WordsApiLink',
90
- :'node_id' => :'String',
91
- :'content' => :'StoryChildNodes',
92
- :'display_type' => :'String',
93
- :'justification' => :'String',
94
- :'math_object_type' => :'String'
95
- }
96
- end
97
-
98
- # Initializes the object
99
- # @param [Hash] attributes Model attributes in the form of hash
100
- def initialize(attributes = {})
101
- return unless attributes.is_a?(Hash)
102
-
103
- # convert string to symbol for hash key
104
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
105
-
106
- if attributes.key?(:'link')
107
- self.link = attributes[:'link']
108
- end
109
-
110
- if attributes.key?(:'NodeId')
111
- self.node_id = attributes[:'NodeId']
112
- end
113
-
114
- if attributes.key?(:'Content')
115
- self.content = attributes[:'Content']
116
- end
117
-
118
- if attributes.key?(:'DisplayType')
119
- self.display_type = attributes[:'DisplayType']
120
- end
121
-
122
- if attributes.key?(:'Justification')
123
- self.justification = attributes[:'Justification']
124
- end
125
-
126
- if attributes.key?(:'MathObjectType')
127
- self.math_object_type = attributes[:'MathObjectType']
128
- end
129
-
130
- end
131
-
132
- # Show invalid properties with the reasons. Usually used together with valid?
133
- # @return Array for valid properies with the reasons
134
- def list_invalid_properties
135
- invalid_properties = []
136
- return invalid_properties
137
- end
138
-
139
- # Check to see if the all the properties in the model are valid
140
- # @return true if the model is valid
141
- def valid?
142
- display_type_validator = EnumAttributeValidator.new('String', ["Display", "Inline"])
143
- return false unless display_type_validator.valid?(@display_type)
144
- justification_validator = EnumAttributeValidator.new('String', ["CenterGroup", "Default", "Center", "Left", "Right", "Inline"])
145
- return false unless justification_validator.valid?(@justification)
146
- math_object_type_validator = EnumAttributeValidator.new('String', ["OMath", "OMathPara", "Accent", "Bar", "BorderBox", "Box", "Delimiter", "Degree", "Argument", "Array", "Fraction", "Denominator", "Numerator", "Function", "FunctionName", "GroupCharacter", "Limit", "LowerLimit", "UpperLimit", "Matrix", "MatrixRow", "NAry", "Phantom", "Radical", "SubscriptPart", "SuperscriptPart", "PreSubSuperscript", "Subscript", "SubSuperscript", "Supercript"])
147
- return false unless math_object_type_validator.valid?(@math_object_type)
148
- return true
149
- end
150
-
151
- # Custom attribute writer method checking allowed values (enum).
152
- # @param [Object] display_type Object to be assigned
153
- def display_type=(display_type)
154
- validator = EnumAttributeValidator.new('String', ["Display", "Inline"])
155
- if display_type.to_i == 0
156
- unless validator.valid?(display_type)
157
- raise ArgumentError, "invalid value for 'display_type', must be one of #{validator.allowable_values}."
158
- end
159
- @display_type = display_type
160
- else
161
- @display_type = validator.allowable_values[display_type.to_i]
162
- end
163
- end
164
-
165
- # Custom attribute writer method checking allowed values (enum).
166
- # @param [Object] justification Object to be assigned
167
- def justification=(justification)
168
- validator = EnumAttributeValidator.new('String', ["CenterGroup", "Default", "Center", "Left", "Right", "Inline"])
169
- if justification.to_i == 0
170
- unless validator.valid?(justification)
171
- raise ArgumentError, "invalid value for 'justification', must be one of #{validator.allowable_values}."
172
- end
173
- @justification = justification
174
- else
175
- @justification = validator.allowable_values[justification.to_i]
176
- end
177
- end
178
-
179
- # Custom attribute writer method checking allowed values (enum).
180
- # @param [Object] math_object_type Object to be assigned
181
- def math_object_type=(math_object_type)
182
- validator = EnumAttributeValidator.new('String', ["OMath", "OMathPara", "Accent", "Bar", "BorderBox", "Box", "Delimiter", "Degree", "Argument", "Array", "Fraction", "Denominator", "Numerator", "Function", "FunctionName", "GroupCharacter", "Limit", "LowerLimit", "UpperLimit", "Matrix", "MatrixRow", "NAry", "Phantom", "Radical", "SubscriptPart", "SuperscriptPart", "PreSubSuperscript", "Subscript", "SubSuperscript", "Supercript"])
183
- if math_object_type.to_i == 0
184
- unless validator.valid?(math_object_type)
185
- raise ArgumentError, "invalid value for 'math_object_type', must be one of #{validator.allowable_values}."
186
- end
187
- @math_object_type = math_object_type
188
- else
189
- @math_object_type = validator.allowable_values[math_object_type.to_i]
190
- end
191
- end
192
-
193
- # Checks equality by comparing each attribute.
194
- # @param [Object] Object to be compared
195
- def ==(other)
196
- return true if self.equal?(other)
197
- self.class == other.class &&
198
- link == other.link &&
199
- node_id == other.node_id &&
200
- content == other.content &&
201
- display_type == other.display_type &&
202
- justification == other.justification &&
203
- math_object_type == other.math_object_type
204
- end
205
-
206
- # @see the `==` method
207
- # @param [Object] Object to be compared
208
- def eql?(other)
209
- self == other
210
- end
211
-
212
- # Calculates hash code according to all attributes.
213
- # @return [Fixnum] Hash code
214
- def hash
215
- [link, node_id, content, display_type, justification, math_object_type].hash
216
- end
217
-
218
- # Builds the object from hash
219
- # @param [Hash] attributes Model attributes in the form of hash
220
- # @return [Object] Returns the model itself
221
- def build_from_hash(attributes)
222
- return nil unless attributes.is_a?(Hash)
223
- self.class.swagger_types.each_pair do |key, type|
224
- if type =~ /\AArray<(.*)>/i
225
- # check to ensure the input is an array given that the the attribute
226
- # is documented as an array but the input is not
227
- if attributes[self.class.attribute_map[key]].is_a?(Array)
228
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
229
- end
230
- elsif !attributes[self.class.attribute_map[key]].nil?
231
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
232
- end
233
- # or else data not found in attributes(hash), not an issue as the data can be optional
234
- end
235
-
236
- self
237
- end
238
-
239
- # Deserializes the data based on type
240
- # @param string type Data type
241
- # @param string value Value to be deserialized
242
- # @return [Object] Deserialized data
243
- def _deserialize(type, value)
244
- case type.to_sym
245
- when :DateTime
246
- Time.at(/\d/.match(value)[0].to_f).to_datetime
247
- when :Date
248
- Time.at(/\d/.match(value)[0].to_f).to_date
249
- when :String
250
- value.to_s
251
- when :Integer
252
- value.to_i
253
- when :Float
254
- value.to_f
255
- when :BOOLEAN
256
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
257
- true
258
- else
259
- false
260
- end
261
- when :Object
262
- # generic object (usually a Hash), return directly
263
- value
264
- when /\AArray<(?<inner_type>.+)>\z/
265
- inner_type = Regexp.last_match[:inner_type]
266
- value.map { |v| _deserialize(inner_type, v) }
267
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
268
- k_type = Regexp.last_match[:k_type]
269
- v_type = Regexp.last_match[:v_type]
270
- {}.tap do |hash|
271
- value.each do |k, v|
272
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
273
- end
274
- end
275
- else
276
- # model
277
- temp_model = AsposeWordsCloud.const_get(type).new
278
- temp_model.build_from_hash(value)
279
- end
280
- end
281
-
282
- # Returns the string representation of the object
283
- # @return [String] String presentation of the object
284
- def to_s
285
- to_hash.to_s
286
- end
287
-
288
- # to_body is an alias to to_hash (backward compatibility)
289
- # @return [Hash] Returns the object in the form of hash
290
- def to_body
291
- to_hash
292
- end
293
-
294
- # Returns the object in the form of hash
295
- # @return [Hash] Returns the object in the form of hash
296
- def to_hash
297
- hash = {}
298
- self.class.attribute_map.each_pair do |attr, param|
299
- value = self.send(attr)
300
- next if value.nil?
301
- hash[param] = _to_hash(value)
302
- end
303
- hash
304
- end
305
-
306
- # Outputs non-array value in the form of hash
307
- # For object, use to_hash. Otherwise, just return the value
308
- # @param [Object] value Any valid value
309
- # @return [Hash] Returns the value in the form of hash
310
- def _to_hash(value)
311
- if value.is_a?(Array)
312
- value.compact.map { |v| _to_hash(v) }
313
- elsif value.is_a?(Hash)
314
- {}.tap do |hash|
315
- value.each { |k, v| hash[k] = _to_hash(v) }
316
- end
317
- elsif value.respond_to? :to_hash
318
- value.to_hash
319
- else
320
- value
321
- end
322
- end
323
-
324
- end
325
-
326
- end
1
+
2
+ require 'date'
3
+
4
+ module AsposeWordsCloud
5
+ #
6
+ # --------------------------------------------------------------------------------------------------------------------
7
+ # <copyright company="Aspose" file="OfficeMathObject.rb">
8
+ # Copyright (c) 2019 Aspose.Words for Cloud
9
+ # </copyright>
10
+ # <summary>
11
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ # of this software and associated documentation files (the "Software"), to deal
13
+ # in the Software without restriction, including without limitation the rights
14
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ # copies of the Software, and to permit persons to whom the Software is
16
+ # furnished to do so, subject to the following conditions:
17
+ #
18
+ # The above copyright notice and this permission notice shall be included in all
19
+ # copies or substantial portions of the Software.
20
+ #
21
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
+ # SOFTWARE.
28
+ # </summary>
29
+ # --------------------------------------------------------------------------------------------------------------------
30
+ #
31
+
32
+ # OfficeMath object.
33
+ class OfficeMathObject
34
+ attr_accessor :link
35
+
36
+ # Gets or sets node id.
37
+ attr_accessor :node_id
38
+
39
+ attr_accessor :content
40
+
41
+ # Gets or sets /sets Office Math display format type which represents whether an equation is displayed inline with the text or displayed on its own line.
42
+ attr_accessor :display_type
43
+
44
+ # Gets or sets /sets Office Math justification.
45
+ attr_accessor :justification
46
+
47
+ # Gets or sets type Aspose.Words.Math.OfficeMath.MathObjectType of this Office Math object.
48
+ attr_accessor :math_object_type
49
+
50
+ class EnumAttributeValidator
51
+ attr_reader :datatype
52
+ attr_reader :allowable_values
53
+
54
+ def initialize(datatype, allowable_values)
55
+ @allowable_values = allowable_values.map do |value|
56
+ case datatype.to_s
57
+ when /Integer/i
58
+ value.to_i
59
+ when /Float/i
60
+ value.to_f
61
+ else
62
+ value
63
+ end
64
+ end
65
+ end
66
+
67
+ def valid?(value)
68
+ !value || allowable_values.include?(value)
69
+ end
70
+ end
71
+
72
+ # Attribute mapping from ruby-style variable name to JSON key.
73
+ def self.attribute_map
74
+ {
75
+ :'link' => :'link',
76
+ :'node_id' => :'NodeId',
77
+ :'content' => :'Content',
78
+ :'display_type' => :'DisplayType',
79
+ :'justification' => :'Justification',
80
+ :'math_object_type' => :'MathObjectType'
81
+ }
82
+ end
83
+
84
+ # Attribute type mapping.
85
+ def self.swagger_types
86
+ {
87
+ :'link' => :'WordsApiLink',
88
+ :'node_id' => :'String',
89
+ :'content' => :'StoryChildNodes',
90
+ :'display_type' => :'String',
91
+ :'justification' => :'String',
92
+ :'math_object_type' => :'String'
93
+ }
94
+ end
95
+
96
+ # Initializes the object
97
+ # @param [Hash] attributes Model attributes in the form of hash
98
+ def initialize(attributes = {})
99
+ return unless attributes.is_a?(Hash)
100
+
101
+ # convert string to symbol for hash key
102
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
103
+
104
+ if attributes.key?(:'link')
105
+ self.link = attributes[:'link']
106
+ end
107
+
108
+ if attributes.key?(:'NodeId')
109
+ self.node_id = attributes[:'NodeId']
110
+ end
111
+
112
+ if attributes.key?(:'Content')
113
+ self.content = attributes[:'Content']
114
+ end
115
+
116
+ if attributes.key?(:'DisplayType')
117
+ self.display_type = attributes[:'DisplayType']
118
+ end
119
+
120
+ if attributes.key?(:'Justification')
121
+ self.justification = attributes[:'Justification']
122
+ end
123
+
124
+ if attributes.key?(:'MathObjectType')
125
+ self.math_object_type = attributes[:'MathObjectType']
126
+ end
127
+
128
+ end
129
+
130
+ # Show invalid properties with the reasons. Usually used together with valid?
131
+ # @return Array for valid properies with the reasons
132
+ def list_invalid_properties
133
+ invalid_properties = []
134
+ return invalid_properties
135
+ end
136
+
137
+ # Check to see if the all the properties in the model are valid
138
+ # @return true if the model is valid
139
+ def valid?
140
+ display_type_validator = EnumAttributeValidator.new('String', ["Display", "Inline"])
141
+ return false unless display_type_validator.valid?(@display_type)
142
+ justification_validator = EnumAttributeValidator.new('String', ["CenterGroup", "Default", "Center", "Left", "Right", "Inline"])
143
+ return false unless justification_validator.valid?(@justification)
144
+ math_object_type_validator = EnumAttributeValidator.new('String', ["OMath", "OMathPara", "Accent", "Bar", "BorderBox", "Box", "Delimiter", "Degree", "Argument", "Array", "Fraction", "Denominator", "Numerator", "Function", "FunctionName", "GroupCharacter", "Limit", "LowerLimit", "UpperLimit", "Matrix", "MatrixRow", "NAry", "Phantom", "Radical", "SubscriptPart", "SuperscriptPart", "PreSubSuperscript", "Subscript", "SubSuperscript", "Supercript"])
145
+ return false unless math_object_type_validator.valid?(@math_object_type)
146
+ return true
147
+ end
148
+
149
+ # Custom attribute writer method checking allowed values (enum).
150
+ # @param [Object] display_type Object to be assigned
151
+ def display_type=(display_type)
152
+ validator = EnumAttributeValidator.new('String', ["Display", "Inline"])
153
+ if display_type.to_i == 0
154
+ unless validator.valid?(display_type)
155
+ raise ArgumentError, "invalid value for 'display_type', must be one of #{validator.allowable_values}."
156
+ end
157
+ @display_type = display_type
158
+ else
159
+ @display_type = validator.allowable_values[display_type.to_i]
160
+ end
161
+ end
162
+
163
+ # Custom attribute writer method checking allowed values (enum).
164
+ # @param [Object] justification Object to be assigned
165
+ def justification=(justification)
166
+ validator = EnumAttributeValidator.new('String', ["CenterGroup", "Default", "Center", "Left", "Right", "Inline"])
167
+ if justification.to_i == 0
168
+ unless validator.valid?(justification)
169
+ raise ArgumentError, "invalid value for 'justification', must be one of #{validator.allowable_values}."
170
+ end
171
+ @justification = justification
172
+ else
173
+ @justification = validator.allowable_values[justification.to_i]
174
+ end
175
+ end
176
+
177
+ # Custom attribute writer method checking allowed values (enum).
178
+ # @param [Object] math_object_type Object to be assigned
179
+ def math_object_type=(math_object_type)
180
+ validator = EnumAttributeValidator.new('String', ["OMath", "OMathPara", "Accent", "Bar", "BorderBox", "Box", "Delimiter", "Degree", "Argument", "Array", "Fraction", "Denominator", "Numerator", "Function", "FunctionName", "GroupCharacter", "Limit", "LowerLimit", "UpperLimit", "Matrix", "MatrixRow", "NAry", "Phantom", "Radical", "SubscriptPart", "SuperscriptPart", "PreSubSuperscript", "Subscript", "SubSuperscript", "Supercript"])
181
+ if math_object_type.to_i == 0
182
+ unless validator.valid?(math_object_type)
183
+ raise ArgumentError, "invalid value for 'math_object_type', must be one of #{validator.allowable_values}."
184
+ end
185
+ @math_object_type = math_object_type
186
+ else
187
+ @math_object_type = validator.allowable_values[math_object_type.to_i]
188
+ end
189
+ end
190
+
191
+ # Checks equality by comparing each attribute.
192
+ # @param [Object] Object to be compared
193
+ def ==(other)
194
+ return true if self.equal?(other)
195
+ self.class == other.class &&
196
+ link == other.link &&
197
+ node_id == other.node_id &&
198
+ content == other.content &&
199
+ display_type == other.display_type &&
200
+ justification == other.justification &&
201
+ math_object_type == other.math_object_type
202
+ end
203
+
204
+ # @see the `==` method
205
+ # @param [Object] Object to be compared
206
+ def eql?(other)
207
+ self == other
208
+ end
209
+
210
+ # Calculates hash code according to all attributes.
211
+ # @return [Fixnum] Hash code
212
+ def hash
213
+ [link, node_id, content, display_type, justification, math_object_type].hash
214
+ end
215
+
216
+ # Builds the object from hash
217
+ # @param [Hash] attributes Model attributes in the form of hash
218
+ # @return [Object] Returns the model itself
219
+ def build_from_hash(attributes)
220
+ return nil unless attributes.is_a?(Hash)
221
+ self.class.swagger_types.each_pair do |key, type|
222
+ if type =~ /\AArray<(.*)>/i
223
+ # check to ensure the input is an array given that the the attribute
224
+ # is documented as an array but the input is not
225
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
226
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
227
+ end
228
+ elsif !attributes[self.class.attribute_map[key]].nil?
229
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
230
+ end
231
+ # or else data not found in attributes(hash), not an issue as the data can be optional
232
+ end
233
+
234
+ self
235
+ end
236
+
237
+ # Deserializes the data based on type
238
+ # @param string type Data type
239
+ # @param string value Value to be deserialized
240
+ # @return [Object] Deserialized data
241
+ def _deserialize(type, value)
242
+ case type.to_sym
243
+ when :DateTime
244
+ Time.at(/\d/.match(value)[0].to_f).to_datetime
245
+ when :Date
246
+ Time.at(/\d/.match(value)[0].to_f).to_date
247
+ when :String
248
+ value.to_s
249
+ when :Integer
250
+ value.to_i
251
+ when :Float
252
+ value.to_f
253
+ when :BOOLEAN
254
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
255
+ true
256
+ else
257
+ false
258
+ end
259
+ when :Object
260
+ # generic object (usually a Hash), return directly
261
+ value
262
+ when /\AArray<(?<inner_type>.+)>\z/
263
+ inner_type = Regexp.last_match[:inner_type]
264
+ value.map { |v| _deserialize(inner_type, v) }
265
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
266
+ k_type = Regexp.last_match[:k_type]
267
+ v_type = Regexp.last_match[:v_type]
268
+ {}.tap do |hash|
269
+ value.each do |k, v|
270
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
271
+ end
272
+ end
273
+ else
274
+ # model
275
+ temp_model = AsposeWordsCloud.const_get(type).new
276
+ temp_model.build_from_hash(value)
277
+ end
278
+ end
279
+
280
+ # Returns the string representation of the object
281
+ # @return [String] String presentation of the object
282
+ def to_s
283
+ to_hash.to_s
284
+ end
285
+
286
+ # to_body is an alias to to_hash (backward compatibility)
287
+ # @return [Hash] Returns the object in the form of hash
288
+ def to_body
289
+ to_hash
290
+ end
291
+
292
+ # Returns the object in the form of hash
293
+ # @return [Hash] Returns the object in the form of hash
294
+ def to_hash
295
+ hash = {}
296
+ self.class.attribute_map.each_pair do |attr, param|
297
+ value = self.send(attr)
298
+ next if value.nil?
299
+ hash[param] = _to_hash(value)
300
+ end
301
+ hash
302
+ end
303
+
304
+ # Outputs non-array value in the form of hash
305
+ # For object, use to_hash. Otherwise, just return the value
306
+ # @param [Object] value Any valid value
307
+ # @return [Hash] Returns the value in the form of hash
308
+ def _to_hash(value)
309
+ if value.is_a?(Array)
310
+ value.compact.map { |v| _to_hash(v) }
311
+ elsif value.is_a?(Hash)
312
+ {}.tap do |hash|
313
+ value.each { |k, v| hash[k] = _to_hash(v) }
314
+ end
315
+ elsif value.respond_to? :to_hash
316
+ value.to_hash
317
+ else
318
+ value
319
+ end
320
+ end
321
+
322
+ end
323
+
324
+ end