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
@@ -110,7 +110,7 @@ module AsposeSlidesCloud
110
110
  if attributes.has_key?(:'IsReversed')
111
111
  self.is_reversed = attributes[:'IsReversed']
112
112
  end
113
- self.type = "SmartArt"
113
+ self.type = 'SmartArt'
114
114
  end
115
115
 
116
116
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -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 = "SmartArtShape"
66
+ self.type = 'SmartArtShape'
67
67
  end
68
68
 
69
69
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -72,7 +72,7 @@ module AsposeSlidesCloud
72
72
  if attributes.has_key?(:'Color')
73
73
  self.color = attributes[:'Color']
74
74
  end
75
- self.type = "Solid"
75
+ self.type = 'Solid'
76
76
  end
77
77
 
78
78
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -25,9 +25,9 @@ require 'date'
25
25
  module AsposeSlidesCloud
26
26
  class SpecialSlideType
27
27
 
28
- MASTER_SLIDE = "MasterSlide".freeze
29
- LAYOUT_SLIDE = "LayoutSlide".freeze
30
- NOTES_SLIDE = "NotesSlide".freeze
28
+ MASTER_SLIDE = 'MasterSlide'.freeze
29
+ LAYOUT_SLIDE = 'LayoutSlide'.freeze
30
+ NOTES_SLIDE = 'NotesSlide'.freeze
31
31
 
32
32
  # Builds the enum from string
33
33
  # @param [String] The enum value in the form of the string
@@ -81,7 +81,7 @@ module AsposeSlidesCloud
81
81
  if attributes.has_key?(:'Subscript')
82
82
  self.subscript = attributes[:'Subscript']
83
83
  end
84
- self.type = "SubscriptElement"
84
+ self.type = 'SubscriptElement'
85
85
  end
86
86
 
87
87
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -83,7 +83,7 @@ module AsposeSlidesCloud
83
83
  self.sections = value
84
84
  end
85
85
  end
86
- self.type = "SummaryZoomFrame"
86
+ self.type = 'SummaryZoomFrame'
87
87
  end
88
88
 
89
89
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -81,7 +81,7 @@ module AsposeSlidesCloud
81
81
  if attributes.has_key?(:'Description')
82
82
  self.description = attributes[:'Description']
83
83
  end
84
- self.type = "SummaryZoomSection"
84
+ self.type = 'SummaryZoomSection'
85
85
  end
86
86
 
87
87
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -81,7 +81,7 @@ module AsposeSlidesCloud
81
81
  if attributes.has_key?(:'Superscript')
82
82
  self.superscript = attributes[:'Superscript']
83
83
  end
84
- self.type = "SuperscriptElement"
84
+ self.type = 'SuperscriptElement'
85
85
  end
86
86
 
87
87
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -52,6 +52,12 @@ module AsposeSlidesCloud
52
52
  # Determines a way of handling externally loaded fonts.
53
53
  attr_accessor :external_fonts_handling
54
54
 
55
+ # Determines whether the text frame will be included in a rendering area or not.
56
+ attr_accessor :use_frame_size
57
+
58
+ # Determines whether to perform the specified rotation of the shape when rendering or not.
59
+ attr_accessor :use_frame_rotation
60
+
55
61
  class EnumAttributeValidator
56
62
  attr_reader :datatype
57
63
  attr_reader :allowable_values
@@ -86,6 +92,8 @@ module AsposeSlidesCloud
86
92
  :'pictures_compression' => :'PicturesCompression',
87
93
  :'delete_pictures_cropped_areas' => :'DeletePicturesCroppedAreas',
88
94
  :'external_fonts_handling' => :'ExternalFontsHandling',
95
+ :'use_frame_size' => :'UseFrameSize',
96
+ :'use_frame_rotation' => :'UseFrameRotation',
89
97
  })
90
98
  end
91
99
 
@@ -101,6 +109,8 @@ module AsposeSlidesCloud
101
109
  :'pictures_compression' => :'String',
102
110
  :'delete_pictures_cropped_areas' => :'BOOLEAN',
103
111
  :'external_fonts_handling' => :'String',
112
+ :'use_frame_size' => :'BOOLEAN',
113
+ :'use_frame_rotation' => :'BOOLEAN',
104
114
  })
105
115
  end
106
116
 
@@ -144,7 +154,15 @@ module AsposeSlidesCloud
144
154
  if attributes.has_key?(:'ExternalFontsHandling')
145
155
  self.external_fonts_handling = attributes[:'ExternalFontsHandling']
146
156
  end
147
- self.format = "svg"
157
+
158
+ if attributes.has_key?(:'UseFrameSize')
159
+ self.use_frame_size = attributes[:'UseFrameSize']
160
+ end
161
+
162
+ if attributes.has_key?(:'UseFrameRotation')
163
+ self.use_frame_rotation = attributes[:'UseFrameRotation']
164
+ end
165
+ self.format = 'svg'
148
166
  end
149
167
 
150
168
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -202,7 +220,9 @@ module AsposeSlidesCloud
202
220
  jpeg_quality == o.jpeg_quality &&
203
221
  pictures_compression == o.pictures_compression &&
204
222
  delete_pictures_cropped_areas == o.delete_pictures_cropped_areas &&
205
- external_fonts_handling == o.external_fonts_handling
223
+ external_fonts_handling == o.external_fonts_handling &&
224
+ use_frame_size == o.use_frame_size &&
225
+ use_frame_rotation == o.use_frame_rotation
206
226
  end
207
227
 
208
228
  # @see the `==` method
@@ -214,7 +234,7 @@ module AsposeSlidesCloud
214
234
  # Calculates hash code according to all attributes.
215
235
  # @return [Fixnum] Hash code
216
236
  def hash
217
- [default_regular_font, font_fallback_rules, font_subst_rules, format, vectorize_text, metafile_rasterization_dpi, disable3_d_text, disable_gradient_split, disable_line_end_cropping, jpeg_quality, pictures_compression, delete_pictures_cropped_areas, external_fonts_handling].hash
237
+ [default_regular_font, font_fallback_rules, font_subst_rules, format, vectorize_text, metafile_rasterization_dpi, disable3_d_text, disable_gradient_split, disable_line_end_cropping, jpeg_quality, pictures_compression, delete_pictures_cropped_areas, external_fonts_handling, use_frame_size, use_frame_rotation].hash
218
238
  end
219
239
 
220
240
  # Builds the object from hash
@@ -243,7 +243,7 @@ module AsposeSlidesCloud
243
243
  if attributes.has_key?(:'ShowCommentsByNoAuthor')
244
244
  self.show_comments_by_no_author = attributes[:'ShowCommentsByNoAuthor']
245
245
  end
246
- self.format = "swf"
246
+ self.format = 'swf'
247
247
  end
248
248
 
249
249
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -157,7 +157,7 @@ module AsposeSlidesCloud
157
157
  if attributes.has_key?(:'VerticalBanding')
158
158
  self.vertical_banding = attributes[:'VerticalBanding']
159
159
  end
160
- self.type = "Table"
160
+ self.type = 'Table'
161
161
  end
162
162
 
163
163
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -72,7 +72,7 @@ module AsposeSlidesCloud
72
72
  if attributes.has_key?(:'Value')
73
73
  self.value = attributes[:'Value']
74
74
  end
75
- self.type = "Text"
75
+ self.type = 'Text'
76
76
  end
77
77
 
78
78
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -153,7 +153,7 @@ module AsposeSlidesCloud
153
153
  if attributes.has_key?(:'ShowCommentsByNoAuthor')
154
154
  self.show_comments_by_no_author = attributes[:'ShowCommentsByNoAuthor']
155
155
  end
156
- self.format = "tiff"
156
+ self.format = 'tiff'
157
157
  end
158
158
 
159
159
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -81,7 +81,7 @@ module AsposeSlidesCloud
81
81
  if attributes.has_key?(:'Amount')
82
82
  self.amount = attributes[:'Amount']
83
83
  end
84
- self.type = "Tint"
84
+ self.type = 'Tint'
85
85
  end
86
86
 
87
87
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -83,7 +83,7 @@ module AsposeSlidesCloud
83
83
  if attributes.has_key?(:'Background')
84
84
  self.background = attributes[:'Background']
85
85
  end
86
- self.type = "UpdateBackground"
86
+ self.type = 'UpdateBackground'
87
87
  end
88
88
 
89
89
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -81,7 +81,7 @@ module AsposeSlidesCloud
81
81
  if attributes.has_key?(:'ShapePath')
82
82
  self.shape_path = attributes[:'ShapePath']
83
83
  end
84
- self.type = "UpdateShape"
84
+ self.type = 'UpdateShape'
85
85
  end
86
86
 
87
87
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -99,7 +99,7 @@ module AsposeSlidesCloud
99
99
  if attributes.has_key?(:'VideoResolutionType')
100
100
  self.video_resolution_type = attributes[:'VideoResolutionType']
101
101
  end
102
- self.format = "mpeg4"
102
+ self.format = 'mpeg4'
103
103
  end
104
104
 
105
105
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -135,7 +135,7 @@ module AsposeSlidesCloud
135
135
  if attributes.has_key?(:'PictureFillFormat')
136
136
  self.picture_fill_format = attributes[:'PictureFillFormat']
137
137
  end
138
- self.type = "VideoFrame"
138
+ self.type = 'VideoFrame'
139
139
  end
140
140
 
141
141
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -0,0 +1,268 @@
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 Excel spreadsheet data source.
27
+ class Workbook < DataSource
28
+ # Worksheet index.
29
+ attr_accessor :worksheet_index
30
+
31
+ # Column index of the first value.
32
+ attr_accessor :column_index
33
+
34
+ # Row index of the first value.
35
+ attr_accessor :row_index
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
+ # Attribute mapping from ruby-style variable name to JSON key.
60
+ def self.attribute_map
61
+ super.merge({
62
+ :'worksheet_index' => :'WorksheetIndex',
63
+ :'column_index' => :'ColumnIndex',
64
+ :'row_index' => :'RowIndex',
65
+ })
66
+ end
67
+
68
+ # Attribute type mapping.
69
+ def self.swagger_types
70
+ super.merge({
71
+ :'worksheet_index' => :'Integer',
72
+ :'column_index' => :'Integer',
73
+ :'row_index' => :'Integer',
74
+ })
75
+ end
76
+
77
+ # Initializes the object
78
+ # @param [Hash] attributes Model attributes in the form of hash
79
+ def initialize(attributes = {})
80
+ super
81
+
82
+ if attributes.has_key?(:'WorksheetIndex')
83
+ self.worksheet_index = attributes[:'WorksheetIndex']
84
+ end
85
+
86
+ if attributes.has_key?(:'ColumnIndex')
87
+ self.column_index = attributes[:'ColumnIndex']
88
+ end
89
+
90
+ if attributes.has_key?(:'RowIndex')
91
+ self.row_index = attributes[:'RowIndex']
92
+ end
93
+ self.type = 'Workbook'
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 = super
100
+ if @worksheet_index.nil?
101
+ invalid_properties.push('invalid value for "worksheet_index", worksheet_index cannot be nil.')
102
+ end
103
+
104
+ if @column_index.nil?
105
+ invalid_properties.push('invalid value for "column_index", column_index cannot be nil.')
106
+ end
107
+
108
+ if @row_index.nil?
109
+ invalid_properties.push('invalid value for "row_index", row_index cannot be nil.')
110
+ end
111
+
112
+ invalid_properties
113
+ end
114
+
115
+ # Check to see if the all the properties in the model are valid
116
+ # @return true if the model is valid
117
+ def valid?
118
+ return false if !super
119
+ return false if @worksheet_index.nil?
120
+ return false if @column_index.nil?
121
+ return false if @row_index.nil?
122
+ true
123
+ end
124
+
125
+ # Checks equality by comparing each attribute.
126
+ # @param [Object] Object to be compared
127
+ def ==(o)
128
+ return true if self.equal?(o)
129
+ self.class == o.class &&
130
+ type == o.type &&
131
+ worksheet_index == o.worksheet_index &&
132
+ column_index == o.column_index &&
133
+ row_index == o.row_index
134
+ end
135
+
136
+ # @see the `==` method
137
+ # @param [Object] Object to be compared
138
+ def eql?(o)
139
+ self == o
140
+ end
141
+
142
+ # Calculates hash code according to all attributes.
143
+ # @return [Fixnum] Hash code
144
+ def hash
145
+ [type, worksheet_index, column_index, row_index].hash
146
+ end
147
+
148
+ # Builds the object from hash
149
+ # @param [Hash] attributes Model attributes in the form of hash
150
+ # @return [Object] Returns the model itself
151
+ def build_from_hash(attributes)
152
+ return nil unless attributes.is_a?(Hash)
153
+ self.class.swagger_types.each_pair do |key, type|
154
+ mapKey = self.class.attribute_map[key]
155
+ if !mapKey.nil?
156
+ val = attributes[mapKey]
157
+ if val.nil?
158
+ mapKeyString = mapKey.to_s
159
+ mapKeyString[0] = mapKeyString[0].downcase
160
+ mapKey = mapKeyString.to_sym
161
+ val = attributes[mapKey]
162
+ end
163
+ if !val.nil?
164
+ if type =~ /\AArray<(.*)>/i
165
+ # check to ensure the input is an array given that the the attribute
166
+ # is documented as an array but the input is not
167
+ if val.is_a?(Array)
168
+ self.send("#{key}=", val.map { |v| _deserialize($1, v) })
169
+ end
170
+ else
171
+ self.send("#{key}=", _deserialize(type, val))
172
+ end
173
+ end
174
+ end
175
+ end
176
+
177
+ self
178
+ end
179
+
180
+ # Deserializes the data based on type
181
+ # @param string type Data type
182
+ # @param string value Value to be deserialized
183
+ # @return [Object] Deserialized data
184
+ def _deserialize(type, value)
185
+ case type.to_sym
186
+ when :DateTime
187
+ DateTime.parse(value)
188
+ when :Date
189
+ Date.parse(value)
190
+ when :String
191
+ value.to_s
192
+ when :Integer
193
+ value.to_i
194
+ when :Float
195
+ value.to_f
196
+ when :BOOLEAN
197
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
198
+ true
199
+ else
200
+ false
201
+ end
202
+ when :Object
203
+ # generic object (usually a Hash), return directly
204
+ value
205
+ when /\AArray<(?<inner_type>.+)>\z/
206
+ inner_type = Regexp.last_match[:inner_type]
207
+ value.map { |v| _deserialize(inner_type, v) }
208
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
209
+ k_type = Regexp.last_match[:k_type]
210
+ v_type = Regexp.last_match[:v_type]
211
+ {}.tap do |hash|
212
+ value.each do |k, v|
213
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
214
+ end
215
+ end
216
+ else # model
217
+ registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
218
+ if registry_type
219
+ type = registry_type
220
+ end
221
+ temp_model = AsposeSlidesCloud.const_get(type).new
222
+ temp_model.build_from_hash(value)
223
+ end
224
+ end
225
+
226
+ # Returns the string representation of the object
227
+ # @return [String] String presentation of the object
228
+ def to_s
229
+ to_hash.to_s
230
+ end
231
+
232
+ # to_body is an alias to to_hash (backward compatibility)
233
+ # @return [Hash] Returns the object in the form of hash
234
+ def to_body
235
+ to_hash
236
+ end
237
+
238
+ # Returns the object in the form of hash
239
+ # @return [Hash] Returns the object in the form of hash
240
+ def to_hash
241
+ hash = {}
242
+ self.class.attribute_map.each_pair do |attr, param|
243
+ value = self.send(attr)
244
+ next if value.nil?
245
+ hash[param] = _to_hash(value)
246
+ end
247
+ hash
248
+ end
249
+
250
+ # Outputs non-array value in the form of hash
251
+ # For object, use to_hash. Otherwise, just return the value
252
+ # @param [Object] value Any valid value
253
+ # @return [Hash] Returns the value in the form of hash
254
+ def _to_hash(value)
255
+ if value.is_a?(Array)
256
+ value.compact.map { |v| _to_hash(v) }
257
+ elsif value.is_a?(Hash)
258
+ {}.tap do |hash|
259
+ value.each { |k, v| hash[k] = _to_hash(v) }
260
+ end
261
+ elsif value.respond_to? :to_hash
262
+ value.to_hash
263
+ else
264
+ value
265
+ end
266
+ end
267
+ end
268
+ end
@@ -50,7 +50,7 @@ module AsposeSlidesCloud
50
50
  if attributes.has_key?(:'ExportHiddenSlides')
51
51
  self.export_hidden_slides = attributes[:'ExportHiddenSlides']
52
52
  end
53
- self.format = "xaml"
53
+ self.format = 'xaml'
54
54
  end
55
55
 
56
56
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -68,7 +68,7 @@ module AsposeSlidesCloud
68
68
  if attributes.has_key?(:'DrawSlidesFrame')
69
69
  self.draw_slides_frame = attributes[:'DrawSlidesFrame']
70
70
  end
71
- self.format = "xps"
71
+ self.format = 'xps'
72
72
  end
73
73
 
74
74
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -31,6 +31,12 @@ module AsposeSlidesCloud
31
31
  # The number format for the series x values.
32
32
  attr_accessor :number_format_of_x_values
33
33
 
34
+ # Data source type for X Values.
35
+ attr_accessor :data_source_for_x_values
36
+
37
+ # Data source type for Y Values.
38
+ attr_accessor :data_source_for_y_values
39
+
34
40
  class EnumAttributeValidator
35
41
  attr_reader :datatype
36
42
  attr_reader :allowable_values
@@ -58,6 +64,8 @@ module AsposeSlidesCloud
58
64
  super.merge({
59
65
  :'number_format_of_y_values' => :'NumberFormatOfYValues',
60
66
  :'number_format_of_x_values' => :'NumberFormatOfXValues',
67
+ :'data_source_for_x_values' => :'DataSourceForXValues',
68
+ :'data_source_for_y_values' => :'DataSourceForYValues',
61
69
  })
62
70
  end
63
71
 
@@ -66,6 +74,8 @@ module AsposeSlidesCloud
66
74
  super.merge({
67
75
  :'number_format_of_y_values' => :'String',
68
76
  :'number_format_of_x_values' => :'String',
77
+ :'data_source_for_x_values' => :'DataSource',
78
+ :'data_source_for_y_values' => :'DataSource',
69
79
  })
70
80
  end
71
81
 
@@ -81,6 +91,14 @@ module AsposeSlidesCloud
81
91
  if attributes.has_key?(:'NumberFormatOfXValues')
82
92
  self.number_format_of_x_values = attributes[:'NumberFormatOfXValues']
83
93
  end
94
+
95
+ if attributes.has_key?(:'DataSourceForXValues')
96
+ self.data_source_for_x_values = attributes[:'DataSourceForXValues']
97
+ end
98
+
99
+ if attributes.has_key?(:'DataSourceForYValues')
100
+ self.data_source_for_y_values = attributes[:'DataSourceForYValues']
101
+ end
84
102
  end
85
103
 
86
104
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -104,6 +122,7 @@ module AsposeSlidesCloud
104
122
  self.class == o.class &&
105
123
  type == o.type &&
106
124
  name == o.name &&
125
+ data_source_for_series_name == o.data_source_for_series_name &&
107
126
  is_color_varied == o.is_color_varied &&
108
127
  inverted_solid_fill_color == o.inverted_solid_fill_color &&
109
128
  smooth == o.smooth &&
@@ -117,7 +136,9 @@ module AsposeSlidesCloud
117
136
  line_format == o.line_format &&
118
137
  data_point_type == o.data_point_type &&
119
138
  number_format_of_y_values == o.number_format_of_y_values &&
120
- number_format_of_x_values == o.number_format_of_x_values
139
+ number_format_of_x_values == o.number_format_of_x_values &&
140
+ data_source_for_x_values == o.data_source_for_x_values &&
141
+ data_source_for_y_values == o.data_source_for_y_values
121
142
  end
122
143
 
123
144
  # @see the `==` method
@@ -129,7 +150,7 @@ module AsposeSlidesCloud
129
150
  # Calculates hash code according to all attributes.
130
151
  # @return [Fixnum] Hash code
131
152
  def hash
132
- [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].hash
153
+ [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].hash
133
154
  end
134
155
 
135
156
  # Builds the object from hash
@@ -72,7 +72,7 @@ module AsposeSlidesCloud
72
72
  if attributes.has_key?(:'TargetSlideIndex')
73
73
  self.target_slide_index = attributes[:'TargetSlideIndex']
74
74
  end
75
- self.type = "ZoomFrame"
75
+ self.type = 'ZoomFrame'
76
76
  end
77
77
 
78
78
  # Show invalid properties with the reasons. Usually used together with valid?