aspose_slides_cloud 20.4.0 → 20.10.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 +61 -61
- data/TestData/ChartTest.pptx +0 -0
- data/TestData/Sections.pptx +0 -0
- data/TestData/TemplatingCVDataWithBase64.xml +22 -22
- data/lib/aspose_slides_cloud.rb +212 -205
- data/lib/aspose_slides_cloud/api/slides_api.rb +10979 -7974
- data/lib/aspose_slides_cloud/api/slides_api_requests.rb +4146 -3099
- data/lib/aspose_slides_cloud/api_client.rb +432 -429
- data/lib/aspose_slides_cloud/models/add_layout_slide.rb +244 -261
- data/lib/aspose_slides_cloud/models/add_master_slide.rb +259 -276
- data/lib/aspose_slides_cloud/models/add_shape.rb +239 -256
- data/lib/aspose_slides_cloud/models/add_slide.rb +269 -286
- data/lib/aspose_slides_cloud/models/api_info.rb +217 -205
- data/lib/aspose_slides_cloud/models/arrow_head_properties.rb +285 -273
- data/lib/aspose_slides_cloud/models/audio_frame.rb +359 -573
- data/lib/aspose_slides_cloud/models/axes.rb +237 -225
- data/lib/aspose_slides_cloud/models/axis.rb +699 -687
- data/lib/aspose_slides_cloud/models/base64_input_file.rb +230 -256
- data/lib/aspose_slides_cloud/models/blur_effect.rb +227 -215
- data/lib/aspose_slides_cloud/models/box_and_whisker_series.rb +299 -0
- data/lib/aspose_slides_cloud/models/bubble_chart_data_point.rb +212 -230
- data/lib/aspose_slides_cloud/models/bubble_series.rb +248 -428
- data/lib/aspose_slides_cloud/models/chart.rb +365 -553
- data/lib/aspose_slides_cloud/models/chart_category.rb +271 -0
- data/lib/aspose_slides_cloud/models/chart_title.rb +222 -210
- data/lib/aspose_slides_cloud/models/chart_wall.rb +281 -269
- data/lib/aspose_slides_cloud/models/color_scheme.rb +317 -327
- data/lib/aspose_slides_cloud/models/common_slide_view_properties.rb +217 -0
- data/lib/aspose_slides_cloud/models/connector.rb +275 -487
- data/lib/aspose_slides_cloud/models/custom_dash_pattern.rb +209 -197
- data/lib/aspose_slides_cloud/models/{resource_uri_element.rb → data_point.rb} +197 -195
- data/lib/aspose_slides_cloud/models/disc_usage.rb +227 -215
- data/lib/aspose_slides_cloud/models/document.rb +257 -267
- data/lib/aspose_slides_cloud/models/document_properties.rb +209 -219
- data/lib/aspose_slides_cloud/models/document_property.rb +232 -242
- data/lib/aspose_slides_cloud/models/document_replace_result.rb +218 -282
- data/lib/aspose_slides_cloud/models/effect.rb +424 -412
- data/lib/aspose_slides_cloud/models/effect_format.rb +277 -265
- data/lib/aspose_slides_cloud/models/entity_exists.rb +212 -0
- data/lib/aspose_slides_cloud/models/error.rb +237 -225
- data/lib/aspose_slides_cloud/models/error_details.rb +222 -210
- data/lib/aspose_slides_cloud/models/export_format.rb +60 -59
- data/lib/aspose_slides_cloud/models/export_options.rb +216 -194
- data/lib/aspose_slides_cloud/models/file_version.rb +225 -270
- data/lib/aspose_slides_cloud/models/file_versions.rb +209 -197
- data/lib/aspose_slides_cloud/models/files_list.rb +209 -197
- data/lib/aspose_slides_cloud/models/files_upload_result.rb +221 -209
- data/lib/aspose_slides_cloud/models/fill_format.rb +240 -228
- data/lib/aspose_slides_cloud/models/fill_overlay_effect.rb +246 -234
- data/lib/aspose_slides_cloud/models/font_scheme.rb +227 -237
- data/lib/aspose_slides_cloud/models/font_set.rb +227 -215
- data/lib/aspose_slides_cloud/models/format_scheme.rb +245 -255
- data/lib/aspose_slides_cloud/models/geometry_shape.rb +260 -439
- data/lib/aspose_slides_cloud/models/glow_effect.rb +222 -210
- data/lib/aspose_slides_cloud/models/gradient_fill.rb +342 -359
- data/lib/aspose_slides_cloud/models/gradient_fill_stop.rb +222 -210
- data/lib/aspose_slides_cloud/models/graphical_object.rb +234 -422
- data/lib/aspose_slides_cloud/models/group_shape.rb +234 -422
- data/lib/aspose_slides_cloud/models/header_footer.rb +247 -0
- data/lib/aspose_slides_cloud/models/html_export_options.rb +421 -420
- data/lib/aspose_slides_cloud/models/i_shape_export_options.rb +197 -195
- data/lib/aspose_slides_cloud/models/image.rb +237 -247
- data/lib/aspose_slides_cloud/models/image_export_format.rb +43 -43
- data/lib/aspose_slides_cloud/models/image_export_options.rb +299 -298
- data/lib/aspose_slides_cloud/models/images.rb +209 -219
- data/lib/aspose_slides_cloud/models/inner_shadow_effect.rb +252 -240
- data/lib/aspose_slides_cloud/models/input.rb +227 -215
- data/lib/aspose_slides_cloud/models/input_file.rb +250 -238
- data/lib/aspose_slides_cloud/models/interactive_sequence.rb +224 -212
- data/lib/aspose_slides_cloud/models/layout_slide.rb +278 -288
- data/lib/aspose_slides_cloud/models/layout_slides.rb +209 -219
- data/lib/aspose_slides_cloud/models/legend.rb +321 -309
- data/lib/aspose_slides_cloud/models/line_format.rb +389 -377
- data/lib/aspose_slides_cloud/models/master_slide.rb +231 -241
- data/lib/aspose_slides_cloud/models/master_slides.rb +209 -219
- data/lib/aspose_slides_cloud/models/merge.rb +231 -248
- data/lib/aspose_slides_cloud/models/merging_source.rb +219 -207
- data/lib/aspose_slides_cloud/models/no_fill.rb +219 -236
- data/lib/aspose_slides_cloud/models/normal_view_restored_properties.rb +217 -0
- data/lib/aspose_slides_cloud/models/notes_slide.rb +217 -227
- data/lib/aspose_slides_cloud/models/notes_slide_export_format.rb +43 -43
- data/lib/aspose_slides_cloud/models/notes_slide_header_footer.rb +267 -0
- data/lib/aspose_slides_cloud/models/object_exist.rb +227 -215
- data/lib/aspose_slides_cloud/models/ole_object_frame.rb +259 -447
- data/lib/aspose_slides_cloud/models/one_value_chart_data_point.rb +210 -200
- data/lib/aspose_slides_cloud/models/one_value_series.rb +248 -428
- data/lib/aspose_slides_cloud/models/ordered_merge_request.rb +209 -197
- data/lib/aspose_slides_cloud/models/outer_shadow_effect.rb +252 -240
- data/lib/aspose_slides_cloud/models/output_file.rb +240 -228
- data/lib/aspose_slides_cloud/models/paragraph.rb +517 -527
- data/lib/aspose_slides_cloud/models/paragraphs.rb +209 -219
- data/lib/aspose_slides_cloud/models/path_input_file.rb +240 -266
- data/lib/aspose_slides_cloud/models/path_output_file.rb +239 -256
- data/lib/aspose_slides_cloud/models/pattern_fill.rb +266 -283
- data/lib/aspose_slides_cloud/models/pdf_export_options.rb +547 -519
- data/lib/aspose_slides_cloud/models/picture_fill.rb +351 -368
- data/lib/aspose_slides_cloud/models/picture_frame.rb +245 -459
- data/lib/aspose_slides_cloud/models/pipeline.rb +219 -207
- data/lib/aspose_slides_cloud/models/placeholder.rb +325 -335
- data/lib/aspose_slides_cloud/models/placeholders.rb +209 -219
- data/lib/aspose_slides_cloud/models/plot_area.rb +311 -299
- data/lib/aspose_slides_cloud/models/portion.rb +589 -599
- data/lib/aspose_slides_cloud/models/portions.rb +209 -219
- data/lib/aspose_slides_cloud/models/pptx_export_options.rb +247 -246
- data/lib/aspose_slides_cloud/models/presentation_to_merge.rb +229 -217
- data/lib/aspose_slides_cloud/models/presentations_merge_request.rb +221 -209
- data/lib/aspose_slides_cloud/models/preset_shadow_effect.rb +286 -274
- data/lib/aspose_slides_cloud/models/reflection_effect.rb +441 -429
- data/lib/aspose_slides_cloud/models/remove_shape.rb +229 -246
- data/lib/aspose_slides_cloud/models/remove_slide.rb +234 -251
- data/lib/aspose_slides_cloud/models/reorder_slide.rb +249 -266
- data/lib/aspose_slides_cloud/models/replace_text.rb +269 -286
- data/lib/aspose_slides_cloud/models/request_input_file.rb +235 -261
- data/lib/aspose_slides_cloud/models/reset_slide.rb +234 -251
- data/lib/aspose_slides_cloud/models/resource_base.rb +219 -207
- data/lib/aspose_slides_cloud/models/resource_uri.rb +237 -225
- data/lib/aspose_slides_cloud/models/response_output_file.rb +219 -236
- data/lib/aspose_slides_cloud/models/save.rb +266 -283
- data/lib/aspose_slides_cloud/models/save_shape.rb +276 -293
- data/lib/aspose_slides_cloud/models/save_slide.rb +301 -318
- data/lib/aspose_slides_cloud/models/scale_type.rb +41 -41
- data/lib/aspose_slides_cloud/models/scatter_chart_data_point.rb +225 -215
- data/lib/aspose_slides_cloud/models/scatter_series.rb +248 -428
- 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 +422 -389
- data/lib/aspose_slides_cloud/models/series_marker.rb +281 -269
- data/lib/aspose_slides_cloud/models/shape.rb +255 -467
- data/lib/aspose_slides_cloud/models/shape_base.rb +375 -406
- data/lib/aspose_slides_cloud/models/shape_export_format.rb +44 -44
- data/lib/aspose_slides_cloud/models/shape_image_export_options.rb +286 -274
- data/lib/aspose_slides_cloud/models/shape_thumbnail_bounds.rb +41 -41
- data/lib/aspose_slides_cloud/models/shapes.rb +209 -219
- data/lib/aspose_slides_cloud/models/size_type.rb +55 -55
- data/lib/aspose_slides_cloud/models/slide.rb +322 -332
- data/lib/aspose_slides_cloud/models/slide_animation.rb +221 -231
- data/lib/aspose_slides_cloud/models/slide_background.rb +266 -276
- data/lib/aspose_slides_cloud/models/slide_comment.rb +239 -227
- data/lib/aspose_slides_cloud/models/slide_comments.rb +209 -219
- data/lib/aspose_slides_cloud/models/slide_export_format.rb +59 -58
- data/lib/aspose_slides_cloud/models/slide_replace_result.rb +223 -347
- data/lib/aspose_slides_cloud/models/slides.rb +209 -219
- data/lib/aspose_slides_cloud/models/smart_art.rb +342 -530
- data/lib/aspose_slides_cloud/models/smart_art_node.rb +293 -281
- data/lib/aspose_slides_cloud/models/smart_art_shape.rb +235 -422
- data/lib/aspose_slides_cloud/models/soft_edge_effect.rb +212 -200
- data/lib/aspose_slides_cloud/models/solid_fill.rb +229 -246
- data/lib/aspose_slides_cloud/models/split_document_result.rb +209 -219
- data/lib/aspose_slides_cloud/models/storage_exist.rb +212 -200
- data/lib/aspose_slides_cloud/models/storage_file.rb +257 -245
- data/lib/aspose_slides_cloud/models/svg_export_options.rb +379 -378
- data/lib/aspose_slides_cloud/models/swf_export_options.rb +529 -528
- data/lib/aspose_slides_cloud/models/table.rb +350 -538
- data/lib/aspose_slides_cloud/models/table_cell.rb +403 -391
- data/lib/aspose_slides_cloud/models/table_column.rb +212 -200
- data/lib/aspose_slides_cloud/models/table_row.rb +239 -227
- data/lib/aspose_slides_cloud/models/task.rb +240 -228
- data/lib/aspose_slides_cloud/models/text_item.rb +217 -205
- data/lib/aspose_slides_cloud/models/text_items.rb +209 -219
- data/lib/aspose_slides_cloud/models/theme.rb +237 -247
- data/lib/aspose_slides_cloud/models/tiff_export_options.rb +423 -422
- data/lib/aspose_slides_cloud/models/update_background.rb +241 -258
- data/lib/aspose_slides_cloud/models/update_shape.rb +239 -256
- data/lib/aspose_slides_cloud/models/video_frame.rb +329 -543
- data/lib/aspose_slides_cloud/models/view_properties.rb +357 -0
- data/lib/aspose_slides_cloud/models/waterfall_chart_data_point.rb +206 -0
- data/lib/aspose_slides_cloud/models/waterfall_series.rb +247 -0
- data/lib/aspose_slides_cloud/models/xps_export_options.rb +243 -242
- data/lib/aspose_slides_cloud/type_registry.rb +320 -0
- data/lib/aspose_slides_cloud/version.rb +25 -25
- data/spec/api/slides_api_spec.rb +35926 -24406
- data/spec/extra/extra_spec.rb +235 -101
- data/spec/spec_utils.rb +183 -176
- data/testConfig.json +7 -7
- data/testRules.json +472 -340
- metadata +18 -3
@@ -1,412 +1,424 @@
|
|
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
|
-
# Represents comment of slide
|
27
|
-
class Effect
|
28
|
-
# Effect type.
|
29
|
-
attr_accessor :type
|
30
|
-
|
31
|
-
# Effect subtype.
|
32
|
-
attr_accessor :subtype
|
33
|
-
|
34
|
-
# Preset class type.
|
35
|
-
attr_accessor :preset_class_type
|
36
|
-
|
37
|
-
# Shape index.
|
38
|
-
attr_accessor :shape_index
|
39
|
-
|
40
|
-
# Effect trigger type.
|
41
|
-
attr_accessor :trigger_type
|
42
|
-
|
43
|
-
# The percentage of duration accelerate behavior effect.
|
44
|
-
attr_accessor :accelerate
|
45
|
-
|
46
|
-
# True to automatically play the animation in reverse after playing it in the forward direction.
|
47
|
-
attr_accessor :auto_reverse
|
48
|
-
|
49
|
-
# The percentage of duration decelerate behavior effect.
|
50
|
-
attr_accessor :decelerate
|
51
|
-
|
52
|
-
# The duration of animation effect.
|
53
|
-
attr_accessor :duration
|
54
|
-
|
55
|
-
# The number of times the effect should repeat.
|
56
|
-
attr_accessor :repeat_count
|
57
|
-
|
58
|
-
# The number of times the effect should repeat.
|
59
|
-
attr_accessor :repeat_duration
|
60
|
-
|
61
|
-
# The way for a effect to restart after complete.
|
62
|
-
attr_accessor :restart
|
63
|
-
|
64
|
-
# The percentage by which to speed up (or slow down) the timing.
|
65
|
-
attr_accessor :speed
|
66
|
-
|
67
|
-
# Delay time after trigger.
|
68
|
-
attr_accessor :trigger_delay_time
|
69
|
-
|
70
|
-
class EnumAttributeValidator
|
71
|
-
attr_reader :datatype
|
72
|
-
attr_reader :allowable_values
|
73
|
-
|
74
|
-
def initialize(datatype, allowable_values)
|
75
|
-
@allowable_values = allowable_values.map do |value|
|
76
|
-
case datatype.to_s
|
77
|
-
when /Integer/i
|
78
|
-
value.to_i
|
79
|
-
when /Float/i
|
80
|
-
value.to_f
|
81
|
-
else
|
82
|
-
value
|
83
|
-
end
|
84
|
-
end
|
85
|
-
end
|
86
|
-
|
87
|
-
def valid?(value)
|
88
|
-
!value || allowable_values.any?{ |s| s.casecmp(value) == 0 }
|
89
|
-
end
|
90
|
-
end
|
91
|
-
|
92
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
93
|
-
def self.attribute_map
|
94
|
-
{
|
95
|
-
:'type' => :'Type',
|
96
|
-
:'subtype' => :'Subtype',
|
97
|
-
:'preset_class_type' => :'PresetClassType',
|
98
|
-
:'shape_index' => :'ShapeIndex',
|
99
|
-
:'trigger_type' => :'TriggerType',
|
100
|
-
:'accelerate' => :'Accelerate',
|
101
|
-
:'auto_reverse' => :'AutoReverse',
|
102
|
-
:'decelerate' => :'Decelerate',
|
103
|
-
:'duration' => :'Duration',
|
104
|
-
:'repeat_count' => :'RepeatCount',
|
105
|
-
:'repeat_duration' => :'RepeatDuration',
|
106
|
-
:'restart' => :'Restart',
|
107
|
-
:'speed' => :'Speed',
|
108
|
-
:'trigger_delay_time' => :'TriggerDelayTime'
|
109
|
-
}
|
110
|
-
end
|
111
|
-
|
112
|
-
# Attribute type mapping.
|
113
|
-
def self.swagger_types
|
114
|
-
{
|
115
|
-
:'type' => :'String',
|
116
|
-
:'subtype' => :'String',
|
117
|
-
:'preset_class_type' => :'String',
|
118
|
-
:'shape_index' => :'Integer',
|
119
|
-
:'trigger_type' => :'String',
|
120
|
-
:'accelerate' => :'Float',
|
121
|
-
:'auto_reverse' => :'BOOLEAN',
|
122
|
-
:'decelerate' => :'Float',
|
123
|
-
:'duration' => :'Float',
|
124
|
-
:'repeat_count' => :'Float',
|
125
|
-
:'repeat_duration' => :'Float',
|
126
|
-
:'restart' => :'String',
|
127
|
-
:'speed' => :'Float',
|
128
|
-
:'trigger_delay_time' => :'Float'
|
129
|
-
}
|
130
|
-
end
|
131
|
-
|
132
|
-
# Initializes the object
|
133
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
134
|
-
def initialize(attributes = {})
|
135
|
-
return unless attributes.is_a?(Hash)
|
136
|
-
|
137
|
-
# convert string to symbol for hash key
|
138
|
-
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
139
|
-
|
140
|
-
if attributes.has_key?(:'Type')
|
141
|
-
self.type = attributes[:'Type']
|
142
|
-
end
|
143
|
-
|
144
|
-
if attributes.has_key?(:'Subtype')
|
145
|
-
self.subtype = attributes[:'Subtype']
|
146
|
-
end
|
147
|
-
|
148
|
-
if attributes.has_key?(:'PresetClassType')
|
149
|
-
self.preset_class_type = attributes[:'PresetClassType']
|
150
|
-
end
|
151
|
-
|
152
|
-
if attributes.has_key?(:'ShapeIndex')
|
153
|
-
self.shape_index = attributes[:'ShapeIndex']
|
154
|
-
end
|
155
|
-
|
156
|
-
if attributes.has_key?(:'TriggerType')
|
157
|
-
self.trigger_type = attributes[:'TriggerType']
|
158
|
-
end
|
159
|
-
|
160
|
-
if attributes.has_key?(:'Accelerate')
|
161
|
-
self.accelerate = attributes[:'Accelerate']
|
162
|
-
end
|
163
|
-
|
164
|
-
if attributes.has_key?(:'AutoReverse')
|
165
|
-
self.auto_reverse = attributes[:'AutoReverse']
|
166
|
-
end
|
167
|
-
|
168
|
-
if attributes.has_key?(:'Decelerate')
|
169
|
-
self.decelerate = attributes[:'Decelerate']
|
170
|
-
end
|
171
|
-
|
172
|
-
if attributes.has_key?(:'Duration')
|
173
|
-
self.duration = attributes[:'Duration']
|
174
|
-
end
|
175
|
-
|
176
|
-
if attributes.has_key?(:'RepeatCount')
|
177
|
-
self.repeat_count = attributes[:'RepeatCount']
|
178
|
-
end
|
179
|
-
|
180
|
-
if attributes.has_key?(:'RepeatDuration')
|
181
|
-
self.repeat_duration = attributes[:'RepeatDuration']
|
182
|
-
end
|
183
|
-
|
184
|
-
if attributes.has_key?(:'Restart')
|
185
|
-
self.restart = attributes[:'Restart']
|
186
|
-
end
|
187
|
-
|
188
|
-
if attributes.has_key?(:'Speed')
|
189
|
-
self.speed = attributes[:'Speed']
|
190
|
-
end
|
191
|
-
|
192
|
-
if attributes.has_key?(:'TriggerDelayTime')
|
193
|
-
self.trigger_delay_time = attributes[:'TriggerDelayTime']
|
194
|
-
end
|
195
|
-
end
|
196
|
-
|
197
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
198
|
-
# @return Array for valid properties with the reasons
|
199
|
-
def list_invalid_properties
|
200
|
-
invalid_properties = Array.new
|
201
|
-
if @shape_index.nil?
|
202
|
-
invalid_properties.push('invalid value for "shape_index", shape_index cannot be nil.')
|
203
|
-
end
|
204
|
-
|
205
|
-
invalid_properties
|
206
|
-
end
|
207
|
-
|
208
|
-
# Check to see if the all the properties in the model are valid
|
209
|
-
# @return true if the model is valid
|
210
|
-
def valid?
|
211
|
-
type_validator = EnumAttributeValidator.new('String', ['Appear', 'CurveUpDown', 'Ascend', 'Blast', 'Blinds', 'Blink', 'BoldFlash', 'BoldReveal', 'Boomerang', 'Bounce', 'Box', 'BrushOnColor', 'BrushOnUnderline', 'CenterRevolve', 'ChangeFillColor', 'ChangeFont', 'ChangeFontColor', 'ChangeFontSize', 'ChangeFontStyle', 'ChangeLineColor', 'Checkerboard', 'Circle', 'ColorBlend', 'ColorTypewriter', 'ColorWave', 'ComplementaryColor', 'ComplementaryColor2', 'Compress', 'ContrastingColor', 'Crawl', 'Credits', 'Custom', 'Darken', 'Desaturate', 'Descend', 'Diamond', 'Dissolve', 'EaseInOut', 'Expand', 'Fade', 'FadedSwivel', 'FadedZoom', 'FlashBulb', 'FlashOnce', 'Flicker', 'Flip', 'Float', 'Fly', 'Fold', 'Glide', 'GrowAndTurn', 'GrowShrink', 'GrowWithColor', 'Lighten', 'LightSpeed', 'MediaPause', 'MediaPlay', 'MediaStop', 'Path4PointStar', 'Path5PointStar', 'Path6PointStar', 'Path8PointStar', 'PathArcDown', 'PathArcLeft', 'PathArcRight', 'PathArcUp', 'PathBean', 'PathBounceLeft', 'PathBounceRight', 'PathBuzzsaw', 'PathCircle', 'PathCrescentMoon', 'PathCurvedSquare', 'PathCurvedX', 'PathCurvyLeft', 'PathCurvyRight', 'PathCurvyStar', 'PathDecayingWave', 'PathDiagonalDownRight', 'PathDiagonalUpRight', 'PathDiamond', 'PathDown', 'PathEqualTriangle', 'PathFigure8Four', 'PathFootball', 'PathFunnel', 'PathHeart', 'PathHeartbeat', 'PathHexagon', 'PathHorizontalFigure8', 'PathInvertedSquare', 'PathInvertedTriangle', 'PathLeft', 'PathLoopdeLoop', 'PathNeutron', 'PathOctagon', 'PathParallelogram', 'PathPeanut', 'PathPentagon', 'PathPlus', 'PathPointyStar', 'PathRight', 'PathRightTriangle', 'PathSCurve1', 'PathSCurve2', 'PathSineWave', 'PathSpiralLeft', 'PathSpiralRight', 'PathSpring', 'PathSquare', 'PathStairsDown', 'PathSwoosh', 'PathTeardrop', 'PathTrapezoid', 'PathTurnDown', 'PathTurnRight', 'PathTurnUp', 'PathTurnUpRight', 'PathUp', 'PathUser', 'PathVerticalFigure8', 'PathWave', 'PathZigzag', 'Peek', 'Pinwheel', 'Plus', 'RandomBars', 'RandomEffects', 'RiseUp', 'Shimmer', 'Sling', 'Spin', 'Spinner', 'Spiral', 'Split', 'Stretch', 'Strips', 'StyleEmphasis', 'Swish', 'Swivel', 'Teeter', 'Thread', 'Transparency', 'Unfold', 'VerticalGrow', 'Wave', 'Wedge', 'Wheel', 'Whip', 'Wipe', 'Magnify', 'Zoom', 'OLEObjectShow', 'OLEObjectEdit', 'OLEObjectOpen'])
|
212
|
-
return false unless type_validator.valid?(@type)
|
213
|
-
subtype_validator = EnumAttributeValidator.new('String', ['None', 'Across', 'Bottom', 'BottomLeft', 'BottomRight', 'Center', 'Clockwise', 'CounterClockwise', 'GradualAndCycleClockwise', 'GradualAndCycleCounterClockwise', 'Down', 'DownLeft', 'DownRight', 'FontAllCaps', 'FontBold', 'FontItalic', 'FontShadow', 'FontStrikethrough', 'FontUnderline', 'Gradual', 'Horizontal', 'HorizontalIn', 'HorizontalOut', 'In', 'InBottom', 'InCenter', 'InSlightly', 'Instant', 'Left', 'OrdinalMask', 'Out', 'OutBottom', 'OutCenter', 'OutSlightly', 'Right', 'Slightly', 'Top', 'TopLeft', 'TopRight', 'Up', 'UpLeft', 'UpRight', 'Vertical', 'VerticalIn', 'VerticalOut', 'Wheel1', 'Wheel2', 'Wheel3', 'Wheel4', 'Wheel8'])
|
214
|
-
return false unless subtype_validator.valid?(@subtype)
|
215
|
-
preset_class_type_validator = EnumAttributeValidator.new('String', ['Entrance', 'Exit', 'Emphasis', 'Path', 'MediaCall', 'OLEActionVerbs'])
|
216
|
-
return false unless preset_class_type_validator.valid?(@preset_class_type)
|
217
|
-
return false if @shape_index.nil?
|
218
|
-
trigger_type_validator = EnumAttributeValidator.new('String', ['AfterPrevious', 'OnClick', 'WithPrevious'])
|
219
|
-
return false unless trigger_type_validator.valid?(@trigger_type)
|
220
|
-
restart_validator = EnumAttributeValidator.new('String', ['Always', 'WhenNotActive', 'Never', 'NotDefined'])
|
221
|
-
return false unless restart_validator.valid?(@restart)
|
222
|
-
true
|
223
|
-
end
|
224
|
-
|
225
|
-
# Custom attribute writer method checking allowed values (enum).
|
226
|
-
# @param [Object] type Object to be assigned
|
227
|
-
def type=(type)
|
228
|
-
validator = EnumAttributeValidator.new('String', ['Appear', 'CurveUpDown', 'Ascend', 'Blast', 'Blinds', 'Blink', 'BoldFlash', 'BoldReveal', 'Boomerang', 'Bounce', 'Box', 'BrushOnColor', 'BrushOnUnderline', 'CenterRevolve', 'ChangeFillColor', 'ChangeFont', 'ChangeFontColor', 'ChangeFontSize', 'ChangeFontStyle', 'ChangeLineColor', 'Checkerboard', 'Circle', 'ColorBlend', 'ColorTypewriter', 'ColorWave', 'ComplementaryColor', 'ComplementaryColor2', 'Compress', 'ContrastingColor', 'Crawl', 'Credits', 'Custom', 'Darken', 'Desaturate', 'Descend', 'Diamond', 'Dissolve', 'EaseInOut', 'Expand', 'Fade', 'FadedSwivel', 'FadedZoom', 'FlashBulb', 'FlashOnce', 'Flicker', 'Flip', 'Float', 'Fly', 'Fold', 'Glide', 'GrowAndTurn', 'GrowShrink', 'GrowWithColor', 'Lighten', 'LightSpeed', 'MediaPause', 'MediaPlay', 'MediaStop', 'Path4PointStar', 'Path5PointStar', 'Path6PointStar', 'Path8PointStar', 'PathArcDown', 'PathArcLeft', 'PathArcRight', 'PathArcUp', 'PathBean', 'PathBounceLeft', 'PathBounceRight', 'PathBuzzsaw', 'PathCircle', 'PathCrescentMoon', 'PathCurvedSquare', 'PathCurvedX', 'PathCurvyLeft', 'PathCurvyRight', 'PathCurvyStar', 'PathDecayingWave', 'PathDiagonalDownRight', 'PathDiagonalUpRight', 'PathDiamond', 'PathDown', 'PathEqualTriangle', 'PathFigure8Four', 'PathFootball', 'PathFunnel', 'PathHeart', 'PathHeartbeat', 'PathHexagon', 'PathHorizontalFigure8', 'PathInvertedSquare', 'PathInvertedTriangle', 'PathLeft', 'PathLoopdeLoop', 'PathNeutron', 'PathOctagon', 'PathParallelogram', 'PathPeanut', 'PathPentagon', 'PathPlus', 'PathPointyStar', 'PathRight', 'PathRightTriangle', 'PathSCurve1', 'PathSCurve2', 'PathSineWave', 'PathSpiralLeft', 'PathSpiralRight', 'PathSpring', 'PathSquare', 'PathStairsDown', 'PathSwoosh', 'PathTeardrop', 'PathTrapezoid', 'PathTurnDown', 'PathTurnRight', 'PathTurnUp', 'PathTurnUpRight', 'PathUp', 'PathUser', 'PathVerticalFigure8', 'PathWave', 'PathZigzag', 'Peek', 'Pinwheel', 'Plus', 'RandomBars', 'RandomEffects', 'RiseUp', 'Shimmer', 'Sling', 'Spin', 'Spinner', 'Spiral', 'Split', 'Stretch', 'Strips', 'StyleEmphasis', 'Swish', 'Swivel', 'Teeter', 'Thread', 'Transparency', 'Unfold', 'VerticalGrow', 'Wave', 'Wedge', 'Wheel', 'Whip', 'Wipe', 'Magnify', 'Zoom', 'OLEObjectShow', 'OLEObjectEdit', 'OLEObjectOpen'])
|
229
|
-
unless validator.valid?(type)
|
230
|
-
fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
|
231
|
-
end
|
232
|
-
@type = type
|
233
|
-
end
|
234
|
-
|
235
|
-
# Custom attribute writer method checking allowed values (enum).
|
236
|
-
# @param [Object] subtype Object to be assigned
|
237
|
-
def subtype=(subtype)
|
238
|
-
validator = EnumAttributeValidator.new('String', ['None', 'Across', 'Bottom', 'BottomLeft', 'BottomRight', 'Center', 'Clockwise', 'CounterClockwise', 'GradualAndCycleClockwise', 'GradualAndCycleCounterClockwise', 'Down', 'DownLeft', 'DownRight', 'FontAllCaps', 'FontBold', 'FontItalic', 'FontShadow', 'FontStrikethrough', 'FontUnderline', 'Gradual', 'Horizontal', 'HorizontalIn', 'HorizontalOut', 'In', 'InBottom', 'InCenter', 'InSlightly', 'Instant', 'Left', 'OrdinalMask', 'Out', 'OutBottom', 'OutCenter', 'OutSlightly', 'Right', 'Slightly', 'Top', 'TopLeft', 'TopRight', 'Up', 'UpLeft', 'UpRight', 'Vertical', 'VerticalIn', 'VerticalOut', 'Wheel1', 'Wheel2', 'Wheel3', 'Wheel4', 'Wheel8'])
|
239
|
-
unless validator.valid?(subtype)
|
240
|
-
fail ArgumentError, 'invalid value for "subtype", must be one of #{validator.allowable_values}.'
|
241
|
-
end
|
242
|
-
@subtype = subtype
|
243
|
-
end
|
244
|
-
|
245
|
-
# Custom attribute writer method checking allowed values (enum).
|
246
|
-
# @param [Object] preset_class_type Object to be assigned
|
247
|
-
def preset_class_type=(preset_class_type)
|
248
|
-
validator = EnumAttributeValidator.new('String', ['Entrance', 'Exit', 'Emphasis', 'Path', 'MediaCall', 'OLEActionVerbs'])
|
249
|
-
unless validator.valid?(preset_class_type)
|
250
|
-
fail ArgumentError, 'invalid value for "preset_class_type", must be one of #{validator.allowable_values}.'
|
251
|
-
end
|
252
|
-
@preset_class_type = preset_class_type
|
253
|
-
end
|
254
|
-
|
255
|
-
# Custom attribute writer method checking allowed values (enum).
|
256
|
-
# @param [Object] trigger_type Object to be assigned
|
257
|
-
def trigger_type=(trigger_type)
|
258
|
-
validator = EnumAttributeValidator.new('String', ['AfterPrevious', 'OnClick', 'WithPrevious'])
|
259
|
-
unless validator.valid?(trigger_type)
|
260
|
-
fail ArgumentError, 'invalid value for "trigger_type", must be one of #{validator.allowable_values}.'
|
261
|
-
end
|
262
|
-
@trigger_type = trigger_type
|
263
|
-
end
|
264
|
-
|
265
|
-
# Custom attribute writer method checking allowed values (enum).
|
266
|
-
# @param [Object] restart Object to be assigned
|
267
|
-
def restart=(restart)
|
268
|
-
validator = EnumAttributeValidator.new('String', ['Always', 'WhenNotActive', 'Never', 'NotDefined'])
|
269
|
-
unless validator.valid?(restart)
|
270
|
-
fail ArgumentError, 'invalid value for "restart", must be one of #{validator.allowable_values}.'
|
271
|
-
end
|
272
|
-
@restart = restart
|
273
|
-
end
|
274
|
-
|
275
|
-
# Checks equality by comparing each attribute.
|
276
|
-
# @param [Object] Object to be compared
|
277
|
-
def ==(o)
|
278
|
-
return true if self.equal?(o)
|
279
|
-
self.class == o.class &&
|
280
|
-
type == o.type &&
|
281
|
-
subtype == o.subtype &&
|
282
|
-
preset_class_type == o.preset_class_type &&
|
283
|
-
shape_index == o.shape_index &&
|
284
|
-
trigger_type == o.trigger_type &&
|
285
|
-
accelerate == o.accelerate &&
|
286
|
-
auto_reverse == o.auto_reverse &&
|
287
|
-
decelerate == o.decelerate &&
|
288
|
-
duration == o.duration &&
|
289
|
-
repeat_count == o.repeat_count &&
|
290
|
-
repeat_duration == o.repeat_duration &&
|
291
|
-
restart == o.restart &&
|
292
|
-
speed == o.speed &&
|
293
|
-
trigger_delay_time == o.trigger_delay_time
|
294
|
-
end
|
295
|
-
|
296
|
-
# @see the `==` method
|
297
|
-
# @param [Object] Object to be compared
|
298
|
-
def eql?(o)
|
299
|
-
self == o
|
300
|
-
end
|
301
|
-
|
302
|
-
# Calculates hash code according to all attributes.
|
303
|
-
# @return [Fixnum] Hash code
|
304
|
-
def hash
|
305
|
-
[type, subtype, preset_class_type, shape_index, trigger_type, accelerate, auto_reverse, decelerate, duration, repeat_count, repeat_duration, restart, speed, trigger_delay_time].hash
|
306
|
-
end
|
307
|
-
|
308
|
-
# Builds the object from hash
|
309
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
310
|
-
# @return [Object] Returns the model itself
|
311
|
-
def build_from_hash(attributes)
|
312
|
-
return nil unless attributes.is_a?(Hash)
|
313
|
-
self.class.swagger_types.each_pair do |key, type|
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
if
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
when :
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
value.
|
356
|
-
when
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
end
|
381
|
-
|
382
|
-
# Returns the
|
383
|
-
# @return [
|
384
|
-
def
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
end
|
393
|
-
|
394
|
-
#
|
395
|
-
#
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
value.
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
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
|
+
# Represents comment of slide
|
27
|
+
class Effect
|
28
|
+
# Effect type.
|
29
|
+
attr_accessor :type
|
30
|
+
|
31
|
+
# Effect subtype.
|
32
|
+
attr_accessor :subtype
|
33
|
+
|
34
|
+
# Preset class type.
|
35
|
+
attr_accessor :preset_class_type
|
36
|
+
|
37
|
+
# Shape index.
|
38
|
+
attr_accessor :shape_index
|
39
|
+
|
40
|
+
# Effect trigger type.
|
41
|
+
attr_accessor :trigger_type
|
42
|
+
|
43
|
+
# The percentage of duration accelerate behavior effect.
|
44
|
+
attr_accessor :accelerate
|
45
|
+
|
46
|
+
# True to automatically play the animation in reverse after playing it in the forward direction.
|
47
|
+
attr_accessor :auto_reverse
|
48
|
+
|
49
|
+
# The percentage of duration decelerate behavior effect.
|
50
|
+
attr_accessor :decelerate
|
51
|
+
|
52
|
+
# The duration of animation effect.
|
53
|
+
attr_accessor :duration
|
54
|
+
|
55
|
+
# The number of times the effect should repeat.
|
56
|
+
attr_accessor :repeat_count
|
57
|
+
|
58
|
+
# The number of times the effect should repeat.
|
59
|
+
attr_accessor :repeat_duration
|
60
|
+
|
61
|
+
# The way for a effect to restart after complete.
|
62
|
+
attr_accessor :restart
|
63
|
+
|
64
|
+
# The percentage by which to speed up (or slow down) the timing.
|
65
|
+
attr_accessor :speed
|
66
|
+
|
67
|
+
# Delay time after trigger.
|
68
|
+
attr_accessor :trigger_delay_time
|
69
|
+
|
70
|
+
class EnumAttributeValidator
|
71
|
+
attr_reader :datatype
|
72
|
+
attr_reader :allowable_values
|
73
|
+
|
74
|
+
def initialize(datatype, allowable_values)
|
75
|
+
@allowable_values = allowable_values.map do |value|
|
76
|
+
case datatype.to_s
|
77
|
+
when /Integer/i
|
78
|
+
value.to_i
|
79
|
+
when /Float/i
|
80
|
+
value.to_f
|
81
|
+
else
|
82
|
+
value
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
def valid?(value)
|
88
|
+
!value || allowable_values.any?{ |s| s.casecmp(value) == 0 }
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
93
|
+
def self.attribute_map
|
94
|
+
{
|
95
|
+
:'type' => :'Type',
|
96
|
+
:'subtype' => :'Subtype',
|
97
|
+
:'preset_class_type' => :'PresetClassType',
|
98
|
+
:'shape_index' => :'ShapeIndex',
|
99
|
+
:'trigger_type' => :'TriggerType',
|
100
|
+
:'accelerate' => :'Accelerate',
|
101
|
+
:'auto_reverse' => :'AutoReverse',
|
102
|
+
:'decelerate' => :'Decelerate',
|
103
|
+
:'duration' => :'Duration',
|
104
|
+
:'repeat_count' => :'RepeatCount',
|
105
|
+
:'repeat_duration' => :'RepeatDuration',
|
106
|
+
:'restart' => :'Restart',
|
107
|
+
:'speed' => :'Speed',
|
108
|
+
:'trigger_delay_time' => :'TriggerDelayTime',
|
109
|
+
}
|
110
|
+
end
|
111
|
+
|
112
|
+
# Attribute type mapping.
|
113
|
+
def self.swagger_types
|
114
|
+
{
|
115
|
+
:'type' => :'String',
|
116
|
+
:'subtype' => :'String',
|
117
|
+
:'preset_class_type' => :'String',
|
118
|
+
:'shape_index' => :'Integer',
|
119
|
+
:'trigger_type' => :'String',
|
120
|
+
:'accelerate' => :'Float',
|
121
|
+
:'auto_reverse' => :'BOOLEAN',
|
122
|
+
:'decelerate' => :'Float',
|
123
|
+
:'duration' => :'Float',
|
124
|
+
:'repeat_count' => :'Float',
|
125
|
+
:'repeat_duration' => :'Float',
|
126
|
+
:'restart' => :'String',
|
127
|
+
:'speed' => :'Float',
|
128
|
+
:'trigger_delay_time' => :'Float',
|
129
|
+
}
|
130
|
+
end
|
131
|
+
|
132
|
+
# Initializes the object
|
133
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
134
|
+
def initialize(attributes = {})
|
135
|
+
return unless attributes.is_a?(Hash)
|
136
|
+
|
137
|
+
# convert string to symbol for hash key
|
138
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
139
|
+
|
140
|
+
if attributes.has_key?(:'Type')
|
141
|
+
self.type = attributes[:'Type']
|
142
|
+
end
|
143
|
+
|
144
|
+
if attributes.has_key?(:'Subtype')
|
145
|
+
self.subtype = attributes[:'Subtype']
|
146
|
+
end
|
147
|
+
|
148
|
+
if attributes.has_key?(:'PresetClassType')
|
149
|
+
self.preset_class_type = attributes[:'PresetClassType']
|
150
|
+
end
|
151
|
+
|
152
|
+
if attributes.has_key?(:'ShapeIndex')
|
153
|
+
self.shape_index = attributes[:'ShapeIndex']
|
154
|
+
end
|
155
|
+
|
156
|
+
if attributes.has_key?(:'TriggerType')
|
157
|
+
self.trigger_type = attributes[:'TriggerType']
|
158
|
+
end
|
159
|
+
|
160
|
+
if attributes.has_key?(:'Accelerate')
|
161
|
+
self.accelerate = attributes[:'Accelerate']
|
162
|
+
end
|
163
|
+
|
164
|
+
if attributes.has_key?(:'AutoReverse')
|
165
|
+
self.auto_reverse = attributes[:'AutoReverse']
|
166
|
+
end
|
167
|
+
|
168
|
+
if attributes.has_key?(:'Decelerate')
|
169
|
+
self.decelerate = attributes[:'Decelerate']
|
170
|
+
end
|
171
|
+
|
172
|
+
if attributes.has_key?(:'Duration')
|
173
|
+
self.duration = attributes[:'Duration']
|
174
|
+
end
|
175
|
+
|
176
|
+
if attributes.has_key?(:'RepeatCount')
|
177
|
+
self.repeat_count = attributes[:'RepeatCount']
|
178
|
+
end
|
179
|
+
|
180
|
+
if attributes.has_key?(:'RepeatDuration')
|
181
|
+
self.repeat_duration = attributes[:'RepeatDuration']
|
182
|
+
end
|
183
|
+
|
184
|
+
if attributes.has_key?(:'Restart')
|
185
|
+
self.restart = attributes[:'Restart']
|
186
|
+
end
|
187
|
+
|
188
|
+
if attributes.has_key?(:'Speed')
|
189
|
+
self.speed = attributes[:'Speed']
|
190
|
+
end
|
191
|
+
|
192
|
+
if attributes.has_key?(:'TriggerDelayTime')
|
193
|
+
self.trigger_delay_time = attributes[:'TriggerDelayTime']
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
197
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
198
|
+
# @return Array for valid properties with the reasons
|
199
|
+
def list_invalid_properties
|
200
|
+
invalid_properties = Array.new
|
201
|
+
if @shape_index.nil?
|
202
|
+
invalid_properties.push('invalid value for "shape_index", shape_index cannot be nil.')
|
203
|
+
end
|
204
|
+
|
205
|
+
invalid_properties
|
206
|
+
end
|
207
|
+
|
208
|
+
# Check to see if the all the properties in the model are valid
|
209
|
+
# @return true if the model is valid
|
210
|
+
def valid?
|
211
|
+
type_validator = EnumAttributeValidator.new('String', ['Appear', 'CurveUpDown', 'Ascend', 'Blast', 'Blinds', 'Blink', 'BoldFlash', 'BoldReveal', 'Boomerang', 'Bounce', 'Box', 'BrushOnColor', 'BrushOnUnderline', 'CenterRevolve', 'ChangeFillColor', 'ChangeFont', 'ChangeFontColor', 'ChangeFontSize', 'ChangeFontStyle', 'ChangeLineColor', 'Checkerboard', 'Circle', 'ColorBlend', 'ColorTypewriter', 'ColorWave', 'ComplementaryColor', 'ComplementaryColor2', 'Compress', 'ContrastingColor', 'Crawl', 'Credits', 'Custom', 'Darken', 'Desaturate', 'Descend', 'Diamond', 'Dissolve', 'EaseInOut', 'Expand', 'Fade', 'FadedSwivel', 'FadedZoom', 'FlashBulb', 'FlashOnce', 'Flicker', 'Flip', 'Float', 'Fly', 'Fold', 'Glide', 'GrowAndTurn', 'GrowShrink', 'GrowWithColor', 'Lighten', 'LightSpeed', 'MediaPause', 'MediaPlay', 'MediaStop', 'Path4PointStar', 'Path5PointStar', 'Path6PointStar', 'Path8PointStar', 'PathArcDown', 'PathArcLeft', 'PathArcRight', 'PathArcUp', 'PathBean', 'PathBounceLeft', 'PathBounceRight', 'PathBuzzsaw', 'PathCircle', 'PathCrescentMoon', 'PathCurvedSquare', 'PathCurvedX', 'PathCurvyLeft', 'PathCurvyRight', 'PathCurvyStar', 'PathDecayingWave', 'PathDiagonalDownRight', 'PathDiagonalUpRight', 'PathDiamond', 'PathDown', 'PathEqualTriangle', 'PathFigure8Four', 'PathFootball', 'PathFunnel', 'PathHeart', 'PathHeartbeat', 'PathHexagon', 'PathHorizontalFigure8', 'PathInvertedSquare', 'PathInvertedTriangle', 'PathLeft', 'PathLoopdeLoop', 'PathNeutron', 'PathOctagon', 'PathParallelogram', 'PathPeanut', 'PathPentagon', 'PathPlus', 'PathPointyStar', 'PathRight', 'PathRightTriangle', 'PathSCurve1', 'PathSCurve2', 'PathSineWave', 'PathSpiralLeft', 'PathSpiralRight', 'PathSpring', 'PathSquare', 'PathStairsDown', 'PathSwoosh', 'PathTeardrop', 'PathTrapezoid', 'PathTurnDown', 'PathTurnRight', 'PathTurnUp', 'PathTurnUpRight', 'PathUp', 'PathUser', 'PathVerticalFigure8', 'PathWave', 'PathZigzag', 'Peek', 'Pinwheel', 'Plus', 'RandomBars', 'RandomEffects', 'RiseUp', 'Shimmer', 'Sling', 'Spin', 'Spinner', 'Spiral', 'Split', 'Stretch', 'Strips', 'StyleEmphasis', 'Swish', 'Swivel', 'Teeter', 'Thread', 'Transparency', 'Unfold', 'VerticalGrow', 'Wave', 'Wedge', 'Wheel', 'Whip', 'Wipe', 'Magnify', 'Zoom', 'OLEObjectShow', 'OLEObjectEdit', 'OLEObjectOpen'])
|
212
|
+
return false unless type_validator.valid?(@type)
|
213
|
+
subtype_validator = EnumAttributeValidator.new('String', ['None', 'Across', 'Bottom', 'BottomLeft', 'BottomRight', 'Center', 'Clockwise', 'CounterClockwise', 'GradualAndCycleClockwise', 'GradualAndCycleCounterClockwise', 'Down', 'DownLeft', 'DownRight', 'FontAllCaps', 'FontBold', 'FontItalic', 'FontShadow', 'FontStrikethrough', 'FontUnderline', 'Gradual', 'Horizontal', 'HorizontalIn', 'HorizontalOut', 'In', 'InBottom', 'InCenter', 'InSlightly', 'Instant', 'Left', 'OrdinalMask', 'Out', 'OutBottom', 'OutCenter', 'OutSlightly', 'Right', 'Slightly', 'Top', 'TopLeft', 'TopRight', 'Up', 'UpLeft', 'UpRight', 'Vertical', 'VerticalIn', 'VerticalOut', 'Wheel1', 'Wheel2', 'Wheel3', 'Wheel4', 'Wheel8'])
|
214
|
+
return false unless subtype_validator.valid?(@subtype)
|
215
|
+
preset_class_type_validator = EnumAttributeValidator.new('String', ['Entrance', 'Exit', 'Emphasis', 'Path', 'MediaCall', 'OLEActionVerbs'])
|
216
|
+
return false unless preset_class_type_validator.valid?(@preset_class_type)
|
217
|
+
return false if @shape_index.nil?
|
218
|
+
trigger_type_validator = EnumAttributeValidator.new('String', ['AfterPrevious', 'OnClick', 'WithPrevious'])
|
219
|
+
return false unless trigger_type_validator.valid?(@trigger_type)
|
220
|
+
restart_validator = EnumAttributeValidator.new('String', ['Always', 'WhenNotActive', 'Never', 'NotDefined'])
|
221
|
+
return false unless restart_validator.valid?(@restart)
|
222
|
+
true
|
223
|
+
end
|
224
|
+
|
225
|
+
# Custom attribute writer method checking allowed values (enum).
|
226
|
+
# @param [Object] type Object to be assigned
|
227
|
+
def type=(type)
|
228
|
+
validator = EnumAttributeValidator.new('String', ['Appear', 'CurveUpDown', 'Ascend', 'Blast', 'Blinds', 'Blink', 'BoldFlash', 'BoldReveal', 'Boomerang', 'Bounce', 'Box', 'BrushOnColor', 'BrushOnUnderline', 'CenterRevolve', 'ChangeFillColor', 'ChangeFont', 'ChangeFontColor', 'ChangeFontSize', 'ChangeFontStyle', 'ChangeLineColor', 'Checkerboard', 'Circle', 'ColorBlend', 'ColorTypewriter', 'ColorWave', 'ComplementaryColor', 'ComplementaryColor2', 'Compress', 'ContrastingColor', 'Crawl', 'Credits', 'Custom', 'Darken', 'Desaturate', 'Descend', 'Diamond', 'Dissolve', 'EaseInOut', 'Expand', 'Fade', 'FadedSwivel', 'FadedZoom', 'FlashBulb', 'FlashOnce', 'Flicker', 'Flip', 'Float', 'Fly', 'Fold', 'Glide', 'GrowAndTurn', 'GrowShrink', 'GrowWithColor', 'Lighten', 'LightSpeed', 'MediaPause', 'MediaPlay', 'MediaStop', 'Path4PointStar', 'Path5PointStar', 'Path6PointStar', 'Path8PointStar', 'PathArcDown', 'PathArcLeft', 'PathArcRight', 'PathArcUp', 'PathBean', 'PathBounceLeft', 'PathBounceRight', 'PathBuzzsaw', 'PathCircle', 'PathCrescentMoon', 'PathCurvedSquare', 'PathCurvedX', 'PathCurvyLeft', 'PathCurvyRight', 'PathCurvyStar', 'PathDecayingWave', 'PathDiagonalDownRight', 'PathDiagonalUpRight', 'PathDiamond', 'PathDown', 'PathEqualTriangle', 'PathFigure8Four', 'PathFootball', 'PathFunnel', 'PathHeart', 'PathHeartbeat', 'PathHexagon', 'PathHorizontalFigure8', 'PathInvertedSquare', 'PathInvertedTriangle', 'PathLeft', 'PathLoopdeLoop', 'PathNeutron', 'PathOctagon', 'PathParallelogram', 'PathPeanut', 'PathPentagon', 'PathPlus', 'PathPointyStar', 'PathRight', 'PathRightTriangle', 'PathSCurve1', 'PathSCurve2', 'PathSineWave', 'PathSpiralLeft', 'PathSpiralRight', 'PathSpring', 'PathSquare', 'PathStairsDown', 'PathSwoosh', 'PathTeardrop', 'PathTrapezoid', 'PathTurnDown', 'PathTurnRight', 'PathTurnUp', 'PathTurnUpRight', 'PathUp', 'PathUser', 'PathVerticalFigure8', 'PathWave', 'PathZigzag', 'Peek', 'Pinwheel', 'Plus', 'RandomBars', 'RandomEffects', 'RiseUp', 'Shimmer', 'Sling', 'Spin', 'Spinner', 'Spiral', 'Split', 'Stretch', 'Strips', 'StyleEmphasis', 'Swish', 'Swivel', 'Teeter', 'Thread', 'Transparency', 'Unfold', 'VerticalGrow', 'Wave', 'Wedge', 'Wheel', 'Whip', 'Wipe', 'Magnify', 'Zoom', 'OLEObjectShow', 'OLEObjectEdit', 'OLEObjectOpen'])
|
229
|
+
unless validator.valid?(type)
|
230
|
+
fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
|
231
|
+
end
|
232
|
+
@type = type
|
233
|
+
end
|
234
|
+
|
235
|
+
# Custom attribute writer method checking allowed values (enum).
|
236
|
+
# @param [Object] subtype Object to be assigned
|
237
|
+
def subtype=(subtype)
|
238
|
+
validator = EnumAttributeValidator.new('String', ['None', 'Across', 'Bottom', 'BottomLeft', 'BottomRight', 'Center', 'Clockwise', 'CounterClockwise', 'GradualAndCycleClockwise', 'GradualAndCycleCounterClockwise', 'Down', 'DownLeft', 'DownRight', 'FontAllCaps', 'FontBold', 'FontItalic', 'FontShadow', 'FontStrikethrough', 'FontUnderline', 'Gradual', 'Horizontal', 'HorizontalIn', 'HorizontalOut', 'In', 'InBottom', 'InCenter', 'InSlightly', 'Instant', 'Left', 'OrdinalMask', 'Out', 'OutBottom', 'OutCenter', 'OutSlightly', 'Right', 'Slightly', 'Top', 'TopLeft', 'TopRight', 'Up', 'UpLeft', 'UpRight', 'Vertical', 'VerticalIn', 'VerticalOut', 'Wheel1', 'Wheel2', 'Wheel3', 'Wheel4', 'Wheel8'])
|
239
|
+
unless validator.valid?(subtype)
|
240
|
+
fail ArgumentError, 'invalid value for "subtype", must be one of #{validator.allowable_values}.'
|
241
|
+
end
|
242
|
+
@subtype = subtype
|
243
|
+
end
|
244
|
+
|
245
|
+
# Custom attribute writer method checking allowed values (enum).
|
246
|
+
# @param [Object] preset_class_type Object to be assigned
|
247
|
+
def preset_class_type=(preset_class_type)
|
248
|
+
validator = EnumAttributeValidator.new('String', ['Entrance', 'Exit', 'Emphasis', 'Path', 'MediaCall', 'OLEActionVerbs'])
|
249
|
+
unless validator.valid?(preset_class_type)
|
250
|
+
fail ArgumentError, 'invalid value for "preset_class_type", must be one of #{validator.allowable_values}.'
|
251
|
+
end
|
252
|
+
@preset_class_type = preset_class_type
|
253
|
+
end
|
254
|
+
|
255
|
+
# Custom attribute writer method checking allowed values (enum).
|
256
|
+
# @param [Object] trigger_type Object to be assigned
|
257
|
+
def trigger_type=(trigger_type)
|
258
|
+
validator = EnumAttributeValidator.new('String', ['AfterPrevious', 'OnClick', 'WithPrevious'])
|
259
|
+
unless validator.valid?(trigger_type)
|
260
|
+
fail ArgumentError, 'invalid value for "trigger_type", must be one of #{validator.allowable_values}.'
|
261
|
+
end
|
262
|
+
@trigger_type = trigger_type
|
263
|
+
end
|
264
|
+
|
265
|
+
# Custom attribute writer method checking allowed values (enum).
|
266
|
+
# @param [Object] restart Object to be assigned
|
267
|
+
def restart=(restart)
|
268
|
+
validator = EnumAttributeValidator.new('String', ['Always', 'WhenNotActive', 'Never', 'NotDefined'])
|
269
|
+
unless validator.valid?(restart)
|
270
|
+
fail ArgumentError, 'invalid value for "restart", must be one of #{validator.allowable_values}.'
|
271
|
+
end
|
272
|
+
@restart = restart
|
273
|
+
end
|
274
|
+
|
275
|
+
# Checks equality by comparing each attribute.
|
276
|
+
# @param [Object] Object to be compared
|
277
|
+
def ==(o)
|
278
|
+
return true if self.equal?(o)
|
279
|
+
self.class == o.class &&
|
280
|
+
type == o.type &&
|
281
|
+
subtype == o.subtype &&
|
282
|
+
preset_class_type == o.preset_class_type &&
|
283
|
+
shape_index == o.shape_index &&
|
284
|
+
trigger_type == o.trigger_type &&
|
285
|
+
accelerate == o.accelerate &&
|
286
|
+
auto_reverse == o.auto_reverse &&
|
287
|
+
decelerate == o.decelerate &&
|
288
|
+
duration == o.duration &&
|
289
|
+
repeat_count == o.repeat_count &&
|
290
|
+
repeat_duration == o.repeat_duration &&
|
291
|
+
restart == o.restart &&
|
292
|
+
speed == o.speed &&
|
293
|
+
trigger_delay_time == o.trigger_delay_time
|
294
|
+
end
|
295
|
+
|
296
|
+
# @see the `==` method
|
297
|
+
# @param [Object] Object to be compared
|
298
|
+
def eql?(o)
|
299
|
+
self == o
|
300
|
+
end
|
301
|
+
|
302
|
+
# Calculates hash code according to all attributes.
|
303
|
+
# @return [Fixnum] Hash code
|
304
|
+
def hash
|
305
|
+
[type, subtype, preset_class_type, shape_index, trigger_type, accelerate, auto_reverse, decelerate, duration, repeat_count, repeat_duration, restart, speed, trigger_delay_time].hash
|
306
|
+
end
|
307
|
+
|
308
|
+
# Builds the object from hash
|
309
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
310
|
+
# @return [Object] Returns the model itself
|
311
|
+
def build_from_hash(attributes)
|
312
|
+
return nil unless attributes.is_a?(Hash)
|
313
|
+
self.class.swagger_types.each_pair do |key, type|
|
314
|
+
mapKey = self.class.attribute_map[key]
|
315
|
+
if !mapKey.nil?
|
316
|
+
val = attributes[mapKey]
|
317
|
+
if val.nil?
|
318
|
+
mapKeyString = mapKey.to_s
|
319
|
+
mapKeyString[0] = mapKeyString[0].downcase
|
320
|
+
mapKey = mapKeyString.to_sym
|
321
|
+
val = attributes[mapKey]
|
322
|
+
end
|
323
|
+
if !val.nil?
|
324
|
+
if type =~ /\AArray<(.*)>/i
|
325
|
+
# check to ensure the input is an array given that the the attribute
|
326
|
+
# is documented as an array but the input is not
|
327
|
+
if val.is_a?(Array)
|
328
|
+
self.send("#{key}=", val.map { |v| _deserialize($1, v) })
|
329
|
+
end
|
330
|
+
else
|
331
|
+
self.send("#{key}=", _deserialize(type, val))
|
332
|
+
end
|
333
|
+
end
|
334
|
+
end
|
335
|
+
end
|
336
|
+
|
337
|
+
self
|
338
|
+
end
|
339
|
+
|
340
|
+
# Deserializes the data based on type
|
341
|
+
# @param string type Data type
|
342
|
+
# @param string value Value to be deserialized
|
343
|
+
# @return [Object] Deserialized data
|
344
|
+
def _deserialize(type, value)
|
345
|
+
case type.to_sym
|
346
|
+
when :DateTime
|
347
|
+
DateTime.parse(value)
|
348
|
+
when :Date
|
349
|
+
Date.parse(value)
|
350
|
+
when :String
|
351
|
+
value.to_s
|
352
|
+
when :Integer
|
353
|
+
value.to_i
|
354
|
+
when :Float
|
355
|
+
value.to_f
|
356
|
+
when :BOOLEAN
|
357
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
358
|
+
true
|
359
|
+
else
|
360
|
+
false
|
361
|
+
end
|
362
|
+
when :Object
|
363
|
+
# generic object (usually a Hash), return directly
|
364
|
+
value
|
365
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
366
|
+
inner_type = Regexp.last_match[:inner_type]
|
367
|
+
value.map { |v| _deserialize(inner_type, v) }
|
368
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
369
|
+
k_type = Regexp.last_match[:k_type]
|
370
|
+
v_type = Regexp.last_match[:v_type]
|
371
|
+
{}.tap do |hash|
|
372
|
+
value.each do |k, v|
|
373
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
374
|
+
end
|
375
|
+
end
|
376
|
+
else # model
|
377
|
+
temp_model = AsposeSlidesCloud.const_get(type).new
|
378
|
+
temp_model.build_from_hash(value)
|
379
|
+
end
|
380
|
+
end
|
381
|
+
|
382
|
+
# Returns the string representation of the object
|
383
|
+
# @return [String] String presentation of the object
|
384
|
+
def to_s
|
385
|
+
to_hash.to_s
|
386
|
+
end
|
387
|
+
|
388
|
+
# to_body is an alias to to_hash (backward compatibility)
|
389
|
+
# @return [Hash] Returns the object in the form of hash
|
390
|
+
def to_body
|
391
|
+
to_hash
|
392
|
+
end
|
393
|
+
|
394
|
+
# Returns the object in the form of hash
|
395
|
+
# @return [Hash] Returns the object in the form of hash
|
396
|
+
def to_hash
|
397
|
+
hash = {}
|
398
|
+
self.class.attribute_map.each_pair do |attr, param|
|
399
|
+
value = self.send(attr)
|
400
|
+
next if value.nil?
|
401
|
+
hash[param] = _to_hash(value)
|
402
|
+
end
|
403
|
+
hash
|
404
|
+
end
|
405
|
+
|
406
|
+
# Outputs non-array value in the form of hash
|
407
|
+
# For object, use to_hash. Otherwise, just return the value
|
408
|
+
# @param [Object] value Any valid value
|
409
|
+
# @return [Hash] Returns the value in the form of hash
|
410
|
+
def _to_hash(value)
|
411
|
+
if value.is_a?(Array)
|
412
|
+
value.compact.map { |v| _to_hash(v) }
|
413
|
+
elsif value.is_a?(Hash)
|
414
|
+
{}.tap do |hash|
|
415
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
416
|
+
end
|
417
|
+
elsif value.respond_to? :to_hash
|
418
|
+
value.to_hash
|
419
|
+
else
|
420
|
+
value
|
421
|
+
end
|
422
|
+
end
|
423
|
+
end
|
424
|
+
end
|