shotstack 0.0.11 → 0.1.4

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.
@@ -1,12 +1,12 @@
1
1
  =begin
2
- #shotstack
2
+ #Shotstack
3
3
 
4
- #The Shotstack API is a video editing service that allows for the programatic creation of videos using JSON.
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
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.0.0
9
+ OpenAPI Generator version: 4.2.1
10
10
 
11
11
  =end
12
12
 
@@ -14,8 +14,10 @@ require 'date'
14
14
 
15
15
  module Shotstack
16
16
  class QueuedResponse
17
+ # `true` if successfully queued, else `false`.
17
18
  attr_accessor :success
18
19
 
20
+ # `Created`, `Bad Request` or an error message.
19
21
  attr_accessor :message
20
22
 
21
23
  attr_accessor :response
@@ -38,6 +40,12 @@ module Shotstack
38
40
  }
39
41
  end
40
42
 
43
+ # List of attributes with nullable: true
44
+ def self.openapi_nullable
45
+ Set.new([
46
+ ])
47
+ end
48
+
41
49
  # Initializes the object
42
50
  # @param [Hash] attributes Model attributes in the form of hash
43
51
  def initialize(attributes = {})
@@ -202,7 +210,11 @@ module Shotstack
202
210
  hash = {}
203
211
  self.class.attribute_map.each_pair do |attr, param|
204
212
  value = self.send(attr)
205
- next if value.nil?
213
+ if value.nil?
214
+ is_nullable = self.class.openapi_nullable.include?(attr)
215
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
216
+ end
217
+
206
218
  hash[param] = _to_hash(value)
207
219
  end
208
220
  hash
@@ -1,12 +1,12 @@
1
1
  =begin
2
- #shotstack
2
+ #Shotstack
3
3
 
4
- #The Shotstack API is a video editing service that allows for the programatic creation of videos using JSON.
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
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.0.0
9
+ OpenAPI Generator version: 4.2.1
10
10
 
11
11
  =end
12
12
 
@@ -14,10 +14,10 @@ require 'date'
14
14
 
15
15
  module Shotstack
16
16
  class QueuedResponseData
17
- # Success response message
17
+ # Success response message or error details.
18
18
  attr_accessor :message
19
19
 
20
- # The id of the render task in UUID format
20
+ # The id of the render task in UUID format.
21
21
  attr_accessor :id
22
22
 
23
23
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -36,6 +36,12 @@ module Shotstack
36
36
  }
37
37
  end
38
38
 
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([
42
+ ])
43
+ end
44
+
39
45
  # Initializes the object
40
46
  # @param [Hash] attributes Model attributes in the form of hash
41
47
  def initialize(attributes = {})
@@ -190,7 +196,11 @@ module Shotstack
190
196
  hash = {}
191
197
  self.class.attribute_map.each_pair do |attr, param|
192
198
  value = self.send(attr)
193
- next if value.nil?
199
+ if value.nil?
200
+ is_nullable = self.class.openapi_nullable.include?(attr)
201
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
202
+ end
203
+
194
204
  hash[param] = _to_hash(value)
195
205
  end
196
206
  hash
@@ -1,12 +1,12 @@
1
1
  =begin
2
- #shotstack
2
+ #Shotstack
3
3
 
4
- #The Shotstack API is a video editing service that allows for the programatic creation of videos using JSON.
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
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.0.0
9
+ OpenAPI Generator version: 4.2.1
10
10
 
11
11
  =end
12
12
 
@@ -14,8 +14,10 @@ require 'date'
14
14
 
15
15
  module Shotstack
16
16
  class RenderResponse
17
+ # `true` if status available, else `false`.
17
18
  attr_accessor :success
18
19
 
20
+ # `OK` or an error message.
19
21
  attr_accessor :message
20
22
 
21
23
  attr_accessor :response
@@ -38,6 +40,12 @@ module Shotstack
38
40
  }
39
41
  end
40
42
 
43
+ # List of attributes with nullable: true
44
+ def self.openapi_nullable
45
+ Set.new([
46
+ ])
47
+ end
48
+
41
49
  # Initializes the object
42
50
  # @param [Hash] attributes Model attributes in the form of hash
43
51
  def initialize(attributes = {})
@@ -202,7 +210,11 @@ module Shotstack
202
210
  hash = {}
203
211
  self.class.attribute_map.each_pair do |attr, param|
204
212
  value = self.send(attr)
205
- next if value.nil?
213
+ if value.nil?
214
+ is_nullable = self.class.openapi_nullable.include?(attr)
215
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
216
+ end
217
+
206
218
  hash[param] = _to_hash(value)
207
219
  end
208
220
  hash
@@ -1,12 +1,12 @@
1
1
  =begin
2
- #shotstack
2
+ #Shotstack
3
3
 
4
- #The Shotstack API is a video editing service that allows for the programatic creation of videos using JSON.
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
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.0.0
9
+ OpenAPI Generator version: 4.2.1
10
10
 
11
11
  =end
12
12
 
@@ -14,24 +14,42 @@ require 'date'
14
14
 
15
15
  module Shotstack
16
16
  class RenderResponseData
17
- # The status of the render task
18
- attr_accessor :status
19
-
20
- # The id of the render task in UUID format
17
+ # The id of the render task in UUID format.
21
18
  attr_accessor :id
22
19
 
23
- # The owner id of the render task
20
+ # The owner id of the render task.
24
21
  attr_accessor :owner
25
22
 
23
+ # The customer subscription plan.
24
+ attr_accessor :plan
25
+
26
+ # The status of the render task. <ul> <li>`queued` - render is queued waiting to be rendered</li> <li>`fetching` - assets are being fetched</li> <li>`rendering` - the video is being rendered</li> <li>`saving` - the final video is being saved to storage</li> <li>`done` - the video is ready to be downloaded</li> <li>`failed` - there was an error rendering the video</li> </ul>
27
+ attr_accessor :status
28
+
29
+ # An error message, only displayed if an error occurred.
30
+ attr_accessor :error
31
+
32
+ # The output video length in seconds.
33
+ attr_accessor :duration
34
+
35
+ # The time taken to render the video in milliseconds.
36
+ attr_accessor :render_time
37
+
26
38
  # The URL of the final video. This will only be available if status is done.
27
39
  attr_accessor :url
28
40
 
41
+ # The URL of the poster image if requested. This will only be available if status is done.
42
+ attr_accessor :poster
43
+
44
+ # The URL of the thumbnail image if requested. This will only be available if status is done.
45
+ attr_accessor :thumbnail
46
+
29
47
  attr_accessor :data
30
48
 
31
- # The time the render task was initially queued
49
+ # The time the render task was initially queued.
32
50
  attr_accessor :created
33
51
 
34
- # The time the render status was last updated
52
+ # The time the render status was last updated.
35
53
  attr_accessor :updated
36
54
 
37
55
  class EnumAttributeValidator
@@ -59,10 +77,16 @@ module Shotstack
59
77
  # Attribute mapping from ruby-style variable name to JSON key.
60
78
  def self.attribute_map
61
79
  {
62
- :'status' => :'status',
63
80
  :'id' => :'id',
64
81
  :'owner' => :'owner',
82
+ :'plan' => :'plan',
83
+ :'status' => :'status',
84
+ :'error' => :'error',
85
+ :'duration' => :'duration',
86
+ :'render_time' => :'renderTime',
65
87
  :'url' => :'url',
88
+ :'poster' => :'poster',
89
+ :'thumbnail' => :'thumbnail',
66
90
  :'data' => :'data',
67
91
  :'created' => :'created',
68
92
  :'updated' => :'updated'
@@ -72,16 +96,28 @@ module Shotstack
72
96
  # Attribute type mapping.
73
97
  def self.openapi_types
74
98
  {
75
- :'status' => :'String',
76
99
  :'id' => :'String',
77
100
  :'owner' => :'String',
101
+ :'plan' => :'String',
102
+ :'status' => :'String',
103
+ :'error' => :'String',
104
+ :'duration' => :'Float',
105
+ :'render_time' => :'Float',
78
106
  :'url' => :'String',
107
+ :'poster' => :'String',
108
+ :'thumbnail' => :'String',
79
109
  :'data' => :'Edit',
80
110
  :'created' => :'String',
81
111
  :'updated' => :'String'
82
112
  }
83
113
  end
84
114
 
115
+ # List of attributes with nullable: true
116
+ def self.openapi_nullable
117
+ Set.new([
118
+ ])
119
+ end
120
+
85
121
  # Initializes the object
86
122
  # @param [Hash] attributes Model attributes in the form of hash
87
123
  def initialize(attributes = {})
@@ -97,10 +133,6 @@ module Shotstack
97
133
  h[k.to_sym] = v
98
134
  }
99
135
 
100
- if attributes.key?(:'status')
101
- self.status = attributes[:'status']
102
- end
103
-
104
136
  if attributes.key?(:'id')
105
137
  self.id = attributes[:'id']
106
138
  end
@@ -109,10 +141,38 @@ module Shotstack
109
141
  self.owner = attributes[:'owner']
110
142
  end
111
143
 
144
+ if attributes.key?(:'plan')
145
+ self.plan = attributes[:'plan']
146
+ end
147
+
148
+ if attributes.key?(:'status')
149
+ self.status = attributes[:'status']
150
+ end
151
+
152
+ if attributes.key?(:'error')
153
+ self.error = attributes[:'error']
154
+ end
155
+
156
+ if attributes.key?(:'duration')
157
+ self.duration = attributes[:'duration']
158
+ end
159
+
160
+ if attributes.key?(:'render_time')
161
+ self.render_time = attributes[:'render_time']
162
+ end
163
+
112
164
  if attributes.key?(:'url')
113
165
  self.url = attributes[:'url']
114
166
  end
115
167
 
168
+ if attributes.key?(:'poster')
169
+ self.poster = attributes[:'poster']
170
+ end
171
+
172
+ if attributes.key?(:'thumbnail')
173
+ self.thumbnail = attributes[:'thumbnail']
174
+ end
175
+
116
176
  if attributes.key?(:'data')
117
177
  self.data = attributes[:'data']
118
178
  end
@@ -130,10 +190,6 @@ module Shotstack
130
190
  # @return Array for valid properties with the reasons
131
191
  def list_invalid_properties
132
192
  invalid_properties = Array.new
133
- if @status.nil?
134
- invalid_properties.push('invalid value for "status", status cannot be nil.')
135
- end
136
-
137
193
  if @id.nil?
138
194
  invalid_properties.push('invalid value for "id", id cannot be nil.')
139
195
  end
@@ -142,6 +198,10 @@ module Shotstack
142
198
  invalid_properties.push('invalid value for "owner", owner cannot be nil.')
143
199
  end
144
200
 
201
+ if @status.nil?
202
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
203
+ end
204
+
145
205
  if @data.nil?
146
206
  invalid_properties.push('invalid value for "data", data cannot be nil.')
147
207
  end
@@ -160,11 +220,11 @@ module Shotstack
160
220
  # Check to see if the all the properties in the model are valid
161
221
  # @return true if the model is valid
162
222
  def valid?
223
+ return false if @id.nil?
224
+ return false if @owner.nil?
163
225
  return false if @status.nil?
164
226
  status_validator = EnumAttributeValidator.new('String', ["queued", "fetching", "rendering", "saving", "done", "failed"])
165
227
  return false unless status_validator.valid?(@status)
166
- return false if @id.nil?
167
- return false if @owner.nil?
168
228
  return false if @data.nil?
169
229
  return false if @created.nil?
170
230
  return false if @updated.nil?
@@ -186,10 +246,16 @@ module Shotstack
186
246
  def ==(o)
187
247
  return true if self.equal?(o)
188
248
  self.class == o.class &&
189
- status == o.status &&
190
249
  id == o.id &&
191
250
  owner == o.owner &&
251
+ plan == o.plan &&
252
+ status == o.status &&
253
+ error == o.error &&
254
+ duration == o.duration &&
255
+ render_time == o.render_time &&
192
256
  url == o.url &&
257
+ poster == o.poster &&
258
+ thumbnail == o.thumbnail &&
193
259
  data == o.data &&
194
260
  created == o.created &&
195
261
  updated == o.updated
@@ -204,7 +270,7 @@ module Shotstack
204
270
  # Calculates hash code according to all attributes.
205
271
  # @return [Integer] Hash code
206
272
  def hash
207
- [status, id, owner, url, data, created, updated].hash
273
+ [id, owner, plan, status, error, duration, render_time, url, poster, thumbnail, data, created, updated].hash
208
274
  end
209
275
 
210
276
  # Builds the object from hash
@@ -293,7 +359,11 @@ module Shotstack
293
359
  hash = {}
294
360
  self.class.attribute_map.each_pair do |attr, param|
295
361
  value = self.send(attr)
296
- next if value.nil?
362
+ if value.nil?
363
+ is_nullable = self.class.openapi_nullable.include?(attr)
364
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
365
+ end
366
+
297
367
  hash[param] = _to_hash(value)
298
368
  end
299
369
  hash
@@ -1,26 +1,29 @@
1
1
  =begin
2
- #shotstack
2
+ #Shotstack
3
3
 
4
- #The Shotstack API is a video editing service that allows for the programatic creation of videos using JSON.
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
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.0.0
9
+ OpenAPI Generator version: 4.2.1
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
14
 
15
15
  module Shotstack
16
- # 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.
16
+ # 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.
17
17
  class Soundtrack
18
- # The URL of the mp3 audio file. The URL must be publicly accessible or include credentials.
18
+ # The URL of the mp3 audio file. The URL must be publicly accessible or include credentials.
19
19
  attr_accessor :src
20
20
 
21
- # The effect to apply to the audio file
21
+ # The effect to apply to the audio file <ul> <li>`fadeIn` - fade volume in only</li> <li>`fadeOut` - fade volume out only</li> <li>`fadeInFadeOut` - fade volume in and out</li> </ul>
22
22
  attr_accessor :effect
23
23
 
24
+ # Set the volume for the soundtrack between 0 and 1 where 0 is muted and 1 is full volume (defaults to 1).
25
+ attr_accessor :volume
26
+
24
27
  class EnumAttributeValidator
25
28
  attr_reader :datatype
26
29
  attr_reader :allowable_values
@@ -47,7 +50,8 @@ module Shotstack
47
50
  def self.attribute_map
48
51
  {
49
52
  :'src' => :'src',
50
- :'effect' => :'effect'
53
+ :'effect' => :'effect',
54
+ :'volume' => :'volume'
51
55
  }
52
56
  end
53
57
 
@@ -55,10 +59,17 @@ module Shotstack
55
59
  def self.openapi_types
56
60
  {
57
61
  :'src' => :'String',
58
- :'effect' => :'String'
62
+ :'effect' => :'String',
63
+ :'volume' => :'Float'
59
64
  }
60
65
  end
61
66
 
67
+ # List of attributes with nullable: true
68
+ def self.openapi_nullable
69
+ Set.new([
70
+ ])
71
+ end
72
+
62
73
  # Initializes the object
63
74
  # @param [Hash] attributes Model attributes in the form of hash
64
75
  def initialize(attributes = {})
@@ -81,6 +92,12 @@ module Shotstack
81
92
  if attributes.key?(:'effect')
82
93
  self.effect = attributes[:'effect']
83
94
  end
95
+
96
+ if attributes.key?(:'volume')
97
+ self.volume = attributes[:'volume']
98
+ else
99
+ self.volume = 1
100
+ end
84
101
  end
85
102
 
86
103
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -119,7 +136,8 @@ module Shotstack
119
136
  return true if self.equal?(o)
120
137
  self.class == o.class &&
121
138
  src == o.src &&
122
- effect == o.effect
139
+ effect == o.effect &&
140
+ volume == o.volume
123
141
  end
124
142
 
125
143
  # @see the `==` method
@@ -131,7 +149,7 @@ module Shotstack
131
149
  # Calculates hash code according to all attributes.
132
150
  # @return [Integer] Hash code
133
151
  def hash
134
- [src, effect].hash
152
+ [src, effect, volume].hash
135
153
  end
136
154
 
137
155
  # Builds the object from hash
@@ -220,7 +238,11 @@ module Shotstack
220
238
  hash = {}
221
239
  self.class.attribute_map.each_pair do |attr, param|
222
240
  value = self.send(attr)
223
- next if value.nil?
241
+ if value.nil?
242
+ is_nullable = self.class.openapi_nullable.include?(attr)
243
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
244
+ end
245
+
224
246
  hash[param] = _to_hash(value)
225
247
  end
226
248
  hash