aspose_slides_cloud 22.9.0 → 22.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -411,9 +411,9 @@ module AsposeSlidesCloud
411
411
  value = ""
412
412
  end
413
413
  if value.to_s != ""
414
- value = "/" + value.to_s
414
+ value = "/" + CGI.escape(value.to_s).gsub('+', '%20')
415
415
  end
416
- path.sub('/{' + name + '}', CGI.escape(value))
416
+ path.sub('/{' + name + '}', value)
417
417
  end
418
418
 
419
419
  # Process parameter for query.
@@ -70,6 +70,12 @@ module AsposeSlidesCloud
70
70
  # Delay time after trigger.
71
71
  attr_accessor :trigger_delay_time
72
72
 
73
+ # Specifies if the effect will repeat until the end of slide.
74
+ attr_accessor :repeat_until_end_slide
75
+
76
+ # Specifies if the effect will repeat until the next click.
77
+ attr_accessor :repeat_until_next_click
78
+
73
79
  class EnumAttributeValidator
74
80
  attr_reader :datatype
75
81
  attr_reader :allowable_values
@@ -110,6 +116,8 @@ module AsposeSlidesCloud
110
116
  :'restart' => :'Restart',
111
117
  :'speed' => :'Speed',
112
118
  :'trigger_delay_time' => :'TriggerDelayTime',
119
+ :'repeat_until_end_slide' => :'RepeatUntilEndSlide',
120
+ :'repeat_until_next_click' => :'RepeatUntilNextClick',
113
121
  }
114
122
  end
115
123
 
@@ -131,6 +139,8 @@ module AsposeSlidesCloud
131
139
  :'restart' => :'String',
132
140
  :'speed' => :'Float',
133
141
  :'trigger_delay_time' => :'Float',
142
+ :'repeat_until_end_slide' => :'BOOLEAN',
143
+ :'repeat_until_next_click' => :'BOOLEAN',
134
144
  }
135
145
  end
136
146
 
@@ -201,6 +211,14 @@ module AsposeSlidesCloud
201
211
  if attributes.has_key?(:'TriggerDelayTime')
202
212
  self.trigger_delay_time = attributes[:'TriggerDelayTime']
203
213
  end
214
+
215
+ if attributes.has_key?(:'RepeatUntilEndSlide')
216
+ self.repeat_until_end_slide = attributes[:'RepeatUntilEndSlide']
217
+ end
218
+
219
+ if attributes.has_key?(:'RepeatUntilNextClick')
220
+ self.repeat_until_next_click = attributes[:'RepeatUntilNextClick']
221
+ end
204
222
  end
205
223
 
206
224
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -300,7 +318,9 @@ module AsposeSlidesCloud
300
318
  repeat_duration == o.repeat_duration &&
301
319
  restart == o.restart &&
302
320
  speed == o.speed &&
303
- trigger_delay_time == o.trigger_delay_time
321
+ trigger_delay_time == o.trigger_delay_time &&
322
+ repeat_until_end_slide == o.repeat_until_end_slide &&
323
+ repeat_until_next_click == o.repeat_until_next_click
304
324
  end
305
325
 
306
326
  # @see the `==` method
@@ -312,7 +332,7 @@ module AsposeSlidesCloud
312
332
  # Calculates hash code according to all attributes.
313
333
  # @return [Fixnum] Hash code
314
334
  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
335
+ [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, repeat_until_end_slide, repeat_until_next_click].hash
316
336
  end
317
337
 
318
338
  # Builds the object from hash
@@ -0,0 +1,325 @@
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
+ # Slide show properties.
27
+ class SlideShowProperties < ResourceBase
28
+ # Loop slide show.
29
+ attr_accessor :loop
30
+
31
+ # Start slide in the slide show.
32
+ attr_accessor :start_slide
33
+
34
+ # End slides in the slide show.
35
+ attr_accessor :end_slide
36
+
37
+ # Pen color.
38
+ attr_accessor :pen_color
39
+
40
+ # Show animation.
41
+ attr_accessor :show_animation
42
+
43
+ # Show narrration.
44
+ attr_accessor :show_narration
45
+
46
+ # Use timings.
47
+ attr_accessor :use_timings
48
+
49
+ # Slide show type.
50
+ attr_accessor :slide_show_type
51
+
52
+ # Show scroll bar. Applied with BrowsedByIndividual slide show type.
53
+ attr_accessor :show_scrollbar
54
+
55
+ class EnumAttributeValidator
56
+ attr_reader :datatype
57
+ attr_reader :allowable_values
58
+
59
+ def initialize(datatype, allowable_values)
60
+ @allowable_values = allowable_values.map do |value|
61
+ case datatype.to_s
62
+ when /Integer/i
63
+ value.to_i
64
+ when /Float/i
65
+ value.to_f
66
+ else
67
+ value
68
+ end
69
+ end
70
+ end
71
+
72
+ def valid?(value)
73
+ !value || allowable_values.any?{ |s| s.casecmp(value) == 0 }
74
+ end
75
+ end
76
+
77
+ # Attribute mapping from ruby-style variable name to JSON key.
78
+ def self.attribute_map
79
+ super.merge({
80
+ :'loop' => :'Loop',
81
+ :'start_slide' => :'StartSlide',
82
+ :'end_slide' => :'EndSlide',
83
+ :'pen_color' => :'PenColor',
84
+ :'show_animation' => :'ShowAnimation',
85
+ :'show_narration' => :'ShowNarration',
86
+ :'use_timings' => :'UseTimings',
87
+ :'slide_show_type' => :'SlideShowType',
88
+ :'show_scrollbar' => :'ShowScrollbar',
89
+ })
90
+ end
91
+
92
+ # Attribute type mapping.
93
+ def self.swagger_types
94
+ super.merge({
95
+ :'loop' => :'BOOLEAN',
96
+ :'start_slide' => :'Integer',
97
+ :'end_slide' => :'Integer',
98
+ :'pen_color' => :'String',
99
+ :'show_animation' => :'BOOLEAN',
100
+ :'show_narration' => :'BOOLEAN',
101
+ :'use_timings' => :'BOOLEAN',
102
+ :'slide_show_type' => :'String',
103
+ :'show_scrollbar' => :'BOOLEAN',
104
+ })
105
+ end
106
+
107
+ # Initializes the object
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ def initialize(attributes = {})
110
+ super
111
+
112
+ if attributes.has_key?(:'Loop')
113
+ self.loop = attributes[:'Loop']
114
+ end
115
+
116
+ if attributes.has_key?(:'StartSlide')
117
+ self.start_slide = attributes[:'StartSlide']
118
+ end
119
+
120
+ if attributes.has_key?(:'EndSlide')
121
+ self.end_slide = attributes[:'EndSlide']
122
+ end
123
+
124
+ if attributes.has_key?(:'PenColor')
125
+ self.pen_color = attributes[:'PenColor']
126
+ end
127
+
128
+ if attributes.has_key?(:'ShowAnimation')
129
+ self.show_animation = attributes[:'ShowAnimation']
130
+ end
131
+
132
+ if attributes.has_key?(:'ShowNarration')
133
+ self.show_narration = attributes[:'ShowNarration']
134
+ end
135
+
136
+ if attributes.has_key?(:'UseTimings')
137
+ self.use_timings = attributes[:'UseTimings']
138
+ end
139
+
140
+ if attributes.has_key?(:'SlideShowType')
141
+ self.slide_show_type = attributes[:'SlideShowType']
142
+ end
143
+
144
+ if attributes.has_key?(:'ShowScrollbar')
145
+ self.show_scrollbar = attributes[:'ShowScrollbar']
146
+ end
147
+ end
148
+
149
+ # Show invalid properties with the reasons. Usually used together with valid?
150
+ # @return Array for valid properties with the reasons
151
+ def list_invalid_properties
152
+ invalid_properties = super
153
+ invalid_properties
154
+ end
155
+
156
+ # Check to see if the all the properties in the model are valid
157
+ # @return true if the model is valid
158
+ def valid?
159
+ return false if !super
160
+ slide_show_type_validator = EnumAttributeValidator.new('String', ['BrowsedAtKiosk', 'BrowsedByIndividual', 'PresentedBySpeaker'])
161
+ return false unless slide_show_type_validator.valid?(@slide_show_type)
162
+ true
163
+ end
164
+
165
+ # Custom attribute writer method checking allowed values (enum).
166
+ # @param [Object] slide_show_type Object to be assigned
167
+ def slide_show_type=(slide_show_type)
168
+ validator = EnumAttributeValidator.new('String', ['BrowsedAtKiosk', 'BrowsedByIndividual', 'PresentedBySpeaker'])
169
+ unless validator.valid?(slide_show_type)
170
+ fail ArgumentError, 'invalid value for "slide_show_type", must be one of #{validator.allowable_values}.'
171
+ end
172
+ @slide_show_type = slide_show_type
173
+ end
174
+
175
+ # Checks equality by comparing each attribute.
176
+ # @param [Object] Object to be compared
177
+ def ==(o)
178
+ return true if self.equal?(o)
179
+ self.class == o.class &&
180
+ self_uri == o.self_uri &&
181
+ alternate_links == o.alternate_links &&
182
+ loop == o.loop &&
183
+ start_slide == o.start_slide &&
184
+ end_slide == o.end_slide &&
185
+ pen_color == o.pen_color &&
186
+ show_animation == o.show_animation &&
187
+ show_narration == o.show_narration &&
188
+ use_timings == o.use_timings &&
189
+ slide_show_type == o.slide_show_type &&
190
+ show_scrollbar == o.show_scrollbar
191
+ end
192
+
193
+ # @see the `==` method
194
+ # @param [Object] Object to be compared
195
+ def eql?(o)
196
+ self == o
197
+ end
198
+
199
+ # Calculates hash code according to all attributes.
200
+ # @return [Fixnum] Hash code
201
+ def hash
202
+ [self_uri, alternate_links, loop, start_slide, end_slide, pen_color, show_animation, show_narration, use_timings, slide_show_type, show_scrollbar].hash
203
+ end
204
+
205
+ # Builds the object from hash
206
+ # @param [Hash] attributes Model attributes in the form of hash
207
+ # @return [Object] Returns the model itself
208
+ def build_from_hash(attributes)
209
+ return nil unless attributes.is_a?(Hash)
210
+ self.class.swagger_types.each_pair do |key, type|
211
+ mapKey = self.class.attribute_map[key]
212
+ if !mapKey.nil?
213
+ val = attributes[mapKey]
214
+ if val.nil?
215
+ mapKeyString = mapKey.to_s
216
+ mapKeyString[0] = mapKeyString[0].downcase
217
+ mapKey = mapKeyString.to_sym
218
+ val = attributes[mapKey]
219
+ end
220
+ if !val.nil?
221
+ if type =~ /\AArray<(.*)>/i
222
+ # check to ensure the input is an array given that the the attribute
223
+ # is documented as an array but the input is not
224
+ if val.is_a?(Array)
225
+ self.send("#{key}=", val.map { |v| _deserialize($1, v) })
226
+ end
227
+ else
228
+ self.send("#{key}=", _deserialize(type, val))
229
+ end
230
+ end
231
+ end
232
+ end
233
+
234
+ self
235
+ end
236
+
237
+ # Deserializes the data based on type
238
+ # @param string type Data type
239
+ # @param string value Value to be deserialized
240
+ # @return [Object] Deserialized data
241
+ def _deserialize(type, value)
242
+ case type.to_sym
243
+ when :DateTime
244
+ DateTime.parse(value)
245
+ when :Date
246
+ Date.parse(value)
247
+ when :String
248
+ value.to_s
249
+ when :Integer
250
+ value.to_i
251
+ when :Float
252
+ value.to_f
253
+ when :BOOLEAN
254
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
255
+ true
256
+ else
257
+ false
258
+ end
259
+ when :Object
260
+ # generic object (usually a Hash), return directly
261
+ value
262
+ when /\AArray<(?<inner_type>.+)>\z/
263
+ inner_type = Regexp.last_match[:inner_type]
264
+ value.map { |v| _deserialize(inner_type, v) }
265
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
266
+ k_type = Regexp.last_match[:k_type]
267
+ v_type = Regexp.last_match[:v_type]
268
+ {}.tap do |hash|
269
+ value.each do |k, v|
270
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
271
+ end
272
+ end
273
+ else # model
274
+ registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
275
+ if registry_type
276
+ type = registry_type
277
+ end
278
+ temp_model = AsposeSlidesCloud.const_get(type).new
279
+ temp_model.build_from_hash(value)
280
+ end
281
+ end
282
+
283
+ # Returns the string representation of the object
284
+ # @return [String] String presentation of the object
285
+ def to_s
286
+ to_hash.to_s
287
+ end
288
+
289
+ # to_body is an alias to to_hash (backward compatibility)
290
+ # @return [Hash] Returns the object in the form of hash
291
+ def to_body
292
+ to_hash
293
+ end
294
+
295
+ # Returns the object in the form of hash
296
+ # @return [Hash] Returns the object in the form of hash
297
+ def to_hash
298
+ hash = {}
299
+ self.class.attribute_map.each_pair do |attr, param|
300
+ value = self.send(attr)
301
+ next if value.nil?
302
+ hash[param] = _to_hash(value)
303
+ end
304
+ hash
305
+ end
306
+
307
+ # Outputs non-array value in the form of hash
308
+ # For object, use to_hash. Otherwise, just return the value
309
+ # @param [Object] value Any valid value
310
+ # @return [Hash] Returns the value in the form of hash
311
+ def _to_hash(value)
312
+ if value.is_a?(Array)
313
+ value.compact.map { |v| _to_hash(v) }
314
+ elsif value.is_a?(Hash)
315
+ {}.tap do |hash|
316
+ value.each { |k, v| hash[k] = _to_hash(v) }
317
+ end
318
+ elsif value.respond_to? :to_hash
319
+ value.to_hash
320
+ else
321
+ value
322
+ end
323
+ end
324
+ end
325
+ end
@@ -173,6 +173,7 @@ module AsposeSlidesCloud
173
173
  :'SlideComments' => :'ResourceBase',
174
174
  :'SlideModernComment' => :'SlideCommentBase',
175
175
  :'SlideProperties' => :'ResourceBase',
176
+ :'SlideShowProperties' => :'ResourceBase',
176
177
  :'Slides' => :'ResourceBase',
177
178
  :'SolidFill' => :'FillFormat',
178
179
  :'SplitDocumentResult' => :'ResourceBase',
@@ -417,6 +418,7 @@ module AsposeSlidesCloud
417
418
  :'SlideComments' => { },
418
419
  :'SlideModernComment' => { :'Type' => "Modern", },
419
420
  :'SlideProperties' => { },
421
+ :'SlideShowProperties' => { },
420
422
  :'Slides' => { },
421
423
  :'SolidFill' => { :'Type' => "Solid", },
422
424
  :'SplitDocumentResult' => { },
@@ -21,5 +21,5 @@ SOFTWARE.
21
21
  =end
22
22
 
23
23
  module AsposeSlidesCloud
24
- VERSION = '22.9.0'
24
+ VERSION = '22.10.0'
25
25
  end
@@ -222,6 +222,7 @@ require 'aspose_slides_cloud/models/slide_comment'
222
222
  require 'aspose_slides_cloud/models/slide_comments'
223
223
  require 'aspose_slides_cloud/models/slide_modern_comment'
224
224
  require 'aspose_slides_cloud/models/slide_properties'
225
+ require 'aspose_slides_cloud/models/slide_show_properties'
225
226
  require 'aspose_slides_cloud/models/slides'
226
227
  require 'aspose_slides_cloud/models/solid_fill'
227
228
  require 'aspose_slides_cloud/models/split_document_result'