aspose_slides_cloud 20.6.0 → 21.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/TestData/ChartTest.pptx +0 -0
- data/TestData/Sections.pptx +0 -0
- data/TestData/test-unprotected.pptx +0 -0
- data/TestData/test.pptx +0 -0
- data/lib/aspose_slides_cloud.rb +13 -5
- data/lib/aspose_slides_cloud/api/slides_api.rb +2432 -691
- data/lib/aspose_slides_cloud/api/slides_api_requests.rb +609 -31
- data/lib/aspose_slides_cloud/api_client.rb +30 -24
- data/lib/aspose_slides_cloud/configuration.rb +7 -2
- data/lib/aspose_slides_cloud/models/add_layout_slide.rb +31 -48
- data/lib/aspose_slides_cloud/models/add_master_slide.rb +31 -48
- data/lib/aspose_slides_cloud/models/add_shape.rb +31 -48
- data/lib/aspose_slides_cloud/models/add_slide.rb +31 -48
- data/lib/aspose_slides_cloud/models/api_info.rb +22 -10
- data/lib/aspose_slides_cloud/models/arrow_head_properties.rb +22 -10
- data/lib/aspose_slides_cloud/models/audio_frame.rb +32 -246
- data/lib/aspose_slides_cloud/models/axes.rb +22 -10
- data/lib/aspose_slides_cloud/models/axis.rb +22 -10
- data/lib/aspose_slides_cloud/models/base64_input_file.rb +31 -57
- data/lib/aspose_slides_cloud/models/blur_effect.rb +22 -10
- data/lib/aspose_slides_cloud/models/box_and_whisker_series.rb +31 -222
- data/lib/aspose_slides_cloud/models/bubble_chart_data_point.rb +30 -48
- data/lib/aspose_slides_cloud/models/bubble_series.rb +31 -211
- data/lib/aspose_slides_cloud/models/chart.rb +32 -220
- data/lib/aspose_slides_cloud/models/chart_category.rb +54 -20
- data/lib/aspose_slides_cloud/models/chart_title.rb +22 -10
- data/lib/aspose_slides_cloud/models/chart_wall.rb +22 -10
- data/lib/aspose_slides_cloud/models/color_scheme.rb +30 -40
- data/lib/aspose_slides_cloud/models/common_slide_view_properties.rb +22 -10
- data/lib/aspose_slides_cloud/models/connector.rb +32 -244
- data/lib/aspose_slides_cloud/models/custom_dash_pattern.rb +22 -10
- data/lib/aspose_slides_cloud/models/{resource_uri_element.rb → data_point.rb} +24 -22
- data/lib/aspose_slides_cloud/models/disc_usage.rb +22 -10
- data/lib/aspose_slides_cloud/models/document.rb +35 -45
- data/lib/aspose_slides_cloud/models/document_properties.rb +30 -40
- data/lib/aspose_slides_cloud/models/document_property.rb +30 -40
- data/lib/aspose_slides_cloud/models/document_replace_result.rb +30 -94
- data/lib/aspose_slides_cloud/models/effect.rb +22 -10
- data/lib/aspose_slides_cloud/models/effect_format.rb +22 -10
- data/lib/aspose_slides_cloud/models/entity_exists.rb +212 -0
- data/lib/aspose_slides_cloud/models/error.rb +22 -10
- data/lib/aspose_slides_cloud/models/error_details.rb +22 -10
- data/lib/aspose_slides_cloud/models/export_options.rb +33 -11
- data/lib/aspose_slides_cloud/models/file_version.rb +30 -75
- data/lib/aspose_slides_cloud/models/file_versions.rb +22 -10
- data/lib/aspose_slides_cloud/models/files_list.rb +22 -10
- data/lib/aspose_slides_cloud/models/files_upload_result.rb +22 -10
- data/lib/aspose_slides_cloud/models/fill_format.rb +22 -10
- data/lib/aspose_slides_cloud/models/fill_overlay_effect.rb +22 -10
- data/lib/aspose_slides_cloud/models/font_scheme.rb +30 -40
- data/lib/aspose_slides_cloud/models/font_set.rb +22 -10
- data/lib/aspose_slides_cloud/models/format_scheme.rb +30 -40
- data/lib/aspose_slides_cloud/models/geometry_shape.rb +33 -212
- data/lib/aspose_slides_cloud/models/glow_effect.rb +22 -10
- data/lib/aspose_slides_cloud/models/gradient_fill.rb +31 -48
- data/lib/aspose_slides_cloud/models/gradient_fill_stop.rb +22 -10
- data/lib/aspose_slides_cloud/models/graphical_object.rb +31 -219
- data/lib/aspose_slides_cloud/models/group_shape.rb +31 -219
- data/lib/aspose_slides_cloud/models/header_footer.rb +247 -0
- data/lib/aspose_slides_cloud/models/html_export_options.rb +33 -32
- data/lib/aspose_slides_cloud/models/i_shape_export_options.rb +22 -20
- data/lib/aspose_slides_cloud/models/image.rb +30 -40
- data/lib/aspose_slides_cloud/models/image_export_options.rb +33 -32
- data/lib/aspose_slides_cloud/models/images.rb +30 -40
- data/lib/aspose_slides_cloud/models/inner_shadow_effect.rb +22 -10
- data/lib/aspose_slides_cloud/models/input.rb +22 -10
- data/lib/aspose_slides_cloud/models/input_file.rb +22 -10
- data/lib/aspose_slides_cloud/models/interactive_sequence.rb +22 -10
- data/lib/aspose_slides_cloud/models/layout_slide.rb +31 -41
- data/lib/aspose_slides_cloud/models/layout_slides.rb +30 -40
- data/lib/aspose_slides_cloud/models/legend.rb +22 -10
- data/lib/aspose_slides_cloud/models/line_format.rb +22 -10
- data/lib/aspose_slides_cloud/models/master_slide.rb +31 -41
- data/lib/aspose_slides_cloud/models/master_slides.rb +30 -40
- data/lib/aspose_slides_cloud/models/merge.rb +31 -48
- data/lib/aspose_slides_cloud/models/merging_source.rb +22 -10
- data/lib/aspose_slides_cloud/models/no_fill.rb +29 -46
- data/lib/aspose_slides_cloud/models/normal_view_restored_properties.rb +22 -10
- data/lib/aspose_slides_cloud/models/notes_slide.rb +30 -40
- data/lib/aspose_slides_cloud/models/notes_slide_header_footer.rb +267 -0
- data/lib/aspose_slides_cloud/models/object_exist.rb +22 -10
- data/lib/aspose_slides_cloud/models/ole_object_frame.rb +32 -220
- data/lib/aspose_slides_cloud/models/one_value_chart_data_point.rb +30 -20
- data/lib/aspose_slides_cloud/models/one_value_series.rb +31 -211
- data/lib/aspose_slides_cloud/models/ordered_merge_request.rb +22 -10
- data/lib/aspose_slides_cloud/models/outer_shadow_effect.rb +22 -10
- data/lib/aspose_slides_cloud/models/output_file.rb +22 -10
- data/lib/aspose_slides_cloud/models/paragraph.rb +30 -40
- data/lib/aspose_slides_cloud/models/paragraphs.rb +30 -40
- data/lib/aspose_slides_cloud/models/path_input_file.rb +31 -57
- data/lib/aspose_slides_cloud/models/path_output_file.rb +31 -48
- data/lib/aspose_slides_cloud/models/pattern_fill.rb +31 -48
- data/lib/aspose_slides_cloud/models/pdf_export_options.rb +33 -32
- data/lib/aspose_slides_cloud/models/picture_fill.rb +32 -49
- data/lib/aspose_slides_cloud/models/picture_frame.rb +32 -246
- data/lib/aspose_slides_cloud/models/pipeline.rb +22 -10
- data/lib/aspose_slides_cloud/models/placeholder.rb +30 -40
- data/lib/aspose_slides_cloud/models/placeholders.rb +30 -40
- data/lib/aspose_slides_cloud/models/plot_area.rb +22 -10
- data/lib/aspose_slides_cloud/models/portion.rb +30 -40
- data/lib/aspose_slides_cloud/models/portions.rb +36 -46
- data/lib/aspose_slides_cloud/models/pptx_export_options.rb +33 -32
- data/lib/aspose_slides_cloud/models/presentation_to_merge.rb +22 -10
- data/lib/aspose_slides_cloud/models/presentations_merge_request.rb +22 -10
- data/lib/aspose_slides_cloud/models/preset_shadow_effect.rb +22 -10
- data/lib/aspose_slides_cloud/models/reflection_effect.rb +22 -10
- data/lib/aspose_slides_cloud/models/remove_shape.rb +31 -48
- data/lib/aspose_slides_cloud/models/remove_slide.rb +31 -48
- data/lib/aspose_slides_cloud/models/reorder_slide.rb +31 -48
- data/lib/aspose_slides_cloud/models/replace_text.rb +31 -48
- data/lib/aspose_slides_cloud/models/request_input_file.rb +31 -57
- data/lib/aspose_slides_cloud/models/reset_slide.rb +31 -48
- data/lib/aspose_slides_cloud/models/resource_base.rb +22 -10
- data/lib/aspose_slides_cloud/models/resource_uri.rb +22 -10
- data/lib/aspose_slides_cloud/models/response_output_file.rb +29 -46
- data/lib/aspose_slides_cloud/models/save.rb +31 -48
- data/lib/aspose_slides_cloud/models/save_shape.rb +31 -48
- data/lib/aspose_slides_cloud/models/save_slide.rb +31 -48
- data/lib/aspose_slides_cloud/models/scatter_chart_data_point.rb +30 -20
- data/lib/aspose_slides_cloud/models/scatter_series.rb +31 -211
- data/lib/aspose_slides_cloud/models/section.rb +234 -0
- data/lib/aspose_slides_cloud/models/sections.rb +209 -0
- data/lib/aspose_slides_cloud/models/series.rb +45 -12
- data/lib/aspose_slides_cloud/models/series_marker.rb +22 -10
- data/lib/aspose_slides_cloud/models/shape.rb +32 -244
- data/lib/aspose_slides_cloud/models/shape_base.rb +31 -62
- data/lib/aspose_slides_cloud/models/shape_image_export_options.rb +22 -10
- data/lib/aspose_slides_cloud/models/shapes.rb +30 -40
- data/lib/aspose_slides_cloud/models/slide.rb +37 -47
- data/lib/aspose_slides_cloud/models/slide_animation.rb +30 -40
- data/lib/aspose_slides_cloud/models/slide_background.rb +30 -40
- data/lib/aspose_slides_cloud/models/slide_comment.rb +22 -10
- data/lib/aspose_slides_cloud/models/slide_comments.rb +30 -40
- data/lib/aspose_slides_cloud/models/slide_replace_result.rb +30 -154
- data/lib/aspose_slides_cloud/models/slides.rb +30 -40
- data/lib/aspose_slides_cloud/models/smart_art.rb +32 -220
- data/lib/aspose_slides_cloud/models/smart_art_node.rb +23 -11
- data/lib/aspose_slides_cloud/models/smart_art_shape.rb +30 -217
- data/lib/aspose_slides_cloud/models/soft_edge_effect.rb +22 -10
- data/lib/aspose_slides_cloud/models/solid_fill.rb +31 -48
- data/lib/aspose_slides_cloud/models/split_document_result.rb +30 -40
- data/lib/aspose_slides_cloud/models/storage_exist.rb +22 -10
- data/lib/aspose_slides_cloud/models/storage_file.rb +22 -10
- data/lib/aspose_slides_cloud/models/svg_export_options.rb +33 -32
- data/lib/aspose_slides_cloud/models/swf_export_options.rb +33 -32
- data/lib/aspose_slides_cloud/models/table.rb +32 -220
- data/lib/aspose_slides_cloud/models/table_cell.rb +22 -10
- data/lib/aspose_slides_cloud/models/table_column.rb +22 -10
- data/lib/aspose_slides_cloud/models/table_row.rb +22 -10
- data/lib/aspose_slides_cloud/models/task.rb +22 -10
- data/lib/aspose_slides_cloud/models/text_item.rb +22 -10
- data/lib/aspose_slides_cloud/models/text_items.rb +30 -40
- data/lib/aspose_slides_cloud/models/theme.rb +32 -42
- data/lib/aspose_slides_cloud/models/tiff_export_options.rb +33 -32
- data/lib/aspose_slides_cloud/models/update_background.rb +31 -48
- data/lib/aspose_slides_cloud/models/update_shape.rb +31 -48
- data/lib/aspose_slides_cloud/models/video_frame.rb +32 -246
- data/lib/aspose_slides_cloud/models/view_properties.rb +30 -40
- data/lib/aspose_slides_cloud/models/waterfall_chart_data_point.rb +206 -0
- data/lib/aspose_slides_cloud/models/waterfall_series.rb +31 -222
- data/lib/aspose_slides_cloud/models/xps_export_options.rb +33 -32
- data/lib/aspose_slides_cloud/type_registry.rb +324 -0
- data/lib/aspose_slides_cloud/version.rb +1 -1
- data/spec/api/slides_api_spec.rb +22294 -14411
- data/spec/extra/extra_spec.rb +156 -22
- data/spec/spec_utils.rb +15 -4
- data/testConfig.json +2 -2
- data/testRules.json +141 -73
- metadata +14 -3
@@ -24,13 +24,7 @@ require 'date'
|
|
24
24
|
|
25
25
|
module AsposeSlidesCloud
|
26
26
|
# Slides document properties.
|
27
|
-
class ViewProperties
|
28
|
-
# Gets or sets the link to this resource.
|
29
|
-
attr_accessor :self_uri
|
30
|
-
|
31
|
-
# List of alternate links.
|
32
|
-
attr_accessor :alternate_links
|
33
|
-
|
27
|
+
class ViewProperties < ResourceBase
|
34
28
|
# Last used view mode.
|
35
29
|
attr_accessor :last_view
|
36
30
|
|
@@ -82,9 +76,7 @@ module AsposeSlidesCloud
|
|
82
76
|
|
83
77
|
# Attribute mapping from ruby-style variable name to JSON key.
|
84
78
|
def self.attribute_map
|
85
|
-
{
|
86
|
-
:'self_uri' => :'SelfUri',
|
87
|
-
:'alternate_links' => :'AlternateLinks',
|
79
|
+
super.merge({
|
88
80
|
:'last_view' => :'LastView',
|
89
81
|
:'horizontal_bar_state' => :'HorizontalBarState',
|
90
82
|
:'vertical_bar_state' => :'VerticalBarState',
|
@@ -93,15 +85,13 @@ module AsposeSlidesCloud
|
|
93
85
|
:'restored_top' => :'RestoredTop',
|
94
86
|
:'slide_view_properties' => :'SlideViewProperties',
|
95
87
|
:'notes_view_properties' => :'NotesViewProperties',
|
96
|
-
:'show_comments' => :'ShowComments'
|
97
|
-
}
|
88
|
+
:'show_comments' => :'ShowComments',
|
89
|
+
})
|
98
90
|
end
|
99
91
|
|
100
92
|
# Attribute type mapping.
|
101
93
|
def self.swagger_types
|
102
|
-
{
|
103
|
-
:'self_uri' => :'ResourceUri',
|
104
|
-
:'alternate_links' => :'Array<ResourceUri>',
|
94
|
+
super.merge({
|
105
95
|
:'last_view' => :'String',
|
106
96
|
:'horizontal_bar_state' => :'String',
|
107
97
|
:'vertical_bar_state' => :'String',
|
@@ -110,27 +100,14 @@ module AsposeSlidesCloud
|
|
110
100
|
:'restored_top' => :'NormalViewRestoredProperties',
|
111
101
|
:'slide_view_properties' => :'CommonSlideViewProperties',
|
112
102
|
:'notes_view_properties' => :'CommonSlideViewProperties',
|
113
|
-
:'show_comments' => :'String'
|
114
|
-
}
|
103
|
+
:'show_comments' => :'String',
|
104
|
+
})
|
115
105
|
end
|
116
106
|
|
117
107
|
# Initializes the object
|
118
108
|
# @param [Hash] attributes Model attributes in the form of hash
|
119
109
|
def initialize(attributes = {})
|
120
|
-
|
121
|
-
|
122
|
-
# convert string to symbol for hash key
|
123
|
-
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
124
|
-
|
125
|
-
if attributes.has_key?(:'SelfUri')
|
126
|
-
self.self_uri = attributes[:'SelfUri']
|
127
|
-
end
|
128
|
-
|
129
|
-
if attributes.has_key?(:'AlternateLinks')
|
130
|
-
if (value = attributes[:'AlternateLinks']).is_a?(Array)
|
131
|
-
self.alternate_links = value
|
132
|
-
end
|
133
|
-
end
|
110
|
+
super
|
134
111
|
|
135
112
|
if attributes.has_key?(:'LastView')
|
136
113
|
self.last_view = attributes[:'LastView']
|
@@ -172,13 +149,14 @@ module AsposeSlidesCloud
|
|
172
149
|
# Show invalid properties with the reasons. Usually used together with valid?
|
173
150
|
# @return Array for valid properties with the reasons
|
174
151
|
def list_invalid_properties
|
175
|
-
invalid_properties =
|
152
|
+
invalid_properties = super
|
176
153
|
invalid_properties
|
177
154
|
end
|
178
155
|
|
179
156
|
# Check to see if the all the properties in the model are valid
|
180
157
|
# @return true if the model is valid
|
181
158
|
def valid?
|
159
|
+
return false if !super
|
182
160
|
last_view_validator = EnumAttributeValidator.new('String', ['NotDefined', 'SlideView', 'SlideMasterView', 'NotesView', 'HandoutView', 'NotesMasterView', 'OutlineView', 'SlideSorterView', 'SlideThumbnailView'])
|
183
161
|
return false unless last_view_validator.valid?(@last_view)
|
184
162
|
horizontal_bar_state_validator = EnumAttributeValidator.new('String', ['Minimized', 'Restored', 'Maximized'])
|
@@ -266,15 +244,27 @@ module AsposeSlidesCloud
|
|
266
244
|
def build_from_hash(attributes)
|
267
245
|
return nil unless attributes.is_a?(Hash)
|
268
246
|
self.class.swagger_types.each_pair do |key, type|
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
if
|
273
|
-
|
247
|
+
mapKey = self.class.attribute_map[key]
|
248
|
+
if !mapKey.nil?
|
249
|
+
val = attributes[mapKey]
|
250
|
+
if val.nil?
|
251
|
+
mapKeyString = mapKey.to_s
|
252
|
+
mapKeyString[0] = mapKeyString[0].downcase
|
253
|
+
mapKey = mapKeyString.to_sym
|
254
|
+
val = attributes[mapKey]
|
274
255
|
end
|
275
|
-
|
276
|
-
|
277
|
-
|
256
|
+
if !val.nil?
|
257
|
+
if type =~ /\AArray<(.*)>/i
|
258
|
+
# check to ensure the input is an array given that the the attribute
|
259
|
+
# is documented as an array but the input is not
|
260
|
+
if val.is_a?(Array)
|
261
|
+
self.send("#{key}=", val.map { |v| _deserialize($1, v) })
|
262
|
+
end
|
263
|
+
else
|
264
|
+
self.send("#{key}=", _deserialize(type, val))
|
265
|
+
end
|
266
|
+
end
|
267
|
+
end
|
278
268
|
end
|
279
269
|
|
280
270
|
self
|
@@ -0,0 +1,206 @@
|
|
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 chart data point.
|
27
|
+
class WaterfallChartDataPoint < OneValueChartDataPoint
|
28
|
+
# Value.
|
29
|
+
attr_accessor :set_as_total
|
30
|
+
|
31
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
32
|
+
def self.attribute_map
|
33
|
+
super.merge({
|
34
|
+
:'set_as_total' => :'SetAsTotal',
|
35
|
+
})
|
36
|
+
end
|
37
|
+
|
38
|
+
# Attribute type mapping.
|
39
|
+
def self.swagger_types
|
40
|
+
super.merge({
|
41
|
+
:'set_as_total' => :'BOOLEAN',
|
42
|
+
})
|
43
|
+
end
|
44
|
+
|
45
|
+
# Initializes the object
|
46
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
47
|
+
def initialize(attributes = {})
|
48
|
+
super
|
49
|
+
|
50
|
+
if attributes.has_key?(:'SetAsTotal')
|
51
|
+
self.set_as_total = attributes[:'SetAsTotal']
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
56
|
+
# @return Array for valid properties with the reasons
|
57
|
+
def list_invalid_properties
|
58
|
+
invalid_properties = super
|
59
|
+
invalid_properties
|
60
|
+
end
|
61
|
+
|
62
|
+
# Check to see if the all the properties in the model are valid
|
63
|
+
# @return true if the model is valid
|
64
|
+
def valid?
|
65
|
+
return false if !super
|
66
|
+
true
|
67
|
+
end
|
68
|
+
|
69
|
+
# Checks equality by comparing each attribute.
|
70
|
+
# @param [Object] Object to be compared
|
71
|
+
def ==(o)
|
72
|
+
return true if self.equal?(o)
|
73
|
+
self.class == o.class &&
|
74
|
+
value == o.value &&
|
75
|
+
set_as_total == o.set_as_total
|
76
|
+
end
|
77
|
+
|
78
|
+
# @see the `==` method
|
79
|
+
# @param [Object] Object to be compared
|
80
|
+
def eql?(o)
|
81
|
+
self == o
|
82
|
+
end
|
83
|
+
|
84
|
+
# Calculates hash code according to all attributes.
|
85
|
+
# @return [Fixnum] Hash code
|
86
|
+
def hash
|
87
|
+
[value, set_as_total].hash
|
88
|
+
end
|
89
|
+
|
90
|
+
# Builds the object from hash
|
91
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
92
|
+
# @return [Object] Returns the model itself
|
93
|
+
def build_from_hash(attributes)
|
94
|
+
return nil unless attributes.is_a?(Hash)
|
95
|
+
self.class.swagger_types.each_pair do |key, type|
|
96
|
+
mapKey = self.class.attribute_map[key]
|
97
|
+
if !mapKey.nil?
|
98
|
+
val = attributes[mapKey]
|
99
|
+
if val.nil?
|
100
|
+
mapKeyString = mapKey.to_s
|
101
|
+
mapKeyString[0] = mapKeyString[0].downcase
|
102
|
+
mapKey = mapKeyString.to_sym
|
103
|
+
val = attributes[mapKey]
|
104
|
+
end
|
105
|
+
if !val.nil?
|
106
|
+
if type =~ /\AArray<(.*)>/i
|
107
|
+
# check to ensure the input is an array given that the the attribute
|
108
|
+
# is documented as an array but the input is not
|
109
|
+
if val.is_a?(Array)
|
110
|
+
self.send("#{key}=", val.map { |v| _deserialize($1, v) })
|
111
|
+
end
|
112
|
+
else
|
113
|
+
self.send("#{key}=", _deserialize(type, val))
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
self
|
120
|
+
end
|
121
|
+
|
122
|
+
# Deserializes the data based on type
|
123
|
+
# @param string type Data type
|
124
|
+
# @param string value Value to be deserialized
|
125
|
+
# @return [Object] Deserialized data
|
126
|
+
def _deserialize(type, value)
|
127
|
+
case type.to_sym
|
128
|
+
when :DateTime
|
129
|
+
DateTime.parse(value)
|
130
|
+
when :Date
|
131
|
+
Date.parse(value)
|
132
|
+
when :String
|
133
|
+
value.to_s
|
134
|
+
when :Integer
|
135
|
+
value.to_i
|
136
|
+
when :Float
|
137
|
+
value.to_f
|
138
|
+
when :BOOLEAN
|
139
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
140
|
+
true
|
141
|
+
else
|
142
|
+
false
|
143
|
+
end
|
144
|
+
when :Object
|
145
|
+
# generic object (usually a Hash), return directly
|
146
|
+
value
|
147
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
148
|
+
inner_type = Regexp.last_match[:inner_type]
|
149
|
+
value.map { |v| _deserialize(inner_type, v) }
|
150
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
151
|
+
k_type = Regexp.last_match[:k_type]
|
152
|
+
v_type = Regexp.last_match[:v_type]
|
153
|
+
{}.tap do |hash|
|
154
|
+
value.each do |k, v|
|
155
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
156
|
+
end
|
157
|
+
end
|
158
|
+
else # model
|
159
|
+
temp_model = AsposeSlidesCloud.const_get(type).new
|
160
|
+
temp_model.build_from_hash(value)
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
164
|
+
# Returns the string representation of the object
|
165
|
+
# @return [String] String presentation of the object
|
166
|
+
def to_s
|
167
|
+
to_hash.to_s
|
168
|
+
end
|
169
|
+
|
170
|
+
# to_body is an alias to to_hash (backward compatibility)
|
171
|
+
# @return [Hash] Returns the object in the form of hash
|
172
|
+
def to_body
|
173
|
+
to_hash
|
174
|
+
end
|
175
|
+
|
176
|
+
# Returns the object in the form of hash
|
177
|
+
# @return [Hash] Returns the object in the form of hash
|
178
|
+
def to_hash
|
179
|
+
hash = {}
|
180
|
+
self.class.attribute_map.each_pair do |attr, param|
|
181
|
+
value = self.send(attr)
|
182
|
+
next if value.nil?
|
183
|
+
hash[param] = _to_hash(value)
|
184
|
+
end
|
185
|
+
hash
|
186
|
+
end
|
187
|
+
|
188
|
+
# Outputs non-array value in the form of hash
|
189
|
+
# For object, use to_hash. Otherwise, just return the value
|
190
|
+
# @param [Object] value Any valid value
|
191
|
+
# @return [Hash] Returns the value in the form of hash
|
192
|
+
def _to_hash(value)
|
193
|
+
if value.is_a?(Array)
|
194
|
+
value.compact.map { |v| _to_hash(v) }
|
195
|
+
elsif value.is_a?(Hash)
|
196
|
+
{}.tap do |hash|
|
197
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
198
|
+
end
|
199
|
+
elsif value.respond_to? :to_hash
|
200
|
+
value.to_hash
|
201
|
+
else
|
202
|
+
value
|
203
|
+
end
|
204
|
+
end
|
205
|
+
end
|
206
|
+
end
|
@@ -24,64 +24,7 @@ require 'date'
|
|
24
24
|
|
25
25
|
module AsposeSlidesCloud
|
26
26
|
# One value series.
|
27
|
-
class WaterfallSeries
|
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
|
-
|
27
|
+
class WaterfallSeries < OneValueSeries
|
85
28
|
# True if inner points are shown.
|
86
29
|
attr_accessor :show_connector_lines
|
87
30
|
|
@@ -109,189 +52,43 @@ module AsposeSlidesCloud
|
|
109
52
|
|
110
53
|
# Attribute mapping from ruby-style variable name to JSON key.
|
111
54
|
def self.attribute_map
|
112
|
-
{
|
113
|
-
:'
|
114
|
-
|
115
|
-
:'is_color_varied' => :'IsColorVaried',
|
116
|
-
:'inverted_solid_fill_color' => :'InvertedSolidFillColor',
|
117
|
-
:'smooth' => :'Smooth',
|
118
|
-
:'plot_on_second_axis' => :'PlotOnSecondAxis',
|
119
|
-
:'order' => :'Order',
|
120
|
-
:'number_format_of_y_values' => :'NumberFormatOfYValues',
|
121
|
-
:'number_format_of_x_values' => :'NumberFormatOfXValues',
|
122
|
-
:'number_format_of_values' => :'NumberFormatOfValues',
|
123
|
-
:'number_format_of_bubble_sizes' => :'NumberFormatOfBubbleSizes',
|
124
|
-
:'invert_if_negative' => :'InvertIfNegative',
|
125
|
-
:'explosion' => :'Explosion',
|
126
|
-
:'marker' => :'Marker',
|
127
|
-
:'fill_format' => :'FillFormat',
|
128
|
-
:'effect_format' => :'EffectFormat',
|
129
|
-
:'line_format' => :'LineFormat',
|
130
|
-
:'data_point_type' => :'DataPointType',
|
131
|
-
:'data_points' => :'DataPoints',
|
132
|
-
:'show_connector_lines' => :'ShowConnectorLines'
|
133
|
-
}
|
55
|
+
super.merge({
|
56
|
+
:'show_connector_lines' => :'ShowConnectorLines',
|
57
|
+
})
|
134
58
|
end
|
135
59
|
|
136
60
|
# Attribute type mapping.
|
137
61
|
def self.swagger_types
|
138
|
-
{
|
139
|
-
:'
|
140
|
-
|
141
|
-
:'is_color_varied' => :'BOOLEAN',
|
142
|
-
:'inverted_solid_fill_color' => :'String',
|
143
|
-
:'smooth' => :'BOOLEAN',
|
144
|
-
:'plot_on_second_axis' => :'BOOLEAN',
|
145
|
-
:'order' => :'Integer',
|
146
|
-
:'number_format_of_y_values' => :'String',
|
147
|
-
:'number_format_of_x_values' => :'String',
|
148
|
-
:'number_format_of_values' => :'String',
|
149
|
-
:'number_format_of_bubble_sizes' => :'String',
|
150
|
-
:'invert_if_negative' => :'BOOLEAN',
|
151
|
-
:'explosion' => :'Integer',
|
152
|
-
:'marker' => :'SeriesMarker',
|
153
|
-
:'fill_format' => :'FillFormat',
|
154
|
-
:'effect_format' => :'EffectFormat',
|
155
|
-
:'line_format' => :'LineFormat',
|
156
|
-
:'data_point_type' => :'String',
|
157
|
-
:'data_points' => :'Array<OneValueChartDataPoint>',
|
158
|
-
:'show_connector_lines' => :'BOOLEAN'
|
159
|
-
}
|
62
|
+
super.merge({
|
63
|
+
:'show_connector_lines' => :'BOOLEAN',
|
64
|
+
})
|
160
65
|
end
|
161
66
|
|
162
67
|
# Initializes the object
|
163
68
|
# @param [Hash] attributes Model attributes in the form of hash
|
164
69
|
def initialize(attributes = {})
|
165
|
-
|
166
|
-
|
167
|
-
# convert string to symbol for hash key
|
168
|
-
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
169
|
-
|
170
|
-
if attributes.has_key?(:'Type')
|
171
|
-
self.type = attributes[:'Type']
|
172
|
-
end
|
173
|
-
|
174
|
-
if attributes.has_key?(:'Name')
|
175
|
-
self.name = attributes[:'Name']
|
176
|
-
end
|
177
|
-
|
178
|
-
if attributes.has_key?(:'IsColorVaried')
|
179
|
-
self.is_color_varied = attributes[:'IsColorVaried']
|
180
|
-
end
|
181
|
-
|
182
|
-
if attributes.has_key?(:'InvertedSolidFillColor')
|
183
|
-
self.inverted_solid_fill_color = attributes[:'InvertedSolidFillColor']
|
184
|
-
end
|
185
|
-
|
186
|
-
if attributes.has_key?(:'Smooth')
|
187
|
-
self.smooth = attributes[:'Smooth']
|
188
|
-
end
|
189
|
-
|
190
|
-
if attributes.has_key?(:'PlotOnSecondAxis')
|
191
|
-
self.plot_on_second_axis = attributes[:'PlotOnSecondAxis']
|
192
|
-
end
|
193
|
-
|
194
|
-
if attributes.has_key?(:'Order')
|
195
|
-
self.order = attributes[:'Order']
|
196
|
-
end
|
197
|
-
|
198
|
-
if attributes.has_key?(:'NumberFormatOfYValues')
|
199
|
-
self.number_format_of_y_values = attributes[:'NumberFormatOfYValues']
|
200
|
-
end
|
201
|
-
|
202
|
-
if attributes.has_key?(:'NumberFormatOfXValues')
|
203
|
-
self.number_format_of_x_values = attributes[:'NumberFormatOfXValues']
|
204
|
-
end
|
205
|
-
|
206
|
-
if attributes.has_key?(:'NumberFormatOfValues')
|
207
|
-
self.number_format_of_values = attributes[:'NumberFormatOfValues']
|
208
|
-
end
|
209
|
-
|
210
|
-
if attributes.has_key?(:'NumberFormatOfBubbleSizes')
|
211
|
-
self.number_format_of_bubble_sizes = attributes[:'NumberFormatOfBubbleSizes']
|
212
|
-
end
|
213
|
-
|
214
|
-
if attributes.has_key?(:'InvertIfNegative')
|
215
|
-
self.invert_if_negative = attributes[:'InvertIfNegative']
|
216
|
-
end
|
217
|
-
|
218
|
-
if attributes.has_key?(:'Explosion')
|
219
|
-
self.explosion = attributes[:'Explosion']
|
220
|
-
end
|
221
|
-
|
222
|
-
if attributes.has_key?(:'Marker')
|
223
|
-
self.marker = attributes[:'Marker']
|
224
|
-
end
|
225
|
-
|
226
|
-
if attributes.has_key?(:'FillFormat')
|
227
|
-
self.fill_format = attributes[:'FillFormat']
|
228
|
-
end
|
229
|
-
|
230
|
-
if attributes.has_key?(:'EffectFormat')
|
231
|
-
self.effect_format = attributes[:'EffectFormat']
|
232
|
-
end
|
233
|
-
|
234
|
-
if attributes.has_key?(:'LineFormat')
|
235
|
-
self.line_format = attributes[:'LineFormat']
|
236
|
-
end
|
237
|
-
|
238
|
-
if attributes.has_key?(:'DataPointType')
|
239
|
-
self.data_point_type = attributes[:'DataPointType']
|
240
|
-
end
|
241
|
-
|
242
|
-
if attributes.has_key?(:'DataPoints')
|
243
|
-
if (value = attributes[:'DataPoints']).is_a?(Array)
|
244
|
-
self.data_points = value
|
245
|
-
end
|
246
|
-
end
|
70
|
+
super
|
247
71
|
|
248
72
|
if attributes.has_key?(:'ShowConnectorLines')
|
249
73
|
self.show_connector_lines = attributes[:'ShowConnectorLines']
|
250
74
|
end
|
75
|
+
self.data_point_type = "OneValue"
|
251
76
|
end
|
252
77
|
|
253
78
|
# Show invalid properties with the reasons. Usually used together with valid?
|
254
79
|
# @return Array for valid properties with the reasons
|
255
80
|
def list_invalid_properties
|
256
|
-
invalid_properties =
|
257
|
-
if @data_point_type.nil?
|
258
|
-
invalid_properties.push('invalid value for "data_point_type", data_point_type cannot be nil.')
|
259
|
-
end
|
260
|
-
|
81
|
+
invalid_properties = super
|
261
82
|
invalid_properties
|
262
83
|
end
|
263
84
|
|
264
85
|
# Check to see if the all the properties in the model are valid
|
265
86
|
# @return true if the model is valid
|
266
87
|
def valid?
|
267
|
-
|
268
|
-
return false unless type_validator.valid?(@type)
|
269
|
-
return false if @data_point_type.nil?
|
270
|
-
data_point_type_validator = EnumAttributeValidator.new('String', ['OneValue', 'Scatter', 'Bubble'])
|
271
|
-
return false unless data_point_type_validator.valid?(@data_point_type)
|
88
|
+
return false if !super
|
272
89
|
true
|
273
90
|
end
|
274
91
|
|
275
|
-
# Custom attribute writer method checking allowed values (enum).
|
276
|
-
# @param [Object] type Object to be assigned
|
277
|
-
def type=(type)
|
278
|
-
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'])
|
279
|
-
unless validator.valid?(type)
|
280
|
-
fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
|
281
|
-
end
|
282
|
-
@type = type
|
283
|
-
end
|
284
|
-
|
285
|
-
# Custom attribute writer method checking allowed values (enum).
|
286
|
-
# @param [Object] data_point_type Object to be assigned
|
287
|
-
def data_point_type=(data_point_type)
|
288
|
-
validator = EnumAttributeValidator.new('String', ['OneValue', 'Scatter', 'Bubble'])
|
289
|
-
unless validator.valid?(data_point_type)
|
290
|
-
fail ArgumentError, 'invalid value for "data_point_type", must be one of #{validator.allowable_values}.'
|
291
|
-
end
|
292
|
-
@data_point_type = data_point_type
|
293
|
-
end
|
294
|
-
|
295
92
|
# Checks equality by comparing each attribute.
|
296
93
|
# @param [Object] Object to be compared
|
297
94
|
def ==(o)
|
@@ -337,15 +134,27 @@ module AsposeSlidesCloud
|
|
337
134
|
def build_from_hash(attributes)
|
338
135
|
return nil unless attributes.is_a?(Hash)
|
339
136
|
self.class.swagger_types.each_pair do |key, type|
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
if
|
344
|
-
|
137
|
+
mapKey = self.class.attribute_map[key]
|
138
|
+
if !mapKey.nil?
|
139
|
+
val = attributes[mapKey]
|
140
|
+
if val.nil?
|
141
|
+
mapKeyString = mapKey.to_s
|
142
|
+
mapKeyString[0] = mapKeyString[0].downcase
|
143
|
+
mapKey = mapKeyString.to_sym
|
144
|
+
val = attributes[mapKey]
|
345
145
|
end
|
346
|
-
|
347
|
-
|
348
|
-
|
146
|
+
if !val.nil?
|
147
|
+
if type =~ /\AArray<(.*)>/i
|
148
|
+
# check to ensure the input is an array given that the the attribute
|
149
|
+
# is documented as an array but the input is not
|
150
|
+
if val.is_a?(Array)
|
151
|
+
self.send("#{key}=", val.map { |v| _deserialize($1, v) })
|
152
|
+
end
|
153
|
+
else
|
154
|
+
self.send("#{key}=", _deserialize(type, val))
|
155
|
+
end
|
156
|
+
end
|
157
|
+
end
|
349
158
|
end
|
350
159
|
|
351
160
|
self
|