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
@@ -57,7 +57,7 @@ module AsposeSlidesCloud
|
|
57
57
|
@config.logger.debug "HTTP response\nHeaders: #{response.headers}\nStatus: #{response.status}\nBody: #{response.body}\n"
|
58
58
|
end
|
59
59
|
|
60
|
-
if response.status == 401 and @config.access_token
|
60
|
+
if (response.status == 401 || (response.status == 500 && response.body.length == 0)) and @config.access_token
|
61
61
|
@config.access_token = nil
|
62
62
|
return repeat_call_api(http_method, path, opts)
|
63
63
|
end
|
@@ -91,8 +91,7 @@ module AsposeSlidesCloud
|
|
91
91
|
else
|
92
92
|
fail ApiError.new(:code => response.status,
|
93
93
|
:response_headers => response.headers,
|
94
|
-
:response_body => response.body)
|
95
|
-
response.reason_phrase
|
94
|
+
:response_body => response.body)
|
96
95
|
end
|
97
96
|
end
|
98
97
|
|
@@ -147,7 +146,9 @@ module AsposeSlidesCloud
|
|
147
146
|
opts[:query_params][key] = opts[:query_params][key].join[","]
|
148
147
|
end
|
149
148
|
end
|
150
|
-
|
149
|
+
if @config.http_request_timeout > 0
|
150
|
+
req.options.timeout = @config.http_request_timeout
|
151
|
+
end
|
151
152
|
req.url path.sub(/^\/+/, '')
|
152
153
|
req.headers = opts[:header_params]
|
153
154
|
req.params = opts[:query_params]
|
@@ -160,8 +161,7 @@ module AsposeSlidesCloud
|
|
160
161
|
end
|
161
162
|
|
162
163
|
def set_headers(headers)
|
163
|
-
headers['x-aspose-client'] =
|
164
|
-
headers['x-aspose-version'] = AsposeSlidesCloud::VERSION
|
164
|
+
headers['x-aspose-client'] = "ruby sdk v#{AsposeSlidesCloud::VERSION}"
|
165
165
|
if @config.timeout > 0
|
166
166
|
headers['x-aspose-timeout'] = @config.timeout.to_s
|
167
167
|
end
|
@@ -172,26 +172,28 @@ module AsposeSlidesCloud
|
|
172
172
|
end
|
173
173
|
|
174
174
|
def set_auth_header(headers)
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
175
|
+
if config.app_sid || config.access_token
|
176
|
+
unless @config.access_token
|
177
|
+
auth_token_response = Faraday.post(
|
178
|
+
@config.auth_base_url + '/connect/token',
|
179
|
+
{ :grant_type => 'client_credentials', 'client_id' => @config.app_sid, 'client_secret' => @config.app_sid })
|
180
|
+
|
181
|
+
unless auth_token_response.success?
|
182
|
+
if auth_token_response.status == 0
|
183
|
+
# Errors from libcurl will be made visible here
|
184
|
+
fail ApiError.new(:code => 0,
|
185
|
+
:message => auth_token_response.return_message)
|
186
|
+
else
|
187
|
+
fail ApiError.new(:code => 401,
|
188
|
+
:response_headers => auth_token_response.headers,
|
189
|
+
:response_body => auth_token_response.body),
|
190
|
+
"unauthorized"
|
191
|
+
end
|
190
192
|
end
|
193
|
+
@config.access_token = JSON.parse("[#{auth_token_response.body}]", :symbolize_names => true)[0][:access_token]
|
191
194
|
end
|
192
|
-
|
195
|
+
headers['Authorization'] = 'Bearer ' + @config.access_token
|
193
196
|
end
|
194
|
-
headers['Authorization'] = 'Bearer ' + @config.access_token
|
195
197
|
end
|
196
198
|
|
197
199
|
# Check if the given MIME is a JSON MIME.
|
@@ -66,9 +66,13 @@ module AsposeSlidesCloud
|
|
66
66
|
# @return [String]
|
67
67
|
attr_accessor :temp_folder_path
|
68
68
|
|
69
|
-
# The
|
70
|
-
# Default to 0 (
|
69
|
+
# slides operaion timeout in seconds. The timeout applies to the Slides operation, not to the HTTP request.
|
70
|
+
# Default to 0 (no timeout).
|
71
71
|
attr_accessor :timeout
|
72
|
+
|
73
|
+
# The time limit for HTTP request in seconds.
|
74
|
+
# Default to 300.
|
75
|
+
attr_accessor :http_request_timeout
|
72
76
|
|
73
77
|
# Set this to false to skip client side validation in the operation.
|
74
78
|
# Default to true.
|
@@ -129,6 +133,7 @@ module AsposeSlidesCloud
|
|
129
133
|
@base_url = 'https://api.aspose.cloud'
|
130
134
|
@auth_base_url = 'https://api.aspose.cloud'
|
131
135
|
@version = 'v3.0'
|
136
|
+
@http_request_timeout = 300
|
132
137
|
@timeout = 0
|
133
138
|
@custom_headers = Hash.new
|
134
139
|
@client_side_validation = true
|
@@ -24,10 +24,7 @@ require 'date'
|
|
24
24
|
|
25
25
|
module AsposeSlidesCloud
|
26
26
|
# Add layout slide task.
|
27
|
-
class AddLayoutSlide
|
28
|
-
# Task type.
|
29
|
-
attr_accessor :type
|
30
|
-
|
27
|
+
class AddLayoutSlide < Task
|
31
28
|
# Source file.
|
32
29
|
attr_accessor :clone_from_file
|
33
30
|
|
@@ -58,35 +55,24 @@ module AsposeSlidesCloud
|
|
58
55
|
|
59
56
|
# Attribute mapping from ruby-style variable name to JSON key.
|
60
57
|
def self.attribute_map
|
61
|
-
{
|
62
|
-
:'type' => :'Type',
|
58
|
+
super.merge({
|
63
59
|
:'clone_from_file' => :'CloneFromFile',
|
64
|
-
:'clone_from_position' => :'CloneFromPosition'
|
65
|
-
}
|
60
|
+
:'clone_from_position' => :'CloneFromPosition',
|
61
|
+
})
|
66
62
|
end
|
67
63
|
|
68
64
|
# Attribute type mapping.
|
69
65
|
def self.swagger_types
|
70
|
-
{
|
71
|
-
:'type' => :'String',
|
66
|
+
super.merge({
|
72
67
|
:'clone_from_file' => :'InputFile',
|
73
|
-
:'clone_from_position' => :'Integer'
|
74
|
-
}
|
68
|
+
:'clone_from_position' => :'Integer',
|
69
|
+
})
|
75
70
|
end
|
76
71
|
|
77
72
|
# Initializes the object
|
78
73
|
# @param [Hash] attributes Model attributes in the form of hash
|
79
74
|
def initialize(attributes = {})
|
80
|
-
|
81
|
-
|
82
|
-
# convert string to symbol for hash key
|
83
|
-
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
84
|
-
|
85
|
-
if attributes.has_key?(:'Type')
|
86
|
-
self.type = attributes[:'Type']
|
87
|
-
else
|
88
|
-
self.type = "AddLayoutSlide"
|
89
|
-
end
|
75
|
+
super
|
90
76
|
|
91
77
|
if attributes.has_key?(:'CloneFromFile')
|
92
78
|
self.clone_from_file = attributes[:'CloneFromFile']
|
@@ -95,16 +81,13 @@ module AsposeSlidesCloud
|
|
95
81
|
if attributes.has_key?(:'CloneFromPosition')
|
96
82
|
self.clone_from_position = attributes[:'CloneFromPosition']
|
97
83
|
end
|
84
|
+
self.type = "AddLayoutSlide"
|
98
85
|
end
|
99
86
|
|
100
87
|
# Show invalid properties with the reasons. Usually used together with valid?
|
101
88
|
# @return Array for valid properties with the reasons
|
102
89
|
def list_invalid_properties
|
103
|
-
invalid_properties =
|
104
|
-
if @type.nil?
|
105
|
-
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
106
|
-
end
|
107
|
-
|
90
|
+
invalid_properties = super
|
108
91
|
if @clone_from_position.nil?
|
109
92
|
invalid_properties.push('invalid value for "clone_from_position", clone_from_position cannot be nil.')
|
110
93
|
end
|
@@ -115,23 +98,11 @@ module AsposeSlidesCloud
|
|
115
98
|
# Check to see if the all the properties in the model are valid
|
116
99
|
# @return true if the model is valid
|
117
100
|
def valid?
|
118
|
-
return false if
|
119
|
-
type_validator = EnumAttributeValidator.new('String', ['Save', 'SaveSlide', 'SaveShape', 'AddSlide', 'AddMasterSlide', 'AddLayoutSlide', 'RemoveSlide', 'ReoderSlide', 'Merge', 'UpdateBackground', 'ResetSlide', 'AddShape', 'RemoveShape', 'UpdateShape', 'ReplaceText'])
|
120
|
-
return false unless type_validator.valid?(@type)
|
101
|
+
return false if !super
|
121
102
|
return false if @clone_from_position.nil?
|
122
103
|
true
|
123
104
|
end
|
124
105
|
|
125
|
-
# Custom attribute writer method checking allowed values (enum).
|
126
|
-
# @param [Object] type Object to be assigned
|
127
|
-
def type=(type)
|
128
|
-
validator = EnumAttributeValidator.new('String', ['Save', 'SaveSlide', 'SaveShape', 'AddSlide', 'AddMasterSlide', 'AddLayoutSlide', 'RemoveSlide', 'ReoderSlide', 'Merge', 'UpdateBackground', 'ResetSlide', 'AddShape', 'RemoveShape', 'UpdateShape', 'ReplaceText'])
|
129
|
-
unless validator.valid?(type)
|
130
|
-
fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
|
131
|
-
end
|
132
|
-
@type = type
|
133
|
-
end
|
134
|
-
|
135
106
|
# Checks equality by comparing each attribute.
|
136
107
|
# @param [Object] Object to be compared
|
137
108
|
def ==(o)
|
@@ -24,10 +24,7 @@ require 'date'
|
|
24
24
|
|
25
25
|
module AsposeSlidesCloud
|
26
26
|
# Add master slide task.
|
27
|
-
class AddMasterSlide
|
28
|
-
# Task type.
|
29
|
-
attr_accessor :type
|
30
|
-
|
27
|
+
class AddMasterSlide < Task
|
31
28
|
# Source presentation clone from.
|
32
29
|
attr_accessor :clone_from_file
|
33
30
|
|
@@ -61,37 +58,26 @@ module AsposeSlidesCloud
|
|
61
58
|
|
62
59
|
# Attribute mapping from ruby-style variable name to JSON key.
|
63
60
|
def self.attribute_map
|
64
|
-
{
|
65
|
-
:'type' => :'Type',
|
61
|
+
super.merge({
|
66
62
|
:'clone_from_file' => :'CloneFromFile',
|
67
63
|
:'clone_from_position' => :'CloneFromPosition',
|
68
|
-
:'apply_to_all' => :'ApplyToAll'
|
69
|
-
}
|
64
|
+
:'apply_to_all' => :'ApplyToAll',
|
65
|
+
})
|
70
66
|
end
|
71
67
|
|
72
68
|
# Attribute type mapping.
|
73
69
|
def self.swagger_types
|
74
|
-
{
|
75
|
-
:'type' => :'String',
|
70
|
+
super.merge({
|
76
71
|
:'clone_from_file' => :'InputFile',
|
77
72
|
:'clone_from_position' => :'Integer',
|
78
|
-
:'apply_to_all' => :'BOOLEAN'
|
79
|
-
}
|
73
|
+
:'apply_to_all' => :'BOOLEAN',
|
74
|
+
})
|
80
75
|
end
|
81
76
|
|
82
77
|
# Initializes the object
|
83
78
|
# @param [Hash] attributes Model attributes in the form of hash
|
84
79
|
def initialize(attributes = {})
|
85
|
-
|
86
|
-
|
87
|
-
# convert string to symbol for hash key
|
88
|
-
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
89
|
-
|
90
|
-
if attributes.has_key?(:'Type')
|
91
|
-
self.type = attributes[:'Type']
|
92
|
-
else
|
93
|
-
self.type = "AddMasterSlide"
|
94
|
-
end
|
80
|
+
super
|
95
81
|
|
96
82
|
if attributes.has_key?(:'CloneFromFile')
|
97
83
|
self.clone_from_file = attributes[:'CloneFromFile']
|
@@ -104,16 +90,13 @@ module AsposeSlidesCloud
|
|
104
90
|
if attributes.has_key?(:'ApplyToAll')
|
105
91
|
self.apply_to_all = attributes[:'ApplyToAll']
|
106
92
|
end
|
93
|
+
self.type = "AddMasterSlide"
|
107
94
|
end
|
108
95
|
|
109
96
|
# Show invalid properties with the reasons. Usually used together with valid?
|
110
97
|
# @return Array for valid properties with the reasons
|
111
98
|
def list_invalid_properties
|
112
|
-
invalid_properties =
|
113
|
-
if @type.nil?
|
114
|
-
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
115
|
-
end
|
116
|
-
|
99
|
+
invalid_properties = super
|
117
100
|
if @clone_from_position.nil?
|
118
101
|
invalid_properties.push('invalid value for "clone_from_position", clone_from_position cannot be nil.')
|
119
102
|
end
|
@@ -128,24 +111,12 @@ module AsposeSlidesCloud
|
|
128
111
|
# Check to see if the all the properties in the model are valid
|
129
112
|
# @return true if the model is valid
|
130
113
|
def valid?
|
131
|
-
return false if
|
132
|
-
type_validator = EnumAttributeValidator.new('String', ['Save', 'SaveSlide', 'SaveShape', 'AddSlide', 'AddMasterSlide', 'AddLayoutSlide', 'RemoveSlide', 'ReoderSlide', 'Merge', 'UpdateBackground', 'ResetSlide', 'AddShape', 'RemoveShape', 'UpdateShape', 'ReplaceText'])
|
133
|
-
return false unless type_validator.valid?(@type)
|
114
|
+
return false if !super
|
134
115
|
return false if @clone_from_position.nil?
|
135
116
|
return false if @apply_to_all.nil?
|
136
117
|
true
|
137
118
|
end
|
138
119
|
|
139
|
-
# Custom attribute writer method checking allowed values (enum).
|
140
|
-
# @param [Object] type Object to be assigned
|
141
|
-
def type=(type)
|
142
|
-
validator = EnumAttributeValidator.new('String', ['Save', 'SaveSlide', 'SaveShape', 'AddSlide', 'AddMasterSlide', 'AddLayoutSlide', 'RemoveSlide', 'ReoderSlide', 'Merge', 'UpdateBackground', 'ResetSlide', 'AddShape', 'RemoveShape', 'UpdateShape', 'ReplaceText'])
|
143
|
-
unless validator.valid?(type)
|
144
|
-
fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
|
145
|
-
end
|
146
|
-
@type = type
|
147
|
-
end
|
148
|
-
|
149
120
|
# Checks equality by comparing each attribute.
|
150
121
|
# @param [Object] Object to be compared
|
151
122
|
def ==(o)
|
@@ -24,10 +24,7 @@ require 'date'
|
|
24
24
|
|
25
25
|
module AsposeSlidesCloud
|
26
26
|
# Add shape task.
|
27
|
-
class AddShape
|
28
|
-
# Task type.
|
29
|
-
attr_accessor :type
|
30
|
-
|
27
|
+
class AddShape < Task
|
31
28
|
# Shape DTO.
|
32
29
|
attr_accessor :shape
|
33
30
|
|
@@ -58,35 +55,24 @@ module AsposeSlidesCloud
|
|
58
55
|
|
59
56
|
# Attribute mapping from ruby-style variable name to JSON key.
|
60
57
|
def self.attribute_map
|
61
|
-
{
|
62
|
-
:'type' => :'Type',
|
58
|
+
super.merge({
|
63
59
|
:'shape' => :'Shape',
|
64
|
-
:'shape_path' => :'ShapePath'
|
65
|
-
}
|
60
|
+
:'shape_path' => :'ShapePath',
|
61
|
+
})
|
66
62
|
end
|
67
63
|
|
68
64
|
# Attribute type mapping.
|
69
65
|
def self.swagger_types
|
70
|
-
{
|
71
|
-
:'type' => :'String',
|
66
|
+
super.merge({
|
72
67
|
:'shape' => :'ShapeBase',
|
73
|
-
:'shape_path' => :'String'
|
74
|
-
}
|
68
|
+
:'shape_path' => :'String',
|
69
|
+
})
|
75
70
|
end
|
76
71
|
|
77
72
|
# Initializes the object
|
78
73
|
# @param [Hash] attributes Model attributes in the form of hash
|
79
74
|
def initialize(attributes = {})
|
80
|
-
|
81
|
-
|
82
|
-
# convert string to symbol for hash key
|
83
|
-
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
84
|
-
|
85
|
-
if attributes.has_key?(:'Type')
|
86
|
-
self.type = attributes[:'Type']
|
87
|
-
else
|
88
|
-
self.type = "AddShape"
|
89
|
-
end
|
75
|
+
super
|
90
76
|
|
91
77
|
if attributes.has_key?(:'Shape')
|
92
78
|
self.shape = attributes[:'Shape']
|
@@ -95,38 +81,23 @@ module AsposeSlidesCloud
|
|
95
81
|
if attributes.has_key?(:'ShapePath')
|
96
82
|
self.shape_path = attributes[:'ShapePath']
|
97
83
|
end
|
84
|
+
self.type = "AddShape"
|
98
85
|
end
|
99
86
|
|
100
87
|
# Show invalid properties with the reasons. Usually used together with valid?
|
101
88
|
# @return Array for valid properties with the reasons
|
102
89
|
def list_invalid_properties
|
103
|
-
invalid_properties =
|
104
|
-
if @type.nil?
|
105
|
-
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
106
|
-
end
|
107
|
-
|
90
|
+
invalid_properties = super
|
108
91
|
invalid_properties
|
109
92
|
end
|
110
93
|
|
111
94
|
# Check to see if the all the properties in the model are valid
|
112
95
|
# @return true if the model is valid
|
113
96
|
def valid?
|
114
|
-
return false if
|
115
|
-
type_validator = EnumAttributeValidator.new('String', ['Save', 'SaveSlide', 'SaveShape', 'AddSlide', 'AddMasterSlide', 'AddLayoutSlide', 'RemoveSlide', 'ReoderSlide', 'Merge', 'UpdateBackground', 'ResetSlide', 'AddShape', 'RemoveShape', 'UpdateShape', 'ReplaceText'])
|
116
|
-
return false unless type_validator.valid?(@type)
|
97
|
+
return false if !super
|
117
98
|
true
|
118
99
|
end
|
119
100
|
|
120
|
-
# Custom attribute writer method checking allowed values (enum).
|
121
|
-
# @param [Object] type Object to be assigned
|
122
|
-
def type=(type)
|
123
|
-
validator = EnumAttributeValidator.new('String', ['Save', 'SaveSlide', 'SaveShape', 'AddSlide', 'AddMasterSlide', 'AddLayoutSlide', 'RemoveSlide', 'ReoderSlide', 'Merge', 'UpdateBackground', 'ResetSlide', 'AddShape', 'RemoveShape', 'UpdateShape', 'ReplaceText'])
|
124
|
-
unless validator.valid?(type)
|
125
|
-
fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
|
126
|
-
end
|
127
|
-
@type = type
|
128
|
-
end
|
129
|
-
|
130
101
|
# Checks equality by comparing each attribute.
|
131
102
|
# @param [Object] Object to be compared
|
132
103
|
def ==(o)
|
@@ -24,10 +24,7 @@ require 'date'
|
|
24
24
|
|
25
25
|
module AsposeSlidesCloud
|
26
26
|
# Add slide task.
|
27
|
-
class AddSlide
|
28
|
-
# Task type.
|
29
|
-
attr_accessor :type
|
30
|
-
|
27
|
+
class AddSlide < Task
|
31
28
|
# File to clone a slide from.
|
32
29
|
attr_accessor :clone_from_file
|
33
30
|
|
@@ -64,39 +61,28 @@ module AsposeSlidesCloud
|
|
64
61
|
|
65
62
|
# Attribute mapping from ruby-style variable name to JSON key.
|
66
63
|
def self.attribute_map
|
67
|
-
{
|
68
|
-
:'type' => :'Type',
|
64
|
+
super.merge({
|
69
65
|
:'clone_from_file' => :'CloneFromFile',
|
70
66
|
:'clone_from_position' => :'CloneFromPosition',
|
71
67
|
:'position' => :'Position',
|
72
|
-
:'layout_alias' => :'LayoutAlias'
|
73
|
-
}
|
68
|
+
:'layout_alias' => :'LayoutAlias',
|
69
|
+
})
|
74
70
|
end
|
75
71
|
|
76
72
|
# Attribute type mapping.
|
77
73
|
def self.swagger_types
|
78
|
-
{
|
79
|
-
:'type' => :'String',
|
74
|
+
super.merge({
|
80
75
|
:'clone_from_file' => :'InputFile',
|
81
76
|
:'clone_from_position' => :'Integer',
|
82
77
|
:'position' => :'Integer',
|
83
|
-
:'layout_alias' => :'String'
|
84
|
-
}
|
78
|
+
:'layout_alias' => :'String',
|
79
|
+
})
|
85
80
|
end
|
86
81
|
|
87
82
|
# Initializes the object
|
88
83
|
# @param [Hash] attributes Model attributes in the form of hash
|
89
84
|
def initialize(attributes = {})
|
90
|
-
|
91
|
-
|
92
|
-
# convert string to symbol for hash key
|
93
|
-
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
94
|
-
|
95
|
-
if attributes.has_key?(:'Type')
|
96
|
-
self.type = attributes[:'Type']
|
97
|
-
else
|
98
|
-
self.type = "AddSlide"
|
99
|
-
end
|
85
|
+
super
|
100
86
|
|
101
87
|
if attributes.has_key?(:'CloneFromFile')
|
102
88
|
self.clone_from_file = attributes[:'CloneFromFile']
|
@@ -113,16 +99,13 @@ module AsposeSlidesCloud
|
|
113
99
|
if attributes.has_key?(:'LayoutAlias')
|
114
100
|
self.layout_alias = attributes[:'LayoutAlias']
|
115
101
|
end
|
102
|
+
self.type = "AddSlide"
|
116
103
|
end
|
117
104
|
|
118
105
|
# Show invalid properties with the reasons. Usually used together with valid?
|
119
106
|
# @return Array for valid properties with the reasons
|
120
107
|
def list_invalid_properties
|
121
|
-
invalid_properties =
|
122
|
-
if @type.nil?
|
123
|
-
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
124
|
-
end
|
125
|
-
|
108
|
+
invalid_properties = super
|
126
109
|
if @clone_from_position.nil?
|
127
110
|
invalid_properties.push('invalid value for "clone_from_position", clone_from_position cannot be nil.')
|
128
111
|
end
|
@@ -137,24 +120,12 @@ module AsposeSlidesCloud
|
|
137
120
|
# Check to see if the all the properties in the model are valid
|
138
121
|
# @return true if the model is valid
|
139
122
|
def valid?
|
140
|
-
return false if
|
141
|
-
type_validator = EnumAttributeValidator.new('String', ['Save', 'SaveSlide', 'SaveShape', 'AddSlide', 'AddMasterSlide', 'AddLayoutSlide', 'RemoveSlide', 'ReoderSlide', 'Merge', 'UpdateBackground', 'ResetSlide', 'AddShape', 'RemoveShape', 'UpdateShape', 'ReplaceText'])
|
142
|
-
return false unless type_validator.valid?(@type)
|
123
|
+
return false if !super
|
143
124
|
return false if @clone_from_position.nil?
|
144
125
|
return false if @position.nil?
|
145
126
|
true
|
146
127
|
end
|
147
128
|
|
148
|
-
# Custom attribute writer method checking allowed values (enum).
|
149
|
-
# @param [Object] type Object to be assigned
|
150
|
-
def type=(type)
|
151
|
-
validator = EnumAttributeValidator.new('String', ['Save', 'SaveSlide', 'SaveShape', 'AddSlide', 'AddMasterSlide', 'AddLayoutSlide', 'RemoveSlide', 'ReoderSlide', 'Merge', 'UpdateBackground', 'ResetSlide', 'AddShape', 'RemoveShape', 'UpdateShape', 'ReplaceText'])
|
152
|
-
unless validator.valid?(type)
|
153
|
-
fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
|
154
|
-
end
|
155
|
-
@type = type
|
156
|
-
end
|
157
|
-
|
158
129
|
# Checks equality by comparing each attribute.
|
159
130
|
# @param [Object] Object to be compared
|
160
131
|
def ==(o)
|