Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .oas-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.10.4
1.12.1
4 changes: 2 additions & 2 deletions src/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class Configuration
*
* @var string
*/
protected $userAgent = 'OpenAPI-Generator/1.10.4/PHP';
protected $userAgent = 'OpenAPI-Generator/1.12.1/PHP';

/**
* Debug switch (default set to false)
Expand Down Expand Up @@ -433,7 +433,7 @@ public static function toDebugReport()
$report .= ' OS: ' . php_uname() . PHP_EOL;
$report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL;
$report .= ' The version of the OpenAPI document: v1' . PHP_EOL;
$report .= ' SDK Package Version: 1.10.4' . PHP_EOL;
$report .= ' SDK Package Version: 1.12.1' . PHP_EOL;
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;

return $report;
Expand Down
64 changes: 62 additions & 2 deletions src/Model/Asset.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ class Asset implements ModelInterface, ArrayAccess, \JsonSerializable
'html' => 'string',
'css' => 'string',
'position' => 'string',
'js' => 'string',
'color' => 'string',
'size' => 'string',
'offset' => '\ShotstackClient\Model\Offset',
Expand Down Expand Up @@ -139,6 +140,7 @@ class Asset implements ModelInterface, ArrayAccess, \JsonSerializable
'html' => null,
'css' => null,
'position' => null,
'js' => null,
'color' => null,
'size' => null,
'offset' => null,
Expand Down Expand Up @@ -189,6 +191,7 @@ class Asset implements ModelInterface, ArrayAccess, \JsonSerializable
'html' => false,
'css' => false,
'position' => false,
'js' => false,
'color' => false,
'size' => false,
'offset' => false,
Expand Down Expand Up @@ -319,6 +322,7 @@ public function isNullableSetToNull(string $property): bool
'html' => 'html',
'css' => 'css',
'position' => 'position',
'js' => 'js',
'color' => 'color',
'size' => 'size',
'offset' => 'offset',
Expand Down Expand Up @@ -369,6 +373,7 @@ public function isNullableSetToNull(string $property): bool
'html' => 'setHtml',
'css' => 'setCss',
'position' => 'setPosition',
'js' => 'setJs',
'color' => 'setColor',
'size' => 'setSize',
'offset' => 'setOffset',
Expand Down Expand Up @@ -419,6 +424,7 @@ public function isNullableSetToNull(string $property): bool
'html' => 'getHtml',
'css' => 'getCss',
'position' => 'getPosition',
'js' => 'getJs',
'color' => 'getColor',
'size' => 'getSize',
'offset' => 'getOffset',
Expand Down Expand Up @@ -484,6 +490,7 @@ public function getModelName()
public const TYPE_CAPTION = 'caption';
public const TYPE_RICH_CAPTION = 'rich-caption';
public const TYPE_HTML = 'html';
public const TYPE_HTML5 = 'html5';
public const TYPE_TITLE = 'title';
public const TYPE_SHAPE = 'shape';
public const TYPE_SVG = 'svg';
Expand Down Expand Up @@ -552,6 +559,7 @@ public function getTypeAllowableValues()
self::TYPE_CAPTION,
self::TYPE_RICH_CAPTION,
self::TYPE_HTML,
self::TYPE_HTML5,
self::TYPE_TITLE,
self::TYPE_SHAPE,
self::TYPE_SVG,
Expand Down Expand Up @@ -726,6 +734,7 @@ public function __construct(array $data = null)
$this->setIfExists('html', $data ?? [], null);
$this->setIfExists('css', $data ?? [], null);
$this->setIfExists('position', $data ?? [], null);
$this->setIfExists('js', $data ?? [], null);
$this->setIfExists('color', $data ?? [], null);
$this->setIfExists('size', $data ?? [], null);
$this->setIfExists('offset', $data ?? [], null);
Expand Down Expand Up @@ -831,6 +840,14 @@ public function listInvalidProperties()
if ($this->container['html'] === null) {
$invalidProperties[] = "'html' can't be null";
}
if ((mb_strlen($this->container['html']) > 1000000)) {
$invalidProperties[] = "invalid value for 'html', the character length must be smaller than or equal to 1000000.";
}

if (!is_null($this->container['css']) && (mb_strlen($this->container['css']) > 500000)) {
$invalidProperties[] = "invalid value for 'css', the character length must be smaller than or equal to 500000.";
}

$allowedValues = $this->getPositionAllowableValues();
if (!is_null($this->container['position']) && !in_array($this->container['position'], $allowedValues, true)) {
$invalidProperties[] = sprintf(
Expand All @@ -840,6 +857,10 @@ public function listInvalidProperties()
);
}

if (!is_null($this->container['js']) && (mb_strlen($this->container['js']) > 500000)) {
$invalidProperties[] = "invalid value for 'js', the character length must be smaller than or equal to 500000.";
}

$allowedValues = $this->getSizeAllowableValues();
if (!is_null($this->container['size']) && !in_array($this->container['size'], $allowedValues, true)) {
$invalidProperties[] = sprintf(
Expand Down Expand Up @@ -1659,7 +1680,7 @@ public function getHtml()
/**
* Sets html
*
* @param string $html The HTML text string. See list of [supported HTML tags](https://shotstack.io/docs/guide/architecting-an-application/html-support/#supported-html-tags).
* @param string $html The HTML markup for the asset. Max 1,000,000 characters.
*
* @return self
*/
Expand All @@ -1668,6 +1689,10 @@ public function setHtml($html)
if (is_null($html)) {
throw new \InvalidArgumentException('non-nullable html cannot be null');
}
if ((mb_strlen($html) > 1000000)) {
throw new \InvalidArgumentException('invalid length for $html when calling Asset., must be smaller than or equal to 1000000.');
}

$this->container['html'] = $html;

return $this;
Expand All @@ -1686,7 +1711,7 @@ public function getCss()
/**
* Sets css
*
* @param string|null $css The CSS text string to apply styling to the HTML. See list of [support CSS properties](https://shotstack.io/docs/guide/architecting-an-application/html-support/#supported-css-properties).
* @param string|null $css The CSS string applied to the HTML. Max 500,000 characters.
*
* @return self
*/
Expand All @@ -1695,6 +1720,10 @@ public function setCss($css)
if (is_null($css)) {
throw new \InvalidArgumentException('non-nullable css cannot be null');
}
if ((mb_strlen($css) > 500000)) {
throw new \InvalidArgumentException('invalid length for $css when calling Asset., must be smaller than or equal to 500000.');
}

$this->container['css'] = $css;

return $this;
Expand Down Expand Up @@ -1737,6 +1766,37 @@ public function setPosition($position)
return $this;
}

/**
* Gets js
*
* @return string|null
*/
public function getJs()
{
return $this->container['js'];
}

/**
* Sets js
*
* @param string|null $js Optional JavaScript. Use for chart libraries, animations, or DOM manipulation. `gsap`, `d3`, `anime` and `lottie` are always available. CSS animations, transitions, and `Element.animate()` are also captured automatically. Max 500,000 characters.
*
* @return self
*/
public function setJs($js)
{
if (is_null($js)) {
throw new \InvalidArgumentException('non-nullable js cannot be null');
}
if ((mb_strlen($js) > 500000)) {
throw new \InvalidArgumentException('invalid length for $js when calling Asset., must be smaller than or equal to 500000.');
}

$this->container['js'] = $js;

return $this;
}

/**
* Gets color
*
Expand Down
34 changes: 34 additions & 0 deletions src/Model/Clip.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class Clip implements ModelInterface, ArrayAccess, \JsonSerializable
* @var string[]
*/
protected static $openAPITypes = [
'id' => 'string',
'asset' => '\ShotstackClient\Model\Asset',
'start' => '\ShotstackClient\Model\ClipStart',
'length' => '\ShotstackClient\Model\ClipLength',
Expand All @@ -83,6 +84,7 @@ class Clip implements ModelInterface, ArrayAccess, \JsonSerializable
* @psalm-var array<string, string|null>
*/
protected static $openAPIFormats = [
'id' => null,
'asset' => null,
'start' => null,
'length' => null,
Expand All @@ -106,6 +108,7 @@ class Clip implements ModelInterface, ArrayAccess, \JsonSerializable
* @var boolean[]
*/
protected static array $openAPINullables = [
'id' => false,
'asset' => false,
'start' => false,
'length' => false,
Expand Down Expand Up @@ -209,6 +212,7 @@ public function isNullableSetToNull(string $property): bool
* @var string[]
*/
protected static $attributeMap = [
'id' => 'id',
'asset' => 'asset',
'start' => 'start',
'length' => 'length',
Expand All @@ -232,6 +236,7 @@ public function isNullableSetToNull(string $property): bool
* @var string[]
*/
protected static $setters = [
'id' => 'setId',
'asset' => 'setAsset',
'start' => 'setStart',
'length' => 'setLength',
Expand All @@ -255,6 +260,7 @@ public function isNullableSetToNull(string $property): bool
* @var string[]
*/
protected static $getters = [
'id' => 'getId',
'asset' => 'getAsset',
'start' => 'getStart',
'length' => 'getLength',
Expand Down Expand Up @@ -453,6 +459,7 @@ public function getFilterAllowableValues()
*/
public function __construct(array $data = null)
{
$this->setIfExists('id', $data ?? [], null);
$this->setIfExists('asset', $data ?? [], null);
$this->setIfExists('start', $data ?? [], null);
$this->setIfExists('length', $data ?? [], null);
Expand Down Expand Up @@ -577,6 +584,33 @@ public function valid()
}


/**
* Gets id
*
* @return string|null
*/
public function getId()
{
return $this->container['id'];
}

/**
* Sets id
*
* @param string|null $id Optional client-generated identifier. Used by client SDKs (e.g. the Shotstack Studio SDK) to reference a clip across edits without relying on its position in the timeline. The render API does not use this field and it does not appear in render output.
*
* @return self
*/
public function setId($id)
{
if (is_null($id)) {
throw new \InvalidArgumentException('non-nullable id cannot be null');
}
$this->container['id'] = $id;

return $this;
}

/**
* Gets asset
*
Expand Down
Loading