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,7 +24,7 @@ require 'date'
24
24
 
25
25
  module AsposeSlidesCloud
26
26
  # Represents Resource URI
27
- class ResourceUri
27
+ class ResourceUri < BaseObject
28
28
  # Gets or sets the href.
29
29
  attr_accessor :href
30
30
 
@@ -137,129 +137,5 @@ module AsposeSlidesCloud
137
137
  def hash
138
138
  [href, relation, link_type, title, slide_index, shape_index].hash
139
139
  end
140
-
141
- # Builds the object from hash
142
- # @param [Hash] attributes Model attributes in the form of hash
143
- # @return [Object] Returns the model itself
144
- def build_from_hash(attributes)
145
- return nil unless attributes.is_a?(Hash)
146
- self.class.swagger_types.each_pair do |key, type|
147
- mapKey = self.class.attribute_map[key]
148
- if !mapKey.nil?
149
- val = attributes[mapKey]
150
- if val.nil?
151
- mapKeyString = mapKey.to_s
152
- mapKeyString[0] = mapKeyString[0].downcase
153
- mapKey = mapKeyString.to_sym
154
- val = attributes[mapKey]
155
- end
156
- if !val.nil?
157
- if type =~ /\AArray<(.*)>/i
158
- # check to ensure the input is an array given that the the attribute
159
- # is documented as an array but the input is not
160
- if val.is_a?(Array)
161
- self.send("#{key}=", val.map { |v| _deserialize($1, v) })
162
- end
163
- else
164
- self.send("#{key}=", _deserialize(type, val))
165
- end
166
- end
167
- end
168
- end
169
-
170
- self
171
- end
172
-
173
- # Deserializes the data based on type
174
- # @param string type Data type
175
- # @param string value Value to be deserialized
176
- # @return [Object] Deserialized data
177
- def _deserialize(type, value)
178
- if value.nil?
179
- nil
180
- else
181
- case type.to_sym
182
- when :DateTime
183
- DateTime.parse(value)
184
- when :Date
185
- Date.parse(value)
186
- when :String
187
- value.to_s
188
- when :Integer
189
- value.to_i
190
- when :Float
191
- value.to_f
192
- when :BOOLEAN
193
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
194
- true
195
- else
196
- false
197
- end
198
- when :Object
199
- # generic object (usually a Hash), return directly
200
- value
201
- when /\AArray<(?<inner_type>.+)>\z/
202
- inner_type = Regexp.last_match[:inner_type]
203
- value.map { |v| _deserialize(inner_type, v) }
204
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
205
- k_type = Regexp.last_match[:k_type]
206
- v_type = Regexp.last_match[:v_type]
207
- {}.tap do |hash|
208
- value.each do |k, v|
209
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
210
- end
211
- end
212
- else # model
213
- registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
214
- if registry_type
215
- type = registry_type
216
- end
217
- temp_model = AsposeSlidesCloud.const_get(type).new
218
- temp_model.build_from_hash(value)
219
- end
220
- end
221
- end
222
-
223
- # Returns the string representation of the object
224
- # @return [String] String presentation of the object
225
- def to_s
226
- to_hash.to_s
227
- end
228
-
229
- # to_body is an alias to to_hash (backward compatibility)
230
- # @return [Hash] Returns the object in the form of hash
231
- def to_body
232
- to_hash
233
- end
234
-
235
- # Returns the object in the form of hash
236
- # @return [Hash] Returns the object in the form of hash
237
- def to_hash
238
- hash = {}
239
- self.class.attribute_map.each_pair do |attr, param|
240
- value = self.send(attr)
241
- next if value.nil?
242
- hash[param] = _to_hash(value)
243
- end
244
- hash
245
- end
246
-
247
- # Outputs non-array value in the form of hash
248
- # For object, use to_hash. Otherwise, just return the value
249
- # @param [Object] value Any valid value
250
- # @return [Hash] Returns the value in the form of hash
251
- def _to_hash(value)
252
- if value.is_a?(Array)
253
- value.compact.map { |v| _to_hash(v) }
254
- elsif value.is_a?(Hash)
255
- {}.tap do |hash|
256
- value.each { |k, v| hash[k] = _to_hash(v) }
257
- end
258
- elsif value.respond_to? :to_hash
259
- value.to_hash
260
- else
261
- value
262
- end
263
- end
264
140
  end
265
141
  end
@@ -25,28 +25,6 @@ require 'date'
25
25
  module AsposeSlidesCloud
26
26
  # Represents output file that will be sent to response.
27
27
  class ResponseOutputFile < OutputFile
28
- class EnumAttributeValidator
29
- attr_reader :datatype
30
- attr_reader :allowable_values
31
-
32
- def initialize(datatype, allowable_values)
33
- @allowable_values = allowable_values.map do |value|
34
- case datatype.to_s
35
- when /Integer/i
36
- value.to_i
37
- when /Float/i
38
- value.to_f
39
- else
40
- value
41
- end
42
- end
43
- end
44
-
45
- def valid?(value)
46
- !value || allowable_values.any?{ |s| s.casecmp(value) == 0 }
47
- end
48
- end
49
-
50
28
  # Attribute mapping from ruby-style variable name to JSON key.
51
29
  def self.attribute_map
52
30
  super.merge({
@@ -99,129 +77,5 @@ module AsposeSlidesCloud
99
77
  def hash
100
78
  [type].hash
101
79
  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
80
  end
227
81
  end
@@ -37,28 +37,6 @@ module AsposeSlidesCloud
37
37
  # Alignment of subscript/superscript.
38
38
  attr_accessor :align_scripts
39
39
 
40
- class EnumAttributeValidator
41
- attr_reader :datatype
42
- attr_reader :allowable_values
43
-
44
- def initialize(datatype, allowable_values)
45
- @allowable_values = allowable_values.map do |value|
46
- case datatype.to_s
47
- when /Integer/i
48
- value.to_i
49
- when /Float/i
50
- value.to_f
51
- else
52
- value
53
- end
54
- end
55
- end
56
-
57
- def valid?(value)
58
- !value || allowable_values.any?{ |s| s.casecmp(value) == 0 }
59
- end
60
- end
61
-
62
40
  # Attribute mapping from ruby-style variable name to JSON key.
63
41
  def self.attribute_map
64
42
  super.merge({
@@ -139,129 +117,5 @@ module AsposeSlidesCloud
139
117
  def hash
140
118
  [type, base, subscript, superscript, align_scripts].hash
141
119
  end
142
-
143
- # Builds the object from hash
144
- # @param [Hash] attributes Model attributes in the form of hash
145
- # @return [Object] Returns the model itself
146
- def build_from_hash(attributes)
147
- return nil unless attributes.is_a?(Hash)
148
- self.class.swagger_types.each_pair do |key, type|
149
- mapKey = self.class.attribute_map[key]
150
- if !mapKey.nil?
151
- val = attributes[mapKey]
152
- if val.nil?
153
- mapKeyString = mapKey.to_s
154
- mapKeyString[0] = mapKeyString[0].downcase
155
- mapKey = mapKeyString.to_sym
156
- val = attributes[mapKey]
157
- end
158
- if !val.nil?
159
- if type =~ /\AArray<(.*)>/i
160
- # check to ensure the input is an array given that the the attribute
161
- # is documented as an array but the input is not
162
- if val.is_a?(Array)
163
- self.send("#{key}=", val.map { |v| _deserialize($1, v) })
164
- end
165
- else
166
- self.send("#{key}=", _deserialize(type, val))
167
- end
168
- end
169
- end
170
- end
171
-
172
- self
173
- end
174
-
175
- # Deserializes the data based on type
176
- # @param string type Data type
177
- # @param string value Value to be deserialized
178
- # @return [Object] Deserialized data
179
- def _deserialize(type, value)
180
- if value.nil?
181
- nil
182
- else
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
- 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
120
  end
267
121
  end
@@ -34,28 +34,6 @@ module AsposeSlidesCloud
34
34
  # Save options.
35
35
  attr_accessor :options
36
36
 
37
- class EnumAttributeValidator
38
- attr_reader :datatype
39
- attr_reader :allowable_values
40
-
41
- def initialize(datatype, allowable_values)
42
- @allowable_values = allowable_values.map do |value|
43
- case datatype.to_s
44
- when /Integer/i
45
- value.to_i
46
- when /Float/i
47
- value.to_f
48
- else
49
- value
50
- end
51
- end
52
- end
53
-
54
- def valid?(value)
55
- !value || allowable_values.any?{ |s| s.casecmp(value) == 0 }
56
- end
57
- end
58
-
59
37
  # Attribute mapping from ruby-style variable name to JSON key.
60
38
  def self.attribute_map
61
39
  super.merge({
@@ -146,129 +124,5 @@ module AsposeSlidesCloud
146
124
  def hash
147
125
  [type, format, output, options].hash
148
126
  end
149
-
150
- # Builds the object from hash
151
- # @param [Hash] attributes Model attributes in the form of hash
152
- # @return [Object] Returns the model itself
153
- def build_from_hash(attributes)
154
- return nil unless attributes.is_a?(Hash)
155
- self.class.swagger_types.each_pair do |key, type|
156
- mapKey = self.class.attribute_map[key]
157
- if !mapKey.nil?
158
- val = attributes[mapKey]
159
- if val.nil?
160
- mapKeyString = mapKey.to_s
161
- mapKeyString[0] = mapKeyString[0].downcase
162
- mapKey = mapKeyString.to_sym
163
- val = attributes[mapKey]
164
- end
165
- if !val.nil?
166
- if type =~ /\AArray<(.*)>/i
167
- # check to ensure the input is an array given that the the attribute
168
- # is documented as an array but the input is not
169
- if val.is_a?(Array)
170
- self.send("#{key}=", val.map { |v| _deserialize($1, v) })
171
- end
172
- else
173
- self.send("#{key}=", _deserialize(type, val))
174
- end
175
- end
176
- end
177
- end
178
-
179
- self
180
- end
181
-
182
- # Deserializes the data based on type
183
- # @param string type Data type
184
- # @param string value Value to be deserialized
185
- # @return [Object] Deserialized data
186
- def _deserialize(type, value)
187
- if value.nil?
188
- nil
189
- else
190
- case type.to_sym
191
- when :DateTime
192
- DateTime.parse(value)
193
- when :Date
194
- Date.parse(value)
195
- when :String
196
- value.to_s
197
- when :Integer
198
- value.to_i
199
- when :Float
200
- value.to_f
201
- when :BOOLEAN
202
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
203
- true
204
- else
205
- false
206
- end
207
- when :Object
208
- # generic object (usually a Hash), return directly
209
- value
210
- when /\AArray<(?<inner_type>.+)>\z/
211
- inner_type = Regexp.last_match[:inner_type]
212
- value.map { |v| _deserialize(inner_type, v) }
213
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
214
- k_type = Regexp.last_match[:k_type]
215
- v_type = Regexp.last_match[:v_type]
216
- {}.tap do |hash|
217
- value.each do |k, v|
218
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
219
- end
220
- end
221
- else # model
222
- registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
223
- if registry_type
224
- type = registry_type
225
- end
226
- temp_model = AsposeSlidesCloud.const_get(type).new
227
- temp_model.build_from_hash(value)
228
- end
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
127
  end
274
128
  end