Skip to content

Commit

Permalink
Merge pull request #26 from shotstack/fix-templates-and-defaults
Browse files Browse the repository at this point in the history
Remove default values and fix templates get request
  • Loading branch information
jeffski authored Aug 15, 2022
2 parents 6bc9a81 + 45cd71b commit 40f20e9
Show file tree
Hide file tree
Showing 24 changed files with 62 additions and 86 deletions.
10 changes: 5 additions & 5 deletions src/Model/Asset.php
Original file line number Diff line number Diff line change
Expand Up @@ -364,14 +364,14 @@ public function __construct(array $data = null)
$this->container['type'] = $data['type'] ?? 'luma';
$this->container['src'] = $data['src'] ?? null;
$this->container['trim'] = $data['trim'] ?? null;
$this->container['volume'] = $data['volume'] ?? 1;
$this->container['volume'] = $data['volume'] ?? null;
$this->container['crop'] = $data['crop'] ?? null;
$this->container['text'] = $data['text'] ?? null;
$this->container['style'] = $data['style'] ?? null;
$this->container['color'] = $data['color'] ?? '#ffffff';
$this->container['size'] = $data['size'] ?? 'medium';
$this->container['background'] = $data['background'] ?? 'transparent';
$this->container['position'] = $data['position'] ?? 'center';
$this->container['color'] = $data['color'] ?? null;
$this->container['size'] = $data['size'] ?? null;
$this->container['background'] = $data['background'] ?? null;
$this->container['position'] = $data['position'] ?? null;
$this->container['offset'] = $data['offset'] ?? null;
$this->container['html'] = $data['html'] ?? null;
$this->container['css'] = $data['css'] ?? null;
Expand Down
4 changes: 2 additions & 2 deletions src/Model/AssetRenderResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public function valid()
/**
* Gets data
*
* @return \Shotstack\Client\Model\AssetResponseData[]|null
* @return \Shotstack\Client\Model\AssetResponseData[]
*/
public function getData()
{
Expand All @@ -222,7 +222,7 @@ public function getData()
/**
* Sets data
*
* @param \Shotstack\Client\Model\AssetResponseData[]|null $data An array of asset resources grouped by render id.
* @param \Shotstack\Client\Model\AssetResponseData[] $data An array of asset resources grouped by render id.
*
* @return self
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Model/AssetResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public function valid()
/**
* Gets data
*
* @return \Shotstack\Client\Model\AssetResponseData|null
* @return \Shotstack\Client\Model\AssetResponseData
*/
public function getData()
{
Expand All @@ -222,7 +222,7 @@ public function getData()
/**
* Sets data
*
* @param \Shotstack\Client\Model\AssetResponseData|null $data data
* @param \Shotstack\Client\Model\AssetResponseData $data data
*
* @return self
*/
Expand Down
21 changes: 6 additions & 15 deletions src/Model/AssetResponseAttributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,6 @@ public function listInvalidProperties()
if ($this->container['owner'] === null) {
$invalidProperties[] = "'owner' can't be null";
}
if ($this->container['filename'] === null) {
$invalidProperties[] = "'filename' can't be null";
}
if ($this->container['status'] === null) {
$invalidProperties[] = "'status' can't be null";
}
Expand All @@ -285,12 +282,6 @@ public function listInvalidProperties()
);
}

if ($this->container['created'] === null) {
$invalidProperties[] = "'created' can't be null";
}
if ($this->container['updated'] === null) {
$invalidProperties[] = "'updated' can't be null";
}
return $invalidProperties;
}

Expand Down Expand Up @@ -429,7 +420,7 @@ public function setProviderId($provider_id)
/**
* Gets filename
*
* @return string
* @return string|null
*/
public function getFilename()
{
Expand All @@ -439,7 +430,7 @@ public function getFilename()
/**
* Sets filename
*
* @param string $filename The asset file name.
* @param string|null $filename The asset file name.
*
* @return self
*/
Expand Down Expand Up @@ -511,7 +502,7 @@ public function setStatus($status)
/**
* Gets created
*
* @return string
* @return string|null
*/
public function getCreated()
{
Expand All @@ -521,7 +512,7 @@ public function getCreated()
/**
* Sets created
*
* @param string $created The time the asset was created.
* @param string|null $created The time the asset was created.
*
* @return self
*/
Expand All @@ -535,7 +526,7 @@ public function setCreated($created)
/**
* Gets updated
*
* @return string
* @return string|null
*/
public function getUpdated()
{
Expand All @@ -545,7 +536,7 @@ public function getUpdated()
/**
* Sets updated
*
* @param string $updated The time the asset status was last updated.
* @param string|null $updated The time the asset status was last updated.
*
* @return self
*/
Expand Down
6 changes: 3 additions & 3 deletions src/Model/AssetResponseData.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public function valid()
/**
* Gets type
*
* @return string|null
* @return string
*/
public function getType()
{
Expand All @@ -245,7 +245,7 @@ public function setType($type)
/**
* Gets attributes
*
* @return \Shotstack\Client\Model\AssetResponseAttributes|null
* @return \Shotstack\Client\Model\AssetResponseAttributes
*/
public function getAttributes()
{
Expand All @@ -255,7 +255,7 @@ public function getAttributes()
/**
* Sets attributes
*
* @param \Shotstack\Client\Model\AssetResponseAttributes|null $attributes attributes
* @param \Shotstack\Client\Model\AssetResponseAttributes $attributes attributes
*
* @return self
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Model/AudioAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ public function __construct(array $data = null)
$this->container['type'] = $data['type'] ?? 'audio';
$this->container['src'] = $data['src'] ?? null;
$this->container['trim'] = $data['trim'] ?? null;
$this->container['volume'] = $data['volume'] ?? 1;
$this->container['volume'] = $data['volume'] ?? null;
$this->container['effect'] = $data['effect'] ?? null;
}

Expand Down
8 changes: 4 additions & 4 deletions src/Model/Clip.php
Original file line number Diff line number Diff line change
Expand Up @@ -333,14 +333,14 @@ public function __construct(array $data = null)
$this->container['asset'] = $data['asset'] ?? null;
$this->container['start'] = $data['start'] ?? null;
$this->container['length'] = $data['length'] ?? null;
$this->container['fit'] = $data['fit'] ?? 'crop';
$this->container['fit'] = $data['fit'] ?? null;
$this->container['scale'] = $data['scale'] ?? null;
$this->container['position'] = $data['position'] ?? 'center';
$this->container['position'] = $data['position'] ?? null;
$this->container['offset'] = $data['offset'] ?? null;
$this->container['transition'] = $data['transition'] ?? null;
$this->container['effect'] = $data['effect'] ?? null;
$this->container['filter'] = $data['filter'] ?? null;
$this->container['opacity'] = $data['opacity'] ?? 1;
$this->container['opacity'] = $data['opacity'] ?? null;
$this->container['transform'] = $data['transform'] ?? null;
}

Expand Down Expand Up @@ -498,7 +498,7 @@ public function getFit()
/**
* Sets fit
*
* @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>
* @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>
*
* @return self
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Model/Destinations.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public function getModelName()
public function __construct(array $data = null)
{
$this->container['provider'] = $data['provider'] ?? 'mux';
$this->container['exclude'] = $data['exclude'] ?? false;
$this->container['exclude'] = $data['exclude'] ?? null;
$this->container['options'] = $data['options'] ?? null;

// Initialize discriminator property with the model name.
Expand Down
4 changes: 2 additions & 2 deletions src/Model/Edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/**
* Shotstack
*
* 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>
* 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>
*
* The version of the OpenAPI document: v1
* Generated by: https://openapi-generator.tech
Expand Down Expand Up @@ -218,7 +218,7 @@ public function __construct(array $data = null)
$this->container['output'] = $data['output'] ?? null;
$this->container['merge'] = $data['merge'] ?? null;
$this->container['callback'] = $data['callback'] ?? null;
$this->container['disk'] = $data['disk'] ?? 'local';
$this->container['disk'] = $data['disk'] ?? null;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Model/FlipTransformation.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ public function getModelName()
*/
public function __construct(array $data = null)
{
$this->container['horizontal'] = $data['horizontal'] ?? false;
$this->container['vertical'] = $data['vertical'] ?? false;
$this->container['horizontal'] = $data['horizontal'] ?? null;
$this->container['vertical'] = $data['vertical'] ?? null;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Model/HtmlAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ public function __construct(array $data = null)
$this->container['css'] = $data['css'] ?? null;
$this->container['width'] = $data['width'] ?? null;
$this->container['height'] = $data['height'] ?? null;
$this->container['background'] = $data['background'] ?? 'transparent';
$this->container['position'] = $data['position'] ?? 'center';
$this->container['background'] = $data['background'] ?? null;
$this->container['position'] = $data['position'] ?? null;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Model/Offset.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ public function getModelName()
*/
public function __construct(array $data = null)
{
$this->container['x'] = $data['x'] ?? 0;
$this->container['y'] = $data['y'] ?? 0;
$this->container['x'] = $data['x'] ?? null;
$this->container['y'] = $data['y'] ?? null;
}

/**
Expand Down
10 changes: 5 additions & 5 deletions src/Model/Output.php
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,8 @@ public function __construct(array $data = null)
$this->container['size'] = $data['size'] ?? null;
$this->container['fps'] = $data['fps'] ?? null;
$this->container['scale_to'] = $data['scale_to'] ?? null;
$this->container['quality'] = $data['quality'] ?? 'medium';
$this->container['repeat'] = $data['repeat'] ?? true;
$this->container['quality'] = $data['quality'] ?? null;
$this->container['repeat'] = $data['repeat'] ?? null;
$this->container['range'] = $data['range'] ?? null;
$this->container['poster'] = $data['poster'] ?? null;
$this->container['thumbnail'] = $data['thumbnail'] ?? null;
Expand Down Expand Up @@ -538,7 +538,7 @@ public function getAspectRatio()
/**
* Sets aspect_ratio
*
* @param string|null $aspect_ratio The aspect ratio (shape) of the video or image. Useful for social media output formats. Options are: <ul> <li>`16:9` - regular landscape/horizontal aspect ratio (default)</li> <li>`9:16` - vertical/portrait aspect ratio</li> <li>`1:1` - square aspect ratio</li> <li>`4:5` - short vertical/portrait aspect ratio</li> <li>`4:3` - legacy TV aspect ratio</li> </ul>
* @param string|null $aspect_ratio The aspect ratio (shape) of the video or image. Useful for social media output formats. Options are: <ul> <li>`16:9` (default) - regular landscape/horizontal aspect ratio</li> <li>`9:16` - vertical/portrait aspect ratio</li> <li>`1:1` - square aspect ratio</li> <li>`4:5` - short vertical/portrait aspect ratio</li> <li>`4:3` - legacy TV aspect ratio</li> </ul>
*
* @return self
*/
Expand Down Expand Up @@ -596,7 +596,7 @@ public function getFps()
/**
* Sets fps
*
* @param float|null $fps Override the default frames per second. Useful for when the source footage is recorded at 30fps, i.e. on mobile devices. Lower frame rates can be used to add cinematic quality (24fps) or to create smaller file size/faster render times or animated gifs (12 or 15fps). Default is 25fps. <ul> <li>`12` - 12fps</li> <li>`15` - 15fps</li> <li>`24` - 24fps</li> <li>`23.976` - 23.976fps</li> <li>`25` - 25fps</li> <li>`29.97` - 29.97fps</li> <li>`30` - 30fps</li> </ul>
* @param float|null $fps Override the default frames per second. Useful for when the source footage is recorded at 30fps, i.e. on mobile devices. Lower frame rates can be used to add cinematic quality (24fps) or to create smaller file size/faster render times or animated gifs (12 or 15fps). Default is 25fps. <ul> <li>`12` - 12fps</li> <li>`15` - 15fps</li> <li>`24` - 24fps</li> <li>`23.976` - 23.976fps</li> <li>`25` (default) - 25fps</li> <li>`29.97` - 29.97fps</li> <li>`30` - 30fps</li> </ul>
*
* @return self
*/
Expand Down Expand Up @@ -664,7 +664,7 @@ public function getQuality()
/**
* Sets quality
*
* @param string|null $quality Adjust the output quality of the video, image or audio. Adjusting quality affects render speed, download speeds and storage requirements due to file size. The default `medium` provides the most optimized choice for all three factors. <ul> <li>`low` - slightly reduced quality, smaller file size</li> <li>`medium` - optimized quality, render speeds and file size</li> <li>`high` - slightly increased quality, larger file size</li> </ul>
* @param string|null $quality Adjust the output quality of the video, image or audio. Adjusting quality affects render speed, download speeds and storage requirements due to file size. The default `medium` provides the most optimized choice for all three factors. <ul> <li>`low` - slightly reduced quality, smaller file size</li> <li>`medium` (default) - optimized quality, render speeds and file size</li> <li>`high` - slightly increased quality, larger file size</li> </ul>
*
* @return self
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Model/QueuedResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* QueuedResponse Class Doc Comment
*
* @category Class
* @description The response received after a [render request](#render-asset) is submitted. The render task is queued for rendering and a unique render id is returned.
* @description The response received after a [render request](#render-asset) or [template render](#render-template) is submitted. The render task is queued for rendering and a unique render id is returned.
* @package Shotstack\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
Expand Down
2 changes: 1 addition & 1 deletion src/Model/Range.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/**
* Shotstack
*
* 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>
* 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>
*
* The version of the OpenAPI document: v1
* Generated by: https://openapi-generator.tech
Expand Down
21 changes: 6 additions & 15 deletions src/Model/RenderResponseData.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,15 +304,6 @@ public function listInvalidProperties()
);
}

if ($this->container['data'] === null) {
$invalidProperties[] = "'data' can't be null";
}
if ($this->container['created'] === null) {
$invalidProperties[] = "'created' can't be null";
}
if ($this->container['updated'] === null) {
$invalidProperties[] = "'updated' can't be null";
}
return $invalidProperties;
}

Expand Down Expand Up @@ -581,7 +572,7 @@ public function setThumbnail($thumbnail)
/**
* Gets data
*
* @return \Shotstack\Client\Model\Edit
* @return \Shotstack\Client\Model\Edit|null
*/
public function getData()
{
Expand All @@ -591,7 +582,7 @@ public function getData()
/**
* Sets data
*
* @param \Shotstack\Client\Model\Edit $data data
* @param \Shotstack\Client\Model\Edit|null $data data
*
* @return self
*/
Expand All @@ -605,7 +596,7 @@ public function setData($data)
/**
* Gets created
*
* @return string
* @return string|null
*/
public function getCreated()
{
Expand All @@ -615,7 +606,7 @@ public function getCreated()
/**
* Sets created
*
* @param string $created The time the render task was initially queued.
* @param string|null $created The time the render task was initially queued.
*
* @return self
*/
Expand All @@ -629,7 +620,7 @@ public function setCreated($created)
/**
* Gets updated
*
* @return string
* @return string|null
*/
public function getUpdated()
{
Expand All @@ -639,7 +630,7 @@ public function getUpdated()
/**
* Sets updated
*
* @param string $updated The time the render status was last updated.
* @param string|null $updated The time the render status was last updated.
*
* @return self
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Model/RotateTransformation.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public function getModelName()
*/
public function __construct(array $data = null)
{
$this->container['angle'] = $data['angle'] ?? 0;
$this->container['angle'] = $data['angle'] ?? null;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Model/ShotstackDestination.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public function getModelName()
public function __construct(array $data = null)
{
$this->container['provider'] = $data['provider'] ?? 'shotstack';
$this->container['exclude'] = $data['exclude'] ?? false;
$this->container['exclude'] = $data['exclude'] ?? null;
}

/**
Expand Down
Loading

0 comments on commit 40f20e9

Please sign in to comment.