aspose_slides_cloud 22.1.0 → 22.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (245) hide show
  1. checksums.yaml +4 -4
  2. data/Dockerfile +16 -0
  3. data/README.md +14 -3
  4. data/TestData/test.pptx +0 -0
  5. data/aspose_slides_cloud.gemspec +3 -1
  6. data/docker-entrypoint.sh +7 -0
  7. data/lib/aspose_slides_cloud/api/slides_api.rb +946 -654
  8. data/lib/aspose_slides_cloud/api_client.rb +11 -0
  9. data/lib/aspose_slides_cloud/models/accent_element.rb +4 -0
  10. data/lib/aspose_slides_cloud/models/add_layout_slide.rb +4 -0
  11. data/lib/aspose_slides_cloud/models/add_master_slide.rb +4 -0
  12. data/lib/aspose_slides_cloud/models/add_shape.rb +4 -0
  13. data/lib/aspose_slides_cloud/models/add_slide.rb +4 -0
  14. data/lib/aspose_slides_cloud/models/api_info.rb +4 -0
  15. data/lib/aspose_slides_cloud/models/arc_to_path_segment.rb +4 -0
  16. data/lib/aspose_slides_cloud/models/array_element.rb +4 -0
  17. data/lib/aspose_slides_cloud/models/arrow_head_properties.rb +4 -0
  18. data/lib/aspose_slides_cloud/models/audio_frame.rb +4 -0
  19. data/lib/aspose_slides_cloud/models/axes.rb +4 -0
  20. data/lib/aspose_slides_cloud/models/axis.rb +10 -6
  21. data/lib/aspose_slides_cloud/models/bar_element.rb +4 -0
  22. data/lib/aspose_slides_cloud/models/base64_input_file.rb +4 -0
  23. data/lib/aspose_slides_cloud/models/block_element.rb +4 -0
  24. data/lib/aspose_slides_cloud/models/blur_effect.rb +4 -0
  25. data/lib/aspose_slides_cloud/models/border_box_element.rb +4 -0
  26. data/lib/aspose_slides_cloud/models/box_and_whisker_series.rb +6 -5
  27. data/lib/aspose_slides_cloud/models/box_element.rb +4 -0
  28. data/lib/aspose_slides_cloud/models/bubble_chart_data_point.rb +4 -0
  29. data/lib/aspose_slides_cloud/models/bubble_series.rb +19 -7
  30. data/lib/aspose_slides_cloud/models/camera.rb +4 -0
  31. data/lib/aspose_slides_cloud/models/chart.rb +4 -0
  32. data/lib/aspose_slides_cloud/models/chart_category.rb +4 -0
  33. data/lib/aspose_slides_cloud/models/chart_title.rb +4 -0
  34. data/lib/aspose_slides_cloud/models/chart_wall.rb +4 -0
  35. data/lib/aspose_slides_cloud/models/close_path_segment.rb +4 -0
  36. data/lib/aspose_slides_cloud/models/color_scheme.rb +4 -0
  37. data/lib/aspose_slides_cloud/models/common_slide_view_properties.rb +4 -0
  38. data/lib/aspose_slides_cloud/models/connector.rb +4 -0
  39. data/lib/aspose_slides_cloud/models/cubic_bezier_to_path_segment.rb +4 -0
  40. data/lib/aspose_slides_cloud/models/custom_dash_pattern.rb +4 -0
  41. data/lib/aspose_slides_cloud/models/data_point.rb +4 -0
  42. data/lib/aspose_slides_cloud/models/delimiter_element.rb +4 -0
  43. data/lib/aspose_slides_cloud/models/disc_usage.rb +4 -0
  44. data/lib/aspose_slides_cloud/models/document.rb +4 -0
  45. data/lib/aspose_slides_cloud/models/document_properties.rb +4 -0
  46. data/lib/aspose_slides_cloud/models/document_property.rb +4 -0
  47. data/lib/aspose_slides_cloud/models/document_replace_result.rb +4 -0
  48. data/lib/aspose_slides_cloud/models/effect.rb +4 -0
  49. data/lib/aspose_slides_cloud/models/effect_format.rb +4 -0
  50. data/lib/aspose_slides_cloud/models/entity_exists.rb +4 -0
  51. data/lib/aspose_slides_cloud/models/error.rb +4 -0
  52. data/lib/aspose_slides_cloud/models/error_details.rb +4 -0
  53. data/lib/aspose_slides_cloud/models/export_format.rb +1 -0
  54. data/lib/aspose_slides_cloud/models/export_options.rb +4 -0
  55. data/lib/aspose_slides_cloud/models/file_version.rb +4 -0
  56. data/lib/aspose_slides_cloud/models/file_versions.rb +4 -0
  57. data/lib/aspose_slides_cloud/models/files_list.rb +4 -0
  58. data/lib/aspose_slides_cloud/models/files_upload_result.rb +4 -0
  59. data/lib/aspose_slides_cloud/models/fill_format.rb +4 -0
  60. data/lib/aspose_slides_cloud/models/fill_overlay_effect.rb +4 -0
  61. data/lib/aspose_slides_cloud/models/font_scheme.rb +4 -0
  62. data/lib/aspose_slides_cloud/models/font_set.rb +4 -0
  63. data/lib/aspose_slides_cloud/models/format_scheme.rb +4 -0
  64. data/lib/aspose_slides_cloud/models/fraction_element.rb +4 -0
  65. data/lib/aspose_slides_cloud/models/function_element.rb +4 -0
  66. data/lib/aspose_slides_cloud/models/geometry_path.rb +4 -0
  67. data/lib/aspose_slides_cloud/models/geometry_paths.rb +4 -0
  68. data/lib/aspose_slides_cloud/models/geometry_shape.rb +4 -0
  69. data/lib/aspose_slides_cloud/models/gif_export_options.rb +4 -0
  70. data/lib/aspose_slides_cloud/models/glow_effect.rb +4 -0
  71. data/lib/aspose_slides_cloud/models/gradient_fill.rb +4 -0
  72. data/lib/aspose_slides_cloud/models/gradient_fill_stop.rb +4 -0
  73. data/lib/aspose_slides_cloud/models/graphical_object.rb +4 -0
  74. data/lib/aspose_slides_cloud/models/group_shape.rb +4 -0
  75. data/lib/aspose_slides_cloud/models/grouping_character_element.rb +4 -0
  76. data/lib/aspose_slides_cloud/models/header_footer.rb +4 -0
  77. data/lib/aspose_slides_cloud/models/html5_export_options.rb +4 -0
  78. data/lib/aspose_slides_cloud/models/html_export_options.rb +4 -0
  79. data/lib/aspose_slides_cloud/models/hyperlink.rb +4 -0
  80. data/lib/aspose_slides_cloud/models/i_shape_export_options.rb +4 -0
  81. data/lib/aspose_slides_cloud/models/image.rb +4 -0
  82. data/lib/aspose_slides_cloud/models/image_export_options.rb +4 -0
  83. data/lib/aspose_slides_cloud/models/images.rb +4 -0
  84. data/lib/aspose_slides_cloud/models/inner_shadow_effect.rb +4 -0
  85. data/lib/aspose_slides_cloud/models/input.rb +4 -0
  86. data/lib/aspose_slides_cloud/models/input_file.rb +4 -0
  87. data/lib/aspose_slides_cloud/models/interactive_sequence.rb +4 -0
  88. data/lib/aspose_slides_cloud/models/layout_slide.rb +4 -0
  89. data/lib/aspose_slides_cloud/models/layout_slides.rb +4 -0
  90. data/lib/aspose_slides_cloud/models/left_sub_superscript_element.rb +4 -0
  91. data/lib/aspose_slides_cloud/models/legend.rb +4 -0
  92. data/lib/aspose_slides_cloud/models/light_rig.rb +4 -0
  93. data/lib/aspose_slides_cloud/models/limit_element.rb +4 -0
  94. data/lib/aspose_slides_cloud/models/line_format.rb +4 -0
  95. data/lib/aspose_slides_cloud/models/line_to_path_segment.rb +4 -0
  96. data/lib/aspose_slides_cloud/models/master_slide.rb +4 -0
  97. data/lib/aspose_slides_cloud/models/master_slides.rb +4 -0
  98. data/lib/aspose_slides_cloud/models/math_element.rb +4 -0
  99. data/lib/aspose_slides_cloud/models/math_paragraph.rb +4 -0
  100. data/lib/aspose_slides_cloud/models/matrix_element.rb +4 -0
  101. data/lib/aspose_slides_cloud/models/merge.rb +4 -0
  102. data/lib/aspose_slides_cloud/models/merging_source.rb +4 -0
  103. data/lib/aspose_slides_cloud/models/move_to_path_segment.rb +4 -0
  104. data/lib/aspose_slides_cloud/models/nary_operator_element.rb +4 -0
  105. data/lib/aspose_slides_cloud/models/no_fill.rb +4 -0
  106. data/lib/aspose_slides_cloud/models/normal_view_restored_properties.rb +4 -0
  107. data/lib/aspose_slides_cloud/models/notes_slide.rb +4 -0
  108. data/lib/aspose_slides_cloud/models/notes_slide_header_footer.rb +4 -0
  109. data/lib/aspose_slides_cloud/models/object_exist.rb +4 -0
  110. data/lib/aspose_slides_cloud/models/ole_object_frame.rb +4 -0
  111. data/lib/aspose_slides_cloud/models/one_value_chart_data_point.rb +4 -0
  112. data/lib/aspose_slides_cloud/models/one_value_series.rb +16 -6
  113. data/lib/aspose_slides_cloud/models/ordered_merge_request.rb +4 -0
  114. data/lib/aspose_slides_cloud/models/outer_shadow_effect.rb +4 -0
  115. data/lib/aspose_slides_cloud/models/output_file.rb +4 -0
  116. data/lib/aspose_slides_cloud/models/paragraph.rb +4 -0
  117. data/lib/aspose_slides_cloud/models/paragraphs.rb +4 -0
  118. data/lib/aspose_slides_cloud/models/path_input_file.rb +4 -0
  119. data/lib/aspose_slides_cloud/models/path_output_file.rb +4 -0
  120. data/lib/aspose_slides_cloud/models/path_segment.rb +4 -0
  121. data/lib/aspose_slides_cloud/models/pattern_fill.rb +4 -0
  122. data/lib/aspose_slides_cloud/models/pdf_export_options.rb +4 -0
  123. data/lib/aspose_slides_cloud/models/picture_fill.rb +4 -0
  124. data/lib/aspose_slides_cloud/models/picture_frame.rb +4 -0
  125. data/lib/aspose_slides_cloud/models/pipeline.rb +4 -0
  126. data/lib/aspose_slides_cloud/models/placeholder.rb +4 -0
  127. data/lib/aspose_slides_cloud/models/placeholders.rb +4 -0
  128. data/lib/aspose_slides_cloud/models/plot_area.rb +4 -0
  129. data/lib/aspose_slides_cloud/models/portion.rb +4 -0
  130. data/lib/aspose_slides_cloud/models/portions.rb +4 -0
  131. data/lib/aspose_slides_cloud/models/pptx_export_options.rb +4 -0
  132. data/lib/aspose_slides_cloud/models/presentation_to_merge.rb +4 -0
  133. data/lib/aspose_slides_cloud/models/presentations_merge_request.rb +4 -0
  134. data/lib/aspose_slides_cloud/models/preset_shadow_effect.rb +4 -0
  135. data/lib/aspose_slides_cloud/models/protection_properties.rb +4 -0
  136. data/lib/aspose_slides_cloud/models/quadratic_bezier_to_path_segment.rb +4 -0
  137. data/lib/aspose_slides_cloud/models/radical_element.rb +4 -0
  138. data/lib/aspose_slides_cloud/models/reflection_effect.rb +4 -0
  139. data/lib/aspose_slides_cloud/models/remove_shape.rb +4 -0
  140. data/lib/aspose_slides_cloud/models/remove_slide.rb +4 -0
  141. data/lib/aspose_slides_cloud/models/reorder_slide.rb +4 -0
  142. data/lib/aspose_slides_cloud/models/replace_text.rb +4 -0
  143. data/lib/aspose_slides_cloud/models/request_input_file.rb +4 -0
  144. data/lib/aspose_slides_cloud/models/reset_slide.rb +4 -0
  145. data/lib/aspose_slides_cloud/models/resource_base.rb +4 -0
  146. data/lib/aspose_slides_cloud/models/resource_uri.rb +4 -0
  147. data/lib/aspose_slides_cloud/models/response_output_file.rb +4 -0
  148. data/lib/aspose_slides_cloud/models/right_sub_superscript_element.rb +4 -0
  149. data/lib/aspose_slides_cloud/models/save.rb +6 -2
  150. data/lib/aspose_slides_cloud/models/save_shape.rb +4 -0
  151. data/lib/aspose_slides_cloud/models/save_slide.rb +4 -0
  152. data/lib/aspose_slides_cloud/models/scatter_chart_data_point.rb +4 -0
  153. data/lib/aspose_slides_cloud/models/scatter_series.rb +8 -6
  154. data/lib/aspose_slides_cloud/models/section.rb +4 -0
  155. data/lib/aspose_slides_cloud/models/section_zoom_frame.rb +256 -0
  156. data/lib/aspose_slides_cloud/models/sections.rb +4 -0
  157. data/lib/aspose_slides_cloud/models/series.rb +5 -41
  158. data/lib/aspose_slides_cloud/models/series_marker.rb +4 -0
  159. data/lib/aspose_slides_cloud/models/shape.rb +16 -2
  160. data/lib/aspose_slides_cloud/models/shape_base.rb +6 -2
  161. data/lib/aspose_slides_cloud/models/shape_bevel.rb +4 -0
  162. data/lib/aspose_slides_cloud/models/shape_image_export_options.rb +4 -0
  163. data/lib/aspose_slides_cloud/models/shapes.rb +4 -0
  164. data/lib/aspose_slides_cloud/models/slide.rb +4 -0
  165. data/lib/aspose_slides_cloud/models/slide_animation.rb +4 -0
  166. data/lib/aspose_slides_cloud/models/slide_background.rb +4 -0
  167. data/lib/aspose_slides_cloud/models/slide_comment.rb +4 -0
  168. data/lib/aspose_slides_cloud/models/slide_comments.rb +4 -0
  169. data/lib/aspose_slides_cloud/models/slide_properties.rb +4 -0
  170. data/lib/aspose_slides_cloud/models/slide_replace_result.rb +4 -0
  171. data/lib/aspose_slides_cloud/models/slides.rb +4 -0
  172. data/lib/aspose_slides_cloud/models/smart_art.rb +4 -0
  173. data/lib/aspose_slides_cloud/models/smart_art_node.rb +4 -0
  174. data/lib/aspose_slides_cloud/models/smart_art_shape.rb +4 -0
  175. data/lib/aspose_slides_cloud/models/soft_edge_effect.rb +4 -0
  176. data/lib/aspose_slides_cloud/models/solid_fill.rb +4 -0
  177. data/lib/aspose_slides_cloud/models/split_document_result.rb +4 -0
  178. data/lib/aspose_slides_cloud/models/storage_exist.rb +4 -0
  179. data/lib/aspose_slides_cloud/models/storage_file.rb +4 -0
  180. data/lib/aspose_slides_cloud/models/subscript_element.rb +4 -0
  181. data/lib/aspose_slides_cloud/models/summary_zoom_frame.rb +275 -0
  182. data/lib/aspose_slides_cloud/models/summary_zoom_section.rb +267 -0
  183. data/lib/aspose_slides_cloud/models/superscript_element.rb +4 -0
  184. data/lib/aspose_slides_cloud/models/svg_export_options.rb +4 -0
  185. data/lib/aspose_slides_cloud/models/swf_export_options.rb +4 -0
  186. data/lib/aspose_slides_cloud/models/table.rb +4 -0
  187. data/lib/aspose_slides_cloud/models/table_cell.rb +4 -0
  188. data/lib/aspose_slides_cloud/models/table_column.rb +4 -0
  189. data/lib/aspose_slides_cloud/models/table_row.rb +4 -0
  190. data/lib/aspose_slides_cloud/models/task.rb +4 -0
  191. data/lib/aspose_slides_cloud/models/text_element.rb +4 -0
  192. data/lib/aspose_slides_cloud/models/text_frame_format.rb +255 -0
  193. data/lib/aspose_slides_cloud/models/text_item.rb +4 -0
  194. data/lib/aspose_slides_cloud/models/text_items.rb +4 -0
  195. data/lib/aspose_slides_cloud/models/theme.rb +4 -0
  196. data/lib/aspose_slides_cloud/models/three_d_format.rb +4 -0
  197. data/lib/aspose_slides_cloud/models/tiff_export_options.rb +4 -0
  198. data/lib/aspose_slides_cloud/models/update_background.rb +4 -0
  199. data/lib/aspose_slides_cloud/models/update_shape.rb +4 -0
  200. data/lib/aspose_slides_cloud/models/video_export_options.rb +258 -0
  201. data/lib/aspose_slides_cloud/models/video_frame.rb +4 -0
  202. data/lib/aspose_slides_cloud/models/view_properties.rb +4 -0
  203. data/lib/aspose_slides_cloud/models/waterfall_chart_data_point.rb +4 -0
  204. data/lib/aspose_slides_cloud/models/waterfall_series.rb +6 -5
  205. data/lib/aspose_slides_cloud/models/xaml_export_options.rb +4 -0
  206. data/lib/aspose_slides_cloud/models/xps_export_options.rb +4 -0
  207. data/lib/aspose_slides_cloud/models/xy_series.rb +255 -0
  208. data/lib/aspose_slides_cloud/models/zoom_frame.rb +256 -0
  209. data/lib/aspose_slides_cloud/models/zoom_object.rb +301 -0
  210. data/lib/aspose_slides_cloud/type_registry.rb +23 -5
  211. data/lib/aspose_slides_cloud/version.rb +1 -1
  212. data/lib/aspose_slides_cloud.rb +10 -2
  213. data/spec/api/slides_api_spec.rb +822 -0
  214. data/spec/use_cases/abstract_class_spec.rb +38 -0
  215. data/spec/use_cases/animation_spec.rb +193 -0
  216. data/spec/use_cases/auth_spec.rb +91 -0
  217. data/spec/use_cases/chart_spec.rb +291 -0
  218. data/spec/use_cases/convert_spec.rb +154 -0
  219. data/spec/use_cases/create_spec.rb +101 -0
  220. data/spec/use_cases/header_footer_spec.rb +78 -0
  221. data/spec/use_cases/hyperlink_spec.rb +92 -0
  222. data/spec/use_cases/image_spec.rb +102 -0
  223. data/spec/use_cases/layout_slide_spec.rb +190 -0
  224. data/spec/use_cases/master_slide_spec.rb +190 -0
  225. data/spec/use_cases/math_spec.rb +163 -0
  226. data/spec/use_cases/merge_spec.rb +106 -0
  227. data/spec/use_cases/notes_slide_spec.rb +172 -0
  228. data/spec/use_cases/nullable_field_spec.rb +86 -0
  229. data/spec/use_cases/pipeline_spec.rb +61 -0
  230. data/spec/use_cases/property_spec.rb +177 -0
  231. data/spec/use_cases/section_spec.rb +104 -0
  232. data/spec/use_cases/shape_format_spec.rb +126 -0
  233. data/spec/use_cases/shape_spec.rb +399 -0
  234. data/spec/use_cases/split_spec.rb +88 -0
  235. data/spec/use_cases/text_spec.rb +74 -0
  236. data/spec/use_cases/timeout_spec.rb +44 -0
  237. data/spec/use_cases/watermark_spec.rb +158 -0
  238. data/testRules.json +3 -0
  239. metadata +105 -15
  240. data/TestData/ChartTest.pptx +0 -0
  241. data/TestData/Sections.pptx +0 -0
  242. data/TestData/placeholders.pptx +0 -0
  243. data/TestData/test-unprotected.ppt +0 -0
  244. data/TestData/test.ppt +0 -0
  245. data/spec/extra/extra_spec.rb +0 -203
@@ -159,6 +159,10 @@ module AsposeSlidesCloud
159
159
  end
160
160
  end
161
161
  else # model
162
+ registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
163
+ if registry_type
164
+ type = registry_type
165
+ end
162
166
  temp_model = AsposeSlidesCloud.const_get(type).new
163
167
  temp_model.build_from_hash(value)
164
168
  end
@@ -295,6 +295,10 @@ module AsposeSlidesCloud
295
295
  end
296
296
  end
297
297
  else # model
298
+ registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
299
+ if registry_type
300
+ type = registry_type
301
+ end
298
302
  temp_model = AsposeSlidesCloud.const_get(type).new
299
303
  temp_model.build_from_hash(value)
300
304
  end
@@ -243,6 +243,10 @@ module AsposeSlidesCloud
243
243
  end
244
244
  end
245
245
  else # model
246
+ registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
247
+ if registry_type
248
+ type = registry_type
249
+ end
246
250
  temp_model = AsposeSlidesCloud.const_get(type).new
247
251
  temp_model.build_from_hash(value)
248
252
  end
@@ -188,6 +188,10 @@ module AsposeSlidesCloud
188
188
  end
189
189
  end
190
190
  else # model
191
+ registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
192
+ if registry_type
193
+ type = registry_type
194
+ end
191
195
  temp_model = AsposeSlidesCloud.const_get(type).new
192
196
  temp_model.build_from_hash(value)
193
197
  end
@@ -162,6 +162,10 @@ module AsposeSlidesCloud
162
162
  end
163
163
  end
164
164
  else # model
165
+ registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
166
+ if registry_type
167
+ type = registry_type
168
+ end
165
169
  temp_model = AsposeSlidesCloud.const_get(type).new
166
170
  temp_model.build_from_hash(value)
167
171
  end
@@ -179,6 +179,10 @@ module AsposeSlidesCloud
179
179
  end
180
180
  end
181
181
  else # model
182
+ registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
183
+ if registry_type
184
+ type = registry_type
185
+ end
182
186
  temp_model = AsposeSlidesCloud.const_get(type).new
183
187
  temp_model.build_from_hash(value)
184
188
  end
@@ -159,6 +159,10 @@ module AsposeSlidesCloud
159
159
  end
160
160
  end
161
161
  else # model
162
+ registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
163
+ if registry_type
164
+ type = registry_type
165
+ end
162
166
  temp_model = AsposeSlidesCloud.const_get(type).new
163
167
  temp_model.build_from_hash(value)
164
168
  end
@@ -162,6 +162,10 @@ module AsposeSlidesCloud
162
162
  end
163
163
  end
164
164
  else # model
165
+ registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
166
+ if registry_type
167
+ type = registry_type
168
+ end
165
169
  temp_model = AsposeSlidesCloud.const_get(type).new
166
170
  temp_model.build_from_hash(value)
167
171
  end
@@ -207,6 +207,10 @@ module AsposeSlidesCloud
207
207
  end
208
208
  end
209
209
  else # model
210
+ registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
211
+ if registry_type
212
+ type = registry_type
213
+ end
210
214
  temp_model = AsposeSlidesCloud.const_get(type).new
211
215
  temp_model.build_from_hash(value)
212
216
  end
@@ -189,6 +189,10 @@ module AsposeSlidesCloud
189
189
  end
190
190
  end
191
191
  else # model
192
+ registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
193
+ if registry_type
194
+ type = registry_type
195
+ end
192
196
  temp_model = AsposeSlidesCloud.const_get(type).new
193
197
  temp_model.build_from_hash(value)
194
198
  end
@@ -0,0 +1,275 @@
1
+ =begin
2
+ Copyright (c) 2019 Aspose Pty Ltd
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ SOFTWARE.
21
+ =end
22
+
23
+ require 'date'
24
+
25
+ module AsposeSlidesCloud
26
+ # Summary zoom frame.
27
+ class SummaryZoomFrame < ShapeBase
28
+ # Zoom layout type
29
+ attr_accessor :zoom_layout
30
+
31
+ # Zoom frame sections
32
+ attr_accessor :sections
33
+
34
+ class EnumAttributeValidator
35
+ attr_reader :datatype
36
+ attr_reader :allowable_values
37
+
38
+ def initialize(datatype, allowable_values)
39
+ @allowable_values = allowable_values.map do |value|
40
+ case datatype.to_s
41
+ when /Integer/i
42
+ value.to_i
43
+ when /Float/i
44
+ value.to_f
45
+ else
46
+ value
47
+ end
48
+ end
49
+ end
50
+
51
+ def valid?(value)
52
+ !value || allowable_values.any?{ |s| s.casecmp(value) == 0 }
53
+ end
54
+ end
55
+
56
+ # Attribute mapping from ruby-style variable name to JSON key.
57
+ def self.attribute_map
58
+ super.merge({
59
+ :'zoom_layout' => :'ZoomLayout',
60
+ :'sections' => :'Sections',
61
+ })
62
+ end
63
+
64
+ # Attribute type mapping.
65
+ def self.swagger_types
66
+ super.merge({
67
+ :'zoom_layout' => :'String',
68
+ :'sections' => :'Array<SummaryZoomSection>',
69
+ })
70
+ end
71
+
72
+ # Initializes the object
73
+ # @param [Hash] attributes Model attributes in the form of hash
74
+ def initialize(attributes = {})
75
+ super
76
+
77
+ if attributes.has_key?(:'ZoomLayout')
78
+ self.zoom_layout = attributes[:'ZoomLayout']
79
+ end
80
+
81
+ if attributes.has_key?(:'Sections')
82
+ if (value = attributes[:'Sections']).is_a?(Array)
83
+ self.sections = value
84
+ end
85
+ end
86
+ self.type = "SummaryZoomFrame"
87
+ end
88
+
89
+ # Show invalid properties with the reasons. Usually used together with valid?
90
+ # @return Array for valid properties with the reasons
91
+ def list_invalid_properties
92
+ invalid_properties = super
93
+ invalid_properties
94
+ end
95
+
96
+ # Check to see if the all the properties in the model are valid
97
+ # @return true if the model is valid
98
+ def valid?
99
+ return false if !super
100
+ zoom_layout_validator = EnumAttributeValidator.new('String', ['GridLayout', 'FixedLayout'])
101
+ return false unless zoom_layout_validator.valid?(@zoom_layout)
102
+ true
103
+ end
104
+
105
+ # Custom attribute writer method checking allowed values (enum).
106
+ # @param [Object] zoom_layout Object to be assigned
107
+ def zoom_layout=(zoom_layout)
108
+ validator = EnumAttributeValidator.new('String', ['GridLayout', 'FixedLayout'])
109
+ unless validator.valid?(zoom_layout)
110
+ fail ArgumentError, 'invalid value for "zoom_layout", must be one of #{validator.allowable_values}.'
111
+ end
112
+ @zoom_layout = zoom_layout
113
+ end
114
+
115
+ # Checks equality by comparing each attribute.
116
+ # @param [Object] Object to be compared
117
+ def ==(o)
118
+ return true if self.equal?(o)
119
+ self.class == o.class &&
120
+ self_uri == o.self_uri &&
121
+ alternate_links == o.alternate_links &&
122
+ name == o.name &&
123
+ width == o.width &&
124
+ height == o.height &&
125
+ alternative_text == o.alternative_text &&
126
+ alternative_text_title == o.alternative_text_title &&
127
+ hidden == o.hidden &&
128
+ x == o.x &&
129
+ y == o.y &&
130
+ z_order_position == o.z_order_position &&
131
+ shapes == o.shapes &&
132
+ fill_format == o.fill_format &&
133
+ effect_format == o.effect_format &&
134
+ three_d_format == o.three_d_format &&
135
+ line_format == o.line_format &&
136
+ hyperlink_click == o.hyperlink_click &&
137
+ hyperlink_mouse_over == o.hyperlink_mouse_over &&
138
+ type == o.type &&
139
+ zoom_layout == o.zoom_layout &&
140
+ sections == o.sections
141
+ end
142
+
143
+ # @see the `==` method
144
+ # @param [Object] Object to be compared
145
+ def eql?(o)
146
+ self == o
147
+ end
148
+
149
+ # Calculates hash code according to all attributes.
150
+ # @return [Fixnum] Hash code
151
+ def hash
152
+ [self_uri, alternate_links, name, width, height, alternative_text, alternative_text_title, hidden, x, y, z_order_position, shapes, fill_format, effect_format, three_d_format, line_format, hyperlink_click, hyperlink_mouse_over, type, zoom_layout, sections].hash
153
+ end
154
+
155
+ # Builds the object from hash
156
+ # @param [Hash] attributes Model attributes in the form of hash
157
+ # @return [Object] Returns the model itself
158
+ def build_from_hash(attributes)
159
+ return nil unless attributes.is_a?(Hash)
160
+ self.class.swagger_types.each_pair do |key, type|
161
+ mapKey = self.class.attribute_map[key]
162
+ if !mapKey.nil?
163
+ val = attributes[mapKey]
164
+ if val.nil?
165
+ mapKeyString = mapKey.to_s
166
+ mapKeyString[0] = mapKeyString[0].downcase
167
+ mapKey = mapKeyString.to_sym
168
+ val = attributes[mapKey]
169
+ end
170
+ if !val.nil?
171
+ if type =~ /\AArray<(.*)>/i
172
+ # check to ensure the input is an array given that the the attribute
173
+ # is documented as an array but the input is not
174
+ if val.is_a?(Array)
175
+ self.send("#{key}=", val.map { |v| _deserialize($1, v) })
176
+ end
177
+ else
178
+ self.send("#{key}=", _deserialize(type, val))
179
+ end
180
+ end
181
+ end
182
+ end
183
+
184
+ self
185
+ end
186
+
187
+ # Deserializes the data based on type
188
+ # @param string type Data type
189
+ # @param string value Value to be deserialized
190
+ # @return [Object] Deserialized data
191
+ def _deserialize(type, value)
192
+ case type.to_sym
193
+ when :DateTime
194
+ DateTime.parse(value)
195
+ when :Date
196
+ Date.parse(value)
197
+ when :String
198
+ value.to_s
199
+ when :Integer
200
+ value.to_i
201
+ when :Float
202
+ value.to_f
203
+ when :BOOLEAN
204
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
205
+ true
206
+ else
207
+ false
208
+ end
209
+ when :Object
210
+ # generic object (usually a Hash), return directly
211
+ value
212
+ when /\AArray<(?<inner_type>.+)>\z/
213
+ inner_type = Regexp.last_match[:inner_type]
214
+ value.map { |v| _deserialize(inner_type, v) }
215
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
216
+ k_type = Regexp.last_match[:k_type]
217
+ v_type = Regexp.last_match[:v_type]
218
+ {}.tap do |hash|
219
+ value.each do |k, v|
220
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
221
+ end
222
+ end
223
+ else # model
224
+ registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
225
+ if registry_type
226
+ type = registry_type
227
+ end
228
+ temp_model = AsposeSlidesCloud.const_get(type).new
229
+ temp_model.build_from_hash(value)
230
+ end
231
+ end
232
+
233
+ # Returns the string representation of the object
234
+ # @return [String] String presentation of the object
235
+ def to_s
236
+ to_hash.to_s
237
+ end
238
+
239
+ # to_body is an alias to to_hash (backward compatibility)
240
+ # @return [Hash] Returns the object in the form of hash
241
+ def to_body
242
+ to_hash
243
+ end
244
+
245
+ # Returns the object in the form of hash
246
+ # @return [Hash] Returns the object in the form of hash
247
+ def to_hash
248
+ hash = {}
249
+ self.class.attribute_map.each_pair do |attr, param|
250
+ value = self.send(attr)
251
+ next if value.nil?
252
+ hash[param] = _to_hash(value)
253
+ end
254
+ hash
255
+ end
256
+
257
+ # Outputs non-array value in the form of hash
258
+ # For object, use to_hash. Otherwise, just return the value
259
+ # @param [Object] value Any valid value
260
+ # @return [Hash] Returns the value in the form of hash
261
+ def _to_hash(value)
262
+ if value.is_a?(Array)
263
+ value.compact.map { |v| _to_hash(v) }
264
+ elsif value.is_a?(Hash)
265
+ {}.tap do |hash|
266
+ value.each { |k, v| hash[k] = _to_hash(v) }
267
+ end
268
+ elsif value.respond_to? :to_hash
269
+ value.to_hash
270
+ else
271
+ value
272
+ end
273
+ end
274
+ end
275
+ end
@@ -0,0 +1,267 @@
1
+ =begin
2
+ Copyright (c) 2019 Aspose Pty Ltd
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ SOFTWARE.
21
+ =end
22
+
23
+ require 'date'
24
+
25
+ module AsposeSlidesCloud
26
+ # Represents summary zoom section
27
+ class SummaryZoomSection < SectionZoomFrame
28
+ # Section title
29
+ attr_accessor :title
30
+
31
+ # Description of the Summary Zoom Section object.
32
+ attr_accessor :description
33
+
34
+ class EnumAttributeValidator
35
+ attr_reader :datatype
36
+ attr_reader :allowable_values
37
+
38
+ def initialize(datatype, allowable_values)
39
+ @allowable_values = allowable_values.map do |value|
40
+ case datatype.to_s
41
+ when /Integer/i
42
+ value.to_i
43
+ when /Float/i
44
+ value.to_f
45
+ else
46
+ value
47
+ end
48
+ end
49
+ end
50
+
51
+ def valid?(value)
52
+ !value || allowable_values.any?{ |s| s.casecmp(value) == 0 }
53
+ end
54
+ end
55
+
56
+ # Attribute mapping from ruby-style variable name to JSON key.
57
+ def self.attribute_map
58
+ super.merge({
59
+ :'title' => :'Title',
60
+ :'description' => :'Description',
61
+ })
62
+ end
63
+
64
+ # Attribute type mapping.
65
+ def self.swagger_types
66
+ super.merge({
67
+ :'title' => :'String',
68
+ :'description' => :'String',
69
+ })
70
+ end
71
+
72
+ # Initializes the object
73
+ # @param [Hash] attributes Model attributes in the form of hash
74
+ def initialize(attributes = {})
75
+ super
76
+
77
+ if attributes.has_key?(:'Title')
78
+ self.title = attributes[:'Title']
79
+ end
80
+
81
+ if attributes.has_key?(:'Description')
82
+ self.description = attributes[:'Description']
83
+ end
84
+ self.type = "SummaryZoomSection"
85
+ end
86
+
87
+ # Show invalid properties with the reasons. Usually used together with valid?
88
+ # @return Array for valid properties with the reasons
89
+ def list_invalid_properties
90
+ invalid_properties = super
91
+ invalid_properties
92
+ end
93
+
94
+ # Check to see if the all the properties in the model are valid
95
+ # @return true if the model is valid
96
+ def valid?
97
+ return false if !super
98
+ true
99
+ end
100
+
101
+ # Checks equality by comparing each attribute.
102
+ # @param [Object] Object to be compared
103
+ def ==(o)
104
+ return true if self.equal?(o)
105
+ self.class == o.class &&
106
+ self_uri == o.self_uri &&
107
+ alternate_links == o.alternate_links &&
108
+ name == o.name &&
109
+ width == o.width &&
110
+ height == o.height &&
111
+ alternative_text == o.alternative_text &&
112
+ alternative_text_title == o.alternative_text_title &&
113
+ hidden == o.hidden &&
114
+ x == o.x &&
115
+ y == o.y &&
116
+ z_order_position == o.z_order_position &&
117
+ shapes == o.shapes &&
118
+ fill_format == o.fill_format &&
119
+ effect_format == o.effect_format &&
120
+ three_d_format == o.three_d_format &&
121
+ line_format == o.line_format &&
122
+ hyperlink_click == o.hyperlink_click &&
123
+ hyperlink_mouse_over == o.hyperlink_mouse_over &&
124
+ type == o.type &&
125
+ image_type == o.image_type &&
126
+ return_to_parent == o.return_to_parent &&
127
+ show_background == o.show_background &&
128
+ image == o.image &&
129
+ transition_duration == o.transition_duration &&
130
+ target_section_index == o.target_section_index &&
131
+ title == o.title &&
132
+ description == o.description
133
+ end
134
+
135
+ # @see the `==` method
136
+ # @param [Object] Object to be compared
137
+ def eql?(o)
138
+ self == o
139
+ end
140
+
141
+ # Calculates hash code according to all attributes.
142
+ # @return [Fixnum] Hash code
143
+ def hash
144
+ [self_uri, alternate_links, name, width, height, alternative_text, alternative_text_title, hidden, x, y, z_order_position, shapes, fill_format, effect_format, three_d_format, line_format, hyperlink_click, hyperlink_mouse_over, type, image_type, return_to_parent, show_background, image, transition_duration, target_section_index, title, description].hash
145
+ end
146
+
147
+ # Builds the object from hash
148
+ # @param [Hash] attributes Model attributes in the form of hash
149
+ # @return [Object] Returns the model itself
150
+ def build_from_hash(attributes)
151
+ return nil unless attributes.is_a?(Hash)
152
+ self.class.swagger_types.each_pair do |key, type|
153
+ mapKey = self.class.attribute_map[key]
154
+ if !mapKey.nil?
155
+ val = attributes[mapKey]
156
+ if val.nil?
157
+ mapKeyString = mapKey.to_s
158
+ mapKeyString[0] = mapKeyString[0].downcase
159
+ mapKey = mapKeyString.to_sym
160
+ val = attributes[mapKey]
161
+ end
162
+ if !val.nil?
163
+ if type =~ /\AArray<(.*)>/i
164
+ # check to ensure the input is an array given that the the attribute
165
+ # is documented as an array but the input is not
166
+ if val.is_a?(Array)
167
+ self.send("#{key}=", val.map { |v| _deserialize($1, v) })
168
+ end
169
+ else
170
+ self.send("#{key}=", _deserialize(type, val))
171
+ end
172
+ end
173
+ end
174
+ end
175
+
176
+ self
177
+ end
178
+
179
+ # Deserializes the data based on type
180
+ # @param string type Data type
181
+ # @param string value Value to be deserialized
182
+ # @return [Object] Deserialized data
183
+ def _deserialize(type, value)
184
+ case type.to_sym
185
+ when :DateTime
186
+ DateTime.parse(value)
187
+ when :Date
188
+ Date.parse(value)
189
+ when :String
190
+ value.to_s
191
+ when :Integer
192
+ value.to_i
193
+ when :Float
194
+ value.to_f
195
+ when :BOOLEAN
196
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
197
+ true
198
+ else
199
+ false
200
+ end
201
+ when :Object
202
+ # generic object (usually a Hash), return directly
203
+ value
204
+ when /\AArray<(?<inner_type>.+)>\z/
205
+ inner_type = Regexp.last_match[:inner_type]
206
+ value.map { |v| _deserialize(inner_type, v) }
207
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
208
+ k_type = Regexp.last_match[:k_type]
209
+ v_type = Regexp.last_match[:v_type]
210
+ {}.tap do |hash|
211
+ value.each do |k, v|
212
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
213
+ end
214
+ end
215
+ else # model
216
+ registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
217
+ if registry_type
218
+ type = registry_type
219
+ end
220
+ temp_model = AsposeSlidesCloud.const_get(type).new
221
+ temp_model.build_from_hash(value)
222
+ end
223
+ end
224
+
225
+ # Returns the string representation of the object
226
+ # @return [String] String presentation of the object
227
+ def to_s
228
+ to_hash.to_s
229
+ end
230
+
231
+ # to_body is an alias to to_hash (backward compatibility)
232
+ # @return [Hash] Returns the object in the form of hash
233
+ def to_body
234
+ to_hash
235
+ end
236
+
237
+ # Returns the object in the form of hash
238
+ # @return [Hash] Returns the object in the form of hash
239
+ def to_hash
240
+ hash = {}
241
+ self.class.attribute_map.each_pair do |attr, param|
242
+ value = self.send(attr)
243
+ next if value.nil?
244
+ hash[param] = _to_hash(value)
245
+ end
246
+ hash
247
+ end
248
+
249
+ # Outputs non-array value in the form of hash
250
+ # For object, use to_hash. Otherwise, just return the value
251
+ # @param [Object] value Any valid value
252
+ # @return [Hash] Returns the value in the form of hash
253
+ def _to_hash(value)
254
+ if value.is_a?(Array)
255
+ value.compact.map { |v| _to_hash(v) }
256
+ elsif value.is_a?(Hash)
257
+ {}.tap do |hash|
258
+ value.each { |k, v| hash[k] = _to_hash(v) }
259
+ end
260
+ elsif value.respond_to? :to_hash
261
+ value.to_hash
262
+ else
263
+ value
264
+ end
265
+ end
266
+ end
267
+ end
@@ -189,6 +189,10 @@ module AsposeSlidesCloud
189
189
  end
190
190
  end
191
191
  else # model
192
+ registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
193
+ if registry_type
194
+ type = registry_type
195
+ end
192
196
  temp_model = AsposeSlidesCloud.const_get(type).new
193
197
  temp_model.build_from_hash(value)
194
198
  end
@@ -286,6 +286,10 @@ module AsposeSlidesCloud
286
286
  end
287
287
  end
288
288
  else # model
289
+ registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
290
+ if registry_type
291
+ type = registry_type
292
+ end
289
293
  temp_model = AsposeSlidesCloud.const_get(type).new
290
294
  temp_model.build_from_hash(value)
291
295
  end
@@ -396,6 +396,10 @@ module AsposeSlidesCloud
396
396
  end
397
397
  end
398
398
  else # model
399
+ registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
400
+ if registry_type
401
+ type = registry_type
402
+ end
399
403
  temp_model = AsposeSlidesCloud.const_get(type).new
400
404
  temp_model.build_from_hash(value)
401
405
  end