Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.19.0 #90

Merged
merged 1 commit into from
Aug 28, 2024
Merged
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
4 changes: 2 additions & 2 deletions MuxPhp/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class Configuration
*
* @var string
*/
protected $userAgent = 'Mux PHP | 3.18.0';
protected $userAgent = 'Mux PHP | 3.19.0';

/**
* Debug switch (default set to false)
Expand Down Expand Up @@ -400,7 +400,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: 3.18.0' . PHP_EOL;
$report .= ' SDK Package Version: 3.19.0' . PHP_EOL;
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;

return $report;
Expand Down
74 changes: 73 additions & 1 deletion MuxPhp/Models/Asset.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class Asset implements ModelInterface, ArrayAccess, \JsonSerializable
'resolution_tier' => 'string',
'max_resolution_tier' => 'string',
'encoding_tier' => 'string',
'video_quality' => 'string',
'max_stored_frame_rate' => 'double',
'aspect_ratio' => 'string',
'playback_ids' => '\MuxPhp\Models\PlaybackID[]',
Expand Down Expand Up @@ -106,6 +107,7 @@ class Asset implements ModelInterface, ArrayAccess, \JsonSerializable
'resolution_tier' => null,
'max_resolution_tier' => null,
'encoding_tier' => null,
'video_quality' => null,
'max_stored_frame_rate' => 'double',
'aspect_ratio' => null,
'playback_ids' => null,
Expand Down Expand Up @@ -142,6 +144,7 @@ class Asset implements ModelInterface, ArrayAccess, \JsonSerializable
'resolution_tier' => false,
'max_resolution_tier' => false,
'encoding_tier' => false,
'video_quality' => false,
'max_stored_frame_rate' => false,
'aspect_ratio' => false,
'playback_ids' => false,
Expand Down Expand Up @@ -248,6 +251,7 @@ public function isNullableSetToNull(string $property): bool
'resolution_tier' => 'resolution_tier',
'max_resolution_tier' => 'max_resolution_tier',
'encoding_tier' => 'encoding_tier',
'video_quality' => 'video_quality',
'max_stored_frame_rate' => 'max_stored_frame_rate',
'aspect_ratio' => 'aspect_ratio',
'playback_ids' => 'playback_ids',
Expand Down Expand Up @@ -284,6 +288,7 @@ public function isNullableSetToNull(string $property): bool
'resolution_tier' => 'setResolutionTier',
'max_resolution_tier' => 'setMaxResolutionTier',
'encoding_tier' => 'setEncodingTier',
'video_quality' => 'setVideoQuality',
'max_stored_frame_rate' => 'setMaxStoredFrameRate',
'aspect_ratio' => 'setAspectRatio',
'playback_ids' => 'setPlaybackIds',
Expand Down Expand Up @@ -320,6 +325,7 @@ public function isNullableSetToNull(string $property): bool
'resolution_tier' => 'getResolutionTier',
'max_resolution_tier' => 'getMaxResolutionTier',
'encoding_tier' => 'getEncodingTier',
'video_quality' => 'getVideoQuality',
'max_stored_frame_rate' => 'getMaxStoredFrameRate',
'aspect_ratio' => 'getAspectRatio',
'playback_ids' => 'getPlaybackIds',
Expand Down Expand Up @@ -401,6 +407,8 @@ public function getModelName()
public const MAX_RESOLUTION_TIER__2160P = '2160p';
public const ENCODING_TIER_SMART = 'smart';
public const ENCODING_TIER_BASELINE = 'baseline';
public const VIDEO_QUALITY_BASIC = 'basic';
public const VIDEO_QUALITY_PLUS = 'plus';
public const MASTER_ACCESS_TEMPORARY = 'temporary';
public const MASTER_ACCESS_NONE = 'none';
public const MP4_SUPPORT_STANDARD = 'standard';
Expand Down Expand Up @@ -487,6 +495,19 @@ public function getEncodingTierAllowableValues()
];
}

/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getVideoQualityAllowableValues()
{
return [
self::VIDEO_QUALITY_BASIC,
self::VIDEO_QUALITY_PLUS,
];
}

/**
* Gets allowable values of the enum
*
Expand Down Expand Up @@ -558,6 +579,7 @@ public function __construct(array $data = null)
$this->setIfExists('resolution_tier', $data ?? [], null);
$this->setIfExists('max_resolution_tier', $data ?? [], null);
$this->setIfExists('encoding_tier', $data ?? [], null);
$this->setIfExists('video_quality', $data ?? [], null);
$this->setIfExists('max_stored_frame_rate', $data ?? [], null);
$this->setIfExists('aspect_ratio', $data ?? [], null);
$this->setIfExists('playback_ids', $data ?? [], null);
Expand Down Expand Up @@ -652,6 +674,15 @@ public function listInvalidProperties()
);
}

$allowedValues = $this->getVideoQualityAllowableValues();
if (!is_null($this->container['video_quality']) && !in_array($this->container['video_quality'], $allowedValues, true)) {
$invalidProperties[] = sprintf(
"invalid value '%s' for 'video_quality', must be one of '%s'",
$this->container['video_quality'],
implode("', '", $allowedValues)
);
}

$allowedValues = $this->getMasterAccessAllowableValues();
if (!is_null($this->container['master_access']) && !in_array($this->container['master_access'], $allowedValues, true)) {
$invalidProperties[] = sprintf(
Expand Down Expand Up @@ -943,6 +974,7 @@ public function setMaxResolutionTier($max_resolution_tier)
* Gets encoding_tier
*
* @return string|null
* @deprecated
*/
public function getEncodingTier()
{
Expand All @@ -952,9 +984,10 @@ public function getEncodingTier()
/**
* Sets encoding_tier
*
* @param string|null $encoding_tier The encoding tier informs the cost, quality, and available platform features for the asset. By default the `smart` encoding tier is used. [See the guide for more details.](https://docs.mux.com/guides/use-encoding-tiers)
* @param string|null $encoding_tier This field is deprecated. Please use `video_quality` instead. The encoding tier informs the cost, quality, and available platform features for the asset. By default the `smart` encoding tier is used. [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers)
*
* @return self
* @deprecated
*/
public function setEncodingTier($encoding_tier)
{
Expand All @@ -978,6 +1011,45 @@ public function setEncodingTier($encoding_tier)
return $this;
}

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

/**
* Sets video_quality
*
* @param string|null $video_quality The video quality controls the cost, quality, and available platform features for the asset. By default the `plus` video quality is used. This field replaces the deprecated `encoding_tier` value. [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers)
*
* @return self
*/
public function setVideoQuality($video_quality)
{
$allowedValues = $this->getVideoQualityAllowableValues();
if (!is_null($video_quality) && !in_array($video_quality, $allowedValues, true)) {
throw new \InvalidArgumentException(
sprintf(
"Invalid value '%s' for 'video_quality', must be one of '%s'",
$video_quality,
implode("', '", $allowedValues)
)
);
}

if (is_null($video_quality)) {
throw new \InvalidArgumentException('non-nullable video_quality cannot be null');
}

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

return $this;
}

/**
* Gets max_stored_frame_rate
*
Expand Down
86 changes: 79 additions & 7 deletions MuxPhp/Models/CreateAssetRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ class CreateAssetRequest implements ModelInterface, ArrayAccess, \JsonSerializab
'master_access' => 'string',
'test' => 'bool',
'max_resolution_tier' => 'string',
'encoding_tier' => 'string'
'encoding_tier' => 'string',
'video_quality' => 'string'
];

/**
Expand All @@ -91,7 +92,8 @@ class CreateAssetRequest implements ModelInterface, ArrayAccess, \JsonSerializab
'master_access' => null,
'test' => 'boolean',
'max_resolution_tier' => null,
'encoding_tier' => null
'encoding_tier' => null,
'video_quality' => null
];

/**
Expand All @@ -110,7 +112,8 @@ class CreateAssetRequest implements ModelInterface, ArrayAccess, \JsonSerializab
'master_access' => false,
'test' => false,
'max_resolution_tier' => false,
'encoding_tier' => false
'encoding_tier' => false,
'video_quality' => false
];

/**
Expand Down Expand Up @@ -199,7 +202,8 @@ public function isNullableSetToNull(string $property): bool
'master_access' => 'master_access',
'test' => 'test',
'max_resolution_tier' => 'max_resolution_tier',
'encoding_tier' => 'encoding_tier'
'encoding_tier' => 'encoding_tier',
'video_quality' => 'video_quality'
];

/**
Expand All @@ -218,7 +222,8 @@ public function isNullableSetToNull(string $property): bool
'master_access' => 'setMasterAccess',
'test' => 'setTest',
'max_resolution_tier' => 'setMaxResolutionTier',
'encoding_tier' => 'setEncodingTier'
'encoding_tier' => 'setEncodingTier',
'video_quality' => 'setVideoQuality'
];

/**
Expand All @@ -237,7 +242,8 @@ public function isNullableSetToNull(string $property): bool
'master_access' => 'getMasterAccess',
'test' => 'getTest',
'max_resolution_tier' => 'getMaxResolutionTier',
'encoding_tier' => 'getEncodingTier'
'encoding_tier' => 'getEncodingTier',
'video_quality' => 'getVideoQuality'
];

/**
Expand Down Expand Up @@ -293,6 +299,8 @@ public function getModelName()
public const MAX_RESOLUTION_TIER__2160P = '2160p';
public const ENCODING_TIER_SMART = 'smart';
public const ENCODING_TIER_BASELINE = 'baseline';
public const VIDEO_QUALITY_BASIC = 'basic';
public const VIDEO_QUALITY_PLUS = 'plus';

/**
* Gets allowable values of the enum
Expand Down Expand Up @@ -350,6 +358,19 @@ public function getEncodingTierAllowableValues()
];
}

/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getVideoQualityAllowableValues()
{
return [
self::VIDEO_QUALITY_BASIC,
self::VIDEO_QUALITY_PLUS,
];
}

/**
* Associative array for storing property values
*
Expand Down Expand Up @@ -379,6 +400,7 @@ public function __construct(array $data = null)
$this->setIfExists('test', $data ?? [], null);
$this->setIfExists('max_resolution_tier', $data ?? [], null);
$this->setIfExists('encoding_tier', $data ?? [], null);
$this->setIfExists('video_quality', $data ?? [], null);
}

/**
Expand Down Expand Up @@ -444,6 +466,15 @@ public function listInvalidProperties()
);
}

$allowedValues = $this->getVideoQualityAllowableValues();
if (!is_null($this->container['video_quality']) && !in_array($this->container['video_quality'], $allowedValues, true)) {
$invalidProperties[] = sprintf(
"invalid value '%s' for 'video_quality', must be one of '%s'",
$this->container['video_quality'],
implode("', '", $allowedValues)
);
}

return $invalidProperties;
}

Expand Down Expand Up @@ -785,6 +816,7 @@ public function setMaxResolutionTier($max_resolution_tier)
* Gets encoding_tier
*
* @return string|null
* @deprecated
*/
public function getEncodingTier()
{
Expand All @@ -794,9 +826,10 @@ public function getEncodingTier()
/**
* Sets encoding_tier
*
* @param string|null $encoding_tier The encoding tier informs the cost, quality, and available platform features for the asset. By default the `smart` encoding tier is used. [See the guide for more details.](https://docs.mux.com/guides/use-encoding-tiers)
* @param string|null $encoding_tier This field is deprecated. Please use `video_quality` instead. The encoding tier informs the cost, quality, and available platform features for the asset. By default the `smart` encoding tier is used. [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers)
*
* @return self
* @deprecated
*/
public function setEncodingTier($encoding_tier)
{
Expand All @@ -819,6 +852,45 @@ public function setEncodingTier($encoding_tier)

return $this;
}

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

/**
* Sets video_quality
*
* @param string|null $video_quality The video quality controls the cost, quality, and available platform features for the asset. By default the `plus` video quality is used. This field replaces the deprecated `encoding_tier` value. [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers)
*
* @return self
*/
public function setVideoQuality($video_quality)
{
$allowedValues = $this->getVideoQualityAllowableValues();
if (!is_null($video_quality) && !in_array($video_quality, $allowedValues, true)) {
throw new \InvalidArgumentException(
sprintf(
"Invalid value '%s' for 'video_quality', must be one of '%s'",
$video_quality,
implode("', '", $allowedValues)
)
);
}

if (is_null($video_quality)) {
throw new \InvalidArgumentException('non-nullable video_quality cannot be null');
}

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

return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
Expand Down
Loading
Loading