aspose_slides_cloud 23.9.0 → 23.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -9
- data/README.md +10 -0
- data/aspose_slides_cloud.gemspec +0 -1
- data/docker-entrypoint.sh +1 -0
- data/lib/aspose_slides_cloud/api/slides_api.rb +12 -4
- data/lib/aspose_slides_cloud/api/slides_async_api.rb +539 -0
- data/lib/aspose_slides_cloud/api_client.rb +2 -1
- data/lib/aspose_slides_cloud/models/operation.rb +218 -0
- data/lib/aspose_slides_cloud/models/operation_progress.rb +121 -0
- data/lib/aspose_slides_cloud/models/slide.rb +11 -1
- data/lib/aspose_slides_cloud/models/slide_replace_result.rb +2 -1
- data/lib/aspose_slides_cloud/models/slide_show_transition.rb +489 -0
- data/lib/aspose_slides_cloud/type_registry.rb +3 -0
- data/lib/aspose_slides_cloud/version.rb +1 -1
- data/lib/aspose_slides_cloud.rb +4 -0
- data/spec/api/slides_api_spec.rb +2018 -2018
- data/spec/api/slides_async_api_spec.rb +1277 -0
- data/spec/spec_utils.rb +37 -7
- data/spec/use_cases/abstract_class_spec.rb +1 -1
- data/spec/use_cases/animation_spec.rb +28 -28
- data/spec/use_cases/async_api_spec.rb +171 -0
- data/spec/use_cases/chart_spec.rb +51 -51
- data/spec/use_cases/comment_spec.rb +17 -17
- data/spec/use_cases/create_spec.rb +22 -22
- data/spec/use_cases/font_spec.rb +24 -24
- data/spec/use_cases/header_footer_spec.rb +9 -9
- data/spec/use_cases/hyperlink_spec.rb +10 -10
- data/spec/use_cases/image_spec.rb +16 -16
- data/spec/use_cases/layout_slide_spec.rb +41 -41
- data/spec/use_cases/master_slide_spec.rb +40 -40
- data/spec/use_cases/math_spec.rb +15 -15
- data/spec/use_cases/merge_spec.rb +15 -15
- data/spec/use_cases/notes_slide_spec.rb +39 -39
- data/spec/use_cases/nullable_field_spec.rb +7 -7
- data/spec/use_cases/paragraph_spec.rb +38 -38
- data/spec/use_cases/pipeline_spec.rb +1 -1
- data/spec/use_cases/portion_spec.rb +34 -34
- data/spec/use_cases/property_spec.rb +38 -38
- data/spec/use_cases/section_spec.rb +16 -16
- data/spec/use_cases/shape_format_spec.rb +12 -12
- data/spec/use_cases/shape_spec.rb +87 -87
- data/spec/use_cases/slide_spec.rb +48 -32
- data/spec/use_cases/split_spec.rb +12 -12
- data/spec/use_cases/table_spec.rb +38 -38
- data/spec/use_cases/text_format_spec.rb +4 -4
- data/spec/use_cases/text_spec.rb +28 -28
- data/spec/use_cases/vba_spec.rb +10 -10
- data/spec/use_cases/watermark_spec.rb +36 -36
- data/testConfig.json +2 -1
- data/testRules.json +13 -2
- metadata +10 -24
- data/spec/use_cases/convert_spec.rb +0 -199
@@ -0,0 +1,218 @@
|
|
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
|
+
class Operation < BaseObject
|
27
|
+
attr_accessor :id
|
28
|
+
|
29
|
+
attr_accessor :method
|
30
|
+
|
31
|
+
attr_accessor :status
|
32
|
+
|
33
|
+
attr_accessor :progress
|
34
|
+
|
35
|
+
attr_accessor :created
|
36
|
+
|
37
|
+
attr_accessor :enqueued
|
38
|
+
|
39
|
+
attr_accessor :started
|
40
|
+
|
41
|
+
attr_accessor :failed
|
42
|
+
|
43
|
+
attr_accessor :canceled
|
44
|
+
|
45
|
+
attr_accessor :finished
|
46
|
+
|
47
|
+
attr_accessor :error
|
48
|
+
|
49
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
50
|
+
def self.attribute_map
|
51
|
+
{
|
52
|
+
:'id' => :'Id',
|
53
|
+
:'method' => :'Method',
|
54
|
+
:'status' => :'Status',
|
55
|
+
:'progress' => :'Progress',
|
56
|
+
:'created' => :'Created',
|
57
|
+
:'enqueued' => :'Enqueued',
|
58
|
+
:'started' => :'Started',
|
59
|
+
:'failed' => :'Failed',
|
60
|
+
:'canceled' => :'Canceled',
|
61
|
+
:'finished' => :'Finished',
|
62
|
+
:'error' => :'Error',
|
63
|
+
}
|
64
|
+
end
|
65
|
+
|
66
|
+
# Attribute type mapping.
|
67
|
+
def self.swagger_types
|
68
|
+
{
|
69
|
+
:'id' => :'String',
|
70
|
+
:'method' => :'String',
|
71
|
+
:'status' => :'String',
|
72
|
+
:'progress' => :'OperationProgress',
|
73
|
+
:'created' => :'DateTime',
|
74
|
+
:'enqueued' => :'DateTime',
|
75
|
+
:'started' => :'DateTime',
|
76
|
+
:'failed' => :'DateTime',
|
77
|
+
:'canceled' => :'DateTime',
|
78
|
+
:'finished' => :'DateTime',
|
79
|
+
:'error' => :'String',
|
80
|
+
}
|
81
|
+
end
|
82
|
+
|
83
|
+
# Initializes the object
|
84
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
85
|
+
def initialize(attributes = {})
|
86
|
+
return unless attributes.is_a?(Hash)
|
87
|
+
|
88
|
+
# convert string to symbol for hash key
|
89
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
90
|
+
|
91
|
+
if attributes.has_key?(:'Id')
|
92
|
+
self.id = attributes[:'Id']
|
93
|
+
end
|
94
|
+
|
95
|
+
if attributes.has_key?(:'Method')
|
96
|
+
self.method = attributes[:'Method']
|
97
|
+
end
|
98
|
+
|
99
|
+
if attributes.has_key?(:'Status')
|
100
|
+
self.status = attributes[:'Status']
|
101
|
+
end
|
102
|
+
|
103
|
+
if attributes.has_key?(:'Progress')
|
104
|
+
self.progress = attributes[:'Progress']
|
105
|
+
end
|
106
|
+
|
107
|
+
if attributes.has_key?(:'Created')
|
108
|
+
self.created = attributes[:'Created']
|
109
|
+
end
|
110
|
+
|
111
|
+
if attributes.has_key?(:'Enqueued')
|
112
|
+
self.enqueued = attributes[:'Enqueued']
|
113
|
+
end
|
114
|
+
|
115
|
+
if attributes.has_key?(:'Started')
|
116
|
+
self.started = attributes[:'Started']
|
117
|
+
end
|
118
|
+
|
119
|
+
if attributes.has_key?(:'Failed')
|
120
|
+
self.failed = attributes[:'Failed']
|
121
|
+
end
|
122
|
+
|
123
|
+
if attributes.has_key?(:'Canceled')
|
124
|
+
self.canceled = attributes[:'Canceled']
|
125
|
+
end
|
126
|
+
|
127
|
+
if attributes.has_key?(:'Finished')
|
128
|
+
self.finished = attributes[:'Finished']
|
129
|
+
end
|
130
|
+
|
131
|
+
if attributes.has_key?(:'Error')
|
132
|
+
self.error = attributes[:'Error']
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
137
|
+
# @return Array for valid properties with the reasons
|
138
|
+
def list_invalid_properties
|
139
|
+
invalid_properties = Array.new
|
140
|
+
if @id.nil?
|
141
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
142
|
+
end
|
143
|
+
|
144
|
+
if @method.nil?
|
145
|
+
invalid_properties.push('invalid value for "method", method cannot be nil.')
|
146
|
+
end
|
147
|
+
|
148
|
+
if @status.nil?
|
149
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
150
|
+
end
|
151
|
+
|
152
|
+
invalid_properties
|
153
|
+
end
|
154
|
+
|
155
|
+
# Check to see if the all the properties in the model are valid
|
156
|
+
# @return true if the model is valid
|
157
|
+
def valid?
|
158
|
+
return false if @id.nil?
|
159
|
+
return false if @method.nil?
|
160
|
+
method_validator = EnumAttributeValidator.new('String', ['Convert', 'DownloadPresentation', 'ConvertAndSave', 'SavePresentation', 'Merge', 'MergeAndSave'])
|
161
|
+
return false unless method_validator.valid?(@method)
|
162
|
+
return false if @status.nil?
|
163
|
+
status_validator = EnumAttributeValidator.new('String', ['Created', 'Enqueued', 'Started', 'Failed', 'Canceled', 'Finished'])
|
164
|
+
return false unless status_validator.valid?(@status)
|
165
|
+
true
|
166
|
+
end
|
167
|
+
|
168
|
+
# Custom attribute writer method checking allowed values (enum).
|
169
|
+
# @param [Object] method Object to be assigned
|
170
|
+
def method=(method)
|
171
|
+
validator = EnumAttributeValidator.new('String', ['Convert', 'DownloadPresentation', 'ConvertAndSave', 'SavePresentation', 'Merge', 'MergeAndSave'])
|
172
|
+
unless validator.valid?(method)
|
173
|
+
fail ArgumentError, 'invalid value for "method", must be one of #{validator.allowable_values}.'
|
174
|
+
end
|
175
|
+
@method = method
|
176
|
+
end
|
177
|
+
|
178
|
+
# Custom attribute writer method checking allowed values (enum).
|
179
|
+
# @param [Object] status Object to be assigned
|
180
|
+
def status=(status)
|
181
|
+
validator = EnumAttributeValidator.new('String', ['Created', 'Enqueued', 'Started', 'Failed', 'Canceled', 'Finished'])
|
182
|
+
unless validator.valid?(status)
|
183
|
+
fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.'
|
184
|
+
end
|
185
|
+
@status = status
|
186
|
+
end
|
187
|
+
|
188
|
+
# Checks equality by comparing each attribute.
|
189
|
+
# @param [Object] Object to be compared
|
190
|
+
def ==(o)
|
191
|
+
return true if self.equal?(o)
|
192
|
+
self.class == o.class &&
|
193
|
+
id == o.id &&
|
194
|
+
method == o.method &&
|
195
|
+
status == o.status &&
|
196
|
+
progress == o.progress &&
|
197
|
+
created == o.created &&
|
198
|
+
enqueued == o.enqueued &&
|
199
|
+
started == o.started &&
|
200
|
+
failed == o.failed &&
|
201
|
+
canceled == o.canceled &&
|
202
|
+
finished == o.finished &&
|
203
|
+
error == o.error
|
204
|
+
end
|
205
|
+
|
206
|
+
# @see the `==` method
|
207
|
+
# @param [Object] Object to be compared
|
208
|
+
def eql?(o)
|
209
|
+
self == o
|
210
|
+
end
|
211
|
+
|
212
|
+
# Calculates hash code according to all attributes.
|
213
|
+
# @return [Fixnum] Hash code
|
214
|
+
def hash
|
215
|
+
[id, method, status, progress, created, enqueued, started, failed, canceled, finished, error].hash
|
216
|
+
end
|
217
|
+
end
|
218
|
+
end
|
@@ -0,0 +1,121 @@
|
|
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
|
+
# Operation progress.
|
27
|
+
class OperationProgress < BaseObject
|
28
|
+
# Description.
|
29
|
+
attr_accessor :description
|
30
|
+
|
31
|
+
# Current Step Index.
|
32
|
+
attr_accessor :step_index
|
33
|
+
|
34
|
+
# Current Step Index.
|
35
|
+
attr_accessor :step_count
|
36
|
+
|
37
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
38
|
+
def self.attribute_map
|
39
|
+
{
|
40
|
+
:'description' => :'Description',
|
41
|
+
:'step_index' => :'StepIndex',
|
42
|
+
:'step_count' => :'StepCount',
|
43
|
+
}
|
44
|
+
end
|
45
|
+
|
46
|
+
# Attribute type mapping.
|
47
|
+
def self.swagger_types
|
48
|
+
{
|
49
|
+
:'description' => :'String',
|
50
|
+
:'step_index' => :'Integer',
|
51
|
+
:'step_count' => :'Integer',
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
# Initializes the object
|
56
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
57
|
+
def initialize(attributes = {})
|
58
|
+
return unless attributes.is_a?(Hash)
|
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?(:'Description')
|
64
|
+
self.description = attributes[:'Description']
|
65
|
+
end
|
66
|
+
|
67
|
+
if attributes.has_key?(:'StepIndex')
|
68
|
+
self.step_index = attributes[:'StepIndex']
|
69
|
+
end
|
70
|
+
|
71
|
+
if attributes.has_key?(:'StepCount')
|
72
|
+
self.step_count = attributes[:'StepCount']
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
77
|
+
# @return Array for valid properties with the reasons
|
78
|
+
def list_invalid_properties
|
79
|
+
invalid_properties = Array.new
|
80
|
+
if @step_index.nil?
|
81
|
+
invalid_properties.push('invalid value for "step_index", step_index cannot be nil.')
|
82
|
+
end
|
83
|
+
|
84
|
+
if @step_count.nil?
|
85
|
+
invalid_properties.push('invalid value for "step_count", step_count cannot be nil.')
|
86
|
+
end
|
87
|
+
|
88
|
+
invalid_properties
|
89
|
+
end
|
90
|
+
|
91
|
+
# Check to see if the all the properties in the model are valid
|
92
|
+
# @return true if the model is valid
|
93
|
+
def valid?
|
94
|
+
return false if @step_index.nil?
|
95
|
+
return false if @step_count.nil?
|
96
|
+
true
|
97
|
+
end
|
98
|
+
|
99
|
+
# Checks equality by comparing each attribute.
|
100
|
+
# @param [Object] Object to be compared
|
101
|
+
def ==(o)
|
102
|
+
return true if self.equal?(o)
|
103
|
+
self.class == o.class &&
|
104
|
+
description == o.description &&
|
105
|
+
step_index == o.step_index &&
|
106
|
+
step_count == o.step_count
|
107
|
+
end
|
108
|
+
|
109
|
+
# @see the `==` method
|
110
|
+
# @param [Object] Object to be compared
|
111
|
+
def eql?(o)
|
112
|
+
self == o
|
113
|
+
end
|
114
|
+
|
115
|
+
# Calculates hash code according to all attributes.
|
116
|
+
# @return [Fixnum] Hash code
|
117
|
+
def hash
|
118
|
+
[description, step_index, step_count].hash
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
@@ -34,6 +34,9 @@ module AsposeSlidesCloud
|
|
34
34
|
# Specifies if shapes of the master slide should be shown on the slide. True by default.
|
35
35
|
attr_accessor :show_master_shapes
|
36
36
|
|
37
|
+
# Specifies if shapes of the master slide should be shown on the slide. True by default.
|
38
|
+
attr_accessor :slide_show_transition
|
39
|
+
|
37
40
|
# Gets or sets the link to the layout slide.
|
38
41
|
attr_accessor :layout_slide
|
39
42
|
|
@@ -64,6 +67,7 @@ module AsposeSlidesCloud
|
|
64
67
|
:'width' => :'Width',
|
65
68
|
:'height' => :'Height',
|
66
69
|
:'show_master_shapes' => :'ShowMasterShapes',
|
70
|
+
:'slide_show_transition' => :'SlideShowTransition',
|
67
71
|
:'layout_slide' => :'LayoutSlide',
|
68
72
|
:'shapes' => :'Shapes',
|
69
73
|
:'theme' => :'Theme',
|
@@ -81,6 +85,7 @@ module AsposeSlidesCloud
|
|
81
85
|
:'width' => :'Float',
|
82
86
|
:'height' => :'Float',
|
83
87
|
:'show_master_shapes' => :'BOOLEAN',
|
88
|
+
:'slide_show_transition' => :'SlideShowTransition',
|
84
89
|
:'layout_slide' => :'ResourceUri',
|
85
90
|
:'shapes' => :'ResourceUri',
|
86
91
|
:'theme' => :'ResourceUri',
|
@@ -109,6 +114,10 @@ module AsposeSlidesCloud
|
|
109
114
|
self.show_master_shapes = attributes[:'ShowMasterShapes']
|
110
115
|
end
|
111
116
|
|
117
|
+
if attributes.has_key?(:'SlideShowTransition')
|
118
|
+
self.slide_show_transition = attributes[:'SlideShowTransition']
|
119
|
+
end
|
120
|
+
|
112
121
|
if attributes.has_key?(:'LayoutSlide')
|
113
122
|
self.layout_slide = attributes[:'LayoutSlide']
|
114
123
|
end
|
@@ -181,6 +190,7 @@ module AsposeSlidesCloud
|
|
181
190
|
width == o.width &&
|
182
191
|
height == o.height &&
|
183
192
|
show_master_shapes == o.show_master_shapes &&
|
193
|
+
slide_show_transition == o.slide_show_transition &&
|
184
194
|
layout_slide == o.layout_slide &&
|
185
195
|
shapes == o.shapes &&
|
186
196
|
theme == o.theme &&
|
@@ -200,7 +210,7 @@ module AsposeSlidesCloud
|
|
200
210
|
# Calculates hash code according to all attributes.
|
201
211
|
# @return [Fixnum] Hash code
|
202
212
|
def hash
|
203
|
-
[self_uri, alternate_links, width, height, show_master_shapes, layout_slide, shapes, theme, placeholders, images, comments, background, notes_slide].hash
|
213
|
+
[self_uri, alternate_links, width, height, show_master_shapes, slide_show_transition, layout_slide, shapes, theme, placeholders, images, comments, background, notes_slide].hash
|
204
214
|
end
|
205
215
|
end
|
206
216
|
end
|
@@ -81,6 +81,7 @@ module AsposeSlidesCloud
|
|
81
81
|
width == o.width &&
|
82
82
|
height == o.height &&
|
83
83
|
show_master_shapes == o.show_master_shapes &&
|
84
|
+
slide_show_transition == o.slide_show_transition &&
|
84
85
|
layout_slide == o.layout_slide &&
|
85
86
|
shapes == o.shapes &&
|
86
87
|
theme == o.theme &&
|
@@ -101,7 +102,7 @@ module AsposeSlidesCloud
|
|
101
102
|
# Calculates hash code according to all attributes.
|
102
103
|
# @return [Fixnum] Hash code
|
103
104
|
def hash
|
104
|
-
[self_uri, alternate_links, width, height, show_master_shapes, layout_slide, shapes, theme, placeholders, images, comments, background, notes_slide, matches].hash
|
105
|
+
[self_uri, alternate_links, width, height, show_master_shapes, slide_show_transition, layout_slide, shapes, theme, placeholders, images, comments, background, notes_slide, matches].hash
|
105
106
|
end
|
106
107
|
end
|
107
108
|
end
|