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
@@ -28,28 +28,6 @@ module AsposeSlidesCloud
28
28
  # The new opacity value.
29
29
  attr_accessor :alpha
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({
@@ -114,129 +92,5 @@ module AsposeSlidesCloud
114
92
  def hash
115
93
  [type, alpha].hash
116
94
  end
117
-
118
- # Builds the object from hash
119
- # @param [Hash] attributes Model attributes in the form of hash
120
- # @return [Object] Returns the model itself
121
- def build_from_hash(attributes)
122
- return nil unless attributes.is_a?(Hash)
123
- self.class.swagger_types.each_pair do |key, type|
124
- mapKey = self.class.attribute_map[key]
125
- if !mapKey.nil?
126
- val = attributes[mapKey]
127
- if val.nil?
128
- mapKeyString = mapKey.to_s
129
- mapKeyString[0] = mapKeyString[0].downcase
130
- mapKey = mapKeyString.to_sym
131
- val = attributes[mapKey]
132
- end
133
- if !val.nil?
134
- if type =~ /\AArray<(.*)>/i
135
- # check to ensure the input is an array given that the the attribute
136
- # is documented as an array but the input is not
137
- if val.is_a?(Array)
138
- self.send("#{key}=", val.map { |v| _deserialize($1, v) })
139
- end
140
- else
141
- self.send("#{key}=", _deserialize(type, val))
142
- end
143
- end
144
- end
145
- end
146
-
147
- self
148
- end
149
-
150
- # Deserializes the data based on type
151
- # @param string type Data type
152
- # @param string value Value to be deserialized
153
- # @return [Object] Deserialized data
154
- def _deserialize(type, value)
155
- if value.nil?
156
- nil
157
- else
158
- case type.to_sym
159
- when :DateTime
160
- DateTime.parse(value)
161
- when :Date
162
- Date.parse(value)
163
- when :String
164
- value.to_s
165
- when :Integer
166
- value.to_i
167
- when :Float
168
- value.to_f
169
- when :BOOLEAN
170
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
171
- true
172
- else
173
- false
174
- end
175
- when :Object
176
- # generic object (usually a Hash), return directly
177
- value
178
- when /\AArray<(?<inner_type>.+)>\z/
179
- inner_type = Regexp.last_match[:inner_type]
180
- value.map { |v| _deserialize(inner_type, v) }
181
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
182
- k_type = Regexp.last_match[:k_type]
183
- v_type = Regexp.last_match[:v_type]
184
- {}.tap do |hash|
185
- value.each do |k, v|
186
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
187
- end
188
- end
189
- else # model
190
- registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
191
- if registry_type
192
- type = registry_type
193
- end
194
- temp_model = AsposeSlidesCloud.const_get(type).new
195
- temp_model.build_from_hash(value)
196
- end
197
- end
198
- end
199
-
200
- # Returns the string representation of the object
201
- # @return [String] String presentation of the object
202
- def to_s
203
- to_hash.to_s
204
- end
205
-
206
- # to_body is an alias to to_hash (backward compatibility)
207
- # @return [Hash] Returns the object in the form of hash
208
- def to_body
209
- to_hash
210
- end
211
-
212
- # Returns the object in the form of hash
213
- # @return [Hash] Returns the object in the form of hash
214
- def to_hash
215
- hash = {}
216
- self.class.attribute_map.each_pair do |attr, param|
217
- value = self.send(attr)
218
- next if value.nil?
219
- hash[param] = _to_hash(value)
220
- end
221
- hash
222
- end
223
-
224
- # Outputs non-array value in the form of hash
225
- # For object, use to_hash. Otherwise, just return the value
226
- # @param [Object] value Any valid value
227
- # @return [Hash] Returns the value in the form of hash
228
- def _to_hash(value)
229
- if value.is_a?(Array)
230
- value.compact.map { |v| _to_hash(v) }
231
- elsif value.is_a?(Hash)
232
- {}.tap do |hash|
233
- value.each { |k, v| hash[k] = _to_hash(v) }
234
- end
235
- elsif value.respond_to? :to_hash
236
- value.to_hash
237
- else
238
- value
239
- end
240
- end
241
95
  end
242
96
  end
@@ -24,7 +24,7 @@ require 'date'
24
24
 
25
25
  module AsposeSlidesCloud
26
26
  # Represents response for ApiInfo DTO
27
- class ApiInfo
27
+ class ApiInfo < BaseObject
28
28
  # Product name.
29
29
  attr_accessor :name
30
30
 
@@ -97,129 +97,5 @@ module AsposeSlidesCloud
97
97
  def hash
98
98
  [name, version].hash
99
99
  end
100
-
101
- # Builds the object from hash
102
- # @param [Hash] attributes Model attributes in the form of hash
103
- # @return [Object] Returns the model itself
104
- def build_from_hash(attributes)
105
- return nil unless attributes.is_a?(Hash)
106
- self.class.swagger_types.each_pair do |key, type|
107
- mapKey = self.class.attribute_map[key]
108
- if !mapKey.nil?
109
- val = attributes[mapKey]
110
- if val.nil?
111
- mapKeyString = mapKey.to_s
112
- mapKeyString[0] = mapKeyString[0].downcase
113
- mapKey = mapKeyString.to_sym
114
- val = attributes[mapKey]
115
- end
116
- if !val.nil?
117
- if type =~ /\AArray<(.*)>/i
118
- # check to ensure the input is an array given that the the attribute
119
- # is documented as an array but the input is not
120
- if val.is_a?(Array)
121
- self.send("#{key}=", val.map { |v| _deserialize($1, v) })
122
- end
123
- else
124
- self.send("#{key}=", _deserialize(type, val))
125
- end
126
- end
127
- end
128
- end
129
-
130
- self
131
- end
132
-
133
- # Deserializes the data based on type
134
- # @param string type Data type
135
- # @param string value Value to be deserialized
136
- # @return [Object] Deserialized data
137
- def _deserialize(type, value)
138
- if value.nil?
139
- nil
140
- else
141
- case type.to_sym
142
- when :DateTime
143
- DateTime.parse(value)
144
- when :Date
145
- Date.parse(value)
146
- when :String
147
- value.to_s
148
- when :Integer
149
- value.to_i
150
- when :Float
151
- value.to_f
152
- when :BOOLEAN
153
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
154
- true
155
- else
156
- false
157
- end
158
- when :Object
159
- # generic object (usually a Hash), return directly
160
- value
161
- when /\AArray<(?<inner_type>.+)>\z/
162
- inner_type = Regexp.last_match[:inner_type]
163
- value.map { |v| _deserialize(inner_type, v) }
164
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
165
- k_type = Regexp.last_match[:k_type]
166
- v_type = Regexp.last_match[:v_type]
167
- {}.tap do |hash|
168
- value.each do |k, v|
169
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
170
- end
171
- end
172
- else # model
173
- registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
174
- if registry_type
175
- type = registry_type
176
- end
177
- temp_model = AsposeSlidesCloud.const_get(type).new
178
- temp_model.build_from_hash(value)
179
- end
180
- end
181
- end
182
-
183
- # Returns the string representation of the object
184
- # @return [String] String presentation of the object
185
- def to_s
186
- to_hash.to_s
187
- end
188
-
189
- # to_body is an alias to to_hash (backward compatibility)
190
- # @return [Hash] Returns the object in the form of hash
191
- def to_body
192
- to_hash
193
- end
194
-
195
- # Returns the object in the form of hash
196
- # @return [Hash] Returns the object in the form of hash
197
- def to_hash
198
- hash = {}
199
- self.class.attribute_map.each_pair do |attr, param|
200
- value = self.send(attr)
201
- next if value.nil?
202
- hash[param] = _to_hash(value)
203
- end
204
- hash
205
- end
206
-
207
- # Outputs non-array value in the form of hash
208
- # For object, use to_hash. Otherwise, just return the value
209
- # @param [Object] value Any valid value
210
- # @return [Hash] Returns the value in the form of hash
211
- def _to_hash(value)
212
- if value.is_a?(Array)
213
- value.compact.map { |v| _to_hash(v) }
214
- elsif value.is_a?(Hash)
215
- {}.tap do |hash|
216
- value.each { |k, v| hash[k] = _to_hash(v) }
217
- end
218
- elsif value.respond_to? :to_hash
219
- value.to_hash
220
- else
221
- value
222
- end
223
- end
224
100
  end
225
101
  end
@@ -37,28 +37,6 @@ module AsposeSlidesCloud
37
37
  # Sweep angle
38
38
  attr_accessor :sweep_angle
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({
@@ -159,129 +137,5 @@ module AsposeSlidesCloud
159
137
  def hash
160
138
  [type, width, height, start_angle, sweep_angle].hash
161
139
  end
162
-
163
- # Builds the object from hash
164
- # @param [Hash] attributes Model attributes in the form of hash
165
- # @return [Object] Returns the model itself
166
- def build_from_hash(attributes)
167
- return nil unless attributes.is_a?(Hash)
168
- self.class.swagger_types.each_pair do |key, type|
169
- mapKey = self.class.attribute_map[key]
170
- if !mapKey.nil?
171
- val = attributes[mapKey]
172
- if val.nil?
173
- mapKeyString = mapKey.to_s
174
- mapKeyString[0] = mapKeyString[0].downcase
175
- mapKey = mapKeyString.to_sym
176
- val = attributes[mapKey]
177
- end
178
- if !val.nil?
179
- if type =~ /\AArray<(.*)>/i
180
- # check to ensure the input is an array given that the the attribute
181
- # is documented as an array but the input is not
182
- if val.is_a?(Array)
183
- self.send("#{key}=", val.map { |v| _deserialize($1, v) })
184
- end
185
- else
186
- self.send("#{key}=", _deserialize(type, val))
187
- end
188
- end
189
- end
190
- end
191
-
192
- self
193
- end
194
-
195
- # Deserializes the data based on type
196
- # @param string type Data type
197
- # @param string value Value to be deserialized
198
- # @return [Object] Deserialized data
199
- def _deserialize(type, value)
200
- if value.nil?
201
- nil
202
- else
203
- case type.to_sym
204
- when :DateTime
205
- DateTime.parse(value)
206
- when :Date
207
- Date.parse(value)
208
- when :String
209
- value.to_s
210
- when :Integer
211
- value.to_i
212
- when :Float
213
- value.to_f
214
- when :BOOLEAN
215
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
216
- true
217
- else
218
- false
219
- end
220
- when :Object
221
- # generic object (usually a Hash), return directly
222
- value
223
- when /\AArray<(?<inner_type>.+)>\z/
224
- inner_type = Regexp.last_match[:inner_type]
225
- value.map { |v| _deserialize(inner_type, v) }
226
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
227
- k_type = Regexp.last_match[:k_type]
228
- v_type = Regexp.last_match[:v_type]
229
- {}.tap do |hash|
230
- value.each do |k, v|
231
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
232
- end
233
- end
234
- else # model
235
- registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
236
- if registry_type
237
- type = registry_type
238
- end
239
- temp_model = AsposeSlidesCloud.const_get(type).new
240
- temp_model.build_from_hash(value)
241
- end
242
- end
243
- end
244
-
245
- # Returns the string representation of the object
246
- # @return [String] String presentation of the object
247
- def to_s
248
- to_hash.to_s
249
- end
250
-
251
- # to_body is an alias to to_hash (backward compatibility)
252
- # @return [Hash] Returns the object in the form of hash
253
- def to_body
254
- to_hash
255
- end
256
-
257
- # Returns the object in the form of hash
258
- # @return [Hash] Returns the object in the form of hash
259
- def to_hash
260
- hash = {}
261
- self.class.attribute_map.each_pair do |attr, param|
262
- value = self.send(attr)
263
- next if value.nil?
264
- hash[param] = _to_hash(value)
265
- end
266
- hash
267
- end
268
-
269
- # Outputs non-array value in the form of hash
270
- # For object, use to_hash. Otherwise, just return the value
271
- # @param [Object] value Any valid value
272
- # @return [Hash] Returns the value in the form of hash
273
- def _to_hash(value)
274
- if value.is_a?(Array)
275
- value.compact.map { |v| _to_hash(v) }
276
- elsif value.is_a?(Hash)
277
- {}.tap do |hash|
278
- value.each { |k, v| hash[k] = _to_hash(v) }
279
- end
280
- elsif value.respond_to? :to_hash
281
- value.to_hash
282
- else
283
- value
284
- end
285
- end
286
140
  end
287
141
  end
@@ -43,28 +43,6 @@ module AsposeSlidesCloud
43
43
  # Spacing between rows of an array
44
44
  attr_accessor :row_spacing
45
45
 
46
- class EnumAttributeValidator
47
- attr_reader :datatype
48
- attr_reader :allowable_values
49
-
50
- def initialize(datatype, allowable_values)
51
- @allowable_values = allowable_values.map do |value|
52
- case datatype.to_s
53
- when /Integer/i
54
- value.to_i
55
- when /Float/i
56
- value.to_f
57
- else
58
- value
59
- end
60
- end
61
- end
62
-
63
- def valid?(value)
64
- !value || allowable_values.any?{ |s| s.casecmp(value) == 0 }
65
- end
66
- end
67
-
68
46
  # Attribute mapping from ruby-style variable name to JSON key.
69
47
  def self.attribute_map
70
48
  super.merge({
@@ -185,129 +163,5 @@ module AsposeSlidesCloud
185
163
  def hash
186
164
  [type, arguments, base_justification, maximum_distribution, object_distribution, row_spacing_rule, row_spacing].hash
187
165
  end
188
-
189
- # Builds the object from hash
190
- # @param [Hash] attributes Model attributes in the form of hash
191
- # @return [Object] Returns the model itself
192
- def build_from_hash(attributes)
193
- return nil unless attributes.is_a?(Hash)
194
- self.class.swagger_types.each_pair do |key, type|
195
- mapKey = self.class.attribute_map[key]
196
- if !mapKey.nil?
197
- val = attributes[mapKey]
198
- if val.nil?
199
- mapKeyString = mapKey.to_s
200
- mapKeyString[0] = mapKeyString[0].downcase
201
- mapKey = mapKeyString.to_sym
202
- val = attributes[mapKey]
203
- end
204
- if !val.nil?
205
- if type =~ /\AArray<(.*)>/i
206
- # check to ensure the input is an array given that the the attribute
207
- # is documented as an array but the input is not
208
- if val.is_a?(Array)
209
- self.send("#{key}=", val.map { |v| _deserialize($1, v) })
210
- end
211
- else
212
- self.send("#{key}=", _deserialize(type, val))
213
- end
214
- end
215
- end
216
- end
217
-
218
- self
219
- end
220
-
221
- # Deserializes the data based on type
222
- # @param string type Data type
223
- # @param string value Value to be deserialized
224
- # @return [Object] Deserialized data
225
- def _deserialize(type, value)
226
- if value.nil?
227
- nil
228
- else
229
- case type.to_sym
230
- when :DateTime
231
- DateTime.parse(value)
232
- when :Date
233
- Date.parse(value)
234
- when :String
235
- value.to_s
236
- when :Integer
237
- value.to_i
238
- when :Float
239
- value.to_f
240
- when :BOOLEAN
241
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
242
- true
243
- else
244
- false
245
- end
246
- when :Object
247
- # generic object (usually a Hash), return directly
248
- value
249
- when /\AArray<(?<inner_type>.+)>\z/
250
- inner_type = Regexp.last_match[:inner_type]
251
- value.map { |v| _deserialize(inner_type, v) }
252
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
253
- k_type = Regexp.last_match[:k_type]
254
- v_type = Regexp.last_match[:v_type]
255
- {}.tap do |hash|
256
- value.each do |k, v|
257
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
258
- end
259
- end
260
- else # model
261
- registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
262
- if registry_type
263
- type = registry_type
264
- end
265
- temp_model = AsposeSlidesCloud.const_get(type).new
266
- temp_model.build_from_hash(value)
267
- end
268
- end
269
- end
270
-
271
- # Returns the string representation of the object
272
- # @return [String] String presentation of the object
273
- def to_s
274
- to_hash.to_s
275
- end
276
-
277
- # to_body is an alias to to_hash (backward compatibility)
278
- # @return [Hash] Returns the object in the form of hash
279
- def to_body
280
- to_hash
281
- end
282
-
283
- # Returns the object in the form of hash
284
- # @return [Hash] Returns the object in the form of hash
285
- def to_hash
286
- hash = {}
287
- self.class.attribute_map.each_pair do |attr, param|
288
- value = self.send(attr)
289
- next if value.nil?
290
- hash[param] = _to_hash(value)
291
- end
292
- hash
293
- end
294
-
295
- # Outputs non-array value in the form of hash
296
- # For object, use to_hash. Otherwise, just return the value
297
- # @param [Object] value Any valid value
298
- # @return [Hash] Returns the value in the form of hash
299
- def _to_hash(value)
300
- if value.is_a?(Array)
301
- value.compact.map { |v| _to_hash(v) }
302
- elsif value.is_a?(Hash)
303
- {}.tap do |hash|
304
- value.each { |k, v| hash[k] = _to_hash(v) }
305
- end
306
- elsif value.respond_to? :to_hash
307
- value.to_hash
308
- else
309
- value
310
- end
311
- end
312
166
  end
313
167
  end