Skip to content

Commit 40f20e9

Browse files
authored
Merge pull request #26 from shotstack/fix-templates-and-defaults
Remove default values and fix templates get request
2 parents 6bc9a81 + 45cd71b commit 40f20e9

24 files changed

+62
-86
lines changed

src/Model/Asset.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -364,14 +364,14 @@ public function __construct(array $data = null)
364364
$this->container['type'] = $data['type'] ?? 'luma';
365365
$this->container['src'] = $data['src'] ?? null;
366366
$this->container['trim'] = $data['trim'] ?? null;
367-
$this->container['volume'] = $data['volume'] ?? 1;
367+
$this->container['volume'] = $data['volume'] ?? null;
368368
$this->container['crop'] = $data['crop'] ?? null;
369369
$this->container['text'] = $data['text'] ?? null;
370370
$this->container['style'] = $data['style'] ?? null;
371-
$this->container['color'] = $data['color'] ?? '#ffffff';
372-
$this->container['size'] = $data['size'] ?? 'medium';
373-
$this->container['background'] = $data['background'] ?? 'transparent';
374-
$this->container['position'] = $data['position'] ?? 'center';
371+
$this->container['color'] = $data['color'] ?? null;
372+
$this->container['size'] = $data['size'] ?? null;
373+
$this->container['background'] = $data['background'] ?? null;
374+
$this->container['position'] = $data['position'] ?? null;
375375
$this->container['offset'] = $data['offset'] ?? null;
376376
$this->container['html'] = $data['html'] ?? null;
377377
$this->container['css'] = $data['css'] ?? null;

src/Model/AssetRenderResponse.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ public function valid()
212212
/**
213213
* Gets data
214214
*
215-
* @return \Shotstack\Client\Model\AssetResponseData[]|null
215+
* @return \Shotstack\Client\Model\AssetResponseData[]
216216
*/
217217
public function getData()
218218
{
@@ -222,7 +222,7 @@ public function getData()
222222
/**
223223
* Sets data
224224
*
225-
* @param \Shotstack\Client\Model\AssetResponseData[]|null $data An array of asset resources grouped by render id.
225+
* @param \Shotstack\Client\Model\AssetResponseData[] $data An array of asset resources grouped by render id.
226226
*
227227
* @return self
228228
*/

src/Model/AssetResponse.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ public function valid()
212212
/**
213213
* Gets data
214214
*
215-
* @return \Shotstack\Client\Model\AssetResponseData|null
215+
* @return \Shotstack\Client\Model\AssetResponseData
216216
*/
217217
public function getData()
218218
{
@@ -222,7 +222,7 @@ public function getData()
222222
/**
223223
* Sets data
224224
*
225-
* @param \Shotstack\Client\Model\AssetResponseData|null $data data
225+
* @param \Shotstack\Client\Model\AssetResponseData $data data
226226
*
227227
* @return self
228228
*/

src/Model/AssetResponseAttributes.php

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,6 @@ public function listInvalidProperties()
270270
if ($this->container['owner'] === null) {
271271
$invalidProperties[] = "'owner' can't be null";
272272
}
273-
if ($this->container['filename'] === null) {
274-
$invalidProperties[] = "'filename' can't be null";
275-
}
276273
if ($this->container['status'] === null) {
277274
$invalidProperties[] = "'status' can't be null";
278275
}
@@ -285,12 +282,6 @@ public function listInvalidProperties()
285282
);
286283
}
287284

288-
if ($this->container['created'] === null) {
289-
$invalidProperties[] = "'created' can't be null";
290-
}
291-
if ($this->container['updated'] === null) {
292-
$invalidProperties[] = "'updated' can't be null";
293-
}
294285
return $invalidProperties;
295286
}
296287

@@ -429,7 +420,7 @@ public function setProviderId($provider_id)
429420
/**
430421
* Gets filename
431422
*
432-
* @return string
423+
* @return string|null
433424
*/
434425
public function getFilename()
435426
{
@@ -439,7 +430,7 @@ public function getFilename()
439430
/**
440431
* Sets filename
441432
*
442-
* @param string $filename The asset file name.
433+
* @param string|null $filename The asset file name.
443434
*
444435
* @return self
445436
*/
@@ -511,7 +502,7 @@ public function setStatus($status)
511502
/**
512503
* Gets created
513504
*
514-
* @return string
505+
* @return string|null
515506
*/
516507
public function getCreated()
517508
{
@@ -521,7 +512,7 @@ public function getCreated()
521512
/**
522513
* Sets created
523514
*
524-
* @param string $created The time the asset was created.
515+
* @param string|null $created The time the asset was created.
525516
*
526517
* @return self
527518
*/
@@ -535,7 +526,7 @@ public function setCreated($created)
535526
/**
536527
* Gets updated
537528
*
538-
* @return string
529+
* @return string|null
539530
*/
540531
public function getUpdated()
541532
{
@@ -545,7 +536,7 @@ public function getUpdated()
545536
/**
546537
* Sets updated
547538
*
548-
* @param string $updated The time the asset status was last updated.
539+
* @param string|null $updated The time the asset status was last updated.
549540
*
550541
* @return self
551542
*/

src/Model/AssetResponseData.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ public function valid()
221221
/**
222222
* Gets type
223223
*
224-
* @return string|null
224+
* @return string
225225
*/
226226
public function getType()
227227
{
@@ -245,7 +245,7 @@ public function setType($type)
245245
/**
246246
* Gets attributes
247247
*
248-
* @return \Shotstack\Client\Model\AssetResponseAttributes|null
248+
* @return \Shotstack\Client\Model\AssetResponseAttributes
249249
*/
250250
public function getAttributes()
251251
{
@@ -255,7 +255,7 @@ public function getAttributes()
255255
/**
256256
* Sets attributes
257257
*
258-
* @param \Shotstack\Client\Model\AssetResponseAttributes|null $attributes attributes
258+
* @param \Shotstack\Client\Model\AssetResponseAttributes $attributes attributes
259259
*
260260
* @return self
261261
*/

src/Model/AudioAsset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ public function __construct(array $data = null)
219219
$this->container['type'] = $data['type'] ?? 'audio';
220220
$this->container['src'] = $data['src'] ?? null;
221221
$this->container['trim'] = $data['trim'] ?? null;
222-
$this->container['volume'] = $data['volume'] ?? 1;
222+
$this->container['volume'] = $data['volume'] ?? null;
223223
$this->container['effect'] = $data['effect'] ?? null;
224224
}
225225

src/Model/Clip.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -333,14 +333,14 @@ public function __construct(array $data = null)
333333
$this->container['asset'] = $data['asset'] ?? null;
334334
$this->container['start'] = $data['start'] ?? null;
335335
$this->container['length'] = $data['length'] ?? null;
336-
$this->container['fit'] = $data['fit'] ?? 'crop';
336+
$this->container['fit'] = $data['fit'] ?? null;
337337
$this->container['scale'] = $data['scale'] ?? null;
338-
$this->container['position'] = $data['position'] ?? 'center';
338+
$this->container['position'] = $data['position'] ?? null;
339339
$this->container['offset'] = $data['offset'] ?? null;
340340
$this->container['transition'] = $data['transition'] ?? null;
341341
$this->container['effect'] = $data['effect'] ?? null;
342342
$this->container['filter'] = $data['filter'] ?? null;
343-
$this->container['opacity'] = $data['opacity'] ?? 1;
343+
$this->container['opacity'] = $data['opacity'] ?? null;
344344
$this->container['transform'] = $data['transform'] ?? null;
345345
}
346346

@@ -498,7 +498,7 @@ public function getFit()
498498
/**
499499
* Sets fit
500500
*
501-
* @param string|null $fit Set how the asset should be scaled to fit the viewport using one of the following options: <ul> <li>`cover` - stretch the asset to fill the viewport without maintaining the aspect ratio.</li> <li>`contain` - fit the entire asset within the viewport while maintaining the original aspect ratio.</li> <li>`crop` - scale the asset to fill the viewport while maintaining the aspect ratio. The asset will be cropped if it exceeds the bounds of the viewport.</li> <li>`none` - preserves the original asset dimensions and does not apply any scaling.</li> </ul>
501+
* @param string|null $fit Set how the asset should be scaled to fit the viewport using one of the following options: <ul> <li>`cover` - stretch the asset to fill the viewport without maintaining the aspect ratio.</li> <li>`contain` - fit the entire asset within the viewport while maintaining the original aspect ratio.</li> <li>`crop` (default) - scale the asset to fill the viewport while maintaining the aspect ratio. The asset will be cropped if it exceeds the bounds of the viewport.</li> <li>`none` - preserves the original asset dimensions and does not apply any scaling.</li> </ul>
502502
*
503503
* @return self
504504
*/

src/Model/Destinations.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ public function getModelName()
190190
public function __construct(array $data = null)
191191
{
192192
$this->container['provider'] = $data['provider'] ?? 'mux';
193-
$this->container['exclude'] = $data['exclude'] ?? false;
193+
$this->container['exclude'] = $data['exclude'] ?? null;
194194
$this->container['options'] = $data['options'] ?? null;
195195

196196
// Initialize discriminator property with the model name.

src/Model/Edit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
/**
1414
* Shotstack
1515
*
16-
* Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
16+
* Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
1717
*
1818
* The version of the OpenAPI document: v1
1919
* Generated by: https://openapi-generator.tech
@@ -218,7 +218,7 @@ public function __construct(array $data = null)
218218
$this->container['output'] = $data['output'] ?? null;
219219
$this->container['merge'] = $data['merge'] ?? null;
220220
$this->container['callback'] = $data['callback'] ?? null;
221-
$this->container['disk'] = $data['disk'] ?? 'local';
221+
$this->container['disk'] = $data['disk'] ?? null;
222222
}
223223

224224
/**

src/Model/FlipTransformation.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,8 @@ public function getModelName()
184184
*/
185185
public function __construct(array $data = null)
186186
{
187-
$this->container['horizontal'] = $data['horizontal'] ?? false;
188-
$this->container['vertical'] = $data['vertical'] ?? false;
187+
$this->container['horizontal'] = $data['horizontal'] ?? null;
188+
$this->container['vertical'] = $data['vertical'] ?? null;
189189
}
190190

191191
/**

0 commit comments

Comments
 (0)