aspose_slides_cloud 20.7.0 → 21.2.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.pdf +0 -0
- data/TestData/test.pptx +0 -0
- data/lib/aspose_slides_cloud.rb +12 -5
- data/lib/aspose_slides_cloud/api/slides_api.rb +2130 -940
- data/lib/aspose_slides_cloud/api/slides_api_requests.rb +531 -31
- data/lib/aspose_slides_cloud/api_client.rb +25 -23
- data/lib/aspose_slides_cloud/configuration.rb +7 -2
- data/lib/aspose_slides_cloud/models/add_layout_slide.rb +11 -40
- data/lib/aspose_slides_cloud/models/add_master_slide.rb +11 -40
- data/lib/aspose_slides_cloud/models/add_shape.rb +11 -40
- data/lib/aspose_slides_cloud/models/add_slide.rb +11 -40
- data/lib/aspose_slides_cloud/models/api_info.rb +2 -2
- data/lib/aspose_slides_cloud/models/arrow_head_properties.rb +2 -2
- data/lib/aspose_slides_cloud/models/audio_frame.rb +12 -238
- data/lib/aspose_slides_cloud/models/axes.rb +2 -2
- data/lib/aspose_slides_cloud/models/axis.rb +2 -2
- data/lib/aspose_slides_cloud/models/base64_input_file.rb +11 -49
- data/lib/aspose_slides_cloud/models/blur_effect.rb +2 -2
- data/lib/aspose_slides_cloud/models/box_and_whisker_series.rb +11 -216
- data/lib/aspose_slides_cloud/models/bubble_chart_data_point.rb +10 -40
- data/lib/aspose_slides_cloud/models/bubble_series.rb +11 -205
- data/lib/aspose_slides_cloud/models/chart.rb +14 -214
- data/lib/aspose_slides_cloud/models/chart_category.rb +34 -12
- data/lib/aspose_slides_cloud/models/chart_title.rb +2 -2
- data/lib/aspose_slides_cloud/models/chart_wall.rb +2 -2
- data/lib/aspose_slides_cloud/models/color_scheme.rb +10 -32
- data/lib/aspose_slides_cloud/models/common_slide_view_properties.rb +2 -2
- data/lib/aspose_slides_cloud/models/connector.rb +12 -236
- data/lib/aspose_slides_cloud/models/custom_dash_pattern.rb +2 -2
- data/lib/aspose_slides_cloud/models/{resource_uri_element.rb → data_point.rb} +4 -14
- data/lib/aspose_slides_cloud/models/disc_usage.rb +2 -2
- data/lib/aspose_slides_cloud/models/document.rb +15 -37
- data/lib/aspose_slides_cloud/models/document_properties.rb +10 -32
- data/lib/aspose_slides_cloud/models/document_property.rb +10 -32
- data/lib/aspose_slides_cloud/models/document_replace_result.rb +10 -86
- data/lib/aspose_slides_cloud/models/effect.rb +2 -2
- data/lib/aspose_slides_cloud/models/effect_format.rb +2 -2
- data/lib/aspose_slides_cloud/models/entity_exists.rb +2 -2
- data/lib/aspose_slides_cloud/models/error.rb +2 -2
- data/lib/aspose_slides_cloud/models/error_details.rb +2 -2
- data/lib/aspose_slides_cloud/models/export_options.rb +13 -3
- data/lib/aspose_slides_cloud/models/file_version.rb +10 -67
- data/lib/aspose_slides_cloud/models/file_versions.rb +2 -2
- data/lib/aspose_slides_cloud/models/files_list.rb +2 -2
- data/lib/aspose_slides_cloud/models/files_upload_result.rb +2 -2
- data/lib/aspose_slides_cloud/models/fill_format.rb +2 -2
- data/lib/aspose_slides_cloud/models/fill_overlay_effect.rb +2 -2
- data/lib/aspose_slides_cloud/models/font_scheme.rb +10 -32
- data/lib/aspose_slides_cloud/models/font_set.rb +2 -2
- data/lib/aspose_slides_cloud/models/format_scheme.rb +10 -32
- data/lib/aspose_slides_cloud/models/geometry_shape.rb +13 -204
- data/lib/aspose_slides_cloud/models/glow_effect.rb +2 -2
- data/lib/aspose_slides_cloud/models/gradient_fill.rb +11 -40
- data/lib/aspose_slides_cloud/models/gradient_fill_stop.rb +2 -2
- data/lib/aspose_slides_cloud/models/graphical_object.rb +11 -211
- data/lib/aspose_slides_cloud/models/group_shape.rb +11 -211
- data/lib/aspose_slides_cloud/models/header_footer.rb +247 -0
- data/lib/aspose_slides_cloud/models/html_export_options.rb +13 -24
- data/lib/aspose_slides_cloud/models/i_shape_export_options.rb +2 -12
- data/lib/aspose_slides_cloud/models/image.rb +10 -32
- data/lib/aspose_slides_cloud/models/image_export_options.rb +13 -24
- data/lib/aspose_slides_cloud/models/images.rb +10 -32
- data/lib/aspose_slides_cloud/models/inner_shadow_effect.rb +2 -2
- data/lib/aspose_slides_cloud/models/input.rb +2 -2
- data/lib/aspose_slides_cloud/models/input_file.rb +2 -2
- data/lib/aspose_slides_cloud/models/interactive_sequence.rb +2 -2
- data/lib/aspose_slides_cloud/models/layout_slide.rb +11 -33
- data/lib/aspose_slides_cloud/models/layout_slides.rb +10 -32
- data/lib/aspose_slides_cloud/models/legend.rb +2 -2
- data/lib/aspose_slides_cloud/models/line_format.rb +25 -3
- data/lib/aspose_slides_cloud/models/master_slide.rb +11 -33
- data/lib/aspose_slides_cloud/models/master_slides.rb +10 -32
- data/lib/aspose_slides_cloud/models/merge.rb +11 -40
- data/lib/aspose_slides_cloud/models/merging_source.rb +2 -2
- data/lib/aspose_slides_cloud/models/no_fill.rb +9 -38
- data/lib/aspose_slides_cloud/models/normal_view_restored_properties.rb +2 -2
- data/lib/aspose_slides_cloud/models/notes_slide.rb +10 -32
- data/lib/aspose_slides_cloud/models/notes_slide_header_footer.rb +267 -0
- data/lib/aspose_slides_cloud/models/object_exist.rb +2 -2
- data/lib/aspose_slides_cloud/models/ole_object_frame.rb +12 -212
- data/lib/aspose_slides_cloud/models/one_value_chart_data_point.rb +10 -12
- data/lib/aspose_slides_cloud/models/one_value_series.rb +11 -205
- data/lib/aspose_slides_cloud/models/ordered_merge_request.rb +2 -2
- data/lib/aspose_slides_cloud/models/outer_shadow_effect.rb +2 -2
- data/lib/aspose_slides_cloud/models/output_file.rb +2 -2
- data/lib/aspose_slides_cloud/models/paragraph.rb +10 -32
- data/lib/aspose_slides_cloud/models/paragraphs.rb +10 -32
- data/lib/aspose_slides_cloud/models/path_input_file.rb +11 -49
- data/lib/aspose_slides_cloud/models/path_output_file.rb +11 -40
- data/lib/aspose_slides_cloud/models/pattern_fill.rb +11 -40
- data/lib/aspose_slides_cloud/models/pdf_export_options.rb +13 -24
- data/lib/aspose_slides_cloud/models/picture_fill.rb +12 -41
- data/lib/aspose_slides_cloud/models/picture_frame.rb +12 -238
- data/lib/aspose_slides_cloud/models/pipeline.rb +2 -2
- data/lib/aspose_slides_cloud/models/placeholder.rb +10 -32
- data/lib/aspose_slides_cloud/models/placeholders.rb +10 -32
- data/lib/aspose_slides_cloud/models/plot_area.rb +2 -2
- data/lib/aspose_slides_cloud/models/portion.rb +10 -32
- data/lib/aspose_slides_cloud/models/portions.rb +10 -32
- data/lib/aspose_slides_cloud/models/pptx_export_options.rb +13 -24
- data/lib/aspose_slides_cloud/models/presentation_to_merge.rb +2 -2
- data/lib/aspose_slides_cloud/models/presentations_merge_request.rb +2 -2
- data/lib/aspose_slides_cloud/models/preset_shadow_effect.rb +2 -2
- data/lib/aspose_slides_cloud/models/protection_properties.rb +217 -0
- data/lib/aspose_slides_cloud/models/reflection_effect.rb +2 -2
- data/lib/aspose_slides_cloud/models/remove_shape.rb +11 -40
- data/lib/aspose_slides_cloud/models/remove_slide.rb +11 -40
- data/lib/aspose_slides_cloud/models/reorder_slide.rb +11 -40
- data/lib/aspose_slides_cloud/models/replace_text.rb +11 -40
- data/lib/aspose_slides_cloud/models/request_input_file.rb +11 -49
- data/lib/aspose_slides_cloud/models/reset_slide.rb +11 -40
- data/lib/aspose_slides_cloud/models/resource_base.rb +2 -2
- data/lib/aspose_slides_cloud/models/resource_uri.rb +2 -2
- data/lib/aspose_slides_cloud/models/response_output_file.rb +9 -38
- data/lib/aspose_slides_cloud/models/save.rb +11 -40
- data/lib/aspose_slides_cloud/models/save_shape.rb +11 -40
- data/lib/aspose_slides_cloud/models/save_slide.rb +11 -40
- data/lib/aspose_slides_cloud/models/scatter_chart_data_point.rb +10 -12
- data/lib/aspose_slides_cloud/models/scatter_series.rb +11 -205
- 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 +4 -4
- data/lib/aspose_slides_cloud/models/series_marker.rb +2 -2
- data/lib/aspose_slides_cloud/models/shape.rb +12 -236
- data/lib/aspose_slides_cloud/models/shape_base.rb +11 -54
- data/lib/aspose_slides_cloud/models/shape_image_export_options.rb +2 -2
- data/lib/aspose_slides_cloud/models/shapes.rb +10 -32
- data/lib/aspose_slides_cloud/models/slide.rb +17 -39
- data/lib/aspose_slides_cloud/models/slide_animation.rb +10 -32
- data/lib/aspose_slides_cloud/models/slide_background.rb +10 -32
- data/lib/aspose_slides_cloud/models/slide_comment.rb +2 -2
- data/lib/aspose_slides_cloud/models/slide_comments.rb +10 -32
- data/lib/aspose_slides_cloud/models/slide_properties.rb +315 -0
- data/lib/aspose_slides_cloud/models/slide_replace_result.rb +10 -146
- data/lib/aspose_slides_cloud/models/slides.rb +10 -32
- data/lib/aspose_slides_cloud/models/smart_art.rb +12 -212
- data/lib/aspose_slides_cloud/models/smart_art_node.rb +3 -3
- data/lib/aspose_slides_cloud/models/smart_art_shape.rb +10 -209
- data/lib/aspose_slides_cloud/models/soft_edge_effect.rb +2 -2
- data/lib/aspose_slides_cloud/models/solid_fill.rb +11 -40
- data/lib/aspose_slides_cloud/models/split_document_result.rb +10 -32
- data/lib/aspose_slides_cloud/models/storage_exist.rb +2 -2
- data/lib/aspose_slides_cloud/models/storage_file.rb +2 -2
- data/lib/aspose_slides_cloud/models/svg_export_options.rb +13 -24
- data/lib/aspose_slides_cloud/models/swf_export_options.rb +13 -24
- data/lib/aspose_slides_cloud/models/table.rb +12 -212
- data/lib/aspose_slides_cloud/models/table_cell.rb +2 -2
- data/lib/aspose_slides_cloud/models/table_column.rb +2 -2
- data/lib/aspose_slides_cloud/models/table_row.rb +2 -2
- data/lib/aspose_slides_cloud/models/task.rb +2 -2
- data/lib/aspose_slides_cloud/models/text_item.rb +2 -2
- data/lib/aspose_slides_cloud/models/text_items.rb +10 -32
- data/lib/aspose_slides_cloud/models/theme.rb +12 -34
- data/lib/aspose_slides_cloud/models/tiff_export_options.rb +13 -24
- data/lib/aspose_slides_cloud/models/update_background.rb +11 -40
- data/lib/aspose_slides_cloud/models/update_shape.rb +11 -40
- data/lib/aspose_slides_cloud/models/video_frame.rb +12 -238
- data/lib/aspose_slides_cloud/models/view_properties.rb +10 -32
- data/lib/aspose_slides_cloud/models/waterfall_chart_data_point.rb +206 -0
- data/lib/aspose_slides_cloud/models/waterfall_series.rb +11 -216
- data/lib/aspose_slides_cloud/models/xps_export_options.rb +13 -24
- 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 +8664 -1406
- data/spec/extra/extra_spec.rb +70 -38
- data/spec/spec_utils.rb +10 -6
- data/testConfig.json +2 -2
- data/testRules.json +121 -80
- metadata +16 -3
@@ -43,7 +43,7 @@ module AsposeSlidesCloud
|
|
43
43
|
:'author' => :'Author',
|
44
44
|
:'text' => :'Text',
|
45
45
|
:'created_time' => :'CreatedTime',
|
46
|
-
:'child_comments' => :'ChildComments'
|
46
|
+
:'child_comments' => :'ChildComments',
|
47
47
|
}
|
48
48
|
end
|
49
49
|
|
@@ -53,7 +53,7 @@ module AsposeSlidesCloud
|
|
53
53
|
:'author' => :'String',
|
54
54
|
:'text' => :'String',
|
55
55
|
:'created_time' => :'String',
|
56
|
-
:'child_comments' => :'Array<SlideComment>'
|
56
|
+
:'child_comments' => :'Array<SlideComment>',
|
57
57
|
}
|
58
58
|
end
|
59
59
|
|
@@ -24,51 +24,28 @@ require 'date'
|
|
24
24
|
|
25
25
|
module AsposeSlidesCloud
|
26
26
|
# Represents comments collection of slide
|
27
|
-
class SlideComments
|
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 SlideComments < ResourceBase
|
34
28
|
# Slide comment list.
|
35
29
|
attr_accessor :list
|
36
30
|
|
37
31
|
# Attribute mapping from ruby-style variable name to JSON key.
|
38
32
|
def self.attribute_map
|
39
|
-
{
|
40
|
-
:'
|
41
|
-
|
42
|
-
:'list' => :'List'
|
43
|
-
}
|
33
|
+
super.merge({
|
34
|
+
:'list' => :'List',
|
35
|
+
})
|
44
36
|
end
|
45
37
|
|
46
38
|
# Attribute type mapping.
|
47
39
|
def self.swagger_types
|
48
|
-
{
|
49
|
-
:'
|
50
|
-
|
51
|
-
:'list' => :'Array<SlideComment>'
|
52
|
-
}
|
40
|
+
super.merge({
|
41
|
+
:'list' => :'Array<SlideComment>',
|
42
|
+
})
|
53
43
|
end
|
54
44
|
|
55
45
|
# Initializes the object
|
56
46
|
# @param [Hash] attributes Model attributes in the form of hash
|
57
47
|
def initialize(attributes = {})
|
58
|
-
|
59
|
-
|
60
|
-
# convert string to symbol for hash key
|
61
|
-
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
62
|
-
|
63
|
-
if attributes.has_key?(:'SelfUri')
|
64
|
-
self.self_uri = attributes[:'SelfUri']
|
65
|
-
end
|
66
|
-
|
67
|
-
if attributes.has_key?(:'AlternateLinks')
|
68
|
-
if (value = attributes[:'AlternateLinks']).is_a?(Array)
|
69
|
-
self.alternate_links = value
|
70
|
-
end
|
71
|
-
end
|
48
|
+
super
|
72
49
|
|
73
50
|
if attributes.has_key?(:'List')
|
74
51
|
if (value = attributes[:'List']).is_a?(Array)
|
@@ -80,13 +57,14 @@ module AsposeSlidesCloud
|
|
80
57
|
# Show invalid properties with the reasons. Usually used together with valid?
|
81
58
|
# @return Array for valid properties with the reasons
|
82
59
|
def list_invalid_properties
|
83
|
-
invalid_properties =
|
60
|
+
invalid_properties = super
|
84
61
|
invalid_properties
|
85
62
|
end
|
86
63
|
|
87
64
|
# Check to see if the all the properties in the model are valid
|
88
65
|
# @return true if the model is valid
|
89
66
|
def valid?
|
67
|
+
return false if !super
|
90
68
|
true
|
91
69
|
end
|
92
70
|
|
@@ -0,0 +1,315 @@
|
|
1
|
+
=begin
|
2
|
+
Copyright (c) 2019 Aspose Pty Ltd
|
3
|
+
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
|
+
of this software and associated documentation files (the "Software"), to deal
|
6
|
+
in the Software without restriction, including without limitation the rights
|
7
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
+
copies of the Software, and to permit persons to whom the Software is
|
9
|
+
furnished to do so, subject to the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be included in all
|
12
|
+
copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
20
|
+
SOFTWARE.
|
21
|
+
=end
|
22
|
+
|
23
|
+
require 'date'
|
24
|
+
|
25
|
+
module AsposeSlidesCloud
|
26
|
+
# Slide properties.
|
27
|
+
class SlideProperties < ResourceBase
|
28
|
+
# First slide number.
|
29
|
+
attr_accessor :first_slide_number
|
30
|
+
|
31
|
+
# Slide orientation.
|
32
|
+
attr_accessor :orientation
|
33
|
+
|
34
|
+
# Scale type.
|
35
|
+
attr_accessor :scale_type
|
36
|
+
|
37
|
+
# Size type.
|
38
|
+
attr_accessor :size_type
|
39
|
+
|
40
|
+
# Width.
|
41
|
+
attr_accessor :width
|
42
|
+
|
43
|
+
# Height.
|
44
|
+
attr_accessor :height
|
45
|
+
|
46
|
+
class EnumAttributeValidator
|
47
|
+
attr_reader :datatype
|
48
|
+
attr_reader :allowable_values
|
49
|
+
|
50
|
+
def initialize(datatype, allowable_values)
|
51
|
+
@allowable_values = allowable_values.map do |value|
|
52
|
+
case datatype.to_s
|
53
|
+
when /Integer/i
|
54
|
+
value.to_i
|
55
|
+
when /Float/i
|
56
|
+
value.to_f
|
57
|
+
else
|
58
|
+
value
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
def valid?(value)
|
64
|
+
!value || allowable_values.any?{ |s| s.casecmp(value) == 0 }
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
69
|
+
def self.attribute_map
|
70
|
+
super.merge({
|
71
|
+
:'first_slide_number' => :'FirstSlideNumber',
|
72
|
+
:'orientation' => :'Orientation',
|
73
|
+
:'scale_type' => :'ScaleType',
|
74
|
+
:'size_type' => :'SizeType',
|
75
|
+
:'width' => :'Width',
|
76
|
+
:'height' => :'Height',
|
77
|
+
})
|
78
|
+
end
|
79
|
+
|
80
|
+
# Attribute type mapping.
|
81
|
+
def self.swagger_types
|
82
|
+
super.merge({
|
83
|
+
:'first_slide_number' => :'Integer',
|
84
|
+
:'orientation' => :'String',
|
85
|
+
:'scale_type' => :'String',
|
86
|
+
:'size_type' => :'String',
|
87
|
+
:'width' => :'Integer',
|
88
|
+
:'height' => :'Integer',
|
89
|
+
})
|
90
|
+
end
|
91
|
+
|
92
|
+
# Initializes the object
|
93
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
94
|
+
def initialize(attributes = {})
|
95
|
+
super
|
96
|
+
|
97
|
+
if attributes.has_key?(:'FirstSlideNumber')
|
98
|
+
self.first_slide_number = attributes[:'FirstSlideNumber']
|
99
|
+
end
|
100
|
+
|
101
|
+
if attributes.has_key?(:'Orientation')
|
102
|
+
self.orientation = attributes[:'Orientation']
|
103
|
+
end
|
104
|
+
|
105
|
+
if attributes.has_key?(:'ScaleType')
|
106
|
+
self.scale_type = attributes[:'ScaleType']
|
107
|
+
end
|
108
|
+
|
109
|
+
if attributes.has_key?(:'SizeType')
|
110
|
+
self.size_type = attributes[:'SizeType']
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.has_key?(:'Width')
|
114
|
+
self.width = attributes[:'Width']
|
115
|
+
end
|
116
|
+
|
117
|
+
if attributes.has_key?(:'Height')
|
118
|
+
self.height = attributes[:'Height']
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
123
|
+
# @return Array for valid properties with the reasons
|
124
|
+
def list_invalid_properties
|
125
|
+
invalid_properties = super
|
126
|
+
invalid_properties
|
127
|
+
end
|
128
|
+
|
129
|
+
# Check to see if the all the properties in the model are valid
|
130
|
+
# @return true if the model is valid
|
131
|
+
def valid?
|
132
|
+
return false if !super
|
133
|
+
orientation_validator = EnumAttributeValidator.new('String', ['Landscape', 'Portrait'])
|
134
|
+
return false unless orientation_validator.valid?(@orientation)
|
135
|
+
scale_type_validator = EnumAttributeValidator.new('String', ['DoNotScale', 'EnsureFit', 'Maximize'])
|
136
|
+
return false unless scale_type_validator.valid?(@scale_type)
|
137
|
+
size_type_validator = EnumAttributeValidator.new('String', ['OnScreen', 'LetterPaper', 'A4Paper', 'Slide35mm', 'Overhead', 'Banner', 'Custom', 'Ledger', 'A3Paper', 'B4IsoPaper', 'B5IsoPaper', 'B4JisPaper', 'B5JisPaper', 'HagakiCard', 'OnScreen16x9', 'OnScreen16x10', 'Widescreen'])
|
138
|
+
return false unless size_type_validator.valid?(@size_type)
|
139
|
+
true
|
140
|
+
end
|
141
|
+
|
142
|
+
# Custom attribute writer method checking allowed values (enum).
|
143
|
+
# @param [Object] orientation Object to be assigned
|
144
|
+
def orientation=(orientation)
|
145
|
+
validator = EnumAttributeValidator.new('String', ['Landscape', 'Portrait'])
|
146
|
+
unless validator.valid?(orientation)
|
147
|
+
fail ArgumentError, 'invalid value for "orientation", must be one of #{validator.allowable_values}.'
|
148
|
+
end
|
149
|
+
@orientation = orientation
|
150
|
+
end
|
151
|
+
|
152
|
+
# Custom attribute writer method checking allowed values (enum).
|
153
|
+
# @param [Object] scale_type Object to be assigned
|
154
|
+
def scale_type=(scale_type)
|
155
|
+
validator = EnumAttributeValidator.new('String', ['DoNotScale', 'EnsureFit', 'Maximize'])
|
156
|
+
unless validator.valid?(scale_type)
|
157
|
+
fail ArgumentError, 'invalid value for "scale_type", must be one of #{validator.allowable_values}.'
|
158
|
+
end
|
159
|
+
@scale_type = scale_type
|
160
|
+
end
|
161
|
+
|
162
|
+
# Custom attribute writer method checking allowed values (enum).
|
163
|
+
# @param [Object] size_type Object to be assigned
|
164
|
+
def size_type=(size_type)
|
165
|
+
validator = EnumAttributeValidator.new('String', ['OnScreen', 'LetterPaper', 'A4Paper', 'Slide35mm', 'Overhead', 'Banner', 'Custom', 'Ledger', 'A3Paper', 'B4IsoPaper', 'B5IsoPaper', 'B4JisPaper', 'B5JisPaper', 'HagakiCard', 'OnScreen16x9', 'OnScreen16x10', 'Widescreen'])
|
166
|
+
unless validator.valid?(size_type)
|
167
|
+
fail ArgumentError, 'invalid value for "size_type", must be one of #{validator.allowable_values}.'
|
168
|
+
end
|
169
|
+
@size_type = size_type
|
170
|
+
end
|
171
|
+
|
172
|
+
# Checks equality by comparing each attribute.
|
173
|
+
# @param [Object] Object to be compared
|
174
|
+
def ==(o)
|
175
|
+
return true if self.equal?(o)
|
176
|
+
self.class == o.class &&
|
177
|
+
self_uri == o.self_uri &&
|
178
|
+
alternate_links == o.alternate_links &&
|
179
|
+
first_slide_number == o.first_slide_number &&
|
180
|
+
orientation == o.orientation &&
|
181
|
+
scale_type == o.scale_type &&
|
182
|
+
size_type == o.size_type &&
|
183
|
+
width == o.width &&
|
184
|
+
height == o.height
|
185
|
+
end
|
186
|
+
|
187
|
+
# @see the `==` method
|
188
|
+
# @param [Object] Object to be compared
|
189
|
+
def eql?(o)
|
190
|
+
self == o
|
191
|
+
end
|
192
|
+
|
193
|
+
# Calculates hash code according to all attributes.
|
194
|
+
# @return [Fixnum] Hash code
|
195
|
+
def hash
|
196
|
+
[self_uri, alternate_links, first_slide_number, orientation, scale_type, size_type, width, height].hash
|
197
|
+
end
|
198
|
+
|
199
|
+
# Builds the object from hash
|
200
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
201
|
+
# @return [Object] Returns the model itself
|
202
|
+
def build_from_hash(attributes)
|
203
|
+
return nil unless attributes.is_a?(Hash)
|
204
|
+
self.class.swagger_types.each_pair do |key, type|
|
205
|
+
mapKey = self.class.attribute_map[key]
|
206
|
+
if !mapKey.nil?
|
207
|
+
val = attributes[mapKey]
|
208
|
+
if val.nil?
|
209
|
+
mapKeyString = mapKey.to_s
|
210
|
+
mapKeyString[0] = mapKeyString[0].downcase
|
211
|
+
mapKey = mapKeyString.to_sym
|
212
|
+
val = attributes[mapKey]
|
213
|
+
end
|
214
|
+
if !val.nil?
|
215
|
+
if type =~ /\AArray<(.*)>/i
|
216
|
+
# check to ensure the input is an array given that the the attribute
|
217
|
+
# is documented as an array but the input is not
|
218
|
+
if val.is_a?(Array)
|
219
|
+
self.send("#{key}=", val.map { |v| _deserialize($1, v) })
|
220
|
+
end
|
221
|
+
else
|
222
|
+
self.send("#{key}=", _deserialize(type, val))
|
223
|
+
end
|
224
|
+
end
|
225
|
+
end
|
226
|
+
end
|
227
|
+
|
228
|
+
self
|
229
|
+
end
|
230
|
+
|
231
|
+
# Deserializes the data based on type
|
232
|
+
# @param string type Data type
|
233
|
+
# @param string value Value to be deserialized
|
234
|
+
# @return [Object] Deserialized data
|
235
|
+
def _deserialize(type, value)
|
236
|
+
case type.to_sym
|
237
|
+
when :DateTime
|
238
|
+
DateTime.parse(value)
|
239
|
+
when :Date
|
240
|
+
Date.parse(value)
|
241
|
+
when :String
|
242
|
+
value.to_s
|
243
|
+
when :Integer
|
244
|
+
value.to_i
|
245
|
+
when :Float
|
246
|
+
value.to_f
|
247
|
+
when :BOOLEAN
|
248
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
249
|
+
true
|
250
|
+
else
|
251
|
+
false
|
252
|
+
end
|
253
|
+
when :Object
|
254
|
+
# generic object (usually a Hash), return directly
|
255
|
+
value
|
256
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
257
|
+
inner_type = Regexp.last_match[:inner_type]
|
258
|
+
value.map { |v| _deserialize(inner_type, v) }
|
259
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
260
|
+
k_type = Regexp.last_match[:k_type]
|
261
|
+
v_type = Regexp.last_match[:v_type]
|
262
|
+
{}.tap do |hash|
|
263
|
+
value.each do |k, v|
|
264
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
265
|
+
end
|
266
|
+
end
|
267
|
+
else # model
|
268
|
+
temp_model = AsposeSlidesCloud.const_get(type).new
|
269
|
+
temp_model.build_from_hash(value)
|
270
|
+
end
|
271
|
+
end
|
272
|
+
|
273
|
+
# Returns the string representation of the object
|
274
|
+
# @return [String] String presentation of the object
|
275
|
+
def to_s
|
276
|
+
to_hash.to_s
|
277
|
+
end
|
278
|
+
|
279
|
+
# to_body is an alias to to_hash (backward compatibility)
|
280
|
+
# @return [Hash] Returns the object in the form of hash
|
281
|
+
def to_body
|
282
|
+
to_hash
|
283
|
+
end
|
284
|
+
|
285
|
+
# Returns the object in the form of hash
|
286
|
+
# @return [Hash] Returns the object in the form of hash
|
287
|
+
def to_hash
|
288
|
+
hash = {}
|
289
|
+
self.class.attribute_map.each_pair do |attr, param|
|
290
|
+
value = self.send(attr)
|
291
|
+
next if value.nil?
|
292
|
+
hash[param] = _to_hash(value)
|
293
|
+
end
|
294
|
+
hash
|
295
|
+
end
|
296
|
+
|
297
|
+
# Outputs non-array value in the form of hash
|
298
|
+
# For object, use to_hash. Otherwise, just return the value
|
299
|
+
# @param [Object] value Any valid value
|
300
|
+
# @return [Hash] Returns the value in the form of hash
|
301
|
+
def _to_hash(value)
|
302
|
+
if value.is_a?(Array)
|
303
|
+
value.compact.map { |v| _to_hash(v) }
|
304
|
+
elsif value.is_a?(Hash)
|
305
|
+
{}.tap do |hash|
|
306
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
307
|
+
end
|
308
|
+
elsif value.respond_to? :to_hash
|
309
|
+
value.to_hash
|
310
|
+
else
|
311
|
+
value
|
312
|
+
end
|
313
|
+
end
|
314
|
+
end
|
315
|
+
end
|
@@ -24,150 +24,28 @@ require 'date'
|
|
24
24
|
|
25
25
|
module AsposeSlidesCloud
|
26
26
|
# Represents slide replace result DTO.
|
27
|
-
class SlideReplaceResult
|
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
|
-
|
34
|
-
# Gets or sets the width.
|
35
|
-
attr_accessor :width
|
36
|
-
|
37
|
-
# Gets or sets the height.
|
38
|
-
attr_accessor :height
|
39
|
-
|
40
|
-
# Specifies if shapes of the master slide should be shown on the slide. True by default.
|
41
|
-
attr_accessor :show_master_shapes
|
42
|
-
|
43
|
-
# Gets or sets the link to the layout slide.
|
44
|
-
attr_accessor :layout_slide
|
45
|
-
|
46
|
-
# Gets or sets the link to list of top-level shapes.
|
47
|
-
attr_accessor :shapes
|
48
|
-
|
49
|
-
# Gets or sets the link to theme.
|
50
|
-
attr_accessor :theme
|
51
|
-
|
52
|
-
# Gets or sets the link to placeholders.
|
53
|
-
attr_accessor :placeholders
|
54
|
-
|
55
|
-
# Gets or sets the link to images.
|
56
|
-
attr_accessor :images
|
57
|
-
|
58
|
-
# Gets or sets the link to comments.
|
59
|
-
attr_accessor :comments
|
60
|
-
|
61
|
-
# Get or sets the link to slide's background
|
62
|
-
attr_accessor :background
|
63
|
-
|
64
|
-
# Get or sets the link to notes slide.
|
65
|
-
attr_accessor :notes_slide
|
66
|
-
|
27
|
+
class SlideReplaceResult < Slide
|
67
28
|
# Gets or sets the number of matches
|
68
29
|
attr_accessor :matches
|
69
30
|
|
70
31
|
# Attribute mapping from ruby-style variable name to JSON key.
|
71
32
|
def self.attribute_map
|
72
|
-
{
|
73
|
-
:'
|
74
|
-
|
75
|
-
:'width' => :'Width',
|
76
|
-
:'height' => :'Height',
|
77
|
-
:'show_master_shapes' => :'ShowMasterShapes',
|
78
|
-
:'layout_slide' => :'LayoutSlide',
|
79
|
-
:'shapes' => :'Shapes',
|
80
|
-
:'theme' => :'Theme',
|
81
|
-
:'placeholders' => :'Placeholders',
|
82
|
-
:'images' => :'Images',
|
83
|
-
:'comments' => :'Comments',
|
84
|
-
:'background' => :'Background',
|
85
|
-
:'notes_slide' => :'NotesSlide',
|
86
|
-
:'matches' => :'Matches'
|
87
|
-
}
|
33
|
+
super.merge({
|
34
|
+
:'matches' => :'Matches',
|
35
|
+
})
|
88
36
|
end
|
89
37
|
|
90
38
|
# Attribute type mapping.
|
91
39
|
def self.swagger_types
|
92
|
-
{
|
93
|
-
:'
|
94
|
-
|
95
|
-
:'width' => :'Float',
|
96
|
-
:'height' => :'Float',
|
97
|
-
:'show_master_shapes' => :'BOOLEAN',
|
98
|
-
:'layout_slide' => :'ResourceUriElement',
|
99
|
-
:'shapes' => :'ResourceUriElement',
|
100
|
-
:'theme' => :'ResourceUriElement',
|
101
|
-
:'placeholders' => :'ResourceUriElement',
|
102
|
-
:'images' => :'ResourceUriElement',
|
103
|
-
:'comments' => :'ResourceUriElement',
|
104
|
-
:'background' => :'ResourceUriElement',
|
105
|
-
:'notes_slide' => :'ResourceUriElement',
|
106
|
-
:'matches' => :'Integer'
|
107
|
-
}
|
40
|
+
super.merge({
|
41
|
+
:'matches' => :'Integer',
|
42
|
+
})
|
108
43
|
end
|
109
44
|
|
110
45
|
# Initializes the object
|
111
46
|
# @param [Hash] attributes Model attributes in the form of hash
|
112
47
|
def initialize(attributes = {})
|
113
|
-
|
114
|
-
|
115
|
-
# convert string to symbol for hash key
|
116
|
-
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
117
|
-
|
118
|
-
if attributes.has_key?(:'SelfUri')
|
119
|
-
self.self_uri = attributes[:'SelfUri']
|
120
|
-
end
|
121
|
-
|
122
|
-
if attributes.has_key?(:'AlternateLinks')
|
123
|
-
if (value = attributes[:'AlternateLinks']).is_a?(Array)
|
124
|
-
self.alternate_links = value
|
125
|
-
end
|
126
|
-
end
|
127
|
-
|
128
|
-
if attributes.has_key?(:'Width')
|
129
|
-
self.width = attributes[:'Width']
|
130
|
-
end
|
131
|
-
|
132
|
-
if attributes.has_key?(:'Height')
|
133
|
-
self.height = attributes[:'Height']
|
134
|
-
end
|
135
|
-
|
136
|
-
if attributes.has_key?(:'ShowMasterShapes')
|
137
|
-
self.show_master_shapes = attributes[:'ShowMasterShapes']
|
138
|
-
end
|
139
|
-
|
140
|
-
if attributes.has_key?(:'LayoutSlide')
|
141
|
-
self.layout_slide = attributes[:'LayoutSlide']
|
142
|
-
end
|
143
|
-
|
144
|
-
if attributes.has_key?(:'Shapes')
|
145
|
-
self.shapes = attributes[:'Shapes']
|
146
|
-
end
|
147
|
-
|
148
|
-
if attributes.has_key?(:'Theme')
|
149
|
-
self.theme = attributes[:'Theme']
|
150
|
-
end
|
151
|
-
|
152
|
-
if attributes.has_key?(:'Placeholders')
|
153
|
-
self.placeholders = attributes[:'Placeholders']
|
154
|
-
end
|
155
|
-
|
156
|
-
if attributes.has_key?(:'Images')
|
157
|
-
self.images = attributes[:'Images']
|
158
|
-
end
|
159
|
-
|
160
|
-
if attributes.has_key?(:'Comments')
|
161
|
-
self.comments = attributes[:'Comments']
|
162
|
-
end
|
163
|
-
|
164
|
-
if attributes.has_key?(:'Background')
|
165
|
-
self.background = attributes[:'Background']
|
166
|
-
end
|
167
|
-
|
168
|
-
if attributes.has_key?(:'NotesSlide')
|
169
|
-
self.notes_slide = attributes[:'NotesSlide']
|
170
|
-
end
|
48
|
+
super
|
171
49
|
|
172
50
|
if attributes.has_key?(:'Matches')
|
173
51
|
self.matches = attributes[:'Matches']
|
@@ -177,19 +55,7 @@ module AsposeSlidesCloud
|
|
177
55
|
# Show invalid properties with the reasons. Usually used together with valid?
|
178
56
|
# @return Array for valid properties with the reasons
|
179
57
|
def list_invalid_properties
|
180
|
-
invalid_properties =
|
181
|
-
if @width.nil?
|
182
|
-
invalid_properties.push('invalid value for "width", width cannot be nil.')
|
183
|
-
end
|
184
|
-
|
185
|
-
if @height.nil?
|
186
|
-
invalid_properties.push('invalid value for "height", height cannot be nil.')
|
187
|
-
end
|
188
|
-
|
189
|
-
if @show_master_shapes.nil?
|
190
|
-
invalid_properties.push('invalid value for "show_master_shapes", show_master_shapes cannot be nil.')
|
191
|
-
end
|
192
|
-
|
58
|
+
invalid_properties = super
|
193
59
|
if @matches.nil?
|
194
60
|
invalid_properties.push('invalid value for "matches", matches cannot be nil.')
|
195
61
|
end
|
@@ -200,9 +66,7 @@ module AsposeSlidesCloud
|
|
200
66
|
# Check to see if the all the properties in the model are valid
|
201
67
|
# @return true if the model is valid
|
202
68
|
def valid?
|
203
|
-
return false if
|
204
|
-
return false if @height.nil?
|
205
|
-
return false if @show_master_shapes.nil?
|
69
|
+
return false if !super
|
206
70
|
return false if @matches.nil?
|
207
71
|
true
|
208
72
|
end
|