aspose_slides_cloud 20.8.0 → 20.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (176) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +61 -61
  3. data/TestData/Sections.pptx +0 -0
  4. data/TestData/TemplatingCVDataWithBase64.xml +22 -22
  5. data/lib/aspose_slides_cloud.rb +212 -209
  6. data/lib/aspose_slides_cloud/api/slides_api.rb +10979 -10105
  7. data/lib/aspose_slides_cloud/api/slides_api_requests.rb +4146 -3900
  8. data/lib/aspose_slides_cloud/api_client.rb +432 -432
  9. data/lib/aspose_slides_cloud/models/add_layout_slide.rb +244 -244
  10. data/lib/aspose_slides_cloud/models/add_master_slide.rb +259 -259
  11. data/lib/aspose_slides_cloud/models/add_shape.rb +239 -239
  12. data/lib/aspose_slides_cloud/models/add_slide.rb +269 -269
  13. data/lib/aspose_slides_cloud/models/api_info.rb +217 -217
  14. data/lib/aspose_slides_cloud/models/arrow_head_properties.rb +285 -285
  15. data/lib/aspose_slides_cloud/models/audio_frame.rb +359 -361
  16. data/lib/aspose_slides_cloud/models/axes.rb +237 -237
  17. data/lib/aspose_slides_cloud/models/axis.rb +699 -699
  18. data/lib/aspose_slides_cloud/models/base64_input_file.rb +230 -230
  19. data/lib/aspose_slides_cloud/models/blur_effect.rb +227 -227
  20. data/lib/aspose_slides_cloud/models/box_and_whisker_series.rb +299 -299
  21. data/lib/aspose_slides_cloud/models/bubble_chart_data_point.rb +212 -212
  22. data/lib/aspose_slides_cloud/models/bubble_series.rb +248 -248
  23. data/lib/aspose_slides_cloud/models/chart.rb +365 -367
  24. data/lib/aspose_slides_cloud/models/chart_category.rb +271 -261
  25. data/lib/aspose_slides_cloud/models/chart_title.rb +222 -222
  26. data/lib/aspose_slides_cloud/models/chart_wall.rb +281 -281
  27. data/lib/aspose_slides_cloud/models/color_scheme.rb +317 -317
  28. data/lib/aspose_slides_cloud/models/common_slide_view_properties.rb +217 -217
  29. data/lib/aspose_slides_cloud/models/connector.rb +275 -276
  30. data/lib/aspose_slides_cloud/models/custom_dash_pattern.rb +209 -209
  31. data/lib/aspose_slides_cloud/models/{resource_uri_element.rb → data_point.rb} +197 -207
  32. data/lib/aspose_slides_cloud/models/disc_usage.rb +227 -227
  33. data/lib/aspose_slides_cloud/models/document.rb +257 -257
  34. data/lib/aspose_slides_cloud/models/document_properties.rb +209 -209
  35. data/lib/aspose_slides_cloud/models/document_property.rb +232 -232
  36. data/lib/aspose_slides_cloud/models/document_replace_result.rb +218 -218
  37. data/lib/aspose_slides_cloud/models/effect.rb +424 -424
  38. data/lib/aspose_slides_cloud/models/effect_format.rb +277 -277
  39. data/lib/aspose_slides_cloud/models/entity_exists.rb +212 -212
  40. data/lib/aspose_slides_cloud/models/error.rb +237 -237
  41. data/lib/aspose_slides_cloud/models/error_details.rb +222 -222
  42. data/lib/aspose_slides_cloud/models/export_format.rb +60 -60
  43. data/lib/aspose_slides_cloud/models/export_options.rb +216 -216
  44. data/lib/aspose_slides_cloud/models/file_version.rb +225 -225
  45. data/lib/aspose_slides_cloud/models/file_versions.rb +209 -209
  46. data/lib/aspose_slides_cloud/models/files_list.rb +209 -209
  47. data/lib/aspose_slides_cloud/models/files_upload_result.rb +221 -221
  48. data/lib/aspose_slides_cloud/models/fill_format.rb +240 -240
  49. data/lib/aspose_slides_cloud/models/fill_overlay_effect.rb +246 -246
  50. data/lib/aspose_slides_cloud/models/font_scheme.rb +227 -227
  51. data/lib/aspose_slides_cloud/models/font_set.rb +227 -227
  52. data/lib/aspose_slides_cloud/models/format_scheme.rb +245 -245
  53. data/lib/aspose_slides_cloud/models/geometry_shape.rb +260 -261
  54. data/lib/aspose_slides_cloud/models/glow_effect.rb +222 -222
  55. data/lib/aspose_slides_cloud/models/gradient_fill.rb +342 -342
  56. data/lib/aspose_slides_cloud/models/gradient_fill_stop.rb +222 -222
  57. data/lib/aspose_slides_cloud/models/graphical_object.rb +234 -236
  58. data/lib/aspose_slides_cloud/models/group_shape.rb +234 -236
  59. data/lib/aspose_slides_cloud/models/header_footer.rb +247 -0
  60. data/lib/aspose_slides_cloud/models/html_export_options.rb +421 -421
  61. data/lib/aspose_slides_cloud/models/i_shape_export_options.rb +197 -207
  62. data/lib/aspose_slides_cloud/models/image.rb +237 -237
  63. data/lib/aspose_slides_cloud/models/image_export_format.rb +43 -43
  64. data/lib/aspose_slides_cloud/models/image_export_options.rb +299 -299
  65. data/lib/aspose_slides_cloud/models/images.rb +209 -209
  66. data/lib/aspose_slides_cloud/models/inner_shadow_effect.rb +252 -252
  67. data/lib/aspose_slides_cloud/models/input.rb +227 -227
  68. data/lib/aspose_slides_cloud/models/input_file.rb +250 -250
  69. data/lib/aspose_slides_cloud/models/interactive_sequence.rb +224 -224
  70. data/lib/aspose_slides_cloud/models/layout_slide.rb +278 -278
  71. data/lib/aspose_slides_cloud/models/layout_slides.rb +209 -209
  72. data/lib/aspose_slides_cloud/models/legend.rb +321 -321
  73. data/lib/aspose_slides_cloud/models/line_format.rb +389 -389
  74. data/lib/aspose_slides_cloud/models/master_slide.rb +231 -231
  75. data/lib/aspose_slides_cloud/models/master_slides.rb +209 -209
  76. data/lib/aspose_slides_cloud/models/merge.rb +231 -231
  77. data/lib/aspose_slides_cloud/models/merging_source.rb +219 -219
  78. data/lib/aspose_slides_cloud/models/no_fill.rb +219 -219
  79. data/lib/aspose_slides_cloud/models/normal_view_restored_properties.rb +217 -217
  80. data/lib/aspose_slides_cloud/models/notes_slide.rb +217 -217
  81. data/lib/aspose_slides_cloud/models/notes_slide_export_format.rb +43 -43
  82. data/lib/aspose_slides_cloud/models/notes_slide_header_footer.rb +267 -0
  83. data/lib/aspose_slides_cloud/models/object_exist.rb +227 -227
  84. data/lib/aspose_slides_cloud/models/ole_object_frame.rb +259 -261
  85. data/lib/aspose_slides_cloud/models/one_value_chart_data_point.rb +210 -210
  86. data/lib/aspose_slides_cloud/models/one_value_series.rb +248 -248
  87. data/lib/aspose_slides_cloud/models/ordered_merge_request.rb +209 -209
  88. data/lib/aspose_slides_cloud/models/outer_shadow_effect.rb +252 -252
  89. data/lib/aspose_slides_cloud/models/output_file.rb +240 -240
  90. data/lib/aspose_slides_cloud/models/paragraph.rb +517 -517
  91. data/lib/aspose_slides_cloud/models/paragraphs.rb +209 -209
  92. data/lib/aspose_slides_cloud/models/path_input_file.rb +240 -240
  93. data/lib/aspose_slides_cloud/models/path_output_file.rb +239 -239
  94. data/lib/aspose_slides_cloud/models/pattern_fill.rb +266 -266
  95. data/lib/aspose_slides_cloud/models/pdf_export_options.rb +547 -547
  96. data/lib/aspose_slides_cloud/models/picture_fill.rb +351 -351
  97. data/lib/aspose_slides_cloud/models/picture_frame.rb +245 -247
  98. data/lib/aspose_slides_cloud/models/pipeline.rb +219 -219
  99. data/lib/aspose_slides_cloud/models/placeholder.rb +325 -325
  100. data/lib/aspose_slides_cloud/models/placeholders.rb +209 -209
  101. data/lib/aspose_slides_cloud/models/plot_area.rb +311 -311
  102. data/lib/aspose_slides_cloud/models/portion.rb +589 -589
  103. data/lib/aspose_slides_cloud/models/portions.rb +209 -209
  104. data/lib/aspose_slides_cloud/models/pptx_export_options.rb +247 -247
  105. data/lib/aspose_slides_cloud/models/presentation_to_merge.rb +229 -229
  106. data/lib/aspose_slides_cloud/models/presentations_merge_request.rb +221 -221
  107. data/lib/aspose_slides_cloud/models/preset_shadow_effect.rb +286 -286
  108. data/lib/aspose_slides_cloud/models/reflection_effect.rb +441 -441
  109. data/lib/aspose_slides_cloud/models/remove_shape.rb +229 -229
  110. data/lib/aspose_slides_cloud/models/remove_slide.rb +234 -234
  111. data/lib/aspose_slides_cloud/models/reorder_slide.rb +249 -249
  112. data/lib/aspose_slides_cloud/models/replace_text.rb +269 -269
  113. data/lib/aspose_slides_cloud/models/request_input_file.rb +235 -235
  114. data/lib/aspose_slides_cloud/models/reset_slide.rb +234 -234
  115. data/lib/aspose_slides_cloud/models/resource_base.rb +219 -219
  116. data/lib/aspose_slides_cloud/models/resource_uri.rb +237 -237
  117. data/lib/aspose_slides_cloud/models/response_output_file.rb +219 -219
  118. data/lib/aspose_slides_cloud/models/save.rb +266 -266
  119. data/lib/aspose_slides_cloud/models/save_shape.rb +276 -276
  120. data/lib/aspose_slides_cloud/models/save_slide.rb +301 -301
  121. data/lib/aspose_slides_cloud/models/scale_type.rb +41 -41
  122. data/lib/aspose_slides_cloud/models/scatter_chart_data_point.rb +225 -225
  123. data/lib/aspose_slides_cloud/models/scatter_series.rb +248 -248
  124. data/lib/aspose_slides_cloud/models/section.rb +234 -0
  125. data/lib/aspose_slides_cloud/models/sections.rb +209 -0
  126. data/lib/aspose_slides_cloud/models/series.rb +422 -422
  127. data/lib/aspose_slides_cloud/models/series_marker.rb +281 -281
  128. data/lib/aspose_slides_cloud/models/shape.rb +255 -256
  129. data/lib/aspose_slides_cloud/models/shape_base.rb +375 -396
  130. data/lib/aspose_slides_cloud/models/shape_export_format.rb +44 -44
  131. data/lib/aspose_slides_cloud/models/shape_image_export_options.rb +286 -286
  132. data/lib/aspose_slides_cloud/models/shape_thumbnail_bounds.rb +41 -41
  133. data/lib/aspose_slides_cloud/models/shapes.rb +209 -209
  134. data/lib/aspose_slides_cloud/models/size_type.rb +55 -55
  135. data/lib/aspose_slides_cloud/models/slide.rb +322 -322
  136. data/lib/aspose_slides_cloud/models/slide_animation.rb +221 -221
  137. data/lib/aspose_slides_cloud/models/slide_background.rb +266 -266
  138. data/lib/aspose_slides_cloud/models/slide_comment.rb +239 -239
  139. data/lib/aspose_slides_cloud/models/slide_comments.rb +209 -209
  140. data/lib/aspose_slides_cloud/models/slide_export_format.rb +59 -59
  141. data/lib/aspose_slides_cloud/models/slide_replace_result.rb +223 -223
  142. data/lib/aspose_slides_cloud/models/slides.rb +209 -209
  143. data/lib/aspose_slides_cloud/models/smart_art.rb +342 -344
  144. data/lib/aspose_slides_cloud/models/smart_art_node.rb +293 -293
  145. data/lib/aspose_slides_cloud/models/smart_art_shape.rb +235 -236
  146. data/lib/aspose_slides_cloud/models/soft_edge_effect.rb +212 -212
  147. data/lib/aspose_slides_cloud/models/solid_fill.rb +229 -229
  148. data/lib/aspose_slides_cloud/models/split_document_result.rb +209 -209
  149. data/lib/aspose_slides_cloud/models/storage_exist.rb +212 -212
  150. data/lib/aspose_slides_cloud/models/storage_file.rb +257 -257
  151. data/lib/aspose_slides_cloud/models/svg_export_options.rb +379 -379
  152. data/lib/aspose_slides_cloud/models/swf_export_options.rb +529 -529
  153. data/lib/aspose_slides_cloud/models/table.rb +350 -352
  154. data/lib/aspose_slides_cloud/models/table_cell.rb +403 -403
  155. data/lib/aspose_slides_cloud/models/table_column.rb +212 -212
  156. data/lib/aspose_slides_cloud/models/table_row.rb +239 -239
  157. data/lib/aspose_slides_cloud/models/task.rb +240 -240
  158. data/lib/aspose_slides_cloud/models/text_item.rb +217 -217
  159. data/lib/aspose_slides_cloud/models/text_items.rb +209 -209
  160. data/lib/aspose_slides_cloud/models/theme.rb +237 -237
  161. data/lib/aspose_slides_cloud/models/tiff_export_options.rb +423 -423
  162. data/lib/aspose_slides_cloud/models/update_background.rb +241 -241
  163. data/lib/aspose_slides_cloud/models/update_shape.rb +239 -239
  164. data/lib/aspose_slides_cloud/models/video_frame.rb +329 -331
  165. data/lib/aspose_slides_cloud/models/view_properties.rb +357 -357
  166. data/lib/aspose_slides_cloud/models/waterfall_chart_data_point.rb +206 -0
  167. data/lib/aspose_slides_cloud/models/waterfall_series.rb +247 -247
  168. data/lib/aspose_slides_cloud/models/xps_export_options.rb +243 -243
  169. data/lib/aspose_slides_cloud/type_registry.rb +320 -313
  170. data/lib/aspose_slides_cloud/version.rb +25 -25
  171. data/spec/api/slides_api_spec.rb +35926 -30710
  172. data/spec/extra/extra_spec.rb +235 -236
  173. data/spec/spec_utils.rb +183 -183
  174. data/testConfig.json +7 -7
  175. data/testRules.json +472 -438
  176. metadata +9 -3
@@ -1,218 +1,218 @@
1
- =begin
2
- Copyright (c) 2019 Aspose Pty Ltd
3
-
4
- Permission is hereby granted, free of charge, to any person obtaining a copy
5
- of this software and associated documentation files (the "Software"), to deal
6
- in the Software without restriction, including without limitation the rights
7
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- copies of the Software, and to permit persons to whom the Software is
9
- furnished to do so, subject to the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be included in all
12
- copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
- SOFTWARE.
21
- =end
22
-
23
- require 'date'
24
-
25
- module AsposeSlidesCloud
26
- # Represents document replace result DTO.
27
- class DocumentReplaceResult < Document
28
- # Gets or sets the number of matches
29
- attr_accessor :matches
30
-
31
- # Attribute mapping from ruby-style variable name to JSON key.
32
- def self.attribute_map
33
- super.merge({
34
- :'matches' => :'Matches',
35
- })
36
- end
37
-
38
- # Attribute type mapping.
39
- def self.swagger_types
40
- super.merge({
41
- :'matches' => :'Integer',
42
- })
43
- end
44
-
45
- # Initializes the object
46
- # @param [Hash] attributes Model attributes in the form of hash
47
- def initialize(attributes = {})
48
- super
49
-
50
- if attributes.has_key?(:'Matches')
51
- self.matches = attributes[:'Matches']
52
- end
53
- end
54
-
55
- # Show invalid properties with the reasons. Usually used together with valid?
56
- # @return Array for valid properties with the reasons
57
- def list_invalid_properties
58
- invalid_properties = super
59
- if @matches.nil?
60
- invalid_properties.push('invalid value for "matches", matches cannot be nil.')
61
- end
62
-
63
- invalid_properties
64
- end
65
-
66
- # Check to see if the all the properties in the model are valid
67
- # @return true if the model is valid
68
- def valid?
69
- return false if !super
70
- return false if @matches.nil?
71
- true
72
- end
73
-
74
- # Checks equality by comparing each attribute.
75
- # @param [Object] Object to be compared
76
- def ==(o)
77
- return true if self.equal?(o)
78
- self.class == o.class &&
79
- self_uri == o.self_uri &&
80
- alternate_links == o.alternate_links &&
81
- document_properties == o.document_properties &&
82
- view_properties == o.view_properties &&
83
- slides == o.slides &&
84
- images == o.images &&
85
- layout_slides == o.layout_slides &&
86
- master_slides == o.master_slides &&
87
- matches == o.matches
88
- end
89
-
90
- # @see the `==` method
91
- # @param [Object] Object to be compared
92
- def eql?(o)
93
- self == o
94
- end
95
-
96
- # Calculates hash code according to all attributes.
97
- # @return [Fixnum] Hash code
98
- def hash
99
- [self_uri, alternate_links, document_properties, view_properties, slides, images, layout_slides, master_slides, matches].hash
100
- end
101
-
102
- # Builds the object from hash
103
- # @param [Hash] attributes Model attributes in the form of hash
104
- # @return [Object] Returns the model itself
105
- def build_from_hash(attributes)
106
- return nil unless attributes.is_a?(Hash)
107
- self.class.swagger_types.each_pair do |key, type|
108
- mapKey = self.class.attribute_map[key]
109
- if !mapKey.nil?
110
- val = attributes[mapKey]
111
- if val.nil?
112
- mapKeyString = mapKey.to_s
113
- mapKeyString[0] = mapKeyString[0].downcase
114
- mapKey = mapKeyString.to_sym
115
- val = attributes[mapKey]
116
- end
117
- if !val.nil?
118
- if type =~ /\AArray<(.*)>/i
119
- # check to ensure the input is an array given that the the attribute
120
- # is documented as an array but the input is not
121
- if val.is_a?(Array)
122
- self.send("#{key}=", val.map { |v| _deserialize($1, v) })
123
- end
124
- else
125
- self.send("#{key}=", _deserialize(type, val))
126
- end
127
- end
128
- end
129
- end
130
-
131
- self
132
- end
133
-
134
- # Deserializes the data based on type
135
- # @param string type Data type
136
- # @param string value Value to be deserialized
137
- # @return [Object] Deserialized data
138
- def _deserialize(type, value)
139
- case type.to_sym
140
- when :DateTime
141
- DateTime.parse(value)
142
- when :Date
143
- Date.parse(value)
144
- when :String
145
- value.to_s
146
- when :Integer
147
- value.to_i
148
- when :Float
149
- value.to_f
150
- when :BOOLEAN
151
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
152
- true
153
- else
154
- false
155
- end
156
- when :Object
157
- # generic object (usually a Hash), return directly
158
- value
159
- when /\AArray<(?<inner_type>.+)>\z/
160
- inner_type = Regexp.last_match[:inner_type]
161
- value.map { |v| _deserialize(inner_type, v) }
162
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
163
- k_type = Regexp.last_match[:k_type]
164
- v_type = Regexp.last_match[:v_type]
165
- {}.tap do |hash|
166
- value.each do |k, v|
167
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
168
- end
169
- end
170
- else # model
171
- temp_model = AsposeSlidesCloud.const_get(type).new
172
- temp_model.build_from_hash(value)
173
- end
174
- end
175
-
176
- # Returns the string representation of the object
177
- # @return [String] String presentation of the object
178
- def to_s
179
- to_hash.to_s
180
- end
181
-
182
- # to_body is an alias to to_hash (backward compatibility)
183
- # @return [Hash] Returns the object in the form of hash
184
- def to_body
185
- to_hash
186
- end
187
-
188
- # Returns the object in the form of hash
189
- # @return [Hash] Returns the object in the form of hash
190
- def to_hash
191
- hash = {}
192
- self.class.attribute_map.each_pair do |attr, param|
193
- value = self.send(attr)
194
- next if value.nil?
195
- hash[param] = _to_hash(value)
196
- end
197
- hash
198
- end
199
-
200
- # Outputs non-array value in the form of hash
201
- # For object, use to_hash. Otherwise, just return the value
202
- # @param [Object] value Any valid value
203
- # @return [Hash] Returns the value in the form of hash
204
- def _to_hash(value)
205
- if value.is_a?(Array)
206
- value.compact.map { |v| _to_hash(v) }
207
- elsif value.is_a?(Hash)
208
- {}.tap do |hash|
209
- value.each { |k, v| hash[k] = _to_hash(v) }
210
- end
211
- elsif value.respond_to? :to_hash
212
- value.to_hash
213
- else
214
- value
215
- end
216
- end
217
- end
218
- 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 document replace result DTO.
27
+ class DocumentReplaceResult < Document
28
+ # Gets or sets the number of matches
29
+ attr_accessor :matches
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ super.merge({
34
+ :'matches' => :'Matches',
35
+ })
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.swagger_types
40
+ super.merge({
41
+ :'matches' => :'Integer',
42
+ })
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ super
49
+
50
+ if attributes.has_key?(:'Matches')
51
+ self.matches = attributes[:'Matches']
52
+ end
53
+ end
54
+
55
+ # Show invalid properties with the reasons. Usually used together with valid?
56
+ # @return Array for valid properties with the reasons
57
+ def list_invalid_properties
58
+ invalid_properties = super
59
+ if @matches.nil?
60
+ invalid_properties.push('invalid value for "matches", matches cannot be nil.')
61
+ end
62
+
63
+ invalid_properties
64
+ end
65
+
66
+ # Check to see if the all the properties in the model are valid
67
+ # @return true if the model is valid
68
+ def valid?
69
+ return false if !super
70
+ return false if @matches.nil?
71
+ true
72
+ end
73
+
74
+ # Checks equality by comparing each attribute.
75
+ # @param [Object] Object to be compared
76
+ def ==(o)
77
+ return true if self.equal?(o)
78
+ self.class == o.class &&
79
+ self_uri == o.self_uri &&
80
+ alternate_links == o.alternate_links &&
81
+ document_properties == o.document_properties &&
82
+ view_properties == o.view_properties &&
83
+ slides == o.slides &&
84
+ images == o.images &&
85
+ layout_slides == o.layout_slides &&
86
+ master_slides == o.master_slides &&
87
+ matches == o.matches
88
+ end
89
+
90
+ # @see the `==` method
91
+ # @param [Object] Object to be compared
92
+ def eql?(o)
93
+ self == o
94
+ end
95
+
96
+ # Calculates hash code according to all attributes.
97
+ # @return [Fixnum] Hash code
98
+ def hash
99
+ [self_uri, alternate_links, document_properties, view_properties, slides, images, layout_slides, master_slides, matches].hash
100
+ end
101
+
102
+ # Builds the object from hash
103
+ # @param [Hash] attributes Model attributes in the form of hash
104
+ # @return [Object] Returns the model itself
105
+ def build_from_hash(attributes)
106
+ return nil unless attributes.is_a?(Hash)
107
+ self.class.swagger_types.each_pair do |key, type|
108
+ mapKey = self.class.attribute_map[key]
109
+ if !mapKey.nil?
110
+ val = attributes[mapKey]
111
+ if val.nil?
112
+ mapKeyString = mapKey.to_s
113
+ mapKeyString[0] = mapKeyString[0].downcase
114
+ mapKey = mapKeyString.to_sym
115
+ val = attributes[mapKey]
116
+ end
117
+ if !val.nil?
118
+ if type =~ /\AArray<(.*)>/i
119
+ # check to ensure the input is an array given that the the attribute
120
+ # is documented as an array but the input is not
121
+ if val.is_a?(Array)
122
+ self.send("#{key}=", val.map { |v| _deserialize($1, v) })
123
+ end
124
+ else
125
+ self.send("#{key}=", _deserialize(type, val))
126
+ end
127
+ end
128
+ end
129
+ end
130
+
131
+ self
132
+ end
133
+
134
+ # Deserializes the data based on type
135
+ # @param string type Data type
136
+ # @param string value Value to be deserialized
137
+ # @return [Object] Deserialized data
138
+ def _deserialize(type, value)
139
+ case type.to_sym
140
+ when :DateTime
141
+ DateTime.parse(value)
142
+ when :Date
143
+ Date.parse(value)
144
+ when :String
145
+ value.to_s
146
+ when :Integer
147
+ value.to_i
148
+ when :Float
149
+ value.to_f
150
+ when :BOOLEAN
151
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
152
+ true
153
+ else
154
+ false
155
+ end
156
+ when :Object
157
+ # generic object (usually a Hash), return directly
158
+ value
159
+ when /\AArray<(?<inner_type>.+)>\z/
160
+ inner_type = Regexp.last_match[:inner_type]
161
+ value.map { |v| _deserialize(inner_type, v) }
162
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
163
+ k_type = Regexp.last_match[:k_type]
164
+ v_type = Regexp.last_match[:v_type]
165
+ {}.tap do |hash|
166
+ value.each do |k, v|
167
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
168
+ end
169
+ end
170
+ else # model
171
+ temp_model = AsposeSlidesCloud.const_get(type).new
172
+ temp_model.build_from_hash(value)
173
+ end
174
+ end
175
+
176
+ # Returns the string representation of the object
177
+ # @return [String] String presentation of the object
178
+ def to_s
179
+ to_hash.to_s
180
+ end
181
+
182
+ # to_body is an alias to to_hash (backward compatibility)
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_body
185
+ to_hash
186
+ end
187
+
188
+ # Returns the object in the form of hash
189
+ # @return [Hash] Returns the object in the form of hash
190
+ def to_hash
191
+ hash = {}
192
+ self.class.attribute_map.each_pair do |attr, param|
193
+ value = self.send(attr)
194
+ next if value.nil?
195
+ hash[param] = _to_hash(value)
196
+ end
197
+ hash
198
+ end
199
+
200
+ # Outputs non-array value in the form of hash
201
+ # For object, use to_hash. Otherwise, just return the value
202
+ # @param [Object] value Any valid value
203
+ # @return [Hash] Returns the value in the form of hash
204
+ def _to_hash(value)
205
+ if value.is_a?(Array)
206
+ value.compact.map { |v| _to_hash(v) }
207
+ elsif value.is_a?(Hash)
208
+ {}.tap do |hash|
209
+ value.each { |k, v| hash[k] = _to_hash(v) }
210
+ end
211
+ elsif value.respond_to? :to_hash
212
+ value.to_hash
213
+ else
214
+ value
215
+ end
216
+ end
217
+ end
218
+ end
@@ -1,424 +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
- 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
+ # 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