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
@@ -34,28 +34,6 @@ module AsposeSlidesCloud
34
34
  # Specifies upper or lower limit
35
35
  attr_accessor :upper_limit
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({
@@ -129,129 +107,5 @@ module AsposeSlidesCloud
129
107
  def hash
130
108
  [type, base, limit, upper_limit].hash
131
109
  end
132
-
133
- # Builds the object from hash
134
- # @param [Hash] attributes Model attributes in the form of hash
135
- # @return [Object] Returns the model itself
136
- def build_from_hash(attributes)
137
- return nil unless attributes.is_a?(Hash)
138
- self.class.swagger_types.each_pair do |key, type|
139
- mapKey = self.class.attribute_map[key]
140
- if !mapKey.nil?
141
- val = attributes[mapKey]
142
- if val.nil?
143
- mapKeyString = mapKey.to_s
144
- mapKeyString[0] = mapKeyString[0].downcase
145
- mapKey = mapKeyString.to_sym
146
- val = attributes[mapKey]
147
- end
148
- if !val.nil?
149
- if type =~ /\AArray<(.*)>/i
150
- # check to ensure the input is an array given that the the attribute
151
- # is documented as an array but the input is not
152
- if val.is_a?(Array)
153
- self.send("#{key}=", val.map { |v| _deserialize($1, v) })
154
- end
155
- else
156
- self.send("#{key}=", _deserialize(type, val))
157
- end
158
- end
159
- end
160
- end
161
-
162
- self
163
- end
164
-
165
- # Deserializes the data based on type
166
- # @param string type Data type
167
- # @param string value Value to be deserialized
168
- # @return [Object] Deserialized data
169
- def _deserialize(type, value)
170
- if value.nil?
171
- nil
172
- else
173
- case type.to_sym
174
- when :DateTime
175
- DateTime.parse(value)
176
- when :Date
177
- Date.parse(value)
178
- when :String
179
- value.to_s
180
- when :Integer
181
- value.to_i
182
- when :Float
183
- value.to_f
184
- when :BOOLEAN
185
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
186
- true
187
- else
188
- false
189
- end
190
- when :Object
191
- # generic object (usually a Hash), return directly
192
- value
193
- when /\AArray<(?<inner_type>.+)>\z/
194
- inner_type = Regexp.last_match[:inner_type]
195
- value.map { |v| _deserialize(inner_type, v) }
196
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
197
- k_type = Regexp.last_match[:k_type]
198
- v_type = Regexp.last_match[:v_type]
199
- {}.tap do |hash|
200
- value.each do |k, v|
201
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
202
- end
203
- end
204
- else # model
205
- registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
206
- if registry_type
207
- type = registry_type
208
- end
209
- temp_model = AsposeSlidesCloud.const_get(type).new
210
- temp_model.build_from_hash(value)
211
- end
212
- end
213
- end
214
-
215
- # Returns the string representation of the object
216
- # @return [String] String presentation of the object
217
- def to_s
218
- to_hash.to_s
219
- end
220
-
221
- # to_body is an alias to to_hash (backward compatibility)
222
- # @return [Hash] Returns the object in the form of hash
223
- def to_body
224
- to_hash
225
- end
226
-
227
- # Returns the object in the form of hash
228
- # @return [Hash] Returns the object in the form of hash
229
- def to_hash
230
- hash = {}
231
- self.class.attribute_map.each_pair do |attr, param|
232
- value = self.send(attr)
233
- next if value.nil?
234
- hash[param] = _to_hash(value)
235
- end
236
- hash
237
- end
238
-
239
- # Outputs non-array value in the form of hash
240
- # For object, use to_hash. Otherwise, just return the value
241
- # @param [Object] value Any valid value
242
- # @return [Hash] Returns the value in the form of hash
243
- def _to_hash(value)
244
- if value.is_a?(Array)
245
- value.compact.map { |v| _to_hash(v) }
246
- elsif value.is_a?(Hash)
247
- {}.tap do |hash|
248
- value.each { |k, v| hash[k] = _to_hash(v) }
249
- end
250
- elsif value.respond_to? :to_hash
251
- value.to_hash
252
- else
253
- value
254
- end
255
- end
256
110
  end
257
111
  end
@@ -24,7 +24,7 @@ require 'date'
24
24
 
25
25
  module AsposeSlidesCloud
26
26
  # Line format.
27
- class LineFormat
27
+ class LineFormat < BaseObject
28
28
  # Alignment.
29
29
  attr_accessor :alignment
30
30
 
@@ -61,28 +61,6 @@ module AsposeSlidesCloud
61
61
  # Width.
62
62
  attr_accessor :width
63
63
 
64
- class EnumAttributeValidator
65
- attr_reader :datatype
66
- attr_reader :allowable_values
67
-
68
- def initialize(datatype, allowable_values)
69
- @allowable_values = allowable_values.map do |value|
70
- case datatype.to_s
71
- when /Integer/i
72
- value.to_i
73
- when /Float/i
74
- value.to_f
75
- else
76
- value
77
- end
78
- end
79
- end
80
-
81
- def valid?(value)
82
- !value || allowable_values.any?{ |s| s.casecmp(value) == 0 }
83
- end
84
- end
85
-
86
64
  # Attribute mapping from ruby-style variable name to JSON key.
87
65
  def self.attribute_map
88
66
  {
@@ -291,129 +269,5 @@ module AsposeSlidesCloud
291
269
  def hash
292
270
  [alignment, cap_style, dash_style, join_style, style, sketch_type, begin_arrow_head, end_arrow_head, custom_dash_pattern, fill_format, miter_limit, width].hash
293
271
  end
294
-
295
- # Builds the object from hash
296
- # @param [Hash] attributes Model attributes in the form of hash
297
- # @return [Object] Returns the model itself
298
- def build_from_hash(attributes)
299
- return nil unless attributes.is_a?(Hash)
300
- self.class.swagger_types.each_pair do |key, type|
301
- mapKey = self.class.attribute_map[key]
302
- if !mapKey.nil?
303
- val = attributes[mapKey]
304
- if val.nil?
305
- mapKeyString = mapKey.to_s
306
- mapKeyString[0] = mapKeyString[0].downcase
307
- mapKey = mapKeyString.to_sym
308
- val = attributes[mapKey]
309
- end
310
- if !val.nil?
311
- if type =~ /\AArray<(.*)>/i
312
- # check to ensure the input is an array given that the the attribute
313
- # is documented as an array but the input is not
314
- if val.is_a?(Array)
315
- self.send("#{key}=", val.map { |v| _deserialize($1, v) })
316
- end
317
- else
318
- self.send("#{key}=", _deserialize(type, val))
319
- end
320
- end
321
- end
322
- end
323
-
324
- self
325
- end
326
-
327
- # Deserializes the data based on type
328
- # @param string type Data type
329
- # @param string value Value to be deserialized
330
- # @return [Object] Deserialized data
331
- def _deserialize(type, value)
332
- if value.nil?
333
- nil
334
- else
335
- case type.to_sym
336
- when :DateTime
337
- DateTime.parse(value)
338
- when :Date
339
- Date.parse(value)
340
- when :String
341
- value.to_s
342
- when :Integer
343
- value.to_i
344
- when :Float
345
- value.to_f
346
- when :BOOLEAN
347
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
348
- true
349
- else
350
- false
351
- end
352
- when :Object
353
- # generic object (usually a Hash), return directly
354
- value
355
- when /\AArray<(?<inner_type>.+)>\z/
356
- inner_type = Regexp.last_match[:inner_type]
357
- value.map { |v| _deserialize(inner_type, v) }
358
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
359
- k_type = Regexp.last_match[:k_type]
360
- v_type = Regexp.last_match[:v_type]
361
- {}.tap do |hash|
362
- value.each do |k, v|
363
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
364
- end
365
- end
366
- else # model
367
- registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
368
- if registry_type
369
- type = registry_type
370
- end
371
- temp_model = AsposeSlidesCloud.const_get(type).new
372
- temp_model.build_from_hash(value)
373
- end
374
- end
375
- end
376
-
377
- # Returns the string representation of the object
378
- # @return [String] String presentation of the object
379
- def to_s
380
- to_hash.to_s
381
- end
382
-
383
- # to_body is an alias to to_hash (backward compatibility)
384
- # @return [Hash] Returns the object in the form of hash
385
- def to_body
386
- to_hash
387
- end
388
-
389
- # Returns the object in the form of hash
390
- # @return [Hash] Returns the object in the form of hash
391
- def to_hash
392
- hash = {}
393
- self.class.attribute_map.each_pair do |attr, param|
394
- value = self.send(attr)
395
- next if value.nil?
396
- hash[param] = _to_hash(value)
397
- end
398
- hash
399
- end
400
-
401
- # Outputs non-array value in the form of hash
402
- # For object, use to_hash. Otherwise, just return the value
403
- # @param [Object] value Any valid value
404
- # @return [Hash] Returns the value in the form of hash
405
- def _to_hash(value)
406
- if value.is_a?(Array)
407
- value.compact.map { |v| _to_hash(v) }
408
- elsif value.is_a?(Hash)
409
- {}.tap do |hash|
410
- value.each { |k, v| hash[k] = _to_hash(v) }
411
- end
412
- elsif value.respond_to? :to_hash
413
- value.to_hash
414
- else
415
- value
416
- end
417
- end
418
272
  end
419
273
  end
@@ -31,28 +31,6 @@ module AsposeSlidesCloud
31
31
  # Y coordinate of the end point of the line
32
32
  attr_accessor :y
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
  super.merge({
@@ -129,129 +107,5 @@ module AsposeSlidesCloud
129
107
  def hash
130
108
  [type, x, y].hash
131
109
  end
132
-
133
- # Builds the object from hash
134
- # @param [Hash] attributes Model attributes in the form of hash
135
- # @return [Object] Returns the model itself
136
- def build_from_hash(attributes)
137
- return nil unless attributes.is_a?(Hash)
138
- self.class.swagger_types.each_pair do |key, type|
139
- mapKey = self.class.attribute_map[key]
140
- if !mapKey.nil?
141
- val = attributes[mapKey]
142
- if val.nil?
143
- mapKeyString = mapKey.to_s
144
- mapKeyString[0] = mapKeyString[0].downcase
145
- mapKey = mapKeyString.to_sym
146
- val = attributes[mapKey]
147
- end
148
- if !val.nil?
149
- if type =~ /\AArray<(.*)>/i
150
- # check to ensure the input is an array given that the the attribute
151
- # is documented as an array but the input is not
152
- if val.is_a?(Array)
153
- self.send("#{key}=", val.map { |v| _deserialize($1, v) })
154
- end
155
- else
156
- self.send("#{key}=", _deserialize(type, val))
157
- end
158
- end
159
- end
160
- end
161
-
162
- self
163
- end
164
-
165
- # Deserializes the data based on type
166
- # @param string type Data type
167
- # @param string value Value to be deserialized
168
- # @return [Object] Deserialized data
169
- def _deserialize(type, value)
170
- if value.nil?
171
- nil
172
- else
173
- case type.to_sym
174
- when :DateTime
175
- DateTime.parse(value)
176
- when :Date
177
- Date.parse(value)
178
- when :String
179
- value.to_s
180
- when :Integer
181
- value.to_i
182
- when :Float
183
- value.to_f
184
- when :BOOLEAN
185
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
186
- true
187
- else
188
- false
189
- end
190
- when :Object
191
- # generic object (usually a Hash), return directly
192
- value
193
- when /\AArray<(?<inner_type>.+)>\z/
194
- inner_type = Regexp.last_match[:inner_type]
195
- value.map { |v| _deserialize(inner_type, v) }
196
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
197
- k_type = Regexp.last_match[:k_type]
198
- v_type = Regexp.last_match[:v_type]
199
- {}.tap do |hash|
200
- value.each do |k, v|
201
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
202
- end
203
- end
204
- else # model
205
- registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
206
- if registry_type
207
- type = registry_type
208
- end
209
- temp_model = AsposeSlidesCloud.const_get(type).new
210
- temp_model.build_from_hash(value)
211
- end
212
- end
213
- end
214
-
215
- # Returns the string representation of the object
216
- # @return [String] String presentation of the object
217
- def to_s
218
- to_hash.to_s
219
- end
220
-
221
- # to_body is an alias to to_hash (backward compatibility)
222
- # @return [Hash] Returns the object in the form of hash
223
- def to_body
224
- to_hash
225
- end
226
-
227
- # Returns the object in the form of hash
228
- # @return [Hash] Returns the object in the form of hash
229
- def to_hash
230
- hash = {}
231
- self.class.attribute_map.each_pair do |attr, param|
232
- value = self.send(attr)
233
- next if value.nil?
234
- hash[param] = _to_hash(value)
235
- end
236
- hash
237
- end
238
-
239
- # Outputs non-array value in the form of hash
240
- # For object, use to_hash. Otherwise, just return the value
241
- # @param [Object] value Any valid value
242
- # @return [Hash] Returns the value in the form of hash
243
- def _to_hash(value)
244
- if value.is_a?(Array)
245
- value.compact.map { |v| _to_hash(v) }
246
- elsif value.is_a?(Hash)
247
- {}.tap do |hash|
248
- value.each { |k, v| hash[k] = _to_hash(v) }
249
- end
250
- elsif value.respond_to? :to_hash
251
- value.to_hash
252
- else
253
- value
254
- end
255
- end
256
110
  end
257
111
  end
@@ -25,28 +25,6 @@ require 'date'
25
25
  module AsposeSlidesCloud
26
26
  # Represents string or double literals data source.
27
27
  class Literals < DataSource
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