diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 24ab2a5..66c4038 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -33,7 +33,6 @@ MuxPhp/Models/AssetNonStandardInputReasons.php MuxPhp/Models/AssetRecordingTimes.php MuxPhp/Models/AssetResponse.php MuxPhp/Models/AssetStaticRenditions.php -MuxPhp/Models/AssetStaticRenditionsFiles.php MuxPhp/Models/BreakdownValue.php MuxPhp/Models/Broadcast.php MuxPhp/Models/BroadcastLayout.php @@ -48,6 +47,8 @@ MuxPhp/Models/CreatePlaybackIDResponse.php MuxPhp/Models/CreatePlaybackRestrictionRequest.php MuxPhp/Models/CreateSimulcastTargetRequest.php MuxPhp/Models/CreateSpaceRequest.php +MuxPhp/Models/CreateStaticRenditionRequest.php +MuxPhp/Models/CreateStaticRenditionResponse.php MuxPhp/Models/CreateTrackRequest.php MuxPhp/Models/CreateTrackResponse.php MuxPhp/Models/CreateTranscriptionVocabularyRequest.php @@ -164,6 +165,7 @@ MuxPhp/Models/SpaceResponse.php MuxPhp/Models/SpaceStatus.php MuxPhp/Models/SpaceType.php MuxPhp/Models/StartSpaceBroadcastResponse.php +MuxPhp/Models/StaticRendition.php MuxPhp/Models/StopSpaceBroadcastResponse.php MuxPhp/Models/Track.php MuxPhp/Models/TranscriptionVocabulary.php @@ -174,6 +176,7 @@ MuxPhp/Models/UpdateAssetRequest.php MuxPhp/Models/UpdateLiveStreamEmbeddedSubtitlesRequest.php MuxPhp/Models/UpdateLiveStreamGeneratedSubtitlesRequest.php MuxPhp/Models/UpdateLiveStreamNewAssetSettings.php +MuxPhp/Models/UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest.php MuxPhp/Models/UpdateLiveStreamRequest.php MuxPhp/Models/UpdateReferrerDomainRestrictionRequest.php MuxPhp/Models/UpdateTranscriptionVocabularyRequest.php @@ -222,7 +225,6 @@ docs/Model/AssetNonStandardInputReasons.md docs/Model/AssetRecordingTimes.md docs/Model/AssetResponse.md docs/Model/AssetStaticRenditions.md -docs/Model/AssetStaticRenditionsFiles.md docs/Model/BreakdownValue.md docs/Model/Broadcast.md docs/Model/BroadcastLayout.md @@ -237,6 +239,8 @@ docs/Model/CreatePlaybackIDResponse.md docs/Model/CreatePlaybackRestrictionRequest.md docs/Model/CreateSimulcastTargetRequest.md docs/Model/CreateSpaceRequest.md +docs/Model/CreateStaticRenditionRequest.md +docs/Model/CreateStaticRenditionResponse.md docs/Model/CreateTrackRequest.md docs/Model/CreateTrackResponse.md docs/Model/CreateTranscriptionVocabularyRequest.md @@ -352,6 +356,7 @@ docs/Model/SpaceResponse.md docs/Model/SpaceStatus.md docs/Model/SpaceType.md docs/Model/StartSpaceBroadcastResponse.md +docs/Model/StaticRendition.md docs/Model/StopSpaceBroadcastResponse.md docs/Model/Track.md docs/Model/TranscriptionVocabulary.md @@ -362,6 +367,7 @@ docs/Model/UpdateAssetRequest.md docs/Model/UpdateLiveStreamEmbeddedSubtitlesRequest.md docs/Model/UpdateLiveStreamGeneratedSubtitlesRequest.md docs/Model/UpdateLiveStreamNewAssetSettings.md +docs/Model/UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest.md docs/Model/UpdateLiveStreamRequest.md docs/Model/UpdateReferrerDomainRestrictionRequest.md docs/Model/UpdateTranscriptionVocabularyRequest.md diff --git a/MuxPhp/Api/AssetsApi.php b/MuxPhp/Api/AssetsApi.php index 88f14e2..e0133dc 100644 --- a/MuxPhp/Api/AssetsApi.php +++ b/MuxPhp/Api/AssetsApi.php @@ -678,6 +678,297 @@ public function createAssetPlaybackIdRequest($asset_id, $create_playback_id_requ ); } + /** + * Operation createAssetStaticRendition + * + * Create a static rendition for an asset + * + * @param string $asset_id The asset ID. (required) + * @param \MuxPhp\Models\CreateStaticRenditionRequest $create_static_rendition_request create_static_rendition_request (required) + * + * @throws \MuxPhp\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \MuxPhp\Models\CreateStaticRenditionResponse + */ + public function createAssetStaticRendition($asset_id, $create_static_rendition_request) + { + list($response) = $this->createAssetStaticRenditionWithHttpInfo($asset_id, $create_static_rendition_request); + return $response; + } + + /** + * Operation createAssetStaticRenditionWithHttpInfo + * + * Create a static rendition for an asset + * + * @param string $asset_id The asset ID. (required) + * @param \MuxPhp\Models\CreateStaticRenditionRequest $create_static_rendition_request (required) + * + * @throws \MuxPhp\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \MuxPhp\Models\CreateStaticRenditionResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function createAssetStaticRenditionWithHttpInfo($asset_id, $create_static_rendition_request) + { + $request = $this->createAssetStaticRenditionRequest($asset_id, $create_static_rendition_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\CreateStaticRenditionResponse' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\MuxPhp\Models\CreateStaticRenditionResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\MuxPhp\Models\CreateStaticRenditionResponse'; + $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\CreateStaticRenditionResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation createAssetStaticRenditionAsync + * + * Create a static rendition for an asset + * + * @param string $asset_id The asset ID. (required) + * @param \MuxPhp\Models\CreateStaticRenditionRequest $create_static_rendition_request (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createAssetStaticRenditionAsync($asset_id, $create_static_rendition_request) + { + return $this->createAssetStaticRenditionAsyncWithHttpInfo($asset_id, $create_static_rendition_request) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createAssetStaticRenditionAsyncWithHttpInfo + * + * Create a static rendition for an asset + * + * @param string $asset_id The asset ID. (required) + * @param \MuxPhp\Models\CreateStaticRenditionRequest $create_static_rendition_request (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createAssetStaticRenditionAsyncWithHttpInfo($asset_id, $create_static_rendition_request) + { + $returnType = '\MuxPhp\Models\CreateStaticRenditionResponse'; + $request = $this->createAssetStaticRenditionRequest($asset_id, $create_static_rendition_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 'createAssetStaticRendition' + * + * @param string $asset_id The asset ID. (required) + * @param \MuxPhp\Models\CreateStaticRenditionRequest $create_static_rendition_request (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function createAssetStaticRenditionRequest($asset_id, $create_static_rendition_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 createAssetStaticRendition' + ); + } + // verify the required parameter 'create_static_rendition_request' is set + if ($create_static_rendition_request === null || (is_array($create_static_rendition_request) && count($create_static_rendition_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $create_static_rendition_request when calling createAssetStaticRendition' + ); + } + + $resourcePath = '/video/v1/assets/{ASSET_ID}/static-renditions'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($asset_id !== null) { + $resourcePath = str_replace( + '{' . 'ASSET_ID' . '}', + ObjectSerializer::toPathValue($asset_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($create_static_rendition_request)) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($create_static_rendition_request)); + } else { + $httpBody = $create_static_rendition_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 createAssetTrack * @@ -1440,6 +1731,251 @@ public function deleteAssetPlaybackIdRequest($asset_id, $playback_id) ); } + /** + * Operation deleteAssetStaticRendition + * + * Delete a single static rendition for an asset + * + * @param string $asset_id The asset ID. (required) + * @param string $static_rendition_id The static rendition ID. (required) + * + * @throws \MuxPhp\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function deleteAssetStaticRendition($asset_id, $static_rendition_id) + { + $this->deleteAssetStaticRenditionWithHttpInfo($asset_id, $static_rendition_id); + } + + /** + * Operation deleteAssetStaticRenditionWithHttpInfo + * + * Delete a single static rendition for an asset + * + * @param string $asset_id The asset ID. (required) + * @param string $static_rendition_id The static rendition ID. (required) + * + * @throws \MuxPhp\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteAssetStaticRenditionWithHttpInfo($asset_id, $static_rendition_id) + { + $request = $this->deleteAssetStaticRenditionRequest($asset_id, $static_rendition_id); + + 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() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation deleteAssetStaticRenditionAsync + * + * Delete a single static rendition for an asset + * + * @param string $asset_id The asset ID. (required) + * @param string $static_rendition_id The static rendition ID. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteAssetStaticRenditionAsync($asset_id, $static_rendition_id) + { + return $this->deleteAssetStaticRenditionAsyncWithHttpInfo($asset_id, $static_rendition_id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteAssetStaticRenditionAsyncWithHttpInfo + * + * Delete a single static rendition for an asset + * + * @param string $asset_id The asset ID. (required) + * @param string $static_rendition_id The static rendition ID. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteAssetStaticRenditionAsyncWithHttpInfo($asset_id, $static_rendition_id) + { + $returnType = ''; + $request = $this->deleteAssetStaticRenditionRequest($asset_id, $static_rendition_id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $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 'deleteAssetStaticRendition' + * + * @param string $asset_id The asset ID. (required) + * @param string $static_rendition_id The static rendition ID. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function deleteAssetStaticRenditionRequest($asset_id, $static_rendition_id) + { + // 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 deleteAssetStaticRendition' + ); + } + // verify the required parameter 'static_rendition_id' is set + if ($static_rendition_id === null || (is_array($static_rendition_id) && count($static_rendition_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $static_rendition_id when calling deleteAssetStaticRendition' + ); + } + + $resourcePath = '/video/v1/assets/{ASSET_ID}/static-renditions/{STATIC_RENDITION_ID}'; + $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 ($static_rendition_id !== null) { + $resourcePath = str_replace( + '{' . 'STATIC_RENDITION_ID' . '}', + ObjectSerializer::toPathValue($static_rendition_id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + [] + ); + } + + // for model (json/xml) + if (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( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation deleteAssetTrack * diff --git a/MuxPhp/Api/LiveStreamsApi.php b/MuxPhp/Api/LiveStreamsApi.php index ad44547..ae71508 100644 --- a/MuxPhp/Api/LiveStreamsApi.php +++ b/MuxPhp/Api/LiveStreamsApi.php @@ -1685,6 +1685,232 @@ public function deleteLiveStreamSimulcastTargetRequest($live_stream_id, $simulca ); } + /** + * Operation deleteLiveStreamStaticRenditions + * + * Delete a live stream's static renditions setting for new assets + * + * @param string $live_stream_id The live stream ID (required) + * + * @throws \MuxPhp\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function deleteLiveStreamStaticRenditions($live_stream_id) + { + $this->deleteLiveStreamStaticRenditionsWithHttpInfo($live_stream_id); + } + + /** + * Operation deleteLiveStreamStaticRenditionsWithHttpInfo + * + * Delete a live stream's static renditions setting for new assets + * + * @param string $live_stream_id The live stream ID (required) + * + * @throws \MuxPhp\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteLiveStreamStaticRenditionsWithHttpInfo($live_stream_id) + { + $request = $this->deleteLiveStreamStaticRenditionsRequest($live_stream_id); + + 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() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation deleteLiveStreamStaticRenditionsAsync + * + * Delete a live stream's static renditions setting for new assets + * + * @param string $live_stream_id The live stream ID (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteLiveStreamStaticRenditionsAsync($live_stream_id) + { + return $this->deleteLiveStreamStaticRenditionsAsyncWithHttpInfo($live_stream_id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteLiveStreamStaticRenditionsAsyncWithHttpInfo + * + * Delete a live stream's static renditions setting for new assets + * + * @param string $live_stream_id The live stream ID (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteLiveStreamStaticRenditionsAsyncWithHttpInfo($live_stream_id) + { + $returnType = ''; + $request = $this->deleteLiveStreamStaticRenditionsRequest($live_stream_id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $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 'deleteLiveStreamStaticRenditions' + * + * @param string $live_stream_id The live stream ID (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function deleteLiveStreamStaticRenditionsRequest($live_stream_id) + { + // verify the required parameter 'live_stream_id' is set + if ($live_stream_id === null || (is_array($live_stream_id) && count($live_stream_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $live_stream_id when calling deleteLiveStreamStaticRenditions' + ); + } + + $resourcePath = '/video/v1/live-streams/{LIVE_STREAM_ID}/new-asset-settings/static-renditions'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($live_stream_id !== null) { + $resourcePath = str_replace( + '{' . 'LIVE_STREAM_ID' . '}', + ObjectSerializer::toPathValue($live_stream_id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + [] + ); + } + + // for model (json/xml) + if (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( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation disableLiveStream * @@ -4833,6 +5059,297 @@ public function updateLiveStreamGeneratedSubtitlesRequest($live_stream_id, $upda ); } + /** + * Operation updateLiveStreamStaticRenditions + * + * Update live stream static renditions for new assets + * + * @param string $live_stream_id The live stream ID (required) + * @param \MuxPhp\Models\UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest $update_live_stream_new_asset_settings_static_renditions_request update_live_stream_new_asset_settings_static_renditions_request (required) + * + * @throws \MuxPhp\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \MuxPhp\Models\LiveStreamResponse + */ + public function updateLiveStreamStaticRenditions($live_stream_id, $update_live_stream_new_asset_settings_static_renditions_request) + { + list($response) = $this->updateLiveStreamStaticRenditionsWithHttpInfo($live_stream_id, $update_live_stream_new_asset_settings_static_renditions_request); + return $response; + } + + /** + * Operation updateLiveStreamStaticRenditionsWithHttpInfo + * + * Update live stream static renditions for new assets + * + * @param string $live_stream_id The live stream ID (required) + * @param \MuxPhp\Models\UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest $update_live_stream_new_asset_settings_static_renditions_request (required) + * + * @throws \MuxPhp\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \MuxPhp\Models\LiveStreamResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function updateLiveStreamStaticRenditionsWithHttpInfo($live_stream_id, $update_live_stream_new_asset_settings_static_renditions_request) + { + $request = $this->updateLiveStreamStaticRenditionsRequest($live_stream_id, $update_live_stream_new_asset_settings_static_renditions_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 200: + if ('\MuxPhp\Models\LiveStreamResponse' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\MuxPhp\Models\LiveStreamResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\MuxPhp\Models\LiveStreamResponse'; + $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 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\MuxPhp\Models\LiveStreamResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation updateLiveStreamStaticRenditionsAsync + * + * Update live stream static renditions for new assets + * + * @param string $live_stream_id The live stream ID (required) + * @param \MuxPhp\Models\UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest $update_live_stream_new_asset_settings_static_renditions_request (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateLiveStreamStaticRenditionsAsync($live_stream_id, $update_live_stream_new_asset_settings_static_renditions_request) + { + return $this->updateLiveStreamStaticRenditionsAsyncWithHttpInfo($live_stream_id, $update_live_stream_new_asset_settings_static_renditions_request) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateLiveStreamStaticRenditionsAsyncWithHttpInfo + * + * Update live stream static renditions for new assets + * + * @param string $live_stream_id The live stream ID (required) + * @param \MuxPhp\Models\UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest $update_live_stream_new_asset_settings_static_renditions_request (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateLiveStreamStaticRenditionsAsyncWithHttpInfo($live_stream_id, $update_live_stream_new_asset_settings_static_renditions_request) + { + $returnType = '\MuxPhp\Models\LiveStreamResponse'; + $request = $this->updateLiveStreamStaticRenditionsRequest($live_stream_id, $update_live_stream_new_asset_settings_static_renditions_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 'updateLiveStreamStaticRenditions' + * + * @param string $live_stream_id The live stream ID (required) + * @param \MuxPhp\Models\UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest $update_live_stream_new_asset_settings_static_renditions_request (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function updateLiveStreamStaticRenditionsRequest($live_stream_id, $update_live_stream_new_asset_settings_static_renditions_request) + { + // verify the required parameter 'live_stream_id' is set + if ($live_stream_id === null || (is_array($live_stream_id) && count($live_stream_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $live_stream_id when calling updateLiveStreamStaticRenditions' + ); + } + // verify the required parameter 'update_live_stream_new_asset_settings_static_renditions_request' is set + if ($update_live_stream_new_asset_settings_static_renditions_request === null || (is_array($update_live_stream_new_asset_settings_static_renditions_request) && count($update_live_stream_new_asset_settings_static_renditions_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $update_live_stream_new_asset_settings_static_renditions_request when calling updateLiveStreamStaticRenditions' + ); + } + + $resourcePath = '/video/v1/live-streams/{LIVE_STREAM_ID}/new-asset-settings/static-renditions'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($live_stream_id !== null) { + $resourcePath = str_replace( + '{' . 'LIVE_STREAM_ID' . '}', + ObjectSerializer::toPathValue($live_stream_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($update_live_stream_new_asset_settings_static_renditions_request)) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($update_live_stream_new_asset_settings_static_renditions_request)); + } else { + $httpBody = $update_live_stream_new_asset_settings_static_renditions_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( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Create http client option * diff --git a/MuxPhp/Configuration.php b/MuxPhp/Configuration.php index e0fb16e..45f4344 100644 --- a/MuxPhp/Configuration.php +++ b/MuxPhp/Configuration.php @@ -91,7 +91,7 @@ class Configuration * * @var string */ - protected $userAgent = 'Mux PHP | 3.21.0'; + protected $userAgent = 'Mux PHP | 3.22.0'; /** * 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.21.0' . PHP_EOL; + $report .= ' SDK Package Version: 3.22.0' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/MuxPhp/Models/AssetStaticRenditions.php b/MuxPhp/Models/AssetStaticRenditions.php index 5cedb10..ef03ca3 100644 --- a/MuxPhp/Models/AssetStaticRenditions.php +++ b/MuxPhp/Models/AssetStaticRenditions.php @@ -62,7 +62,7 @@ class AssetStaticRenditions implements ModelInterface, ArrayAccess, \JsonSeriali */ protected static $openAPITypes = [ 'status' => 'string', - 'files' => '\MuxPhp\Models\AssetStaticRenditionsFiles[]' + 'files' => '\MuxPhp\Models\StaticRendition[]' ]; /** @@ -334,7 +334,7 @@ public function getStatus() /** * Sets status * - * @param string|null $status Indicates the status of downloadable MP4 versions of this asset. + * @param string|null $status Indicates the status of downloadable MP4 versions of this asset. This field is only valid when `mp4_support` is enabled * * @return self */ @@ -363,7 +363,7 @@ public function setStatus($status) /** * Gets files * - * @return \MuxPhp\Models\AssetStaticRenditionsFiles[]|null + * @return \MuxPhp\Models\StaticRendition[]|null */ public function getFiles() { @@ -373,7 +373,7 @@ public function getFiles() /** * Sets files * - * @param \MuxPhp\Models\AssetStaticRenditionsFiles[]|null $files Array of file objects. + * @param \MuxPhp\Models\StaticRendition[]|null $files Array of file objects. * * @return self */ diff --git a/MuxPhp/Models/CreateAssetRequest.php b/MuxPhp/Models/CreateAssetRequest.php index 1b11d02..b0cf324 100644 --- a/MuxPhp/Models/CreateAssetRequest.php +++ b/MuxPhp/Models/CreateAssetRequest.php @@ -71,7 +71,8 @@ class CreateAssetRequest implements ModelInterface, ArrayAccess, \JsonSerializab 'test' => 'bool', 'max_resolution_tier' => 'string', 'encoding_tier' => 'string', - 'video_quality' => 'string' + 'video_quality' => 'string', + 'static_renditions' => '\MuxPhp\Models\CreateStaticRenditionRequest[]' ]; /** @@ -93,7 +94,8 @@ class CreateAssetRequest implements ModelInterface, ArrayAccess, \JsonSerializab 'test' => 'boolean', 'max_resolution_tier' => null, 'encoding_tier' => null, - 'video_quality' => null + 'video_quality' => null, + 'static_renditions' => null ]; /** @@ -113,7 +115,8 @@ class CreateAssetRequest implements ModelInterface, ArrayAccess, \JsonSerializab 'test' => false, 'max_resolution_tier' => false, 'encoding_tier' => false, - 'video_quality' => false + 'video_quality' => false, + 'static_renditions' => false ]; /** @@ -203,7 +206,8 @@ public function isNullableSetToNull(string $property): bool 'test' => 'test', 'max_resolution_tier' => 'max_resolution_tier', 'encoding_tier' => 'encoding_tier', - 'video_quality' => 'video_quality' + 'video_quality' => 'video_quality', + 'static_renditions' => 'static_renditions' ]; /** @@ -223,7 +227,8 @@ public function isNullableSetToNull(string $property): bool 'test' => 'setTest', 'max_resolution_tier' => 'setMaxResolutionTier', 'encoding_tier' => 'setEncodingTier', - 'video_quality' => 'setVideoQuality' + 'video_quality' => 'setVideoQuality', + 'static_renditions' => 'setStaticRenditions' ]; /** @@ -243,7 +248,8 @@ public function isNullableSetToNull(string $property): bool 'test' => 'getTest', 'max_resolution_tier' => 'getMaxResolutionTier', 'encoding_tier' => 'getEncodingTier', - 'video_quality' => 'getVideoQuality' + 'video_quality' => 'getVideoQuality', + 'static_renditions' => 'getStaticRenditions' ]; /** @@ -405,6 +411,7 @@ public function __construct(array $data = null) $this->setIfExists('max_resolution_tier', $data ?? [], null); $this->setIfExists('encoding_tier', $data ?? [], null); $this->setIfExists('video_quality', $data ?? [], null); + $this->setIfExists('static_renditions', $data ?? [], null); } /** @@ -654,7 +661,7 @@ public function getMp4Support() /** * Sets mp4_support * - * @param string|null $mp4_support Specify what level of support for mp4 playback. * The `capped-1080p` option produces a single MP4 file, called `capped-1080p.mp4`, with the video resolution capped at 1080p. This option produces an `audio.m4a` file for an audio-only asset. * The `audio-only` option produces a single M4A file, called `audio.m4a` for a video or an audio-only asset. MP4 generation will error when this option is specified for a video-only asset. * The `audio-only,capped-1080p` option produces both the `audio.m4a` and `capped-1080p.mp4` files. Only the `capped-1080p.mp4` file is produced for a video-only asset, while only the `audio.m4a` file is produced for an audio-only asset. The `standard`(deprecated) option produces up to three MP4 files with different levels of resolution (`high.mp4`, `medium.mp4`, `low.mp4`, or `audio.m4a` for an audio-only asset). MP4 files are not produced for `none` (default). In most cases you should use our default HLS-based streaming playback (`{playback_id}.m3u8`) which can automatically adjust to viewers' connection speeds, but an mp4 can be useful for some legacy devices or downloading for offline playback. See the [Download your videos guide](https://docs.mux.com/guides/enable-static-mp4-renditions) for more information. + * @param string|null $mp4_support Specify what level of support for mp4 playback. You may not enable both `mp4_support` and `static_renditions`. * The `capped-1080p` option produces a single MP4 file, called `capped-1080p.mp4`, with the video resolution capped at 1080p. This option produces an `audio.m4a` file for an audio-only asset. * The `audio-only` option produces a single M4A file, called `audio.m4a` for a video or an audio-only asset. MP4 generation will error when this option is specified for a video-only asset. * The `audio-only,capped-1080p` option produces both the `audio.m4a` and `capped-1080p.mp4` files. Only the `capped-1080p.mp4` file is produced for a video-only asset, while only the `audio.m4a` file is produced for an audio-only asset. The `standard`(deprecated) option produces up to three MP4 files with different levels of resolution (`high.mp4`, `medium.mp4`, `low.mp4`, or `audio.m4a` for an audio-only asset). MP4 files are not produced for `none` (default). In most cases you should use our default HLS-based streaming playback (`{playback_id}.m3u8`) which can automatically adjust to viewers' connection speeds, but an mp4 can be useful for some legacy devices or downloading for offline playback. See the [Download your videos guide](https://docs.mux.com/guides/enable-static-mp4-renditions) for more information. * * @return self */ @@ -895,6 +902,35 @@ public function setVideoQuality($video_quality) return $this; } + + /** + * Gets static_renditions + * + * @return \MuxPhp\Models\CreateStaticRenditionRequest[]|null + */ + public function getStaticRenditions() + { + return $this->container['static_renditions']; + } + + /** + * Sets static_renditions + * + * @param \MuxPhp\Models\CreateStaticRenditionRequest[]|null $static_renditions An array of static renditions to create for this asset. You may not enable both `static_renditions` and `mp4_support` + * + * @return self + */ + public function setStaticRenditions($static_renditions) + { + + if (is_null($static_renditions)) { + throw new \InvalidArgumentException('non-nullable static_renditions cannot be null'); + } + + $this->container['static_renditions'] = $static_renditions; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/MuxPhp/Models/CreateStaticRenditionRequest.php b/MuxPhp/Models/CreateStaticRenditionRequest.php new file mode 100644 index 0000000..c0909fe --- /dev/null +++ b/MuxPhp/Models/CreateStaticRenditionRequest.php @@ -0,0 +1,493 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class CreateStaticRenditionRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CreateStaticRenditionRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'resolution' => 'string', + 'passthrough' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'resolution' => null, + 'passthrough' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'resolution' => false, + 'passthrough' => 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 = [ + 'resolution' => 'resolution', + 'passthrough' => 'passthrough' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'resolution' => 'setResolution', + 'passthrough' => 'setPassthrough' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'resolution' => 'getResolution', + 'passthrough' => 'getPassthrough' + ]; + + /** + * 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; + } + + public const RESOLUTION_HIGHEST = 'highest'; + public const RESOLUTION_AUDIO_ONLY = 'audio-only'; + public const RESOLUTION__2160P = '2160p'; + public const RESOLUTION__1440P = '1440p'; + public const RESOLUTION__1080P = '1080p'; + public const RESOLUTION__720P = '720p'; + public const RESOLUTION__540P = '540p'; + public const RESOLUTION__480P = '480p'; + public const RESOLUTION__360P = '360p'; + public const RESOLUTION__270P = '270p'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getResolutionAllowableValues() + { + return [ + self::RESOLUTION_HIGHEST, + self::RESOLUTION_AUDIO_ONLY, + self::RESOLUTION__2160P, + self::RESOLUTION__1440P, + self::RESOLUTION__1080P, + self::RESOLUTION__720P, + self::RESOLUTION__540P, + self::RESOLUTION__480P, + self::RESOLUTION__360P, + self::RESOLUTION__270P, + ]; + } + + /** + * 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('resolution', $data ?? [], null); + $this->setIfExists('passthrough', $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 = []; + + $allowedValues = $this->getResolutionAllowableValues(); + if (!is_null($this->container['resolution']) && !in_array($this->container['resolution'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'resolution', must be one of '%s'", + $this->container['resolution'], + implode("', '", $allowedValues) + ); + } + + 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 resolution + * + * @return string|null + */ + public function getResolution() + { + return $this->container['resolution']; + } + + /** + * Sets resolution + * + * @param string|null $resolution resolution + * + * @return self + */ + public function setResolution($resolution) + { + $allowedValues = $this->getResolutionAllowableValues(); + if (!is_null($resolution) && !in_array($resolution, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'resolution', must be one of '%s'", + $resolution, + implode("', '", $allowedValues) + ) + ); + } + + if (is_null($resolution)) { + throw new \InvalidArgumentException('non-nullable resolution cannot be null'); + } + + $this->container['resolution'] = $resolution; + + return $this; + } + + /** + * Gets passthrough + * + * @return string|null + */ + public function getPassthrough() + { + return $this->container['passthrough']; + } + + /** + * Sets passthrough + * + * @param string|null $passthrough Arbitrary user-supplied metadata set for the static rendition. Max 255 characters. + * + * @return self + */ + public function setPassthrough($passthrough) + { + + if (is_null($passthrough)) { + throw new \InvalidArgumentException('non-nullable passthrough cannot be null'); + } + + $this->container['passthrough'] = $passthrough; + + 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/CreateStaticRenditionResponse.php b/MuxPhp/Models/CreateStaticRenditionResponse.php new file mode 100644 index 0000000..5c1ea38 --- /dev/null +++ b/MuxPhp/Models/CreateStaticRenditionResponse.php @@ -0,0 +1,407 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class CreateStaticRenditionResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CreateStaticRenditionResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\MuxPhp\Models\StaticRendition' + ]; + + /** + * 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\StaticRendition|null + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \MuxPhp\Models\StaticRendition|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 e0bef87..037208e 100644 --- a/MuxPhp/Models/InputSettings.php +++ b/MuxPhp/Models/InputSettings.php @@ -727,7 +727,7 @@ public function getPassthrough() /** * Sets passthrough * - * @param string|null $passthrough This optional parameter should be used tracks with `type` of `text` and `text_type` set to `subtitles`. + * @param string|null $passthrough This optional parameter should be used for tracks with `type` of `text` and `text_type` set to `subtitles`. * * @return self */ diff --git a/MuxPhp/Models/StaticRendition.php b/MuxPhp/Models/StaticRendition.php new file mode 100644 index 0000000..2c92be5 --- /dev/null +++ b/MuxPhp/Models/StaticRendition.php @@ -0,0 +1,1055 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class StaticRendition implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'StaticRendition'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'name' => 'string', + 'ext' => 'string', + 'height' => 'int', + 'width' => 'int', + 'bitrate' => 'int', + 'filesize' => 'string', + 'type' => 'string', + 'status' => 'string', + 'resolution_tier' => 'string', + 'resolution' => 'string', + 'id' => 'string', + 'passthrough' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'name' => null, + 'ext' => null, + 'height' => 'int32', + 'width' => 'int32', + 'bitrate' => 'int64', + 'filesize' => 'int64', + 'type' => null, + 'status' => null, + 'resolution_tier' => null, + 'resolution' => null, + 'id' => null, + 'passthrough' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'name' => false, + 'ext' => false, + 'height' => false, + 'width' => false, + 'bitrate' => false, + 'filesize' => false, + 'type' => false, + 'status' => false, + 'resolution_tier' => false, + 'resolution' => false, + 'id' => false, + 'passthrough' => 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 = [ + 'name' => 'name', + 'ext' => 'ext', + 'height' => 'height', + 'width' => 'width', + 'bitrate' => 'bitrate', + 'filesize' => 'filesize', + 'type' => 'type', + 'status' => 'status', + 'resolution_tier' => 'resolution_tier', + 'resolution' => 'resolution', + 'id' => 'id', + 'passthrough' => 'passthrough' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'ext' => 'setExt', + 'height' => 'setHeight', + 'width' => 'setWidth', + 'bitrate' => 'setBitrate', + 'filesize' => 'setFilesize', + 'type' => 'setType', + 'status' => 'setStatus', + 'resolution_tier' => 'setResolutionTier', + 'resolution' => 'setResolution', + 'id' => 'setId', + 'passthrough' => 'setPassthrough' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'ext' => 'getExt', + 'height' => 'getHeight', + 'width' => 'getWidth', + 'bitrate' => 'getBitrate', + 'filesize' => 'getFilesize', + 'type' => 'getType', + 'status' => 'getStatus', + 'resolution_tier' => 'getResolutionTier', + 'resolution' => 'getResolution', + 'id' => 'getId', + 'passthrough' => 'getPassthrough' + ]; + + /** + * 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; + } + + public const NAME_LOW_MP4 = 'low.mp4'; + public const NAME_MEDIUM_MP4 = 'medium.mp4'; + public const NAME_HIGH_MP4 = 'high.mp4'; + public const NAME_HIGHEST_MP4 = 'highest.mp4'; + public const NAME_AUDIO_M4A = 'audio.m4a'; + public const NAME_CAPPED_1080P_MP4 = 'capped-1080p.mp4'; + public const NAME__2160P_MP4 = '2160p.mp4'; + public const NAME__1440P_MP4 = '1440p.mp4'; + public const NAME__1080P_MP4 = '1080p.mp4'; + public const NAME__720P_MP4 = '720p.mp4'; + public const NAME__540P_MP4 = '540p.mp4'; + public const NAME__480P_MP4 = '480p.mp4'; + public const NAME__360P_MP4 = '360p.mp4'; + public const NAME__270P_MP4 = '270p.mp4'; + public const EXT_MP4 = 'mp4'; + public const EXT_M4A = 'm4a'; + public const TYPE_STANDARD = 'standard'; + public const TYPE_ADVANCED = 'advanced'; + public const STATUS_READY = 'ready'; + public const STATUS_PREPARING = 'preparing'; + public const STATUS_SKIPPED = 'skipped'; + public const STATUS_ERRORED = 'errored'; + public const RESOLUTION_TIER__2160P = '2160p'; + public const RESOLUTION_TIER__1440P = '1440p'; + public const RESOLUTION_TIER__1080P = '1080p'; + public const RESOLUTION_TIER__720P = '720p'; + public const RESOLUTION_HIGHEST = 'highest'; + public const RESOLUTION_AUDIO_ONLY = 'audio-only'; + public const RESOLUTION__2160P = '2160p'; + public const RESOLUTION__1440P = '1440p'; + public const RESOLUTION__1080P = '1080p'; + public const RESOLUTION__720P = '720p'; + public const RESOLUTION__540P = '540p'; + public const RESOLUTION__480P = '480p'; + public const RESOLUTION__360P = '360p'; + public const RESOLUTION__270P = '270p'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getNameAllowableValues() + { + return [ + self::NAME_LOW_MP4, + self::NAME_MEDIUM_MP4, + self::NAME_HIGH_MP4, + self::NAME_HIGHEST_MP4, + self::NAME_AUDIO_M4A, + self::NAME_CAPPED_1080P_MP4, + self::NAME__2160P_MP4, + self::NAME__1440P_MP4, + self::NAME__1080P_MP4, + self::NAME__720P_MP4, + self::NAME__540P_MP4, + self::NAME__480P_MP4, + self::NAME__360P_MP4, + self::NAME__270P_MP4, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getExtAllowableValues() + { + return [ + self::EXT_MP4, + self::EXT_M4A, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_STANDARD, + self::TYPE_ADVANCED, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_READY, + self::STATUS_PREPARING, + self::STATUS_SKIPPED, + self::STATUS_ERRORED, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getResolutionTierAllowableValues() + { + return [ + self::RESOLUTION_TIER__2160P, + self::RESOLUTION_TIER__1440P, + self::RESOLUTION_TIER__1080P, + self::RESOLUTION_TIER__720P, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getResolutionAllowableValues() + { + return [ + self::RESOLUTION_HIGHEST, + self::RESOLUTION_AUDIO_ONLY, + self::RESOLUTION__2160P, + self::RESOLUTION__1440P, + self::RESOLUTION__1080P, + self::RESOLUTION__720P, + self::RESOLUTION__540P, + self::RESOLUTION__480P, + self::RESOLUTION__360P, + self::RESOLUTION__270P, + ]; + } + + /** + * 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('name', $data ?? [], null); + $this->setIfExists('ext', $data ?? [], null); + $this->setIfExists('height', $data ?? [], null); + $this->setIfExists('width', $data ?? [], null); + $this->setIfExists('bitrate', $data ?? [], null); + $this->setIfExists('filesize', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('resolution_tier', $data ?? [], null); + $this->setIfExists('resolution', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('passthrough', $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 = []; + + $allowedValues = $this->getNameAllowableValues(); + if (!is_null($this->container['name']) && !in_array($this->container['name'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'name', must be one of '%s'", + $this->container['name'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getExtAllowableValues(); + if (!is_null($this->container['ext']) && !in_array($this->container['ext'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'ext', must be one of '%s'", + $this->container['ext'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'status', must be one of '%s'", + $this->container['status'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getResolutionTierAllowableValues(); + if (!is_null($this->container['resolution_tier']) && !in_array($this->container['resolution_tier'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'resolution_tier', must be one of '%s'", + $this->container['resolution_tier'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getResolutionAllowableValues(); + if (!is_null($this->container['resolution']) && !in_array($this->container['resolution'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'resolution', must be one of '%s'", + $this->container['resolution'], + implode("', '", $allowedValues) + ); + } + + 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 name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name Name of the static rendition file + * + * @return self + */ + public function setName($name) + { + $allowedValues = $this->getNameAllowableValues(); + if (!is_null($name) && !in_array($name, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'name', must be one of '%s'", + $name, + implode("', '", $allowedValues) + ) + ); + } + + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets ext + * + * @return string|null + */ + public function getExt() + { + return $this->container['ext']; + } + + /** + * Sets ext + * + * @param string|null $ext Extension of the static rendition file + * + * @return self + */ + public function setExt($ext) + { + $allowedValues = $this->getExtAllowableValues(); + if (!is_null($ext) && !in_array($ext, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'ext', must be one of '%s'", + $ext, + implode("', '", $allowedValues) + ) + ); + } + + if (is_null($ext)) { + throw new \InvalidArgumentException('non-nullable ext cannot be null'); + } + + $this->container['ext'] = $ext; + + return $this; + } + + /** + * Gets height + * + * @return int|null + */ + public function getHeight() + { + return $this->container['height']; + } + + /** + * Sets height + * + * @param int|null $height The height of the static rendition's file in pixels + * + * @return self + */ + public function setHeight($height) + { + + if (is_null($height)) { + throw new \InvalidArgumentException('non-nullable height cannot be null'); + } + + $this->container['height'] = $height; + + return $this; + } + + /** + * Gets width + * + * @return int|null + */ + public function getWidth() + { + return $this->container['width']; + } + + /** + * Sets width + * + * @param int|null $width The width of the static rendition's file in pixels + * + * @return self + */ + public function setWidth($width) + { + + if (is_null($width)) { + throw new \InvalidArgumentException('non-nullable width cannot be null'); + } + + $this->container['width'] = $width; + + return $this; + } + + /** + * Gets bitrate + * + * @return int|null + */ + public function getBitrate() + { + return $this->container['bitrate']; + } + + /** + * Sets bitrate + * + * @param int|null $bitrate The bitrate in bits per second + * + * @return self + */ + public function setBitrate($bitrate) + { + + if (is_null($bitrate)) { + throw new \InvalidArgumentException('non-nullable bitrate cannot be null'); + } + + $this->container['bitrate'] = $bitrate; + + return $this; + } + + /** + * Gets filesize + * + * @return string|null + */ + public function getFilesize() + { + return $this->container['filesize']; + } + + /** + * Sets filesize + * + * @param string|null $filesize The file size in bytes + * + * @return self + */ + public function setFilesize($filesize) + { + + if (is_null($filesize)) { + throw new \InvalidArgumentException('non-nullable filesize cannot be null'); + } + + $this->container['filesize'] = $filesize; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type Indicates the static rendition type of this specific MP4 version of this asset. This field is only valid for `static_renditions`, not for `mp4_support`. + * + * @return self + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($type) && !in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status Indicates the status of this specific MP4 version of this asset. This field is only valid for `static_renditions`, not for `mp4_support`. * `ready` indicates the MP4 has been generated and is ready for download * `preparing` indicates the asset has not been ingested or the static rendition is still being generated after an asset is ready * `skipped` indicates the static rendition will not be generated because the requested resolution conflicts with the asset attributes after the asset has been ingested * `errored` indicates the static rendition cannot be generated. For example, an asset could not be ingested + * + * @return self + */ + public function setStatus($status) + { + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($status) && !in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets resolution_tier + * + * @return string|null + */ + public function getResolutionTier() + { + return $this->container['resolution_tier']; + } + + /** + * Sets resolution_tier + * + * @param string|null $resolution_tier Indicates the resolution tier of this specific MP4 version of this asset. This field is only valid for `static_renditions`, not for `mp4_support`. + * + * @return self + */ + public function setResolutionTier($resolution_tier) + { + $allowedValues = $this->getResolutionTierAllowableValues(); + if (!is_null($resolution_tier) && !in_array($resolution_tier, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'resolution_tier', must be one of '%s'", + $resolution_tier, + implode("', '", $allowedValues) + ) + ); + } + + if (is_null($resolution_tier)) { + throw new \InvalidArgumentException('non-nullable resolution_tier cannot be null'); + } + + $this->container['resolution_tier'] = $resolution_tier; + + return $this; + } + + /** + * Gets resolution + * + * @return string|null + */ + public function getResolution() + { + return $this->container['resolution']; + } + + /** + * Sets resolution + * + * @param string|null $resolution Indicates the resolution of this specific MP4 version of this asset. This field is only valid for `static_renditions`, not for `mp4_support`. + * + * @return self + */ + public function setResolution($resolution) + { + $allowedValues = $this->getResolutionAllowableValues(); + if (!is_null($resolution) && !in_array($resolution, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'resolution', must be one of '%s'", + $resolution, + implode("', '", $allowedValues) + ) + ); + } + + if (is_null($resolution)) { + throw new \InvalidArgumentException('non-nullable resolution cannot be null'); + } + + $this->container['resolution'] = $resolution; + + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The ID of this static rendition, used in managing this static rendition. This field is only valid for `static_renditions`, not for `mp4_support`. + * + * @return self + */ + public function setId($id) + { + + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets passthrough + * + * @return string|null + */ + public function getPassthrough() + { + return $this->container['passthrough']; + } + + /** + * Sets passthrough + * + * @param string|null $passthrough Arbitrary user-supplied metadata set for the static rendition. Max 255 characters. + * + * @return self + */ + public function setPassthrough($passthrough) + { + + if (is_null($passthrough)) { + throw new \InvalidArgumentException('non-nullable passthrough cannot be null'); + } + + $this->container['passthrough'] = $passthrough; + + 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/UpdateLiveStreamNewAssetSettings.php b/MuxPhp/Models/UpdateLiveStreamNewAssetSettings.php index 644cdac..8ba277d 100644 --- a/MuxPhp/Models/UpdateLiveStreamNewAssetSettings.php +++ b/MuxPhp/Models/UpdateLiveStreamNewAssetSettings.php @@ -36,7 +36,7 @@ * UpdateLiveStreamNewAssetSettings Class Doc Comment * * @category Class - * @description Updates the new asset settings to use to generate a new asset for this live stream. Only the `mp4_support` and `master_access` settings may be updated. + * @description Updates the new asset settings to use to generate a new asset for this live stream. Only the `mp4_support`, `master_access`, and `video_quality` settings may be updated. * @package MuxPhp * @author Mux API team * @link https://docs.mux.com @@ -62,7 +62,8 @@ class UpdateLiveStreamNewAssetSettings implements ModelInterface, ArrayAccess, \ */ protected static $openAPITypes = [ 'mp4_support' => 'string', - 'master_access' => 'string' + 'master_access' => 'string', + 'video_quality' => 'string' ]; /** @@ -74,7 +75,8 @@ class UpdateLiveStreamNewAssetSettings implements ModelInterface, ArrayAccess, \ */ protected static $openAPIFormats = [ 'mp4_support' => null, - 'master_access' => null + 'master_access' => null, + 'video_quality' => null ]; /** @@ -84,7 +86,8 @@ class UpdateLiveStreamNewAssetSettings implements ModelInterface, ArrayAccess, \ */ protected static array $openAPINullables = [ 'mp4_support' => false, - 'master_access' => false + 'master_access' => false, + 'video_quality' => false ]; /** @@ -164,7 +167,8 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'mp4_support' => 'mp4_support', - 'master_access' => 'master_access' + 'master_access' => 'master_access', + 'video_quality' => 'video_quality' ]; /** @@ -174,7 +178,8 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'mp4_support' => 'setMp4Support', - 'master_access' => 'setMasterAccess' + 'master_access' => 'setMasterAccess', + 'video_quality' => 'setVideoQuality' ]; /** @@ -184,7 +189,8 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'mp4_support' => 'getMp4Support', - 'master_access' => 'getMasterAccess' + 'master_access' => 'getMasterAccess', + 'video_quality' => 'getVideoQuality' ]; /** @@ -235,6 +241,8 @@ public function getModelName() public const MP4_SUPPORT_AUDIO_ONLYCAPPED_1080P = 'audio-only,capped-1080p'; public const MASTER_ACCESS_TEMPORARY = 'temporary'; public const MASTER_ACCESS_NONE = 'none'; + public const VIDEO_QUALITY_PLUS = 'plus'; + public const VIDEO_QUALITY_PREMIUM = 'premium'; /** * Gets allowable values of the enum @@ -265,6 +273,19 @@ public function getMasterAccessAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getVideoQualityAllowableValues() + { + return [ + self::VIDEO_QUALITY_PLUS, + self::VIDEO_QUALITY_PREMIUM, + ]; + } + /** * Associative array for storing property values * @@ -285,6 +306,7 @@ public function __construct(array $data = null) // src: https://github.com/OpenAPITools/openapi-generator/issues/9038 $this->setIfExists('mp4_support', $data ?? [], null); $this->setIfExists('master_access', $data ?? [], null); + $this->setIfExists('video_quality', $data ?? [], null); } /** @@ -332,6 +354,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getVideoQualityAllowableValues(); + if (!is_null($this->container['video_quality']) && !in_array($this->container['video_quality'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'video_quality', must be one of '%s'", + $this->container['video_quality'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -424,6 +455,45 @@ public function setMasterAccess($master_access) return $this; } + + /** + * Gets video_quality + * + * @return string|null + */ + public function getVideoQuality() + { + return $this->container['video_quality']; + } + + /** + * Sets video_quality + * + * @param string|null $video_quality The video quality controls the cost, quality, and available platform features for the asset. [See the video quality guide for more details.](https://docs.mux.com/guides/use-video-quality-levels) + * + * @return self + */ + public function setVideoQuality($video_quality) + { + $allowedValues = $this->getVideoQualityAllowableValues(); + if (!is_null($video_quality) && !in_array($video_quality, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'video_quality', must be one of '%s'", + $video_quality, + implode("', '", $allowedValues) + ) + ); + } + + if (is_null($video_quality)) { + throw new \InvalidArgumentException('non-nullable video_quality cannot be null'); + } + + $this->container['video_quality'] = $video_quality; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/MuxPhp/Models/UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest.php b/MuxPhp/Models/UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest.php new file mode 100644 index 0000000..9bf98c9 --- /dev/null +++ b/MuxPhp/Models/UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest.php @@ -0,0 +1,407 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'static_renditions' => '\MuxPhp\Models\CreateStaticRenditionRequest[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'static_renditions' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'static_renditions' => 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 = [ + 'static_renditions' => 'static_renditions' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'static_renditions' => 'setStaticRenditions' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'static_renditions' => 'getStaticRenditions' + ]; + + /** + * 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('static_renditions', $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 static_renditions + * + * @return \MuxPhp\Models\CreateStaticRenditionRequest[]|null + */ + public function getStaticRenditions() + { + return $this->container['static_renditions']; + } + + /** + * Sets static_renditions + * + * @param \MuxPhp\Models\CreateStaticRenditionRequest[]|null $static_renditions static_renditions + * + * @return self + */ + public function setStaticRenditions($static_renditions) + { + + if (is_null($static_renditions)) { + throw new \InvalidArgumentException('non-nullable static_renditions cannot be null'); + } + + $this->container['static_renditions'] = $static_renditions; + + 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/VideoView.php b/MuxPhp/Models/VideoView.php index febf053..9d34c3e 100644 --- a/MuxPhp/Models/VideoView.php +++ b/MuxPhp/Models/VideoView.php @@ -221,7 +221,23 @@ class VideoView implements ModelInterface, ArrayAccess, \JsonSerializable 'ad_playback_failure_error_type_id' => 'int', 'view_content_startup_time' => 'int', 'ad_preroll_startup_time' => 'int', - 'view_dropped' => 'bool' + 'view_dropped' => 'bool', + 'client_application_name' => 'string', + 'client_application_version' => 'string', + 'video_affiliate' => 'string', + 'viewer_plan' => 'string', + 'viewer_plan_status' => 'string', + 'viewer_plan_category' => 'string', + 'view_drm_level' => 'string', + 'video_brand' => 'string', + 'used_pip' => 'bool', + 'time_shift_enabled' => 'bool', + 'used_captions' => 'bool', + 'video_codec' => 'string', + 'audio_codec' => 'string', + 'video_dynamic_range_type' => 'string', + 'view_cdn_edge_pop' => 'string', + 'view_cdn_origin' => 'string' ]; /** @@ -393,7 +409,23 @@ class VideoView implements ModelInterface, ArrayAccess, \JsonSerializable 'ad_playback_failure_error_type_id' => 'int32', 'view_content_startup_time' => 'int32', 'ad_preroll_startup_time' => 'int32', - 'view_dropped' => null + 'view_dropped' => null, + 'client_application_name' => null, + 'client_application_version' => null, + 'video_affiliate' => null, + 'viewer_plan' => null, + 'viewer_plan_status' => null, + 'viewer_plan_category' => null, + 'view_drm_level' => null, + 'video_brand' => null, + 'used_pip' => null, + 'time_shift_enabled' => null, + 'used_captions' => null, + 'video_codec' => null, + 'audio_codec' => null, + 'video_dynamic_range_type' => null, + 'view_cdn_edge_pop' => null, + 'view_cdn_origin' => null ]; /** @@ -563,7 +595,23 @@ class VideoView implements ModelInterface, ArrayAccess, \JsonSerializable 'ad_playback_failure_error_type_id' => true, 'view_content_startup_time' => true, 'ad_preroll_startup_time' => true, - 'view_dropped' => false + 'view_dropped' => false, + 'client_application_name' => true, + 'client_application_version' => true, + 'video_affiliate' => true, + 'viewer_plan' => true, + 'viewer_plan_status' => true, + 'viewer_plan_category' => true, + 'view_drm_level' => true, + 'video_brand' => true, + 'used_pip' => false, + 'time_shift_enabled' => false, + 'used_captions' => false, + 'video_codec' => true, + 'audio_codec' => true, + 'video_dynamic_range_type' => true, + 'view_cdn_edge_pop' => true, + 'view_cdn_origin' => true ]; /** @@ -803,7 +851,23 @@ public function isNullableSetToNull(string $property): bool 'ad_playback_failure_error_type_id' => 'ad_playback_failure_error_type_id', 'view_content_startup_time' => 'view_content_startup_time', 'ad_preroll_startup_time' => 'ad_preroll_startup_time', - 'view_dropped' => 'view_dropped' + 'view_dropped' => 'view_dropped', + 'client_application_name' => 'client_application_name', + 'client_application_version' => 'client_application_version', + 'video_affiliate' => 'video_affiliate', + 'viewer_plan' => 'viewer_plan', + 'viewer_plan_status' => 'viewer_plan_status', + 'viewer_plan_category' => 'viewer_plan_category', + 'view_drm_level' => 'view_drm_level', + 'video_brand' => 'video_brand', + 'used_pip' => 'used_pip', + 'time_shift_enabled' => 'time_shift_enabled', + 'used_captions' => 'used_captions', + 'video_codec' => 'video_codec', + 'audio_codec' => 'audio_codec', + 'video_dynamic_range_type' => 'video_dynamic_range_type', + 'view_cdn_edge_pop' => 'view_cdn_edge_pop', + 'view_cdn_origin' => 'view_cdn_origin' ]; /** @@ -973,7 +1037,23 @@ public function isNullableSetToNull(string $property): bool 'ad_playback_failure_error_type_id' => 'setAdPlaybackFailureErrorTypeId', 'view_content_startup_time' => 'setViewContentStartupTime', 'ad_preroll_startup_time' => 'setAdPrerollStartupTime', - 'view_dropped' => 'setViewDropped' + 'view_dropped' => 'setViewDropped', + 'client_application_name' => 'setClientApplicationName', + 'client_application_version' => 'setClientApplicationVersion', + 'video_affiliate' => 'setVideoAffiliate', + 'viewer_plan' => 'setViewerPlan', + 'viewer_plan_status' => 'setViewerPlanStatus', + 'viewer_plan_category' => 'setViewerPlanCategory', + 'view_drm_level' => 'setViewDrmLevel', + 'video_brand' => 'setVideoBrand', + 'used_pip' => 'setUsedPip', + 'time_shift_enabled' => 'setTimeShiftEnabled', + 'used_captions' => 'setUsedCaptions', + 'video_codec' => 'setVideoCodec', + 'audio_codec' => 'setAudioCodec', + 'video_dynamic_range_type' => 'setVideoDynamicRangeType', + 'view_cdn_edge_pop' => 'setViewCdnEdgePop', + 'view_cdn_origin' => 'setViewCdnOrigin' ]; /** @@ -1143,7 +1223,23 @@ public function isNullableSetToNull(string $property): bool 'ad_playback_failure_error_type_id' => 'getAdPlaybackFailureErrorTypeId', 'view_content_startup_time' => 'getViewContentStartupTime', 'ad_preroll_startup_time' => 'getAdPrerollStartupTime', - 'view_dropped' => 'getViewDropped' + 'view_dropped' => 'getViewDropped', + 'client_application_name' => 'getClientApplicationName', + 'client_application_version' => 'getClientApplicationVersion', + 'video_affiliate' => 'getVideoAffiliate', + 'viewer_plan' => 'getViewerPlan', + 'viewer_plan_status' => 'getViewerPlanStatus', + 'viewer_plan_category' => 'getViewerPlanCategory', + 'view_drm_level' => 'getViewDrmLevel', + 'video_brand' => 'getVideoBrand', + 'used_pip' => 'getUsedPip', + 'time_shift_enabled' => 'getTimeShiftEnabled', + 'used_captions' => 'getUsedCaptions', + 'video_codec' => 'getVideoCodec', + 'audio_codec' => 'getAudioCodec', + 'video_dynamic_range_type' => 'getVideoDynamicRangeType', + 'view_cdn_edge_pop' => 'getViewCdnEdgePop', + 'view_cdn_origin' => 'getViewCdnOrigin' ]; /** @@ -1368,6 +1464,22 @@ public function __construct(array $data = null) $this->setIfExists('view_content_startup_time', $data ?? [], null); $this->setIfExists('ad_preroll_startup_time', $data ?? [], null); $this->setIfExists('view_dropped', $data ?? [], null); + $this->setIfExists('client_application_name', $data ?? [], null); + $this->setIfExists('client_application_version', $data ?? [], null); + $this->setIfExists('video_affiliate', $data ?? [], null); + $this->setIfExists('viewer_plan', $data ?? [], null); + $this->setIfExists('viewer_plan_status', $data ?? [], null); + $this->setIfExists('viewer_plan_category', $data ?? [], null); + $this->setIfExists('view_drm_level', $data ?? [], null); + $this->setIfExists('video_brand', $data ?? [], null); + $this->setIfExists('used_pip', $data ?? [], null); + $this->setIfExists('time_shift_enabled', $data ?? [], null); + $this->setIfExists('used_captions', $data ?? [], null); + $this->setIfExists('video_codec', $data ?? [], null); + $this->setIfExists('audio_codec', $data ?? [], null); + $this->setIfExists('video_dynamic_range_type', $data ?? [], null); + $this->setIfExists('view_cdn_edge_pop', $data ?? [], null); + $this->setIfExists('view_cdn_origin', $data ?? [], null); } /** @@ -7075,6 +7187,561 @@ public function setViewDropped($view_dropped) return $this; } + + /** + * Gets client_application_name + * + * @return string|null + */ + public function getClientApplicationName() + { + return $this->container['client_application_name']; + } + + /** + * Sets client_application_name + * + * @param string|null $client_application_name client_application_name + * + * @return self + */ + public function setClientApplicationName($client_application_name) + { + + if (is_null($client_application_name)) { + array_push($this->openAPINullablesSetToNull, 'client_application_name'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('client_application_name', $nullablesSetToNull, true); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + + $this->container['client_application_name'] = $client_application_name; + + return $this; + } + + /** + * Gets client_application_version + * + * @return string|null + */ + public function getClientApplicationVersion() + { + return $this->container['client_application_version']; + } + + /** + * Sets client_application_version + * + * @param string|null $client_application_version client_application_version + * + * @return self + */ + public function setClientApplicationVersion($client_application_version) + { + + if (is_null($client_application_version)) { + array_push($this->openAPINullablesSetToNull, 'client_application_version'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('client_application_version', $nullablesSetToNull, true); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + + $this->container['client_application_version'] = $client_application_version; + + return $this; + } + + /** + * Gets video_affiliate + * + * @return string|null + */ + public function getVideoAffiliate() + { + return $this->container['video_affiliate']; + } + + /** + * Sets video_affiliate + * + * @param string|null $video_affiliate video_affiliate + * + * @return self + */ + public function setVideoAffiliate($video_affiliate) + { + + if (is_null($video_affiliate)) { + array_push($this->openAPINullablesSetToNull, 'video_affiliate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('video_affiliate', $nullablesSetToNull, true); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + + $this->container['video_affiliate'] = $video_affiliate; + + return $this; + } + + /** + * Gets viewer_plan + * + * @return string|null + */ + public function getViewerPlan() + { + return $this->container['viewer_plan']; + } + + /** + * Sets viewer_plan + * + * @param string|null $viewer_plan viewer_plan + * + * @return self + */ + public function setViewerPlan($viewer_plan) + { + + if (is_null($viewer_plan)) { + array_push($this->openAPINullablesSetToNull, 'viewer_plan'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('viewer_plan', $nullablesSetToNull, true); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + + $this->container['viewer_plan'] = $viewer_plan; + + return $this; + } + + /** + * Gets viewer_plan_status + * + * @return string|null + */ + public function getViewerPlanStatus() + { + return $this->container['viewer_plan_status']; + } + + /** + * Sets viewer_plan_status + * + * @param string|null $viewer_plan_status viewer_plan_status + * + * @return self + */ + public function setViewerPlanStatus($viewer_plan_status) + { + + if (is_null($viewer_plan_status)) { + array_push($this->openAPINullablesSetToNull, 'viewer_plan_status'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('viewer_plan_status', $nullablesSetToNull, true); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + + $this->container['viewer_plan_status'] = $viewer_plan_status; + + return $this; + } + + /** + * Gets viewer_plan_category + * + * @return string|null + */ + public function getViewerPlanCategory() + { + return $this->container['viewer_plan_category']; + } + + /** + * Sets viewer_plan_category + * + * @param string|null $viewer_plan_category viewer_plan_category + * + * @return self + */ + public function setViewerPlanCategory($viewer_plan_category) + { + + if (is_null($viewer_plan_category)) { + array_push($this->openAPINullablesSetToNull, 'viewer_plan_category'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('viewer_plan_category', $nullablesSetToNull, true); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + + $this->container['viewer_plan_category'] = $viewer_plan_category; + + return $this; + } + + /** + * Gets view_drm_level + * + * @return string|null + */ + public function getViewDrmLevel() + { + return $this->container['view_drm_level']; + } + + /** + * Sets view_drm_level + * + * @param string|null $view_drm_level view_drm_level + * + * @return self + */ + public function setViewDrmLevel($view_drm_level) + { + + if (is_null($view_drm_level)) { + array_push($this->openAPINullablesSetToNull, 'view_drm_level'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('view_drm_level', $nullablesSetToNull, true); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + + $this->container['view_drm_level'] = $view_drm_level; + + return $this; + } + + /** + * Gets video_brand + * + * @return string|null + */ + public function getVideoBrand() + { + return $this->container['video_brand']; + } + + /** + * Sets video_brand + * + * @param string|null $video_brand video_brand + * + * @return self + */ + public function setVideoBrand($video_brand) + { + + if (is_null($video_brand)) { + array_push($this->openAPINullablesSetToNull, 'video_brand'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('video_brand', $nullablesSetToNull, true); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + + $this->container['video_brand'] = $video_brand; + + return $this; + } + + /** + * Gets used_pip + * + * @return bool|null + */ + public function getUsedPip() + { + return $this->container['used_pip']; + } + + /** + * Sets used_pip + * + * @param bool|null $used_pip used_pip + * + * @return self + */ + public function setUsedPip($used_pip) + { + + if (is_null($used_pip)) { + throw new \InvalidArgumentException('non-nullable used_pip cannot be null'); + } + + $this->container['used_pip'] = $used_pip; + + return $this; + } + + /** + * Gets time_shift_enabled + * + * @return bool|null + */ + public function getTimeShiftEnabled() + { + return $this->container['time_shift_enabled']; + } + + /** + * Sets time_shift_enabled + * + * @param bool|null $time_shift_enabled time_shift_enabled + * + * @return self + */ + public function setTimeShiftEnabled($time_shift_enabled) + { + + if (is_null($time_shift_enabled)) { + throw new \InvalidArgumentException('non-nullable time_shift_enabled cannot be null'); + } + + $this->container['time_shift_enabled'] = $time_shift_enabled; + + return $this; + } + + /** + * Gets used_captions + * + * @return bool|null + */ + public function getUsedCaptions() + { + return $this->container['used_captions']; + } + + /** + * Sets used_captions + * + * @param bool|null $used_captions used_captions + * + * @return self + */ + public function setUsedCaptions($used_captions) + { + + if (is_null($used_captions)) { + throw new \InvalidArgumentException('non-nullable used_captions cannot be null'); + } + + $this->container['used_captions'] = $used_captions; + + return $this; + } + + /** + * Gets video_codec + * + * @return string|null + */ + public function getVideoCodec() + { + return $this->container['video_codec']; + } + + /** + * Sets video_codec + * + * @param string|null $video_codec video_codec + * + * @return self + */ + public function setVideoCodec($video_codec) + { + + if (is_null($video_codec)) { + array_push($this->openAPINullablesSetToNull, 'video_codec'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('video_codec', $nullablesSetToNull, true); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + + $this->container['video_codec'] = $video_codec; + + return $this; + } + + /** + * Gets audio_codec + * + * @return string|null + */ + public function getAudioCodec() + { + return $this->container['audio_codec']; + } + + /** + * Sets audio_codec + * + * @param string|null $audio_codec audio_codec + * + * @return self + */ + public function setAudioCodec($audio_codec) + { + + if (is_null($audio_codec)) { + array_push($this->openAPINullablesSetToNull, 'audio_codec'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('audio_codec', $nullablesSetToNull, true); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + + $this->container['audio_codec'] = $audio_codec; + + return $this; + } + + /** + * Gets video_dynamic_range_type + * + * @return string|null + */ + public function getVideoDynamicRangeType() + { + return $this->container['video_dynamic_range_type']; + } + + /** + * Sets video_dynamic_range_type + * + * @param string|null $video_dynamic_range_type video_dynamic_range_type + * + * @return self + */ + public function setVideoDynamicRangeType($video_dynamic_range_type) + { + + if (is_null($video_dynamic_range_type)) { + array_push($this->openAPINullablesSetToNull, 'video_dynamic_range_type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('video_dynamic_range_type', $nullablesSetToNull, true); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + + $this->container['video_dynamic_range_type'] = $video_dynamic_range_type; + + return $this; + } + + /** + * Gets view_cdn_edge_pop + * + * @return string|null + */ + public function getViewCdnEdgePop() + { + return $this->container['view_cdn_edge_pop']; + } + + /** + * Sets view_cdn_edge_pop + * + * @param string|null $view_cdn_edge_pop view_cdn_edge_pop + * + * @return self + */ + public function setViewCdnEdgePop($view_cdn_edge_pop) + { + + if (is_null($view_cdn_edge_pop)) { + array_push($this->openAPINullablesSetToNull, 'view_cdn_edge_pop'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('view_cdn_edge_pop', $nullablesSetToNull, true); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + + $this->container['view_cdn_edge_pop'] = $view_cdn_edge_pop; + + return $this; + } + + /** + * Gets view_cdn_origin + * + * @return string|null + */ + public function getViewCdnOrigin() + { + return $this->container['view_cdn_origin']; + } + + /** + * Sets view_cdn_origin + * + * @param string|null $view_cdn_origin view_cdn_origin + * + * @return self + */ + public function setViewCdnOrigin($view_cdn_origin) + { + + if (is_null($view_cdn_origin)) { + array_push($this->openAPINullablesSetToNull, 'view_cdn_origin'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('view_cdn_origin', $nullablesSetToNull, true); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + + $this->container['view_cdn_origin'] = $view_cdn_origin; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/README.md b/README.md index 4f00f67..22dd7e8 100644 --- a/README.md +++ b/README.md @@ -150,9 +150,11 @@ Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *AssetsApi* | [**createAsset**](docs/Api/AssetsApi.md#createasset) | **POST** /video/v1/assets | Create an asset *AssetsApi* | [**createAssetPlaybackId**](docs/Api/AssetsApi.md#createassetplaybackid) | **POST** /video/v1/assets/{ASSET_ID}/playback-ids | Create a playback ID +*AssetsApi* | [**createAssetStaticRendition**](docs/Api/AssetsApi.md#createassetstaticrendition) | **POST** /video/v1/assets/{ASSET_ID}/static-renditions | Create a static rendition for an asset *AssetsApi* | [**createAssetTrack**](docs/Api/AssetsApi.md#createassettrack) | **POST** /video/v1/assets/{ASSET_ID}/tracks | Create an asset track *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* | [**deleteAssetStaticRendition**](docs/Api/AssetsApi.md#deleteassetstaticrendition) | **DELETE** /video/v1/assets/{ASSET_ID}/static-renditions/{STATIC_RENDITION_ID} | Delete a single static rendition for an asset *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 @@ -185,6 +187,7 @@ Class | Method | HTTP request | Description *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* | [**deleteLiveStreamStaticRenditions**](docs/Api/LiveStreamsApi.md#deletelivestreamstaticrenditions) | **DELETE** /video/v1/live-streams/{LIVE_STREAM_ID}/new-asset-settings/static-renditions | Delete a live stream's static renditions setting for new assets *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 @@ -196,6 +199,7 @@ Class | Method | HTTP request | Description *LiveStreamsApi* | [**updateLiveStream**](docs/Api/LiveStreamsApi.md#updatelivestream) | **PATCH** /video/v1/live-streams/{LIVE_STREAM_ID} | Update a live stream *LiveStreamsApi* | [**updateLiveStreamEmbeddedSubtitles**](docs/Api/LiveStreamsApi.md#updatelivestreamembeddedsubtitles) | **PUT** /video/v1/live-streams/{LIVE_STREAM_ID}/embedded-subtitles | Update a live stream's embedded subtitles *LiveStreamsApi* | [**updateLiveStreamGeneratedSubtitles**](docs/Api/LiveStreamsApi.md#updatelivestreamgeneratedsubtitles) | **PUT** /video/v1/live-streams/{LIVE_STREAM_ID}/generated-subtitles | Update a live stream's generated subtitles +*LiveStreamsApi* | [**updateLiveStreamStaticRenditions**](docs/Api/LiveStreamsApi.md#updatelivestreamstaticrenditions) | **PUT** /video/v1/live-streams/{LIVE_STREAM_ID}/new-asset-settings/static-renditions | Update live stream static renditions for new assets *MetricsApi* | [**getMetricTimeseriesData**](docs/Api/MetricsApi.md#getmetrictimeseriesdata) | **GET** /data/v1/metrics/{METRIC_ID}/timeseries | Get metric timeseries data *MetricsApi* | [**getOverallValues**](docs/Api/MetricsApi.md#getoverallvalues) | **GET** /data/v1/metrics/{METRIC_ID}/overall | Get Overall values *MetricsApi* | [**listAllMetricValues**](docs/Api/MetricsApi.md#listallmetricvalues) | **GET** /data/v1/metrics/comparison | List all metric values @@ -263,7 +267,6 @@ Class | Method | HTTP request | Description - [AssetRecordingTimes](docs/Model/AssetRecordingTimes.md) - [AssetResponse](docs/Model/AssetResponse.md) - [AssetStaticRenditions](docs/Model/AssetStaticRenditions.md) -- [AssetStaticRenditionsFiles](docs/Model/AssetStaticRenditionsFiles.md) - [BreakdownValue](docs/Model/BreakdownValue.md) - [Broadcast](docs/Model/Broadcast.md) - [BroadcastLayout](docs/Model/BroadcastLayout.md) @@ -278,6 +281,8 @@ Class | Method | HTTP request | Description - [CreatePlaybackRestrictionRequest](docs/Model/CreatePlaybackRestrictionRequest.md) - [CreateSimulcastTargetRequest](docs/Model/CreateSimulcastTargetRequest.md) - [CreateSpaceRequest](docs/Model/CreateSpaceRequest.md) +- [CreateStaticRenditionRequest](docs/Model/CreateStaticRenditionRequest.md) +- [CreateStaticRenditionResponse](docs/Model/CreateStaticRenditionResponse.md) - [CreateTrackRequest](docs/Model/CreateTrackRequest.md) - [CreateTrackResponse](docs/Model/CreateTrackResponse.md) - [CreateTranscriptionVocabularyRequest](docs/Model/CreateTranscriptionVocabularyRequest.md) @@ -393,6 +398,7 @@ Class | Method | HTTP request | Description - [SpaceStatus](docs/Model/SpaceStatus.md) - [SpaceType](docs/Model/SpaceType.md) - [StartSpaceBroadcastResponse](docs/Model/StartSpaceBroadcastResponse.md) +- [StaticRendition](docs/Model/StaticRendition.md) - [StopSpaceBroadcastResponse](docs/Model/StopSpaceBroadcastResponse.md) - [Track](docs/Model/Track.md) - [TranscriptionVocabulary](docs/Model/TranscriptionVocabulary.md) @@ -403,6 +409,7 @@ Class | Method | HTTP request | Description - [UpdateLiveStreamEmbeddedSubtitlesRequest](docs/Model/UpdateLiveStreamEmbeddedSubtitlesRequest.md) - [UpdateLiveStreamGeneratedSubtitlesRequest](docs/Model/UpdateLiveStreamGeneratedSubtitlesRequest.md) - [UpdateLiveStreamNewAssetSettings](docs/Model/UpdateLiveStreamNewAssetSettings.md) +- [UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest](docs/Model/UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest.md) - [UpdateLiveStreamRequest](docs/Model/UpdateLiveStreamRequest.md) - [UpdateReferrerDomainRestrictionRequest](docs/Model/UpdateReferrerDomainRestrictionRequest.md) - [UpdateTranscriptionVocabularyRequest](docs/Model/UpdateTranscriptionVocabularyRequest.md) @@ -443,5 +450,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.21.0` + - Package version: `3.22.0` - Build package: `org.openapitools.codegen.languages.PhpClientCodegen` diff --git a/composer.json b/composer.json index ba0cdd5..43fb6f5 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "muxinc/mux-php", - "version": "3.21.0", + "version": "3.22.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 cd2d7c1..c672ad3 100644 --- a/docs/Api/AssetsApi.md +++ b/docs/Api/AssetsApi.md @@ -6,9 +6,11 @@ All URIs are relative to https://api.mux.com, except if the operation defines an | ------------- | ------------- | ------------- | | [**createAsset()**](AssetsApi.md#createAsset) | **POST** /video/v1/assets | Create an asset | | [**createAssetPlaybackId()**](AssetsApi.md#createAssetPlaybackId) | **POST** /video/v1/assets/{ASSET_ID}/playback-ids | Create a playback ID | +| [**createAssetStaticRendition()**](AssetsApi.md#createAssetStaticRendition) | **POST** /video/v1/assets/{ASSET_ID}/static-renditions | Create a static rendition for an asset | | [**createAssetTrack()**](AssetsApi.md#createAssetTrack) | **POST** /video/v1/assets/{ASSET_ID}/tracks | Create an asset track | | [**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 | +| [**deleteAssetStaticRendition()**](AssetsApi.md#deleteAssetStaticRendition) | **DELETE** /video/v1/assets/{ASSET_ID}/static-renditions/{STATIC_RENDITION_ID} | Delete a single static rendition for an asset | | [**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 | @@ -166,6 +168,80 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) +## `createAssetStaticRendition()` + +```php +createAssetStaticRendition($asset_id, $create_static_rendition_request): \MuxPhp\Models\CreateStaticRenditionResponse +``` + +Create a static rendition for an asset + +Creates a static rendition (i.e. MP4) for an asset + +### 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. + +// This API method wants a \MuxPhp\Models\CreateStaticRenditionRequest +// 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\CreateStaticRenditionRequest" directly. +$create_static_rendition_request = json_decode('{"resolution":"highest"}',true); // \MuxPhp\Models\CreateStaticRenditionRequest + +try { + $result = $apiInstance->createAssetStaticRendition($asset_id, $create_static_rendition_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AssetsApi->createAssetStaticRendition: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **asset_id** | **string**| The asset ID. | | +| **create_static_rendition_request** | [**\MuxPhp\Models\CreateStaticRenditionRequest**](../Model/CreateStaticRenditionRequest.md)| | | + +### Return type + +[**\MuxPhp\Models\CreateStaticRenditionResponse**](../Model/CreateStaticRenditionResponse.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) + ## `createAssetTrack()` ```php @@ -364,6 +440,69 @@ void (empty response body) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) +## `deleteAssetStaticRendition()` + +```php +deleteAssetStaticRendition($asset_id, $static_rendition_id) +``` + +Delete a single static rendition for an asset + +Deletes a single static rendition for an asset + +### 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. +$static_rendition_id = 'static_rendition_id_example'; // string | The static rendition ID. + +try { + $apiInstance->deleteAssetStaticRendition($asset_id, $static_rendition_id); +} catch (Exception $e) { + echo 'Exception when calling AssetsApi->deleteAssetStaticRendition: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **asset_id** | **string**| The asset ID. | | +| **static_rendition_id** | **string**| The static rendition ID. | | + +### Return type + +void (empty response body) + +### Authorization + +[accessToken](../../README.md#accessToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + ## `deleteAssetTrack()` ```php diff --git a/docs/Api/LiveStreamsApi.md b/docs/Api/LiveStreamsApi.md index 2806275..7832394 100644 --- a/docs/Api/LiveStreamsApi.md +++ b/docs/Api/LiveStreamsApi.md @@ -10,6 +10,7 @@ All URIs are relative to https://api.mux.com, except if the operation defines an | [**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 | +| [**deleteLiveStreamStaticRenditions()**](LiveStreamsApi.md#deleteLiveStreamStaticRenditions) | **DELETE** /video/v1/live-streams/{LIVE_STREAM_ID}/new-asset-settings/static-renditions | Delete a live stream's static renditions setting for new assets | | [**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 | @@ -21,6 +22,7 @@ All URIs are relative to https://api.mux.com, except if the operation defines an | [**updateLiveStream()**](LiveStreamsApi.md#updateLiveStream) | **PATCH** /video/v1/live-streams/{LIVE_STREAM_ID} | Update a live stream | | [**updateLiveStreamEmbeddedSubtitles()**](LiveStreamsApi.md#updateLiveStreamEmbeddedSubtitles) | **PUT** /video/v1/live-streams/{LIVE_STREAM_ID}/embedded-subtitles | Update a live stream's embedded subtitles | | [**updateLiveStreamGeneratedSubtitles()**](LiveStreamsApi.md#updateLiveStreamGeneratedSubtitles) | **PUT** /video/v1/live-streams/{LIVE_STREAM_ID}/generated-subtitles | Update a live stream's generated subtitles | +| [**updateLiveStreamStaticRenditions()**](LiveStreamsApi.md#updateLiveStreamStaticRenditions) | **PUT** /video/v1/live-streams/{LIVE_STREAM_ID}/new-asset-settings/static-renditions | Update live stream static renditions for new assets | ## `createLiveStream()` @@ -430,6 +432,67 @@ void (empty response body) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) +## `deleteLiveStreamStaticRenditions()` + +```php +deleteLiveStreamStaticRenditions($live_stream_id) +``` + +Delete a live stream's static renditions setting for new assets + +Deletes a live stream's static renditions settings for new assets. Further assets made via this live stream will not create static renditions unless re-added. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new MuxPhp\Api\LiveStreamsApi( + // 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 +); +$live_stream_id = 'live_stream_id_example'; // string | The live stream ID + +try { + $apiInstance->deleteLiveStreamStaticRenditions($live_stream_id); +} catch (Exception $e) { + echo 'Exception when calling LiveStreamsApi->deleteLiveStreamStaticRenditions: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **live_stream_id** | **string**| The live stream ID | | + +### Return type + +void (empty response body) + +### Authorization + +[accessToken](../../README.md#accessToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + ## `disableLiveStream()` ```php @@ -1157,3 +1220,77 @@ try { [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) + +## `updateLiveStreamStaticRenditions()` + +```php +updateLiveStreamStaticRenditions($live_stream_id, $update_live_stream_new_asset_settings_static_renditions_request): \MuxPhp\Models\LiveStreamResponse +``` + +Update live stream static renditions for new assets + +Updates a live stream's static renditions settings for new assets. Further assets made via this live stream will create static renditions per the settings provided. You must provide all static renditions desired. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new MuxPhp\Api\LiveStreamsApi( + // 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 +); +$live_stream_id = 'live_stream_id_example'; // string | The live stream ID + +// This API method wants a \MuxPhp\Models\UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest +// 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\UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest" directly. +$update_live_stream_new_asset_settings_static_renditions_request = json_decode('{"static_renditions":[{"resolution":"audio-only"},{"resolution":"highest"}]}',true); // \MuxPhp\Models\UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest + +try { + $result = $apiInstance->updateLiveStreamStaticRenditions($live_stream_id, $update_live_stream_new_asset_settings_static_renditions_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling LiveStreamsApi->updateLiveStreamStaticRenditions: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **live_stream_id** | **string**| The live stream ID | | +| **update_live_stream_new_asset_settings_static_renditions_request** | [**\MuxPhp\Models\UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest**](../Model/UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest.md)| | | + +### Return type + +[**\MuxPhp\Models\LiveStreamResponse**](../Model/LiveStreamResponse.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) diff --git a/docs/Model/AssetStaticRenditions.md b/docs/Model/AssetStaticRenditions.md index db63127..a46c5ca 100644 --- a/docs/Model/AssetStaticRenditions.md +++ b/docs/Model/AssetStaticRenditions.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**status** | **string** | Indicates the status of downloadable MP4 versions of this asset. | [optional] [default to STATUS_DISABLED] -**files** | [**\MuxPhp\Models\AssetStaticRenditionsFiles[]**](AssetStaticRenditionsFiles.md) | Array of file objects. | [optional] +**status** | **string** | Indicates the status of downloadable MP4 versions of this asset. This field is only valid when `mp4_support` is enabled | [optional] [default to STATUS_DISABLED] +**files** | [**\MuxPhp\Models\StaticRendition[]**](StaticRendition.md) | Array of file objects. | [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/AssetStaticRenditionsFiles.md b/docs/Model/AssetStaticRenditionsFiles.md deleted file mode 100644 index b0ab7ee..0000000 --- a/docs/Model/AssetStaticRenditionsFiles.md +++ /dev/null @@ -1,14 +0,0 @@ -# # AssetStaticRenditionsFiles - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **string** | | [optional] -**ext** | **string** | Extension of the static rendition file | [optional] -**height** | **int** | The height of the static rendition's file in pixels | [optional] -**width** | **int** | The width of the static rendition's file in pixels | [optional] -**bitrate** | **int** | The bitrate in bits per second | [optional] -**filesize** | **string** | The file size in bytes | [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/CreateAssetRequest.md b/docs/Model/CreateAssetRequest.md index 27eaf34..e29bd0b 100644 --- a/docs/Model/CreateAssetRequest.md +++ b/docs/Model/CreateAssetRequest.md @@ -9,12 +9,13 @@ Name | Type | Description | Notes **advanced_playback_policies** | [**\MuxPhp\Models\CreatePlaybackIDRequest[]**](CreatePlaybackIDRequest.md) | An array of playback policy objects that you want applied to this asset and available through `playback_ids`. `advanced_playback_policies` must be used instead of `playback_policy` when creating a DRM playback ID. | [optional] **per_title_encode** | **bool** | | [optional] **passthrough** | **string** | Arbitrary user-supplied metadata that will be included in the asset details and related webhooks. Can be used to store your own ID for a video along with the asset. **Max: 255 characters**. | [optional] -**mp4_support** | **string** | Specify what level of support for mp4 playback. * The `capped-1080p` option produces a single MP4 file, called `capped-1080p.mp4`, with the video resolution capped at 1080p. This option produces an `audio.m4a` file for an audio-only asset. * The `audio-only` option produces a single M4A file, called `audio.m4a` for a video or an audio-only asset. MP4 generation will error when this option is specified for a video-only asset. * The `audio-only,capped-1080p` option produces both the `audio.m4a` and `capped-1080p.mp4` files. Only the `capped-1080p.mp4` file is produced for a video-only asset, while only the `audio.m4a` file is produced for an audio-only asset. The `standard`(deprecated) option produces up to three MP4 files with different levels of resolution (`high.mp4`, `medium.mp4`, `low.mp4`, or `audio.m4a` for an audio-only asset). MP4 files are not produced for `none` (default). In most cases you should use our default HLS-based streaming playback (`{playback_id}.m3u8`) which can automatically adjust to viewers' connection speeds, but an mp4 can be useful for some legacy devices or downloading for offline playback. See the [Download your videos guide](https://docs.mux.com/guides/enable-static-mp4-renditions) for more information. | [optional] +**mp4_support** | **string** | Specify what level of support for mp4 playback. You may not enable both `mp4_support` and `static_renditions`. * The `capped-1080p` option produces a single MP4 file, called `capped-1080p.mp4`, with the video resolution capped at 1080p. This option produces an `audio.m4a` file for an audio-only asset. * The `audio-only` option produces a single M4A file, called `audio.m4a` for a video or an audio-only asset. MP4 generation will error when this option is specified for a video-only asset. * The `audio-only,capped-1080p` option produces both the `audio.m4a` and `capped-1080p.mp4` files. Only the `capped-1080p.mp4` file is produced for a video-only asset, while only the `audio.m4a` file is produced for an audio-only asset. The `standard`(deprecated) option produces up to three MP4 files with different levels of resolution (`high.mp4`, `medium.mp4`, `low.mp4`, or `audio.m4a` for an audio-only asset). MP4 files are not produced for `none` (default). In most cases you should use our default HLS-based streaming playback (`{playback_id}.m3u8`) which can automatically adjust to viewers' connection speeds, but an mp4 can be useful for some legacy devices or downloading for offline playback. See the [Download your videos guide](https://docs.mux.com/guides/enable-static-mp4-renditions) for more information. | [optional] **normalize_audio** | **bool** | Normalize the audio track loudness level. This parameter is only applicable to on-demand (not live) assets. | [optional] [default to false] **master_access** | **string** | Specify what level (if any) of support for master access. Master access can be enabled temporarily for your asset to be downloaded. See the [Download your videos guide](https://docs.mux.com/guides/enable-static-mp4-renditions) for more information. | [optional] **test** | **bool** | Marks the asset as a test asset when the value is set to true. 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 asset are watermarked with the Mux logo, limited to 10 seconds, deleted after 24 hrs. | [optional] **max_resolution_tier** | **string** | Max resolution tier can be used to control the maximum `resolution_tier` your asset is encoded, stored, and streamed at. If not set, this defaults to `1080p`. | [optional] **encoding_tier** | **string** | This field is deprecated. Please use `video_quality` instead. The encoding tier informs the cost, quality, and available platform features for the asset. The default encoding tier for an account can be set in the Mux Dashboard. [See the video quality guide for more details.](https://docs.mux.com/guides/use-video-quality-levels) | [optional] **video_quality** | **string** | The video quality controls the cost, quality, and available platform features for the asset. The default video quality for an account can be set in the Mux Dashboard. This field replaces the deprecated `encoding_tier` value. [See the video quality guide for more details.](https://docs.mux.com/guides/use-video-quality-levels) | [optional] +**static_renditions** | [**\MuxPhp\Models\CreateStaticRenditionRequest[]**](CreateStaticRenditionRequest.md) | An array of static renditions to create for this asset. You may not enable both `static_renditions` and `mp4_support` | [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/CreateStaticRenditionRequest.md b/docs/Model/CreateStaticRenditionRequest.md new file mode 100644 index 0000000..93c9eb3 --- /dev/null +++ b/docs/Model/CreateStaticRenditionRequest.md @@ -0,0 +1,10 @@ +# # CreateStaticRenditionRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resolution** | **string** | | [optional] +**passthrough** | **string** | Arbitrary user-supplied metadata set for the static rendition. Max 255 characters. | [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/CreateStaticRenditionResponse.md b/docs/Model/CreateStaticRenditionResponse.md new file mode 100644 index 0000000..1756d94 --- /dev/null +++ b/docs/Model/CreateStaticRenditionResponse.md @@ -0,0 +1,9 @@ +# # CreateStaticRenditionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**\MuxPhp\Models\StaticRendition**](StaticRendition.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 462acdf..7589d2c 100644 --- a/docs/Model/InputSettings.md +++ b/docs/Model/InputSettings.md @@ -14,6 +14,6 @@ Name | Type | Description | Notes **language_code** | **string** | The language code value must be a valid [BCP 47](https://tools.ietf.org/html/bcp47) specification compliant value. For example, `en` for English or `en-US` for the US version of English. This parameter is required for `text` and `audio` track types. | [optional] **name** | **string** | The name of the track containing a human-readable description. This value must be unique within each group of `text` or `audio` track types. The HLS manifest will associate a subtitle text track with this value. For example, the value should be \"English\" for a subtitle text track with `language_code` set to `en`. This optional parameter should be used only for `text` and `audio` type tracks. This parameter can be optionally provided for the first video input to denote the name of the muxed audio track if present. If this parameter is not included, Mux will auto-populate based on the `input[].language_code` value. | [optional] **closed_captions** | **bool** | Indicates the track provides Subtitles for the Deaf or Hard-of-hearing (SDH). This optional parameter should be used for tracks with `type` of `text` and `text_type` set to `subtitles`. | [optional] -**passthrough** | **string** | This optional parameter should be used tracks with `type` of `text` and `text_type` set to `subtitles`. | [optional] +**passthrough** | **string** | This optional parameter should be used for tracks with `type` of `text` and `text_type` set to `subtitles`. | [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/StaticRendition.md b/docs/Model/StaticRendition.md new file mode 100644 index 0000000..356a76d --- /dev/null +++ b/docs/Model/StaticRendition.md @@ -0,0 +1,20 @@ +# # StaticRendition + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Name of the static rendition file | [optional] +**ext** | **string** | Extension of the static rendition file | [optional] +**height** | **int** | The height of the static rendition's file in pixels | [optional] +**width** | **int** | The width of the static rendition's file in pixels | [optional] +**bitrate** | **int** | The bitrate in bits per second | [optional] +**filesize** | **string** | The file size in bytes | [optional] +**type** | **string** | Indicates the static rendition type of this specific MP4 version of this asset. This field is only valid for `static_renditions`, not for `mp4_support`. | [optional] +**status** | **string** | Indicates the status of this specific MP4 version of this asset. This field is only valid for `static_renditions`, not for `mp4_support`. * `ready` indicates the MP4 has been generated and is ready for download * `preparing` indicates the asset has not been ingested or the static rendition is still being generated after an asset is ready * `skipped` indicates the static rendition will not be generated because the requested resolution conflicts with the asset attributes after the asset has been ingested * `errored` indicates the static rendition cannot be generated. For example, an asset could not be ingested | [optional] +**resolution_tier** | **string** | Indicates the resolution tier of this specific MP4 version of this asset. This field is only valid for `static_renditions`, not for `mp4_support`. | [optional] +**resolution** | **string** | Indicates the resolution of this specific MP4 version of this asset. This field is only valid for `static_renditions`, not for `mp4_support`. | [optional] +**id** | **string** | The ID of this static rendition, used in managing this static rendition. This field is only valid for `static_renditions`, not for `mp4_support`. | [optional] +**passthrough** | **string** | Arbitrary user-supplied metadata set for the static rendition. Max 255 characters. | [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/UpdateLiveStreamNewAssetSettings.md b/docs/Model/UpdateLiveStreamNewAssetSettings.md index e048c7b..f2a55b5 100644 --- a/docs/Model/UpdateLiveStreamNewAssetSettings.md +++ b/docs/Model/UpdateLiveStreamNewAssetSettings.md @@ -6,5 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **mp4_support** | **string** | Specify what level of support for mp4 playback should be added to new assets generated from this live stream. * The `none` option disables MP4 support for new assets. MP4 files will not be produced for an asset generated from this live stream. * The `capped-1080p` option produces a single MP4 file, called `capped-1080p.mp4`, with the video resolution capped at 1080p. This option produces an `audio.m4a` file for an audio-only asset. * The `audio-only` option produces a single M4A file, called `audio.m4a` for a video or an audio-only asset. MP4 generation will error when this option is specified for a video-only asset. * The `audio-only,capped-1080p` option produces both the `audio.m4a` and `capped-1080p.mp4` files. Only the `capped-1080p.mp4` file is produced for a video-only asset, while only the `audio.m4a` file is produced for an audio-only asset. * The `standard`(deprecated) option produces up to three MP4 files with different levels of resolution (`high.mp4`, `medium.mp4`, `low.mp4`, or `audio.m4a` for an audio-only asset). | [optional] **master_access** | **string** | Add or remove access to the master version of the video. | [optional] +**video_quality** | **string** | The video quality controls the cost, quality, and available platform features for the asset. [See the video quality guide for more details.](https://docs.mux.com/guides/use-video-quality-levels) | [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/UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest.md b/docs/Model/UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest.md new file mode 100644 index 0000000..1a50798 --- /dev/null +++ b/docs/Model/UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest.md @@ -0,0 +1,9 @@ +# # UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**static_renditions** | [**\MuxPhp\Models\CreateStaticRenditionRequest[]**](CreateStaticRenditionRequest.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/VideoView.md b/docs/Model/VideoView.md index b99310b..c74f683 100644 --- a/docs/Model/VideoView.md +++ b/docs/Model/VideoView.md @@ -166,5 +166,21 @@ Name | Type | Description | Notes **view_content_startup_time** | **int** | | [optional] **ad_preroll_startup_time** | **int** | | [optional] **view_dropped** | **bool** | | [optional] +**client_application_name** | **string** | | [optional] +**client_application_version** | **string** | | [optional] +**video_affiliate** | **string** | | [optional] +**viewer_plan** | **string** | | [optional] +**viewer_plan_status** | **string** | | [optional] +**viewer_plan_category** | **string** | | [optional] +**view_drm_level** | **string** | | [optional] +**video_brand** | **string** | | [optional] +**used_pip** | **bool** | | [optional] +**time_shift_enabled** | **bool** | | [optional] +**used_captions** | **bool** | | [optional] +**video_codec** | **string** | | [optional] +**audio_codec** | **string** | | [optional] +**video_dynamic_range_type** | **string** | | [optional] +**view_cdn_edge_pop** | **string** | | [optional] +**view_cdn_origin** | **string** | | [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 a7617e3..a814191 100644 --- a/gen/generator-config.json +++ b/gen/generator-config.json @@ -5,7 +5,7 @@ "apiPackage": "Api", "srcBasePath": "MuxPhp", "invokerPackage": "MuxPhp", - "artifactVersion": "3.21.0", + "artifactVersion": "3.22.0", "gitUserId": "muxinc", "gitRepoId": "mux-php" }