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.
Files changed (177) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +61 -61
  3. data/TestData/ChartTest.pptx +0 -0
  4. data/TestData/Sections.pptx +0 -0
  5. data/TestData/TemplatingCVDataWithBase64.xml +22 -22
  6. data/lib/aspose_slides_cloud.rb +212 -205
  7. data/lib/aspose_slides_cloud/api/slides_api.rb +10979 -7974
  8. data/lib/aspose_slides_cloud/api/slides_api_requests.rb +4146 -3099
  9. data/lib/aspose_slides_cloud/api_client.rb +432 -429
  10. data/lib/aspose_slides_cloud/models/add_layout_slide.rb +244 -261
  11. data/lib/aspose_slides_cloud/models/add_master_slide.rb +259 -276
  12. data/lib/aspose_slides_cloud/models/add_shape.rb +239 -256
  13. data/lib/aspose_slides_cloud/models/add_slide.rb +269 -286
  14. data/lib/aspose_slides_cloud/models/api_info.rb +217 -205
  15. data/lib/aspose_slides_cloud/models/arrow_head_properties.rb +285 -273
  16. data/lib/aspose_slides_cloud/models/audio_frame.rb +359 -573
  17. data/lib/aspose_slides_cloud/models/axes.rb +237 -225
  18. data/lib/aspose_slides_cloud/models/axis.rb +699 -687
  19. data/lib/aspose_slides_cloud/models/base64_input_file.rb +230 -256
  20. data/lib/aspose_slides_cloud/models/blur_effect.rb +227 -215
  21. data/lib/aspose_slides_cloud/models/box_and_whisker_series.rb +299 -0
  22. data/lib/aspose_slides_cloud/models/bubble_chart_data_point.rb +212 -230
  23. data/lib/aspose_slides_cloud/models/bubble_series.rb +248 -428
  24. data/lib/aspose_slides_cloud/models/chart.rb +365 -553
  25. data/lib/aspose_slides_cloud/models/chart_category.rb +271 -0
  26. data/lib/aspose_slides_cloud/models/chart_title.rb +222 -210
  27. data/lib/aspose_slides_cloud/models/chart_wall.rb +281 -269
  28. data/lib/aspose_slides_cloud/models/color_scheme.rb +317 -327
  29. data/lib/aspose_slides_cloud/models/common_slide_view_properties.rb +217 -0
  30. data/lib/aspose_slides_cloud/models/connector.rb +275 -487
  31. data/lib/aspose_slides_cloud/models/custom_dash_pattern.rb +209 -197
  32. data/lib/aspose_slides_cloud/models/{resource_uri_element.rb → data_point.rb} +197 -195
  33. data/lib/aspose_slides_cloud/models/disc_usage.rb +227 -215
  34. data/lib/aspose_slides_cloud/models/document.rb +257 -267
  35. data/lib/aspose_slides_cloud/models/document_properties.rb +209 -219
  36. data/lib/aspose_slides_cloud/models/document_property.rb +232 -242
  37. data/lib/aspose_slides_cloud/models/document_replace_result.rb +218 -282
  38. data/lib/aspose_slides_cloud/models/effect.rb +424 -412
  39. data/lib/aspose_slides_cloud/models/effect_format.rb +277 -265
  40. data/lib/aspose_slides_cloud/models/entity_exists.rb +212 -0
  41. data/lib/aspose_slides_cloud/models/error.rb +237 -225
  42. data/lib/aspose_slides_cloud/models/error_details.rb +222 -210
  43. data/lib/aspose_slides_cloud/models/export_format.rb +60 -59
  44. data/lib/aspose_slides_cloud/models/export_options.rb +216 -194
  45. data/lib/aspose_slides_cloud/models/file_version.rb +225 -270
  46. data/lib/aspose_slides_cloud/models/file_versions.rb +209 -197
  47. data/lib/aspose_slides_cloud/models/files_list.rb +209 -197
  48. data/lib/aspose_slides_cloud/models/files_upload_result.rb +221 -209
  49. data/lib/aspose_slides_cloud/models/fill_format.rb +240 -228
  50. data/lib/aspose_slides_cloud/models/fill_overlay_effect.rb +246 -234
  51. data/lib/aspose_slides_cloud/models/font_scheme.rb +227 -237
  52. data/lib/aspose_slides_cloud/models/font_set.rb +227 -215
  53. data/lib/aspose_slides_cloud/models/format_scheme.rb +245 -255
  54. data/lib/aspose_slides_cloud/models/geometry_shape.rb +260 -439
  55. data/lib/aspose_slides_cloud/models/glow_effect.rb +222 -210
  56. data/lib/aspose_slides_cloud/models/gradient_fill.rb +342 -359
  57. data/lib/aspose_slides_cloud/models/gradient_fill_stop.rb +222 -210
  58. data/lib/aspose_slides_cloud/models/graphical_object.rb +234 -422
  59. data/lib/aspose_slides_cloud/models/group_shape.rb +234 -422
  60. data/lib/aspose_slides_cloud/models/header_footer.rb +247 -0
  61. data/lib/aspose_slides_cloud/models/html_export_options.rb +421 -420
  62. data/lib/aspose_slides_cloud/models/i_shape_export_options.rb +197 -195
  63. data/lib/aspose_slides_cloud/models/image.rb +237 -247
  64. data/lib/aspose_slides_cloud/models/image_export_format.rb +43 -43
  65. data/lib/aspose_slides_cloud/models/image_export_options.rb +299 -298
  66. data/lib/aspose_slides_cloud/models/images.rb +209 -219
  67. data/lib/aspose_slides_cloud/models/inner_shadow_effect.rb +252 -240
  68. data/lib/aspose_slides_cloud/models/input.rb +227 -215
  69. data/lib/aspose_slides_cloud/models/input_file.rb +250 -238
  70. data/lib/aspose_slides_cloud/models/interactive_sequence.rb +224 -212
  71. data/lib/aspose_slides_cloud/models/layout_slide.rb +278 -288
  72. data/lib/aspose_slides_cloud/models/layout_slides.rb +209 -219
  73. data/lib/aspose_slides_cloud/models/legend.rb +321 -309
  74. data/lib/aspose_slides_cloud/models/line_format.rb +389 -377
  75. data/lib/aspose_slides_cloud/models/master_slide.rb +231 -241
  76. data/lib/aspose_slides_cloud/models/master_slides.rb +209 -219
  77. data/lib/aspose_slides_cloud/models/merge.rb +231 -248
  78. data/lib/aspose_slides_cloud/models/merging_source.rb +219 -207
  79. data/lib/aspose_slides_cloud/models/no_fill.rb +219 -236
  80. data/lib/aspose_slides_cloud/models/normal_view_restored_properties.rb +217 -0
  81. data/lib/aspose_slides_cloud/models/notes_slide.rb +217 -227
  82. data/lib/aspose_slides_cloud/models/notes_slide_export_format.rb +43 -43
  83. data/lib/aspose_slides_cloud/models/notes_slide_header_footer.rb +267 -0
  84. data/lib/aspose_slides_cloud/models/object_exist.rb +227 -215
  85. data/lib/aspose_slides_cloud/models/ole_object_frame.rb +259 -447
  86. data/lib/aspose_slides_cloud/models/one_value_chart_data_point.rb +210 -200
  87. data/lib/aspose_slides_cloud/models/one_value_series.rb +248 -428
  88. data/lib/aspose_slides_cloud/models/ordered_merge_request.rb +209 -197
  89. data/lib/aspose_slides_cloud/models/outer_shadow_effect.rb +252 -240
  90. data/lib/aspose_slides_cloud/models/output_file.rb +240 -228
  91. data/lib/aspose_slides_cloud/models/paragraph.rb +517 -527
  92. data/lib/aspose_slides_cloud/models/paragraphs.rb +209 -219
  93. data/lib/aspose_slides_cloud/models/path_input_file.rb +240 -266
  94. data/lib/aspose_slides_cloud/models/path_output_file.rb +239 -256
  95. data/lib/aspose_slides_cloud/models/pattern_fill.rb +266 -283
  96. data/lib/aspose_slides_cloud/models/pdf_export_options.rb +547 -519
  97. data/lib/aspose_slides_cloud/models/picture_fill.rb +351 -368
  98. data/lib/aspose_slides_cloud/models/picture_frame.rb +245 -459
  99. data/lib/aspose_slides_cloud/models/pipeline.rb +219 -207
  100. data/lib/aspose_slides_cloud/models/placeholder.rb +325 -335
  101. data/lib/aspose_slides_cloud/models/placeholders.rb +209 -219
  102. data/lib/aspose_slides_cloud/models/plot_area.rb +311 -299
  103. data/lib/aspose_slides_cloud/models/portion.rb +589 -599
  104. data/lib/aspose_slides_cloud/models/portions.rb +209 -219
  105. data/lib/aspose_slides_cloud/models/pptx_export_options.rb +247 -246
  106. data/lib/aspose_slides_cloud/models/presentation_to_merge.rb +229 -217
  107. data/lib/aspose_slides_cloud/models/presentations_merge_request.rb +221 -209
  108. data/lib/aspose_slides_cloud/models/preset_shadow_effect.rb +286 -274
  109. data/lib/aspose_slides_cloud/models/reflection_effect.rb +441 -429
  110. data/lib/aspose_slides_cloud/models/remove_shape.rb +229 -246
  111. data/lib/aspose_slides_cloud/models/remove_slide.rb +234 -251
  112. data/lib/aspose_slides_cloud/models/reorder_slide.rb +249 -266
  113. data/lib/aspose_slides_cloud/models/replace_text.rb +269 -286
  114. data/lib/aspose_slides_cloud/models/request_input_file.rb +235 -261
  115. data/lib/aspose_slides_cloud/models/reset_slide.rb +234 -251
  116. data/lib/aspose_slides_cloud/models/resource_base.rb +219 -207
  117. data/lib/aspose_slides_cloud/models/resource_uri.rb +237 -225
  118. data/lib/aspose_slides_cloud/models/response_output_file.rb +219 -236
  119. data/lib/aspose_slides_cloud/models/save.rb +266 -283
  120. data/lib/aspose_slides_cloud/models/save_shape.rb +276 -293
  121. data/lib/aspose_slides_cloud/models/save_slide.rb +301 -318
  122. data/lib/aspose_slides_cloud/models/scale_type.rb +41 -41
  123. data/lib/aspose_slides_cloud/models/scatter_chart_data_point.rb +225 -215
  124. data/lib/aspose_slides_cloud/models/scatter_series.rb +248 -428
  125. data/lib/aspose_slides_cloud/models/section.rb +234 -0
  126. data/lib/aspose_slides_cloud/models/sections.rb +209 -0
  127. data/lib/aspose_slides_cloud/models/series.rb +422 -389
  128. data/lib/aspose_slides_cloud/models/series_marker.rb +281 -269
  129. data/lib/aspose_slides_cloud/models/shape.rb +255 -467
  130. data/lib/aspose_slides_cloud/models/shape_base.rb +375 -406
  131. data/lib/aspose_slides_cloud/models/shape_export_format.rb +44 -44
  132. data/lib/aspose_slides_cloud/models/shape_image_export_options.rb +286 -274
  133. data/lib/aspose_slides_cloud/models/shape_thumbnail_bounds.rb +41 -41
  134. data/lib/aspose_slides_cloud/models/shapes.rb +209 -219
  135. data/lib/aspose_slides_cloud/models/size_type.rb +55 -55
  136. data/lib/aspose_slides_cloud/models/slide.rb +322 -332
  137. data/lib/aspose_slides_cloud/models/slide_animation.rb +221 -231
  138. data/lib/aspose_slides_cloud/models/slide_background.rb +266 -276
  139. data/lib/aspose_slides_cloud/models/slide_comment.rb +239 -227
  140. data/lib/aspose_slides_cloud/models/slide_comments.rb +209 -219
  141. data/lib/aspose_slides_cloud/models/slide_export_format.rb +59 -58
  142. data/lib/aspose_slides_cloud/models/slide_replace_result.rb +223 -347
  143. data/lib/aspose_slides_cloud/models/slides.rb +209 -219
  144. data/lib/aspose_slides_cloud/models/smart_art.rb +342 -530
  145. data/lib/aspose_slides_cloud/models/smart_art_node.rb +293 -281
  146. data/lib/aspose_slides_cloud/models/smart_art_shape.rb +235 -422
  147. data/lib/aspose_slides_cloud/models/soft_edge_effect.rb +212 -200
  148. data/lib/aspose_slides_cloud/models/solid_fill.rb +229 -246
  149. data/lib/aspose_slides_cloud/models/split_document_result.rb +209 -219
  150. data/lib/aspose_slides_cloud/models/storage_exist.rb +212 -200
  151. data/lib/aspose_slides_cloud/models/storage_file.rb +257 -245
  152. data/lib/aspose_slides_cloud/models/svg_export_options.rb +379 -378
  153. data/lib/aspose_slides_cloud/models/swf_export_options.rb +529 -528
  154. data/lib/aspose_slides_cloud/models/table.rb +350 -538
  155. data/lib/aspose_slides_cloud/models/table_cell.rb +403 -391
  156. data/lib/aspose_slides_cloud/models/table_column.rb +212 -200
  157. data/lib/aspose_slides_cloud/models/table_row.rb +239 -227
  158. data/lib/aspose_slides_cloud/models/task.rb +240 -228
  159. data/lib/aspose_slides_cloud/models/text_item.rb +217 -205
  160. data/lib/aspose_slides_cloud/models/text_items.rb +209 -219
  161. data/lib/aspose_slides_cloud/models/theme.rb +237 -247
  162. data/lib/aspose_slides_cloud/models/tiff_export_options.rb +423 -422
  163. data/lib/aspose_slides_cloud/models/update_background.rb +241 -258
  164. data/lib/aspose_slides_cloud/models/update_shape.rb +239 -256
  165. data/lib/aspose_slides_cloud/models/video_frame.rb +329 -543
  166. data/lib/aspose_slides_cloud/models/view_properties.rb +357 -0
  167. data/lib/aspose_slides_cloud/models/waterfall_chart_data_point.rb +206 -0
  168. data/lib/aspose_slides_cloud/models/waterfall_series.rb +247 -0
  169. data/lib/aspose_slides_cloud/models/xps_export_options.rb +243 -242
  170. data/lib/aspose_slides_cloud/type_registry.rb +320 -0
  171. data/lib/aspose_slides_cloud/version.rb +25 -25
  172. data/spec/api/slides_api_spec.rb +35926 -24406
  173. data/spec/extra/extra_spec.rb +235 -101
  174. data/spec/spec_utils.rb +183 -176
  175. data/testConfig.json +7 -7
  176. data/testRules.json +472 -340
  177. 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
- if type =~ /\AArray<(.*)>/i
315
- # check to ensure the input is an array given that the the attribute
316
- # is documented as an array but the input is not
317
- if attributes[self.class.attribute_map[key]].is_a?(Array)
318
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
319
- end
320
- elsif !attributes[self.class.attribute_map[key]].nil?
321
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
322
- end # or else data not found in attributes(hash), not an issue as the data can be optional
323
- end
324
-
325
- self
326
- end
327
-
328
- # Deserializes the data based on type
329
- # @param string type Data type
330
- # @param string value Value to be deserialized
331
- # @return [Object] Deserialized data
332
- def _deserialize(type, value)
333
- case type.to_sym
334
- when :DateTime
335
- DateTime.parse(value)
336
- when :Date
337
- Date.parse(value)
338
- when :String
339
- value.to_s
340
- when :Integer
341
- value.to_i
342
- when :Float
343
- value.to_f
344
- when :BOOLEAN
345
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
346
- true
347
- else
348
- false
349
- end
350
- when :Object
351
- # generic object (usually a Hash), return directly
352
- value
353
- when /\AArray<(?<inner_type>.+)>\z/
354
- inner_type = Regexp.last_match[:inner_type]
355
- value.map { |v| _deserialize(inner_type, v) }
356
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
357
- k_type = Regexp.last_match[:k_type]
358
- v_type = Regexp.last_match[:v_type]
359
- {}.tap do |hash|
360
- value.each do |k, v|
361
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
362
- end
363
- end
364
- else # model
365
- temp_model = AsposeSlidesCloud.const_get(type).new
366
- temp_model.build_from_hash(value)
367
- end
368
- end
369
-
370
- # Returns the string representation of the object
371
- # @return [String] String presentation of the object
372
- def to_s
373
- to_hash.to_s
374
- end
375
-
376
- # to_body is an alias to to_hash (backward compatibility)
377
- # @return [Hash] Returns the object in the form of hash
378
- def to_body
379
- to_hash
380
- end
381
-
382
- # Returns the object in the form of hash
383
- # @return [Hash] Returns the object in the form of hash
384
- def to_hash
385
- hash = {}
386
- self.class.attribute_map.each_pair do |attr, param|
387
- value = self.send(attr)
388
- next if value.nil?
389
- hash[param] = _to_hash(value)
390
- end
391
- hash
392
- end
393
-
394
- # Outputs non-array value in the form of hash
395
- # For object, use to_hash. Otherwise, just return the value
396
- # @param [Object] value Any valid value
397
- # @return [Hash] Returns the value in the form of hash
398
- def _to_hash(value)
399
- if value.is_a?(Array)
400
- value.compact.map { |v| _to_hash(v) }
401
- elsif value.is_a?(Hash)
402
- {}.tap do |hash|
403
- value.each { |k, v| hash[k] = _to_hash(v) }
404
- end
405
- elsif value.respond_to? :to_hash
406
- value.to_hash
407
- else
408
- value
409
- end
410
- end
411
- end
412
- end
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