aspose_slides_cloud 23.3.0 → 23.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (259) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +35 -10
  3. data/README.md +12 -0
  4. data/TestData/macros.pptm +0 -0
  5. data/TestData/test.pptx +0 -0
  6. data/aspose_slides_cloud.gemspec +3 -1
  7. data/docker-entrypoint.sh +4 -3
  8. data/lib/aspose_slides_cloud/api/slides_api.rb +3669 -1888
  9. data/lib/aspose_slides_cloud/api_client.rb +3 -0
  10. data/lib/aspose_slides_cloud/models/accent_element.rb +0 -146
  11. data/lib/aspose_slides_cloud/models/access_permissions.rb +1 -125
  12. data/lib/aspose_slides_cloud/models/add_layout_slide.rb +0 -146
  13. data/lib/aspose_slides_cloud/models/add_master_slide.rb +0 -146
  14. data/lib/aspose_slides_cloud/models/add_shape.rb +0 -146
  15. data/lib/aspose_slides_cloud/models/add_slide.rb +0 -146
  16. data/lib/aspose_slides_cloud/models/alpha_bi_level_effect.rb +0 -146
  17. data/lib/aspose_slides_cloud/models/alpha_ceiling_effect.rb +0 -146
  18. data/lib/aspose_slides_cloud/models/alpha_floor_effect.rb +0 -146
  19. data/lib/aspose_slides_cloud/models/alpha_inverse_effect.rb +0 -146
  20. data/lib/aspose_slides_cloud/models/alpha_modulate_effect.rb +0 -146
  21. data/lib/aspose_slides_cloud/models/alpha_modulate_fixed_effect.rb +0 -146
  22. data/lib/aspose_slides_cloud/models/alpha_replace_effect.rb +0 -146
  23. data/lib/aspose_slides_cloud/models/api_info.rb +1 -125
  24. data/lib/aspose_slides_cloud/models/arc_to_path_segment.rb +0 -146
  25. data/lib/aspose_slides_cloud/models/array_element.rb +0 -146
  26. data/lib/aspose_slides_cloud/models/arrow_head_properties.rb +1 -147
  27. data/lib/aspose_slides_cloud/models/audio_frame.rb +0 -146
  28. data/lib/aspose_slides_cloud/models/axes.rb +1 -125
  29. data/lib/aspose_slides_cloud/models/axis.rb +1 -147
  30. data/lib/aspose_slides_cloud/models/bar_element.rb +0 -146
  31. data/lib/aspose_slides_cloud/models/base64_input_file.rb +0 -146
  32. data/lib/aspose_slides_cloud/models/base_object.rb +173 -0
  33. data/lib/aspose_slides_cloud/models/bi_level_effect.rb +0 -146
  34. data/lib/aspose_slides_cloud/models/block_element.rb +0 -146
  35. data/lib/aspose_slides_cloud/models/blur_effect.rb +1 -125
  36. data/lib/aspose_slides_cloud/models/blur_image_effect.rb +0 -146
  37. data/lib/aspose_slides_cloud/models/border_box_element.rb +0 -146
  38. data/lib/aspose_slides_cloud/models/box_element.rb +0 -146
  39. data/lib/aspose_slides_cloud/models/bubble_chart_data_point.rb +0 -146
  40. data/lib/aspose_slides_cloud/models/bubble_series.rb +0 -146
  41. data/lib/aspose_slides_cloud/models/camera.rb +1 -147
  42. data/lib/aspose_slides_cloud/models/chart.rb +0 -146
  43. data/lib/aspose_slides_cloud/models/chart_category.rb +1 -125
  44. data/lib/aspose_slides_cloud/models/chart_lines_format.rb +1 -125
  45. data/lib/aspose_slides_cloud/models/chart_series_group.rb +1 -147
  46. data/lib/aspose_slides_cloud/models/chart_title.rb +1 -125
  47. data/lib/aspose_slides_cloud/models/chart_wall.rb +1 -147
  48. data/lib/aspose_slides_cloud/models/close_path_segment.rb +0 -146
  49. data/lib/aspose_slides_cloud/models/color_change_effect.rb +0 -146
  50. data/lib/aspose_slides_cloud/models/color_replace_effect.rb +0 -146
  51. data/lib/aspose_slides_cloud/models/color_scheme.rb +0 -124
  52. data/lib/aspose_slides_cloud/models/common_slide_view_properties.rb +1 -125
  53. data/lib/aspose_slides_cloud/models/connector.rb +0 -146
  54. data/lib/aspose_slides_cloud/models/cubic_bezier_to_path_segment.rb +0 -146
  55. data/lib/aspose_slides_cloud/models/custom_dash_pattern.rb +1 -125
  56. data/lib/aspose_slides_cloud/models/data_point.rb +1 -147
  57. data/lib/aspose_slides_cloud/models/data_source.rb +1 -147
  58. data/lib/aspose_slides_cloud/models/delimiter_element.rb +0 -146
  59. data/lib/aspose_slides_cloud/models/disc_usage.rb +1 -125
  60. data/lib/aspose_slides_cloud/models/document.rb +0 -124
  61. data/lib/aspose_slides_cloud/models/document_properties.rb +0 -124
  62. data/lib/aspose_slides_cloud/models/document_property.rb +0 -124
  63. data/lib/aspose_slides_cloud/models/document_replace_result.rb +0 -124
  64. data/lib/aspose_slides_cloud/models/duotone_effect.rb +0 -146
  65. data/lib/aspose_slides_cloud/models/effect.rb +1 -147
  66. data/lib/aspose_slides_cloud/models/effect_format.rb +1 -125
  67. data/lib/aspose_slides_cloud/models/entity_exists.rb +1 -125
  68. data/lib/aspose_slides_cloud/models/error.rb +1 -125
  69. data/lib/aspose_slides_cloud/models/error_details.rb +1 -125
  70. data/lib/aspose_slides_cloud/models/export_options.rb +1 -125
  71. data/lib/aspose_slides_cloud/models/file_version.rb +0 -124
  72. data/lib/aspose_slides_cloud/models/file_versions.rb +1 -125
  73. data/lib/aspose_slides_cloud/models/files_list.rb +1 -125
  74. data/lib/aspose_slides_cloud/models/files_upload_result.rb +1 -125
  75. data/lib/aspose_slides_cloud/models/fill_format.rb +1 -147
  76. data/lib/aspose_slides_cloud/models/fill_overlay_effect.rb +1 -147
  77. data/lib/aspose_slides_cloud/models/fill_overlay_image_effect.rb +0 -146
  78. data/lib/aspose_slides_cloud/models/font_data.rb +1 -125
  79. data/lib/aspose_slides_cloud/models/font_fallback_rule.rb +1 -125
  80. data/lib/aspose_slides_cloud/models/font_scheme.rb +0 -124
  81. data/lib/aspose_slides_cloud/models/font_set.rb +1 -125
  82. data/lib/aspose_slides_cloud/models/font_subst_rule.rb +1 -125
  83. data/lib/aspose_slides_cloud/models/fonts_data.rb +1 -125
  84. data/lib/aspose_slides_cloud/models/format_scheme.rb +0 -124
  85. data/lib/aspose_slides_cloud/models/fraction_element.rb +0 -146
  86. data/lib/aspose_slides_cloud/models/function_element.rb +0 -146
  87. data/lib/aspose_slides_cloud/models/geometry_path.rb +1 -147
  88. data/lib/aspose_slides_cloud/models/geometry_paths.rb +1 -125
  89. data/lib/aspose_slides_cloud/models/geometry_shape.rb +0 -146
  90. data/lib/aspose_slides_cloud/models/gif_export_options.rb +0 -124
  91. data/lib/aspose_slides_cloud/models/glow_effect.rb +1 -125
  92. data/lib/aspose_slides_cloud/models/gradient_fill.rb +0 -146
  93. data/lib/aspose_slides_cloud/models/gradient_fill_stop.rb +1 -125
  94. data/lib/aspose_slides_cloud/models/graphical_object.rb +0 -146
  95. data/lib/aspose_slides_cloud/models/gray_scale_effect.rb +0 -146
  96. data/lib/aspose_slides_cloud/models/group_shape.rb +0 -146
  97. data/lib/aspose_slides_cloud/models/grouping_character_element.rb +0 -146
  98. data/lib/aspose_slides_cloud/models/header_footer.rb +0 -124
  99. data/lib/aspose_slides_cloud/models/hsl_effect.rb +0 -146
  100. data/lib/aspose_slides_cloud/models/html5_export_options.rb +0 -124
  101. data/lib/aspose_slides_cloud/models/html_export_options.rb +0 -146
  102. data/lib/aspose_slides_cloud/models/hyperlink.rb +1 -147
  103. data/lib/aspose_slides_cloud/models/i_shape_export_options.rb +1 -125
  104. data/lib/aspose_slides_cloud/models/image.rb +0 -124
  105. data/lib/aspose_slides_cloud/models/image_export_options.rb +0 -146
  106. data/lib/aspose_slides_cloud/models/image_export_options_base.rb +0 -124
  107. data/lib/aspose_slides_cloud/models/image_transform_effect.rb +1 -147
  108. data/lib/aspose_slides_cloud/models/images.rb +0 -124
  109. data/lib/aspose_slides_cloud/models/inner_shadow_effect.rb +1 -125
  110. data/lib/aspose_slides_cloud/models/input.rb +1 -125
  111. data/lib/aspose_slides_cloud/models/input_file.rb +1 -147
  112. data/lib/aspose_slides_cloud/models/interactive_sequence.rb +1 -125
  113. data/lib/aspose_slides_cloud/models/layout_slide.rb +0 -146
  114. data/lib/aspose_slides_cloud/models/layout_slides.rb +0 -124
  115. data/lib/aspose_slides_cloud/models/left_sub_superscript_element.rb +0 -146
  116. data/lib/aspose_slides_cloud/models/legend.rb +1 -147
  117. data/lib/aspose_slides_cloud/models/light_rig.rb +1 -147
  118. data/lib/aspose_slides_cloud/models/limit_element.rb +0 -146
  119. data/lib/aspose_slides_cloud/models/line_format.rb +1 -147
  120. data/lib/aspose_slides_cloud/models/line_to_path_segment.rb +0 -146
  121. data/lib/aspose_slides_cloud/models/literals.rb +0 -146
  122. data/lib/aspose_slides_cloud/models/luminance_effect.rb +0 -146
  123. data/lib/aspose_slides_cloud/models/master_slide.rb +0 -124
  124. data/lib/aspose_slides_cloud/models/master_slides.rb +0 -124
  125. data/lib/aspose_slides_cloud/models/math_element.rb +1 -147
  126. data/lib/aspose_slides_cloud/models/math_paragraph.rb +1 -147
  127. data/lib/aspose_slides_cloud/models/matrix_element.rb +0 -146
  128. data/lib/aspose_slides_cloud/models/merge.rb +0 -146
  129. data/lib/aspose_slides_cloud/models/merging_source.rb +1 -125
  130. data/lib/aspose_slides_cloud/models/move_to_path_segment.rb +0 -146
  131. data/lib/aspose_slides_cloud/models/nary_operator_element.rb +0 -146
  132. data/lib/aspose_slides_cloud/models/no_fill.rb +0 -146
  133. data/lib/aspose_slides_cloud/models/normal_view_restored_properties.rb +1 -125
  134. data/lib/aspose_slides_cloud/models/notes_slide.rb +0 -124
  135. data/lib/aspose_slides_cloud/models/notes_slide_header_footer.rb +0 -124
  136. data/lib/aspose_slides_cloud/models/object_exist.rb +1 -125
  137. data/lib/aspose_slides_cloud/models/ole_object_frame.rb +0 -146
  138. data/lib/aspose_slides_cloud/models/one_value_chart_data_point.rb +0 -146
  139. data/lib/aspose_slides_cloud/models/one_value_series.rb +0 -146
  140. data/lib/aspose_slides_cloud/models/ordered_merge_request.rb +1 -125
  141. data/lib/aspose_slides_cloud/models/outer_shadow_effect.rb +1 -125
  142. data/lib/aspose_slides_cloud/models/output_file.rb +1 -147
  143. data/lib/aspose_slides_cloud/models/paragraph.rb +0 -146
  144. data/lib/aspose_slides_cloud/models/paragraph_format.rb +1 -147
  145. data/lib/aspose_slides_cloud/models/paragraphs.rb +0 -124
  146. data/lib/aspose_slides_cloud/models/path_input_file.rb +0 -146
  147. data/lib/aspose_slides_cloud/models/path_output_file.rb +0 -146
  148. data/lib/aspose_slides_cloud/models/path_segment.rb +1 -147
  149. data/lib/aspose_slides_cloud/models/pattern_fill.rb +0 -146
  150. data/lib/aspose_slides_cloud/models/pdf_export_options.rb +0 -146
  151. data/lib/aspose_slides_cloud/models/picture_fill.rb +0 -146
  152. data/lib/aspose_slides_cloud/models/picture_frame.rb +0 -146
  153. data/lib/aspose_slides_cloud/models/pipeline.rb +1 -125
  154. data/lib/aspose_slides_cloud/models/placeholder.rb +0 -146
  155. data/lib/aspose_slides_cloud/models/placeholders.rb +0 -124
  156. data/lib/aspose_slides_cloud/models/plot_area.rb +1 -147
  157. data/lib/aspose_slides_cloud/models/portion.rb +0 -146
  158. data/lib/aspose_slides_cloud/models/portion_format.rb +1 -147
  159. data/lib/aspose_slides_cloud/models/portions.rb +0 -124
  160. data/lib/aspose_slides_cloud/models/pptx_export_options.rb +0 -146
  161. data/lib/aspose_slides_cloud/models/presentation_to_merge.rb +1 -147
  162. data/lib/aspose_slides_cloud/models/presentations_merge_request.rb +1 -125
  163. data/lib/aspose_slides_cloud/models/preset_shadow_effect.rb +1 -147
  164. data/lib/aspose_slides_cloud/models/protection_properties.rb +0 -124
  165. data/lib/aspose_slides_cloud/models/quadratic_bezier_to_path_segment.rb +0 -146
  166. data/lib/aspose_slides_cloud/models/radical_element.rb +0 -146
  167. data/lib/aspose_slides_cloud/models/reflection_effect.rb +1 -147
  168. data/lib/aspose_slides_cloud/models/remove_shape.rb +0 -146
  169. data/lib/aspose_slides_cloud/models/remove_slide.rb +0 -146
  170. data/lib/aspose_slides_cloud/models/reorder_slide.rb +0 -146
  171. data/lib/aspose_slides_cloud/models/replace_text.rb +0 -146
  172. data/lib/aspose_slides_cloud/models/request_input_file.rb +0 -146
  173. data/lib/aspose_slides_cloud/models/reset_slide.rb +0 -146
  174. data/lib/aspose_slides_cloud/models/resource_base.rb +1 -125
  175. data/lib/aspose_slides_cloud/models/resource_uri.rb +1 -125
  176. data/lib/aspose_slides_cloud/models/response_output_file.rb +0 -146
  177. data/lib/aspose_slides_cloud/models/right_sub_superscript_element.rb +0 -146
  178. data/lib/aspose_slides_cloud/models/save.rb +0 -146
  179. data/lib/aspose_slides_cloud/models/save_shape.rb +0 -146
  180. data/lib/aspose_slides_cloud/models/save_slide.rb +0 -146
  181. data/lib/aspose_slides_cloud/models/scatter_chart_data_point.rb +0 -146
  182. data/lib/aspose_slides_cloud/models/scatter_series.rb +0 -146
  183. data/lib/aspose_slides_cloud/models/section.rb +0 -124
  184. data/lib/aspose_slides_cloud/models/section_zoom_frame.rb +0 -146
  185. data/lib/aspose_slides_cloud/models/sections.rb +0 -124
  186. data/lib/aspose_slides_cloud/models/series.rb +1 -147
  187. data/lib/aspose_slides_cloud/models/series_marker.rb +1 -147
  188. data/lib/aspose_slides_cloud/models/shape.rb +0 -146
  189. data/lib/aspose_slides_cloud/models/shape_base.rb +0 -146
  190. data/lib/aspose_slides_cloud/models/shape_bevel.rb +1 -147
  191. data/lib/aspose_slides_cloud/models/shape_image_export_options.rb +1 -147
  192. data/lib/aspose_slides_cloud/models/shapes.rb +0 -124
  193. data/lib/aspose_slides_cloud/models/slide.rb +0 -124
  194. data/lib/aspose_slides_cloud/models/slide_animation.rb +0 -124
  195. data/lib/aspose_slides_cloud/models/slide_background.rb +0 -146
  196. data/lib/aspose_slides_cloud/models/slide_comment.rb +0 -146
  197. data/lib/aspose_slides_cloud/models/slide_comment_base.rb +1 -147
  198. data/lib/aspose_slides_cloud/models/slide_comments.rb +0 -124
  199. data/lib/aspose_slides_cloud/models/slide_modern_comment.rb +0 -146
  200. data/lib/aspose_slides_cloud/models/slide_properties.rb +0 -146
  201. data/lib/aspose_slides_cloud/models/slide_replace_result.rb +0 -124
  202. data/lib/aspose_slides_cloud/models/slide_show_properties.rb +0 -146
  203. data/lib/aspose_slides_cloud/models/slides.rb +0 -124
  204. data/lib/aspose_slides_cloud/models/smart_art.rb +0 -146
  205. data/lib/aspose_slides_cloud/models/smart_art_node.rb +1 -147
  206. data/lib/aspose_slides_cloud/models/smart_art_shape.rb +0 -146
  207. data/lib/aspose_slides_cloud/models/soft_edge_effect.rb +1 -125
  208. data/lib/aspose_slides_cloud/models/solid_fill.rb +0 -146
  209. data/lib/aspose_slides_cloud/models/split_document_result.rb +0 -124
  210. data/lib/aspose_slides_cloud/models/storage_exist.rb +1 -125
  211. data/lib/aspose_slides_cloud/models/storage_file.rb +1 -125
  212. data/lib/aspose_slides_cloud/models/subscript_element.rb +0 -146
  213. data/lib/aspose_slides_cloud/models/summary_zoom_frame.rb +0 -146
  214. data/lib/aspose_slides_cloud/models/summary_zoom_section.rb +0 -146
  215. data/lib/aspose_slides_cloud/models/superscript_element.rb +0 -146
  216. data/lib/aspose_slides_cloud/models/svg_export_options.rb +0 -146
  217. data/lib/aspose_slides_cloud/models/swf_export_options.rb +0 -146
  218. data/lib/aspose_slides_cloud/models/table.rb +0 -146
  219. data/lib/aspose_slides_cloud/models/table_cell.rb +21 -147
  220. data/lib/aspose_slides_cloud/models/table_cell_merge_options.rb +156 -0
  221. data/lib/aspose_slides_cloud/models/table_cell_split_type.rb +42 -0
  222. data/lib/aspose_slides_cloud/models/table_column.rb +1 -125
  223. data/lib/aspose_slides_cloud/models/table_row.rb +1 -125
  224. data/lib/aspose_slides_cloud/models/task.rb +1 -147
  225. data/lib/aspose_slides_cloud/models/text_bounds.rb +1 -125
  226. data/lib/aspose_slides_cloud/models/text_element.rb +0 -146
  227. data/lib/aspose_slides_cloud/models/text_frame_format.rb +1 -147
  228. data/lib/aspose_slides_cloud/models/text_item.rb +1 -125
  229. data/lib/aspose_slides_cloud/models/text_items.rb +0 -124
  230. data/lib/aspose_slides_cloud/models/theme.rb +0 -124
  231. data/lib/aspose_slides_cloud/models/three_d_format.rb +1 -147
  232. data/lib/aspose_slides_cloud/models/tiff_export_options.rb +0 -146
  233. data/lib/aspose_slides_cloud/models/tint_effect.rb +0 -146
  234. data/lib/aspose_slides_cloud/models/update_background.rb +0 -146
  235. data/lib/aspose_slides_cloud/models/update_shape.rb +0 -146
  236. data/lib/aspose_slides_cloud/models/vba_module.rb +113 -0
  237. data/lib/aspose_slides_cloud/models/vba_project.rb +105 -0
  238. data/lib/aspose_slides_cloud/models/vba_reference.rb +101 -0
  239. data/lib/aspose_slides_cloud/models/video_export_options.rb +0 -146
  240. data/lib/aspose_slides_cloud/models/video_frame.rb +0 -146
  241. data/lib/aspose_slides_cloud/models/view_properties.rb +0 -146
  242. data/lib/aspose_slides_cloud/models/workbook.rb +0 -146
  243. data/lib/aspose_slides_cloud/models/xaml_export_options.rb +0 -124
  244. data/lib/aspose_slides_cloud/models/xps_export_options.rb +0 -124
  245. data/lib/aspose_slides_cloud/models/xy_series.rb +0 -146
  246. data/lib/aspose_slides_cloud/models/zoom_frame.rb +0 -146
  247. data/lib/aspose_slides_cloud/models/zoom_object.rb +0 -146
  248. data/lib/aspose_slides_cloud/type_registry.rb +7 -0
  249. data/lib/aspose_slides_cloud/version.rb +1 -1
  250. data/lib/aspose_slides_cloud.rb +6 -0
  251. data/spec/api/slides_api_spec.rb +15105 -9783
  252. data/spec/spec_utils.rb +1 -1
  253. data/spec/use_cases/auth_spec.rb +15 -0
  254. data/spec/use_cases/slide_spec.rb +9 -9
  255. data/spec/use_cases/table_spec.rb +392 -0
  256. data/spec/use_cases/vba_spec.rb +94 -0
  257. data/testConfig.json +2 -2
  258. data/testRules.json +10 -0
  259. metadata +57 -6
@@ -24,35 +24,13 @@ require 'date'
24
24
 
25
25
  module AsposeSlidesCloud
26
26
  # Mathematical paragraph that is a container for mathematical blocks
27
- class MathParagraph
27
+ class MathParagraph < BaseObject
28
28
  # List of math blocks
29
29
  attr_accessor :math_block_list
30
30
 
31
31
  # Justification of the math paragraph
32
32
  attr_accessor :justification
33
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
34
  # Attribute mapping from ruby-style variable name to JSON key.
57
35
  def self.attribute_map
58
36
  {
@@ -133,129 +111,5 @@ module AsposeSlidesCloud
133
111
  def hash
134
112
  [math_block_list, justification].hash
135
113
  end
136
-
137
- # Builds the object from hash
138
- # @param [Hash] attributes Model attributes in the form of hash
139
- # @return [Object] Returns the model itself
140
- def build_from_hash(attributes)
141
- return nil unless attributes.is_a?(Hash)
142
- self.class.swagger_types.each_pair do |key, type|
143
- mapKey = self.class.attribute_map[key]
144
- if !mapKey.nil?
145
- val = attributes[mapKey]
146
- if val.nil?
147
- mapKeyString = mapKey.to_s
148
- mapKeyString[0] = mapKeyString[0].downcase
149
- mapKey = mapKeyString.to_sym
150
- val = attributes[mapKey]
151
- end
152
- if !val.nil?
153
- if type =~ /\AArray<(.*)>/i
154
- # check to ensure the input is an array given that the the attribute
155
- # is documented as an array but the input is not
156
- if val.is_a?(Array)
157
- self.send("#{key}=", val.map { |v| _deserialize($1, v) })
158
- end
159
- else
160
- self.send("#{key}=", _deserialize(type, val))
161
- end
162
- end
163
- end
164
- end
165
-
166
- self
167
- end
168
-
169
- # Deserializes the data based on type
170
- # @param string type Data type
171
- # @param string value Value to be deserialized
172
- # @return [Object] Deserialized data
173
- def _deserialize(type, value)
174
- if value.nil?
175
- nil
176
- else
177
- case type.to_sym
178
- when :DateTime
179
- DateTime.parse(value)
180
- when :Date
181
- Date.parse(value)
182
- when :String
183
- value.to_s
184
- when :Integer
185
- value.to_i
186
- when :Float
187
- value.to_f
188
- when :BOOLEAN
189
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
190
- true
191
- else
192
- false
193
- end
194
- when :Object
195
- # generic object (usually a Hash), return directly
196
- value
197
- when /\AArray<(?<inner_type>.+)>\z/
198
- inner_type = Regexp.last_match[:inner_type]
199
- value.map { |v| _deserialize(inner_type, v) }
200
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
201
- k_type = Regexp.last_match[:k_type]
202
- v_type = Regexp.last_match[:v_type]
203
- {}.tap do |hash|
204
- value.each do |k, v|
205
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
206
- end
207
- end
208
- else # model
209
- registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
210
- if registry_type
211
- type = registry_type
212
- end
213
- temp_model = AsposeSlidesCloud.const_get(type).new
214
- temp_model.build_from_hash(value)
215
- end
216
- end
217
- end
218
-
219
- # Returns the string representation of the object
220
- # @return [String] String presentation of the object
221
- def to_s
222
- to_hash.to_s
223
- end
224
-
225
- # to_body is an alias to to_hash (backward compatibility)
226
- # @return [Hash] Returns the object in the form of hash
227
- def to_body
228
- to_hash
229
- end
230
-
231
- # Returns the object in the form of hash
232
- # @return [Hash] Returns the object in the form of hash
233
- def to_hash
234
- hash = {}
235
- self.class.attribute_map.each_pair do |attr, param|
236
- value = self.send(attr)
237
- next if value.nil?
238
- hash[param] = _to_hash(value)
239
- end
240
- hash
241
- end
242
-
243
- # Outputs non-array value in the form of hash
244
- # For object, use to_hash. Otherwise, just return the value
245
- # @param [Object] value Any valid value
246
- # @return [Hash] Returns the value in the form of hash
247
- def _to_hash(value)
248
- if value.is_a?(Array)
249
- value.compact.map { |v| _to_hash(v) }
250
- elsif value.is_a?(Hash)
251
- {}.tap do |hash|
252
- value.each { |k, v| hash[k] = _to_hash(v) }
253
- end
254
- elsif value.respond_to? :to_hash
255
- value.to_hash
256
- else
257
- value
258
- end
259
- end
260
114
  end
261
115
  end
@@ -49,28 +49,6 @@ module AsposeSlidesCloud
49
49
  # Matrix items
50
50
  attr_accessor :items
51
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.any?{ |s| s.casecmp(value) == 0 }
71
- end
72
- end
73
-
74
52
  # Attribute mapping from ruby-style variable name to JSON key.
75
53
  def self.attribute_map
76
54
  super.merge({
@@ -217,129 +195,5 @@ module AsposeSlidesCloud
217
195
  def hash
218
196
  [type, hide_placeholders, base_justification, min_column_width, column_gap_rule, column_gap, row_gap_rule, row_gap, items].hash
219
197
  end
220
-
221
- # Builds the object from hash
222
- # @param [Hash] attributes Model attributes in the form of hash
223
- # @return [Object] Returns the model itself
224
- def build_from_hash(attributes)
225
- return nil unless attributes.is_a?(Hash)
226
- self.class.swagger_types.each_pair do |key, type|
227
- mapKey = self.class.attribute_map[key]
228
- if !mapKey.nil?
229
- val = attributes[mapKey]
230
- if val.nil?
231
- mapKeyString = mapKey.to_s
232
- mapKeyString[0] = mapKeyString[0].downcase
233
- mapKey = mapKeyString.to_sym
234
- val = attributes[mapKey]
235
- end
236
- if !val.nil?
237
- if type =~ /\AArray<(.*)>/i
238
- # check to ensure the input is an array given that the the attribute
239
- # is documented as an array but the input is not
240
- if val.is_a?(Array)
241
- self.send("#{key}=", val.map { |v| _deserialize($1, v) })
242
- end
243
- else
244
- self.send("#{key}=", _deserialize(type, val))
245
- end
246
- end
247
- end
248
- end
249
-
250
- self
251
- end
252
-
253
- # Deserializes the data based on type
254
- # @param string type Data type
255
- # @param string value Value to be deserialized
256
- # @return [Object] Deserialized data
257
- def _deserialize(type, value)
258
- if value.nil?
259
- nil
260
- else
261
- case type.to_sym
262
- when :DateTime
263
- DateTime.parse(value)
264
- when :Date
265
- Date.parse(value)
266
- when :String
267
- value.to_s
268
- when :Integer
269
- value.to_i
270
- when :Float
271
- value.to_f
272
- when :BOOLEAN
273
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
274
- true
275
- else
276
- false
277
- end
278
- when :Object
279
- # generic object (usually a Hash), return directly
280
- value
281
- when /\AArray<(?<inner_type>.+)>\z/
282
- inner_type = Regexp.last_match[:inner_type]
283
- value.map { |v| _deserialize(inner_type, v) }
284
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
285
- k_type = Regexp.last_match[:k_type]
286
- v_type = Regexp.last_match[:v_type]
287
- {}.tap do |hash|
288
- value.each do |k, v|
289
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
290
- end
291
- end
292
- else # model
293
- registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
294
- if registry_type
295
- type = registry_type
296
- end
297
- temp_model = AsposeSlidesCloud.const_get(type).new
298
- temp_model.build_from_hash(value)
299
- end
300
- end
301
- end
302
-
303
- # Returns the string representation of the object
304
- # @return [String] String presentation of the object
305
- def to_s
306
- to_hash.to_s
307
- end
308
-
309
- # to_body is an alias to to_hash (backward compatibility)
310
- # @return [Hash] Returns the object in the form of hash
311
- def to_body
312
- to_hash
313
- end
314
-
315
- # Returns the object in the form of hash
316
- # @return [Hash] Returns the object in the form of hash
317
- def to_hash
318
- hash = {}
319
- self.class.attribute_map.each_pair do |attr, param|
320
- value = self.send(attr)
321
- next if value.nil?
322
- hash[param] = _to_hash(value)
323
- end
324
- hash
325
- end
326
-
327
- # Outputs non-array value in the form of hash
328
- # For object, use to_hash. Otherwise, just return the value
329
- # @param [Object] value Any valid value
330
- # @return [Hash] Returns the value in the form of hash
331
- def _to_hash(value)
332
- if value.is_a?(Array)
333
- value.compact.map { |v| _to_hash(v) }
334
- elsif value.is_a?(Hash)
335
- {}.tap do |hash|
336
- value.each { |k, v| hash[k] = _to_hash(v) }
337
- end
338
- elsif value.respond_to? :to_hash
339
- value.to_hash
340
- else
341
- value
342
- end
343
- end
344
198
  end
345
199
  end
@@ -28,28 +28,6 @@ module AsposeSlidesCloud
28
28
  # Information about documents and slides being merging sources.
29
29
  attr_accessor :presentations
30
30
 
31
- class EnumAttributeValidator
32
- attr_reader :datatype
33
- attr_reader :allowable_values
34
-
35
- def initialize(datatype, allowable_values)
36
- @allowable_values = allowable_values.map do |value|
37
- case datatype.to_s
38
- when /Integer/i
39
- value.to_i
40
- when /Float/i
41
- value.to_f
42
- else
43
- value
44
- end
45
- end
46
- end
47
-
48
- def valid?(value)
49
- !value || allowable_values.any?{ |s| s.casecmp(value) == 0 }
50
- end
51
- end
52
-
53
31
  # Attribute mapping from ruby-style variable name to JSON key.
54
32
  def self.attribute_map
55
33
  super.merge({
@@ -111,129 +89,5 @@ module AsposeSlidesCloud
111
89
  def hash
112
90
  [type, presentations].hash
113
91
  end
114
-
115
- # Builds the object from hash
116
- # @param [Hash] attributes Model attributes in the form of hash
117
- # @return [Object] Returns the model itself
118
- def build_from_hash(attributes)
119
- return nil unless attributes.is_a?(Hash)
120
- self.class.swagger_types.each_pair do |key, type|
121
- mapKey = self.class.attribute_map[key]
122
- if !mapKey.nil?
123
- val = attributes[mapKey]
124
- if val.nil?
125
- mapKeyString = mapKey.to_s
126
- mapKeyString[0] = mapKeyString[0].downcase
127
- mapKey = mapKeyString.to_sym
128
- val = attributes[mapKey]
129
- end
130
- if !val.nil?
131
- if type =~ /\AArray<(.*)>/i
132
- # check to ensure the input is an array given that the the attribute
133
- # is documented as an array but the input is not
134
- if val.is_a?(Array)
135
- self.send("#{key}=", val.map { |v| _deserialize($1, v) })
136
- end
137
- else
138
- self.send("#{key}=", _deserialize(type, val))
139
- end
140
- end
141
- end
142
- end
143
-
144
- self
145
- end
146
-
147
- # Deserializes the data based on type
148
- # @param string type Data type
149
- # @param string value Value to be deserialized
150
- # @return [Object] Deserialized data
151
- def _deserialize(type, value)
152
- if value.nil?
153
- nil
154
- else
155
- case type.to_sym
156
- when :DateTime
157
- DateTime.parse(value)
158
- when :Date
159
- Date.parse(value)
160
- when :String
161
- value.to_s
162
- when :Integer
163
- value.to_i
164
- when :Float
165
- value.to_f
166
- when :BOOLEAN
167
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
168
- true
169
- else
170
- false
171
- end
172
- when :Object
173
- # generic object (usually a Hash), return directly
174
- value
175
- when /\AArray<(?<inner_type>.+)>\z/
176
- inner_type = Regexp.last_match[:inner_type]
177
- value.map { |v| _deserialize(inner_type, v) }
178
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
179
- k_type = Regexp.last_match[:k_type]
180
- v_type = Regexp.last_match[:v_type]
181
- {}.tap do |hash|
182
- value.each do |k, v|
183
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
184
- end
185
- end
186
- else # model
187
- registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
188
- if registry_type
189
- type = registry_type
190
- end
191
- temp_model = AsposeSlidesCloud.const_get(type).new
192
- temp_model.build_from_hash(value)
193
- end
194
- end
195
- end
196
-
197
- # Returns the string representation of the object
198
- # @return [String] String presentation of the object
199
- def to_s
200
- to_hash.to_s
201
- end
202
-
203
- # to_body is an alias to to_hash (backward compatibility)
204
- # @return [Hash] Returns the object in the form of hash
205
- def to_body
206
- to_hash
207
- end
208
-
209
- # Returns the object in the form of hash
210
- # @return [Hash] Returns the object in the form of hash
211
- def to_hash
212
- hash = {}
213
- self.class.attribute_map.each_pair do |attr, param|
214
- value = self.send(attr)
215
- next if value.nil?
216
- hash[param] = _to_hash(value)
217
- end
218
- hash
219
- end
220
-
221
- # Outputs non-array value in the form of hash
222
- # For object, use to_hash. Otherwise, just return the value
223
- # @param [Object] value Any valid value
224
- # @return [Hash] Returns the value in the form of hash
225
- def _to_hash(value)
226
- if value.is_a?(Array)
227
- value.compact.map { |v| _to_hash(v) }
228
- elsif value.is_a?(Hash)
229
- {}.tap do |hash|
230
- value.each { |k, v| hash[k] = _to_hash(v) }
231
- end
232
- elsif value.respond_to? :to_hash
233
- value.to_hash
234
- else
235
- value
236
- end
237
- end
238
92
  end
239
93
  end
@@ -24,7 +24,7 @@ require 'date'
24
24
 
25
25
  module AsposeSlidesCloud
26
26
  # Merging source.
27
- class MergingSource
27
+ class MergingSource < BaseObject
28
28
  # Source file.
29
29
  attr_accessor :input
30
30
 
@@ -99,129 +99,5 @@ module AsposeSlidesCloud
99
99
  def hash
100
100
  [input, slides].hash
101
101
  end
102
-
103
- # Builds the object from hash
104
- # @param [Hash] attributes Model attributes in the form of hash
105
- # @return [Object] Returns the model itself
106
- def build_from_hash(attributes)
107
- return nil unless attributes.is_a?(Hash)
108
- self.class.swagger_types.each_pair do |key, type|
109
- mapKey = self.class.attribute_map[key]
110
- if !mapKey.nil?
111
- val = attributes[mapKey]
112
- if val.nil?
113
- mapKeyString = mapKey.to_s
114
- mapKeyString[0] = mapKeyString[0].downcase
115
- mapKey = mapKeyString.to_sym
116
- val = attributes[mapKey]
117
- end
118
- if !val.nil?
119
- if type =~ /\AArray<(.*)>/i
120
- # check to ensure the input is an array given that the the attribute
121
- # is documented as an array but the input is not
122
- if val.is_a?(Array)
123
- self.send("#{key}=", val.map { |v| _deserialize($1, v) })
124
- end
125
- else
126
- self.send("#{key}=", _deserialize(type, val))
127
- end
128
- end
129
- end
130
- end
131
-
132
- self
133
- end
134
-
135
- # Deserializes the data based on type
136
- # @param string type Data type
137
- # @param string value Value to be deserialized
138
- # @return [Object] Deserialized data
139
- def _deserialize(type, value)
140
- if value.nil?
141
- nil
142
- else
143
- case type.to_sym
144
- when :DateTime
145
- DateTime.parse(value)
146
- when :Date
147
- Date.parse(value)
148
- when :String
149
- value.to_s
150
- when :Integer
151
- value.to_i
152
- when :Float
153
- value.to_f
154
- when :BOOLEAN
155
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
156
- true
157
- else
158
- false
159
- end
160
- when :Object
161
- # generic object (usually a Hash), return directly
162
- value
163
- when /\AArray<(?<inner_type>.+)>\z/
164
- inner_type = Regexp.last_match[:inner_type]
165
- value.map { |v| _deserialize(inner_type, v) }
166
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
167
- k_type = Regexp.last_match[:k_type]
168
- v_type = Regexp.last_match[:v_type]
169
- {}.tap do |hash|
170
- value.each do |k, v|
171
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
172
- end
173
- end
174
- else # model
175
- registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
176
- if registry_type
177
- type = registry_type
178
- end
179
- temp_model = AsposeSlidesCloud.const_get(type).new
180
- temp_model.build_from_hash(value)
181
- end
182
- end
183
- end
184
-
185
- # Returns the string representation of the object
186
- # @return [String] String presentation of the object
187
- def to_s
188
- to_hash.to_s
189
- end
190
-
191
- # to_body is an alias to to_hash (backward compatibility)
192
- # @return [Hash] Returns the object in the form of hash
193
- def to_body
194
- to_hash
195
- end
196
-
197
- # Returns the object in the form of hash
198
- # @return [Hash] Returns the object in the form of hash
199
- def to_hash
200
- hash = {}
201
- self.class.attribute_map.each_pair do |attr, param|
202
- value = self.send(attr)
203
- next if value.nil?
204
- hash[param] = _to_hash(value)
205
- end
206
- hash
207
- end
208
-
209
- # Outputs non-array value in the form of hash
210
- # For object, use to_hash. Otherwise, just return the value
211
- # @param [Object] value Any valid value
212
- # @return [Hash] Returns the value in the form of hash
213
- def _to_hash(value)
214
- if value.is_a?(Array)
215
- value.compact.map { |v| _to_hash(v) }
216
- elsif value.is_a?(Hash)
217
- {}.tap do |hash|
218
- value.each { |k, v| hash[k] = _to_hash(v) }
219
- end
220
- elsif value.respond_to? :to_hash
221
- value.to_hash
222
- else
223
- value
224
- end
225
- end
226
102
  end
227
103
  end