aspose_slides_cloud 19.12.0 → 20.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (161) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/lib/aspose_slides_cloud.rb +8 -0
  4. data/lib/aspose_slides_cloud/api/slides_api.rb +2156 -525
  5. data/lib/aspose_slides_cloud/api/slides_api_requests.rb +792 -124
  6. data/lib/aspose_slides_cloud/api_client.rb +7 -3
  7. data/lib/aspose_slides_cloud/models/add_layout_slide.rb +20 -8
  8. data/lib/aspose_slides_cloud/models/add_master_slide.rb +20 -8
  9. data/lib/aspose_slides_cloud/models/add_shape.rb +20 -8
  10. data/lib/aspose_slides_cloud/models/add_slide.rb +20 -8
  11. data/lib/aspose_slides_cloud/models/api_info.rb +20 -8
  12. data/lib/aspose_slides_cloud/models/arrow_head_properties.rb +20 -23
  13. data/lib/aspose_slides_cloud/models/audio_frame.rb +20 -8
  14. data/lib/aspose_slides_cloud/models/axes.rb +20 -8
  15. data/lib/aspose_slides_cloud/models/axis.rb +20 -168
  16. data/lib/aspose_slides_cloud/models/base64_input_file.rb +20 -8
  17. data/lib/aspose_slides_cloud/models/blur_effect.rb +20 -8
  18. data/lib/aspose_slides_cloud/models/box_and_whisker_series.rb +504 -0
  19. data/lib/aspose_slides_cloud/models/bubble_chart_data_point.rb +20 -8
  20. data/lib/aspose_slides_cloud/models/bubble_series.rb +24 -45
  21. data/lib/aspose_slides_cloud/models/chart.rb +23 -11
  22. data/lib/aspose_slides_cloud/models/chart_category.rb +249 -0
  23. data/lib/aspose_slides_cloud/models/chart_title.rb +20 -8
  24. data/lib/aspose_slides_cloud/models/chart_wall.rb +20 -18
  25. data/lib/aspose_slides_cloud/models/color_scheme.rb +20 -8
  26. data/lib/aspose_slides_cloud/models/common_slide_view_properties.rb +217 -0
  27. data/lib/aspose_slides_cloud/models/connector.rb +20 -8
  28. data/lib/aspose_slides_cloud/models/custom_dash_pattern.rb +20 -8
  29. data/lib/aspose_slides_cloud/models/disc_usage.rb +20 -8
  30. data/lib/aspose_slides_cloud/models/document.rb +31 -9
  31. data/lib/aspose_slides_cloud/models/document_properties.rb +20 -8
  32. data/lib/aspose_slides_cloud/models/document_property.rb +20 -8
  33. data/lib/aspose_slides_cloud/models/document_replace_result.rb +31 -9
  34. data/lib/aspose_slides_cloud/models/effect.rb +20 -8
  35. data/lib/aspose_slides_cloud/models/effect_format.rb +20 -8
  36. data/lib/aspose_slides_cloud/models/entity_exists.rb +212 -0
  37. data/lib/aspose_slides_cloud/models/error.rb +20 -8
  38. data/lib/aspose_slides_cloud/models/error_details.rb +20 -8
  39. data/lib/aspose_slides_cloud/models/export_format.rb +1 -0
  40. data/lib/aspose_slides_cloud/models/export_options.rb +20 -8
  41. data/lib/aspose_slides_cloud/models/file_version.rb +20 -8
  42. data/lib/aspose_slides_cloud/models/file_versions.rb +20 -8
  43. data/lib/aspose_slides_cloud/models/files_list.rb +20 -8
  44. data/lib/aspose_slides_cloud/models/files_upload_result.rb +20 -8
  45. data/lib/aspose_slides_cloud/models/fill_format.rb +20 -8
  46. data/lib/aspose_slides_cloud/models/fill_overlay_effect.rb +20 -8
  47. data/lib/aspose_slides_cloud/models/font_scheme.rb +20 -8
  48. data/lib/aspose_slides_cloud/models/font_set.rb +20 -8
  49. data/lib/aspose_slides_cloud/models/format_scheme.rb +20 -8
  50. data/lib/aspose_slides_cloud/models/geometry_shape.rb +20 -8
  51. data/lib/aspose_slides_cloud/models/glow_effect.rb +20 -8
  52. data/lib/aspose_slides_cloud/models/gradient_fill.rb +20 -8
  53. data/lib/aspose_slides_cloud/models/gradient_fill_stop.rb +20 -8
  54. data/lib/aspose_slides_cloud/models/graphical_object.rb +20 -8
  55. data/lib/aspose_slides_cloud/models/group_shape.rb +20 -8
  56. data/lib/aspose_slides_cloud/models/html_export_options.rb +20 -8
  57. data/lib/aspose_slides_cloud/models/i_shape_export_options.rb +20 -8
  58. data/lib/aspose_slides_cloud/models/image.rb +20 -8
  59. data/lib/aspose_slides_cloud/models/image_export_options.rb +20 -8
  60. data/lib/aspose_slides_cloud/models/images.rb +20 -8
  61. data/lib/aspose_slides_cloud/models/inner_shadow_effect.rb +20 -8
  62. data/lib/aspose_slides_cloud/models/input.rb +20 -8
  63. data/lib/aspose_slides_cloud/models/input_file.rb +20 -8
  64. data/lib/aspose_slides_cloud/models/interactive_sequence.rb +20 -8
  65. data/lib/aspose_slides_cloud/models/layout_slide.rb +20 -8
  66. data/lib/aspose_slides_cloud/models/layout_slides.rb +20 -8
  67. data/lib/aspose_slides_cloud/models/legend.rb +20 -38
  68. data/lib/aspose_slides_cloud/models/line_format.rb +20 -43
  69. data/lib/aspose_slides_cloud/models/master_slide.rb +20 -8
  70. data/lib/aspose_slides_cloud/models/master_slides.rb +20 -8
  71. data/lib/aspose_slides_cloud/models/merge.rb +20 -8
  72. data/lib/aspose_slides_cloud/models/merging_source.rb +20 -8
  73. data/lib/aspose_slides_cloud/models/no_fill.rb +20 -8
  74. data/lib/aspose_slides_cloud/models/normal_view_restored_properties.rb +217 -0
  75. data/lib/aspose_slides_cloud/models/notes_slide.rb +20 -8
  76. data/lib/aspose_slides_cloud/models/object_exist.rb +20 -8
  77. data/lib/aspose_slides_cloud/models/ole_object_frame.rb +20 -8
  78. data/lib/aspose_slides_cloud/models/one_value_chart_data_point.rb +20 -8
  79. data/lib/aspose_slides_cloud/models/one_value_series.rb +24 -45
  80. data/lib/aspose_slides_cloud/models/ordered_merge_request.rb +20 -8
  81. data/lib/aspose_slides_cloud/models/outer_shadow_effect.rb +20 -8
  82. data/lib/aspose_slides_cloud/models/output_file.rb +20 -8
  83. data/lib/aspose_slides_cloud/models/paragraph.rb +21 -9
  84. data/lib/aspose_slides_cloud/models/paragraphs.rb +20 -8
  85. data/lib/aspose_slides_cloud/models/path_input_file.rb +20 -8
  86. data/lib/aspose_slides_cloud/models/path_output_file.rb +20 -8
  87. data/lib/aspose_slides_cloud/models/pattern_fill.rb +20 -8
  88. data/lib/aspose_slides_cloud/models/pdf_export_options.rb +53 -14
  89. data/lib/aspose_slides_cloud/models/picture_fill.rb +20 -8
  90. data/lib/aspose_slides_cloud/models/picture_frame.rb +20 -8
  91. data/lib/aspose_slides_cloud/models/pipeline.rb +20 -8
  92. data/lib/aspose_slides_cloud/models/placeholder.rb +20 -8
  93. data/lib/aspose_slides_cloud/models/placeholders.rb +20 -8
  94. data/lib/aspose_slides_cloud/models/plot_area.rb +20 -33
  95. data/lib/aspose_slides_cloud/models/portion.rb +20 -8
  96. data/lib/aspose_slides_cloud/models/portions.rb +28 -16
  97. data/lib/aspose_slides_cloud/models/pptx_export_options.rb +20 -8
  98. data/lib/aspose_slides_cloud/models/presentation_to_merge.rb +20 -8
  99. data/lib/aspose_slides_cloud/models/presentations_merge_request.rb +20 -8
  100. data/lib/aspose_slides_cloud/models/preset_shadow_effect.rb +20 -8
  101. data/lib/aspose_slides_cloud/models/reflection_effect.rb +20 -8
  102. data/lib/aspose_slides_cloud/models/remove_shape.rb +20 -8
  103. data/lib/aspose_slides_cloud/models/remove_slide.rb +20 -8
  104. data/lib/aspose_slides_cloud/models/reorder_slide.rb +20 -8
  105. data/lib/aspose_slides_cloud/models/replace_text.rb +20 -8
  106. data/lib/aspose_slides_cloud/models/request_input_file.rb +20 -8
  107. data/lib/aspose_slides_cloud/models/reset_slide.rb +20 -8
  108. data/lib/aspose_slides_cloud/models/resource_base.rb +20 -8
  109. data/lib/aspose_slides_cloud/models/resource_uri.rb +20 -8
  110. data/lib/aspose_slides_cloud/models/resource_uri_element.rb +20 -8
  111. data/lib/aspose_slides_cloud/models/response_output_file.rb +20 -8
  112. data/lib/aspose_slides_cloud/models/save.rb +22 -10
  113. data/lib/aspose_slides_cloud/models/save_shape.rb +20 -8
  114. data/lib/aspose_slides_cloud/models/save_slide.rb +22 -10
  115. data/lib/aspose_slides_cloud/models/scatter_chart_data_point.rb +20 -8
  116. data/lib/aspose_slides_cloud/models/scatter_series.rb +24 -45
  117. data/lib/aspose_slides_cloud/models/series.rb +47 -49
  118. data/lib/aspose_slides_cloud/models/series_marker.rb +20 -18
  119. data/lib/aspose_slides_cloud/models/shape.rb +20 -8
  120. data/lib/aspose_slides_cloud/models/shape_base.rb +20 -8
  121. data/lib/aspose_slides_cloud/models/shape_image_export_options.rb +20 -8
  122. data/lib/aspose_slides_cloud/models/shapes.rb +20 -8
  123. data/lib/aspose_slides_cloud/models/slide.rb +20 -8
  124. data/lib/aspose_slides_cloud/models/slide_animation.rb +20 -8
  125. data/lib/aspose_slides_cloud/models/slide_background.rb +20 -8
  126. data/lib/aspose_slides_cloud/models/slide_comment.rb +20 -8
  127. data/lib/aspose_slides_cloud/models/slide_comments.rb +20 -8
  128. data/lib/aspose_slides_cloud/models/slide_export_format.rb +1 -0
  129. data/lib/aspose_slides_cloud/models/slide_replace_result.rb +20 -8
  130. data/lib/aspose_slides_cloud/models/slides.rb +20 -8
  131. data/lib/aspose_slides_cloud/models/smart_art.rb +20 -8
  132. data/lib/aspose_slides_cloud/models/smart_art_node.rb +20 -8
  133. data/lib/aspose_slides_cloud/models/smart_art_shape.rb +20 -8
  134. data/lib/aspose_slides_cloud/models/soft_edge_effect.rb +20 -8
  135. data/lib/aspose_slides_cloud/models/solid_fill.rb +20 -8
  136. data/lib/aspose_slides_cloud/models/split_document_result.rb +20 -8
  137. data/lib/aspose_slides_cloud/models/storage_exist.rb +20 -8
  138. data/lib/aspose_slides_cloud/models/storage_file.rb +20 -8
  139. data/lib/aspose_slides_cloud/models/svg_export_options.rb +20 -8
  140. data/lib/aspose_slides_cloud/models/swf_export_options.rb +20 -8
  141. data/lib/aspose_slides_cloud/models/table.rb +20 -48
  142. data/lib/aspose_slides_cloud/models/table_cell.rb +20 -48
  143. data/lib/aspose_slides_cloud/models/table_column.rb +20 -8
  144. data/lib/aspose_slides_cloud/models/table_row.rb +20 -8
  145. data/lib/aspose_slides_cloud/models/task.rb +20 -8
  146. data/lib/aspose_slides_cloud/models/text_item.rb +20 -8
  147. data/lib/aspose_slides_cloud/models/text_items.rb +20 -8
  148. data/lib/aspose_slides_cloud/models/theme.rb +20 -8
  149. data/lib/aspose_slides_cloud/models/tiff_export_options.rb +20 -8
  150. data/lib/aspose_slides_cloud/models/update_background.rb +20 -8
  151. data/lib/aspose_slides_cloud/models/update_shape.rb +20 -8
  152. data/lib/aspose_slides_cloud/models/video_frame.rb +20 -8
  153. data/lib/aspose_slides_cloud/models/view_properties.rb +379 -0
  154. data/lib/aspose_slides_cloud/models/waterfall_series.rb +452 -0
  155. data/lib/aspose_slides_cloud/models/xps_export_options.rb +20 -8
  156. data/lib/aspose_slides_cloud/version.rb +1 -1
  157. data/spec/api/slides_api_spec.rb +17214 -12046
  158. data/spec/extra/extra_spec.rb +111 -9
  159. data/spec/spec_utils.rb +8 -1
  160. data/testRules.json +80 -8
  161. metadata +9 -2
@@ -129,15 +129,27 @@ module AsposeSlidesCloud
129
129
  def build_from_hash(attributes)
130
130
  return nil unless attributes.is_a?(Hash)
131
131
  self.class.swagger_types.each_pair do |key, type|
132
- if type =~ /\AArray<(.*)>/i
133
- # check to ensure the input is an array given that the the attribute
134
- # is documented as an array but the input is not
135
- if attributes[self.class.attribute_map[key]].is_a?(Array)
136
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
132
+ mapKey = self.class.attribute_map[key]
133
+ if !mapKey.nil?
134
+ val = attributes[mapKey]
135
+ if val.nil?
136
+ mapKeyString = mapKey.to_s
137
+ mapKeyString[0] = mapKeyString[0].downcase
138
+ mapKey = mapKeyString.to_sym
139
+ val = attributes[mapKey]
137
140
  end
138
- elsif !attributes[self.class.attribute_map[key]].nil?
139
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
140
- end # or else data not found in attributes(hash), not an issue as the data can be optional
141
+ if !val.nil?
142
+ if type =~ /\AArray<(.*)>/i
143
+ # check to ensure the input is an array given that the the attribute
144
+ # is documented as an array but the input is not
145
+ if val.is_a?(Array)
146
+ self.send("#{key}=", val.map { |v| _deserialize($1, v) })
147
+ end
148
+ else
149
+ self.send("#{key}=", _deserialize(type, val))
150
+ end
151
+ end
152
+ end
141
153
  end
142
154
 
143
155
  self
@@ -232,6 +232,8 @@ module AsposeSlidesCloud
232
232
 
233
233
  if attributes.has_key?(:'DataPointType')
234
234
  self.data_point_type = attributes[:'DataPointType']
235
+ else
236
+ self.data_point_type = "Bubble"
235
237
  end
236
238
 
237
239
  if attributes.has_key?(:'DataPoints')
@@ -245,34 +247,6 @@ module AsposeSlidesCloud
245
247
  # @return Array for valid properties with the reasons
246
248
  def list_invalid_properties
247
249
  invalid_properties = Array.new
248
- if @type.nil?
249
- invalid_properties.push('invalid value for "type", type cannot be nil.')
250
- end
251
-
252
- if @is_color_varied.nil?
253
- invalid_properties.push('invalid value for "is_color_varied", is_color_varied cannot be nil.')
254
- end
255
-
256
- if @smooth.nil?
257
- invalid_properties.push('invalid value for "smooth", smooth cannot be nil.')
258
- end
259
-
260
- if @plot_on_second_axis.nil?
261
- invalid_properties.push('invalid value for "plot_on_second_axis", plot_on_second_axis cannot be nil.')
262
- end
263
-
264
- if @order.nil?
265
- invalid_properties.push('invalid value for "order", order cannot be nil.')
266
- end
267
-
268
- if @invert_if_negative.nil?
269
- invalid_properties.push('invalid value for "invert_if_negative", invert_if_negative cannot be nil.')
270
- end
271
-
272
- if @explosion.nil?
273
- invalid_properties.push('invalid value for "explosion", explosion cannot be nil.')
274
- end
275
-
276
250
  if @data_point_type.nil?
277
251
  invalid_properties.push('invalid value for "data_point_type", data_point_type cannot be nil.')
278
252
  end
@@ -283,15 +257,8 @@ module AsposeSlidesCloud
283
257
  # Check to see if the all the properties in the model are valid
284
258
  # @return true if the model is valid
285
259
  def valid?
286
- return false if @type.nil?
287
- type_validator = EnumAttributeValidator.new('String', ['ClusteredColumn', 'StackedColumn', 'PercentsStackedColumn', 'ClusteredColumn3D', 'StackedColumn3D', 'PercentsStackedColumn3D', 'Column3D', 'ClusteredCylinder', 'StackedCylinder', 'PercentsStackedCylinder', 'Cylinder3D', 'ClusteredCone', 'StackedCone', 'PercentsStackedCone', 'Cone3D', 'ClusteredPyramid', 'StackedPyramid', 'PercentsStackedPyramid', 'Pyramid3D', 'Line', 'StackedLine', 'PercentsStackedLine', 'LineWithMarkers', 'StackedLineWithMarkers', 'PercentsStackedLineWithMarkers', 'Line3D', 'Pie', 'Pie3D', 'PieOfPie', 'ExplodedPie', 'ExplodedPie3D', 'BarOfPie', 'PercentsStackedBar', 'ClusteredBar3D', 'ClusteredBar', 'StackedBar', 'StackedBar3D', 'PercentsStackedBar3D', 'ClusteredHorizontalCylinder', 'StackedHorizontalCylinder', 'PercentsStackedHorizontalCylinder', 'ClusteredHorizontalCone', 'StackedHorizontalCone', 'PercentsStackedHorizontalCone', 'ClusteredHorizontalPyramid', 'StackedHorizontalPyramid', 'PercentsStackedHorizontalPyramid', 'Area', 'StackedArea', 'PercentsStackedArea', 'Area3D', 'StackedArea3D', 'PercentsStackedArea3D', 'ScatterWithMarkers', 'ScatterWithSmoothLinesAndMarkers', 'ScatterWithSmoothLines', 'ScatterWithStraightLinesAndMarkers', 'ScatterWithStraightLines', 'HighLowClose', 'OpenHighLowClose', 'VolumeHighLowClose', 'VolumeOpenHighLowClose', 'Surface3D', 'WireframeSurface3D', 'Contour', 'WireframeContour', 'Doughnut', 'ExplodedDoughnut', 'Bubble', 'BubbleWith3D', 'Radar', 'RadarWithMarkers', 'FilledRadar', 'SeriesOfMixedTypes'])
260
+ type_validator = EnumAttributeValidator.new('String', ['ClusteredColumn', 'StackedColumn', 'PercentsStackedColumn', 'ClusteredColumn3D', 'StackedColumn3D', 'PercentsStackedColumn3D', 'Column3D', 'ClusteredCylinder', 'StackedCylinder', 'PercentsStackedCylinder', 'Cylinder3D', 'ClusteredCone', 'StackedCone', 'PercentsStackedCone', 'Cone3D', 'ClusteredPyramid', 'StackedPyramid', 'PercentsStackedPyramid', 'Pyramid3D', 'Line', 'StackedLine', 'PercentsStackedLine', 'LineWithMarkers', 'StackedLineWithMarkers', 'PercentsStackedLineWithMarkers', 'Line3D', 'Pie', 'Pie3D', 'PieOfPie', 'ExplodedPie', 'ExplodedPie3D', 'BarOfPie', 'PercentsStackedBar', 'ClusteredBar3D', 'ClusteredBar', 'StackedBar', 'StackedBar3D', 'PercentsStackedBar3D', 'ClusteredHorizontalCylinder', 'StackedHorizontalCylinder', 'PercentsStackedHorizontalCylinder', 'ClusteredHorizontalCone', 'StackedHorizontalCone', 'PercentsStackedHorizontalCone', 'ClusteredHorizontalPyramid', 'StackedHorizontalPyramid', 'PercentsStackedHorizontalPyramid', 'Area', 'StackedArea', 'PercentsStackedArea', 'Area3D', 'StackedArea3D', 'PercentsStackedArea3D', 'ScatterWithMarkers', 'ScatterWithSmoothLinesAndMarkers', 'ScatterWithSmoothLines', 'ScatterWithStraightLinesAndMarkers', 'ScatterWithStraightLines', 'HighLowClose', 'OpenHighLowClose', 'VolumeHighLowClose', 'VolumeOpenHighLowClose', 'Surface3D', 'WireframeSurface3D', 'Contour', 'WireframeContour', 'Doughnut', 'ExplodedDoughnut', 'Bubble', 'BubbleWith3D', 'Radar', 'RadarWithMarkers', 'FilledRadar', 'SeriesOfMixedTypes', 'Treemap', 'Sunburst', 'Histogram', 'ParetoLine', 'BoxAndWhisker', 'Waterfall', 'Funnel'])
288
261
  return false unless type_validator.valid?(@type)
289
- return false if @is_color_varied.nil?
290
- return false if @smooth.nil?
291
- return false if @plot_on_second_axis.nil?
292
- return false if @order.nil?
293
- return false if @invert_if_negative.nil?
294
- return false if @explosion.nil?
295
262
  return false if @data_point_type.nil?
296
263
  data_point_type_validator = EnumAttributeValidator.new('String', ['OneValue', 'Scatter', 'Bubble'])
297
264
  return false unless data_point_type_validator.valid?(@data_point_type)
@@ -301,7 +268,7 @@ module AsposeSlidesCloud
301
268
  # Custom attribute writer method checking allowed values (enum).
302
269
  # @param [Object] type Object to be assigned
303
270
  def type=(type)
304
- validator = EnumAttributeValidator.new('String', ['ClusteredColumn', 'StackedColumn', 'PercentsStackedColumn', 'ClusteredColumn3D', 'StackedColumn3D', 'PercentsStackedColumn3D', 'Column3D', 'ClusteredCylinder', 'StackedCylinder', 'PercentsStackedCylinder', 'Cylinder3D', 'ClusteredCone', 'StackedCone', 'PercentsStackedCone', 'Cone3D', 'ClusteredPyramid', 'StackedPyramid', 'PercentsStackedPyramid', 'Pyramid3D', 'Line', 'StackedLine', 'PercentsStackedLine', 'LineWithMarkers', 'StackedLineWithMarkers', 'PercentsStackedLineWithMarkers', 'Line3D', 'Pie', 'Pie3D', 'PieOfPie', 'ExplodedPie', 'ExplodedPie3D', 'BarOfPie', 'PercentsStackedBar', 'ClusteredBar3D', 'ClusteredBar', 'StackedBar', 'StackedBar3D', 'PercentsStackedBar3D', 'ClusteredHorizontalCylinder', 'StackedHorizontalCylinder', 'PercentsStackedHorizontalCylinder', 'ClusteredHorizontalCone', 'StackedHorizontalCone', 'PercentsStackedHorizontalCone', 'ClusteredHorizontalPyramid', 'StackedHorizontalPyramid', 'PercentsStackedHorizontalPyramid', 'Area', 'StackedArea', 'PercentsStackedArea', 'Area3D', 'StackedArea3D', 'PercentsStackedArea3D', 'ScatterWithMarkers', 'ScatterWithSmoothLinesAndMarkers', 'ScatterWithSmoothLines', 'ScatterWithStraightLinesAndMarkers', 'ScatterWithStraightLines', 'HighLowClose', 'OpenHighLowClose', 'VolumeHighLowClose', 'VolumeOpenHighLowClose', 'Surface3D', 'WireframeSurface3D', 'Contour', 'WireframeContour', 'Doughnut', 'ExplodedDoughnut', 'Bubble', 'BubbleWith3D', 'Radar', 'RadarWithMarkers', 'FilledRadar', 'SeriesOfMixedTypes'])
271
+ validator = EnumAttributeValidator.new('String', ['ClusteredColumn', 'StackedColumn', 'PercentsStackedColumn', 'ClusteredColumn3D', 'StackedColumn3D', 'PercentsStackedColumn3D', 'Column3D', 'ClusteredCylinder', 'StackedCylinder', 'PercentsStackedCylinder', 'Cylinder3D', 'ClusteredCone', 'StackedCone', 'PercentsStackedCone', 'Cone3D', 'ClusteredPyramid', 'StackedPyramid', 'PercentsStackedPyramid', 'Pyramid3D', 'Line', 'StackedLine', 'PercentsStackedLine', 'LineWithMarkers', 'StackedLineWithMarkers', 'PercentsStackedLineWithMarkers', 'Line3D', 'Pie', 'Pie3D', 'PieOfPie', 'ExplodedPie', 'ExplodedPie3D', 'BarOfPie', 'PercentsStackedBar', 'ClusteredBar3D', 'ClusteredBar', 'StackedBar', 'StackedBar3D', 'PercentsStackedBar3D', 'ClusteredHorizontalCylinder', 'StackedHorizontalCylinder', 'PercentsStackedHorizontalCylinder', 'ClusteredHorizontalCone', 'StackedHorizontalCone', 'PercentsStackedHorizontalCone', 'ClusteredHorizontalPyramid', 'StackedHorizontalPyramid', 'PercentsStackedHorizontalPyramid', 'Area', 'StackedArea', 'PercentsStackedArea', 'Area3D', 'StackedArea3D', 'PercentsStackedArea3D', 'ScatterWithMarkers', 'ScatterWithSmoothLinesAndMarkers', 'ScatterWithSmoothLines', 'ScatterWithStraightLinesAndMarkers', 'ScatterWithStraightLines', 'HighLowClose', 'OpenHighLowClose', 'VolumeHighLowClose', 'VolumeOpenHighLowClose', 'Surface3D', 'WireframeSurface3D', 'Contour', 'WireframeContour', 'Doughnut', 'ExplodedDoughnut', 'Bubble', 'BubbleWith3D', 'Radar', 'RadarWithMarkers', 'FilledRadar', 'SeriesOfMixedTypes', 'Treemap', 'Sunburst', 'Histogram', 'ParetoLine', 'BoxAndWhisker', 'Waterfall', 'Funnel'])
305
272
  unless validator.valid?(type)
306
273
  fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
307
274
  end
@@ -362,15 +329,27 @@ module AsposeSlidesCloud
362
329
  def build_from_hash(attributes)
363
330
  return nil unless attributes.is_a?(Hash)
364
331
  self.class.swagger_types.each_pair do |key, type|
365
- if type =~ /\AArray<(.*)>/i
366
- # check to ensure the input is an array given that the the attribute
367
- # is documented as an array but the input is not
368
- if attributes[self.class.attribute_map[key]].is_a?(Array)
369
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
332
+ mapKey = self.class.attribute_map[key]
333
+ if !mapKey.nil?
334
+ val = attributes[mapKey]
335
+ if val.nil?
336
+ mapKeyString = mapKey.to_s
337
+ mapKeyString[0] = mapKeyString[0].downcase
338
+ mapKey = mapKeyString.to_sym
339
+ val = attributes[mapKey]
370
340
  end
371
- elsif !attributes[self.class.attribute_map[key]].nil?
372
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
373
- end # or else data not found in attributes(hash), not an issue as the data can be optional
341
+ if !val.nil?
342
+ if type =~ /\AArray<(.*)>/i
343
+ # check to ensure the input is an array given that the the attribute
344
+ # is documented as an array but the input is not
345
+ if val.is_a?(Array)
346
+ self.send("#{key}=", val.map { |v| _deserialize($1, v) })
347
+ end
348
+ else
349
+ self.send("#{key}=", _deserialize(type, val))
350
+ end
351
+ end
352
+ end
374
353
  end
375
354
 
376
355
  self
@@ -188,7 +188,7 @@ module AsposeSlidesCloud
188
188
  :'chart_type' => :'String',
189
189
  :'show_data_labels_over_maximum' => :'BOOLEAN',
190
190
  :'series' => :'Array<Series>',
191
- :'categories' => :'Array<String>',
191
+ :'categories' => :'Array<ChartCategory>',
192
192
  :'title' => :'ChartTitle',
193
193
  :'back_wall' => :'ChartWall',
194
194
  :'side_wall' => :'ChartWall',
@@ -364,7 +364,7 @@ module AsposeSlidesCloud
364
364
  shape_type_validator = EnumAttributeValidator.new('String', ['Custom', 'Line', 'LineInverse', 'Triangle', 'RightTriangle', 'Rectangle', 'Diamond', 'Parallelogram', 'Trapezoid', 'NonIsoscelesTrapezoid', 'Pentagon', 'Hexagon', 'Heptagon', 'Octagon', 'Decagon', 'Dodecagon', 'FourPointedStar', 'FivePointedStar', 'SixPointedStar', 'SevenPointedStar', 'EightPointedStar', 'TenPointedStar', 'TwelvePointedStar', 'SixteenPointedStar', 'TwentyFourPointedStar', 'ThirtyTwoPointedStar', 'RoundCornerRectangle', 'OneRoundCornerRectangle', 'TwoSamesideRoundCornerRectangle', 'TwoDiagonalRoundCornerRectangle', 'OneSnipOneRoundCornerRectangle', 'OneSnipCornerRectangle', 'TwoSamesideSnipCornerRectangle', 'TwoDiagonalSnipCornerRectangle', 'Plaque', 'Ellipse', 'Teardrop', 'HomePlate', 'Chevron', 'PieWedge', 'Pie', 'BlockArc', 'Donut', 'NoSmoking', 'RightArrow', 'LeftArrow', 'UpArrow', 'DownArrow', 'StripedRightArrow', 'NotchedRightArrow', 'BentUpArrow', 'LeftRightArrow', 'UpDownArrow', 'LeftUpArrow', 'LeftRightUpArrow', 'QuadArrow', 'CalloutLeftArrow', 'CalloutRightArrow', 'CalloutUpArrow', 'CalloutDownArrow', 'CalloutLeftRightArrow', 'CalloutUpDownArrow', 'CalloutQuadArrow', 'BentArrow', 'UTurnArrow', 'CircularArrow', 'LeftCircularArrow', 'LeftRightCircularArrow', 'CurvedRightArrow', 'CurvedLeftArrow', 'CurvedUpArrow', 'CurvedDownArrow', 'SwooshArrow', 'Cube', 'Can', 'LightningBolt', 'Heart', 'Sun', 'Moon', 'SmileyFace', 'IrregularSeal1', 'IrregularSeal2', 'FoldedCorner', 'Bevel', 'Frame', 'HalfFrame', 'Corner', 'DiagonalStripe', 'Chord', 'CurvedArc', 'LeftBracket', 'RightBracket', 'LeftBrace', 'RightBrace', 'BracketPair', 'BracePair', 'StraightConnector1', 'BentConnector2', 'BentConnector3', 'BentConnector4', 'BentConnector5', 'CurvedConnector2', 'CurvedConnector3', 'CurvedConnector4', 'CurvedConnector5', 'Callout1', 'Callout2', 'Callout3', 'Callout1WithAccent', 'Callout2WithAccent', 'Callout3WithAccent', 'Callout1WithBorder', 'Callout2WithBorder', 'Callout3WithBorder', 'Callout1WithBorderAndAccent', 'Callout2WithBorderAndAccent', 'Callout3WithBorderAndAccent', 'CalloutWedgeRectangle', 'CalloutWedgeRoundRectangle', 'CalloutWedgeEllipse', 'CalloutCloud', 'Cloud', 'Ribbon', 'Ribbon2', 'EllipseRibbon', 'EllipseRibbon2', 'LeftRightRibbon', 'VerticalScroll', 'HorizontalScroll', 'Wave', 'DoubleWave', 'Plus', 'ProcessFlow', 'DecisionFlow', 'InputOutputFlow', 'PredefinedProcessFlow', 'InternalStorageFlow', 'DocumentFlow', 'MultiDocumentFlow', 'TerminatorFlow', 'PreparationFlow', 'ManualInputFlow', 'ManualOperationFlow', 'ConnectorFlow', 'PunchedCardFlow', 'PunchedTapeFlow', 'SummingJunctionFlow', 'OrFlow', 'CollateFlow', 'SortFlow', 'ExtractFlow', 'MergeFlow', 'OfflineStorageFlow', 'OnlineStorageFlow', 'MagneticTapeFlow', 'MagneticDiskFlow', 'MagneticDrumFlow', 'DisplayFlow', 'DelayFlow', 'AlternateProcessFlow', 'OffPageConnectorFlow', 'BlankButton', 'HomeButton', 'HelpButton', 'InformationButton', 'ForwardOrNextButton', 'BackOrPreviousButton', 'EndButton', 'BeginningButton', 'ReturnButton', 'DocumentButton', 'SoundButton', 'MovieButton', 'Gear6', 'Gear9', 'Funnel', 'PlusMath', 'MinusMath', 'MultiplyMath', 'DivideMath', 'EqualMath', 'NotEqualMath', 'CornerTabs', 'SquareTabs', 'PlaqueTabs', 'ChartX', 'ChartStar', 'ChartPlus', 'Chart', 'Table', 'PictureFrame', 'VideoFrame', 'AudioFrame', 'Diagram', 'OleObjectFrame', 'GroupShape', 'GraphicalObject', 'NotDefined'])
365
365
  return false unless shape_type_validator.valid?(@shape_type)
366
366
  return false if @chart_type.nil?
367
- chart_type_validator = EnumAttributeValidator.new('String', ['ClusteredColumn', 'StackedColumn', 'PercentsStackedColumn', 'ClusteredColumn3D', 'StackedColumn3D', 'PercentsStackedColumn3D', 'Column3D', 'ClusteredCylinder', 'StackedCylinder', 'PercentsStackedCylinder', 'Cylinder3D', 'ClusteredCone', 'StackedCone', 'PercentsStackedCone', 'Cone3D', 'ClusteredPyramid', 'StackedPyramid', 'PercentsStackedPyramid', 'Pyramid3D', 'Line', 'StackedLine', 'PercentsStackedLine', 'LineWithMarkers', 'StackedLineWithMarkers', 'PercentsStackedLineWithMarkers', 'Line3D', 'Pie', 'Pie3D', 'PieOfPie', 'ExplodedPie', 'ExplodedPie3D', 'BarOfPie', 'PercentsStackedBar', 'ClusteredBar3D', 'ClusteredBar', 'StackedBar', 'StackedBar3D', 'PercentsStackedBar3D', 'ClusteredHorizontalCylinder', 'StackedHorizontalCylinder', 'PercentsStackedHorizontalCylinder', 'ClusteredHorizontalCone', 'StackedHorizontalCone', 'PercentsStackedHorizontalCone', 'ClusteredHorizontalPyramid', 'StackedHorizontalPyramid', 'PercentsStackedHorizontalPyramid', 'Area', 'StackedArea', 'PercentsStackedArea', 'Area3D', 'StackedArea3D', 'PercentsStackedArea3D', 'ScatterWithMarkers', 'ScatterWithSmoothLinesAndMarkers', 'ScatterWithSmoothLines', 'ScatterWithStraightLinesAndMarkers', 'ScatterWithStraightLines', 'HighLowClose', 'OpenHighLowClose', 'VolumeHighLowClose', 'VolumeOpenHighLowClose', 'Surface3D', 'WireframeSurface3D', 'Contour', 'WireframeContour', 'Doughnut', 'ExplodedDoughnut', 'Bubble', 'BubbleWith3D', 'Radar', 'RadarWithMarkers', 'FilledRadar', 'SeriesOfMixedTypes'])
367
+ chart_type_validator = EnumAttributeValidator.new('String', ['ClusteredColumn', 'StackedColumn', 'PercentsStackedColumn', 'ClusteredColumn3D', 'StackedColumn3D', 'PercentsStackedColumn3D', 'Column3D', 'ClusteredCylinder', 'StackedCylinder', 'PercentsStackedCylinder', 'Cylinder3D', 'ClusteredCone', 'StackedCone', 'PercentsStackedCone', 'Cone3D', 'ClusteredPyramid', 'StackedPyramid', 'PercentsStackedPyramid', 'Pyramid3D', 'Line', 'StackedLine', 'PercentsStackedLine', 'LineWithMarkers', 'StackedLineWithMarkers', 'PercentsStackedLineWithMarkers', 'Line3D', 'Pie', 'Pie3D', 'PieOfPie', 'ExplodedPie', 'ExplodedPie3D', 'BarOfPie', 'PercentsStackedBar', 'ClusteredBar3D', 'ClusteredBar', 'StackedBar', 'StackedBar3D', 'PercentsStackedBar3D', 'ClusteredHorizontalCylinder', 'StackedHorizontalCylinder', 'PercentsStackedHorizontalCylinder', 'ClusteredHorizontalCone', 'StackedHorizontalCone', 'PercentsStackedHorizontalCone', 'ClusteredHorizontalPyramid', 'StackedHorizontalPyramid', 'PercentsStackedHorizontalPyramid', 'Area', 'StackedArea', 'PercentsStackedArea', 'Area3D', 'StackedArea3D', 'PercentsStackedArea3D', 'ScatterWithMarkers', 'ScatterWithSmoothLinesAndMarkers', 'ScatterWithSmoothLines', 'ScatterWithStraightLinesAndMarkers', 'ScatterWithStraightLines', 'HighLowClose', 'OpenHighLowClose', 'VolumeHighLowClose', 'VolumeOpenHighLowClose', 'Surface3D', 'WireframeSurface3D', 'Contour', 'WireframeContour', 'Doughnut', 'ExplodedDoughnut', 'Bubble', 'BubbleWith3D', 'Radar', 'RadarWithMarkers', 'FilledRadar', 'SeriesOfMixedTypes', 'Treemap', 'Sunburst', 'Histogram', 'ParetoLine', 'BoxAndWhisker', 'Waterfall', 'Funnel'])
368
368
  return false unless chart_type_validator.valid?(@chart_type)
369
369
  true
370
370
  end
@@ -392,7 +392,7 @@ module AsposeSlidesCloud
392
392
  # Custom attribute writer method checking allowed values (enum).
393
393
  # @param [Object] chart_type Object to be assigned
394
394
  def chart_type=(chart_type)
395
- validator = EnumAttributeValidator.new('String', ['ClusteredColumn', 'StackedColumn', 'PercentsStackedColumn', 'ClusteredColumn3D', 'StackedColumn3D', 'PercentsStackedColumn3D', 'Column3D', 'ClusteredCylinder', 'StackedCylinder', 'PercentsStackedCylinder', 'Cylinder3D', 'ClusteredCone', 'StackedCone', 'PercentsStackedCone', 'Cone3D', 'ClusteredPyramid', 'StackedPyramid', 'PercentsStackedPyramid', 'Pyramid3D', 'Line', 'StackedLine', 'PercentsStackedLine', 'LineWithMarkers', 'StackedLineWithMarkers', 'PercentsStackedLineWithMarkers', 'Line3D', 'Pie', 'Pie3D', 'PieOfPie', 'ExplodedPie', 'ExplodedPie3D', 'BarOfPie', 'PercentsStackedBar', 'ClusteredBar3D', 'ClusteredBar', 'StackedBar', 'StackedBar3D', 'PercentsStackedBar3D', 'ClusteredHorizontalCylinder', 'StackedHorizontalCylinder', 'PercentsStackedHorizontalCylinder', 'ClusteredHorizontalCone', 'StackedHorizontalCone', 'PercentsStackedHorizontalCone', 'ClusteredHorizontalPyramid', 'StackedHorizontalPyramid', 'PercentsStackedHorizontalPyramid', 'Area', 'StackedArea', 'PercentsStackedArea', 'Area3D', 'StackedArea3D', 'PercentsStackedArea3D', 'ScatterWithMarkers', 'ScatterWithSmoothLinesAndMarkers', 'ScatterWithSmoothLines', 'ScatterWithStraightLinesAndMarkers', 'ScatterWithStraightLines', 'HighLowClose', 'OpenHighLowClose', 'VolumeHighLowClose', 'VolumeOpenHighLowClose', 'Surface3D', 'WireframeSurface3D', 'Contour', 'WireframeContour', 'Doughnut', 'ExplodedDoughnut', 'Bubble', 'BubbleWith3D', 'Radar', 'RadarWithMarkers', 'FilledRadar', 'SeriesOfMixedTypes'])
395
+ validator = EnumAttributeValidator.new('String', ['ClusteredColumn', 'StackedColumn', 'PercentsStackedColumn', 'ClusteredColumn3D', 'StackedColumn3D', 'PercentsStackedColumn3D', 'Column3D', 'ClusteredCylinder', 'StackedCylinder', 'PercentsStackedCylinder', 'Cylinder3D', 'ClusteredCone', 'StackedCone', 'PercentsStackedCone', 'Cone3D', 'ClusteredPyramid', 'StackedPyramid', 'PercentsStackedPyramid', 'Pyramid3D', 'Line', 'StackedLine', 'PercentsStackedLine', 'LineWithMarkers', 'StackedLineWithMarkers', 'PercentsStackedLineWithMarkers', 'Line3D', 'Pie', 'Pie3D', 'PieOfPie', 'ExplodedPie', 'ExplodedPie3D', 'BarOfPie', 'PercentsStackedBar', 'ClusteredBar3D', 'ClusteredBar', 'StackedBar', 'StackedBar3D', 'PercentsStackedBar3D', 'ClusteredHorizontalCylinder', 'StackedHorizontalCylinder', 'PercentsStackedHorizontalCylinder', 'ClusteredHorizontalCone', 'StackedHorizontalCone', 'PercentsStackedHorizontalCone', 'ClusteredHorizontalPyramid', 'StackedHorizontalPyramid', 'PercentsStackedHorizontalPyramid', 'Area', 'StackedArea', 'PercentsStackedArea', 'Area3D', 'StackedArea3D', 'PercentsStackedArea3D', 'ScatterWithMarkers', 'ScatterWithSmoothLinesAndMarkers', 'ScatterWithSmoothLines', 'ScatterWithStraightLinesAndMarkers', 'ScatterWithStraightLines', 'HighLowClose', 'OpenHighLowClose', 'VolumeHighLowClose', 'VolumeOpenHighLowClose', 'Surface3D', 'WireframeSurface3D', 'Contour', 'WireframeContour', 'Doughnut', 'ExplodedDoughnut', 'Bubble', 'BubbleWith3D', 'Radar', 'RadarWithMarkers', 'FilledRadar', 'SeriesOfMixedTypes', 'Treemap', 'Sunburst', 'Histogram', 'ParetoLine', 'BoxAndWhisker', 'Waterfall', 'Funnel'])
396
396
  unless validator.valid?(chart_type)
397
397
  fail ArgumentError, 'invalid value for "chart_type", must be one of #{validator.allowable_values}.'
398
398
  end
@@ -452,15 +452,27 @@ module AsposeSlidesCloud
452
452
  def build_from_hash(attributes)
453
453
  return nil unless attributes.is_a?(Hash)
454
454
  self.class.swagger_types.each_pair do |key, type|
455
- if type =~ /\AArray<(.*)>/i
456
- # check to ensure the input is an array given that the the attribute
457
- # is documented as an array but the input is not
458
- if attributes[self.class.attribute_map[key]].is_a?(Array)
459
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
455
+ mapKey = self.class.attribute_map[key]
456
+ if !mapKey.nil?
457
+ val = attributes[mapKey]
458
+ if val.nil?
459
+ mapKeyString = mapKey.to_s
460
+ mapKeyString[0] = mapKeyString[0].downcase
461
+ mapKey = mapKeyString.to_sym
462
+ val = attributes[mapKey]
460
463
  end
461
- elsif !attributes[self.class.attribute_map[key]].nil?
462
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
463
- end # or else data not found in attributes(hash), not an issue as the data can be optional
464
+ if !val.nil?
465
+ if type =~ /\AArray<(.*)>/i
466
+ # check to ensure the input is an array given that the the attribute
467
+ # is documented as an array but the input is not
468
+ if val.is_a?(Array)
469
+ self.send("#{key}=", val.map { |v| _deserialize($1, v) })
470
+ end
471
+ else
472
+ self.send("#{key}=", _deserialize(type, val))
473
+ end
474
+ end
475
+ end
464
476
  end
465
477
 
466
478
  self
@@ -0,0 +1,249 @@
1
+ =begin
2
+ Copyright (c) 2019 Aspose Pty Ltd
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ SOFTWARE.
21
+ =end
22
+
23
+ require 'date'
24
+
25
+ module AsposeSlidesCloud
26
+ # Represents chart category resource
27
+ class ChartCategory
28
+ # Gets or sets the categories for chart data
29
+ attr_accessor :categories
30
+
31
+ # Category value
32
+ attr_accessor :value
33
+
34
+ # Get or sets the fill format.
35
+ attr_accessor :fill_format
36
+
37
+ # Get or sets the effect format.
38
+ attr_accessor :effect_format
39
+
40
+ # Get or sets the line format.
41
+ attr_accessor :line_format
42
+
43
+ # Attribute mapping from ruby-style variable name to JSON key.
44
+ def self.attribute_map
45
+ {
46
+ :'categories' => :'Categories',
47
+ :'value' => :'Value',
48
+ :'fill_format' => :'FillFormat',
49
+ :'effect_format' => :'EffectFormat',
50
+ :'line_format' => :'LineFormat'
51
+ }
52
+ end
53
+
54
+ # Attribute type mapping.
55
+ def self.swagger_types
56
+ {
57
+ :'categories' => :'Array<ChartCategory>',
58
+ :'value' => :'String',
59
+ :'fill_format' => :'FillFormat',
60
+ :'effect_format' => :'EffectFormat',
61
+ :'line_format' => :'LineFormat'
62
+ }
63
+ end
64
+
65
+ # Initializes the object
66
+ # @param [Hash] attributes Model attributes in the form of hash
67
+ def initialize(attributes = {})
68
+ return unless attributes.is_a?(Hash)
69
+
70
+ # convert string to symbol for hash key
71
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
72
+
73
+ if attributes.has_key?(:'Categories')
74
+ if (value = attributes[:'Categories']).is_a?(Array)
75
+ self.categories = value
76
+ end
77
+ end
78
+
79
+ if attributes.has_key?(:'Value')
80
+ self.value = attributes[:'Value']
81
+ end
82
+
83
+ if attributes.has_key?(:'FillFormat')
84
+ self.fill_format = attributes[:'FillFormat']
85
+ end
86
+
87
+ if attributes.has_key?(:'EffectFormat')
88
+ self.effect_format = attributes[:'EffectFormat']
89
+ end
90
+
91
+ if attributes.has_key?(:'LineFormat')
92
+ self.line_format = attributes[:'LineFormat']
93
+ end
94
+ end
95
+
96
+ # Show invalid properties with the reasons. Usually used together with valid?
97
+ # @return Array for valid properties with the reasons
98
+ def list_invalid_properties
99
+ invalid_properties = Array.new
100
+ invalid_properties
101
+ end
102
+
103
+ # Check to see if the all the properties in the model are valid
104
+ # @return true if the model is valid
105
+ def valid?
106
+ true
107
+ end
108
+
109
+ # Checks equality by comparing each attribute.
110
+ # @param [Object] Object to be compared
111
+ def ==(o)
112
+ return true if self.equal?(o)
113
+ self.class == o.class &&
114
+ categories == o.categories &&
115
+ value == o.value &&
116
+ fill_format == o.fill_format &&
117
+ effect_format == o.effect_format &&
118
+ line_format == o.line_format
119
+ end
120
+
121
+ # @see the `==` method
122
+ # @param [Object] Object to be compared
123
+ def eql?(o)
124
+ self == o
125
+ end
126
+
127
+ # Calculates hash code according to all attributes.
128
+ # @return [Fixnum] Hash code
129
+ def hash
130
+ [categories, value, fill_format, effect_format, line_format].hash
131
+ 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
+ case type.to_sym
171
+ when :DateTime
172
+ DateTime.parse(value)
173
+ when :Date
174
+ Date.parse(value)
175
+ when :String
176
+ value.to_s
177
+ when :Integer
178
+ value.to_i
179
+ when :Float
180
+ value.to_f
181
+ when :BOOLEAN
182
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
183
+ true
184
+ else
185
+ false
186
+ end
187
+ when :Object
188
+ # generic object (usually a Hash), return directly
189
+ value
190
+ when /\AArray<(?<inner_type>.+)>\z/
191
+ inner_type = Regexp.last_match[:inner_type]
192
+ value.map { |v| _deserialize(inner_type, v) }
193
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
194
+ k_type = Regexp.last_match[:k_type]
195
+ v_type = Regexp.last_match[:v_type]
196
+ {}.tap do |hash|
197
+ value.each do |k, v|
198
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
199
+ end
200
+ end
201
+ else # model
202
+ temp_model = AsposeSlidesCloud.const_get(type).new
203
+ temp_model.build_from_hash(value)
204
+ end
205
+ end
206
+
207
+ # Returns the string representation of the object
208
+ # @return [String] String presentation of the object
209
+ def to_s
210
+ to_hash.to_s
211
+ end
212
+
213
+ # to_body is an alias to to_hash (backward compatibility)
214
+ # @return [Hash] Returns the object in the form of hash
215
+ def to_body
216
+ to_hash
217
+ end
218
+
219
+ # Returns the object in the form of hash
220
+ # @return [Hash] Returns the object in the form of hash
221
+ def to_hash
222
+ hash = {}
223
+ self.class.attribute_map.each_pair do |attr, param|
224
+ value = self.send(attr)
225
+ next if value.nil?
226
+ hash[param] = _to_hash(value)
227
+ end
228
+ hash
229
+ end
230
+
231
+ # Outputs non-array value in the form of hash
232
+ # For object, use to_hash. Otherwise, just return the value
233
+ # @param [Object] value Any valid value
234
+ # @return [Hash] Returns the value in the form of hash
235
+ def _to_hash(value)
236
+ if value.is_a?(Array)
237
+ value.compact.map { |v| _to_hash(v) }
238
+ elsif value.is_a?(Hash)
239
+ {}.tap do |hash|
240
+ value.each { |k, v| hash[k] = _to_hash(v) }
241
+ end
242
+ elsif value.respond_to? :to_hash
243
+ value.to_hash
244
+ else
245
+ value
246
+ end
247
+ end
248
+ end
249
+ end