From bf6ae28a5f934a1051aab6a3d79950ba9e35a3ec Mon Sep 17 00:00:00 2001 From: Phil Cluff <578330+philcluff@users.noreply.github.com> Date: Thu, 14 Mar 2024 15:50:06 +0000 Subject: [PATCH] Regen from latest OpenAPI spec (#85) --- .openapi-generator/FILES | 4 + MuxPhp/Api/AssetsApi.php | 318 +++++++++++++- MuxPhp/Api/LiveStreamsApi.php | 16 +- MuxPhp/Api/PlaybackIDApi.php | 8 +- MuxPhp/Configuration.php | 4 +- MuxPhp/Models/Asset.php | 88 +++- .../Models/CreateSimulcastTargetRequest.php | 4 +- MuxPhp/Models/Error.php | 55 ++- .../Models/GenerateTrackSubtitlesRequest.php | 407 ++++++++++++++++++ .../Models/GenerateTrackSubtitlesResponse.php | 407 ++++++++++++++++++ MuxPhp/Models/InputSettings.php | 2 +- MuxPhp/Models/LiveStream.php | 82 +++- ...MonitoringBreakdownTimeseriesDatapoint.php | 48 ++- MuxPhp/Models/SimulcastTarget.php | 88 +++- MuxPhp/Models/VideoView.php | 120 +++++- README.md | 13 +- composer.json | 2 +- docs/Api/AssetsApi.md | 83 +++- docs/Api/DirectUploadsApi.md | 2 +- docs/Api/LiveStreamsApi.md | 8 +- docs/Api/PlaybackIDApi.md | 4 +- docs/Model/Asset.md | 1 + docs/Model/CreateSimulcastTargetRequest.md | 4 +- docs/Model/Error.md | 1 + docs/Model/GenerateTrackSubtitlesRequest.md | 9 + docs/Model/GenerateTrackSubtitlesResponse.md | 9 + docs/Model/InputSettings.md | 2 +- docs/Model/LiveStream.md | 1 + .../MonitoringBreakdownTimeseriesDatapoint.md | 1 + docs/Model/SimulcastTarget.md | 7 +- docs/Model/VideoView.md | 3 + gen/generator-config.json | 2 +- 32 files changed, 1720 insertions(+), 83 deletions(-) create mode 100644 MuxPhp/Models/GenerateTrackSubtitlesRequest.php create mode 100644 MuxPhp/Models/GenerateTrackSubtitlesResponse.php create mode 100644 docs/Model/GenerateTrackSubtitlesRequest.md create mode 100644 docs/Model/GenerateTrackSubtitlesResponse.md diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index e067a52..88a037d 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -61,6 +61,8 @@ MuxPhp/Models/Error.php MuxPhp/Models/ExportDate.php MuxPhp/Models/ExportFile.php MuxPhp/Models/FilterValue.php +MuxPhp/Models/GenerateTrackSubtitlesRequest.php +MuxPhp/Models/GenerateTrackSubtitlesResponse.php MuxPhp/Models/GetAssetInputInfoResponse.php MuxPhp/Models/GetAssetOrLiveStreamIdResponse.php MuxPhp/Models/GetAssetOrLiveStreamIdResponseData.php @@ -240,6 +242,8 @@ docs/Model/Error.md docs/Model/ExportDate.md docs/Model/ExportFile.md docs/Model/FilterValue.md +docs/Model/GenerateTrackSubtitlesRequest.md +docs/Model/GenerateTrackSubtitlesResponse.md docs/Model/GetAssetInputInfoResponse.md docs/Model/GetAssetOrLiveStreamIdResponse.md docs/Model/GetAssetOrLiveStreamIdResponseData.md diff --git a/MuxPhp/Api/AssetsApi.php b/MuxPhp/Api/AssetsApi.php index 17e5cc9..88f14e2 100644 --- a/MuxPhp/Api/AssetsApi.php +++ b/MuxPhp/Api/AssetsApi.php @@ -1685,6 +1685,316 @@ public function deleteAssetTrackRequest($asset_id, $track_id) ); } + /** + * Operation generateAssetTrackSubtitles + * + * Generate track subtitles + * + * @param string $asset_id The asset ID. (required) + * @param string $track_id The track ID. (required) + * @param \MuxPhp\Models\GenerateTrackSubtitlesRequest $generate_track_subtitles_request generate_track_subtitles_request (required) + * + * @throws \MuxPhp\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \MuxPhp\Models\GenerateTrackSubtitlesResponse + */ + public function generateAssetTrackSubtitles($asset_id, $track_id, $generate_track_subtitles_request) + { + list($response) = $this->generateAssetTrackSubtitlesWithHttpInfo($asset_id, $track_id, $generate_track_subtitles_request); + return $response; + } + + /** + * Operation generateAssetTrackSubtitlesWithHttpInfo + * + * Generate track subtitles + * + * @param string $asset_id The asset ID. (required) + * @param string $track_id The track ID. (required) + * @param \MuxPhp\Models\GenerateTrackSubtitlesRequest $generate_track_subtitles_request (required) + * + * @throws \MuxPhp\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \MuxPhp\Models\GenerateTrackSubtitlesResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function generateAssetTrackSubtitlesWithHttpInfo($asset_id, $track_id, $generate_track_subtitles_request) + { + $request = $this->generateAssetTrackSubtitlesRequest($asset_id, $track_id, $generate_track_subtitles_request); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + switch($statusCode) { + case 201: + if ('\MuxPhp\Models\GenerateTrackSubtitlesResponse' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\MuxPhp\Models\GenerateTrackSubtitlesResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\MuxPhp\Models\GenerateTrackSubtitlesResponse'; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\MuxPhp\Models\GenerateTrackSubtitlesResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation generateAssetTrackSubtitlesAsync + * + * Generate track subtitles + * + * @param string $asset_id The asset ID. (required) + * @param string $track_id The track ID. (required) + * @param \MuxPhp\Models\GenerateTrackSubtitlesRequest $generate_track_subtitles_request (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function generateAssetTrackSubtitlesAsync($asset_id, $track_id, $generate_track_subtitles_request) + { + return $this->generateAssetTrackSubtitlesAsyncWithHttpInfo($asset_id, $track_id, $generate_track_subtitles_request) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation generateAssetTrackSubtitlesAsyncWithHttpInfo + * + * Generate track subtitles + * + * @param string $asset_id The asset ID. (required) + * @param string $track_id The track ID. (required) + * @param \MuxPhp\Models\GenerateTrackSubtitlesRequest $generate_track_subtitles_request (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function generateAssetTrackSubtitlesAsyncWithHttpInfo($asset_id, $track_id, $generate_track_subtitles_request) + { + $returnType = '\MuxPhp\Models\GenerateTrackSubtitlesResponse'; + $request = $this->generateAssetTrackSubtitlesRequest($asset_id, $track_id, $generate_track_subtitles_request); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'generateAssetTrackSubtitles' + * + * @param string $asset_id The asset ID. (required) + * @param string $track_id The track ID. (required) + * @param \MuxPhp\Models\GenerateTrackSubtitlesRequest $generate_track_subtitles_request (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function generateAssetTrackSubtitlesRequest($asset_id, $track_id, $generate_track_subtitles_request) + { + // verify the required parameter 'asset_id' is set + if ($asset_id === null || (is_array($asset_id) && count($asset_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $asset_id when calling generateAssetTrackSubtitles' + ); + } + // verify the required parameter 'track_id' is set + if ($track_id === null || (is_array($track_id) && count($track_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $track_id when calling generateAssetTrackSubtitles' + ); + } + // verify the required parameter 'generate_track_subtitles_request' is set + if ($generate_track_subtitles_request === null || (is_array($generate_track_subtitles_request) && count($generate_track_subtitles_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $generate_track_subtitles_request when calling generateAssetTrackSubtitles' + ); + } + + $resourcePath = '/video/v1/assets/{ASSET_ID}/tracks/{TRACK_ID}/generate-subtitles'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($asset_id !== null) { + $resourcePath = str_replace( + '{' . 'ASSET_ID' . '}', + ObjectSerializer::toPathValue($asset_id), + $resourcePath + ); + } + // path params + if ($track_id !== null) { + $resourcePath = str_replace( + '{' . 'TRACK_ID' . '}', + ObjectSerializer::toPathValue($track_id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($generate_track_subtitles_request)) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($generate_track_subtitles_request)); + } else { + $httpBody = $generate_track_subtitles_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + + // MUX: adds support for array params. + // TODO: future upstream? + $query = ObjectSerializer::buildBetterQuery($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation getAsset * @@ -2848,7 +3158,7 @@ public function listAssetsRequest($limit = 25, $page = 1, $live_stream_id = null /** * Operation updateAsset * - * Update an Asset + * Update an asset * * @param string $asset_id The asset ID. (required) * @param \MuxPhp\Models\UpdateAssetRequest $update_asset_request update_asset_request (required) @@ -2866,7 +3176,7 @@ public function updateAsset($asset_id, $update_asset_request) /** * Operation updateAssetWithHttpInfo * - * Update an Asset + * Update an asset * * @param string $asset_id The asset ID. (required) * @param \MuxPhp\Models\UpdateAssetRequest $update_asset_request (required) @@ -2955,7 +3265,7 @@ public function updateAssetWithHttpInfo($asset_id, $update_asset_request) /** * Operation updateAssetAsync * - * Update an Asset + * Update an asset * * @param string $asset_id The asset ID. (required) * @param \MuxPhp\Models\UpdateAssetRequest $update_asset_request (required) @@ -2976,7 +3286,7 @@ function ($response) { /** * Operation updateAssetAsyncWithHttpInfo * - * Update an Asset + * Update an asset * * @param string $asset_id The asset ID. (required) * @param \MuxPhp\Models\UpdateAssetRequest $update_asset_request (required) diff --git a/MuxPhp/Api/LiveStreamsApi.php b/MuxPhp/Api/LiveStreamsApi.php index 1a0b3f0..ad44547 100644 --- a/MuxPhp/Api/LiveStreamsApi.php +++ b/MuxPhp/Api/LiveStreamsApi.php @@ -1443,7 +1443,7 @@ public function deleteLiveStreamPlaybackIdRequest($live_stream_id, $playback_id) /** * Operation deleteLiveStreamSimulcastTarget * - * Delete a Live Stream Simulcast Target + * Delete a live stream simulcast target * * @param string $live_stream_id The live stream ID (required) * @param string $simulcast_target_id The ID of the simulcast target. (required) @@ -1460,7 +1460,7 @@ public function deleteLiveStreamSimulcastTarget($live_stream_id, $simulcast_targ /** * Operation deleteLiveStreamSimulcastTargetWithHttpInfo * - * Delete a Live Stream Simulcast Target + * Delete a live stream simulcast target * * @param string $live_stream_id The live stream ID (required) * @param string $simulcast_target_id The ID of the simulcast target. (required) @@ -1513,7 +1513,7 @@ public function deleteLiveStreamSimulcastTargetWithHttpInfo($live_stream_id, $si /** * Operation deleteLiveStreamSimulcastTargetAsync * - * Delete a Live Stream Simulcast Target + * Delete a live stream simulcast target * * @param string $live_stream_id The live stream ID (required) * @param string $simulcast_target_id The ID of the simulcast target. (required) @@ -1534,7 +1534,7 @@ function ($response) { /** * Operation deleteLiveStreamSimulcastTargetAsyncWithHttpInfo * - * Delete a Live Stream Simulcast Target + * Delete a live stream simulcast target * * @param string $live_stream_id The live stream ID (required) * @param string $simulcast_target_id The ID of the simulcast target. (required) @@ -2803,7 +2803,7 @@ public function getLiveStreamPlaybackIdRequest($live_stream_id, $playback_id) /** * Operation getLiveStreamSimulcastTarget * - * Retrieve a Live Stream Simulcast Target + * Retrieve a live stream simulcast target * * @param string $live_stream_id The live stream ID (required) * @param string $simulcast_target_id The ID of the simulcast target. (required) @@ -2821,7 +2821,7 @@ public function getLiveStreamSimulcastTarget($live_stream_id, $simulcast_target_ /** * Operation getLiveStreamSimulcastTargetWithHttpInfo * - * Retrieve a Live Stream Simulcast Target + * Retrieve a live stream simulcast target * * @param string $live_stream_id The live stream ID (required) * @param string $simulcast_target_id The ID of the simulcast target. (required) @@ -2910,7 +2910,7 @@ public function getLiveStreamSimulcastTargetWithHttpInfo($live_stream_id, $simul /** * Operation getLiveStreamSimulcastTargetAsync * - * Retrieve a Live Stream Simulcast Target + * Retrieve a live stream simulcast target * * @param string $live_stream_id The live stream ID (required) * @param string $simulcast_target_id The ID of the simulcast target. (required) @@ -2931,7 +2931,7 @@ function ($response) { /** * Operation getLiveStreamSimulcastTargetAsyncWithHttpInfo * - * Retrieve a Live Stream Simulcast Target + * Retrieve a live stream simulcast target * * @param string $live_stream_id The live stream ID (required) * @param string $simulcast_target_id The ID of the simulcast target. (required) diff --git a/MuxPhp/Api/PlaybackIDApi.php b/MuxPhp/Api/PlaybackIDApi.php index 7f46eaa..ca16025 100644 --- a/MuxPhp/Api/PlaybackIDApi.php +++ b/MuxPhp/Api/PlaybackIDApi.php @@ -118,7 +118,7 @@ public function getConfig() /** * Operation getAssetOrLivestreamId * - * Retrieve an Asset or Live Stream ID + * Retrieve an asset or live stream ID * * @param string $playback_id The live stream's playback ID. (required) * @@ -135,7 +135,7 @@ public function getAssetOrLivestreamId($playback_id) /** * Operation getAssetOrLivestreamIdWithHttpInfo * - * Retrieve an Asset or Live Stream ID + * Retrieve an asset or live stream ID * * @param string $playback_id The live stream's playback ID. (required) * @@ -223,7 +223,7 @@ public function getAssetOrLivestreamIdWithHttpInfo($playback_id) /** * Operation getAssetOrLivestreamIdAsync * - * Retrieve an Asset or Live Stream ID + * Retrieve an asset or live stream ID * * @param string $playback_id The live stream's playback ID. (required) * @@ -243,7 +243,7 @@ function ($response) { /** * Operation getAssetOrLivestreamIdAsyncWithHttpInfo * - * Retrieve an Asset or Live Stream ID + * Retrieve an asset or live stream ID * * @param string $playback_id The live stream's playback ID. (required) * diff --git a/MuxPhp/Configuration.php b/MuxPhp/Configuration.php index 5da2b6c..8eca0e4 100644 --- a/MuxPhp/Configuration.php +++ b/MuxPhp/Configuration.php @@ -91,7 +91,7 @@ class Configuration * * @var string */ - protected $userAgent = 'OpenAPI-Generator/3.14.0/PHP'; + protected $userAgent = 'OpenAPI-Generator/3.15.0/PHP'; /** * Debug switch (default set to false) @@ -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.14.0' . PHP_EOL; + $report .= ' SDK Package Version: 3.15.0' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/MuxPhp/Models/Asset.php b/MuxPhp/Models/Asset.php index 19c127f..6424c78 100644 --- a/MuxPhp/Models/Asset.php +++ b/MuxPhp/Models/Asset.php @@ -86,7 +86,8 @@ class Asset implements ModelInterface, ArrayAccess, \JsonSerializable 'static_renditions' => '\MuxPhp\Models\AssetStaticRenditions', 'recording_times' => '\MuxPhp\Models\AssetRecordingTimes[]', 'non_standard_input_reasons' => '\MuxPhp\Models\AssetNonStandardInputReasons', - 'test' => 'bool' + 'test' => 'bool', + 'ingest_type' => 'string' ]; /** @@ -123,7 +124,8 @@ class Asset implements ModelInterface, ArrayAccess, \JsonSerializable 'static_renditions' => null, 'recording_times' => null, 'non_standard_input_reasons' => null, - 'test' => 'boolean' + 'test' => 'boolean', + 'ingest_type' => null ]; /** @@ -158,7 +160,8 @@ class Asset implements ModelInterface, ArrayAccess, \JsonSerializable 'static_renditions' => false, 'recording_times' => false, 'non_standard_input_reasons' => false, - 'test' => false + 'test' => false, + 'ingest_type' => false ]; /** @@ -263,7 +266,8 @@ public function isNullableSetToNull(string $property): bool 'static_renditions' => 'static_renditions', 'recording_times' => 'recording_times', 'non_standard_input_reasons' => 'non_standard_input_reasons', - 'test' => 'test' + 'test' => 'test', + 'ingest_type' => 'ingest_type' ]; /** @@ -298,7 +302,8 @@ public function isNullableSetToNull(string $property): bool 'static_renditions' => 'setStaticRenditions', 'recording_times' => 'setRecordingTimes', 'non_standard_input_reasons' => 'setNonStandardInputReasons', - 'test' => 'setTest' + 'test' => 'setTest', + 'ingest_type' => 'setIngestType' ]; /** @@ -333,7 +338,8 @@ public function isNullableSetToNull(string $property): bool 'static_renditions' => 'getStaticRenditions', 'recording_times' => 'getRecordingTimes', 'non_standard_input_reasons' => 'getNonStandardInputReasons', - 'test' => 'getTest' + 'test' => 'getTest', + 'ingest_type' => 'getIngestType' ]; /** @@ -399,6 +405,11 @@ public function getModelName() public const MASTER_ACCESS_NONE = 'none'; public const MP4_SUPPORT_STANDARD = 'standard'; public const MP4_SUPPORT_NONE = 'none'; + public const INGEST_TYPE_ON_DEMAND_URL = 'on_demand_url'; + public const INGEST_TYPE_ON_DEMAND_DIRECT_UPLOAD = 'on_demand_direct_upload'; + public const INGEST_TYPE_ON_DEMAND_CLIP = 'on_demand_clip'; + public const INGEST_TYPE_LIVE_RTMP = 'live_rtmp'; + public const INGEST_TYPE_LIVE_SRT = 'live_srt'; /** * Gets allowable values of the enum @@ -499,6 +510,22 @@ public function getMp4SupportAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getIngestTypeAllowableValues() + { + return [ + self::INGEST_TYPE_ON_DEMAND_URL, + self::INGEST_TYPE_ON_DEMAND_DIRECT_UPLOAD, + self::INGEST_TYPE_ON_DEMAND_CLIP, + self::INGEST_TYPE_LIVE_RTMP, + self::INGEST_TYPE_LIVE_SRT, + ]; + } + /** * Associative array for storing property values * @@ -544,6 +571,7 @@ public function __construct(array $data = null) $this->setIfExists('recording_times', $data ?? [], null); $this->setIfExists('non_standard_input_reasons', $data ?? [], null); $this->setIfExists('test', $data ?? [], null); + $this->setIfExists('ingest_type', $data ?? [], null); } /** @@ -636,6 +664,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getIngestTypeAllowableValues(); + if (!is_null($this->container['ingest_type']) && !in_array($this->container['ingest_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'ingest_type', must be one of '%s'", + $this->container['ingest_type'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -1507,6 +1544,45 @@ public function setTest($test) return $this; } + + /** + * Gets ingest_type + * + * @return string|null + */ + public function getIngestType() + { + return $this->container['ingest_type']; + } + + /** + * Sets ingest_type + * + * @param string|null $ingest_type The type of ingest used to create the asset. + * + * @return self + */ + public function setIngestType($ingest_type) + { + $allowedValues = $this->getIngestTypeAllowableValues(); + if (!is_null($ingest_type) && !in_array($ingest_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'ingest_type', must be one of '%s'", + $ingest_type, + implode("', '", $allowedValues) + ) + ); + } + + if (is_null($ingest_type)) { + throw new \InvalidArgumentException('non-nullable ingest_type cannot be null'); + } + + $this->container['ingest_type'] = $ingest_type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/MuxPhp/Models/CreateSimulcastTargetRequest.php b/MuxPhp/Models/CreateSimulcastTargetRequest.php index bec8747..391d0dd 100644 --- a/MuxPhp/Models/CreateSimulcastTargetRequest.php +++ b/MuxPhp/Models/CreateSimulcastTargetRequest.php @@ -341,7 +341,7 @@ public function getStreamKey() /** * Sets stream_key * - * @param string|null $stream_key Stream Key represents a stream identifier on the third party live streaming service to send the parent live stream to. + * @param string|null $stream_key Stream Key represents a stream identifier on the third party live streaming service to send the parent live stream to. Only used for RTMP(s) simulcast destinations. * * @return self */ @@ -370,7 +370,7 @@ public function getUrl() /** * Sets url * - * @param string|null $url RTMP hostname including application name for the third party live streaming service. Example: `rtmp://live.example.com/app`. + * @param string|null $url The RTMP(s) or SRT endpoint for a simulcast destination. * For RTMP(s) destinations, this should include the application name for the third party live streaming service, for example: `rtmp://live.example.com/app`. * For SRT destinations, this should be a fully formed SRT connection string, for example: `srt://srt-live.example.com:1234?streamid={stream_key}&passphrase={srt_passphrase}`. Note: SRT simulcast targets can only be used when an source is connected over SRT. * * @return self */ diff --git a/MuxPhp/Models/Error.php b/MuxPhp/Models/Error.php index e1b571c..aebeff8 100644 --- a/MuxPhp/Models/Error.php +++ b/MuxPhp/Models/Error.php @@ -67,7 +67,8 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable 'last_seen' => 'string', 'description' => 'string', 'count' => 'int', - 'code' => 'int' + 'code' => 'int', + 'player_error_code' => 'string' ]; /** @@ -85,7 +86,8 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable 'last_seen' => null, 'description' => null, 'count' => 'int64', - 'code' => 'int64' + 'code' => 'int64', + 'player_error_code' => null ]; /** @@ -101,7 +103,8 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable 'last_seen' => false, 'description' => true, 'count' => false, - 'code' => true + 'code' => true, + 'player_error_code' => true ]; /** @@ -187,7 +190,8 @@ public function isNullableSetToNull(string $property): bool 'last_seen' => 'last_seen', 'description' => 'description', 'count' => 'count', - 'code' => 'code' + 'code' => 'code', + 'player_error_code' => 'player_error_code' ]; /** @@ -203,7 +207,8 @@ public function isNullableSetToNull(string $property): bool 'last_seen' => 'setLastSeen', 'description' => 'setDescription', 'count' => 'setCount', - 'code' => 'setCode' + 'code' => 'setCode', + 'player_error_code' => 'setPlayerErrorCode' ]; /** @@ -219,7 +224,8 @@ public function isNullableSetToNull(string $property): bool 'last_seen' => 'getLastSeen', 'description' => 'getDescription', 'count' => 'getCount', - 'code' => 'getCode' + 'code' => 'getCode', + 'player_error_code' => 'getPlayerErrorCode' ]; /** @@ -290,6 +296,7 @@ public function __construct(array $data = null) $this->setIfExists('description', $data ?? [], null); $this->setIfExists('count', $data ?? [], null); $this->setIfExists('code', $data ?? [], null); + $this->setIfExists('player_error_code', $data ?? [], null); } /** @@ -593,6 +600,42 @@ public function setCode($code) return $this; } + + /** + * Gets player_error_code + * + * @return string|null + */ + public function getPlayerErrorCode() + { + return $this->container['player_error_code']; + } + + /** + * Sets player_error_code + * + * @param string|null $player_error_code The string version of the error code + * + * @return self + */ + public function setPlayerErrorCode($player_error_code) + { + + if (is_null($player_error_code)) { + array_push($this->openAPINullablesSetToNull, 'player_error_code'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('player_error_code', $nullablesSetToNull, true); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + + $this->container['player_error_code'] = $player_error_code; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/MuxPhp/Models/GenerateTrackSubtitlesRequest.php b/MuxPhp/Models/GenerateTrackSubtitlesRequest.php new file mode 100644 index 0000000..53da898 --- /dev/null +++ b/MuxPhp/Models/GenerateTrackSubtitlesRequest.php @@ -0,0 +1,407 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class GenerateTrackSubtitlesRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'GenerateTrackSubtitlesRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'generated_subtitles' => '\MuxPhp\Models\AssetGeneratedSubtitleSettings[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'generated_subtitles' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'generated_subtitles' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'generated_subtitles' => 'generated_subtitles' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'generated_subtitles' => 'setGeneratedSubtitles' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'generated_subtitles' => 'getGeneratedSubtitles' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + // MUX: enum hack (self::) due to OAS emitting problems. + // please re-integrate with mainline when possible. + // src: https://github.com/OpenAPITools/openapi-generator/issues/9038 + $this->setIfExists('generated_subtitles', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets generated_subtitles + * + * @return \MuxPhp\Models\AssetGeneratedSubtitleSettings[]|null + */ + public function getGeneratedSubtitles() + { + return $this->container['generated_subtitles']; + } + + /** + * Sets generated_subtitles + * + * @param \MuxPhp\Models\AssetGeneratedSubtitleSettings[]|null $generated_subtitles Generate subtitle tracks using automatic speech recognition with this configuration. + * + * @return self + */ + public function setGeneratedSubtitles($generated_subtitles) + { + + if (is_null($generated_subtitles)) { + throw new \InvalidArgumentException('non-nullable generated_subtitles cannot be null'); + } + + $this->container['generated_subtitles'] = $generated_subtitles; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/MuxPhp/Models/GenerateTrackSubtitlesResponse.php b/MuxPhp/Models/GenerateTrackSubtitlesResponse.php new file mode 100644 index 0000000..ceea967 --- /dev/null +++ b/MuxPhp/Models/GenerateTrackSubtitlesResponse.php @@ -0,0 +1,407 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class GenerateTrackSubtitlesResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'GenerateTrackSubtitlesResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\MuxPhp\Models\Track' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'data' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + // MUX: enum hack (self::) due to OAS emitting problems. + // please re-integrate with mainline when possible. + // src: https://github.com/OpenAPITools/openapi-generator/issues/9038 + $this->setIfExists('data', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \MuxPhp\Models\Track|null + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \MuxPhp\Models\Track|null $data data + * + * @return self + */ + public function setData($data) + { + + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); + } + + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/MuxPhp/Models/InputSettings.php b/MuxPhp/Models/InputSettings.php index de74119..e0bef87 100644 --- a/MuxPhp/Models/InputSettings.php +++ b/MuxPhp/Models/InputSettings.php @@ -475,7 +475,7 @@ public function getGeneratedSubtitles() /** * Sets generated_subtitles * - * @param \MuxPhp\Models\AssetGeneratedSubtitleSettings[]|null $generated_subtitles Generate subtitle tracks using automatic speech recognition using this configuration. This may only be provided for the first input object (the main input file). For direct uploads, this first input should omit the url parameter, as the main input file is provided via the direct upload. This will create subtitles based on the audio track ingested from that main input file. Note that subtitle generation happens after initial ingest, so the generated tracks will be in the `preparing` state when the asset transitions to `ready`. + * @param \MuxPhp\Models\AssetGeneratedSubtitleSettings[]|null $generated_subtitles Generate subtitle tracks using automatic speech recognition with this configuration. This may only be provided for the first input object (the main input file). For direct uploads, this first input should omit the url parameter, as the main input file is provided via the direct upload. This will create subtitles based on the audio track ingested from that main input file. Note that subtitle generation happens after initial ingest, so the generated tracks will be in the `preparing` state when the asset transitions to `ready`. * * @return self */ diff --git a/MuxPhp/Models/LiveStream.php b/MuxPhp/Models/LiveStream.php index 3113a3e..50c0d50 100644 --- a/MuxPhp/Models/LiveStream.php +++ b/MuxPhp/Models/LiveStream.php @@ -81,7 +81,8 @@ class LiveStream implements ModelInterface, ArrayAccess, \JsonSerializable 'latency_mode' => 'string', 'test' => 'bool', 'max_continuous_duration' => 'int', - 'srt_passphrase' => 'string' + 'srt_passphrase' => 'string', + 'active_ingest_protocol' => 'string' ]; /** @@ -113,7 +114,8 @@ class LiveStream implements ModelInterface, ArrayAccess, \JsonSerializable 'latency_mode' => null, 'test' => 'boolean', 'max_continuous_duration' => 'int32', - 'srt_passphrase' => null + 'srt_passphrase' => null, + 'active_ingest_protocol' => null ]; /** @@ -143,7 +145,8 @@ class LiveStream implements ModelInterface, ArrayAccess, \JsonSerializable 'latency_mode' => false, 'test' => false, 'max_continuous_duration' => false, - 'srt_passphrase' => false + 'srt_passphrase' => false, + 'active_ingest_protocol' => false ]; /** @@ -243,7 +246,8 @@ public function isNullableSetToNull(string $property): bool 'latency_mode' => 'latency_mode', 'test' => 'test', 'max_continuous_duration' => 'max_continuous_duration', - 'srt_passphrase' => 'srt_passphrase' + 'srt_passphrase' => 'srt_passphrase', + 'active_ingest_protocol' => 'active_ingest_protocol' ]; /** @@ -273,7 +277,8 @@ public function isNullableSetToNull(string $property): bool 'latency_mode' => 'setLatencyMode', 'test' => 'setTest', 'max_continuous_duration' => 'setMaxContinuousDuration', - 'srt_passphrase' => 'setSrtPassphrase' + 'srt_passphrase' => 'setSrtPassphrase', + 'active_ingest_protocol' => 'setActiveIngestProtocol' ]; /** @@ -303,7 +308,8 @@ public function isNullableSetToNull(string $property): bool 'latency_mode' => 'getLatencyMode', 'test' => 'getTest', 'max_continuous_duration' => 'getMaxContinuousDuration', - 'srt_passphrase' => 'getSrtPassphrase' + 'srt_passphrase' => 'getSrtPassphrase', + 'active_ingest_protocol' => 'getActiveIngestProtocol' ]; /** @@ -350,6 +356,8 @@ public function getModelName() public const LATENCY_MODE_LOW = 'low'; public const LATENCY_MODE_REDUCED = 'reduced'; public const LATENCY_MODE_STANDARD = 'standard'; + public const ACTIVE_INGEST_PROTOCOL_RTMP = 'rtmp'; + public const ACTIVE_INGEST_PROTOCOL_SRT = 'srt'; /** * Gets allowable values of the enum @@ -365,6 +373,19 @@ public function getLatencyModeAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getActiveIngestProtocolAllowableValues() + { + return [ + self::ACTIVE_INGEST_PROTOCOL_RTMP, + self::ACTIVE_INGEST_PROTOCOL_SRT, + ]; + } + /** * Associative array for storing property values * @@ -405,6 +426,7 @@ public function __construct(array $data = null) $this->setIfExists('test', $data ?? [], null); $this->setIfExists('max_continuous_duration', $data ?? [], 43200); $this->setIfExists('srt_passphrase', $data ?? [], null); + $this->setIfExists('active_ingest_protocol', $data ?? [], null); } /** @@ -459,6 +481,15 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'max_continuous_duration', must be bigger than or equal to 60."; } + $allowedValues = $this->getActiveIngestProtocolAllowableValues(); + if (!is_null($this->container['active_ingest_protocol']) && !in_array($this->container['active_ingest_protocol'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'active_ingest_protocol', must be one of '%s'", + $this->container['active_ingest_protocol'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -1141,6 +1172,45 @@ public function setSrtPassphrase($srt_passphrase) return $this; } + + /** + * Gets active_ingest_protocol + * + * @return string|null + */ + public function getActiveIngestProtocol() + { + return $this->container['active_ingest_protocol']; + } + + /** + * Sets active_ingest_protocol + * + * @param string|null $active_ingest_protocol The protocol used for the active ingest stream. This is only set when the live stream is active. + * + * @return self + */ + public function setActiveIngestProtocol($active_ingest_protocol) + { + $allowedValues = $this->getActiveIngestProtocolAllowableValues(); + if (!is_null($active_ingest_protocol) && !in_array($active_ingest_protocol, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'active_ingest_protocol', must be one of '%s'", + $active_ingest_protocol, + implode("', '", $allowedValues) + ) + ); + } + + if (is_null($active_ingest_protocol)) { + throw new \InvalidArgumentException('non-nullable active_ingest_protocol cannot be null'); + } + + $this->container['active_ingest_protocol'] = $active_ingest_protocol; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/MuxPhp/Models/MonitoringBreakdownTimeseriesDatapoint.php b/MuxPhp/Models/MonitoringBreakdownTimeseriesDatapoint.php index 5906e03..1902154 100644 --- a/MuxPhp/Models/MonitoringBreakdownTimeseriesDatapoint.php +++ b/MuxPhp/Models/MonitoringBreakdownTimeseriesDatapoint.php @@ -62,7 +62,8 @@ class MonitoringBreakdownTimeseriesDatapoint implements ModelInterface, ArrayAcc protected static $openAPITypes = [ 'value' => 'string', 'metric_value' => 'double', - 'concurrent_viewers' => 'int' + 'concurrent_viewers' => 'int', + 'starting_up_viewers' => 'int' ]; /** @@ -75,7 +76,8 @@ class MonitoringBreakdownTimeseriesDatapoint implements ModelInterface, ArrayAcc protected static $openAPIFormats = [ 'value' => null, 'metric_value' => 'double', - 'concurrent_viewers' => 'int64' + 'concurrent_viewers' => 'int64', + 'starting_up_viewers' => 'int64' ]; /** @@ -86,7 +88,8 @@ class MonitoringBreakdownTimeseriesDatapoint implements ModelInterface, ArrayAcc protected static array $openAPINullables = [ 'value' => true, 'metric_value' => true, - 'concurrent_viewers' => false + 'concurrent_viewers' => false, + 'starting_up_viewers' => false ]; /** @@ -167,7 +170,8 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'value' => 'value', 'metric_value' => 'metric_value', - 'concurrent_viewers' => 'concurrent_viewers' + 'concurrent_viewers' => 'concurrent_viewers', + 'starting_up_viewers' => 'starting_up_viewers' ]; /** @@ -178,7 +182,8 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'value' => 'setValue', 'metric_value' => 'setMetricValue', - 'concurrent_viewers' => 'setConcurrentViewers' + 'concurrent_viewers' => 'setConcurrentViewers', + 'starting_up_viewers' => 'setStartingUpViewers' ]; /** @@ -189,7 +194,8 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'value' => 'getValue', 'metric_value' => 'getMetricValue', - 'concurrent_viewers' => 'getConcurrentViewers' + 'concurrent_viewers' => 'getConcurrentViewers', + 'starting_up_viewers' => 'getStartingUpViewers' ]; /** @@ -255,6 +261,7 @@ public function __construct(array $data = null) $this->setIfExists('value', $data ?? [], null); $this->setIfExists('metric_value', $data ?? [], null); $this->setIfExists('concurrent_viewers', $data ?? [], null); + $this->setIfExists('starting_up_viewers', $data ?? [], null); } /** @@ -399,6 +406,35 @@ public function setConcurrentViewers($concurrent_viewers) return $this; } + + /** + * Gets starting_up_viewers + * + * @return int|null + */ + public function getStartingUpViewers() + { + return $this->container['starting_up_viewers']; + } + + /** + * Sets starting_up_viewers + * + * @param int|null $starting_up_viewers starting_up_viewers + * + * @return self + */ + public function setStartingUpViewers($starting_up_viewers) + { + + if (is_null($starting_up_viewers)) { + throw new \InvalidArgumentException('non-nullable starting_up_viewers cannot be null'); + } + + $this->container['starting_up_viewers'] = $starting_up_viewers; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/MuxPhp/Models/SimulcastTarget.php b/MuxPhp/Models/SimulcastTarget.php index 024fd8f..1dafd00 100644 --- a/MuxPhp/Models/SimulcastTarget.php +++ b/MuxPhp/Models/SimulcastTarget.php @@ -64,7 +64,8 @@ class SimulcastTarget implements ModelInterface, ArrayAccess, \JsonSerializable 'passthrough' => 'string', 'status' => 'string', 'stream_key' => 'string', - 'url' => 'string' + 'url' => 'string', + 'error_severity' => 'string' ]; /** @@ -79,7 +80,8 @@ class SimulcastTarget implements ModelInterface, ArrayAccess, \JsonSerializable 'passthrough' => null, 'status' => null, 'stream_key' => null, - 'url' => null + 'url' => null, + 'error_severity' => null ]; /** @@ -92,7 +94,8 @@ class SimulcastTarget implements ModelInterface, ArrayAccess, \JsonSerializable 'passthrough' => false, 'status' => false, 'stream_key' => false, - 'url' => false + 'url' => false, + 'error_severity' => false ]; /** @@ -175,7 +178,8 @@ public function isNullableSetToNull(string $property): bool 'passthrough' => 'passthrough', 'status' => 'status', 'stream_key' => 'stream_key', - 'url' => 'url' + 'url' => 'url', + 'error_severity' => 'error_severity' ]; /** @@ -188,7 +192,8 @@ public function isNullableSetToNull(string $property): bool 'passthrough' => 'setPassthrough', 'status' => 'setStatus', 'stream_key' => 'setStreamKey', - 'url' => 'setUrl' + 'url' => 'setUrl', + 'error_severity' => 'setErrorSeverity' ]; /** @@ -201,7 +206,8 @@ public function isNullableSetToNull(string $property): bool 'passthrough' => 'getPassthrough', 'status' => 'getStatus', 'stream_key' => 'getStreamKey', - 'url' => 'getUrl' + 'url' => 'getUrl', + 'error_severity' => 'getErrorSeverity' ]; /** @@ -249,6 +255,8 @@ public function getModelName() public const STATUS_STARTING = 'starting'; public const STATUS_BROADCASTING = 'broadcasting'; public const STATUS_ERRORED = 'errored'; + public const ERROR_SEVERITY_NORMAL = 'normal'; + public const ERROR_SEVERITY_FATAL = 'fatal'; /** * Gets allowable values of the enum @@ -265,6 +273,19 @@ public function getStatusAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getErrorSeverityAllowableValues() + { + return [ + self::ERROR_SEVERITY_NORMAL, + self::ERROR_SEVERITY_FATAL, + ]; + } + /** * Associative array for storing property values * @@ -288,6 +309,7 @@ public function __construct(array $data = null) $this->setIfExists('status', $data ?? [], null); $this->setIfExists('stream_key', $data ?? [], null); $this->setIfExists('url', $data ?? [], null); + $this->setIfExists('error_severity', $data ?? [], null); } /** @@ -326,6 +348,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getErrorSeverityAllowableValues(); + if (!is_null($this->container['error_severity']) && !in_array($this->container['error_severity'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'error_severity', must be one of '%s'", + $this->container['error_severity'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -412,7 +443,7 @@ public function getStatus() /** * Sets status * - * @param string|null $status The current status of the simulcast target. See Statuses below for detailed description. * `idle`: Default status. When the parent live stream is in disconnected status, simulcast targets will be idle state. * `starting`: The simulcast target transitions into this state when the parent live stream transition into connected state. * `broadcasting`: The simulcast target has successfully connected to the third party live streaming service and is pushing video to that service. * `errored`: The simulcast target encountered an error either while attempting to connect to the third party live streaming service, or mid-broadcasting. Compared to other errored statuses in the Mux Video API, a simulcast may transition back into the broadcasting state if a connection with the service can be re-established. + * @param string|null $status The current status of the simulcast target. See Statuses below for detailed description. * `idle`: Default status. When the parent live stream is in disconnected status, simulcast targets will be idle state. * `starting`: The simulcast target transitions into this state when the parent live stream transition into connected state. * `broadcasting`: The simulcast target has successfully connected to the third party live streaming service and is pushing video to that service. * `errored`: The simulcast target encountered an error either while attempting to connect to the third party live streaming service, or mid-broadcasting. When a simulcast target has this status it will have an `error_severity` field with more details about the error. * * @return self */ @@ -451,7 +482,7 @@ public function getStreamKey() /** * Sets stream_key * - * @param string|null $stream_key Stream Key represents an stream identifier for the third party live streaming service to simulcast the parent live stream too. + * @param string|null $stream_key Stream Key represents a stream identifier on the third party live streaming service to send the parent live stream to. Only used for RTMP(s) simulcast destinations. * * @return self */ @@ -480,7 +511,7 @@ public function getUrl() /** * Sets url * - * @param string|null $url RTMP hostname including the application name for the third party live streaming service. + * @param string|null $url The RTMP(s) or SRT endpoint for a simulcast destination. * For RTMP(s) destinations, this should include the application name for the third party live streaming service, for example: `rtmp://live.example.com/app`. * For SRT destinations, this should be a fully formed SRT connection string, for example: `srt://srt-live.example.com:1234?streamid={stream_key}&passphrase={srt_passphrase}`. Note: SRT simulcast targets can only be used when an source is connected over SRT. * * @return self */ @@ -495,6 +526,45 @@ public function setUrl($url) return $this; } + + /** + * Gets error_severity + * + * @return string|null + */ + public function getErrorSeverity() + { + return $this->container['error_severity']; + } + + /** + * Sets error_severity + * + * @param string|null $error_severity The severity of the error encountered by the simulcast target. This field is only set when the simulcast target is in the `errored` status. See the values of severities below and their descriptions. * `normal`: The simulcast target encountered an error either while attempting to connect to the third party live streaming service, or mid-broadcasting. A simulcast may transition back into the broadcasting state if a connection with the service can be re-established. * `fatal`: The simulcast target is incompatible with the current input to the parent live stream. No further attempts to this simulcast target will be made for the current live stream asset. + * + * @return self + */ + public function setErrorSeverity($error_severity) + { + $allowedValues = $this->getErrorSeverityAllowableValues(); + if (!is_null($error_severity) && !in_array($error_severity, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'error_severity', must be one of '%s'", + $error_severity, + implode("', '", $allowedValues) + ) + ); + } + + if (is_null($error_severity)) { + throw new \InvalidArgumentException('non-nullable error_severity cannot be null'); + } + + $this->container['error_severity'] = $error_severity; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/MuxPhp/Models/VideoView.php b/MuxPhp/Models/VideoView.php index 847d914..b07cb1b 100644 --- a/MuxPhp/Models/VideoView.php +++ b/MuxPhp/Models/VideoView.php @@ -213,7 +213,10 @@ class VideoView implements ModelInterface, ArrayAccess, \JsonSerializable 'ad_exit_before_start_count' => 'int', 'ad_exit_before_start_percentage' => 'string', 'long_resume' => 'bool', - 'long_rebuffering' => 'bool' + 'long_rebuffering' => 'bool', + 'playback_failure_error_type_id' => 'int', + 'playback_business_exception_error_type_id' => 'int', + 'video_startup_business_exception_error_type_id' => 'int' ]; /** @@ -377,7 +380,10 @@ class VideoView implements ModelInterface, ArrayAccess, \JsonSerializable 'ad_exit_before_start_count' => 'int32', 'ad_exit_before_start_percentage' => null, 'long_resume' => null, - 'long_rebuffering' => null + 'long_rebuffering' => null, + 'playback_failure_error_type_id' => 'int32', + 'playback_business_exception_error_type_id' => 'int32', + 'video_startup_business_exception_error_type_id' => 'int32' ]; /** @@ -539,7 +545,10 @@ class VideoView implements ModelInterface, ArrayAccess, \JsonSerializable 'ad_exit_before_start_count' => true, 'ad_exit_before_start_percentage' => true, 'long_resume' => false, - 'long_rebuffering' => false + 'long_rebuffering' => false, + 'playback_failure_error_type_id' => false, + 'playback_business_exception_error_type_id' => false, + 'video_startup_business_exception_error_type_id' => false ]; /** @@ -771,7 +780,10 @@ public function isNullableSetToNull(string $property): bool 'ad_exit_before_start_count' => 'ad_exit_before_start_count', 'ad_exit_before_start_percentage' => 'ad_exit_before_start_percentage', 'long_resume' => 'long_resume', - 'long_rebuffering' => 'long_rebuffering' + 'long_rebuffering' => 'long_rebuffering', + 'playback_failure_error_type_id' => 'playback_failure_error_type_id', + 'playback_business_exception_error_type_id' => 'playback_business_exception_error_type_id', + 'video_startup_business_exception_error_type_id' => 'video_startup_business_exception_error_type_id' ]; /** @@ -933,7 +945,10 @@ public function isNullableSetToNull(string $property): bool 'ad_exit_before_start_count' => 'setAdExitBeforeStartCount', 'ad_exit_before_start_percentage' => 'setAdExitBeforeStartPercentage', 'long_resume' => 'setLongResume', - 'long_rebuffering' => 'setLongRebuffering' + 'long_rebuffering' => 'setLongRebuffering', + 'playback_failure_error_type_id' => 'setPlaybackFailureErrorTypeId', + 'playback_business_exception_error_type_id' => 'setPlaybackBusinessExceptionErrorTypeId', + 'video_startup_business_exception_error_type_id' => 'setVideoStartupBusinessExceptionErrorTypeId' ]; /** @@ -1095,7 +1110,10 @@ public function isNullableSetToNull(string $property): bool 'ad_exit_before_start_count' => 'getAdExitBeforeStartCount', 'ad_exit_before_start_percentage' => 'getAdExitBeforeStartPercentage', 'long_resume' => 'getLongResume', - 'long_rebuffering' => 'getLongRebuffering' + 'long_rebuffering' => 'getLongRebuffering', + 'playback_failure_error_type_id' => 'getPlaybackFailureErrorTypeId', + 'playback_business_exception_error_type_id' => 'getPlaybackBusinessExceptionErrorTypeId', + 'video_startup_business_exception_error_type_id' => 'getVideoStartupBusinessExceptionErrorTypeId' ]; /** @@ -1312,6 +1330,9 @@ public function __construct(array $data = null) $this->setIfExists('ad_exit_before_start_percentage', $data ?? [], null); $this->setIfExists('long_resume', $data ?? [], null); $this->setIfExists('long_rebuffering', $data ?? [], null); + $this->setIfExists('playback_failure_error_type_id', $data ?? [], null); + $this->setIfExists('playback_business_exception_error_type_id', $data ?? [], null); + $this->setIfExists('video_startup_business_exception_error_type_id', $data ?? [], null); } /** @@ -6745,6 +6766,93 @@ public function setLongRebuffering($long_rebuffering) return $this; } + + /** + * Gets playback_failure_error_type_id + * + * @return int|null + */ + public function getPlaybackFailureErrorTypeId() + { + return $this->container['playback_failure_error_type_id']; + } + + /** + * Sets playback_failure_error_type_id + * + * @param int|null $playback_failure_error_type_id playback_failure_error_type_id + * + * @return self + */ + public function setPlaybackFailureErrorTypeId($playback_failure_error_type_id) + { + + if (is_null($playback_failure_error_type_id)) { + throw new \InvalidArgumentException('non-nullable playback_failure_error_type_id cannot be null'); + } + + $this->container['playback_failure_error_type_id'] = $playback_failure_error_type_id; + + return $this; + } + + /** + * Gets playback_business_exception_error_type_id + * + * @return int|null + */ + public function getPlaybackBusinessExceptionErrorTypeId() + { + return $this->container['playback_business_exception_error_type_id']; + } + + /** + * Sets playback_business_exception_error_type_id + * + * @param int|null $playback_business_exception_error_type_id playback_business_exception_error_type_id + * + * @return self + */ + public function setPlaybackBusinessExceptionErrorTypeId($playback_business_exception_error_type_id) + { + + if (is_null($playback_business_exception_error_type_id)) { + throw new \InvalidArgumentException('non-nullable playback_business_exception_error_type_id cannot be null'); + } + + $this->container['playback_business_exception_error_type_id'] = $playback_business_exception_error_type_id; + + return $this; + } + + /** + * Gets video_startup_business_exception_error_type_id + * + * @return int|null + */ + public function getVideoStartupBusinessExceptionErrorTypeId() + { + return $this->container['video_startup_business_exception_error_type_id']; + } + + /** + * Sets video_startup_business_exception_error_type_id + * + * @param int|null $video_startup_business_exception_error_type_id video_startup_business_exception_error_type_id + * + * @return self + */ + public function setVideoStartupBusinessExceptionErrorTypeId($video_startup_business_exception_error_type_id) + { + + if (is_null($video_startup_business_exception_error_type_id)) { + throw new \InvalidArgumentException('non-nullable video_startup_business_exception_error_type_id cannot be null'); + } + + $this->container['video_startup_business_exception_error_type_id'] = $video_startup_business_exception_error_type_id; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/README.md b/README.md index 0281275..97efb5a 100644 --- a/README.md +++ b/README.md @@ -150,11 +150,12 @@ Class | Method | HTTP request | Description *AssetsApi* | [**deleteAsset**](docs/Api/AssetsApi.md#deleteasset) | **DELETE** /video/v1/assets/{ASSET_ID} | Delete an asset *AssetsApi* | [**deleteAssetPlaybackId**](docs/Api/AssetsApi.md#deleteassetplaybackid) | **DELETE** /video/v1/assets/{ASSET_ID}/playback-ids/{PLAYBACK_ID} | Delete a playback ID *AssetsApi* | [**deleteAssetTrack**](docs/Api/AssetsApi.md#deleteassettrack) | **DELETE** /video/v1/assets/{ASSET_ID}/tracks/{TRACK_ID} | Delete an asset track +*AssetsApi* | [**generateAssetTrackSubtitles**](docs/Api/AssetsApi.md#generateassettracksubtitles) | **POST** /video/v1/assets/{ASSET_ID}/tracks/{TRACK_ID}/generate-subtitles | Generate track subtitles *AssetsApi* | [**getAsset**](docs/Api/AssetsApi.md#getasset) | **GET** /video/v1/assets/{ASSET_ID} | Retrieve an asset *AssetsApi* | [**getAssetInputInfo**](docs/Api/AssetsApi.md#getassetinputinfo) | **GET** /video/v1/assets/{ASSET_ID}/input-info | Retrieve asset input info *AssetsApi* | [**getAssetPlaybackId**](docs/Api/AssetsApi.md#getassetplaybackid) | **GET** /video/v1/assets/{ASSET_ID}/playback-ids/{PLAYBACK_ID} | Retrieve a playback ID *AssetsApi* | [**listAssets**](docs/Api/AssetsApi.md#listassets) | **GET** /video/v1/assets | List assets -*AssetsApi* | [**updateAsset**](docs/Api/AssetsApi.md#updateasset) | **PATCH** /video/v1/assets/{ASSET_ID} | Update an Asset +*AssetsApi* | [**updateAsset**](docs/Api/AssetsApi.md#updateasset) | **PATCH** /video/v1/assets/{ASSET_ID} | Update an asset *AssetsApi* | [**updateAssetMasterAccess**](docs/Api/AssetsApi.md#updateassetmasteraccess) | **PUT** /video/v1/assets/{ASSET_ID}/master-access | Update master access *AssetsApi* | [**updateAssetMp4Support**](docs/Api/AssetsApi.md#updateassetmp4support) | **PUT** /video/v1/assets/{ASSET_ID}/mp4-support | Update MP4 support *DeliveryUsageApi* | [**listDeliveryUsage**](docs/Api/DeliveryUsageApi.md#listdeliveryusage) | **GET** /video/v1/delivery-usage | List Usage @@ -177,12 +178,12 @@ Class | Method | HTTP request | Description *LiveStreamsApi* | [**createLiveStreamSimulcastTarget**](docs/Api/LiveStreamsApi.md#createlivestreamsimulcasttarget) | **POST** /video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets | Create a live stream simulcast target *LiveStreamsApi* | [**deleteLiveStream**](docs/Api/LiveStreamsApi.md#deletelivestream) | **DELETE** /video/v1/live-streams/{LIVE_STREAM_ID} | Delete a live stream *LiveStreamsApi* | [**deleteLiveStreamPlaybackId**](docs/Api/LiveStreamsApi.md#deletelivestreamplaybackid) | **DELETE** /video/v1/live-streams/{LIVE_STREAM_ID}/playback-ids/{PLAYBACK_ID} | Delete a live stream playback ID -*LiveStreamsApi* | [**deleteLiveStreamSimulcastTarget**](docs/Api/LiveStreamsApi.md#deletelivestreamsimulcasttarget) | **DELETE** /video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets/{SIMULCAST_TARGET_ID} | Delete a Live Stream Simulcast Target +*LiveStreamsApi* | [**deleteLiveStreamSimulcastTarget**](docs/Api/LiveStreamsApi.md#deletelivestreamsimulcasttarget) | **DELETE** /video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets/{SIMULCAST_TARGET_ID} | Delete a live stream simulcast target *LiveStreamsApi* | [**disableLiveStream**](docs/Api/LiveStreamsApi.md#disablelivestream) | **PUT** /video/v1/live-streams/{LIVE_STREAM_ID}/disable | Disable a live stream *LiveStreamsApi* | [**enableLiveStream**](docs/Api/LiveStreamsApi.md#enablelivestream) | **PUT** /video/v1/live-streams/{LIVE_STREAM_ID}/enable | Enable a live stream *LiveStreamsApi* | [**getLiveStream**](docs/Api/LiveStreamsApi.md#getlivestream) | **GET** /video/v1/live-streams/{LIVE_STREAM_ID} | Retrieve a live stream *LiveStreamsApi* | [**getLiveStreamPlaybackId**](docs/Api/LiveStreamsApi.md#getlivestreamplaybackid) | **GET** /video/v1/live-streams/{LIVE_STREAM_ID}/playback-ids/{PLAYBACK_ID} | Retrieve a live stream playback ID -*LiveStreamsApi* | [**getLiveStreamSimulcastTarget**](docs/Api/LiveStreamsApi.md#getlivestreamsimulcasttarget) | **GET** /video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets/{SIMULCAST_TARGET_ID} | Retrieve a Live Stream Simulcast Target +*LiveStreamsApi* | [**getLiveStreamSimulcastTarget**](docs/Api/LiveStreamsApi.md#getlivestreamsimulcasttarget) | **GET** /video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets/{SIMULCAST_TARGET_ID} | Retrieve a live stream simulcast target *LiveStreamsApi* | [**listLiveStreams**](docs/Api/LiveStreamsApi.md#listlivestreams) | **GET** /video/v1/live-streams | List live streams *LiveStreamsApi* | [**resetStreamKey**](docs/Api/LiveStreamsApi.md#resetstreamkey) | **POST** /video/v1/live-streams/{LIVE_STREAM_ID}/reset-stream-key | Reset a live stream's stream key *LiveStreamsApi* | [**signalLiveStreamComplete**](docs/Api/LiveStreamsApi.md#signallivestreamcomplete) | **PUT** /video/v1/live-streams/{LIVE_STREAM_ID}/complete | Signal a live stream is finished @@ -200,7 +201,7 @@ Class | Method | HTTP request | Description *MonitoringApi* | [**getMonitoringTimeseries**](docs/Api/MonitoringApi.md#getmonitoringtimeseries) | **GET** /data/v1/monitoring/metrics/{MONITORING_METRIC_ID}/timeseries | Get Monitoring Timeseries *MonitoringApi* | [**listMonitoringDimensions**](docs/Api/MonitoringApi.md#listmonitoringdimensions) | **GET** /data/v1/monitoring/dimensions | List Monitoring Dimensions *MonitoringApi* | [**listMonitoringMetrics**](docs/Api/MonitoringApi.md#listmonitoringmetrics) | **GET** /data/v1/monitoring/metrics | List Monitoring Metrics -*PlaybackIDApi* | [**getAssetOrLivestreamId**](docs/Api/PlaybackIDApi.md#getassetorlivestreamid) | **GET** /video/v1/playback-ids/{PLAYBACK_ID} | Retrieve an Asset or Live Stream ID +*PlaybackIDApi* | [**getAssetOrLivestreamId**](docs/Api/PlaybackIDApi.md#getassetorlivestreamid) | **GET** /video/v1/playback-ids/{PLAYBACK_ID} | Retrieve an asset or live stream ID *PlaybackRestrictionsApi* | [**createPlaybackRestriction**](docs/Api/PlaybackRestrictionsApi.md#createplaybackrestriction) | **POST** /video/v1/playback-restrictions | Create a Playback Restriction *PlaybackRestrictionsApi* | [**deletePlaybackRestriction**](docs/Api/PlaybackRestrictionsApi.md#deleteplaybackrestriction) | **DELETE** /video/v1/playback-restrictions/{PLAYBACK_RESTRICTION_ID} | Delete a Playback Restriction *PlaybackRestrictionsApi* | [**getPlaybackRestriction**](docs/Api/PlaybackRestrictionsApi.md#getplaybackrestriction) | **GET** /video/v1/playback-restrictions/{PLAYBACK_RESTRICTION_ID} | Retrieve a Playback Restriction @@ -284,6 +285,8 @@ Class | Method | HTTP request | Description - [ExportDate](docs/Model/ExportDate.md) - [ExportFile](docs/Model/ExportFile.md) - [FilterValue](docs/Model/FilterValue.md) +- [GenerateTrackSubtitlesRequest](docs/Model/GenerateTrackSubtitlesRequest.md) +- [GenerateTrackSubtitlesResponse](docs/Model/GenerateTrackSubtitlesResponse.md) - [GetAssetInputInfoResponse](docs/Model/GetAssetInputInfoResponse.md) - [GetAssetOrLiveStreamIdResponse](docs/Model/GetAssetOrLiveStreamIdResponse.md) - [GetAssetOrLiveStreamIdResponseData](docs/Model/GetAssetOrLiveStreamIdResponseData.md) @@ -426,5 +429,5 @@ devex@mux.com This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: `v1` - - Package version: `3.14.0` + - Package version: `3.15.0` - Build package: `org.openapitools.codegen.languages.PhpClientCodegen` diff --git a/composer.json b/composer.json index 0b58b6a..d54d67e 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "muxinc/mux-php", - "version": "3.14.0", + "version": "3.15.0", "description": "Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before.", "keywords": [ "php", diff --git a/docs/Api/AssetsApi.md b/docs/Api/AssetsApi.md index 59df285..1769a8a 100644 --- a/docs/Api/AssetsApi.md +++ b/docs/Api/AssetsApi.md @@ -10,11 +10,12 @@ All URIs are relative to https://api.mux.com, except if the operation defines an | [**deleteAsset()**](AssetsApi.md#deleteAsset) | **DELETE** /video/v1/assets/{ASSET_ID} | Delete an asset | | [**deleteAssetPlaybackId()**](AssetsApi.md#deleteAssetPlaybackId) | **DELETE** /video/v1/assets/{ASSET_ID}/playback-ids/{PLAYBACK_ID} | Delete a playback ID | | [**deleteAssetTrack()**](AssetsApi.md#deleteAssetTrack) | **DELETE** /video/v1/assets/{ASSET_ID}/tracks/{TRACK_ID} | Delete an asset track | +| [**generateAssetTrackSubtitles()**](AssetsApi.md#generateAssetTrackSubtitles) | **POST** /video/v1/assets/{ASSET_ID}/tracks/{TRACK_ID}/generate-subtitles | Generate track subtitles | | [**getAsset()**](AssetsApi.md#getAsset) | **GET** /video/v1/assets/{ASSET_ID} | Retrieve an asset | | [**getAssetInputInfo()**](AssetsApi.md#getAssetInputInfo) | **GET** /video/v1/assets/{ASSET_ID}/input-info | Retrieve asset input info | | [**getAssetPlaybackId()**](AssetsApi.md#getAssetPlaybackId) | **GET** /video/v1/assets/{ASSET_ID}/playback-ids/{PLAYBACK_ID} | Retrieve a playback ID | | [**listAssets()**](AssetsApi.md#listAssets) | **GET** /video/v1/assets | List assets | -| [**updateAsset()**](AssetsApi.md#updateAsset) | **PATCH** /video/v1/assets/{ASSET_ID} | Update an Asset | +| [**updateAsset()**](AssetsApi.md#updateAsset) | **PATCH** /video/v1/assets/{ASSET_ID} | Update an asset | | [**updateAssetMasterAccess()**](AssetsApi.md#updateAssetMasterAccess) | **PUT** /video/v1/assets/{ASSET_ID}/master-access | Update master access | | [**updateAssetMp4Support()**](AssetsApi.md#updateAssetMp4Support) | **PUT** /video/v1/assets/{ASSET_ID}/mp4-support | Update MP4 support | @@ -58,7 +59,7 @@ $apiInstance = new MuxPhp\Api\AssetsApi( // // In your own code you should use an associative array, or // use a "new \MuxPhp\Models\CreateAssetRequest" directly. -$create_asset_request = json_decode('{"input":[{"url":"https://muxed.s3.amazonaws.com/leds.mp4"}],"playback_policy":["public"]}',true); // \MuxPhp\Models\CreateAssetRequest +$create_asset_request = json_decode('{"input":[{"url":"https://muxed.s3.amazonaws.com/leds.mp4"}],"playback_policy":["public"],"encoding_tier":"baseline"}',true); // \MuxPhp\Models\CreateAssetRequest try { $result = $apiInstance->createAsset($create_asset_request); @@ -426,6 +427,82 @@ void (empty response body) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) +## `generateAssetTrackSubtitles()` + +```php +generateAssetTrackSubtitles($asset_id, $track_id, $generate_track_subtitles_request): \MuxPhp\Models\GenerateTrackSubtitlesResponse +``` + +Generate track subtitles + +Generates subtitles (captions) for a given audio track. This API can be used for up to 7 days after an asset is created. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new MuxPhp\Api\AssetsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$asset_id = 'asset_id_example'; // string | The asset ID. +$track_id = 'track_id_example'; // string | The track ID. + +// This API method wants a \MuxPhp\Models\GenerateTrackSubtitlesRequest +// as the second parameter. That being said, these API docs are +// auto-generated from our OpenAPI specification, which +// gives us the example parameter as a JSON string. In this example, +// we'll use json_decode() to turn it into an associative array, which +// is compatible with the model. +// +// In your own code you should use an associative array, or +// use a "new \MuxPhp\Models\GenerateTrackSubtitlesRequest" directly. +$generate_track_subtitles_request = json_decode('{"generated_subtitles":[{"language_code":"en","name":"English (generated)","passthrough":"English (generated)"}]}',true); // \MuxPhp\Models\GenerateTrackSubtitlesRequest + +try { + $result = $apiInstance->generateAssetTrackSubtitles($asset_id, $track_id, $generate_track_subtitles_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AssetsApi->generateAssetTrackSubtitles: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **asset_id** | **string**| The asset ID. | | +| **track_id** | **string**| The track ID. | | +| **generate_track_subtitles_request** | [**\MuxPhp\Models\GenerateTrackSubtitlesRequest**](../Model/GenerateTrackSubtitlesRequest.md)| | | + +### Return type + +[**\MuxPhp\Models\GenerateTrackSubtitlesResponse**](../Model/GenerateTrackSubtitlesResponse.md) + +### Authorization + +[accessToken](../../README.md#accessToken) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + ## `getAsset()` ```php @@ -688,7 +765,7 @@ try { updateAsset($asset_id, $update_asset_request): \MuxPhp\Models\AssetResponse ``` -Update an Asset +Update an asset Updates the details of an already-created Asset with the provided Asset ID. This currently supports only the `passthrough` field. diff --git a/docs/Api/DirectUploadsApi.md b/docs/Api/DirectUploadsApi.md index 3e6ac5d..5647b4b 100644 --- a/docs/Api/DirectUploadsApi.md +++ b/docs/Api/DirectUploadsApi.md @@ -111,7 +111,7 @@ $apiInstance = new MuxPhp\Api\DirectUploadsApi( // // In your own code you should use an associative array, or // use a "new \MuxPhp\Models\CreateUploadRequest" directly. -$create_upload_request = json_decode('{"cors_origin":"https://example.com/","new_asset_settings":{"playback_policy":["public"],"mp4_support":"standard"}}',true); // \MuxPhp\Models\CreateUploadRequest +$create_upload_request = json_decode('{"cors_origin":"https://example.com/","new_asset_settings":{"playback_policy":["public"]}}',true); // \MuxPhp\Models\CreateUploadRequest try { $result = $apiInstance->createDirectUpload($create_upload_request); diff --git a/docs/Api/LiveStreamsApi.md b/docs/Api/LiveStreamsApi.md index 9749758..2806275 100644 --- a/docs/Api/LiveStreamsApi.md +++ b/docs/Api/LiveStreamsApi.md @@ -9,12 +9,12 @@ All URIs are relative to https://api.mux.com, except if the operation defines an | [**createLiveStreamSimulcastTarget()**](LiveStreamsApi.md#createLiveStreamSimulcastTarget) | **POST** /video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets | Create a live stream simulcast target | | [**deleteLiveStream()**](LiveStreamsApi.md#deleteLiveStream) | **DELETE** /video/v1/live-streams/{LIVE_STREAM_ID} | Delete a live stream | | [**deleteLiveStreamPlaybackId()**](LiveStreamsApi.md#deleteLiveStreamPlaybackId) | **DELETE** /video/v1/live-streams/{LIVE_STREAM_ID}/playback-ids/{PLAYBACK_ID} | Delete a live stream playback ID | -| [**deleteLiveStreamSimulcastTarget()**](LiveStreamsApi.md#deleteLiveStreamSimulcastTarget) | **DELETE** /video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets/{SIMULCAST_TARGET_ID} | Delete a Live Stream Simulcast Target | +| [**deleteLiveStreamSimulcastTarget()**](LiveStreamsApi.md#deleteLiveStreamSimulcastTarget) | **DELETE** /video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets/{SIMULCAST_TARGET_ID} | Delete a live stream simulcast target | | [**disableLiveStream()**](LiveStreamsApi.md#disableLiveStream) | **PUT** /video/v1/live-streams/{LIVE_STREAM_ID}/disable | Disable a live stream | | [**enableLiveStream()**](LiveStreamsApi.md#enableLiveStream) | **PUT** /video/v1/live-streams/{LIVE_STREAM_ID}/enable | Enable a live stream | | [**getLiveStream()**](LiveStreamsApi.md#getLiveStream) | **GET** /video/v1/live-streams/{LIVE_STREAM_ID} | Retrieve a live stream | | [**getLiveStreamPlaybackId()**](LiveStreamsApi.md#getLiveStreamPlaybackId) | **GET** /video/v1/live-streams/{LIVE_STREAM_ID}/playback-ids/{PLAYBACK_ID} | Retrieve a live stream playback ID | -| [**getLiveStreamSimulcastTarget()**](LiveStreamsApi.md#getLiveStreamSimulcastTarget) | **GET** /video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets/{SIMULCAST_TARGET_ID} | Retrieve a Live Stream Simulcast Target | +| [**getLiveStreamSimulcastTarget()**](LiveStreamsApi.md#getLiveStreamSimulcastTarget) | **GET** /video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets/{SIMULCAST_TARGET_ID} | Retrieve a live stream simulcast target | | [**listLiveStreams()**](LiveStreamsApi.md#listLiveStreams) | **GET** /video/v1/live-streams | List live streams | | [**resetStreamKey()**](LiveStreamsApi.md#resetStreamKey) | **POST** /video/v1/live-streams/{LIVE_STREAM_ID}/reset-stream-key | Reset a live stream's stream key | | [**signalLiveStreamComplete()**](LiveStreamsApi.md#signalLiveStreamComplete) | **PUT** /video/v1/live-streams/{LIVE_STREAM_ID}/complete | Signal a live stream is finished | @@ -373,7 +373,7 @@ void (empty response body) deleteLiveStreamSimulcastTarget($live_stream_id, $simulcast_target_id) ``` -Delete a Live Stream Simulcast Target +Delete a live stream simulcast target Delete the simulcast target using the simulcast target ID returned when creating the simulcast target. Simulcast Target can only be deleted when the parent live stream is in idle state. @@ -686,7 +686,7 @@ try { getLiveStreamSimulcastTarget($live_stream_id, $simulcast_target_id): \MuxPhp\Models\SimulcastTargetResponse ``` -Retrieve a Live Stream Simulcast Target +Retrieve a live stream simulcast target Retrieves the details of the simulcast target created for the parent live stream. Supply the unique live stream ID and simulcast target ID that was returned in the response of create simulcast target request, and Mux will return the corresponding information. diff --git a/docs/Api/PlaybackIDApi.md b/docs/Api/PlaybackIDApi.md index 0f1dff7..a4282eb 100644 --- a/docs/Api/PlaybackIDApi.md +++ b/docs/Api/PlaybackIDApi.md @@ -4,7 +4,7 @@ All URIs are relative to https://api.mux.com, except if the operation defines an | Method | HTTP request | Description | | ------------- | ------------- | ------------- | -| [**getAssetOrLivestreamId()**](PlaybackIDApi.md#getAssetOrLivestreamId) | **GET** /video/v1/playback-ids/{PLAYBACK_ID} | Retrieve an Asset or Live Stream ID | +| [**getAssetOrLivestreamId()**](PlaybackIDApi.md#getAssetOrLivestreamId) | **GET** /video/v1/playback-ids/{PLAYBACK_ID} | Retrieve an asset or live stream ID | ## `getAssetOrLivestreamId()` @@ -13,7 +13,7 @@ All URIs are relative to https://api.mux.com, except if the operation defines an getAssetOrLivestreamId($playback_id): \MuxPhp\Models\GetAssetOrLiveStreamIdResponse ``` -Retrieve an Asset or Live Stream ID +Retrieve an asset or live stream ID Retrieves the Identifier of the Asset or Live Stream associated with the Playback ID. diff --git a/docs/Model/Asset.md b/docs/Model/Asset.md index 5fa2153..9ba3ba0 100644 --- a/docs/Model/Asset.md +++ b/docs/Model/Asset.md @@ -31,5 +31,6 @@ Name | Type | Description | Notes **recording_times** | [**\MuxPhp\Models\AssetRecordingTimes[]**](AssetRecordingTimes.md) | An array of individual live stream recording sessions. A recording session is created on each encoder connection during the live stream. Additionally any time slate media is inserted during brief interruptions in the live stream media or times when the live streaming software disconnects, a recording session representing the slate media will be added with a \"slate\" type. | [optional] **non_standard_input_reasons** | [**\MuxPhp\Models\AssetNonStandardInputReasons**](AssetNonStandardInputReasons.md) | | [optional] **test** | **bool** | True means this live stream is a test asset. A test asset can help evaluate the Mux Video APIs without incurring any cost. There is no limit on number of test assets created. Test assets are watermarked with the Mux logo, limited to 10 seconds, and deleted after 24 hrs. | [optional] +**ingest_type** | **string** | The type of ingest used to create the asset. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateSimulcastTargetRequest.md b/docs/Model/CreateSimulcastTargetRequest.md index d5dd731..82d861b 100644 --- a/docs/Model/CreateSimulcastTargetRequest.md +++ b/docs/Model/CreateSimulcastTargetRequest.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **passthrough** | **string** | Arbitrary user-supplied metadata set by you when creating a simulcast target. | [optional] -**stream_key** | **string** | Stream Key represents a stream identifier on the third party live streaming service to send the parent live stream to. | [optional] -**url** | **string** | RTMP hostname including application name for the third party live streaming service. Example: `rtmp://live.example.com/app`. | [optional] +**stream_key** | **string** | Stream Key represents a stream identifier on the third party live streaming service to send the parent live stream to. Only used for RTMP(s) simulcast destinations. | [optional] +**url** | **string** | The RTMP(s) or SRT endpoint for a simulcast destination. * For RTMP(s) destinations, this should include the application name for the third party live streaming service, for example: `rtmp://live.example.com/app`. * For SRT destinations, this should be a fully formed SRT connection string, for example: `srt://srt-live.example.com:1234?streamid={stream_key}&passphrase={srt_passphrase}`. Note: SRT simulcast targets can only be used when an source is connected over SRT. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Error.md b/docs/Model/Error.md index 9640ab6..22c12ca 100644 --- a/docs/Model/Error.md +++ b/docs/Model/Error.md @@ -12,5 +12,6 @@ Name | Type | Description | Notes **description** | **string** | Description of the error. | [optional] **count** | **int** | The total number of views that experienced this error. | [optional] **code** | **int** | The error code | [optional] +**player_error_code** | **string** | The string version of the error code | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GenerateTrackSubtitlesRequest.md b/docs/Model/GenerateTrackSubtitlesRequest.md new file mode 100644 index 0000000..3ad8706 --- /dev/null +++ b/docs/Model/GenerateTrackSubtitlesRequest.md @@ -0,0 +1,9 @@ +# # GenerateTrackSubtitlesRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**generated_subtitles** | [**\MuxPhp\Models\AssetGeneratedSubtitleSettings[]**](AssetGeneratedSubtitleSettings.md) | Generate subtitle tracks using automatic speech recognition with this configuration. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GenerateTrackSubtitlesResponse.md b/docs/Model/GenerateTrackSubtitlesResponse.md new file mode 100644 index 0000000..4cc94da --- /dev/null +++ b/docs/Model/GenerateTrackSubtitlesResponse.md @@ -0,0 +1,9 @@ +# # GenerateTrackSubtitlesResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**\MuxPhp\Models\Track**](Track.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InputSettings.md b/docs/Model/InputSettings.md index f4a868a..462acdf 100644 --- a/docs/Model/InputSettings.md +++ b/docs/Model/InputSettings.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **url** | **string** | The URL of the file that Mux should download and use. * For the main input file, this should be the URL to the muxed file for Mux to download, for example an MP4, MOV, MKV, or TS file. Mux supports most audio/video file formats and codecs, but for fastest processing, you should [use standard inputs wherever possible](https://docs.mux.com/guides/minimize-processing-time). * For `audio` tracks, the URL is the location of the audio file for Mux to download, for example an M4A, WAV, or MP3 file. Mux supports most audio file formats and codecs, but for fastest processing, you should [use standard inputs wherever possible](https://docs.mux.com/guides/minimize-processing-time). * For `text` tracks, the URL is the location of subtitle/captions file. Mux supports [SubRip Text (SRT)](https://en.wikipedia.org/wiki/SubRip) and [Web Video Text Tracks](https://www.w3.org/TR/webvtt1/) formats for ingesting Subtitles and Closed Captions. * For Watermarking or Overlay, the URL is the location of the watermark image. The maximum size is 4096x4096. * When creating clips from existing Mux assets, the URL is defined with `mux://assets/{asset_id}` template where `asset_id` is the Asset Identifier for creating the clip from. The url property may be omitted on the first input object when providing asset settings for LiveStream and Upload objects, in order to configure settings related to the primary (live stream or direct upload) input. | [optional] **overlay_settings** | [**\MuxPhp\Models\InputSettingsOverlaySettings**](InputSettingsOverlaySettings.md) | | [optional] -**generated_subtitles** | [**\MuxPhp\Models\AssetGeneratedSubtitleSettings[]**](AssetGeneratedSubtitleSettings.md) | Generate subtitle tracks using automatic speech recognition using this configuration. This may only be provided for the first input object (the main input file). For direct uploads, this first input should omit the url parameter, as the main input file is provided via the direct upload. This will create subtitles based on the audio track ingested from that main input file. Note that subtitle generation happens after initial ingest, so the generated tracks will be in the `preparing` state when the asset transitions to `ready`. | [optional] +**generated_subtitles** | [**\MuxPhp\Models\AssetGeneratedSubtitleSettings[]**](AssetGeneratedSubtitleSettings.md) | Generate subtitle tracks using automatic speech recognition with this configuration. This may only be provided for the first input object (the main input file). For direct uploads, this first input should omit the url parameter, as the main input file is provided via the direct upload. This will create subtitles based on the audio track ingested from that main input file. Note that subtitle generation happens after initial ingest, so the generated tracks will be in the `preparing` state when the asset transitions to `ready`. | [optional] **start_time** | **double** | The time offset in seconds from the beginning of the video indicating the clip's starting marker. The default value is 0 when not included. This parameter is only applicable for creating clips when `input.url` has `mux://assets/{asset_id}` format. | [optional] **end_time** | **double** | The time offset in seconds from the beginning of the video, indicating the clip's ending marker. The default value is the duration of the video when not included. This parameter is only applicable for creating clips when `input.url` has `mux://assets/{asset_id}` format. | [optional] **type** | **string** | This parameter is required for `text` type tracks. | [optional] diff --git a/docs/Model/LiveStream.md b/docs/Model/LiveStream.md index 527c19f..2d3ef73 100644 --- a/docs/Model/LiveStream.md +++ b/docs/Model/LiveStream.md @@ -26,5 +26,6 @@ Name | Type | Description | Notes **test** | **bool** | True means this live stream is a test live stream. Test live streams can be used to help evaluate the Mux Video APIs for free. There is no limit on the number of test live streams, but they are watermarked with the Mux logo, and limited to 5 minutes. The test live stream is disabled after the stream is active for 5 mins and the recorded asset also deleted after 24 hours. | [optional] **max_continuous_duration** | **int** | The time in seconds a live stream may be continuously active before being disconnected. Defaults to 12 hours. | [optional] [default to 43200] **srt_passphrase** | **string** | Unique key used for encrypting a stream to a Mux SRT endpoint. | [optional] +**active_ingest_protocol** | **string** | The protocol used for the active ingest stream. This is only set when the live stream is active. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MonitoringBreakdownTimeseriesDatapoint.md b/docs/Model/MonitoringBreakdownTimeseriesDatapoint.md index 92ec2cb..577704b 100644 --- a/docs/Model/MonitoringBreakdownTimeseriesDatapoint.md +++ b/docs/Model/MonitoringBreakdownTimeseriesDatapoint.md @@ -7,5 +7,6 @@ Name | Type | Description | Notes **value** | **string** | | [optional] **metric_value** | **double** | | [optional] **concurrent_viewers** | **int** | | [optional] +**starting_up_viewers** | **int** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SimulcastTarget.md b/docs/Model/SimulcastTarget.md index 2f769d6..a7e7d7d 100644 --- a/docs/Model/SimulcastTarget.md +++ b/docs/Model/SimulcastTarget.md @@ -6,8 +6,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **string** | ID of the Simulcast Target | [optional] **passthrough** | **string** | Arbitrary user-supplied metadata set when creating a simulcast target. | [optional] -**status** | **string** | The current status of the simulcast target. See Statuses below for detailed description. * `idle`: Default status. When the parent live stream is in disconnected status, simulcast targets will be idle state. * `starting`: The simulcast target transitions into this state when the parent live stream transition into connected state. * `broadcasting`: The simulcast target has successfully connected to the third party live streaming service and is pushing video to that service. * `errored`: The simulcast target encountered an error either while attempting to connect to the third party live streaming service, or mid-broadcasting. Compared to other errored statuses in the Mux Video API, a simulcast may transition back into the broadcasting state if a connection with the service can be re-established. | [optional] -**stream_key** | **string** | Stream Key represents an stream identifier for the third party live streaming service to simulcast the parent live stream too. | [optional] -**url** | **string** | RTMP hostname including the application name for the third party live streaming service. | [optional] +**status** | **string** | The current status of the simulcast target. See Statuses below for detailed description. * `idle`: Default status. When the parent live stream is in disconnected status, simulcast targets will be idle state. * `starting`: The simulcast target transitions into this state when the parent live stream transition into connected state. * `broadcasting`: The simulcast target has successfully connected to the third party live streaming service and is pushing video to that service. * `errored`: The simulcast target encountered an error either while attempting to connect to the third party live streaming service, or mid-broadcasting. When a simulcast target has this status it will have an `error_severity` field with more details about the error. | [optional] +**stream_key** | **string** | Stream Key represents a stream identifier on the third party live streaming service to send the parent live stream to. Only used for RTMP(s) simulcast destinations. | [optional] +**url** | **string** | The RTMP(s) or SRT endpoint for a simulcast destination. * For RTMP(s) destinations, this should include the application name for the third party live streaming service, for example: `rtmp://live.example.com/app`. * For SRT destinations, this should be a fully formed SRT connection string, for example: `srt://srt-live.example.com:1234?streamid={stream_key}&passphrase={srt_passphrase}`. Note: SRT simulcast targets can only be used when an source is connected over SRT. | [optional] +**error_severity** | **string** | The severity of the error encountered by the simulcast target. This field is only set when the simulcast target is in the `errored` status. See the values of severities below and their descriptions. * `normal`: The simulcast target encountered an error either while attempting to connect to the third party live streaming service, or mid-broadcasting. A simulcast may transition back into the broadcasting state if a connection with the service can be re-established. * `fatal`: The simulcast target is incompatible with the current input to the parent live stream. No further attempts to this simulcast target will be made for the current live stream asset. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/VideoView.md b/docs/Model/VideoView.md index dae303e..cbb89a2 100644 --- a/docs/Model/VideoView.md +++ b/docs/Model/VideoView.md @@ -158,5 +158,8 @@ Name | Type | Description | Notes **ad_exit_before_start_percentage** | **string** | | [optional] **long_resume** | **bool** | | [optional] **long_rebuffering** | **bool** | | [optional] +**playback_failure_error_type_id** | **int** | | [optional] +**playback_business_exception_error_type_id** | **int** | | [optional] +**video_startup_business_exception_error_type_id** | **int** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/gen/generator-config.json b/gen/generator-config.json index e7ae330..dedb51f 100644 --- a/gen/generator-config.json +++ b/gen/generator-config.json @@ -5,7 +5,7 @@ "apiPackage": "Api", "srcBasePath": "MuxPhp", "invokerPackage": "MuxPhp", - "artifactVersion": "3.14.0", + "artifactVersion": "3.15.0", "gitUserId": "muxinc", "gitRepoId": "mux-php" }