aspose_slides_cloud 21.8.0 → 22.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (218) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +74 -89
  3. data/TestData/TemplatingCVDataWithBase64.xml +22 -22
  4. data/TestData/test-unprotected.pptx +0 -0
  5. data/TestData/test.pptx +0 -0
  6. data/aspose_slides_cloud.gemspec +1 -1
  7. data/lib/aspose_slides_cloud/api/slides_api.rb +18984 -15218
  8. data/lib/aspose_slides_cloud/api_client.rb +439 -439
  9. data/lib/aspose_slides_cloud/configuration.rb +1 -1
  10. data/lib/aspose_slides_cloud/models/accent_element.rb +239 -0
  11. data/lib/aspose_slides_cloud/models/add_layout_slide.rb +244 -244
  12. data/lib/aspose_slides_cloud/models/add_master_slide.rb +259 -259
  13. data/lib/aspose_slides_cloud/models/add_shape.rb +239 -239
  14. data/lib/aspose_slides_cloud/models/add_slide.rb +269 -269
  15. data/lib/aspose_slides_cloud/models/api_info.rb +217 -217
  16. data/lib/aspose_slides_cloud/models/arc_to_path_segment.rb +279 -0
  17. data/lib/aspose_slides_cloud/models/array_element.rb +305 -0
  18. data/lib/aspose_slides_cloud/models/arrow_head_properties.rb +285 -285
  19. data/lib/aspose_slides_cloud/models/audio_frame.rb +382 -359
  20. data/lib/aspose_slides_cloud/models/axes.rb +237 -237
  21. data/lib/aspose_slides_cloud/models/axis.rb +699 -699
  22. data/lib/aspose_slides_cloud/models/bar_element.rb +251 -0
  23. data/lib/aspose_slides_cloud/models/base64_input_file.rb +230 -230
  24. data/lib/aspose_slides_cloud/models/block_element.rb +231 -0
  25. data/lib/aspose_slides_cloud/models/blur_effect.rb +227 -227
  26. data/lib/aspose_slides_cloud/models/border_box_element.rb +309 -0
  27. data/lib/aspose_slides_cloud/models/box_and_whisker_series.rb +299 -299
  28. data/lib/aspose_slides_cloud/models/box_element.rb +279 -0
  29. data/lib/aspose_slides_cloud/models/bubble_chart_data_point.rb +212 -212
  30. data/lib/aspose_slides_cloud/models/bubble_series.rb +248 -248
  31. data/lib/aspose_slides_cloud/models/camera.rb +291 -0
  32. data/lib/aspose_slides_cloud/models/chart.rb +368 -365
  33. data/lib/aspose_slides_cloud/models/chart_category.rb +271 -271
  34. data/lib/aspose_slides_cloud/models/chart_title.rb +222 -222
  35. data/lib/aspose_slides_cloud/models/chart_wall.rb +281 -281
  36. data/lib/aspose_slides_cloud/models/close_path_segment.rb +219 -0
  37. data/lib/aspose_slides_cloud/models/color_scheme.rb +317 -317
  38. data/lib/aspose_slides_cloud/models/common_slide_view_properties.rb +217 -217
  39. data/lib/aspose_slides_cloud/models/connector.rb +278 -275
  40. data/lib/aspose_slides_cloud/models/cubic_bezier_to_path_segment.rb +309 -0
  41. data/lib/aspose_slides_cloud/models/custom_dash_pattern.rb +209 -209
  42. data/lib/aspose_slides_cloud/models/data_point.rb +197 -197
  43. data/lib/aspose_slides_cloud/models/delimiter_element.rb +293 -0
  44. data/lib/aspose_slides_cloud/models/disc_usage.rb +227 -227
  45. data/lib/aspose_slides_cloud/models/document.rb +257 -257
  46. data/lib/aspose_slides_cloud/models/document_properties.rb +209 -209
  47. data/lib/aspose_slides_cloud/models/document_property.rb +232 -232
  48. data/lib/aspose_slides_cloud/models/document_replace_result.rb +218 -218
  49. data/lib/aspose_slides_cloud/models/effect.rb +434 -424
  50. data/lib/aspose_slides_cloud/models/effect_format.rb +277 -277
  51. data/lib/aspose_slides_cloud/models/entity_exists.rb +212 -212
  52. data/lib/aspose_slides_cloud/models/error.rb +237 -237
  53. data/lib/aspose_slides_cloud/models/error_details.rb +222 -222
  54. data/lib/aspose_slides_cloud/models/export_format.rb +62 -60
  55. data/lib/aspose_slides_cloud/models/export_options.rb +236 -216
  56. data/lib/aspose_slides_cloud/models/file_version.rb +225 -225
  57. data/lib/aspose_slides_cloud/models/file_versions.rb +209 -209
  58. data/lib/aspose_slides_cloud/models/files_list.rb +209 -209
  59. data/lib/aspose_slides_cloud/models/files_upload_result.rb +221 -221
  60. data/lib/aspose_slides_cloud/models/fill_format.rb +240 -240
  61. data/lib/aspose_slides_cloud/models/fill_overlay_effect.rb +246 -246
  62. data/lib/aspose_slides_cloud/models/font_scheme.rb +227 -227
  63. data/lib/aspose_slides_cloud/models/font_set.rb +227 -227
  64. data/lib/aspose_slides_cloud/models/format_scheme.rb +245 -245
  65. data/lib/aspose_slides_cloud/models/fraction_element.rb +261 -0
  66. data/lib/aspose_slides_cloud/models/function_element.rb +239 -0
  67. data/lib/aspose_slides_cloud/models/geometry_path.rb +263 -0
  68. data/lib/aspose_slides_cloud/models/geometry_paths.rb +209 -0
  69. data/lib/aspose_slides_cloud/models/geometry_shape.rb +263 -260
  70. data/lib/aspose_slides_cloud/models/gif_export_options.rb +230 -0
  71. data/lib/aspose_slides_cloud/models/glow_effect.rb +222 -222
  72. data/lib/aspose_slides_cloud/models/gradient_fill.rb +342 -342
  73. data/lib/aspose_slides_cloud/models/gradient_fill_stop.rb +222 -222
  74. data/lib/aspose_slides_cloud/models/graphical_object.rb +237 -234
  75. data/lib/aspose_slides_cloud/models/group_shape.rb +237 -234
  76. data/lib/aspose_slides_cloud/models/grouping_character_element.rb +283 -0
  77. data/lib/aspose_slides_cloud/models/header_footer.rb +247 -247
  78. data/lib/aspose_slides_cloud/models/html5_export_options.rb +220 -0
  79. data/lib/aspose_slides_cloud/models/html_export_options.rb +378 -421
  80. data/lib/aspose_slides_cloud/models/hyperlink.rb +348 -0
  81. data/lib/aspose_slides_cloud/models/i_shape_export_options.rb +197 -197
  82. data/lib/aspose_slides_cloud/models/image.rb +237 -237
  83. data/lib/aspose_slides_cloud/models/image_export_format.rb +43 -43
  84. data/lib/aspose_slides_cloud/models/image_export_options.rb +286 -299
  85. data/lib/aspose_slides_cloud/models/images.rb +209 -209
  86. data/lib/aspose_slides_cloud/models/inner_shadow_effect.rb +252 -252
  87. data/lib/aspose_slides_cloud/models/input.rb +227 -227
  88. data/lib/aspose_slides_cloud/models/input_file.rb +250 -250
  89. data/lib/aspose_slides_cloud/models/interactive_sequence.rb +224 -224
  90. data/lib/aspose_slides_cloud/models/layout_slide.rb +278 -278
  91. data/lib/aspose_slides_cloud/models/layout_slides.rb +209 -209
  92. data/lib/aspose_slides_cloud/models/left_sub_superscript_element.rb +249 -0
  93. data/lib/aspose_slides_cloud/models/legend.rb +321 -321
  94. data/lib/aspose_slides_cloud/models/light_rig.rb +293 -0
  95. data/lib/aspose_slides_cloud/models/limit_element.rb +249 -0
  96. data/lib/aspose_slides_cloud/models/line_format.rb +411 -411
  97. data/lib/aspose_slides_cloud/models/line_to_path_segment.rb +249 -0
  98. data/lib/aspose_slides_cloud/models/master_slide.rb +231 -231
  99. data/lib/aspose_slides_cloud/models/master_slides.rb +209 -209
  100. data/lib/aspose_slides_cloud/models/math_element.rb +240 -0
  101. data/lib/aspose_slides_cloud/models/math_paragraph.rb +253 -0
  102. data/lib/aspose_slides_cloud/models/matrix_element.rb +337 -0
  103. data/lib/aspose_slides_cloud/models/merge.rb +231 -231
  104. data/lib/aspose_slides_cloud/models/merging_source.rb +219 -219
  105. data/lib/aspose_slides_cloud/models/move_to_path_segment.rb +249 -0
  106. data/lib/aspose_slides_cloud/models/nary_operator_element.rb +311 -0
  107. data/lib/aspose_slides_cloud/models/no_fill.rb +219 -219
  108. data/lib/aspose_slides_cloud/models/normal_view_restored_properties.rb +217 -217
  109. data/lib/aspose_slides_cloud/models/notes_slide.rb +217 -217
  110. data/lib/aspose_slides_cloud/models/notes_slide_export_format.rb +43 -43
  111. data/lib/aspose_slides_cloud/models/notes_slide_header_footer.rb +267 -267
  112. data/lib/aspose_slides_cloud/models/object_exist.rb +227 -227
  113. data/lib/aspose_slides_cloud/models/ole_object_frame.rb +262 -259
  114. data/lib/aspose_slides_cloud/models/one_value_chart_data_point.rb +210 -210
  115. data/lib/aspose_slides_cloud/models/one_value_series.rb +248 -248
  116. data/lib/aspose_slides_cloud/models/ordered_merge_request.rb +209 -209
  117. data/lib/aspose_slides_cloud/models/outer_shadow_effect.rb +252 -252
  118. data/lib/aspose_slides_cloud/models/output_file.rb +240 -240
  119. data/lib/aspose_slides_cloud/models/paragraph.rb +517 -517
  120. data/lib/aspose_slides_cloud/models/paragraphs.rb +209 -209
  121. data/lib/aspose_slides_cloud/models/path_input_file.rb +240 -240
  122. data/lib/aspose_slides_cloud/models/path_output_file.rb +239 -239
  123. data/lib/aspose_slides_cloud/models/path_segment.rb +240 -0
  124. data/lib/aspose_slides_cloud/models/pattern_fill.rb +266 -266
  125. data/lib/aspose_slides_cloud/models/pdf_export_options.rb +474 -547
  126. data/lib/aspose_slides_cloud/models/picture_fill.rb +351 -351
  127. data/lib/aspose_slides_cloud/models/picture_frame.rb +248 -245
  128. data/lib/aspose_slides_cloud/models/pipeline.rb +219 -219
  129. data/lib/aspose_slides_cloud/models/placeholder.rb +325 -325
  130. data/lib/aspose_slides_cloud/models/placeholders.rb +209 -209
  131. data/lib/aspose_slides_cloud/models/plot_area.rb +311 -311
  132. data/lib/aspose_slides_cloud/models/portion.rb +619 -589
  133. data/lib/aspose_slides_cloud/models/portions.rb +209 -209
  134. data/lib/aspose_slides_cloud/models/pptx_export_options.rb +244 -247
  135. data/lib/aspose_slides_cloud/models/presentation_to_merge.rb +273 -273
  136. data/lib/aspose_slides_cloud/models/presentations_merge_request.rb +221 -221
  137. data/lib/aspose_slides_cloud/models/preset_shadow_effect.rb +286 -286
  138. data/lib/aspose_slides_cloud/models/protection_properties.rb +267 -267
  139. data/lib/aspose_slides_cloud/models/quadratic_bezier_to_path_segment.rb +279 -0
  140. data/lib/aspose_slides_cloud/models/radical_element.rb +249 -0
  141. data/lib/aspose_slides_cloud/models/reflection_effect.rb +441 -441
  142. data/lib/aspose_slides_cloud/models/remove_shape.rb +229 -229
  143. data/lib/aspose_slides_cloud/models/remove_slide.rb +234 -234
  144. data/lib/aspose_slides_cloud/models/reorder_slide.rb +249 -249
  145. data/lib/aspose_slides_cloud/models/replace_text.rb +269 -269
  146. data/lib/aspose_slides_cloud/models/request_input_file.rb +235 -235
  147. data/lib/aspose_slides_cloud/models/reset_slide.rb +234 -234
  148. data/lib/aspose_slides_cloud/models/resource_base.rb +219 -219
  149. data/lib/aspose_slides_cloud/models/resource_uri.rb +237 -237
  150. data/lib/aspose_slides_cloud/models/response_output_file.rb +219 -219
  151. data/lib/aspose_slides_cloud/models/right_sub_superscript_element.rb +259 -0
  152. data/lib/aspose_slides_cloud/models/save.rb +266 -266
  153. data/lib/aspose_slides_cloud/models/save_shape.rb +276 -276
  154. data/lib/aspose_slides_cloud/models/save_slide.rb +301 -301
  155. data/lib/aspose_slides_cloud/models/scatter_chart_data_point.rb +225 -225
  156. data/lib/aspose_slides_cloud/models/scatter_series.rb +248 -248
  157. data/lib/aspose_slides_cloud/models/section.rb +234 -234
  158. data/lib/aspose_slides_cloud/models/sections.rb +209 -209
  159. data/lib/aspose_slides_cloud/models/series.rb +422 -422
  160. data/lib/aspose_slides_cloud/models/series_marker.rb +281 -281
  161. data/lib/aspose_slides_cloud/models/shape.rb +258 -255
  162. data/lib/aspose_slides_cloud/models/shape_base.rb +405 -375
  163. data/lib/aspose_slides_cloud/models/shape_bevel.rb +261 -0
  164. data/lib/aspose_slides_cloud/models/shape_export_format.rb +44 -44
  165. data/lib/aspose_slides_cloud/models/shape_image_export_options.rb +271 -286
  166. data/lib/aspose_slides_cloud/models/shape_thumbnail_bounds.rb +41 -41
  167. data/lib/aspose_slides_cloud/models/shapes.rb +209 -209
  168. data/lib/aspose_slides_cloud/models/shapes_alignment_type.rb +46 -46
  169. data/lib/aspose_slides_cloud/models/slide.rb +322 -322
  170. data/lib/aspose_slides_cloud/models/slide_animation.rb +221 -221
  171. data/lib/aspose_slides_cloud/models/slide_background.rb +266 -266
  172. data/lib/aspose_slides_cloud/models/slide_comment.rb +239 -239
  173. data/lib/aspose_slides_cloud/models/slide_comments.rb +209 -209
  174. data/lib/aspose_slides_cloud/models/slide_export_format.rb +60 -59
  175. data/lib/aspose_slides_cloud/models/slide_properties.rb +315 -315
  176. data/lib/aspose_slides_cloud/models/slide_replace_result.rb +223 -223
  177. data/lib/aspose_slides_cloud/models/slides.rb +209 -209
  178. data/lib/aspose_slides_cloud/models/smart_art.rb +345 -342
  179. data/lib/aspose_slides_cloud/models/smart_art_node.rb +293 -293
  180. data/lib/aspose_slides_cloud/models/smart_art_shape.rb +238 -235
  181. data/lib/aspose_slides_cloud/models/soft_edge_effect.rb +212 -212
  182. data/lib/aspose_slides_cloud/models/solid_fill.rb +229 -229
  183. data/lib/aspose_slides_cloud/models/special_slide_type.rb +41 -0
  184. data/lib/aspose_slides_cloud/models/split_document_result.rb +209 -209
  185. data/lib/aspose_slides_cloud/models/storage_exist.rb +212 -212
  186. data/lib/aspose_slides_cloud/models/storage_file.rb +257 -257
  187. data/lib/aspose_slides_cloud/models/subscript_element.rb +239 -0
  188. data/lib/aspose_slides_cloud/models/superscript_element.rb +239 -0
  189. data/lib/aspose_slides_cloud/models/svg_export_options.rb +336 -379
  190. data/lib/aspose_slides_cloud/models/swf_export_options.rb +446 -529
  191. data/lib/aspose_slides_cloud/models/table.rb +353 -350
  192. data/lib/aspose_slides_cloud/models/table_cell.rb +403 -403
  193. data/lib/aspose_slides_cloud/models/table_column.rb +212 -212
  194. data/lib/aspose_slides_cloud/models/table_row.rb +239 -239
  195. data/lib/aspose_slides_cloud/models/task.rb +240 -240
  196. data/lib/aspose_slides_cloud/models/text_element.rb +229 -0
  197. data/lib/aspose_slides_cloud/models/text_item.rb +217 -217
  198. data/lib/aspose_slides_cloud/models/text_items.rb +209 -209
  199. data/lib/aspose_slides_cloud/models/theme.rb +237 -237
  200. data/lib/aspose_slides_cloud/models/three_d_format.rb +331 -0
  201. data/lib/aspose_slides_cloud/models/tiff_export_options.rb +370 -423
  202. data/lib/aspose_slides_cloud/models/update_background.rb +241 -241
  203. data/lib/aspose_slides_cloud/models/update_shape.rb +239 -239
  204. data/lib/aspose_slides_cloud/models/video_frame.rb +332 -329
  205. data/lib/aspose_slides_cloud/models/view_properties.rb +357 -357
  206. data/lib/aspose_slides_cloud/models/waterfall_chart_data_point.rb +206 -206
  207. data/lib/aspose_slides_cloud/models/waterfall_series.rb +247 -247
  208. data/lib/aspose_slides_cloud/models/xaml_export_options.rb +210 -0
  209. data/lib/aspose_slides_cloud/models/xps_export_options.rb +230 -243
  210. data/lib/aspose_slides_cloud/type_registry.rb +402 -323
  211. data/lib/aspose_slides_cloud/version.rb +25 -25
  212. data/lib/aspose_slides_cloud.rb +251 -212
  213. data/spec/api/slides_api_spec.rb +52044 -40353
  214. data/spec/extra/extra_spec.rb +202 -202
  215. data/spec/spec_utils.rb +188 -182
  216. data/testConfig.json +7 -7
  217. data/testRules.json +522 -517
  218. metadata +45 -6
@@ -1,424 +1,434 @@
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
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
+ # Paragraph index.
41
+ attr_accessor :paragraph_index
42
+
43
+ # Effect trigger type.
44
+ attr_accessor :trigger_type
45
+
46
+ # The percentage of duration accelerate behavior effect.
47
+ attr_accessor :accelerate
48
+
49
+ # True to automatically play the animation in reverse after playing it in the forward direction.
50
+ attr_accessor :auto_reverse
51
+
52
+ # The percentage of duration decelerate behavior effect.
53
+ attr_accessor :decelerate
54
+
55
+ # The duration of animation effect.
56
+ attr_accessor :duration
57
+
58
+ # The number of times the effect should repeat.
59
+ attr_accessor :repeat_count
60
+
61
+ # The number of times the effect should repeat.
62
+ attr_accessor :repeat_duration
63
+
64
+ # The way for a effect to restart after complete.
65
+ attr_accessor :restart
66
+
67
+ # The percentage by which to speed up (or slow down) the timing.
68
+ attr_accessor :speed
69
+
70
+ # Delay time after trigger.
71
+ attr_accessor :trigger_delay_time
72
+
73
+ class EnumAttributeValidator
74
+ attr_reader :datatype
75
+ attr_reader :allowable_values
76
+
77
+ def initialize(datatype, allowable_values)
78
+ @allowable_values = allowable_values.map do |value|
79
+ case datatype.to_s
80
+ when /Integer/i
81
+ value.to_i
82
+ when /Float/i
83
+ value.to_f
84
+ else
85
+ value
86
+ end
87
+ end
88
+ end
89
+
90
+ def valid?(value)
91
+ !value || allowable_values.any?{ |s| s.casecmp(value) == 0 }
92
+ end
93
+ end
94
+
95
+ # Attribute mapping from ruby-style variable name to JSON key.
96
+ def self.attribute_map
97
+ {
98
+ :'type' => :'Type',
99
+ :'subtype' => :'Subtype',
100
+ :'preset_class_type' => :'PresetClassType',
101
+ :'shape_index' => :'ShapeIndex',
102
+ :'paragraph_index' => :'ParagraphIndex',
103
+ :'trigger_type' => :'TriggerType',
104
+ :'accelerate' => :'Accelerate',
105
+ :'auto_reverse' => :'AutoReverse',
106
+ :'decelerate' => :'Decelerate',
107
+ :'duration' => :'Duration',
108
+ :'repeat_count' => :'RepeatCount',
109
+ :'repeat_duration' => :'RepeatDuration',
110
+ :'restart' => :'Restart',
111
+ :'speed' => :'Speed',
112
+ :'trigger_delay_time' => :'TriggerDelayTime',
113
+ }
114
+ end
115
+
116
+ # Attribute type mapping.
117
+ def self.swagger_types
118
+ {
119
+ :'type' => :'String',
120
+ :'subtype' => :'String',
121
+ :'preset_class_type' => :'String',
122
+ :'shape_index' => :'Integer',
123
+ :'paragraph_index' => :'Integer',
124
+ :'trigger_type' => :'String',
125
+ :'accelerate' => :'Float',
126
+ :'auto_reverse' => :'BOOLEAN',
127
+ :'decelerate' => :'Float',
128
+ :'duration' => :'Float',
129
+ :'repeat_count' => :'Float',
130
+ :'repeat_duration' => :'Float',
131
+ :'restart' => :'String',
132
+ :'speed' => :'Float',
133
+ :'trigger_delay_time' => :'Float',
134
+ }
135
+ end
136
+
137
+ # Initializes the object
138
+ # @param [Hash] attributes Model attributes in the form of hash
139
+ def initialize(attributes = {})
140
+ return unless attributes.is_a?(Hash)
141
+
142
+ # convert string to symbol for hash key
143
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
144
+
145
+ if attributes.has_key?(:'Type')
146
+ self.type = attributes[:'Type']
147
+ end
148
+
149
+ if attributes.has_key?(:'Subtype')
150
+ self.subtype = attributes[:'Subtype']
151
+ end
152
+
153
+ if attributes.has_key?(:'PresetClassType')
154
+ self.preset_class_type = attributes[:'PresetClassType']
155
+ end
156
+
157
+ if attributes.has_key?(:'ShapeIndex')
158
+ self.shape_index = attributes[:'ShapeIndex']
159
+ end
160
+
161
+ if attributes.has_key?(:'ParagraphIndex')
162
+ self.paragraph_index = attributes[:'ParagraphIndex']
163
+ end
164
+
165
+ if attributes.has_key?(:'TriggerType')
166
+ self.trigger_type = attributes[:'TriggerType']
167
+ end
168
+
169
+ if attributes.has_key?(:'Accelerate')
170
+ self.accelerate = attributes[:'Accelerate']
171
+ end
172
+
173
+ if attributes.has_key?(:'AutoReverse')
174
+ self.auto_reverse = attributes[:'AutoReverse']
175
+ end
176
+
177
+ if attributes.has_key?(:'Decelerate')
178
+ self.decelerate = attributes[:'Decelerate']
179
+ end
180
+
181
+ if attributes.has_key?(:'Duration')
182
+ self.duration = attributes[:'Duration']
183
+ end
184
+
185
+ if attributes.has_key?(:'RepeatCount')
186
+ self.repeat_count = attributes[:'RepeatCount']
187
+ end
188
+
189
+ if attributes.has_key?(:'RepeatDuration')
190
+ self.repeat_duration = attributes[:'RepeatDuration']
191
+ end
192
+
193
+ if attributes.has_key?(:'Restart')
194
+ self.restart = attributes[:'Restart']
195
+ end
196
+
197
+ if attributes.has_key?(:'Speed')
198
+ self.speed = attributes[:'Speed']
199
+ end
200
+
201
+ if attributes.has_key?(:'TriggerDelayTime')
202
+ self.trigger_delay_time = attributes[:'TriggerDelayTime']
203
+ end
204
+ end
205
+
206
+ # Show invalid properties with the reasons. Usually used together with valid?
207
+ # @return Array for valid properties with the reasons
208
+ def list_invalid_properties
209
+ invalid_properties = Array.new
210
+ if @shape_index.nil?
211
+ invalid_properties.push('invalid value for "shape_index", shape_index cannot be nil.')
212
+ end
213
+
214
+ invalid_properties
215
+ end
216
+
217
+ # Check to see if the all the properties in the model are valid
218
+ # @return true if the model is valid
219
+ def valid?
220
+ 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'])
221
+ return false unless type_validator.valid?(@type)
222
+ 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'])
223
+ return false unless subtype_validator.valid?(@subtype)
224
+ preset_class_type_validator = EnumAttributeValidator.new('String', ['Entrance', 'Exit', 'Emphasis', 'Path', 'MediaCall', 'OLEActionVerbs'])
225
+ return false unless preset_class_type_validator.valid?(@preset_class_type)
226
+ return false if @shape_index.nil?
227
+ trigger_type_validator = EnumAttributeValidator.new('String', ['AfterPrevious', 'OnClick', 'WithPrevious'])
228
+ return false unless trigger_type_validator.valid?(@trigger_type)
229
+ restart_validator = EnumAttributeValidator.new('String', ['Always', 'WhenNotActive', 'Never', 'NotDefined'])
230
+ return false unless restart_validator.valid?(@restart)
231
+ true
232
+ end
233
+
234
+ # Custom attribute writer method checking allowed values (enum).
235
+ # @param [Object] type Object to be assigned
236
+ def type=(type)
237
+ 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'])
238
+ unless validator.valid?(type)
239
+ fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
240
+ end
241
+ @type = type
242
+ end
243
+
244
+ # Custom attribute writer method checking allowed values (enum).
245
+ # @param [Object] subtype Object to be assigned
246
+ def subtype=(subtype)
247
+ 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'])
248
+ unless validator.valid?(subtype)
249
+ fail ArgumentError, 'invalid value for "subtype", must be one of #{validator.allowable_values}.'
250
+ end
251
+ @subtype = subtype
252
+ end
253
+
254
+ # Custom attribute writer method checking allowed values (enum).
255
+ # @param [Object] preset_class_type Object to be assigned
256
+ def preset_class_type=(preset_class_type)
257
+ validator = EnumAttributeValidator.new('String', ['Entrance', 'Exit', 'Emphasis', 'Path', 'MediaCall', 'OLEActionVerbs'])
258
+ unless validator.valid?(preset_class_type)
259
+ fail ArgumentError, 'invalid value for "preset_class_type", must be one of #{validator.allowable_values}.'
260
+ end
261
+ @preset_class_type = preset_class_type
262
+ end
263
+
264
+ # Custom attribute writer method checking allowed values (enum).
265
+ # @param [Object] trigger_type Object to be assigned
266
+ def trigger_type=(trigger_type)
267
+ validator = EnumAttributeValidator.new('String', ['AfterPrevious', 'OnClick', 'WithPrevious'])
268
+ unless validator.valid?(trigger_type)
269
+ fail ArgumentError, 'invalid value for "trigger_type", must be one of #{validator.allowable_values}.'
270
+ end
271
+ @trigger_type = trigger_type
272
+ end
273
+
274
+ # Custom attribute writer method checking allowed values (enum).
275
+ # @param [Object] restart Object to be assigned
276
+ def restart=(restart)
277
+ validator = EnumAttributeValidator.new('String', ['Always', 'WhenNotActive', 'Never', 'NotDefined'])
278
+ unless validator.valid?(restart)
279
+ fail ArgumentError, 'invalid value for "restart", must be one of #{validator.allowable_values}.'
280
+ end
281
+ @restart = restart
282
+ end
283
+
284
+ # Checks equality by comparing each attribute.
285
+ # @param [Object] Object to be compared
286
+ def ==(o)
287
+ return true if self.equal?(o)
288
+ self.class == o.class &&
289
+ type == o.type &&
290
+ subtype == o.subtype &&
291
+ preset_class_type == o.preset_class_type &&
292
+ shape_index == o.shape_index &&
293
+ paragraph_index == o.paragraph_index &&
294
+ trigger_type == o.trigger_type &&
295
+ accelerate == o.accelerate &&
296
+ auto_reverse == o.auto_reverse &&
297
+ decelerate == o.decelerate &&
298
+ duration == o.duration &&
299
+ repeat_count == o.repeat_count &&
300
+ repeat_duration == o.repeat_duration &&
301
+ restart == o.restart &&
302
+ speed == o.speed &&
303
+ trigger_delay_time == o.trigger_delay_time
304
+ end
305
+
306
+ # @see the `==` method
307
+ # @param [Object] Object to be compared
308
+ def eql?(o)
309
+ self == o
310
+ end
311
+
312
+ # Calculates hash code according to all attributes.
313
+ # @return [Fixnum] Hash code
314
+ def hash
315
+ [type, subtype, preset_class_type, shape_index, paragraph_index, trigger_type, accelerate, auto_reverse, decelerate, duration, repeat_count, repeat_duration, restart, speed, trigger_delay_time].hash
316
+ end
317
+
318
+ # Builds the object from hash
319
+ # @param [Hash] attributes Model attributes in the form of hash
320
+ # @return [Object] Returns the model itself
321
+ def build_from_hash(attributes)
322
+ return nil unless attributes.is_a?(Hash)
323
+ self.class.swagger_types.each_pair do |key, type|
324
+ mapKey = self.class.attribute_map[key]
325
+ if !mapKey.nil?
326
+ val = attributes[mapKey]
327
+ if val.nil?
328
+ mapKeyString = mapKey.to_s
329
+ mapKeyString[0] = mapKeyString[0].downcase
330
+ mapKey = mapKeyString.to_sym
331
+ val = attributes[mapKey]
332
+ end
333
+ if !val.nil?
334
+ if type =~ /\AArray<(.*)>/i
335
+ # check to ensure the input is an array given that the the attribute
336
+ # is documented as an array but the input is not
337
+ if val.is_a?(Array)
338
+ self.send("#{key}=", val.map { |v| _deserialize($1, v) })
339
+ end
340
+ else
341
+ self.send("#{key}=", _deserialize(type, val))
342
+ end
343
+ end
344
+ end
345
+ end
346
+
347
+ self
348
+ end
349
+
350
+ # Deserializes the data based on type
351
+ # @param string type Data type
352
+ # @param string value Value to be deserialized
353
+ # @return [Object] Deserialized data
354
+ def _deserialize(type, value)
355
+ case type.to_sym
356
+ when :DateTime
357
+ DateTime.parse(value)
358
+ when :Date
359
+ Date.parse(value)
360
+ when :String
361
+ value.to_s
362
+ when :Integer
363
+ value.to_i
364
+ when :Float
365
+ value.to_f
366
+ when :BOOLEAN
367
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
368
+ true
369
+ else
370
+ false
371
+ end
372
+ when :Object
373
+ # generic object (usually a Hash), return directly
374
+ value
375
+ when /\AArray<(?<inner_type>.+)>\z/
376
+ inner_type = Regexp.last_match[:inner_type]
377
+ value.map { |v| _deserialize(inner_type, v) }
378
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
379
+ k_type = Regexp.last_match[:k_type]
380
+ v_type = Regexp.last_match[:v_type]
381
+ {}.tap do |hash|
382
+ value.each do |k, v|
383
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
384
+ end
385
+ end
386
+ else # model
387
+ temp_model = AsposeSlidesCloud.const_get(type).new
388
+ temp_model.build_from_hash(value)
389
+ end
390
+ end
391
+
392
+ # Returns the string representation of the object
393
+ # @return [String] String presentation of the object
394
+ def to_s
395
+ to_hash.to_s
396
+ end
397
+
398
+ # to_body is an alias to to_hash (backward compatibility)
399
+ # @return [Hash] Returns the object in the form of hash
400
+ def to_body
401
+ to_hash
402
+ end
403
+
404
+ # Returns the object in the form of hash
405
+ # @return [Hash] Returns the object in the form of hash
406
+ def to_hash
407
+ hash = {}
408
+ self.class.attribute_map.each_pair do |attr, param|
409
+ value = self.send(attr)
410
+ next if value.nil?
411
+ hash[param] = _to_hash(value)
412
+ end
413
+ hash
414
+ end
415
+
416
+ # Outputs non-array value in the form of hash
417
+ # For object, use to_hash. Otherwise, just return the value
418
+ # @param [Object] value Any valid value
419
+ # @return [Hash] Returns the value in the form of hash
420
+ def _to_hash(value)
421
+ if value.is_a?(Array)
422
+ value.compact.map { |v| _to_hash(v) }
423
+ elsif value.is_a?(Hash)
424
+ {}.tap do |hash|
425
+ value.each { |k, v| hash[k] = _to_hash(v) }
426
+ end
427
+ elsif value.respond_to? :to_hash
428
+ value.to_hash
429
+ else
430
+ value
431
+ end
432
+ end
433
+ end
434
+ end