From 45cd71bb3b754e91d581cea9a86a71438b8ab91f Mon Sep 17 00:00:00 2001 From: Jeff Shillitto Date: Mon, 15 Aug 2022 21:05:25 +1000 Subject: [PATCH] Remove default values and fix templates get request --- src/Model/Asset.php | 10 +++++----- src/Model/AssetRenderResponse.php | 4 ++-- src/Model/AssetResponse.php | 4 ++-- src/Model/AssetResponseAttributes.php | 21 ++++++--------------- src/Model/AssetResponseData.php | 6 +++--- src/Model/AudioAsset.php | 2 +- src/Model/Clip.php | 8 ++++---- src/Model/Destinations.php | 2 +- src/Model/Edit.php | 4 ++-- src/Model/FlipTransformation.php | 4 ++-- src/Model/HtmlAsset.php | 4 ++-- src/Model/Offset.php | 4 ++-- src/Model/Output.php | 10 +++++----- src/Model/QueuedResponse.php | 2 +- src/Model/Range.php | 2 +- src/Model/RenderResponseData.php | 21 ++++++--------------- src/Model/RotateTransformation.php | 2 +- src/Model/ShotstackDestination.php | 2 +- src/Model/SkewTransformation.php | 4 ++-- src/Model/Soundtrack.php | 2 +- src/Model/TemplateDataResponseData.php | 6 +++--- src/Model/TemplateListResponseItem.php | 14 ++++---------- src/Model/Timeline.php | 4 ++-- src/Model/TitleAsset.php | 6 +++--- 24 files changed, 62 insertions(+), 86 deletions(-) diff --git a/src/Model/Asset.php b/src/Model/Asset.php index abcc8a6..5f1a5f8 100644 --- a/src/Model/Asset.php +++ b/src/Model/Asset.php @@ -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; diff --git a/src/Model/AssetRenderResponse.php b/src/Model/AssetRenderResponse.php index b4011e0..586af2f 100644 --- a/src/Model/AssetRenderResponse.php +++ b/src/Model/AssetRenderResponse.php @@ -212,7 +212,7 @@ public function valid() /** * Gets data * - * @return \Shotstack\Client\Model\AssetResponseData[]|null + * @return \Shotstack\Client\Model\AssetResponseData[] */ public function getData() { @@ -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 */ diff --git a/src/Model/AssetResponse.php b/src/Model/AssetResponse.php index 9e4afbb..2e5d8ce 100644 --- a/src/Model/AssetResponse.php +++ b/src/Model/AssetResponse.php @@ -212,7 +212,7 @@ public function valid() /** * Gets data * - * @return \Shotstack\Client\Model\AssetResponseData|null + * @return \Shotstack\Client\Model\AssetResponseData */ public function getData() { @@ -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 */ diff --git a/src/Model/AssetResponseAttributes.php b/src/Model/AssetResponseAttributes.php index 99d7118..cc0a56d 100644 --- a/src/Model/AssetResponseAttributes.php +++ b/src/Model/AssetResponseAttributes.php @@ -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"; } @@ -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; } @@ -429,7 +420,7 @@ public function setProviderId($provider_id) /** * Gets filename * - * @return string + * @return string|null */ public function getFilename() { @@ -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 */ @@ -511,7 +502,7 @@ public function setStatus($status) /** * Gets created * - * @return string + * @return string|null */ public function getCreated() { @@ -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 */ @@ -535,7 +526,7 @@ public function setCreated($created) /** * Gets updated * - * @return string + * @return string|null */ public function getUpdated() { @@ -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 */ diff --git a/src/Model/AssetResponseData.php b/src/Model/AssetResponseData.php index 967118b..b76bc9f 100644 --- a/src/Model/AssetResponseData.php +++ b/src/Model/AssetResponseData.php @@ -221,7 +221,7 @@ public function valid() /** * Gets type * - * @return string|null + * @return string */ public function getType() { @@ -245,7 +245,7 @@ public function setType($type) /** * Gets attributes * - * @return \Shotstack\Client\Model\AssetResponseAttributes|null + * @return \Shotstack\Client\Model\AssetResponseAttributes */ public function getAttributes() { @@ -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 */ diff --git a/src/Model/AudioAsset.php b/src/Model/AudioAsset.php index 03fa08f..189b353 100644 --- a/src/Model/AudioAsset.php +++ b/src/Model/AudioAsset.php @@ -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; } diff --git a/src/Model/Clip.php b/src/Model/Clip.php index d68325b..6c6f143 100644 --- a/src/Model/Clip.php +++ b/src/Model/Clip.php @@ -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; } @@ -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: + * @param string|null $fit Set how the asset should be scaled to fit the viewport using one of the following options: * * @return self */ diff --git a/src/Model/Destinations.php b/src/Model/Destinations.php index 50c7711..a05976e 100644 --- a/src/Model/Destinations.php +++ b/src/Model/Destinations.php @@ -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. diff --git a/src/Model/Edit.php b/src/Model/Edit.php index 914aa83..0b31bb6 100644 --- a/src/Model/Edit.php +++ b/src/Model/Edit.php @@ -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: https://api.shotstack.io/{version} The Serve API base URL is: https://api.shotstack.io/serve/{version} + * 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: https://api.shotstack.io/{version} The Serve API base URL is: https://api.shotstack.io/serve/{version} * * The version of the OpenAPI document: v1 * Generated by: https://openapi-generator.tech @@ -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; } /** diff --git a/src/Model/FlipTransformation.php b/src/Model/FlipTransformation.php index e547c6e..e8ac268 100644 --- a/src/Model/FlipTransformation.php +++ b/src/Model/FlipTransformation.php @@ -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; } /** diff --git a/src/Model/HtmlAsset.php b/src/Model/HtmlAsset.php index a6fbfa1..9aed62f 100644 --- a/src/Model/HtmlAsset.php +++ b/src/Model/HtmlAsset.php @@ -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; } /** diff --git a/src/Model/Offset.php b/src/Model/Offset.php index 8a57687..cc89328 100644 --- a/src/Model/Offset.php +++ b/src/Model/Offset.php @@ -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; } /** diff --git a/src/Model/Output.php b/src/Model/Output.php index f8e4ee0..f8f0bfc 100644 --- a/src/Model/Output.php +++ b/src/Model/Output.php @@ -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; @@ -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: + * @param string|null $aspect_ratio The aspect ratio (shape) of the video or image. Useful for social media output formats. Options are: * * @return self */ @@ -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. + * @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. * * @return self */ @@ -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. + * @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. * * @return self */ diff --git a/src/Model/QueuedResponse.php b/src/Model/QueuedResponse.php index 9d8e4db..1e4f937 100644 --- a/src/Model/QueuedResponse.php +++ b/src/Model/QueuedResponse.php @@ -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 diff --git a/src/Model/Range.php b/src/Model/Range.php index e0dcbf3..917ab9e 100644 --- a/src/Model/Range.php +++ b/src/Model/Range.php @@ -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: https://api.shotstack.io/{version} The Serve API base URL is: https://api.shotstack.io/serve/{version} + * 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: https://api.shotstack.io/{version} The Serve API base URL is: https://api.shotstack.io/serve/{version} * * The version of the OpenAPI document: v1 * Generated by: https://openapi-generator.tech diff --git a/src/Model/RenderResponseData.php b/src/Model/RenderResponseData.php index 3c18d39..311fca0 100644 --- a/src/Model/RenderResponseData.php +++ b/src/Model/RenderResponseData.php @@ -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; } @@ -581,7 +572,7 @@ public function setThumbnail($thumbnail) /** * Gets data * - * @return \Shotstack\Client\Model\Edit + * @return \Shotstack\Client\Model\Edit|null */ public function getData() { @@ -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 */ @@ -605,7 +596,7 @@ public function setData($data) /** * Gets created * - * @return string + * @return string|null */ public function getCreated() { @@ -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 */ @@ -629,7 +620,7 @@ public function setCreated($created) /** * Gets updated * - * @return string + * @return string|null */ public function getUpdated() { @@ -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 */ diff --git a/src/Model/RotateTransformation.php b/src/Model/RotateTransformation.php index 9d4da2a..773d06c 100644 --- a/src/Model/RotateTransformation.php +++ b/src/Model/RotateTransformation.php @@ -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; } /** diff --git a/src/Model/ShotstackDestination.php b/src/Model/ShotstackDestination.php index fd44b24..ffb25ab 100644 --- a/src/Model/ShotstackDestination.php +++ b/src/Model/ShotstackDestination.php @@ -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; } /** diff --git a/src/Model/SkewTransformation.php b/src/Model/SkewTransformation.php index 59a6f59..4d0f02e 100644 --- a/src/Model/SkewTransformation.php +++ b/src/Model/SkewTransformation.php @@ -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; } /** diff --git a/src/Model/Soundtrack.php b/src/Model/Soundtrack.php index 12289d2..1d96de6 100644 --- a/src/Model/Soundtrack.php +++ b/src/Model/Soundtrack.php @@ -208,7 +208,7 @@ public function __construct(array $data = null) { $this->container['src'] = $data['src'] ?? null; $this->container['effect'] = $data['effect'] ?? null; - $this->container['volume'] = $data['volume'] ?? 1; + $this->container['volume'] = $data['volume'] ?? null; } /** diff --git a/src/Model/TemplateDataResponseData.php b/src/Model/TemplateDataResponseData.php index 8ce82e8..20ad6e2 100644 --- a/src/Model/TemplateDataResponseData.php +++ b/src/Model/TemplateDataResponseData.php @@ -63,7 +63,7 @@ class TemplateDataResponseData implements ModelInterface, ArrayAccess, \JsonSeri 'id' => 'string', 'name' => 'string', 'owner' => 'string', - 'template' => 'string' + 'template' => '\Shotstack\Client\Model\Edit' ]; /** @@ -311,7 +311,7 @@ public function setOwner($owner) /** * Gets template * - * @return string + * @return \Shotstack\Client\Model\Edit */ public function getTemplate() { @@ -321,7 +321,7 @@ public function getTemplate() /** * Sets template * - * @param string $template The [Edit](#tocs_edit) template. + * @param \Shotstack\Client\Model\Edit $template template * * @return self */ diff --git a/src/Model/TemplateListResponseItem.php b/src/Model/TemplateListResponseItem.php index 27029e0..04323cd 100644 --- a/src/Model/TemplateListResponseItem.php +++ b/src/Model/TemplateListResponseItem.php @@ -215,12 +215,6 @@ public function listInvalidProperties() if ($this->container['name'] === null) { $invalidProperties[] = "'name' 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; } @@ -287,7 +281,7 @@ public function setName($name) /** * Gets created * - * @return string + * @return string|null */ public function getCreated() { @@ -297,7 +291,7 @@ public function getCreated() /** * Sets created * - * @param string $created The time the template was created. + * @param string|null $created The time the template was created. * * @return self */ @@ -311,7 +305,7 @@ public function setCreated($created) /** * Gets updated * - * @return string + * @return string|null */ public function getUpdated() { @@ -321,7 +315,7 @@ public function getUpdated() /** * Sets updated * - * @param string $updated The time the template was last updated. + * @param string|null $updated The time the template was last updated. * * @return self */ diff --git a/src/Model/Timeline.php b/src/Model/Timeline.php index 57ab33f..125104a 100644 --- a/src/Model/Timeline.php +++ b/src/Model/Timeline.php @@ -200,10 +200,10 @@ public function getModelName() public function __construct(array $data = null) { $this->container['soundtrack'] = $data['soundtrack'] ?? null; - $this->container['background'] = $data['background'] ?? '#000000'; + $this->container['background'] = $data['background'] ?? null; $this->container['fonts'] = $data['fonts'] ?? null; $this->container['tracks'] = $data['tracks'] ?? null; - $this->container['cache'] = $data['cache'] ?? true; + $this->container['cache'] = $data['cache'] ?? null; } /** diff --git a/src/Model/TitleAsset.php b/src/Model/TitleAsset.php index fce7bed..5440040 100644 --- a/src/Model/TitleAsset.php +++ b/src/Model/TitleAsset.php @@ -302,10 +302,10 @@ public function __construct(array $data = null) $this->container['type'] = $data['type'] ?? 'title'; $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['color'] = $data['color'] ?? null; + $this->container['size'] = $data['size'] ?? null; $this->container['background'] = $data['background'] ?? null; - $this->container['position'] = $data['position'] ?? 'center'; + $this->container['position'] = $data['position'] ?? null; $this->container['offset'] = $data['offset'] ?? null; }