shotstack 0.1.3 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,16 +1,17 @@
1
1
  =begin
2
2
  #Shotstack
3
3
 
4
- #The Shotstack API is a video editing service that allows for the automated creation of videos using JSON. You can configure an edit and POST it to the Shotstack API which will render your video and provide a file location when complete. For more details check https://shotstack.io
4
+ #The Shotstack API is a video editing service that allows for the automated creation of videos using JSON. You can configure an edit and POST it to the Shotstack API which will render your video and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.gitbook.io/docs/guides/getting-started) documentation.
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.1
9
+ OpenAPI Generator version: 5.0.0
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
 
15
16
  module Shotstack
16
17
  class RenderResponseData
@@ -93,6 +94,11 @@ module Shotstack
93
94
  }
94
95
  end
95
96
 
97
+ # Returns all the JSON keys this model knows about
98
+ def self.acceptable_attributes
99
+ attribute_map.values
100
+ end
101
+
96
102
  # Attribute type mapping.
97
103
  def self.openapi_types
98
104
  {
@@ -286,7 +292,9 @@ module Shotstack
286
292
  def build_from_hash(attributes)
287
293
  return nil unless attributes.is_a?(Hash)
288
294
  self.class.openapi_types.each_pair do |key, type|
289
- if type =~ /\AArray<(.*)>/i
295
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
296
+ self.send("#{key}=", nil)
297
+ elsif type =~ /\AArray<(.*)>/i
290
298
  # check to ensure the input is an array given that the attribute
291
299
  # is documented as an array but the input is not
292
300
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -294,7 +302,7 @@ module Shotstack
294
302
  end
295
303
  elsif !attributes[self.class.attribute_map[key]].nil?
296
304
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
297
- end # or else data not found in attributes(hash), not an issue as the data can be optional
305
+ end
298
306
  end
299
307
 
300
308
  self
@@ -306,8 +314,8 @@ module Shotstack
306
314
  # @return [Object] Deserialized data
307
315
  def _deserialize(type, value)
308
316
  case type.to_sym
309
- when :DateTime
310
- DateTime.parse(value)
317
+ when :Time
318
+ Time.parse(value)
311
319
  when :Date
312
320
  Date.parse(value)
313
321
  when :String
@@ -337,7 +345,9 @@ module Shotstack
337
345
  end
338
346
  end
339
347
  else # model
340
- Shotstack.const_get(type).build_from_hash(value)
348
+ # models (e.g. Pet) or oneOf
349
+ klass = Shotstack.const_get(type)
350
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
341
351
  end
342
352
  end
343
353
 
@@ -363,7 +373,7 @@ module Shotstack
363
373
  is_nullable = self.class.openapi_nullable.include?(attr)
364
374
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
365
375
  end
366
-
376
+
367
377
  hash[param] = _to_hash(value)
368
378
  end
369
379
  hash
@@ -386,5 +396,7 @@ module Shotstack
386
396
  value
387
397
  end
388
398
  end
399
+
389
400
  end
401
+
390
402
  end
@@ -1,16 +1,17 @@
1
1
  =begin
2
2
  #Shotstack
3
3
 
4
- #The Shotstack API is a video editing service that allows for the automated creation of videos using JSON. You can configure an edit and POST it to the Shotstack API which will render your video and provide a file location when complete. For more details check https://shotstack.io
4
+ #The Shotstack API is a video editing service that allows for the automated creation of videos using JSON. You can configure an edit and POST it to the Shotstack API which will render your video and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.gitbook.io/docs/guides/getting-started) documentation.
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.1
9
+ OpenAPI Generator version: 5.0.0
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
 
15
16
  module Shotstack
16
17
  # A music or audio file in mp3 format that plays for the duration of the rendered video or the length of the audio file, which ever is shortest.
@@ -55,6 +56,11 @@ module Shotstack
55
56
  }
56
57
  end
57
58
 
59
+ # Returns all the JSON keys this model knows about
60
+ def self.acceptable_attributes
61
+ attribute_map.values
62
+ end
63
+
58
64
  # Attribute type mapping.
59
65
  def self.openapi_types
60
66
  {
@@ -165,7 +171,9 @@ module Shotstack
165
171
  def build_from_hash(attributes)
166
172
  return nil unless attributes.is_a?(Hash)
167
173
  self.class.openapi_types.each_pair do |key, type|
168
- if type =~ /\AArray<(.*)>/i
174
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
175
+ self.send("#{key}=", nil)
176
+ elsif type =~ /\AArray<(.*)>/i
169
177
  # check to ensure the input is an array given that the attribute
170
178
  # is documented as an array but the input is not
171
179
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -173,7 +181,7 @@ module Shotstack
173
181
  end
174
182
  elsif !attributes[self.class.attribute_map[key]].nil?
175
183
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
176
- end # or else data not found in attributes(hash), not an issue as the data can be optional
184
+ end
177
185
  end
178
186
 
179
187
  self
@@ -185,8 +193,8 @@ module Shotstack
185
193
  # @return [Object] Deserialized data
186
194
  def _deserialize(type, value)
187
195
  case type.to_sym
188
- when :DateTime
189
- DateTime.parse(value)
196
+ when :Time
197
+ Time.parse(value)
190
198
  when :Date
191
199
  Date.parse(value)
192
200
  when :String
@@ -216,7 +224,9 @@ module Shotstack
216
224
  end
217
225
  end
218
226
  else # model
219
- Shotstack.const_get(type).build_from_hash(value)
227
+ # models (e.g. Pet) or oneOf
228
+ klass = Shotstack.const_get(type)
229
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
220
230
  end
221
231
  end
222
232
 
@@ -242,7 +252,7 @@ module Shotstack
242
252
  is_nullable = self.class.openapi_nullable.include?(attr)
243
253
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
244
254
  end
245
-
255
+
246
256
  hash[param] = _to_hash(value)
247
257
  end
248
258
  hash
@@ -265,5 +275,7 @@ module Shotstack
265
275
  value
266
276
  end
267
277
  end
278
+
268
279
  end
280
+
269
281
  end
@@ -1,16 +1,17 @@
1
1
  =begin
2
2
  #Shotstack
3
3
 
4
- #The Shotstack API is a video editing service that allows for the automated creation of videos using JSON. You can configure an edit and POST it to the Shotstack API which will render your video and provide a file location when complete. For more details check https://shotstack.io
4
+ #The Shotstack API is a video editing service that allows for the automated creation of videos using JSON. You can configure an edit and POST it to the Shotstack API which will render your video and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.gitbook.io/docs/guides/getting-started) documentation.
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.1
9
+ OpenAPI Generator version: 5.0.0
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
 
15
16
  module Shotstack
16
17
  # Generate a thumbnail image for the video at a specific point from the timeline.
@@ -29,6 +30,11 @@ module Shotstack
29
30
  }
30
31
  end
31
32
 
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ attribute_map.values
36
+ end
37
+
32
38
  # Attribute type mapping.
33
39
  def self.openapi_types
34
40
  {
@@ -124,7 +130,9 @@ module Shotstack
124
130
  def build_from_hash(attributes)
125
131
  return nil unless attributes.is_a?(Hash)
126
132
  self.class.openapi_types.each_pair do |key, type|
127
- if type =~ /\AArray<(.*)>/i
133
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
134
+ self.send("#{key}=", nil)
135
+ elsif type =~ /\AArray<(.*)>/i
128
136
  # check to ensure the input is an array given that the attribute
129
137
  # is documented as an array but the input is not
130
138
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -132,7 +140,7 @@ module Shotstack
132
140
  end
133
141
  elsif !attributes[self.class.attribute_map[key]].nil?
134
142
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
135
- end # or else data not found in attributes(hash), not an issue as the data can be optional
143
+ end
136
144
  end
137
145
 
138
146
  self
@@ -144,8 +152,8 @@ module Shotstack
144
152
  # @return [Object] Deserialized data
145
153
  def _deserialize(type, value)
146
154
  case type.to_sym
147
- when :DateTime
148
- DateTime.parse(value)
155
+ when :Time
156
+ Time.parse(value)
149
157
  when :Date
150
158
  Date.parse(value)
151
159
  when :String
@@ -175,7 +183,9 @@ module Shotstack
175
183
  end
176
184
  end
177
185
  else # model
178
- Shotstack.const_get(type).build_from_hash(value)
186
+ # models (e.g. Pet) or oneOf
187
+ klass = Shotstack.const_get(type)
188
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
179
189
  end
180
190
  end
181
191
 
@@ -201,7 +211,7 @@ module Shotstack
201
211
  is_nullable = self.class.openapi_nullable.include?(attr)
202
212
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
203
213
  end
204
-
214
+
205
215
  hash[param] = _to_hash(value)
206
216
  end
207
217
  hash
@@ -224,5 +234,7 @@ module Shotstack
224
234
  value
225
235
  end
226
236
  end
237
+
227
238
  end
239
+
228
240
  end
@@ -1,16 +1,17 @@
1
1
  =begin
2
2
  #Shotstack
3
3
 
4
- #The Shotstack API is a video editing service that allows for the automated creation of videos using JSON. You can configure an edit and POST it to the Shotstack API which will render your video and provide a file location when complete. For more details check https://shotstack.io
4
+ #The Shotstack API is a video editing service that allows for the automated creation of videos using JSON. You can configure an edit and POST it to the Shotstack API which will render your video and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.gitbook.io/docs/guides/getting-started) documentation.
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.1
9
+ OpenAPI Generator version: 5.0.0
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
 
15
16
  module Shotstack
16
17
  # A timeline represents the contents of a video edit over time, in seconds. A timeline consists of layers called tracks. Tracks are composed of titles, images or video segments referred to as clips which are placed along the track at specific starting point and lasting for a specific amount of time.
@@ -26,23 +27,33 @@ module Shotstack
26
27
  # A timeline consists of an array of tracks, each track containing clips. Tracks are layered on top of each other in the same order they are added to the array with the top most track layered over the top of those below it. Ensure that a track containing titles is the top most track so that it is displayed above videos and images.
27
28
  attr_accessor :tracks
28
29
 
30
+ # Disable the caching of ingested source footage and assets. See [caching](https://shotstack.gitbook.io/docs/guides/architecting-an-application/caching) for more details.
31
+ attr_accessor :cache
32
+
29
33
  # Attribute mapping from ruby-style variable name to JSON key.
30
34
  def self.attribute_map
31
35
  {
32
36
  :'soundtrack' => :'soundtrack',
33
37
  :'background' => :'background',
34
38
  :'fonts' => :'fonts',
35
- :'tracks' => :'tracks'
39
+ :'tracks' => :'tracks',
40
+ :'cache' => :'cache'
36
41
  }
37
42
  end
38
43
 
44
+ # Returns all the JSON keys this model knows about
45
+ def self.acceptable_attributes
46
+ attribute_map.values
47
+ end
48
+
39
49
  # Attribute type mapping.
40
50
  def self.openapi_types
41
51
  {
42
52
  :'soundtrack' => :'Soundtrack',
43
53
  :'background' => :'String',
44
54
  :'fonts' => :'Array<Font>',
45
- :'tracks' => :'Array<Track>'
55
+ :'tracks' => :'Array<Track>',
56
+ :'cache' => :'Boolean'
46
57
  }
47
58
  end
48
59
 
@@ -88,6 +99,12 @@ module Shotstack
88
99
  self.tracks = value
89
100
  end
90
101
  end
102
+
103
+ if attributes.key?(:'cache')
104
+ self.cache = attributes[:'cache']
105
+ else
106
+ self.cache = true
107
+ end
91
108
  end
92
109
 
93
110
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -116,7 +133,8 @@ module Shotstack
116
133
  soundtrack == o.soundtrack &&
117
134
  background == o.background &&
118
135
  fonts == o.fonts &&
119
- tracks == o.tracks
136
+ tracks == o.tracks &&
137
+ cache == o.cache
120
138
  end
121
139
 
122
140
  # @see the `==` method
@@ -128,7 +146,7 @@ module Shotstack
128
146
  # Calculates hash code according to all attributes.
129
147
  # @return [Integer] Hash code
130
148
  def hash
131
- [soundtrack, background, fonts, tracks].hash
149
+ [soundtrack, background, fonts, tracks, cache].hash
132
150
  end
133
151
 
134
152
  # Builds the object from hash
@@ -144,7 +162,9 @@ module Shotstack
144
162
  def build_from_hash(attributes)
145
163
  return nil unless attributes.is_a?(Hash)
146
164
  self.class.openapi_types.each_pair do |key, type|
147
- if type =~ /\AArray<(.*)>/i
165
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
166
+ self.send("#{key}=", nil)
167
+ elsif type =~ /\AArray<(.*)>/i
148
168
  # check to ensure the input is an array given that the attribute
149
169
  # is documented as an array but the input is not
150
170
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -152,7 +172,7 @@ module Shotstack
152
172
  end
153
173
  elsif !attributes[self.class.attribute_map[key]].nil?
154
174
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
155
- end # or else data not found in attributes(hash), not an issue as the data can be optional
175
+ end
156
176
  end
157
177
 
158
178
  self
@@ -164,8 +184,8 @@ module Shotstack
164
184
  # @return [Object] Deserialized data
165
185
  def _deserialize(type, value)
166
186
  case type.to_sym
167
- when :DateTime
168
- DateTime.parse(value)
187
+ when :Time
188
+ Time.parse(value)
169
189
  when :Date
170
190
  Date.parse(value)
171
191
  when :String
@@ -195,7 +215,9 @@ module Shotstack
195
215
  end
196
216
  end
197
217
  else # model
198
- Shotstack.const_get(type).build_from_hash(value)
218
+ # models (e.g. Pet) or oneOf
219
+ klass = Shotstack.const_get(type)
220
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
199
221
  end
200
222
  end
201
223
 
@@ -221,7 +243,7 @@ module Shotstack
221
243
  is_nullable = self.class.openapi_nullable.include?(attr)
222
244
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
223
245
  end
224
-
246
+
225
247
  hash[param] = _to_hash(value)
226
248
  end
227
249
  hash
@@ -244,5 +266,7 @@ module Shotstack
244
266
  value
245
267
  end
246
268
  end
269
+
247
270
  end
271
+
248
272
  end
@@ -1,16 +1,17 @@
1
1
  =begin
2
2
  #Shotstack
3
3
 
4
- #The Shotstack API is a video editing service that allows for the automated creation of videos using JSON. You can configure an edit and POST it to the Shotstack API which will render your video and provide a file location when complete. For more details check https://shotstack.io
4
+ #The Shotstack API is a video editing service that allows for the automated creation of videos using JSON. You can configure an edit and POST it to the Shotstack API which will render your video and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.gitbook.io/docs/guides/getting-started) documentation.
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.1
9
+ OpenAPI Generator version: 5.0.0
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
  require_relative 'asset'
15
16
 
16
17
  module Shotstack
@@ -75,6 +76,11 @@ module Shotstack
75
76
  }
76
77
  end
77
78
 
79
+ # Returns all the JSON keys this model knows about
80
+ def self.acceptable_attributes
81
+ attribute_map.values
82
+ end
83
+
78
84
  # Attribute type mapping.
79
85
  def self.openapi_types
80
86
  {
@@ -250,7 +256,9 @@ module Shotstack
250
256
  def build_from_hash(attributes)
251
257
  return nil unless attributes.is_a?(Hash)
252
258
  self.class.openapi_types.each_pair do |key, type|
253
- if type =~ /\AArray<(.*)>/i
259
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
260
+ self.send("#{key}=", nil)
261
+ elsif type =~ /\AArray<(.*)>/i
254
262
  # check to ensure the input is an array given that the attribute
255
263
  # is documented as an array but the input is not
256
264
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -258,7 +266,7 @@ module Shotstack
258
266
  end
259
267
  elsif !attributes[self.class.attribute_map[key]].nil?
260
268
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
261
- end # or else data not found in attributes(hash), not an issue as the data can be optional
269
+ end
262
270
  end
263
271
 
264
272
  self
@@ -270,8 +278,8 @@ module Shotstack
270
278
  # @return [Object] Deserialized data
271
279
  def _deserialize(type, value)
272
280
  case type.to_sym
273
- when :DateTime
274
- DateTime.parse(value)
281
+ when :Time
282
+ Time.parse(value)
275
283
  when :Date
276
284
  Date.parse(value)
277
285
  when :String
@@ -301,7 +309,9 @@ module Shotstack
301
309
  end
302
310
  end
303
311
  else # model
304
- Shotstack.const_get(type).build_from_hash(value)
312
+ # models (e.g. Pet) or oneOf
313
+ klass = Shotstack.const_get(type)
314
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
305
315
  end
306
316
  end
307
317
 
@@ -327,7 +337,7 @@ module Shotstack
327
337
  is_nullable = self.class.openapi_nullable.include?(attr)
328
338
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
329
339
  end
330
-
340
+
331
341
  hash[param] = _to_hash(value)
332
342
  end
333
343
  hash
@@ -350,5 +360,7 @@ module Shotstack
350
360
  value
351
361
  end
352
362
  end
363
+
353
364
  end
365
+
354
366
  end