aspose_slides_cloud 20.4.0 → 20.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5fd86bab987e4592d81dcd1b19cd25d1041e9ef7b1a380fcf238073ebeb3a045
4
- data.tar.gz: 5fb741ce4cf0f67d1a7249a74ada2284d7bc0e4da7fac516586898056b129ae7
3
+ metadata.gz: d394c014971ab16b4d564e83651a2bc4bc3ff866e52cbab7527dea50c42cbe5c
4
+ data.tar.gz: 42472ab0e95384b959de5cc882b6436c237ebf096e02eb6eb6705a7fd28fc7ad
5
5
  SHA512:
6
- metadata.gz: d12700e3d29fd200e1114a7ad8e3b63128a218355b352d9f3e4d599965342247b05105ededf8a56233d2524103d513e2eb23781d7a52458bfbd3f19a6cdf6ed5
7
- data.tar.gz: 7a35a36a261e27cc8810020f6f985501aae88baa3d7c69ccfe3d37183cf855f3a03f737e0de3251f484793055030cdb4f2ac694d845e73cea57e7b4ff8588d22
6
+ metadata.gz: bd06d3e1c74c0181a286cbefb9f5a6bf5ff9f62793aee4ead386185cbc97c6edfb17107656d2adddbbda357def0e5134097d84edca3879c7cb09231d2cf782f7
7
+ data.tar.gz: 90e1bc5d4e2afd2fa0e9ca4e8aec841b0036bc3f7c03fb6f74bb9cc79a0b2e4fbf406fdf108abd72cabac122e650960dff8dfca9dfceb6065ab1244614af9444
@@ -1790,7 +1790,7 @@ module AsposeSlidesCloud
1790
1790
  # header parameters
1791
1791
  header_params = {}
1792
1792
  # HTTP header 'Accept' (if needed)
1793
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1793
+ header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data'])
1794
1794
  # HTTP header 'Content-Type'
1795
1795
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1796
1796
 
@@ -4846,6 +4846,118 @@ module AsposeSlidesCloud
4846
4846
  :return_type => 'MasterSlide')
4847
4847
  return data, status_code, headers
4848
4848
  end
4849
+ # Read notes slide info.
4850
+ # @param request operation request
4851
+ def post_get_notes_slide(request)
4852
+ data, _status_code, _headers = post_get_notes_slide_with_http_info(request)
4853
+ data
4854
+ end
4855
+
4856
+ # Read notes slide info.
4857
+ # @param request operation request
4858
+ def post_get_notes_slide_with_http_info(request)
4859
+ if @api_client.config.debugging
4860
+ @api_client.config.logger.debug 'Calling API: SlidesApi.post_get_notes_slide ...'
4861
+ end
4862
+ # verify the required parameter 'slide_index' is set
4863
+ if @api_client.config.client_side_validation && request.slide_index.nil?
4864
+ fail ArgumentError, "Missing the required parameter 'slide_index' when calling SlidesApi.post_get_notes_slide"
4865
+ end
4866
+ # resource path
4867
+ local_var_path = '/slides/slides/{slideIndex}/notesSlide'
4868
+ local_var_path = @api_client.replace_path_parameter(local_var_path, 'slideIndex', request.slide_index)
4869
+
4870
+ # query parameters
4871
+ query_params = {}
4872
+ query_params[:'password'] = request.password unless request.password.nil?
4873
+
4874
+ # header parameters
4875
+ header_params = {}
4876
+ # HTTP header 'Accept' (if needed)
4877
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
4878
+ # HTTP header 'Content-Type'
4879
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream', 'multipart/form-data'])
4880
+
4881
+ # http body (model)
4882
+ post_body = @api_client.object_to_http_body(request.document)
4883
+
4884
+ # form parameters
4885
+
4886
+ post_files = nil
4887
+
4888
+
4889
+ auth_names = ['JWT']
4890
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
4891
+ :header_params => header_params,
4892
+ :query_params => query_params,
4893
+ :body => post_body,
4894
+ :files => post_files,
4895
+ :auth_names => auth_names,
4896
+ :return_type => 'NotesSlide')
4897
+ return data, status_code, headers
4898
+ end
4899
+ # Convert notes slide to the specified image format.
4900
+ # @param request operation request
4901
+ def post_get_notes_slide_with_format(request)
4902
+ data, _status_code, _headers = post_get_notes_slide_with_format_with_http_info(request)
4903
+ data
4904
+ end
4905
+
4906
+ # Convert notes slide to the specified image format.
4907
+ # @param request operation request
4908
+ def post_get_notes_slide_with_format_with_http_info(request)
4909
+ if @api_client.config.debugging
4910
+ @api_client.config.logger.debug 'Calling API: SlidesApi.post_get_notes_slide_with_format ...'
4911
+ end
4912
+ # verify the required parameter 'slide_index' is set
4913
+ if @api_client.config.client_side_validation && request.slide_index.nil?
4914
+ fail ArgumentError, "Missing the required parameter 'slide_index' when calling SlidesApi.post_get_notes_slide_with_format"
4915
+ end
4916
+ # verify the required parameter 'format' is set
4917
+ if @api_client.config.client_side_validation && request.format.nil?
4918
+ fail ArgumentError, "Missing the required parameter 'format' when calling SlidesApi.post_get_notes_slide_with_format"
4919
+ end
4920
+ # verify enum value
4921
+ if @api_client.config.client_side_validation && !['Jpeg', 'Png', 'Gif', 'Bmp', 'Tiff'].any?{ |s| s.casecmp(request.format)==0 }
4922
+ fail ArgumentError, "invalid value for 'format', must be one of Jpeg, Png, Gif, Bmp, Tiff"
4923
+ end
4924
+ # resource path
4925
+ local_var_path = '/slides/slides/{slideIndex}/notesSlide/{format}'
4926
+ local_var_path = @api_client.replace_path_parameter(local_var_path, 'slideIndex', request.slide_index)
4927
+ local_var_path = @api_client.replace_path_parameter(local_var_path, 'format', request.format)
4928
+
4929
+ # query parameters
4930
+ query_params = {}
4931
+ query_params[:'width'] = request.width unless request.width.nil?
4932
+ query_params[:'height'] = request.height unless request.height.nil?
4933
+ query_params[:'password'] = request.password unless request.password.nil?
4934
+ query_params[:'fontsFolder'] = request.fonts_folder unless request.fonts_folder.nil?
4935
+
4936
+ # header parameters
4937
+ header_params = {}
4938
+ # HTTP header 'Accept' (if needed)
4939
+ header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data'])
4940
+ # HTTP header 'Content-Type'
4941
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream', 'multipart/form-data'])
4942
+
4943
+ # http body (model)
4944
+ post_body = @api_client.object_to_http_body(request.document)
4945
+
4946
+ # form parameters
4947
+
4948
+ post_files = nil
4949
+
4950
+
4951
+ auth_names = ['JWT']
4952
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
4953
+ :header_params => header_params,
4954
+ :query_params => query_params,
4955
+ :body => post_body,
4956
+ :files => post_files,
4957
+ :auth_names => auth_names,
4958
+ :return_type => 'File')
4959
+ return data, status_code, headers
4960
+ end
4849
4961
  # Creates new paragraph.
4850
4962
  # @param request operation request
4851
4963
  def post_notes_slide_add_new_paragraph(request)
@@ -7611,7 +7723,7 @@ module AsposeSlidesCloud
7611
7723
  :body => post_body,
7612
7724
  :files => post_files,
7613
7725
  :auth_names => auth_names,
7614
- :return_type => 'DocumentProperty')
7726
+ :return_type => 'ViewProperties')
7615
7727
  return data, status_code, headers
7616
7728
  end
7617
7729
  # Update notes slide properties.
@@ -7937,6 +8049,10 @@ module AsposeSlidesCloud
7937
8049
  if @api_client.config.debugging
7938
8050
  @api_client.config.logger.debug 'Calling API: SlidesApi.upload_file ...'
7939
8051
  end
8052
+ # verify the required parameter 'file' is set
8053
+ if @api_client.config.client_side_validation && request.file.nil?
8054
+ fail ArgumentError, "Missing the required parameter 'file' when calling SlidesApi.upload_file"
8055
+ end
7940
8056
  # resource path
7941
8057
  local_var_path = '/slides/storage/file/{path}'
7942
8058
  local_var_path = @api_client.replace_path_parameter(local_var_path, 'path', request.path)
@@ -7950,12 +8066,13 @@ module AsposeSlidesCloud
7950
8066
  # HTTP header 'Accept' (if needed)
7951
8067
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
7952
8068
  # HTTP header 'Content-Type'
7953
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
8069
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
7954
8070
 
7955
8071
  # http body (model)
7956
8072
  post_body = nil
7957
8073
 
7958
8074
  # form parameters
8075
+ post_body = request.file
7959
8076
 
7960
8077
  post_files = nil
7961
8078
 
@@ -1765,6 +1765,44 @@ module AsposeSlidesCloud
1765
1765
  attr_accessor :storage
1766
1766
  end
1767
1767
 
1768
+ # request model for post_get_notes_slide
1769
+ class PostGetNotesSlideRequest
1770
+
1771
+ # @param slide_index Slide index.
1772
+ attr_accessor :slide_index
1773
+
1774
+ # @param document Document data.
1775
+ attr_accessor :document
1776
+
1777
+ # @param password Document password.
1778
+ attr_accessor :password
1779
+ end
1780
+
1781
+ # request model for post_get_notes_slide_with_format
1782
+ class PostGetNotesSlideWithFormatRequest
1783
+
1784
+ # @param slide_index Slide index.
1785
+ attr_accessor :slide_index
1786
+
1787
+ # @param format Output file format.
1788
+ attr_accessor :format
1789
+
1790
+ # @param document Document data.
1791
+ attr_accessor :document
1792
+
1793
+ # @param width Output file width.
1794
+ attr_accessor :width
1795
+
1796
+ # @param height Output file height.
1797
+ attr_accessor :height
1798
+
1799
+ # @param password Document password.
1800
+ attr_accessor :password
1801
+
1802
+ # @param fonts_folder Storage folder containing custom fonts to be used with the document.
1803
+ attr_accessor :fonts_folder
1804
+ end
1805
+
1768
1806
  # request model for post_notes_slide_add_new_paragraph
1769
1807
  class PostNotesSlideAddNewParagraphRequest
1770
1808
 
@@ -3090,6 +3128,9 @@ module AsposeSlidesCloud
3090
3128
  # request model for upload_file
3091
3129
  class UploadFileRequest
3092
3130
 
3131
+ # @param file File to upload
3132
+ attr_accessor :file
3133
+
3093
3134
  # @param path Path where to upload including filename and extension e.g. /file.ext or /Folder 1/file.ext If the content is multipart and path does not contains the file name it tries to get them from filename parameter from Content-Disposition header.
3094
3135
  attr_accessor :path
3095
3136
 
@@ -0,0 +1,490 @@
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
+ # One value series.
27
+ class BoxAndWhiskerSeries
28
+ # Series type.
29
+ attr_accessor :type
30
+
31
+ # Series name.
32
+ attr_accessor :name
33
+
34
+ # True if each data marker in the series has a different color.
35
+ attr_accessor :is_color_varied
36
+
37
+ # Invert solid color for the series.
38
+ attr_accessor :inverted_solid_fill_color
39
+
40
+ # True if curve smoothing is turned on. Applies only to line and scatter connected by lines charts.
41
+ attr_accessor :smooth
42
+
43
+ # True if the series is plotted on second value axis.
44
+ attr_accessor :plot_on_second_axis
45
+
46
+ # Series order.
47
+ attr_accessor :order
48
+
49
+ # The number format for the series y values.
50
+ attr_accessor :number_format_of_y_values
51
+
52
+ # The number format for the series x values.
53
+ attr_accessor :number_format_of_x_values
54
+
55
+ # The number format for the series values.
56
+ attr_accessor :number_format_of_values
57
+
58
+ # The number format for the series bubble sizes.
59
+ attr_accessor :number_format_of_bubble_sizes
60
+
61
+ # True if the series shall invert its colors if the value is negative. Applies to bar, column and bubble series.
62
+ attr_accessor :invert_if_negative
63
+
64
+ # The distance of an open pie slice from the center of the pie chart is expressed as a percentage of the pie diameter.
65
+ attr_accessor :explosion
66
+
67
+ # Series marker.
68
+ attr_accessor :marker
69
+
70
+ # Fill properties set for the series.
71
+ attr_accessor :fill_format
72
+
73
+ # Effect properties set for the series.
74
+ attr_accessor :effect_format
75
+
76
+ # Line properties set for the series.
77
+ attr_accessor :line_format
78
+
79
+ # Data point type.
80
+ attr_accessor :data_point_type
81
+
82
+ # Gets or sets the values.
83
+ attr_accessor :data_points
84
+
85
+ # Quartile method.
86
+ attr_accessor :quartile_method
87
+
88
+ # True if inner points are shown.
89
+ attr_accessor :show_inner_points
90
+
91
+ # True if mean line is shown.
92
+ attr_accessor :show_mean_line
93
+
94
+ # True if mean markers are shown.
95
+ attr_accessor :show_mean_markers
96
+
97
+ # True if outlier points are shown.
98
+ attr_accessor :show_outlier_points
99
+
100
+ class EnumAttributeValidator
101
+ attr_reader :datatype
102
+ attr_reader :allowable_values
103
+
104
+ def initialize(datatype, allowable_values)
105
+ @allowable_values = allowable_values.map do |value|
106
+ case datatype.to_s
107
+ when /Integer/i
108
+ value.to_i
109
+ when /Float/i
110
+ value.to_f
111
+ else
112
+ value
113
+ end
114
+ end
115
+ end
116
+
117
+ def valid?(value)
118
+ !value || allowable_values.any?{ |s| s.casecmp(value) == 0 }
119
+ end
120
+ end
121
+
122
+ # Attribute mapping from ruby-style variable name to JSON key.
123
+ def self.attribute_map
124
+ {
125
+ :'type' => :'Type',
126
+ :'name' => :'Name',
127
+ :'is_color_varied' => :'IsColorVaried',
128
+ :'inverted_solid_fill_color' => :'InvertedSolidFillColor',
129
+ :'smooth' => :'Smooth',
130
+ :'plot_on_second_axis' => :'PlotOnSecondAxis',
131
+ :'order' => :'Order',
132
+ :'number_format_of_y_values' => :'NumberFormatOfYValues',
133
+ :'number_format_of_x_values' => :'NumberFormatOfXValues',
134
+ :'number_format_of_values' => :'NumberFormatOfValues',
135
+ :'number_format_of_bubble_sizes' => :'NumberFormatOfBubbleSizes',
136
+ :'invert_if_negative' => :'InvertIfNegative',
137
+ :'explosion' => :'Explosion',
138
+ :'marker' => :'Marker',
139
+ :'fill_format' => :'FillFormat',
140
+ :'effect_format' => :'EffectFormat',
141
+ :'line_format' => :'LineFormat',
142
+ :'data_point_type' => :'DataPointType',
143
+ :'data_points' => :'DataPoints',
144
+ :'quartile_method' => :'QuartileMethod',
145
+ :'show_inner_points' => :'ShowInnerPoints',
146
+ :'show_mean_line' => :'ShowMeanLine',
147
+ :'show_mean_markers' => :'ShowMeanMarkers',
148
+ :'show_outlier_points' => :'ShowOutlierPoints'
149
+ }
150
+ end
151
+
152
+ # Attribute type mapping.
153
+ def self.swagger_types
154
+ {
155
+ :'type' => :'String',
156
+ :'name' => :'String',
157
+ :'is_color_varied' => :'BOOLEAN',
158
+ :'inverted_solid_fill_color' => :'String',
159
+ :'smooth' => :'BOOLEAN',
160
+ :'plot_on_second_axis' => :'BOOLEAN',
161
+ :'order' => :'Integer',
162
+ :'number_format_of_y_values' => :'String',
163
+ :'number_format_of_x_values' => :'String',
164
+ :'number_format_of_values' => :'String',
165
+ :'number_format_of_bubble_sizes' => :'String',
166
+ :'invert_if_negative' => :'BOOLEAN',
167
+ :'explosion' => :'Integer',
168
+ :'marker' => :'SeriesMarker',
169
+ :'fill_format' => :'FillFormat',
170
+ :'effect_format' => :'EffectFormat',
171
+ :'line_format' => :'LineFormat',
172
+ :'data_point_type' => :'String',
173
+ :'data_points' => :'Array<OneValueChartDataPoint>',
174
+ :'quartile_method' => :'String',
175
+ :'show_inner_points' => :'BOOLEAN',
176
+ :'show_mean_line' => :'BOOLEAN',
177
+ :'show_mean_markers' => :'BOOLEAN',
178
+ :'show_outlier_points' => :'BOOLEAN'
179
+ }
180
+ end
181
+
182
+ # Initializes the object
183
+ # @param [Hash] attributes Model attributes in the form of hash
184
+ def initialize(attributes = {})
185
+ return unless attributes.is_a?(Hash)
186
+
187
+ # convert string to symbol for hash key
188
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
189
+
190
+ if attributes.has_key?(:'Type')
191
+ self.type = attributes[:'Type']
192
+ end
193
+
194
+ if attributes.has_key?(:'Name')
195
+ self.name = attributes[:'Name']
196
+ end
197
+
198
+ if attributes.has_key?(:'IsColorVaried')
199
+ self.is_color_varied = attributes[:'IsColorVaried']
200
+ end
201
+
202
+ if attributes.has_key?(:'InvertedSolidFillColor')
203
+ self.inverted_solid_fill_color = attributes[:'InvertedSolidFillColor']
204
+ end
205
+
206
+ if attributes.has_key?(:'Smooth')
207
+ self.smooth = attributes[:'Smooth']
208
+ end
209
+
210
+ if attributes.has_key?(:'PlotOnSecondAxis')
211
+ self.plot_on_second_axis = attributes[:'PlotOnSecondAxis']
212
+ end
213
+
214
+ if attributes.has_key?(:'Order')
215
+ self.order = attributes[:'Order']
216
+ end
217
+
218
+ if attributes.has_key?(:'NumberFormatOfYValues')
219
+ self.number_format_of_y_values = attributes[:'NumberFormatOfYValues']
220
+ end
221
+
222
+ if attributes.has_key?(:'NumberFormatOfXValues')
223
+ self.number_format_of_x_values = attributes[:'NumberFormatOfXValues']
224
+ end
225
+
226
+ if attributes.has_key?(:'NumberFormatOfValues')
227
+ self.number_format_of_values = attributes[:'NumberFormatOfValues']
228
+ end
229
+
230
+ if attributes.has_key?(:'NumberFormatOfBubbleSizes')
231
+ self.number_format_of_bubble_sizes = attributes[:'NumberFormatOfBubbleSizes']
232
+ end
233
+
234
+ if attributes.has_key?(:'InvertIfNegative')
235
+ self.invert_if_negative = attributes[:'InvertIfNegative']
236
+ end
237
+
238
+ if attributes.has_key?(:'Explosion')
239
+ self.explosion = attributes[:'Explosion']
240
+ end
241
+
242
+ if attributes.has_key?(:'Marker')
243
+ self.marker = attributes[:'Marker']
244
+ end
245
+
246
+ if attributes.has_key?(:'FillFormat')
247
+ self.fill_format = attributes[:'FillFormat']
248
+ end
249
+
250
+ if attributes.has_key?(:'EffectFormat')
251
+ self.effect_format = attributes[:'EffectFormat']
252
+ end
253
+
254
+ if attributes.has_key?(:'LineFormat')
255
+ self.line_format = attributes[:'LineFormat']
256
+ end
257
+
258
+ if attributes.has_key?(:'DataPointType')
259
+ self.data_point_type = attributes[:'DataPointType']
260
+ end
261
+
262
+ if attributes.has_key?(:'DataPoints')
263
+ if (value = attributes[:'DataPoints']).is_a?(Array)
264
+ self.data_points = value
265
+ end
266
+ end
267
+
268
+ if attributes.has_key?(:'QuartileMethod')
269
+ self.quartile_method = attributes[:'QuartileMethod']
270
+ end
271
+
272
+ if attributes.has_key?(:'ShowInnerPoints')
273
+ self.show_inner_points = attributes[:'ShowInnerPoints']
274
+ end
275
+
276
+ if attributes.has_key?(:'ShowMeanLine')
277
+ self.show_mean_line = attributes[:'ShowMeanLine']
278
+ end
279
+
280
+ if attributes.has_key?(:'ShowMeanMarkers')
281
+ self.show_mean_markers = attributes[:'ShowMeanMarkers']
282
+ end
283
+
284
+ if attributes.has_key?(:'ShowOutlierPoints')
285
+ self.show_outlier_points = attributes[:'ShowOutlierPoints']
286
+ end
287
+ end
288
+
289
+ # Show invalid properties with the reasons. Usually used together with valid?
290
+ # @return Array for valid properties with the reasons
291
+ def list_invalid_properties
292
+ invalid_properties = Array.new
293
+ if @data_point_type.nil?
294
+ invalid_properties.push('invalid value for "data_point_type", data_point_type cannot be nil.')
295
+ end
296
+
297
+ invalid_properties
298
+ end
299
+
300
+ # Check to see if the all the properties in the model are valid
301
+ # @return true if the model is valid
302
+ def valid?
303
+ 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'])
304
+ return false unless type_validator.valid?(@type)
305
+ return false if @data_point_type.nil?
306
+ data_point_type_validator = EnumAttributeValidator.new('String', ['OneValue', 'Scatter', 'Bubble'])
307
+ return false unless data_point_type_validator.valid?(@data_point_type)
308
+ quartile_method_validator = EnumAttributeValidator.new('String', ['Exclusive', 'Inclusive'])
309
+ return false unless quartile_method_validator.valid?(@quartile_method)
310
+ true
311
+ end
312
+
313
+ # Custom attribute writer method checking allowed values (enum).
314
+ # @param [Object] type Object to be assigned
315
+ def type=(type)
316
+ 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'])
317
+ unless validator.valid?(type)
318
+ fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
319
+ end
320
+ @type = type
321
+ end
322
+
323
+ # Custom attribute writer method checking allowed values (enum).
324
+ # @param [Object] data_point_type Object to be assigned
325
+ def data_point_type=(data_point_type)
326
+ validator = EnumAttributeValidator.new('String', ['OneValue', 'Scatter', 'Bubble'])
327
+ unless validator.valid?(data_point_type)
328
+ fail ArgumentError, 'invalid value for "data_point_type", must be one of #{validator.allowable_values}.'
329
+ end
330
+ @data_point_type = data_point_type
331
+ end
332
+
333
+ # Custom attribute writer method checking allowed values (enum).
334
+ # @param [Object] quartile_method Object to be assigned
335
+ def quartile_method=(quartile_method)
336
+ validator = EnumAttributeValidator.new('String', ['Exclusive', 'Inclusive'])
337
+ unless validator.valid?(quartile_method)
338
+ fail ArgumentError, 'invalid value for "quartile_method", must be one of #{validator.allowable_values}.'
339
+ end
340
+ @quartile_method = quartile_method
341
+ end
342
+
343
+ # Checks equality by comparing each attribute.
344
+ # @param [Object] Object to be compared
345
+ def ==(o)
346
+ return true if self.equal?(o)
347
+ self.class == o.class &&
348
+ type == o.type &&
349
+ name == o.name &&
350
+ is_color_varied == o.is_color_varied &&
351
+ inverted_solid_fill_color == o.inverted_solid_fill_color &&
352
+ smooth == o.smooth &&
353
+ plot_on_second_axis == o.plot_on_second_axis &&
354
+ order == o.order &&
355
+ number_format_of_y_values == o.number_format_of_y_values &&
356
+ number_format_of_x_values == o.number_format_of_x_values &&
357
+ number_format_of_values == o.number_format_of_values &&
358
+ number_format_of_bubble_sizes == o.number_format_of_bubble_sizes &&
359
+ invert_if_negative == o.invert_if_negative &&
360
+ explosion == o.explosion &&
361
+ marker == o.marker &&
362
+ fill_format == o.fill_format &&
363
+ effect_format == o.effect_format &&
364
+ line_format == o.line_format &&
365
+ data_point_type == o.data_point_type &&
366
+ data_points == o.data_points &&
367
+ quartile_method == o.quartile_method &&
368
+ show_inner_points == o.show_inner_points &&
369
+ show_mean_line == o.show_mean_line &&
370
+ show_mean_markers == o.show_mean_markers &&
371
+ show_outlier_points == o.show_outlier_points
372
+ end
373
+
374
+ # @see the `==` method
375
+ # @param [Object] Object to be compared
376
+ def eql?(o)
377
+ self == o
378
+ end
379
+
380
+ # Calculates hash code according to all attributes.
381
+ # @return [Fixnum] Hash code
382
+ def hash
383
+ [type, name, is_color_varied, inverted_solid_fill_color, smooth, plot_on_second_axis, order, number_format_of_y_values, number_format_of_x_values, number_format_of_values, number_format_of_bubble_sizes, invert_if_negative, explosion, marker, fill_format, effect_format, line_format, data_point_type, data_points, quartile_method, show_inner_points, show_mean_line, show_mean_markers, show_outlier_points].hash
384
+ end
385
+
386
+ # Builds the object from hash
387
+ # @param [Hash] attributes Model attributes in the form of hash
388
+ # @return [Object] Returns the model itself
389
+ def build_from_hash(attributes)
390
+ return nil unless attributes.is_a?(Hash)
391
+ self.class.swagger_types.each_pair do |key, type|
392
+ if type =~ /\AArray<(.*)>/i
393
+ # check to ensure the input is an array given that the the attribute
394
+ # is documented as an array but the input is not
395
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
396
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
397
+ end
398
+ elsif !attributes[self.class.attribute_map[key]].nil?
399
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
400
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
401
+ end
402
+
403
+ self
404
+ end
405
+
406
+ # Deserializes the data based on type
407
+ # @param string type Data type
408
+ # @param string value Value to be deserialized
409
+ # @return [Object] Deserialized data
410
+ def _deserialize(type, value)
411
+ case type.to_sym
412
+ when :DateTime
413
+ DateTime.parse(value)
414
+ when :Date
415
+ Date.parse(value)
416
+ when :String
417
+ value.to_s
418
+ when :Integer
419
+ value.to_i
420
+ when :Float
421
+ value.to_f
422
+ when :BOOLEAN
423
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
424
+ true
425
+ else
426
+ false
427
+ end
428
+ when :Object
429
+ # generic object (usually a Hash), return directly
430
+ value
431
+ when /\AArray<(?<inner_type>.+)>\z/
432
+ inner_type = Regexp.last_match[:inner_type]
433
+ value.map { |v| _deserialize(inner_type, v) }
434
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
435
+ k_type = Regexp.last_match[:k_type]
436
+ v_type = Regexp.last_match[:v_type]
437
+ {}.tap do |hash|
438
+ value.each do |k, v|
439
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
440
+ end
441
+ end
442
+ else # model
443
+ temp_model = AsposeSlidesCloud.const_get(type).new
444
+ temp_model.build_from_hash(value)
445
+ end
446
+ end
447
+
448
+ # Returns the string representation of the object
449
+ # @return [String] String presentation of the object
450
+ def to_s
451
+ to_hash.to_s
452
+ end
453
+
454
+ # to_body is an alias to to_hash (backward compatibility)
455
+ # @return [Hash] Returns the object in the form of hash
456
+ def to_body
457
+ to_hash
458
+ end
459
+
460
+ # Returns the object in the form of hash
461
+ # @return [Hash] Returns the object in the form of hash
462
+ def to_hash
463
+ hash = {}
464
+ self.class.attribute_map.each_pair do |attr, param|
465
+ value = self.send(attr)
466
+ next if value.nil?
467
+ hash[param] = _to_hash(value)
468
+ end
469
+ hash
470
+ end
471
+
472
+ # Outputs non-array value in the form of hash
473
+ # For object, use to_hash. Otherwise, just return the value
474
+ # @param [Object] value Any valid value
475
+ # @return [Hash] Returns the value in the form of hash
476
+ def _to_hash(value)
477
+ if value.is_a?(Array)
478
+ value.compact.map { |v| _to_hash(v) }
479
+ elsif value.is_a?(Hash)
480
+ {}.tap do |hash|
481
+ value.each { |k, v| hash[k] = _to_hash(v) }
482
+ end
483
+ elsif value.respond_to? :to_hash
484
+ value.to_hash
485
+ else
486
+ value
487
+ end
488
+ end
489
+ end
490
+ end