aspose_slides_cloud 22.9.0 → 22.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (143) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +14 -14
  3. data/README.md +12 -0
  4. data/docker-entrypoint.sh +1 -2
  5. data/lib/aspose_slides_cloud/api/slides_api.rb +5327 -9036
  6. data/lib/aspose_slides_cloud/api_client.rb +3 -3
  7. data/lib/aspose_slides_cloud/configuration.rb +1 -1
  8. data/lib/aspose_slides_cloud/models/accent_element.rb +1 -1
  9. data/lib/aspose_slides_cloud/models/add_layout_slide.rb +1 -1
  10. data/lib/aspose_slides_cloud/models/add_master_slide.rb +1 -1
  11. data/lib/aspose_slides_cloud/models/add_shape.rb +1 -1
  12. data/lib/aspose_slides_cloud/models/add_slide.rb +1 -1
  13. data/lib/aspose_slides_cloud/models/alpha_bi_level_effect.rb +1 -1
  14. data/lib/aspose_slides_cloud/models/alpha_ceiling_effect.rb +1 -1
  15. data/lib/aspose_slides_cloud/models/alpha_floor_effect.rb +1 -1
  16. data/lib/aspose_slides_cloud/models/alpha_inverse_effect.rb +1 -1
  17. data/lib/aspose_slides_cloud/models/alpha_modulate_effect.rb +1 -1
  18. data/lib/aspose_slides_cloud/models/alpha_modulate_fixed_effect.rb +1 -1
  19. data/lib/aspose_slides_cloud/models/alpha_replace_effect.rb +1 -1
  20. data/lib/aspose_slides_cloud/models/arc_to_path_segment.rb +1 -1
  21. data/lib/aspose_slides_cloud/models/array_element.rb +1 -1
  22. data/lib/aspose_slides_cloud/models/audio_frame.rb +1 -1
  23. data/lib/aspose_slides_cloud/models/axis_type.rb +4 -4
  24. data/lib/aspose_slides_cloud/models/bar_element.rb +1 -1
  25. data/lib/aspose_slides_cloud/models/base64_input_file.rb +1 -1
  26. data/lib/aspose_slides_cloud/models/bi_level_effect.rb +1 -1
  27. data/lib/aspose_slides_cloud/models/block_element.rb +1 -1
  28. data/lib/aspose_slides_cloud/models/blur_image_effect.rb +1 -1
  29. data/lib/aspose_slides_cloud/models/border_box_element.rb +1 -1
  30. data/lib/aspose_slides_cloud/models/box_element.rb +1 -1
  31. data/lib/aspose_slides_cloud/models/bubble_chart_data_point.rb +14 -2
  32. data/lib/aspose_slides_cloud/models/bubble_series.rb +16 -3
  33. data/lib/aspose_slides_cloud/models/chart.rb +12 -2
  34. data/lib/aspose_slides_cloud/models/chart_wall_type.rb +3 -3
  35. data/lib/aspose_slides_cloud/models/close_path_segment.rb +1 -1
  36. data/lib/aspose_slides_cloud/models/color_change_effect.rb +1 -1
  37. data/lib/aspose_slides_cloud/models/color_replace_effect.rb +1 -1
  38. data/lib/aspose_slides_cloud/models/connector.rb +1 -1
  39. data/lib/aspose_slides_cloud/models/cubic_bezier_to_path_segment.rb +1 -1
  40. data/lib/aspose_slides_cloud/models/data_source.rb +244 -0
  41. data/lib/aspose_slides_cloud/models/delimiter_element.rb +1 -1
  42. data/lib/aspose_slides_cloud/models/duotone_effect.rb +1 -1
  43. data/lib/aspose_slides_cloud/models/effect.rb +22 -2
  44. data/lib/aspose_slides_cloud/models/export_format.rb +25 -25
  45. data/lib/aspose_slides_cloud/models/fill_overlay_image_effect.rb +1 -1
  46. data/lib/aspose_slides_cloud/models/fraction_element.rb +1 -1
  47. data/lib/aspose_slides_cloud/models/function_element.rb +1 -1
  48. data/lib/aspose_slides_cloud/models/gif_export_options.rb +1 -1
  49. data/lib/aspose_slides_cloud/models/gradient_fill.rb +1 -1
  50. data/lib/aspose_slides_cloud/models/graphical_object.rb +2 -2
  51. data/lib/aspose_slides_cloud/models/gray_scale_effect.rb +1 -1
  52. data/lib/aspose_slides_cloud/models/group_shape.rb +1 -1
  53. data/lib/aspose_slides_cloud/models/grouping_character_element.rb +1 -1
  54. data/lib/aspose_slides_cloud/models/hsl_effect.rb +1 -1
  55. data/lib/aspose_slides_cloud/models/html5_export_options.rb +1 -1
  56. data/lib/aspose_slides_cloud/models/html_export_options.rb +1 -1
  57. data/lib/aspose_slides_cloud/models/image_export_format.rb +5 -5
  58. data/lib/aspose_slides_cloud/models/image_export_options.rb +1 -1
  59. data/lib/aspose_slides_cloud/models/left_sub_superscript_element.rb +1 -1
  60. data/lib/aspose_slides_cloud/models/limit_element.rb +1 -1
  61. data/lib/aspose_slides_cloud/models/line_to_path_segment.rb +1 -1
  62. data/lib/aspose_slides_cloud/models/literals.rb +223 -0
  63. data/lib/aspose_slides_cloud/models/luminance_effect.rb +1 -1
  64. data/lib/aspose_slides_cloud/models/matrix_element.rb +1 -1
  65. data/lib/aspose_slides_cloud/models/merge.rb +1 -1
  66. data/lib/aspose_slides_cloud/models/move_to_path_segment.rb +1 -1
  67. data/lib/aspose_slides_cloud/models/nary_operator_element.rb +1 -1
  68. data/lib/aspose_slides_cloud/models/no_fill.rb +1 -1
  69. data/lib/aspose_slides_cloud/models/notes_slide_export_format.rb +23 -23
  70. data/lib/aspose_slides_cloud/models/ole_object_frame.rb +1 -1
  71. data/lib/aspose_slides_cloud/models/one_value_chart_data_point.rb +11 -1
  72. data/lib/aspose_slides_cloud/models/one_value_series.rb +13 -2
  73. data/lib/aspose_slides_cloud/models/path_input_file.rb +1 -1
  74. data/lib/aspose_slides_cloud/models/path_output_file.rb +1 -1
  75. data/lib/aspose_slides_cloud/models/pattern_fill.rb +1 -1
  76. data/lib/aspose_slides_cloud/models/pdf_export_options.rb +1 -1
  77. data/lib/aspose_slides_cloud/models/picture_fill.rb +1 -1
  78. data/lib/aspose_slides_cloud/models/picture_frame.rb +1 -1
  79. data/lib/aspose_slides_cloud/models/pptx_export_options.rb +1 -1
  80. data/lib/aspose_slides_cloud/models/quadratic_bezier_to_path_segment.rb +1 -1
  81. data/lib/aspose_slides_cloud/models/radical_element.rb +1 -1
  82. data/lib/aspose_slides_cloud/models/remove_shape.rb +1 -1
  83. data/lib/aspose_slides_cloud/models/remove_slide.rb +1 -1
  84. data/lib/aspose_slides_cloud/models/reorder_slide.rb +1 -1
  85. data/lib/aspose_slides_cloud/models/replace_text.rb +1 -1
  86. data/lib/aspose_slides_cloud/models/request_input_file.rb +1 -1
  87. data/lib/aspose_slides_cloud/models/reset_slide.rb +1 -1
  88. data/lib/aspose_slides_cloud/models/response_output_file.rb +1 -1
  89. data/lib/aspose_slides_cloud/models/right_sub_superscript_element.rb +1 -1
  90. data/lib/aspose_slides_cloud/models/save.rb +1 -1
  91. data/lib/aspose_slides_cloud/models/save_shape.rb +1 -1
  92. data/lib/aspose_slides_cloud/models/save_slide.rb +1 -1
  93. data/lib/aspose_slides_cloud/models/scatter_chart_data_point.rb +22 -2
  94. data/lib/aspose_slides_cloud/models/scatter_series.rb +5 -2
  95. data/lib/aspose_slides_cloud/models/section_zoom_frame.rb +1 -1
  96. data/lib/aspose_slides_cloud/models/series.rb +11 -1
  97. data/lib/aspose_slides_cloud/models/shape.rb +1 -1
  98. data/lib/aspose_slides_cloud/models/shape_export_format.rb +6 -6
  99. data/lib/aspose_slides_cloud/models/shape_thumbnail_bounds.rb +3 -3
  100. data/lib/aspose_slides_cloud/models/shape_type.rb +16 -16
  101. data/lib/aspose_slides_cloud/models/shapes_alignment_type.rb +8 -8
  102. data/lib/aspose_slides_cloud/models/slide_comment.rb +1 -1
  103. data/lib/aspose_slides_cloud/models/slide_export_format.rb +23 -23
  104. data/lib/aspose_slides_cloud/models/slide_modern_comment.rb +1 -1
  105. data/lib/aspose_slides_cloud/models/slide_show_properties.rb +325 -0
  106. data/lib/aspose_slides_cloud/models/smart_art.rb +1 -1
  107. data/lib/aspose_slides_cloud/models/smart_art_shape.rb +1 -1
  108. data/lib/aspose_slides_cloud/models/solid_fill.rb +1 -1
  109. data/lib/aspose_slides_cloud/models/special_slide_type.rb +3 -3
  110. data/lib/aspose_slides_cloud/models/subscript_element.rb +1 -1
  111. data/lib/aspose_slides_cloud/models/summary_zoom_frame.rb +1 -1
  112. data/lib/aspose_slides_cloud/models/summary_zoom_section.rb +1 -1
  113. data/lib/aspose_slides_cloud/models/superscript_element.rb +1 -1
  114. data/lib/aspose_slides_cloud/models/svg_export_options.rb +23 -3
  115. data/lib/aspose_slides_cloud/models/swf_export_options.rb +1 -1
  116. data/lib/aspose_slides_cloud/models/table.rb +1 -1
  117. data/lib/aspose_slides_cloud/models/text_element.rb +1 -1
  118. data/lib/aspose_slides_cloud/models/tiff_export_options.rb +1 -1
  119. data/lib/aspose_slides_cloud/models/tint_effect.rb +1 -1
  120. data/lib/aspose_slides_cloud/models/update_background.rb +1 -1
  121. data/lib/aspose_slides_cloud/models/update_shape.rb +1 -1
  122. data/lib/aspose_slides_cloud/models/video_export_options.rb +1 -1
  123. data/lib/aspose_slides_cloud/models/video_frame.rb +1 -1
  124. data/lib/aspose_slides_cloud/models/workbook.rb +268 -0
  125. data/lib/aspose_slides_cloud/models/xaml_export_options.rb +1 -1
  126. data/lib/aspose_slides_cloud/models/xps_export_options.rb +1 -1
  127. data/lib/aspose_slides_cloud/models/xy_series.rb +23 -2
  128. data/lib/aspose_slides_cloud/models/zoom_frame.rb +1 -1
  129. data/lib/aspose_slides_cloud/type_registry.rb +189 -182
  130. data/lib/aspose_slides_cloud/version.rb +1 -1
  131. data/lib/aspose_slides_cloud.rb +124 -120
  132. data/spec/api/slides_api_spec.rb +23387 -34153
  133. data/spec/spec_utils.rb +88 -49
  134. data/spec/use_cases/chart_spec.rb +160 -1
  135. data/spec/use_cases/convert_spec.rb +8 -2
  136. data/spec/use_cases/font_spec.rb +4 -4
  137. data/spec/use_cases/nullable_field_spec.rb +7 -0
  138. data/spec/use_cases/paragraph_spec.rb +30 -22
  139. data/spec/use_cases/portion_spec.rb +31 -23
  140. data/spec/use_cases/property_spec.rb +23 -0
  141. data/spec/use_cases/shape_spec.rb +22 -18
  142. data/testRules.json +138 -513
  143. metadata +6 -2
@@ -117,7 +117,7 @@ module AsposeSlidesCloud
117
117
  if attributes.has_key?(:'Position')
118
118
  self.position = attributes[:'Position']
119
119
  end
120
- self.type = "SaveSlide"
120
+ self.type = 'SaveSlide'
121
121
  end
122
122
 
123
123
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -31,11 +31,19 @@ module AsposeSlidesCloud
31
31
  # Y-value
32
32
  attr_accessor :y_value
33
33
 
34
+ # Spreadsheet formula in A1-style.
35
+ attr_accessor :x_value_formula
36
+
37
+ # Spreadsheet formula in A1-style.
38
+ attr_accessor :y_value_formula
39
+
34
40
  # Attribute mapping from ruby-style variable name to JSON key.
35
41
  def self.attribute_map
36
42
  super.merge({
37
43
  :'x_value' => :'XValue',
38
44
  :'y_value' => :'YValue',
45
+ :'x_value_formula' => :'XValueFormula',
46
+ :'y_value_formula' => :'YValueFormula',
39
47
  })
40
48
  end
41
49
 
@@ -44,6 +52,8 @@ module AsposeSlidesCloud
44
52
  super.merge({
45
53
  :'x_value' => :'Float',
46
54
  :'y_value' => :'Float',
55
+ :'x_value_formula' => :'String',
56
+ :'y_value_formula' => :'String',
47
57
  })
48
58
  end
49
59
 
@@ -59,6 +69,14 @@ module AsposeSlidesCloud
59
69
  if attributes.has_key?(:'YValue')
60
70
  self.y_value = attributes[:'YValue']
61
71
  end
72
+
73
+ if attributes.has_key?(:'XValueFormula')
74
+ self.x_value_formula = attributes[:'XValueFormula']
75
+ end
76
+
77
+ if attributes.has_key?(:'YValueFormula')
78
+ self.y_value_formula = attributes[:'YValueFormula']
79
+ end
62
80
  end
63
81
 
64
82
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -95,7 +113,9 @@ module AsposeSlidesCloud
95
113
  three_d_format == o.three_d_format &&
96
114
  line_format == o.line_format &&
97
115
  x_value == o.x_value &&
98
- y_value == o.y_value
116
+ y_value == o.y_value &&
117
+ x_value_formula == o.x_value_formula &&
118
+ y_value_formula == o.y_value_formula
99
119
  end
100
120
 
101
121
  # @see the `==` method
@@ -107,7 +127,7 @@ module AsposeSlidesCloud
107
127
  # Calculates hash code according to all attributes.
108
128
  # @return [Fixnum] Hash code
109
129
  def hash
110
- [fill_format, effect_format, three_d_format, line_format, x_value, y_value].hash
130
+ [fill_format, effect_format, three_d_format, line_format, x_value, y_value, x_value_formula, y_value_formula].hash
111
131
  end
112
132
 
113
133
  # Builds the object from hash
@@ -74,7 +74,7 @@ module AsposeSlidesCloud
74
74
  self.data_points = value
75
75
  end
76
76
  end
77
- self.data_point_type = "Scatter"
77
+ self.data_point_type = 'Scatter'
78
78
  end
79
79
 
80
80
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -98,6 +98,7 @@ module AsposeSlidesCloud
98
98
  self.class == o.class &&
99
99
  type == o.type &&
100
100
  name == o.name &&
101
+ data_source_for_series_name == o.data_source_for_series_name &&
101
102
  is_color_varied == o.is_color_varied &&
102
103
  inverted_solid_fill_color == o.inverted_solid_fill_color &&
103
104
  smooth == o.smooth &&
@@ -112,6 +113,8 @@ module AsposeSlidesCloud
112
113
  data_point_type == o.data_point_type &&
113
114
  number_format_of_y_values == o.number_format_of_y_values &&
114
115
  number_format_of_x_values == o.number_format_of_x_values &&
116
+ data_source_for_x_values == o.data_source_for_x_values &&
117
+ data_source_for_y_values == o.data_source_for_y_values &&
115
118
  data_points == o.data_points
116
119
  end
117
120
 
@@ -124,7 +127,7 @@ module AsposeSlidesCloud
124
127
  # Calculates hash code according to all attributes.
125
128
  # @return [Fixnum] Hash code
126
129
  def hash
127
- [type, name, is_color_varied, inverted_solid_fill_color, smooth, plot_on_second_axis, order, invert_if_negative, explosion, marker, fill_format, effect_format, line_format, data_point_type, number_format_of_y_values, number_format_of_x_values, data_points].hash
130
+ [type, name, data_source_for_series_name, is_color_varied, inverted_solid_fill_color, smooth, plot_on_second_axis, order, invert_if_negative, explosion, marker, fill_format, effect_format, line_format, data_point_type, number_format_of_y_values, number_format_of_x_values, data_source_for_x_values, data_source_for_y_values, data_points].hash
128
131
  end
129
132
 
130
133
  # Builds the object from hash
@@ -72,7 +72,7 @@ module AsposeSlidesCloud
72
72
  if attributes.has_key?(:'TargetSectionIndex')
73
73
  self.target_section_index = attributes[:'TargetSectionIndex']
74
74
  end
75
- self.type = "SectionZoomFrame"
75
+ self.type = 'SectionZoomFrame'
76
76
  end
77
77
 
78
78
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -31,6 +31,9 @@ module AsposeSlidesCloud
31
31
  # Series name.
32
32
  attr_accessor :name
33
33
 
34
+ # Series name data source.
35
+ attr_accessor :data_source_for_series_name
36
+
34
37
  # True if each data marker in the series has a different color.
35
38
  attr_accessor :is_color_varied
36
39
 
@@ -93,6 +96,7 @@ module AsposeSlidesCloud
93
96
  {
94
97
  :'type' => :'Type',
95
98
  :'name' => :'Name',
99
+ :'data_source_for_series_name' => :'DataSourceForSeriesName',
96
100
  :'is_color_varied' => :'IsColorVaried',
97
101
  :'inverted_solid_fill_color' => :'InvertedSolidFillColor',
98
102
  :'smooth' => :'Smooth',
@@ -113,6 +117,7 @@ module AsposeSlidesCloud
113
117
  {
114
118
  :'type' => :'String',
115
119
  :'name' => :'String',
120
+ :'data_source_for_series_name' => :'DataSource',
116
121
  :'is_color_varied' => :'BOOLEAN',
117
122
  :'inverted_solid_fill_color' => :'String',
118
123
  :'smooth' => :'BOOLEAN',
@@ -144,6 +149,10 @@ module AsposeSlidesCloud
144
149
  self.name = attributes[:'Name']
145
150
  end
146
151
 
152
+ if attributes.has_key?(:'DataSourceForSeriesName')
153
+ self.data_source_for_series_name = attributes[:'DataSourceForSeriesName']
154
+ end
155
+
147
156
  if attributes.has_key?(:'IsColorVaried')
148
157
  self.is_color_varied = attributes[:'IsColorVaried']
149
158
  end
@@ -237,6 +246,7 @@ module AsposeSlidesCloud
237
246
  self.class == o.class &&
238
247
  type == o.type &&
239
248
  name == o.name &&
249
+ data_source_for_series_name == o.data_source_for_series_name &&
240
250
  is_color_varied == o.is_color_varied &&
241
251
  inverted_solid_fill_color == o.inverted_solid_fill_color &&
242
252
  smooth == o.smooth &&
@@ -260,7 +270,7 @@ module AsposeSlidesCloud
260
270
  # Calculates hash code according to all attributes.
261
271
  # @return [Fixnum] Hash code
262
272
  def hash
263
- [type, name, is_color_varied, inverted_solid_fill_color, smooth, plot_on_second_axis, order, invert_if_negative, explosion, marker, fill_format, effect_format, line_format, data_point_type].hash
273
+ [type, name, data_source_for_series_name, is_color_varied, inverted_solid_fill_color, smooth, plot_on_second_axis, order, invert_if_negative, explosion, marker, fill_format, effect_format, line_format, data_point_type].hash
264
274
  end
265
275
 
266
276
  # Builds the object from hash
@@ -90,7 +90,7 @@ module AsposeSlidesCloud
90
90
  if attributes.has_key?(:'TextFrameFormat')
91
91
  self.text_frame_format = attributes[:'TextFrameFormat']
92
92
  end
93
- self.type = "Shape"
93
+ self.type = 'Shape'
94
94
  end
95
95
 
96
96
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -25,12 +25,12 @@ require 'date'
25
25
  module AsposeSlidesCloud
26
26
  class ShapeExportFormat
27
27
 
28
- JPEG = "Jpeg".freeze
29
- PNG = "Png".freeze
30
- GIF = "Gif".freeze
31
- BMP = "Bmp".freeze
32
- TIFF = "Tiff".freeze
33
- SVG = "Svg".freeze
28
+ JPEG = 'Jpeg'.freeze
29
+ PNG = 'Png'.freeze
30
+ GIF = 'Gif'.freeze
31
+ BMP = 'Bmp'.freeze
32
+ TIFF = 'Tiff'.freeze
33
+ SVG = 'Svg'.freeze
34
34
 
35
35
  # Builds the enum from string
36
36
  # @param [String] The enum value in the form of the string
@@ -25,9 +25,9 @@ require 'date'
25
25
  module AsposeSlidesCloud
26
26
  class ShapeThumbnailBounds
27
27
 
28
- SLIDE = "Slide".freeze
29
- SHAPE = "Shape".freeze
30
- APPEARANCE = "Appearance".freeze
28
+ SLIDE = 'Slide'.freeze
29
+ SHAPE = 'Shape'.freeze
30
+ APPEARANCE = 'Appearance'.freeze
31
31
 
32
32
  # Builds the enum from string
33
33
  # @param [String] The enum value in the form of the string
@@ -25,22 +25,22 @@ require 'date'
25
25
  module AsposeSlidesCloud
26
26
  class ShapeType
27
27
 
28
- SHAPE = "Shape".freeze
29
- CHART = "Chart".freeze
30
- TABLE = "Table".freeze
31
- PICTURE_FRAME = "PictureFrame".freeze
32
- VIDEO_FRAME = "VideoFrame".freeze
33
- AUDIO_FRAME = "AudioFrame".freeze
34
- SMART_ART = "SmartArt".freeze
35
- OLE_OBJECT_FRAME = "OleObjectFrame".freeze
36
- GROUP_SHAPE = "GroupShape".freeze
37
- GRAPHICAL_OBJECT = "GraphicalObject".freeze
38
- CONNECTOR = "Connector".freeze
39
- SMART_ART_SHAPE = "SmartArtShape".freeze
40
- ZOOM_FRAME = "ZoomFrame".freeze
41
- SECTION_ZOOM_FRAME = "SectionZoomFrame".freeze
42
- SUMMARY_ZOOM_FRAME = "SummaryZoomFrame".freeze
43
- SUMMARY_ZOOM_SECTION = "SummaryZoomSection".freeze
28
+ SHAPE = 'Shape'.freeze
29
+ CHART = 'Chart'.freeze
30
+ TABLE = 'Table'.freeze
31
+ PICTURE_FRAME = 'PictureFrame'.freeze
32
+ VIDEO_FRAME = 'VideoFrame'.freeze
33
+ AUDIO_FRAME = 'AudioFrame'.freeze
34
+ SMART_ART = 'SmartArt'.freeze
35
+ OLE_OBJECT_FRAME = 'OleObjectFrame'.freeze
36
+ GROUP_SHAPE = 'GroupShape'.freeze
37
+ GRAPHICAL_OBJECT = 'GraphicalObject'.freeze
38
+ CONNECTOR = 'Connector'.freeze
39
+ SMART_ART_SHAPE = 'SmartArtShape'.freeze
40
+ ZOOM_FRAME = 'ZoomFrame'.freeze
41
+ SECTION_ZOOM_FRAME = 'SectionZoomFrame'.freeze
42
+ SUMMARY_ZOOM_FRAME = 'SummaryZoomFrame'.freeze
43
+ SUMMARY_ZOOM_SECTION = 'SummaryZoomSection'.freeze
44
44
 
45
45
  # Builds the enum from string
46
46
  # @param [String] The enum value in the form of the string
@@ -25,14 +25,14 @@ require 'date'
25
25
  module AsposeSlidesCloud
26
26
  class ShapesAlignmentType
27
27
 
28
- ALIGN_LEFT = "AlignLeft".freeze
29
- ALIGN_RIGHT = "AlignRight".freeze
30
- ALIGN_CENTER = "AlignCenter".freeze
31
- ALIGN_TOP = "AlignTop".freeze
32
- ALIGN_MIDDLE = "AlignMiddle".freeze
33
- ALIGN_BOTTOM = "AlignBottom".freeze
34
- DISTRIBUTE_HORIZONTALLY = "DistributeHorizontally".freeze
35
- DISTRIBUTE_VERTICALLY = "DistributeVertically".freeze
28
+ ALIGN_LEFT = 'AlignLeft'.freeze
29
+ ALIGN_RIGHT = 'AlignRight'.freeze
30
+ ALIGN_CENTER = 'AlignCenter'.freeze
31
+ ALIGN_TOP = 'AlignTop'.freeze
32
+ ALIGN_MIDDLE = 'AlignMiddle'.freeze
33
+ ALIGN_BOTTOM = 'AlignBottom'.freeze
34
+ DISTRIBUTE_HORIZONTALLY = 'DistributeHorizontally'.freeze
35
+ DISTRIBUTE_VERTICALLY = 'DistributeVertically'.freeze
36
36
 
37
37
  # Builds the enum from string
38
38
  # @param [String] The enum value in the form of the string
@@ -63,7 +63,7 @@ module AsposeSlidesCloud
63
63
  # @param [Hash] attributes Model attributes in the form of hash
64
64
  def initialize(attributes = {})
65
65
  super
66
- self.type = "Regular"
66
+ self.type = 'Regular'
67
67
  end
68
68
 
69
69
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -25,29 +25,29 @@ require 'date'
25
25
  module AsposeSlidesCloud
26
26
  class SlideExportFormat
27
27
 
28
- JPEG = "Jpeg".freeze
29
- PNG = "Png".freeze
30
- GIF = "Gif".freeze
31
- BMP = "Bmp".freeze
32
- TIFF = "Tiff".freeze
33
- HTML = "Html".freeze
34
- PDF = "Pdf".freeze
35
- XPS = "Xps".freeze
36
- PPTX = "Pptx".freeze
37
- ODP = "Odp".freeze
38
- OTP = "Otp".freeze
39
- PPT = "Ppt".freeze
40
- PPS = "Pps".freeze
41
- PPSX = "Ppsx".freeze
42
- PPTM = "Pptm".freeze
43
- PPSM = "Ppsm".freeze
44
- POTX = "Potx".freeze
45
- POT = "Pot".freeze
46
- POTM = "Potm".freeze
47
- SVG = "Svg".freeze
48
- FODP = "Fodp".freeze
49
- XAML = "Xaml".freeze
50
- HTML5 = "Html5".freeze
28
+ JPEG = 'Jpeg'.freeze
29
+ PNG = 'Png'.freeze
30
+ GIF = 'Gif'.freeze
31
+ BMP = 'Bmp'.freeze
32
+ TIFF = 'Tiff'.freeze
33
+ HTML = 'Html'.freeze
34
+ PDF = 'Pdf'.freeze
35
+ XPS = 'Xps'.freeze
36
+ PPTX = 'Pptx'.freeze
37
+ ODP = 'Odp'.freeze
38
+ OTP = 'Otp'.freeze
39
+ PPT = 'Ppt'.freeze
40
+ PPS = 'Pps'.freeze
41
+ PPSX = 'Ppsx'.freeze
42
+ PPTM = 'Pptm'.freeze
43
+ PPSM = 'Ppsm'.freeze
44
+ POTX = 'Potx'.freeze
45
+ POT = 'Pot'.freeze
46
+ POTM = 'Potm'.freeze
47
+ SVG = 'Svg'.freeze
48
+ FODP = 'Fodp'.freeze
49
+ XAML = 'Xaml'.freeze
50
+ HTML5 = 'Html5'.freeze
51
51
 
52
52
  # Builds the enum from string
53
53
  # @param [String] The enum value in the form of the string
@@ -90,7 +90,7 @@ module AsposeSlidesCloud
90
90
  if attributes.has_key?(:'Status')
91
91
  self.status = attributes[:'Status']
92
92
  end
93
- self.type = "Modern"
93
+ self.type = 'Modern'
94
94
  end
95
95
 
96
96
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -0,0 +1,325 @@
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
+ # Slide show properties.
27
+ class SlideShowProperties < ResourceBase
28
+ # Loop slide show.
29
+ attr_accessor :loop
30
+
31
+ # Start slide in the slide show.
32
+ attr_accessor :start_slide
33
+
34
+ # End slides in the slide show.
35
+ attr_accessor :end_slide
36
+
37
+ # Pen color.
38
+ attr_accessor :pen_color
39
+
40
+ # Show animation.
41
+ attr_accessor :show_animation
42
+
43
+ # Show narrration.
44
+ attr_accessor :show_narration
45
+
46
+ # Use timings.
47
+ attr_accessor :use_timings
48
+
49
+ # Slide show type.
50
+ attr_accessor :slide_show_type
51
+
52
+ # Show scroll bar. Applied with BrowsedByIndividual slide show type.
53
+ attr_accessor :show_scrollbar
54
+
55
+ class EnumAttributeValidator
56
+ attr_reader :datatype
57
+ attr_reader :allowable_values
58
+
59
+ def initialize(datatype, allowable_values)
60
+ @allowable_values = allowable_values.map do |value|
61
+ case datatype.to_s
62
+ when /Integer/i
63
+ value.to_i
64
+ when /Float/i
65
+ value.to_f
66
+ else
67
+ value
68
+ end
69
+ end
70
+ end
71
+
72
+ def valid?(value)
73
+ !value || allowable_values.any?{ |s| s.casecmp(value) == 0 }
74
+ end
75
+ end
76
+
77
+ # Attribute mapping from ruby-style variable name to JSON key.
78
+ def self.attribute_map
79
+ super.merge({
80
+ :'loop' => :'Loop',
81
+ :'start_slide' => :'StartSlide',
82
+ :'end_slide' => :'EndSlide',
83
+ :'pen_color' => :'PenColor',
84
+ :'show_animation' => :'ShowAnimation',
85
+ :'show_narration' => :'ShowNarration',
86
+ :'use_timings' => :'UseTimings',
87
+ :'slide_show_type' => :'SlideShowType',
88
+ :'show_scrollbar' => :'ShowScrollbar',
89
+ })
90
+ end
91
+
92
+ # Attribute type mapping.
93
+ def self.swagger_types
94
+ super.merge({
95
+ :'loop' => :'BOOLEAN',
96
+ :'start_slide' => :'Integer',
97
+ :'end_slide' => :'Integer',
98
+ :'pen_color' => :'String',
99
+ :'show_animation' => :'BOOLEAN',
100
+ :'show_narration' => :'BOOLEAN',
101
+ :'use_timings' => :'BOOLEAN',
102
+ :'slide_show_type' => :'String',
103
+ :'show_scrollbar' => :'BOOLEAN',
104
+ })
105
+ end
106
+
107
+ # Initializes the object
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ def initialize(attributes = {})
110
+ super
111
+
112
+ if attributes.has_key?(:'Loop')
113
+ self.loop = attributes[:'Loop']
114
+ end
115
+
116
+ if attributes.has_key?(:'StartSlide')
117
+ self.start_slide = attributes[:'StartSlide']
118
+ end
119
+
120
+ if attributes.has_key?(:'EndSlide')
121
+ self.end_slide = attributes[:'EndSlide']
122
+ end
123
+
124
+ if attributes.has_key?(:'PenColor')
125
+ self.pen_color = attributes[:'PenColor']
126
+ end
127
+
128
+ if attributes.has_key?(:'ShowAnimation')
129
+ self.show_animation = attributes[:'ShowAnimation']
130
+ end
131
+
132
+ if attributes.has_key?(:'ShowNarration')
133
+ self.show_narration = attributes[:'ShowNarration']
134
+ end
135
+
136
+ if attributes.has_key?(:'UseTimings')
137
+ self.use_timings = attributes[:'UseTimings']
138
+ end
139
+
140
+ if attributes.has_key?(:'SlideShowType')
141
+ self.slide_show_type = attributes[:'SlideShowType']
142
+ end
143
+
144
+ if attributes.has_key?(:'ShowScrollbar')
145
+ self.show_scrollbar = attributes[:'ShowScrollbar']
146
+ end
147
+ end
148
+
149
+ # Show invalid properties with the reasons. Usually used together with valid?
150
+ # @return Array for valid properties with the reasons
151
+ def list_invalid_properties
152
+ invalid_properties = super
153
+ invalid_properties
154
+ end
155
+
156
+ # Check to see if the all the properties in the model are valid
157
+ # @return true if the model is valid
158
+ def valid?
159
+ return false if !super
160
+ slide_show_type_validator = EnumAttributeValidator.new('String', ['BrowsedAtKiosk', 'BrowsedByIndividual', 'PresentedBySpeaker'])
161
+ return false unless slide_show_type_validator.valid?(@slide_show_type)
162
+ true
163
+ end
164
+
165
+ # Custom attribute writer method checking allowed values (enum).
166
+ # @param [Object] slide_show_type Object to be assigned
167
+ def slide_show_type=(slide_show_type)
168
+ validator = EnumAttributeValidator.new('String', ['BrowsedAtKiosk', 'BrowsedByIndividual', 'PresentedBySpeaker'])
169
+ unless validator.valid?(slide_show_type)
170
+ fail ArgumentError, 'invalid value for "slide_show_type", must be one of #{validator.allowable_values}.'
171
+ end
172
+ @slide_show_type = slide_show_type
173
+ end
174
+
175
+ # Checks equality by comparing each attribute.
176
+ # @param [Object] Object to be compared
177
+ def ==(o)
178
+ return true if self.equal?(o)
179
+ self.class == o.class &&
180
+ self_uri == o.self_uri &&
181
+ alternate_links == o.alternate_links &&
182
+ loop == o.loop &&
183
+ start_slide == o.start_slide &&
184
+ end_slide == o.end_slide &&
185
+ pen_color == o.pen_color &&
186
+ show_animation == o.show_animation &&
187
+ show_narration == o.show_narration &&
188
+ use_timings == o.use_timings &&
189
+ slide_show_type == o.slide_show_type &&
190
+ show_scrollbar == o.show_scrollbar
191
+ end
192
+
193
+ # @see the `==` method
194
+ # @param [Object] Object to be compared
195
+ def eql?(o)
196
+ self == o
197
+ end
198
+
199
+ # Calculates hash code according to all attributes.
200
+ # @return [Fixnum] Hash code
201
+ def hash
202
+ [self_uri, alternate_links, loop, start_slide, end_slide, pen_color, show_animation, show_narration, use_timings, slide_show_type, show_scrollbar].hash
203
+ end
204
+
205
+ # Builds the object from hash
206
+ # @param [Hash] attributes Model attributes in the form of hash
207
+ # @return [Object] Returns the model itself
208
+ def build_from_hash(attributes)
209
+ return nil unless attributes.is_a?(Hash)
210
+ self.class.swagger_types.each_pair do |key, type|
211
+ mapKey = self.class.attribute_map[key]
212
+ if !mapKey.nil?
213
+ val = attributes[mapKey]
214
+ if val.nil?
215
+ mapKeyString = mapKey.to_s
216
+ mapKeyString[0] = mapKeyString[0].downcase
217
+ mapKey = mapKeyString.to_sym
218
+ val = attributes[mapKey]
219
+ end
220
+ if !val.nil?
221
+ if type =~ /\AArray<(.*)>/i
222
+ # check to ensure the input is an array given that the the attribute
223
+ # is documented as an array but the input is not
224
+ if val.is_a?(Array)
225
+ self.send("#{key}=", val.map { |v| _deserialize($1, v) })
226
+ end
227
+ else
228
+ self.send("#{key}=", _deserialize(type, val))
229
+ end
230
+ end
231
+ end
232
+ end
233
+
234
+ self
235
+ end
236
+
237
+ # Deserializes the data based on type
238
+ # @param string type Data type
239
+ # @param string value Value to be deserialized
240
+ # @return [Object] Deserialized data
241
+ def _deserialize(type, value)
242
+ case type.to_sym
243
+ when :DateTime
244
+ DateTime.parse(value)
245
+ when :Date
246
+ Date.parse(value)
247
+ when :String
248
+ value.to_s
249
+ when :Integer
250
+ value.to_i
251
+ when :Float
252
+ value.to_f
253
+ when :BOOLEAN
254
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
255
+ true
256
+ else
257
+ false
258
+ end
259
+ when :Object
260
+ # generic object (usually a Hash), return directly
261
+ value
262
+ when /\AArray<(?<inner_type>.+)>\z/
263
+ inner_type = Regexp.last_match[:inner_type]
264
+ value.map { |v| _deserialize(inner_type, v) }
265
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
266
+ k_type = Regexp.last_match[:k_type]
267
+ v_type = Regexp.last_match[:v_type]
268
+ {}.tap do |hash|
269
+ value.each do |k, v|
270
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
271
+ end
272
+ end
273
+ else # model
274
+ registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
275
+ if registry_type
276
+ type = registry_type
277
+ end
278
+ temp_model = AsposeSlidesCloud.const_get(type).new
279
+ temp_model.build_from_hash(value)
280
+ end
281
+ end
282
+
283
+ # Returns the string representation of the object
284
+ # @return [String] String presentation of the object
285
+ def to_s
286
+ to_hash.to_s
287
+ end
288
+
289
+ # to_body is an alias to to_hash (backward compatibility)
290
+ # @return [Hash] Returns the object in the form of hash
291
+ def to_body
292
+ to_hash
293
+ end
294
+
295
+ # Returns the object in the form of hash
296
+ # @return [Hash] Returns the object in the form of hash
297
+ def to_hash
298
+ hash = {}
299
+ self.class.attribute_map.each_pair do |attr, param|
300
+ value = self.send(attr)
301
+ next if value.nil?
302
+ hash[param] = _to_hash(value)
303
+ end
304
+ hash
305
+ end
306
+
307
+ # Outputs non-array value in the form of hash
308
+ # For object, use to_hash. Otherwise, just return the value
309
+ # @param [Object] value Any valid value
310
+ # @return [Hash] Returns the value in the form of hash
311
+ def _to_hash(value)
312
+ if value.is_a?(Array)
313
+ value.compact.map { |v| _to_hash(v) }
314
+ elsif value.is_a?(Hash)
315
+ {}.tap do |hash|
316
+ value.each { |k, v| hash[k] = _to_hash(v) }
317
+ end
318
+ elsif value.respond_to? :to_hash
319
+ value.to_hash
320
+ else
321
+ value
322
+ end
323
+ end
324
+ end
325
+ end