aspose_slides_cloud 22.1.0 → 22.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (258) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +7 -7
  3. data/LICENSE +20 -20
  4. data/README.md +34 -3
  5. data/Rakefile +8 -8
  6. data/TestData/test.pptx +0 -0
  7. data/aspose_slides_cloud.gemspec +56 -54
  8. data/lib/aspose_slides_cloud/api/slides_api.rb +1136 -665
  9. data/lib/aspose_slides_cloud/api_client.rb +11 -0
  10. data/lib/aspose_slides_cloud/api_error.rb +48 -48
  11. data/lib/aspose_slides_cloud/configuration.rb +188 -188
  12. data/lib/aspose_slides_cloud/models/accent_element.rb +4 -0
  13. data/lib/aspose_slides_cloud/models/access_permissions.rb +321 -0
  14. data/lib/aspose_slides_cloud/models/add_layout_slide.rb +4 -0
  15. data/lib/aspose_slides_cloud/models/add_master_slide.rb +4 -0
  16. data/lib/aspose_slides_cloud/models/add_shape.rb +4 -0
  17. data/lib/aspose_slides_cloud/models/add_slide.rb +4 -0
  18. data/lib/aspose_slides_cloud/models/api_info.rb +4 -0
  19. data/lib/aspose_slides_cloud/models/arc_to_path_segment.rb +4 -0
  20. data/lib/aspose_slides_cloud/models/array_element.rb +4 -0
  21. data/lib/aspose_slides_cloud/models/arrow_head_properties.rb +4 -0
  22. data/lib/aspose_slides_cloud/models/audio_frame.rb +16 -3
  23. data/lib/aspose_slides_cloud/models/axes.rb +4 -0
  24. data/lib/aspose_slides_cloud/models/axis.rb +32 -8
  25. data/lib/aspose_slides_cloud/models/bar_element.rb +4 -0
  26. data/lib/aspose_slides_cloud/models/base64_input_file.rb +4 -0
  27. data/lib/aspose_slides_cloud/models/block_element.rb +4 -0
  28. data/lib/aspose_slides_cloud/models/blur_effect.rb +4 -0
  29. data/lib/aspose_slides_cloud/models/border_box_element.rb +4 -0
  30. data/lib/aspose_slides_cloud/models/box_and_whisker_series.rb +6 -5
  31. data/lib/aspose_slides_cloud/models/box_element.rb +4 -0
  32. data/lib/aspose_slides_cloud/models/bubble_chart_data_point.rb +4 -0
  33. data/lib/aspose_slides_cloud/models/bubble_series.rb +19 -7
  34. data/lib/aspose_slides_cloud/models/camera.rb +4 -0
  35. data/lib/aspose_slides_cloud/models/chart.rb +5 -2
  36. data/lib/aspose_slides_cloud/models/chart_category.rb +4 -0
  37. data/lib/aspose_slides_cloud/models/chart_lines_format.rb +221 -0
  38. data/lib/aspose_slides_cloud/models/chart_title.rb +4 -0
  39. data/lib/aspose_slides_cloud/models/chart_wall.rb +4 -0
  40. data/lib/aspose_slides_cloud/models/close_path_segment.rb +4 -0
  41. data/lib/aspose_slides_cloud/models/color_scheme.rb +4 -0
  42. data/lib/aspose_slides_cloud/models/common_slide_view_properties.rb +4 -0
  43. data/lib/aspose_slides_cloud/models/connector.rb +5 -2
  44. data/lib/aspose_slides_cloud/models/cubic_bezier_to_path_segment.rb +4 -0
  45. data/lib/aspose_slides_cloud/models/custom_dash_pattern.rb +4 -0
  46. data/lib/aspose_slides_cloud/models/data_point.rb +4 -0
  47. data/lib/aspose_slides_cloud/models/delimiter_element.rb +4 -0
  48. data/lib/aspose_slides_cloud/models/disc_usage.rb +4 -0
  49. data/lib/aspose_slides_cloud/models/document.rb +4 -0
  50. data/lib/aspose_slides_cloud/models/document_properties.rb +4 -0
  51. data/lib/aspose_slides_cloud/models/document_property.rb +4 -0
  52. data/lib/aspose_slides_cloud/models/document_replace_result.rb +4 -0
  53. data/lib/aspose_slides_cloud/models/effect.rb +4 -0
  54. data/lib/aspose_slides_cloud/models/effect_format.rb +4 -0
  55. data/lib/aspose_slides_cloud/models/entity_exists.rb +4 -0
  56. data/lib/aspose_slides_cloud/models/error.rb +4 -0
  57. data/lib/aspose_slides_cloud/models/error_details.rb +4 -0
  58. data/lib/aspose_slides_cloud/models/export_format.rb +1 -0
  59. data/lib/aspose_slides_cloud/models/export_options.rb +14 -18
  60. data/lib/aspose_slides_cloud/models/file_version.rb +4 -0
  61. data/lib/aspose_slides_cloud/models/file_versions.rb +4 -0
  62. data/lib/aspose_slides_cloud/models/files_list.rb +4 -0
  63. data/lib/aspose_slides_cloud/models/files_upload_result.rb +4 -0
  64. data/lib/aspose_slides_cloud/models/fill_format.rb +4 -0
  65. data/lib/aspose_slides_cloud/models/fill_overlay_effect.rb +4 -0
  66. data/lib/aspose_slides_cloud/models/font_fallback_rule.rb +243 -0
  67. data/lib/aspose_slides_cloud/models/font_scheme.rb +4 -0
  68. data/lib/aspose_slides_cloud/models/font_set.rb +4 -0
  69. data/lib/aspose_slides_cloud/models/format_scheme.rb +4 -0
  70. data/lib/aspose_slides_cloud/models/fraction_element.rb +4 -0
  71. data/lib/aspose_slides_cloud/models/function_element.rb +4 -0
  72. data/lib/aspose_slides_cloud/models/geometry_path.rb +4 -0
  73. data/lib/aspose_slides_cloud/models/geometry_paths.rb +4 -0
  74. data/lib/aspose_slides_cloud/models/geometry_shape.rb +5 -2
  75. data/lib/aspose_slides_cloud/models/gif_export_options.rb +8 -3
  76. data/lib/aspose_slides_cloud/models/glow_effect.rb +4 -0
  77. data/lib/aspose_slides_cloud/models/gradient_fill.rb +4 -0
  78. data/lib/aspose_slides_cloud/models/gradient_fill_stop.rb +4 -0
  79. data/lib/aspose_slides_cloud/models/graphical_object.rb +5 -2
  80. data/lib/aspose_slides_cloud/models/group_shape.rb +16 -3
  81. data/lib/aspose_slides_cloud/models/grouping_character_element.rb +4 -0
  82. data/lib/aspose_slides_cloud/models/header_footer.rb +4 -0
  83. data/lib/aspose_slides_cloud/models/html5_export_options.rb +6 -3
  84. data/lib/aspose_slides_cloud/models/html_export_options.rb +6 -3
  85. data/lib/aspose_slides_cloud/models/hyperlink.rb +4 -0
  86. data/lib/aspose_slides_cloud/models/i_shape_export_options.rb +4 -0
  87. data/lib/aspose_slides_cloud/models/image.rb +4 -0
  88. data/lib/aspose_slides_cloud/models/image_export_options.rb +8 -3
  89. data/lib/aspose_slides_cloud/models/image_export_options_base.rb +222 -0
  90. data/lib/aspose_slides_cloud/models/images.rb +4 -0
  91. data/lib/aspose_slides_cloud/models/inner_shadow_effect.rb +4 -0
  92. data/lib/aspose_slides_cloud/models/input.rb +4 -0
  93. data/lib/aspose_slides_cloud/models/input_file.rb +4 -0
  94. data/lib/aspose_slides_cloud/models/interactive_sequence.rb +4 -0
  95. data/lib/aspose_slides_cloud/models/layout_slide.rb +4 -0
  96. data/lib/aspose_slides_cloud/models/layout_slides.rb +4 -0
  97. data/lib/aspose_slides_cloud/models/left_sub_superscript_element.rb +4 -0
  98. data/lib/aspose_slides_cloud/models/legend.rb +16 -2
  99. data/lib/aspose_slides_cloud/models/light_rig.rb +4 -0
  100. data/lib/aspose_slides_cloud/models/limit_element.rb +4 -0
  101. data/lib/aspose_slides_cloud/models/line_format.rb +4 -0
  102. data/lib/aspose_slides_cloud/models/line_to_path_segment.rb +4 -0
  103. data/lib/aspose_slides_cloud/models/master_slide.rb +4 -0
  104. data/lib/aspose_slides_cloud/models/master_slides.rb +4 -0
  105. data/lib/aspose_slides_cloud/models/math_element.rb +4 -0
  106. data/lib/aspose_slides_cloud/models/math_paragraph.rb +4 -0
  107. data/lib/aspose_slides_cloud/models/matrix_element.rb +4 -0
  108. data/lib/aspose_slides_cloud/models/merge.rb +4 -0
  109. data/lib/aspose_slides_cloud/models/merging_source.rb +4 -0
  110. data/lib/aspose_slides_cloud/models/move_to_path_segment.rb +4 -0
  111. data/lib/aspose_slides_cloud/models/nary_operator_element.rb +4 -0
  112. data/lib/aspose_slides_cloud/models/no_fill.rb +4 -0
  113. data/lib/aspose_slides_cloud/models/normal_view_restored_properties.rb +4 -0
  114. data/lib/aspose_slides_cloud/models/notes_slide.rb +4 -0
  115. data/lib/aspose_slides_cloud/models/notes_slide_header_footer.rb +4 -0
  116. data/lib/aspose_slides_cloud/models/object_exist.rb +4 -0
  117. data/lib/aspose_slides_cloud/models/ole_object_frame.rb +76 -3
  118. data/lib/aspose_slides_cloud/models/one_value_chart_data_point.rb +4 -0
  119. data/lib/aspose_slides_cloud/models/one_value_series.rb +16 -6
  120. data/lib/aspose_slides_cloud/models/ordered_merge_request.rb +4 -0
  121. data/lib/aspose_slides_cloud/models/outer_shadow_effect.rb +4 -0
  122. data/lib/aspose_slides_cloud/models/output_file.rb +4 -0
  123. data/lib/aspose_slides_cloud/models/paragraph.rb +16 -2
  124. data/lib/aspose_slides_cloud/models/paragraphs.rb +4 -0
  125. data/lib/aspose_slides_cloud/models/path_input_file.rb +4 -0
  126. data/lib/aspose_slides_cloud/models/path_output_file.rb +4 -0
  127. data/lib/aspose_slides_cloud/models/path_segment.rb +4 -0
  128. data/lib/aspose_slides_cloud/models/pattern_fill.rb +4 -0
  129. data/lib/aspose_slides_cloud/models/pdf_export_options.rb +7 -16
  130. data/lib/aspose_slides_cloud/models/picture_fill.rb +4 -0
  131. data/lib/aspose_slides_cloud/models/picture_frame.rb +5 -2
  132. data/lib/aspose_slides_cloud/models/pipeline.rb +4 -0
  133. data/lib/aspose_slides_cloud/models/placeholder.rb +4 -0
  134. data/lib/aspose_slides_cloud/models/placeholders.rb +4 -0
  135. data/lib/aspose_slides_cloud/models/plot_area.rb +4 -0
  136. data/lib/aspose_slides_cloud/models/portion.rb +36 -2
  137. data/lib/aspose_slides_cloud/models/portion_format.rb +633 -0
  138. data/lib/aspose_slides_cloud/models/portions.rb +4 -0
  139. data/lib/aspose_slides_cloud/models/pptx_export_options.rb +6 -3
  140. data/lib/aspose_slides_cloud/models/presentation_to_merge.rb +4 -0
  141. data/lib/aspose_slides_cloud/models/presentations_merge_request.rb +4 -0
  142. data/lib/aspose_slides_cloud/models/preset_shadow_effect.rb +4 -0
  143. data/lib/aspose_slides_cloud/models/protection_properties.rb +4 -0
  144. data/lib/aspose_slides_cloud/models/quadratic_bezier_to_path_segment.rb +4 -0
  145. data/lib/aspose_slides_cloud/models/radical_element.rb +4 -0
  146. data/lib/aspose_slides_cloud/models/reflection_effect.rb +4 -0
  147. data/lib/aspose_slides_cloud/models/remove_shape.rb +4 -0
  148. data/lib/aspose_slides_cloud/models/remove_slide.rb +4 -0
  149. data/lib/aspose_slides_cloud/models/reorder_slide.rb +4 -0
  150. data/lib/aspose_slides_cloud/models/replace_text.rb +4 -0
  151. data/lib/aspose_slides_cloud/models/request_input_file.rb +4 -0
  152. data/lib/aspose_slides_cloud/models/reset_slide.rb +4 -0
  153. data/lib/aspose_slides_cloud/models/resource_base.rb +4 -0
  154. data/lib/aspose_slides_cloud/models/resource_uri.rb +4 -0
  155. data/lib/aspose_slides_cloud/models/response_output_file.rb +4 -0
  156. data/lib/aspose_slides_cloud/models/right_sub_superscript_element.rb +4 -0
  157. data/lib/aspose_slides_cloud/models/save.rb +6 -2
  158. data/lib/aspose_slides_cloud/models/save_shape.rb +4 -0
  159. data/lib/aspose_slides_cloud/models/save_slide.rb +4 -0
  160. data/lib/aspose_slides_cloud/models/scatter_chart_data_point.rb +4 -0
  161. data/lib/aspose_slides_cloud/models/scatter_series.rb +8 -6
  162. data/lib/aspose_slides_cloud/models/section.rb +4 -0
  163. data/lib/aspose_slides_cloud/models/section_zoom_frame.rb +255 -0
  164. data/lib/aspose_slides_cloud/models/sections.rb +4 -0
  165. data/lib/aspose_slides_cloud/models/series.rb +5 -41
  166. data/lib/aspose_slides_cloud/models/series_marker.rb +4 -0
  167. data/lib/aspose_slides_cloud/models/shape.rb +16 -3
  168. data/lib/aspose_slides_cloud/models/shape_base.rb +7 -13
  169. data/lib/aspose_slides_cloud/models/shape_bevel.rb +4 -0
  170. data/lib/aspose_slides_cloud/models/shape_image_export_options.rb +4 -0
  171. data/lib/aspose_slides_cloud/models/shape_type.rb +54 -0
  172. data/lib/aspose_slides_cloud/models/shapes.rb +4 -0
  173. data/lib/aspose_slides_cloud/models/slide.rb +4 -0
  174. data/lib/aspose_slides_cloud/models/slide_animation.rb +4 -0
  175. data/lib/aspose_slides_cloud/models/slide_background.rb +4 -0
  176. data/lib/aspose_slides_cloud/models/slide_comment.rb +36 -48
  177. data/lib/aspose_slides_cloud/models/slide_comment_base.rb +286 -0
  178. data/lib/aspose_slides_cloud/models/slide_comments.rb +5 -1
  179. data/lib/aspose_slides_cloud/models/slide_modern_comment.rb +269 -0
  180. data/lib/aspose_slides_cloud/models/slide_properties.rb +4 -0
  181. data/lib/aspose_slides_cloud/models/slide_replace_result.rb +4 -0
  182. data/lib/aspose_slides_cloud/models/slides.rb +4 -0
  183. data/lib/aspose_slides_cloud/models/smart_art.rb +5 -2
  184. data/lib/aspose_slides_cloud/models/smart_art_node.rb +4 -0
  185. data/lib/aspose_slides_cloud/models/smart_art_shape.rb +5 -2
  186. data/lib/aspose_slides_cloud/models/soft_edge_effect.rb +4 -0
  187. data/lib/aspose_slides_cloud/models/solid_fill.rb +4 -0
  188. data/lib/aspose_slides_cloud/models/split_document_result.rb +4 -0
  189. data/lib/aspose_slides_cloud/models/storage_exist.rb +4 -0
  190. data/lib/aspose_slides_cloud/models/storage_file.rb +4 -0
  191. data/lib/aspose_slides_cloud/models/subscript_element.rb +4 -0
  192. data/lib/aspose_slides_cloud/models/summary_zoom_frame.rb +274 -0
  193. data/lib/aspose_slides_cloud/models/summary_zoom_section.rb +266 -0
  194. data/lib/aspose_slides_cloud/models/superscript_element.rb +4 -0
  195. data/lib/aspose_slides_cloud/models/svg_export_options.rb +6 -3
  196. data/lib/aspose_slides_cloud/models/swf_export_options.rb +6 -3
  197. data/lib/aspose_slides_cloud/models/table.rb +5 -2
  198. data/lib/aspose_slides_cloud/models/table_cell.rb +26 -2
  199. data/lib/aspose_slides_cloud/models/table_column.rb +4 -0
  200. data/lib/aspose_slides_cloud/models/table_row.rb +4 -0
  201. data/lib/aspose_slides_cloud/models/task.rb +4 -0
  202. data/lib/aspose_slides_cloud/models/text_bounds.rb +261 -0
  203. data/lib/aspose_slides_cloud/models/text_element.rb +4 -0
  204. data/lib/aspose_slides_cloud/models/text_frame_format.rb +255 -0
  205. data/lib/aspose_slides_cloud/models/text_item.rb +4 -0
  206. data/lib/aspose_slides_cloud/models/text_items.rb +4 -0
  207. data/lib/aspose_slides_cloud/models/theme.rb +4 -0
  208. data/lib/aspose_slides_cloud/models/three_d_format.rb +4 -0
  209. data/lib/aspose_slides_cloud/models/tiff_export_options.rb +8 -3
  210. data/lib/aspose_slides_cloud/models/update_background.rb +4 -0
  211. data/lib/aspose_slides_cloud/models/update_shape.rb +4 -0
  212. data/lib/aspose_slides_cloud/models/video_export_options.rb +289 -0
  213. data/lib/aspose_slides_cloud/models/video_frame.rb +5 -2
  214. data/lib/aspose_slides_cloud/models/view_properties.rb +4 -0
  215. data/lib/aspose_slides_cloud/models/waterfall_chart_data_point.rb +4 -0
  216. data/lib/aspose_slides_cloud/models/waterfall_series.rb +6 -5
  217. data/lib/aspose_slides_cloud/models/xaml_export_options.rb +6 -3
  218. data/lib/aspose_slides_cloud/models/xps_export_options.rb +6 -3
  219. data/lib/aspose_slides_cloud/models/xy_series.rb +255 -0
  220. data/lib/aspose_slides_cloud/models/zoom_frame.rb +255 -0
  221. data/lib/aspose_slides_cloud/models/zoom_object.rb +301 -0
  222. data/lib/aspose_slides_cloud/type_registry.rb +42 -12
  223. data/lib/aspose_slides_cloud/version.rb +1 -1
  224. data/lib/aspose_slides_cloud.rb +23 -6
  225. data/spec/api/slides_api_spec.rb +1407 -33
  226. data/spec/spec_helper.rb +122 -122
  227. data/spec/use_cases/abstract_class_spec.rb +38 -0
  228. data/spec/use_cases/animation_spec.rb +193 -0
  229. data/spec/use_cases/auth_spec.rb +91 -0
  230. data/spec/use_cases/chart_spec.rb +291 -0
  231. data/spec/use_cases/convert_spec.rb +154 -0
  232. data/spec/use_cases/create_spec.rb +101 -0
  233. data/spec/use_cases/header_footer_spec.rb +78 -0
  234. data/spec/use_cases/hyperlink_spec.rb +92 -0
  235. data/spec/use_cases/image_spec.rb +102 -0
  236. data/spec/use_cases/layout_slide_spec.rb +190 -0
  237. data/spec/use_cases/master_slide_spec.rb +190 -0
  238. data/spec/use_cases/math_spec.rb +163 -0
  239. data/spec/use_cases/merge_spec.rb +105 -0
  240. data/spec/use_cases/notes_slide_spec.rb +172 -0
  241. data/spec/use_cases/nullable_field_spec.rb +86 -0
  242. data/spec/use_cases/pipeline_spec.rb +61 -0
  243. data/spec/use_cases/property_spec.rb +177 -0
  244. data/spec/use_cases/section_spec.rb +104 -0
  245. data/spec/use_cases/shape_format_spec.rb +126 -0
  246. data/spec/use_cases/shape_spec.rb +397 -0
  247. data/spec/use_cases/split_spec.rb +88 -0
  248. data/spec/use_cases/text_spec.rb +74 -0
  249. data/spec/use_cases/timeout_spec.rb +44 -0
  250. data/spec/use_cases/watermark_spec.rb +158 -0
  251. data/testRules.json +8 -3
  252. metadata +112 -15
  253. data/TestData/ChartTest.pptx +0 -0
  254. data/TestData/Sections.pptx +0 -0
  255. data/TestData/placeholders.pptx +0 -0
  256. data/TestData/test-unprotected.ppt +0 -0
  257. data/TestData/test.ppt +0 -0
  258. 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
@@ -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,274 @@
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
+ fill_format == o.fill_format &&
132
+ effect_format == o.effect_format &&
133
+ three_d_format == o.three_d_format &&
134
+ line_format == o.line_format &&
135
+ hyperlink_click == o.hyperlink_click &&
136
+ hyperlink_mouse_over == o.hyperlink_mouse_over &&
137
+ type == o.type &&
138
+ zoom_layout == o.zoom_layout &&
139
+ sections == o.sections
140
+ end
141
+
142
+ # @see the `==` method
143
+ # @param [Object] Object to be compared
144
+ def eql?(o)
145
+ self == o
146
+ end
147
+
148
+ # Calculates hash code according to all attributes.
149
+ # @return [Fixnum] Hash code
150
+ def hash
151
+ [self_uri, alternate_links, name, width, height, alternative_text, alternative_text_title, hidden, x, y, z_order_position, fill_format, effect_format, three_d_format, line_format, hyperlink_click, hyperlink_mouse_over, type, zoom_layout, sections].hash
152
+ end
153
+
154
+ # Builds the object from hash
155
+ # @param [Hash] attributes Model attributes in the form of hash
156
+ # @return [Object] Returns the model itself
157
+ def build_from_hash(attributes)
158
+ return nil unless attributes.is_a?(Hash)
159
+ self.class.swagger_types.each_pair do |key, type|
160
+ mapKey = self.class.attribute_map[key]
161
+ if !mapKey.nil?
162
+ val = attributes[mapKey]
163
+ if val.nil?
164
+ mapKeyString = mapKey.to_s
165
+ mapKeyString[0] = mapKeyString[0].downcase
166
+ mapKey = mapKeyString.to_sym
167
+ val = attributes[mapKey]
168
+ end
169
+ if !val.nil?
170
+ if type =~ /\AArray<(.*)>/i
171
+ # check to ensure the input is an array given that the the attribute
172
+ # is documented as an array but the input is not
173
+ if val.is_a?(Array)
174
+ self.send("#{key}=", val.map { |v| _deserialize($1, v) })
175
+ end
176
+ else
177
+ self.send("#{key}=", _deserialize(type, val))
178
+ end
179
+ end
180
+ end
181
+ end
182
+
183
+ self
184
+ end
185
+
186
+ # Deserializes the data based on type
187
+ # @param string type Data type
188
+ # @param string value Value to be deserialized
189
+ # @return [Object] Deserialized data
190
+ def _deserialize(type, value)
191
+ case type.to_sym
192
+ when :DateTime
193
+ DateTime.parse(value)
194
+ when :Date
195
+ Date.parse(value)
196
+ when :String
197
+ value.to_s
198
+ when :Integer
199
+ value.to_i
200
+ when :Float
201
+ value.to_f
202
+ when :BOOLEAN
203
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
204
+ true
205
+ else
206
+ false
207
+ end
208
+ when :Object
209
+ # generic object (usually a Hash), return directly
210
+ value
211
+ when /\AArray<(?<inner_type>.+)>\z/
212
+ inner_type = Regexp.last_match[:inner_type]
213
+ value.map { |v| _deserialize(inner_type, v) }
214
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
215
+ k_type = Regexp.last_match[:k_type]
216
+ v_type = Regexp.last_match[:v_type]
217
+ {}.tap do |hash|
218
+ value.each do |k, v|
219
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
220
+ end
221
+ end
222
+ else # model
223
+ registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
224
+ if registry_type
225
+ type = registry_type
226
+ end
227
+ temp_model = AsposeSlidesCloud.const_get(type).new
228
+ temp_model.build_from_hash(value)
229
+ end
230
+ end
231
+
232
+ # Returns the string representation of the object
233
+ # @return [String] String presentation of the object
234
+ def to_s
235
+ to_hash.to_s
236
+ end
237
+
238
+ # to_body is an alias to to_hash (backward compatibility)
239
+ # @return [Hash] Returns the object in the form of hash
240
+ def to_body
241
+ to_hash
242
+ end
243
+
244
+ # Returns the object in the form of hash
245
+ # @return [Hash] Returns the object in the form of hash
246
+ def to_hash
247
+ hash = {}
248
+ self.class.attribute_map.each_pair do |attr, param|
249
+ value = self.send(attr)
250
+ next if value.nil?
251
+ hash[param] = _to_hash(value)
252
+ end
253
+ hash
254
+ end
255
+
256
+ # Outputs non-array value in the form of hash
257
+ # For object, use to_hash. Otherwise, just return the value
258
+ # @param [Object] value Any valid value
259
+ # @return [Hash] Returns the value in the form of hash
260
+ def _to_hash(value)
261
+ if value.is_a?(Array)
262
+ value.compact.map { |v| _to_hash(v) }
263
+ elsif value.is_a?(Hash)
264
+ {}.tap do |hash|
265
+ value.each { |k, v| hash[k] = _to_hash(v) }
266
+ end
267
+ elsif value.respond_to? :to_hash
268
+ value.to_hash
269
+ else
270
+ value
271
+ end
272
+ end
273
+ end
274
+ end
@@ -0,0 +1,266 @@
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
+ fill_format == o.fill_format &&
118
+ effect_format == o.effect_format &&
119
+ three_d_format == o.three_d_format &&
120
+ line_format == o.line_format &&
121
+ hyperlink_click == o.hyperlink_click &&
122
+ hyperlink_mouse_over == o.hyperlink_mouse_over &&
123
+ type == o.type &&
124
+ image_type == o.image_type &&
125
+ return_to_parent == o.return_to_parent &&
126
+ show_background == o.show_background &&
127
+ image == o.image &&
128
+ transition_duration == o.transition_duration &&
129
+ target_section_index == o.target_section_index &&
130
+ title == o.title &&
131
+ description == o.description
132
+ end
133
+
134
+ # @see the `==` method
135
+ # @param [Object] Object to be compared
136
+ def eql?(o)
137
+ self == o
138
+ end
139
+
140
+ # Calculates hash code according to all attributes.
141
+ # @return [Fixnum] Hash code
142
+ def hash
143
+ [self_uri, alternate_links, name, width, height, alternative_text, alternative_text_title, hidden, x, y, z_order_position, 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
144
+ end
145
+
146
+ # Builds the object from hash
147
+ # @param [Hash] attributes Model attributes in the form of hash
148
+ # @return [Object] Returns the model itself
149
+ def build_from_hash(attributes)
150
+ return nil unless attributes.is_a?(Hash)
151
+ self.class.swagger_types.each_pair do |key, type|
152
+ mapKey = self.class.attribute_map[key]
153
+ if !mapKey.nil?
154
+ val = attributes[mapKey]
155
+ if val.nil?
156
+ mapKeyString = mapKey.to_s
157
+ mapKeyString[0] = mapKeyString[0].downcase
158
+ mapKey = mapKeyString.to_sym
159
+ val = attributes[mapKey]
160
+ end
161
+ if !val.nil?
162
+ if type =~ /\AArray<(.*)>/i
163
+ # check to ensure the input is an array given that the the attribute
164
+ # is documented as an array but the input is not
165
+ if val.is_a?(Array)
166
+ self.send("#{key}=", val.map { |v| _deserialize($1, v) })
167
+ end
168
+ else
169
+ self.send("#{key}=", _deserialize(type, val))
170
+ end
171
+ end
172
+ end
173
+ end
174
+
175
+ self
176
+ end
177
+
178
+ # Deserializes the data based on type
179
+ # @param string type Data type
180
+ # @param string value Value to be deserialized
181
+ # @return [Object] Deserialized data
182
+ def _deserialize(type, value)
183
+ case type.to_sym
184
+ when :DateTime
185
+ DateTime.parse(value)
186
+ when :Date
187
+ Date.parse(value)
188
+ when :String
189
+ value.to_s
190
+ when :Integer
191
+ value.to_i
192
+ when :Float
193
+ value.to_f
194
+ when :BOOLEAN
195
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
196
+ true
197
+ else
198
+ false
199
+ end
200
+ when :Object
201
+ # generic object (usually a Hash), return directly
202
+ value
203
+ when /\AArray<(?<inner_type>.+)>\z/
204
+ inner_type = Regexp.last_match[:inner_type]
205
+ value.map { |v| _deserialize(inner_type, v) }
206
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
207
+ k_type = Regexp.last_match[:k_type]
208
+ v_type = Regexp.last_match[:v_type]
209
+ {}.tap do |hash|
210
+ value.each do |k, v|
211
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
212
+ end
213
+ end
214
+ else # model
215
+ registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
216
+ if registry_type
217
+ type = registry_type
218
+ end
219
+ temp_model = AsposeSlidesCloud.const_get(type).new
220
+ temp_model.build_from_hash(value)
221
+ end
222
+ end
223
+
224
+ # Returns the string representation of the object
225
+ # @return [String] String presentation of the object
226
+ def to_s
227
+ to_hash.to_s
228
+ end
229
+
230
+ # to_body is an alias to to_hash (backward compatibility)
231
+ # @return [Hash] Returns the object in the form of hash
232
+ def to_body
233
+ to_hash
234
+ end
235
+
236
+ # Returns the object in the form of hash
237
+ # @return [Hash] Returns the object in the form of hash
238
+ def to_hash
239
+ hash = {}
240
+ self.class.attribute_map.each_pair do |attr, param|
241
+ value = self.send(attr)
242
+ next if value.nil?
243
+ hash[param] = _to_hash(value)
244
+ end
245
+ hash
246
+ end
247
+
248
+ # Outputs non-array value in the form of hash
249
+ # For object, use to_hash. Otherwise, just return the value
250
+ # @param [Object] value Any valid value
251
+ # @return [Hash] Returns the value in the form of hash
252
+ def _to_hash(value)
253
+ if value.is_a?(Array)
254
+ value.compact.map { |v| _to_hash(v) }
255
+ elsif value.is_a?(Hash)
256
+ {}.tap do |hash|
257
+ value.each { |k, v| hash[k] = _to_hash(v) }
258
+ end
259
+ elsif value.respond_to? :to_hash
260
+ value.to_hash
261
+ else
262
+ value
263
+ end
264
+ end
265
+ end
266
+ 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
@@ -191,8 +191,7 @@ module AsposeSlidesCloud
191
191
  return true if self.equal?(o)
192
192
  self.class == o.class &&
193
193
  default_regular_font == o.default_regular_font &&
194
- height == o.height &&
195
- width == o.width &&
194
+ font_fallback_rules == o.font_fallback_rules &&
196
195
  format == o.format &&
197
196
  vectorize_text == o.vectorize_text &&
198
197
  metafile_rasterization_dpi == o.metafile_rasterization_dpi &&
@@ -214,7 +213,7 @@ module AsposeSlidesCloud
214
213
  # Calculates hash code according to all attributes.
215
214
  # @return [Fixnum] Hash code
216
215
  def hash
217
- [default_regular_font, height, width, format, vectorize_text, metafile_rasterization_dpi, disable3_d_text, disable_gradient_split, disable_line_end_cropping, jpeg_quality, pictures_compression, delete_pictures_cropped_areas, external_fonts_handling].hash
216
+ [default_regular_font, font_fallback_rules, format, vectorize_text, metafile_rasterization_dpi, disable3_d_text, disable_gradient_split, disable_line_end_cropping, jpeg_quality, pictures_compression, delete_pictures_cropped_areas, external_fonts_handling].hash
218
217
  end
219
218
 
220
219
  # Builds the object from hash
@@ -286,6 +285,10 @@ module AsposeSlidesCloud
286
285
  end
287
286
  end
288
287
  else # model
288
+ registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
289
+ if registry_type
290
+ type = registry_type
291
+ end
289
292
  temp_model = AsposeSlidesCloud.const_get(type).new
290
293
  temp_model.build_from_hash(value)
291
294
  end
@@ -290,8 +290,7 @@ module AsposeSlidesCloud
290
290
  return true if self.equal?(o)
291
291
  self.class == o.class &&
292
292
  default_regular_font == o.default_regular_font &&
293
- height == o.height &&
294
- width == o.width &&
293
+ font_fallback_rules == o.font_fallback_rules &&
295
294
  format == o.format &&
296
295
  show_hidden_slides == o.show_hidden_slides &&
297
296
  compressed == o.compressed &&
@@ -324,7 +323,7 @@ module AsposeSlidesCloud
324
323
  # Calculates hash code according to all attributes.
325
324
  # @return [Fixnum] Hash code
326
325
  def hash
327
- [default_regular_font, height, width, format, show_hidden_slides, compressed, viewer_included, show_page_border, show_full_screen, show_page_stepper, show_search, show_top_pane, show_bottom_pane, show_left_pane, start_open_left_pane, enable_context_menu, logo_image, logo_link, jpeg_quality, notes_position, comments_position, comments_area_width, comments_area_color, show_comments_by_no_author].hash
326
+ [default_regular_font, font_fallback_rules, format, show_hidden_slides, compressed, viewer_included, show_page_border, show_full_screen, show_page_stepper, show_search, show_top_pane, show_bottom_pane, show_left_pane, start_open_left_pane, enable_context_menu, logo_image, logo_link, jpeg_quality, notes_position, comments_position, comments_area_width, comments_area_color, show_comments_by_no_author].hash
328
327
  end
329
328
 
330
329
  # Builds the object from hash
@@ -396,6 +395,10 @@ module AsposeSlidesCloud
396
395
  end
397
396
  end
398
397
  else # model
398
+ registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
399
+ if registry_type
400
+ type = registry_type
401
+ end
399
402
  temp_model = AsposeSlidesCloud.const_get(type).new
400
403
  temp_model.build_from_hash(value)
401
404
  end
@@ -202,7 +202,6 @@ module AsposeSlidesCloud
202
202
  x == o.x &&
203
203
  y == o.y &&
204
204
  z_order_position == o.z_order_position &&
205
- shapes == o.shapes &&
206
205
  fill_format == o.fill_format &&
207
206
  effect_format == o.effect_format &&
208
207
  three_d_format == o.three_d_format &&
@@ -231,7 +230,7 @@ module AsposeSlidesCloud
231
230
  # Calculates hash code according to all attributes.
232
231
  # @return [Fixnum] Hash code
233
232
  def hash
234
- [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, style, rows, columns, first_col, first_row, horizontal_banding, last_col, last_row, right_to_left, vertical_banding].hash
233
+ [self_uri, alternate_links, name, width, height, alternative_text, alternative_text_title, hidden, x, y, z_order_position, fill_format, effect_format, three_d_format, line_format, hyperlink_click, hyperlink_mouse_over, type, style, rows, columns, first_col, first_row, horizontal_banding, last_col, last_row, right_to_left, vertical_banding].hash
235
234
  end
236
235
 
237
236
  # Builds the object from hash
@@ -303,6 +302,10 @@ module AsposeSlidesCloud
303
302
  end
304
303
  end
305
304
  else # model
305
+ registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
306
+ if registry_type
307
+ type = registry_type
308
+ end
306
309
  temp_model = AsposeSlidesCloud.const_get(type).new
307
310
  temp_model.build_from_hash(value)
308
311
  end