diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 05a61eb..f0b72ff 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -10,22 +10,16 @@ docs/AssetNonStandardInputReasons.md docs/AssetRecordingTimes.md docs/AssetResponse.md docs/AssetStaticRenditions.md -docs/AssetStaticRenditionsFiles.md docs/AssetsApi.md docs/BreakdownValue.md -docs/Broadcast.md -docs/BroadcastLayout.md -docs/BroadcastResolution.md -docs/BroadcastResponse.md -docs/BroadcastStatus.md docs/CreateAssetRequest.md -docs/CreateBroadcastRequest.md docs/CreateLiveStreamRequest.md docs/CreatePlaybackIDRequest.md docs/CreatePlaybackIDResponse.md docs/CreatePlaybackRestrictionRequest.md docs/CreateSimulcastTargetRequest.md -docs/CreateSpaceRequest.md +docs/CreateStaticRenditionRequest.md +docs/CreateStaticRenditionResponse.md docs/CreateTrackRequest.md docs/CreateTrackResponse.md docs/CreateTranscriptionVocabularyRequest.md @@ -105,7 +99,6 @@ docs/ListRealTimeDimensionsResponse.md docs/ListRealTimeMetricsResponse.md docs/ListRelatedIncidentsResponse.md docs/ListSigningKeysResponse.md -docs/ListSpacesResponse.md docs/ListTranscriptionVocabulariesResponse.md docs/ListUploadsResponse.md docs/ListVideoViewExportsResponse.md @@ -151,13 +144,7 @@ docs/SigningKeyResponse.md docs/SigningKeysApi.md docs/SimulcastTarget.md docs/SimulcastTargetResponse.md -docs/Space.md -docs/SpaceResponse.md -docs/SpaceStatus.md -docs/SpaceType.md -docs/SpacesApi.md -docs/StartSpaceBroadcastResponse.md -docs/StopSpaceBroadcastResponse.md +docs/StaticRendition.md docs/Track.md docs/TranscriptionVocabulariesApi.md docs/TranscriptionVocabulary.md @@ -169,6 +156,7 @@ docs/UpdateAssetRequest.md docs/UpdateLiveStreamEmbeddedSubtitlesRequest.md docs/UpdateLiveStreamGeneratedSubtitlesRequest.md docs/UpdateLiveStreamNewAssetSettings.md +docs/UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest.md docs/UpdateLiveStreamRequest.md docs/UpdateReferrerDomainRestrictionRequest.md docs/UpdateTranscriptionVocabularyRequest.md @@ -204,7 +192,6 @@ mux_python/api/playback_id_api.py mux_python/api/playback_restrictions_api.py mux_python/api/real_time_api.py mux_python/api/signing_keys_api.py -mux_python/api/spaces_api.py mux_python/api/transcription_vocabularies_api.py mux_python/api/url_signing_keys_api.py mux_python/api/video_views_api.py @@ -222,21 +209,15 @@ mux_python/models/asset_non_standard_input_reasons.py mux_python/models/asset_recording_times.py mux_python/models/asset_response.py mux_python/models/asset_static_renditions.py -mux_python/models/asset_static_renditions_files.py mux_python/models/breakdown_value.py -mux_python/models/broadcast.py -mux_python/models/broadcast_layout.py -mux_python/models/broadcast_resolution.py -mux_python/models/broadcast_response.py -mux_python/models/broadcast_status.py mux_python/models/create_asset_request.py -mux_python/models/create_broadcast_request.py mux_python/models/create_live_stream_request.py mux_python/models/create_playback_id_request.py mux_python/models/create_playback_id_response.py mux_python/models/create_playback_restriction_request.py mux_python/models/create_simulcast_target_request.py -mux_python/models/create_space_request.py +mux_python/models/create_static_rendition_request.py +mux_python/models/create_static_rendition_response.py mux_python/models/create_track_request.py mux_python/models/create_track_response.py mux_python/models/create_transcription_vocabulary_request.py @@ -308,7 +289,6 @@ mux_python/models/list_real_time_dimensions_response.py mux_python/models/list_real_time_metrics_response.py mux_python/models/list_related_incidents_response.py mux_python/models/list_signing_keys_response.py -mux_python/models/list_spaces_response.py mux_python/models/list_transcription_vocabularies_response.py mux_python/models/list_uploads_response.py mux_python/models/list_video_view_exports_response.py @@ -347,12 +327,7 @@ mux_python/models/signing_key.py mux_python/models/signing_key_response.py mux_python/models/simulcast_target.py mux_python/models/simulcast_target_response.py -mux_python/models/space.py -mux_python/models/space_response.py -mux_python/models/space_status.py -mux_python/models/space_type.py -mux_python/models/start_space_broadcast_response.py -mux_python/models/stop_space_broadcast_response.py +mux_python/models/static_rendition.py mux_python/models/track.py mux_python/models/transcription_vocabulary.py mux_python/models/transcription_vocabulary_response.py @@ -362,6 +337,7 @@ mux_python/models/update_asset_request.py mux_python/models/update_live_stream_embedded_subtitles_request.py mux_python/models/update_live_stream_generated_subtitles_request.py mux_python/models/update_live_stream_new_asset_settings.py +mux_python/models/update_live_stream_new_asset_settings_static_renditions_request.py mux_python/models/update_live_stream_request.py mux_python/models/update_referrer_domain_restriction_request.py mux_python/models/update_transcription_vocabulary_request.py diff --git a/docs/AssetStaticRenditions.md b/docs/AssetStaticRenditions.md index fd7f0a4..1d64620 100644 --- a/docs/AssetStaticRenditions.md +++ b/docs/AssetStaticRenditions.md @@ -4,8 +4,8 @@ An object containing the current status of any static renditions (mp4s). The obj ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**status** | **str** | Indicates the status of downloadable MP4 versions of this asset. | [optional] [default to 'disabled'] -**files** | [**list[AssetStaticRenditionsFiles]**](AssetStaticRenditionsFiles.md) | Array of file objects. | [optional] +**status** | **str** | Indicates the status of downloadable MP4 versions of this asset. This field is only valid when `mp4_support` is enabled | [optional] [default to 'disabled'] +**files** | [**list[StaticRendition]**](StaticRendition.md) | Array of file objects. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssetStaticRenditionsFiles.md b/docs/AssetStaticRenditionsFiles.md deleted file mode 100644 index a61d8eb..0000000 --- a/docs/AssetStaticRenditionsFiles.md +++ /dev/null @@ -1,15 +0,0 @@ -# AssetStaticRenditionsFiles - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | [optional] -**ext** | **str** | 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** | **str** | The file size in bytes | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AssetsApi.md b/docs/AssetsApi.md index 48e4b04..b552ae5 100644 --- a/docs/AssetsApi.md +++ b/docs/AssetsApi.md @@ -6,9 +6,11 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**create_asset**](AssetsApi.md#create_asset) | **POST** /video/v1/assets | Create an asset [**create_asset_playback_id**](AssetsApi.md#create_asset_playback_id) | **POST** /video/v1/assets/{ASSET_ID}/playback-ids | Create a playback ID +[**create_asset_static_rendition**](AssetsApi.md#create_asset_static_rendition) | **POST** /video/v1/assets/{ASSET_ID}/static-renditions | Create a static rendition for an asset [**create_asset_track**](AssetsApi.md#create_asset_track) | **POST** /video/v1/assets/{ASSET_ID}/tracks | Create an asset track [**delete_asset**](AssetsApi.md#delete_asset) | **DELETE** /video/v1/assets/{ASSET_ID} | Delete an asset [**delete_asset_playback_id**](AssetsApi.md#delete_asset_playback_id) | **DELETE** /video/v1/assets/{ASSET_ID}/playback-ids/{PLAYBACK_ID} | Delete a playback ID +[**delete_asset_static_rendition**](AssetsApi.md#delete_asset_static_rendition) | **DELETE** /video/v1/assets/{ASSET_ID}/static-renditions/{STATIC_RENDITION_ID} | Delete a single static rendition for an asset [**delete_asset_track**](AssetsApi.md#delete_asset_track) | **DELETE** /video/v1/assets/{ASSET_ID}/tracks/{TRACK_ID} | Delete an asset track [**generate_asset_track_subtitles**](AssetsApi.md#generate_asset_track_subtitles) | **POST** /video/v1/assets/{ASSET_ID}/tracks/{TRACK_ID}/generate-subtitles | Generate track subtitles [**get_asset**](AssetsApi.md#get_asset) | **GET** /video/v1/assets/{ASSET_ID} | Retrieve an asset @@ -168,6 +170,81 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **create_asset_static_rendition** +> CreateStaticRenditionResponse create_asset_static_rendition(asset_id, create_static_rendition_request) + +Create a static rendition for an asset + +Creates a static rendition (i.e. MP4) for an asset + +### Example + +* Basic Authentication (accessToken): +```python +from __future__ import print_function +import time +import mux_python +from mux_python.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://api.mux.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mux_python.Configuration( + host = "https://api.mux.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: accessToken +configuration = mux_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with mux_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mux_python.AssetsApi(api_client) + asset_id = 'asset_id_example' # str | The asset ID. +create_static_rendition_request = {"resolution":"highest"} # CreateStaticRenditionRequest | + + try: + # Create a static rendition for an asset + api_response = api_instance.create_asset_static_rendition(asset_id, create_static_rendition_request) + pprint(api_response) + except ApiException as e: + print("Exception when calling AssetsApi->create_asset_static_rendition: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **asset_id** | **str**| The asset ID. | + **create_static_rendition_request** | [**CreateStaticRenditionRequest**](CreateStaticRenditionRequest.md)| | + +### Return type + +[**CreateStaticRenditionResponse**](CreateStaticRenditionResponse.md) + +### Authorization + +[accessToken](../README.md#accessToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **create_asset_track** > CreateTrackResponse create_asset_track(asset_id, create_track_request) @@ -389,6 +466,80 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **delete_asset_static_rendition** +> delete_asset_static_rendition(asset_id, static_rendition_id) + +Delete a single static rendition for an asset + +Deletes a single static rendition for an asset + +### Example + +* Basic Authentication (accessToken): +```python +from __future__ import print_function +import time +import mux_python +from mux_python.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://api.mux.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mux_python.Configuration( + host = "https://api.mux.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: accessToken +configuration = mux_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with mux_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mux_python.AssetsApi(api_client) + asset_id = 'asset_id_example' # str | The asset ID. +static_rendition_id = 'static_rendition_id_example' # str | The static rendition ID. + + try: + # Delete a single static rendition for an asset + api_instance.delete_asset_static_rendition(asset_id, static_rendition_id) + except ApiException as e: + print("Exception when calling AssetsApi->delete_asset_static_rendition: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **asset_id** | **str**| The asset ID. | + **static_rendition_id** | **str**| 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 + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **delete_asset_track** > delete_asset_track(asset_id, track_id) @@ -995,7 +1146,7 @@ Name | Type | Description | Notes Update MP4 support -Allows you to add or remove mp4 support for assets that were created without it. The values supported are `capped-1080p`, `audio-only`, `audio-only,capped-1080p`, `standard`(deprecated), and `none`. `none` means that an asset *does not* have mp4 support, so submitting a request with `mp4_support` set to `none` will delete the mp4 assets from the asset in question. +This method has been deprecated. Please see the [Static Rendition API](https://www.mux.com/docs/guides/enable-static-mp4-renditions#after-asset-creation). Allows you to add or remove mp4 support for assets that were created without it. The values supported are `capped-1080p`, `audio-only`, `audio-only,capped-1080p`, `standard`(deprecated), and `none`. `none` means that an asset *does not* have mp4 support, so submitting a request with `mp4_support` set to `none` will delete the mp4 assets from the asset in question. ### Example diff --git a/docs/Broadcast.md b/docs/Broadcast.md deleted file mode 100644 index 0495516..0000000 --- a/docs/Broadcast.md +++ /dev/null @@ -1,16 +0,0 @@ -# Broadcast - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for the broadcast. Max 255 characters. | -**passthrough** | **str** | Arbitrary user-supplied metadata that will be included in the broadcast details and related webhooks. Max: 255 characters. | [optional] -**live_stream_id** | **str** | The ID of the live stream that the broadcast will be sent to. | -**status** | [**BroadcastStatus**](BroadcastStatus.md) | | -**layout** | [**BroadcastLayout**](BroadcastLayout.md) | | -**background** | **str** | URL of an image to display as the background of the broadcast. Its dimensions should match the provided resolution. | [optional] -**resolution** | [**BroadcastResolution**](BroadcastResolution.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/BroadcastLayout.md b/docs/BroadcastLayout.md deleted file mode 100644 index 057606a..0000000 --- a/docs/BroadcastLayout.md +++ /dev/null @@ -1,10 +0,0 @@ -# BroadcastLayout - -The layout used when broadcasting the space. The `gallery` layout will show participants in a grid that automatically resizes each participant’s stream to best fit up to 10 participants in the window. The `active-speaker` layout will show only the current active speaker, without a border. The `crop` layout uses as much of the available space as possible to show the participant's stream. Defaults to `gallery` if not set. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/BroadcastResolution.md b/docs/BroadcastResolution.md deleted file mode 100644 index 35da16a..0000000 --- a/docs/BroadcastResolution.md +++ /dev/null @@ -1,10 +0,0 @@ -# BroadcastResolution - -The resolution of the composited video sent to the live stream. Defaults to `1920x1080` if not set. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CreateAssetRequest.md b/docs/CreateAssetRequest.md index 053e10c..658a4fa 100644 --- a/docs/CreateAssetRequest.md +++ b/docs/CreateAssetRequest.md @@ -8,13 +8,14 @@ Name | Type | Description | Notes **advanced_playback_policies** | [**list[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** | **str** | 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** | **str** | 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** | **str** | Deprecated. See the [Static Renditions API](https://www.mux.com/docs/guides/enable-static-mp4-renditions) for the updated API. 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** | **str** | 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** | **str** | 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** | **str** | 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** | **str** | 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** | [**list[CreateStaticRenditionRequest]**](CreateStaticRenditionRequest.md) | An array of static renditions to create for this asset. You may not enable both `static_renditions` and `mp4_support (the latter being deprecated)` | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateBroadcastRequest.md b/docs/CreateBroadcastRequest.md deleted file mode 100644 index 8aa9058..0000000 --- a/docs/CreateBroadcastRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# CreateBroadcastRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**passthrough** | **str** | Arbitrary user-supplied metadata that will be included in the broadcast details and related webhooks. Max: 255 characters. | [optional] -**live_stream_id** | **str** | The ID of the live stream that you want to broadcast to. | -**layout** | [**BroadcastLayout**](BroadcastLayout.md) | | [optional] -**background** | **str** | URL of an image to display as the background of the broadcast. Its dimensions should match the provided resolution. | [optional] -**resolution** | [**BroadcastResolution**](BroadcastResolution.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CreateSpaceRequest.md b/docs/CreateSpaceRequest.md deleted file mode 100644 index 600d3d1..0000000 --- a/docs/CreateSpaceRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateSpaceRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**SpaceType**](SpaceType.md) | | [optional] -**passthrough** | **str** | Arbitrary user-supplied metadata that will be included in the space details and related webhooks. Max: 255 characters. | [optional] -**broadcasts** | [**list[CreateBroadcastRequest]**](CreateBroadcastRequest.md) | An array of broadcast destinations you want to stream the space to. **Note:** By default only a single broadcast destination can be specified. Contact Mux support if you need more. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/BroadcastResponse.md b/docs/CreateStaticRenditionRequest.md similarity index 58% rename from docs/BroadcastResponse.md rename to docs/CreateStaticRenditionRequest.md index 2641270..31c1543 100644 --- a/docs/BroadcastResponse.md +++ b/docs/CreateStaticRenditionRequest.md @@ -1,9 +1,10 @@ -# BroadcastResponse +# CreateStaticRenditionRequest ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**Broadcast**](Broadcast.md) | | +**resolution** | **str** | | [optional] +**passthrough** | **str** | Arbitrary user-supplied metadata set for the static rendition. Max 255 characters. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/StartSpaceBroadcastResponse.md b/docs/CreateStaticRenditionResponse.md similarity index 73% rename from docs/StartSpaceBroadcastResponse.md rename to docs/CreateStaticRenditionResponse.md index 775a48f..959c2b4 100644 --- a/docs/StartSpaceBroadcastResponse.md +++ b/docs/CreateStaticRenditionResponse.md @@ -1,9 +1,9 @@ -# StartSpaceBroadcastResponse +# CreateStaticRenditionResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | **object** | | [optional] +**data** | [**StaticRendition**](StaticRendition.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InputSettings.md b/docs/InputSettings.md index cf7e5c3..a2cad62 100644 --- a/docs/InputSettings.md +++ b/docs/InputSettings.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes **language_code** | **str** | 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** | **str** | 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** | **str** | This optional parameter should be used tracks with `type` of `text` and `text_type` set to `subtitles`. | [optional] +**passthrough** | **str** | 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#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ListSpacesResponse.md b/docs/ListSpacesResponse.md deleted file mode 100644 index c7c4e9c..0000000 --- a/docs/ListSpacesResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# ListSpacesResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**list[Space]**](Space.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/LiveStreamsApi.md b/docs/LiveStreamsApi.md index 292d02c..80d22c2 100644 --- a/docs/LiveStreamsApi.md +++ b/docs/LiveStreamsApi.md @@ -8,6 +8,7 @@ Method | HTTP request | Description [**create_live_stream_playback_id**](LiveStreamsApi.md#create_live_stream_playback_id) | **POST** /video/v1/live-streams/{LIVE_STREAM_ID}/playback-ids | Create a live stream playback ID [**create_live_stream_simulcast_target**](LiveStreamsApi.md#create_live_stream_simulcast_target) | **POST** /video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets | Create a live stream simulcast target [**delete_live_stream**](LiveStreamsApi.md#delete_live_stream) | **DELETE** /video/v1/live-streams/{LIVE_STREAM_ID} | Delete a live stream +[**delete_live_stream_new_asset_settings_static_renditions**](LiveStreamsApi.md#delete_live_stream_new_asset_settings_static_renditions) | **DELETE** /video/v1/live-streams/{LIVE_STREAM_ID}/new-asset-settings/static-renditions | Delete a live stream's static renditions setting for new assets [**delete_live_stream_playback_id**](LiveStreamsApi.md#delete_live_stream_playback_id) | **DELETE** /video/v1/live-streams/{LIVE_STREAM_ID}/playback-ids/{PLAYBACK_ID} | Delete a live stream playback ID [**delete_live_stream_simulcast_target**](LiveStreamsApi.md#delete_live_stream_simulcast_target) | **DELETE** /video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets/{SIMULCAST_TARGET_ID} | Delete a live stream simulcast target [**disable_live_stream**](LiveStreamsApi.md#disable_live_stream) | **PUT** /video/v1/live-streams/{LIVE_STREAM_ID}/disable | Disable a live stream @@ -21,6 +22,7 @@ Method | HTTP request | Description [**update_live_stream**](LiveStreamsApi.md#update_live_stream) | **PATCH** /video/v1/live-streams/{LIVE_STREAM_ID} | Update a live stream [**update_live_stream_embedded_subtitles**](LiveStreamsApi.md#update_live_stream_embedded_subtitles) | **PUT** /video/v1/live-streams/{LIVE_STREAM_ID}/embedded-subtitles | Update a live stream's embedded subtitles [**update_live_stream_generated_subtitles**](LiveStreamsApi.md#update_live_stream_generated_subtitles) | **PUT** /video/v1/live-streams/{LIVE_STREAM_ID}/generated-subtitles | Update a live stream's generated subtitles +[**update_live_stream_new_asset_settings_static_renditions**](LiveStreamsApi.md#update_live_stream_new_asset_settings_static_renditions) | **PUT** /video/v1/live-streams/{LIVE_STREAM_ID}/new-asset-settings/static-renditions | Update live stream static renditions for new assets # **create_live_stream** @@ -318,6 +320,78 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **delete_live_stream_new_asset_settings_static_renditions** +> delete_live_stream_new_asset_settings_static_renditions(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 + +* Basic Authentication (accessToken): +```python +from __future__ import print_function +import time +import mux_python +from mux_python.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://api.mux.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mux_python.Configuration( + host = "https://api.mux.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: accessToken +configuration = mux_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with mux_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mux_python.LiveStreamsApi(api_client) + live_stream_id = 'live_stream_id_example' # str | The live stream ID + + try: + # Delete a live stream's static renditions setting for new assets + api_instance.delete_live_stream_new_asset_settings_static_renditions(live_stream_id) + except ApiException as e: + print("Exception when calling LiveStreamsApi->delete_live_stream_new_asset_settings_static_renditions: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **live_stream_id** | **str**| 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 + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **delete_live_stream_playback_id** > delete_live_stream_playback_id(live_stream_id, playback_id) @@ -1285,3 +1359,78 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **update_live_stream_new_asset_settings_static_renditions** +> LiveStreamResponse update_live_stream_new_asset_settings_static_renditions(live_stream_id, update_live_stream_new_asset_settings_static_renditions_request) + +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 + +* Basic Authentication (accessToken): +```python +from __future__ import print_function +import time +import mux_python +from mux_python.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://api.mux.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mux_python.Configuration( + host = "https://api.mux.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: accessToken +configuration = mux_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with mux_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mux_python.LiveStreamsApi(api_client) + live_stream_id = 'live_stream_id_example' # str | The live stream ID +update_live_stream_new_asset_settings_static_renditions_request = {"static_renditions":[{"resolution":"audio-only"},{"resolution":"highest"}]} # UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest | + + try: + # Update live stream static renditions for new assets + api_response = api_instance.update_live_stream_new_asset_settings_static_renditions(live_stream_id, update_live_stream_new_asset_settings_static_renditions_request) + pprint(api_response) + except ApiException as e: + print("Exception when calling LiveStreamsApi->update_live_stream_new_asset_settings_static_renditions: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **live_stream_id** | **str**| The live stream ID | + **update_live_stream_new_asset_settings_static_renditions_request** | [**UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest**](UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest.md)| | + +### Return type + +[**LiveStreamResponse**](LiveStreamResponse.md) + +### Authorization + +[accessToken](../README.md#accessToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/Space.md b/docs/Space.md deleted file mode 100644 index 31cbd2f..0000000 --- a/docs/Space.md +++ /dev/null @@ -1,16 +0,0 @@ -# Space - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique identifier for the space. Max 255 characters. | -**created_at** | **str** | Time the space was created, defined as a Unix timestamp (seconds since epoch). | -**type** | [**SpaceType**](SpaceType.md) | | -**status** | [**SpaceStatus**](SpaceStatus.md) | | -**passthrough** | **str** | Arbitrary user-supplied metadata that will be included in the space details and related webhooks. Max: 255 characters. | [optional] -**broadcasts** | [**list[Broadcast]**](Broadcast.md) | An array of broadcast destinations. | [optional] -**active_session_id** | **str** | Unique identifier for the current lifecycle of the space. Only set when the space is `active` and is set to a new value each time the space transitions from `idle` to `active`. This value is useful for logging and debugging issues. Max 255 characters. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SpaceResponse.md b/docs/SpaceResponse.md deleted file mode 100644 index b53b45a..0000000 --- a/docs/SpaceResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# SpaceResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**Space**](Space.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SpaceStatus.md b/docs/SpaceStatus.md deleted file mode 100644 index db2ce31..0000000 --- a/docs/SpaceStatus.md +++ /dev/null @@ -1,10 +0,0 @@ -# SpaceStatus - -The status of the space. Spaces are `idle` when there are no participants connected, and `active` when there are participants connected. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SpaceType.md b/docs/SpaceType.md deleted file mode 100644 index 63d3025..0000000 --- a/docs/SpaceType.md +++ /dev/null @@ -1,10 +0,0 @@ -# SpaceType - -Specify the network architecture of the space. In `server` spaces, all video travels through Mux's video infrastructure. Defaults to `server` if not set. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SpacesApi.md b/docs/SpacesApi.md deleted file mode 100644 index e77d71c..0000000 --- a/docs/SpacesApi.md +++ /dev/null @@ -1,684 +0,0 @@ -# mux_python.SpacesApi - -All URIs are relative to *https://api.mux.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_space**](SpacesApi.md#create_space) | **POST** /video/v1/spaces | Create a space -[**create_space_broadcast**](SpacesApi.md#create_space_broadcast) | **POST** /video/v1/spaces/{SPACE_ID}/broadcasts | Create a space broadcast -[**delete_space**](SpacesApi.md#delete_space) | **DELETE** /video/v1/spaces/{SPACE_ID} | Delete a space -[**delete_space_broadcast**](SpacesApi.md#delete_space_broadcast) | **DELETE** /video/v1/spaces/{SPACE_ID}/broadcasts/{BROADCAST_ID} | Delete a space broadcast -[**get_space**](SpacesApi.md#get_space) | **GET** /video/v1/spaces/{SPACE_ID} | Retrieve a space -[**get_space_broadcast**](SpacesApi.md#get_space_broadcast) | **GET** /video/v1/spaces/{SPACE_ID}/broadcasts/{BROADCAST_ID} | Retrieve space broadcast -[**list_spaces**](SpacesApi.md#list_spaces) | **GET** /video/v1/spaces | List spaces -[**start_space_broadcast**](SpacesApi.md#start_space_broadcast) | **POST** /video/v1/spaces/{SPACE_ID}/broadcasts/{BROADCAST_ID}/start | Start a space broadcast -[**stop_space_broadcast**](SpacesApi.md#stop_space_broadcast) | **POST** /video/v1/spaces/{SPACE_ID}/broadcasts/{BROADCAST_ID}/stop | Stop a space broadcast - - -# **create_space** -> SpaceResponse create_space(create_space_request) - -Create a space - -Create a new space. Spaces are used to build [real-time video applications.](https://mux.com/real-time-video) - -### Example - -* Basic Authentication (accessToken): -```python -from __future__ import print_function -import time -import mux_python -from mux_python.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.mux.com -# See configuration.py for a list of all supported configuration parameters. -configuration = mux_python.Configuration( - host = "https://api.mux.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: accessToken -configuration = mux_python.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Enter a context with an instance of the API client -with mux_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = mux_python.SpacesApi(api_client) - create_space_request = {"type":"server"} # CreateSpaceRequest | - - try: - # Create a space - api_response = api_instance.create_space(create_space_request) - pprint(api_response) - except ApiException as e: - print("Exception when calling SpacesApi->create_space: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **create_space_request** | [**CreateSpaceRequest**](CreateSpaceRequest.md)| | - -### Return type - -[**SpaceResponse**](SpaceResponse.md) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | Space Created | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **create_space_broadcast** -> BroadcastResponse create_space_broadcast(space_id, create_broadcast_request) - -Create a space broadcast - -Creates a new broadcast. Broadcasts are used to create composited versions of your space, which can be broadcast to live streams. **Note:** By default only a single broadcast destination can be specified. Contact Mux support if you need more. - -### Example - -* Basic Authentication (accessToken): -```python -from __future__ import print_function -import time -import mux_python -from mux_python.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.mux.com -# See configuration.py for a list of all supported configuration parameters. -configuration = mux_python.Configuration( - host = "https://api.mux.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: accessToken -configuration = mux_python.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Enter a context with an instance of the API client -with mux_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = mux_python.SpacesApi(api_client) - space_id = 'space_id_example' # str | The space ID. -create_broadcast_request = {"live_stream_id":"GQ9025mPqzyjOy3kKQW006qKTqmULW9vFO"} # CreateBroadcastRequest | - - try: - # Create a space broadcast - api_response = api_instance.create_space_broadcast(space_id, create_broadcast_request) - pprint(api_response) - except ApiException as e: - print("Exception when calling SpacesApi->create_space_broadcast: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **space_id** | **str**| The space ID. | - **create_broadcast_request** | [**CreateBroadcastRequest**](CreateBroadcastRequest.md)| | - -### Return type - -[**BroadcastResponse**](BroadcastResponse.md) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | Broadcast Created | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **delete_space** -> delete_space(space_id) - -Delete a space - -Deletes a space. Spaces can only be deleted when `idle`. - -### Example - -* Basic Authentication (accessToken): -```python -from __future__ import print_function -import time -import mux_python -from mux_python.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.mux.com -# See configuration.py for a list of all supported configuration parameters. -configuration = mux_python.Configuration( - host = "https://api.mux.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: accessToken -configuration = mux_python.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Enter a context with an instance of the API client -with mux_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = mux_python.SpacesApi(api_client) - space_id = 'space_id_example' # str | The space ID. - - try: - # Delete a space - api_instance.delete_space(space_id) - except ApiException as e: - print("Exception when calling SpacesApi->delete_space: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **space_id** | **str**| The space ID. | - -### Return type - -void (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | No Content | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **delete_space_broadcast** -> delete_space_broadcast(space_id, broadcast_id) - -Delete a space broadcast - -Deletes a single broadcast of a specific space. Broadcasts can only be deleted when `idle`. - -### Example - -* Basic Authentication (accessToken): -```python -from __future__ import print_function -import time -import mux_python -from mux_python.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.mux.com -# See configuration.py for a list of all supported configuration parameters. -configuration = mux_python.Configuration( - host = "https://api.mux.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: accessToken -configuration = mux_python.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Enter a context with an instance of the API client -with mux_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = mux_python.SpacesApi(api_client) - space_id = 'space_id_example' # str | The space ID. -broadcast_id = 'broadcast_id_example' # str | The broadcast ID. - - try: - # Delete a space broadcast - api_instance.delete_space_broadcast(space_id, broadcast_id) - except ApiException as e: - print("Exception when calling SpacesApi->delete_space_broadcast: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **space_id** | **str**| The space ID. | - **broadcast_id** | **str**| The broadcast ID. | - -### Return type - -void (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | No Content | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_space** -> SpaceResponse get_space(space_id) - -Retrieve a space - -Retrieves the details of a space that has previously been created. Supply the unique space ID that was returned from your create space request, and Mux will return the information about the corresponding space. The same information is returned when creating a space. - -### Example - -* Basic Authentication (accessToken): -```python -from __future__ import print_function -import time -import mux_python -from mux_python.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.mux.com -# See configuration.py for a list of all supported configuration parameters. -configuration = mux_python.Configuration( - host = "https://api.mux.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: accessToken -configuration = mux_python.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Enter a context with an instance of the API client -with mux_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = mux_python.SpacesApi(api_client) - space_id = 'space_id_example' # str | The space ID. - - try: - # Retrieve a space - api_response = api_instance.get_space(space_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling SpacesApi->get_space: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **space_id** | **str**| The space ID. | - -### Return type - -[**SpaceResponse**](SpaceResponse.md) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_space_broadcast** -> BroadcastResponse get_space_broadcast(space_id, broadcast_id) - -Retrieve space broadcast - -Retrieves the details of a broadcast of a specific space. - -### Example - -* Basic Authentication (accessToken): -```python -from __future__ import print_function -import time -import mux_python -from mux_python.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.mux.com -# See configuration.py for a list of all supported configuration parameters. -configuration = mux_python.Configuration( - host = "https://api.mux.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: accessToken -configuration = mux_python.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Enter a context with an instance of the API client -with mux_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = mux_python.SpacesApi(api_client) - space_id = 'space_id_example' # str | The space ID. -broadcast_id = 'broadcast_id_example' # str | The broadcast ID. - - try: - # Retrieve space broadcast - api_response = api_instance.get_space_broadcast(space_id, broadcast_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling SpacesApi->get_space_broadcast: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **space_id** | **str**| The space ID. | - **broadcast_id** | **str**| The broadcast ID. | - -### Return type - -[**BroadcastResponse**](BroadcastResponse.md) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_spaces** -> ListSpacesResponse list_spaces(limit=limit, page=page) - -List spaces - -List all spaces in the current environment. - -### Example - -* Basic Authentication (accessToken): -```python -from __future__ import print_function -import time -import mux_python -from mux_python.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.mux.com -# See configuration.py for a list of all supported configuration parameters. -configuration = mux_python.Configuration( - host = "https://api.mux.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: accessToken -configuration = mux_python.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Enter a context with an instance of the API client -with mux_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = mux_python.SpacesApi(api_client) - limit = 25 # int | Number of items to include in the response (optional) (default to 25) -page = 1 # int | Offset by this many pages, of the size of `limit` (optional) (default to 1) - - try: - # List spaces - api_response = api_instance.list_spaces(limit=limit, page=page) - pprint(api_response) - except ApiException as e: - print("Exception when calling SpacesApi->list_spaces: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **limit** | **int**| Number of items to include in the response | [optional] [default to 25] - **page** | **int**| Offset by this many pages, of the size of `limit` | [optional] [default to 1] - -### Return type - -[**ListSpacesResponse**](ListSpacesResponse.md) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **start_space_broadcast** -> StartSpaceBroadcastResponse start_space_broadcast(space_id, broadcast_id) - -Start a space broadcast - -Starts broadcasting a space to the associated destination. Broadcasts can only be started when the space is `active` (when there are participants connected). - -### Example - -* Basic Authentication (accessToken): -```python -from __future__ import print_function -import time -import mux_python -from mux_python.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.mux.com -# See configuration.py for a list of all supported configuration parameters. -configuration = mux_python.Configuration( - host = "https://api.mux.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: accessToken -configuration = mux_python.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Enter a context with an instance of the API client -with mux_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = mux_python.SpacesApi(api_client) - space_id = 'space_id_example' # str | The space ID. -broadcast_id = 'broadcast_id_example' # str | The broadcast ID. - - try: - # Start a space broadcast - api_response = api_instance.start_space_broadcast(space_id, broadcast_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling SpacesApi->start_space_broadcast: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **space_id** | **str**| The space ID. | - **broadcast_id** | **str**| The broadcast ID. | - -### Return type - -[**StartSpaceBroadcastResponse**](StartSpaceBroadcastResponse.md) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stop_space_broadcast** -> StopSpaceBroadcastResponse stop_space_broadcast(space_id, broadcast_id) - -Stop a space broadcast - -Stops broadcasting a space, causing the destination live stream to become idle. This API also automatically calls `complete` on the destination live stream. Broadcasts are also automatically stopped when a space becomes idle. - -### Example - -* Basic Authentication (accessToken): -```python -from __future__ import print_function -import time -import mux_python -from mux_python.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://api.mux.com -# See configuration.py for a list of all supported configuration parameters. -configuration = mux_python.Configuration( - host = "https://api.mux.com" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: accessToken -configuration = mux_python.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Enter a context with an instance of the API client -with mux_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = mux_python.SpacesApi(api_client) - space_id = 'space_id_example' # str | The space ID. -broadcast_id = 'broadcast_id_example' # str | The broadcast ID. - - try: - # Stop a space broadcast - api_response = api_instance.stop_space_broadcast(space_id, broadcast_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling SpacesApi->stop_space_broadcast: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **space_id** | **str**| The space ID. | - **broadcast_id** | **str**| The broadcast ID. | - -### Return type - -[**StopSpaceBroadcastResponse**](StopSpaceBroadcastResponse.md) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/StaticRendition.md b/docs/StaticRendition.md new file mode 100644 index 0000000..ade36e3 --- /dev/null +++ b/docs/StaticRendition.md @@ -0,0 +1,21 @@ +# StaticRendition + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of the static rendition file | [optional] +**ext** | **str** | 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** | **str** | The file size in bytes | [optional] +**type** | **str** | 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** | **str** | 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** | **str** | 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** | **str** | 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** | **str** | 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** | **str** | Arbitrary user-supplied metadata set for the static rendition. Max 255 characters. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StopSpaceBroadcastResponse.md b/docs/StopSpaceBroadcastResponse.md deleted file mode 100644 index 8264aed..0000000 --- a/docs/StopSpaceBroadcastResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# StopSpaceBroadcastResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | **object** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UpdateLiveStreamNewAssetSettings.md b/docs/UpdateLiveStreamNewAssetSettings.md index 0c09105..211e870 100644 --- a/docs/UpdateLiveStreamNewAssetSettings.md +++ b/docs/UpdateLiveStreamNewAssetSettings.md @@ -1,11 +1,12 @@ # UpdateLiveStreamNewAssetSettings -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. +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. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**mp4_support** | **str** | 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] +**mp4_support** | **str** | Deprecated. See the [Static Renditions API](https://www.mux.com/docs/guides/enable-static-mp4-renditions#during-live-stream-creation) for the updated API. 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** | **str** | Add or remove access to the master version of the video. | [optional] +**video_quality** | **str** | 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#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BroadcastStatus.md b/docs/UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest.md similarity index 61% rename from docs/BroadcastStatus.md rename to docs/UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest.md index a561997..c7d675a 100644 --- a/docs/BroadcastStatus.md +++ b/docs/UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest.md @@ -1,9 +1,9 @@ -# BroadcastStatus +# UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest -The status of the broadcast. You can start and stop broadcasts with the `start` and `stop` APIs. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**static_renditions** | [**list[CreateStaticRenditionRequest]**](CreateStaticRenditionRequest.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/VideoView.md b/docs/VideoView.md index 567b0a0..3f4f66b 100644 --- a/docs/VideoView.md +++ b/docs/VideoView.md @@ -165,6 +165,22 @@ Name | Type | Description | Notes **view_content_startup_time** | **int** | | [optional] **ad_preroll_startup_time** | **int** | | [optional] **view_dropped** | **bool** | | [optional] +**client_application_name** | **str** | | [optional] +**client_application_version** | **str** | | [optional] +**video_affiliate** | **str** | | [optional] +**viewer_plan** | **str** | | [optional] +**viewer_plan_status** | **str** | | [optional] +**viewer_plan_category** | **str** | | [optional] +**view_drm_level** | **str** | | [optional] +**video_brand** | **str** | | [optional] +**used_pip** | **bool** | | [optional] +**time_shift_enabled** | **bool** | | [optional] +**used_captions** | **bool** | | [optional] +**video_codec** | **str** | | [optional] +**audio_codec** | **str** | | [optional] +**video_dynamic_range_type** | **str** | | [optional] +**view_cdn_edge_pop** | **str** | | [optional] +**view_cdn_origin** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/gen/generator-config.json b/gen/generator-config.json index cb4a1c0..be295aa 100644 --- a/gen/generator-config.json +++ b/gen/generator-config.json @@ -3,5 +3,5 @@ "packageName": "mux_python", "projectName": "mux_python", "licenseInfo" : "MIT", - "packageVersion": "3.20.0" + "packageVersion": "4.0.0" } diff --git a/mux_python/__init__.py b/mux_python/__init__.py index 11861fb..d98e113 100644 --- a/mux_python/__init__.py +++ b/mux_python/__init__.py @@ -15,7 +15,7 @@ from __future__ import absolute_import -__version__ = "3.20.0" +__version__ = "4.0.0" # import apis into sdk package from mux_python.api.assets_api import AssetsApi @@ -34,7 +34,6 @@ from mux_python.api.playback_restrictions_api import PlaybackRestrictionsApi from mux_python.api.real_time_api import RealTimeApi from mux_python.api.signing_keys_api import SigningKeysApi -from mux_python.api.spaces_api import SpacesApi from mux_python.api.transcription_vocabularies_api import TranscriptionVocabulariesApi from mux_python.api.url_signing_keys_api import URLSigningKeysApi from mux_python.api.video_views_api import VideoViewsApi @@ -59,21 +58,15 @@ from mux_python.models.asset_recording_times import AssetRecordingTimes from mux_python.models.asset_response import AssetResponse from mux_python.models.asset_static_renditions import AssetStaticRenditions -from mux_python.models.asset_static_renditions_files import AssetStaticRenditionsFiles from mux_python.models.breakdown_value import BreakdownValue -from mux_python.models.broadcast import Broadcast -from mux_python.models.broadcast_layout import BroadcastLayout -from mux_python.models.broadcast_resolution import BroadcastResolution -from mux_python.models.broadcast_response import BroadcastResponse -from mux_python.models.broadcast_status import BroadcastStatus from mux_python.models.create_asset_request import CreateAssetRequest -from mux_python.models.create_broadcast_request import CreateBroadcastRequest from mux_python.models.create_live_stream_request import CreateLiveStreamRequest from mux_python.models.create_playback_id_request import CreatePlaybackIDRequest from mux_python.models.create_playback_id_response import CreatePlaybackIDResponse from mux_python.models.create_playback_restriction_request import CreatePlaybackRestrictionRequest from mux_python.models.create_simulcast_target_request import CreateSimulcastTargetRequest -from mux_python.models.create_space_request import CreateSpaceRequest +from mux_python.models.create_static_rendition_request import CreateStaticRenditionRequest +from mux_python.models.create_static_rendition_response import CreateStaticRenditionResponse from mux_python.models.create_track_request import CreateTrackRequest from mux_python.models.create_track_response import CreateTrackResponse from mux_python.models.create_transcription_vocabulary_request import CreateTranscriptionVocabularyRequest @@ -145,7 +138,6 @@ from mux_python.models.list_real_time_metrics_response import ListRealTimeMetricsResponse from mux_python.models.list_related_incidents_response import ListRelatedIncidentsResponse from mux_python.models.list_signing_keys_response import ListSigningKeysResponse -from mux_python.models.list_spaces_response import ListSpacesResponse from mux_python.models.list_transcription_vocabularies_response import ListTranscriptionVocabulariesResponse from mux_python.models.list_uploads_response import ListUploadsResponse from mux_python.models.list_video_view_exports_response import ListVideoViewExportsResponse @@ -184,12 +176,7 @@ from mux_python.models.signing_key_response import SigningKeyResponse from mux_python.models.simulcast_target import SimulcastTarget from mux_python.models.simulcast_target_response import SimulcastTargetResponse -from mux_python.models.space import Space -from mux_python.models.space_response import SpaceResponse -from mux_python.models.space_status import SpaceStatus -from mux_python.models.space_type import SpaceType -from mux_python.models.start_space_broadcast_response import StartSpaceBroadcastResponse -from mux_python.models.stop_space_broadcast_response import StopSpaceBroadcastResponse +from mux_python.models.static_rendition import StaticRendition from mux_python.models.track import Track from mux_python.models.transcription_vocabulary import TranscriptionVocabulary from mux_python.models.transcription_vocabulary_response import TranscriptionVocabularyResponse @@ -199,6 +186,7 @@ from mux_python.models.update_live_stream_embedded_subtitles_request import UpdateLiveStreamEmbeddedSubtitlesRequest from mux_python.models.update_live_stream_generated_subtitles_request import UpdateLiveStreamGeneratedSubtitlesRequest from mux_python.models.update_live_stream_new_asset_settings import UpdateLiveStreamNewAssetSettings +from mux_python.models.update_live_stream_new_asset_settings_static_renditions_request import UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest from mux_python.models.update_live_stream_request import UpdateLiveStreamRequest from mux_python.models.update_referrer_domain_restriction_request import UpdateReferrerDomainRestrictionRequest from mux_python.models.update_transcription_vocabulary_request import UpdateTranscriptionVocabularyRequest diff --git a/mux_python/api/__init__.py b/mux_python/api/__init__.py index 9c363c2..339fabd 100644 --- a/mux_python/api/__init__.py +++ b/mux_python/api/__init__.py @@ -19,7 +19,6 @@ from mux_python.api.playback_restrictions_api import PlaybackRestrictionsApi from mux_python.api.real_time_api import RealTimeApi from mux_python.api.signing_keys_api import SigningKeysApi -from mux_python.api.spaces_api import SpacesApi from mux_python.api.transcription_vocabularies_api import TranscriptionVocabulariesApi from mux_python.api.url_signing_keys_api import URLSigningKeysApi from mux_python.api.video_views_api import VideoViewsApi diff --git a/mux_python/api/assets_api.py b/mux_python/api/assets_api.py index 8497ccb..93a5a44 100644 --- a/mux_python/api/assets_api.py +++ b/mux_python/api/assets_api.py @@ -326,6 +326,156 @@ def create_asset_playback_id_with_http_info(self, asset_id, create_playback_id_r collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) + def create_asset_static_rendition(self, asset_id, create_static_rendition_request, **kwargs): # noqa: E501 + """Create a static rendition for an asset # noqa: E501 + + Creates a static rendition (i.e. MP4) for an asset # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_asset_static_rendition(asset_id, create_static_rendition_request, async_req=True) + >>> result = thread.get() + + :param asset_id: The asset ID. (required) + :type asset_id: str + :param create_static_rendition_request: (required) + :type create_static_rendition_request: CreateStaticRenditionRequest + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: CreateStaticRenditionResponse + """ + kwargs['_return_http_data_only'] = True + return self.create_asset_static_rendition_with_http_info(asset_id, create_static_rendition_request, **kwargs) # noqa: E501 + + def create_asset_static_rendition_with_http_info(self, asset_id, create_static_rendition_request, **kwargs): # noqa: E501 + """Create a static rendition for an asset # noqa: E501 + + Creates a static rendition (i.e. MP4) for an asset # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_asset_static_rendition_with_http_info(asset_id, create_static_rendition_request, async_req=True) + >>> result = thread.get() + + :param asset_id: The asset ID. (required) + :type asset_id: str + :param create_static_rendition_request: (required) + :type create_static_rendition_request: CreateStaticRenditionRequest + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(CreateStaticRenditionResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'asset_id', + 'create_static_rendition_request' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_asset_static_rendition" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'asset_id' is set + if self.api_client.client_side_validation and ('asset_id' not in local_var_params or # noqa: E501 + local_var_params['asset_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `asset_id` when calling `create_asset_static_rendition`") # noqa: E501 + # verify the required parameter 'create_static_rendition_request' is set + if self.api_client.client_side_validation and ('create_static_rendition_request' not in local_var_params or # noqa: E501 + local_var_params['create_static_rendition_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `create_static_rendition_request` when calling `create_asset_static_rendition`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'asset_id' in local_var_params: + path_params['ASSET_ID'] = local_var_params['asset_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'create_static_rendition_request' in local_var_params: + body_params = local_var_params['create_static_rendition_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['accessToken'] # noqa: E501 + + response_types_map = { + 201: "CreateStaticRenditionResponse", + } + + return self.api_client.call_api( + '/video/v1/assets/{ASSET_ID}/static-renditions', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + def create_asset_track(self, asset_id, create_track_request, **kwargs): # noqa: E501 """Create an asset track # noqa: E501 @@ -745,6 +895,146 @@ def delete_asset_playback_id_with_http_info(self, asset_id, playback_id, **kwarg collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) + def delete_asset_static_rendition(self, asset_id, static_rendition_id, **kwargs): # noqa: E501 + """Delete a single static rendition for an asset # noqa: E501 + + Deletes a single static rendition for an asset # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_asset_static_rendition(asset_id, static_rendition_id, async_req=True) + >>> result = thread.get() + + :param asset_id: The asset ID. (required) + :type asset_id: str + :param static_rendition_id: The static rendition ID. (required) + :type static_rendition_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + return self.delete_asset_static_rendition_with_http_info(asset_id, static_rendition_id, **kwargs) # noqa: E501 + + def delete_asset_static_rendition_with_http_info(self, asset_id, static_rendition_id, **kwargs): # noqa: E501 + """Delete a single static rendition for an asset # noqa: E501 + + Deletes a single static rendition for an asset # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_asset_static_rendition_with_http_info(asset_id, static_rendition_id, async_req=True) + >>> result = thread.get() + + :param asset_id: The asset ID. (required) + :type asset_id: str + :param static_rendition_id: The static rendition ID. (required) + :type static_rendition_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + local_var_params = locals() + + all_params = [ + 'asset_id', + 'static_rendition_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_asset_static_rendition" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'asset_id' is set + if self.api_client.client_side_validation and ('asset_id' not in local_var_params or # noqa: E501 + local_var_params['asset_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `asset_id` when calling `delete_asset_static_rendition`") # noqa: E501 + # verify the required parameter 'static_rendition_id' is set + if self.api_client.client_side_validation and ('static_rendition_id' not in local_var_params or # noqa: E501 + local_var_params['static_rendition_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `static_rendition_id` when calling `delete_asset_static_rendition`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'asset_id' in local_var_params: + path_params['ASSET_ID'] = local_var_params['asset_id'] # noqa: E501 + if 'static_rendition_id' in local_var_params: + path_params['STATIC_RENDITION_ID'] = local_var_params['static_rendition_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = ['accessToken'] # noqa: E501 + + response_types_map = {} + + return self.api_client.call_api( + '/video/v1/assets/{ASSET_ID}/static-renditions/{STATIC_RENDITION_ID}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + def delete_asset_track(self, asset_id, track_id, **kwargs): # noqa: E501 """Delete an asset track # noqa: E501 @@ -1917,7 +2207,7 @@ def update_asset_master_access_with_http_info(self, asset_id, update_asset_maste def update_asset_mp4_support(self, asset_id, update_asset_mp4_support_request, **kwargs): # noqa: E501 """Update MP4 support # noqa: E501 - Allows you to add or remove mp4 support for assets that were created without it. The values supported are `capped-1080p`, `audio-only`, `audio-only,capped-1080p`, `standard`(deprecated), and `none`. `none` means that an asset *does not* have mp4 support, so submitting a request with `mp4_support` set to `none` will delete the mp4 assets from the asset in question. # noqa: E501 + This method has been deprecated. Please see the [Static Rendition API](https://www.mux.com/docs/guides/enable-static-mp4-renditions#after-asset-creation). Allows you to add or remove mp4 support for assets that were created without it. The values supported are `capped-1080p`, `audio-only`, `audio-only,capped-1080p`, `standard`(deprecated), and `none`. `none` means that an asset *does not* have mp4 support, so submitting a request with `mp4_support` set to `none` will delete the mp4 assets from the asset in question. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1949,7 +2239,7 @@ def update_asset_mp4_support(self, asset_id, update_asset_mp4_support_request, * def update_asset_mp4_support_with_http_info(self, asset_id, update_asset_mp4_support_request, **kwargs): # noqa: E501 """Update MP4 support # noqa: E501 - Allows you to add or remove mp4 support for assets that were created without it. The values supported are `capped-1080p`, `audio-only`, `audio-only,capped-1080p`, `standard`(deprecated), and `none`. `none` means that an asset *does not* have mp4 support, so submitting a request with `mp4_support` set to `none` will delete the mp4 assets from the asset in question. # noqa: E501 + This method has been deprecated. Please see the [Static Rendition API](https://www.mux.com/docs/guides/enable-static-mp4-renditions#after-asset-creation). Allows you to add or remove mp4 support for assets that were created without it. The values supported are `capped-1080p`, `audio-only`, `audio-only,capped-1080p`, `standard`(deprecated), and `none`. `none` means that an asset *does not* have mp4 support, so submitting a request with `mp4_support` set to `none` will delete the mp4 assets from the asset in question. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True diff --git a/mux_python/api/live_streams_api.py b/mux_python/api/live_streams_api.py index 18a8d08..cf4cb51 100644 --- a/mux_python/api/live_streams_api.py +++ b/mux_python/api/live_streams_api.py @@ -605,6 +605,135 @@ def delete_live_stream_with_http_info(self, live_stream_id, **kwargs): # noqa: collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) + def delete_live_stream_new_asset_settings_static_renditions(self, live_stream_id, **kwargs): # noqa: E501 + """Delete a live stream's static renditions setting for new assets # noqa: E501 + + 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. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_live_stream_new_asset_settings_static_renditions(live_stream_id, async_req=True) + >>> result = thread.get() + + :param live_stream_id: The live stream ID (required) + :type live_stream_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + return self.delete_live_stream_new_asset_settings_static_renditions_with_http_info(live_stream_id, **kwargs) # noqa: E501 + + def delete_live_stream_new_asset_settings_static_renditions_with_http_info(self, live_stream_id, **kwargs): # noqa: E501 + """Delete a live stream's static renditions setting for new assets # noqa: E501 + + 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. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_live_stream_new_asset_settings_static_renditions_with_http_info(live_stream_id, async_req=True) + >>> result = thread.get() + + :param live_stream_id: The live stream ID (required) + :type live_stream_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + local_var_params = locals() + + all_params = [ + 'live_stream_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_live_stream_new_asset_settings_static_renditions" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'live_stream_id' is set + if self.api_client.client_side_validation and ('live_stream_id' not in local_var_params or # noqa: E501 + local_var_params['live_stream_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `live_stream_id` when calling `delete_live_stream_new_asset_settings_static_renditions`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'live_stream_id' in local_var_params: + path_params['LIVE_STREAM_ID'] = local_var_params['live_stream_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = ['accessToken'] # noqa: E501 + + response_types_map = {} + + return self.api_client.call_api( + '/video/v1/live-streams/{LIVE_STREAM_ID}/new-asset-settings/static-renditions', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + def delete_live_stream_playback_id(self, live_stream_id, playback_id, **kwargs): # noqa: E501 """Delete a live stream playback ID # noqa: E501 @@ -2453,3 +2582,153 @@ def update_live_stream_generated_subtitles_with_http_info(self, live_stream_id, _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) + + def update_live_stream_new_asset_settings_static_renditions(self, live_stream_id, update_live_stream_new_asset_settings_static_renditions_request, **kwargs): # noqa: E501 + """Update live stream static renditions for new assets # noqa: E501 + + 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. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_live_stream_new_asset_settings_static_renditions(live_stream_id, update_live_stream_new_asset_settings_static_renditions_request, async_req=True) + >>> result = thread.get() + + :param live_stream_id: The live stream ID (required) + :type live_stream_id: str + :param update_live_stream_new_asset_settings_static_renditions_request: (required) + :type update_live_stream_new_asset_settings_static_renditions_request: UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: LiveStreamResponse + """ + kwargs['_return_http_data_only'] = True + return self.update_live_stream_new_asset_settings_static_renditions_with_http_info(live_stream_id, update_live_stream_new_asset_settings_static_renditions_request, **kwargs) # noqa: E501 + + def update_live_stream_new_asset_settings_static_renditions_with_http_info(self, live_stream_id, update_live_stream_new_asset_settings_static_renditions_request, **kwargs): # noqa: E501 + """Update live stream static renditions for new assets # noqa: E501 + + 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. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_live_stream_new_asset_settings_static_renditions_with_http_info(live_stream_id, update_live_stream_new_asset_settings_static_renditions_request, async_req=True) + >>> result = thread.get() + + :param live_stream_id: The live stream ID (required) + :type live_stream_id: str + :param update_live_stream_new_asset_settings_static_renditions_request: (required) + :type update_live_stream_new_asset_settings_static_renditions_request: UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(LiveStreamResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'live_stream_id', + 'update_live_stream_new_asset_settings_static_renditions_request' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_live_stream_new_asset_settings_static_renditions" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'live_stream_id' is set + if self.api_client.client_side_validation and ('live_stream_id' not in local_var_params or # noqa: E501 + local_var_params['live_stream_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `live_stream_id` when calling `update_live_stream_new_asset_settings_static_renditions`") # noqa: E501 + # verify the required parameter 'update_live_stream_new_asset_settings_static_renditions_request' is set + if self.api_client.client_side_validation and ('update_live_stream_new_asset_settings_static_renditions_request' not in local_var_params or # noqa: E501 + local_var_params['update_live_stream_new_asset_settings_static_renditions_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `update_live_stream_new_asset_settings_static_renditions_request` when calling `update_live_stream_new_asset_settings_static_renditions`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'live_stream_id' in local_var_params: + path_params['LIVE_STREAM_ID'] = local_var_params['live_stream_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'update_live_stream_new_asset_settings_static_renditions_request' in local_var_params: + body_params = local_var_params['update_live_stream_new_asset_settings_static_renditions_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['accessToken'] # noqa: E501 + + response_types_map = { + 200: "LiveStreamResponse", + } + + return self.api_client.call_api( + '/video/v1/live-streams/{LIVE_STREAM_ID}/new-asset-settings/static-renditions', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/mux_python/api_client.py b/mux_python/api_client.py index 4388050..81da01b 100644 --- a/mux_python/api_client.py +++ b/mux_python/api_client.py @@ -79,7 +79,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'Mux Python | 3.20.0' + self.user_agent = 'Mux Python | 4.0.0' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/mux_python/configuration.py b/mux_python/configuration.py index 51138ff..faca9b4 100644 --- a/mux_python/configuration.py +++ b/mux_python/configuration.py @@ -406,7 +406,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: v1\n"\ - "SDK Package Version: 3.20.0".\ + "SDK Package Version: 4.0.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/mux_python/models/__init__.py b/mux_python/models/__init__.py index e27f5ce..6f880aa 100644 --- a/mux_python/models/__init__.py +++ b/mux_python/models/__init__.py @@ -24,21 +24,15 @@ from mux_python.models.asset_recording_times import AssetRecordingTimes from mux_python.models.asset_response import AssetResponse from mux_python.models.asset_static_renditions import AssetStaticRenditions -from mux_python.models.asset_static_renditions_files import AssetStaticRenditionsFiles from mux_python.models.breakdown_value import BreakdownValue -from mux_python.models.broadcast import Broadcast -from mux_python.models.broadcast_layout import BroadcastLayout -from mux_python.models.broadcast_resolution import BroadcastResolution -from mux_python.models.broadcast_response import BroadcastResponse -from mux_python.models.broadcast_status import BroadcastStatus from mux_python.models.create_asset_request import CreateAssetRequest -from mux_python.models.create_broadcast_request import CreateBroadcastRequest from mux_python.models.create_live_stream_request import CreateLiveStreamRequest from mux_python.models.create_playback_id_request import CreatePlaybackIDRequest from mux_python.models.create_playback_id_response import CreatePlaybackIDResponse from mux_python.models.create_playback_restriction_request import CreatePlaybackRestrictionRequest from mux_python.models.create_simulcast_target_request import CreateSimulcastTargetRequest -from mux_python.models.create_space_request import CreateSpaceRequest +from mux_python.models.create_static_rendition_request import CreateStaticRenditionRequest +from mux_python.models.create_static_rendition_response import CreateStaticRenditionResponse from mux_python.models.create_track_request import CreateTrackRequest from mux_python.models.create_track_response import CreateTrackResponse from mux_python.models.create_transcription_vocabulary_request import CreateTranscriptionVocabularyRequest @@ -110,7 +104,6 @@ from mux_python.models.list_real_time_metrics_response import ListRealTimeMetricsResponse from mux_python.models.list_related_incidents_response import ListRelatedIncidentsResponse from mux_python.models.list_signing_keys_response import ListSigningKeysResponse -from mux_python.models.list_spaces_response import ListSpacesResponse from mux_python.models.list_transcription_vocabularies_response import ListTranscriptionVocabulariesResponse from mux_python.models.list_uploads_response import ListUploadsResponse from mux_python.models.list_video_view_exports_response import ListVideoViewExportsResponse @@ -149,12 +142,7 @@ from mux_python.models.signing_key_response import SigningKeyResponse from mux_python.models.simulcast_target import SimulcastTarget from mux_python.models.simulcast_target_response import SimulcastTargetResponse -from mux_python.models.space import Space -from mux_python.models.space_response import SpaceResponse -from mux_python.models.space_status import SpaceStatus -from mux_python.models.space_type import SpaceType -from mux_python.models.start_space_broadcast_response import StartSpaceBroadcastResponse -from mux_python.models.stop_space_broadcast_response import StopSpaceBroadcastResponse +from mux_python.models.static_rendition import StaticRendition from mux_python.models.track import Track from mux_python.models.transcription_vocabulary import TranscriptionVocabulary from mux_python.models.transcription_vocabulary_response import TranscriptionVocabularyResponse @@ -164,6 +152,7 @@ from mux_python.models.update_live_stream_embedded_subtitles_request import UpdateLiveStreamEmbeddedSubtitlesRequest from mux_python.models.update_live_stream_generated_subtitles_request import UpdateLiveStreamGeneratedSubtitlesRequest from mux_python.models.update_live_stream_new_asset_settings import UpdateLiveStreamNewAssetSettings +from mux_python.models.update_live_stream_new_asset_settings_static_renditions_request import UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest from mux_python.models.update_live_stream_request import UpdateLiveStreamRequest from mux_python.models.update_referrer_domain_restriction_request import UpdateReferrerDomainRestrictionRequest from mux_python.models.update_transcription_vocabulary_request import UpdateTranscriptionVocabularyRequest diff --git a/mux_python/models/asset_static_renditions.py b/mux_python/models/asset_static_renditions.py index 8e2e0a7..9489b64 100644 --- a/mux_python/models/asset_static_renditions.py +++ b/mux_python/models/asset_static_renditions.py @@ -38,7 +38,7 @@ class AssetStaticRenditions(object): """ openapi_types = { 'status': 'str', - 'files': 'list[AssetStaticRenditionsFiles]' + 'files': 'list[StaticRendition]' } attribute_map = { @@ -65,7 +65,7 @@ def __init__(self, status='disabled', files=None, local_vars_configuration=None) def status(self): """Gets the status of this AssetStaticRenditions. # noqa: E501 - Indicates the status of downloadable MP4 versions of this asset. # noqa: E501 + Indicates the status of downloadable MP4 versions of this asset. This field is only valid when `mp4_support` is enabled # noqa: E501 :return: The status of this AssetStaticRenditions. # noqa: E501 :rtype: str @@ -76,7 +76,7 @@ def status(self): def status(self, status): """Sets the status of this AssetStaticRenditions. - Indicates the status of downloadable MP4 versions of this asset. # noqa: E501 + Indicates the status of downloadable MP4 versions of this asset. This field is only valid when `mp4_support` is enabled # noqa: E501 :param status: The status of this AssetStaticRenditions. # noqa: E501 :type status: str @@ -97,7 +97,7 @@ def files(self): Array of file objects. # noqa: E501 :return: The files of this AssetStaticRenditions. # noqa: E501 - :rtype: list[AssetStaticRenditionsFiles] + :rtype: list[StaticRendition] """ return self._files @@ -108,7 +108,7 @@ def files(self, files): Array of file objects. # noqa: E501 :param files: The files of this AssetStaticRenditions. # noqa: E501 - :type files: list[AssetStaticRenditionsFiles] + :type files: list[StaticRendition] """ self._files = files diff --git a/mux_python/models/create_asset_request.py b/mux_python/models/create_asset_request.py index 5eeadf2..af92fb5 100644 --- a/mux_python/models/create_asset_request.py +++ b/mux_python/models/create_asset_request.py @@ -48,7 +48,8 @@ class CreateAssetRequest(object): 'test': 'bool', 'max_resolution_tier': 'str', 'encoding_tier': 'str', - 'video_quality': 'str' + 'video_quality': 'str', + 'static_renditions': 'list[CreateStaticRenditionRequest]' } attribute_map = { @@ -63,10 +64,11 @@ class CreateAssetRequest(object): 'test': 'test', 'max_resolution_tier': 'max_resolution_tier', 'encoding_tier': 'encoding_tier', - 'video_quality': 'video_quality' + 'video_quality': 'video_quality', + 'static_renditions': 'static_renditions' } - def __init__(self, input=None, playback_policy=None, advanced_playback_policies=None, per_title_encode=None, passthrough=None, mp4_support=None, normalize_audio=False, master_access=None, test=None, max_resolution_tier=None, encoding_tier=None, video_quality=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, input=None, playback_policy=None, advanced_playback_policies=None, per_title_encode=None, passthrough=None, mp4_support=None, normalize_audio=False, master_access=None, test=None, max_resolution_tier=None, encoding_tier=None, video_quality=None, static_renditions=None, local_vars_configuration=None): # noqa: E501 """CreateAssetRequest - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() @@ -84,6 +86,7 @@ def __init__(self, input=None, playback_policy=None, advanced_playback_policies= self._max_resolution_tier = None self._encoding_tier = None self._video_quality = None + self._static_renditions = None self.discriminator = None if input is not None: @@ -110,6 +113,8 @@ def __init__(self, input=None, playback_policy=None, advanced_playback_policies= self.encoding_tier = encoding_tier if video_quality is not None: self.video_quality = video_quality + if static_renditions is not None: + self.static_renditions = static_renditions @property def input(self): @@ -228,7 +233,7 @@ def passthrough(self, passthrough): def mp4_support(self): """Gets the mp4_support of this CreateAssetRequest. # noqa: E501 - 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. # noqa: E501 + Deprecated. See the [Static Renditions API](https://www.mux.com/docs/guides/enable-static-mp4-renditions) for the updated API. 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. # noqa: E501 :return: The mp4_support of this CreateAssetRequest. # noqa: E501 :rtype: str @@ -239,7 +244,7 @@ def mp4_support(self): def mp4_support(self, mp4_support): """Sets the mp4_support of this CreateAssetRequest. - 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. # noqa: E501 + Deprecated. See the [Static Renditions API](https://www.mux.com/docs/guides/enable-static-mp4-renditions) for the updated API. 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. # noqa: E501 :param mp4_support: The mp4_support of this CreateAssetRequest. # noqa: E501 :type mp4_support: str @@ -415,6 +420,29 @@ def video_quality(self, video_quality): self._video_quality = video_quality + @property + def static_renditions(self): + """Gets the static_renditions of this CreateAssetRequest. # noqa: E501 + + An array of static renditions to create for this asset. You may not enable both `static_renditions` and `mp4_support (the latter being deprecated)` # noqa: E501 + + :return: The static_renditions of this CreateAssetRequest. # noqa: E501 + :rtype: list[CreateStaticRenditionRequest] + """ + return self._static_renditions + + @static_renditions.setter + def static_renditions(self, static_renditions): + """Sets the static_renditions of this CreateAssetRequest. + + An array of static renditions to create for this asset. You may not enable both `static_renditions` and `mp4_support (the latter being deprecated)` # noqa: E501 + + :param static_renditions: The static_renditions of this CreateAssetRequest. # noqa: E501 + :type static_renditions: list[CreateStaticRenditionRequest] + """ + + self._static_renditions = static_renditions + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/mux_python/models/create_static_rendition_request.py b/mux_python/models/create_static_rendition_request.py new file mode 100644 index 0000000..d8e9c8f --- /dev/null +++ b/mux_python/models/create_static_rendition_request.py @@ -0,0 +1,166 @@ +# coding: utf-8 + +""" + Mux API + + 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. # noqa: E501 + + The version of the OpenAPI document: v1 + Contact: devex@mux.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from mux_python.configuration import Configuration + + +class CreateStaticRenditionRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'resolution': 'str', + 'passthrough': 'str' + } + + attribute_map = { + 'resolution': 'resolution', + 'passthrough': 'passthrough' + } + + def __init__(self, resolution=None, passthrough=None, local_vars_configuration=None): # noqa: E501 + """CreateStaticRenditionRequest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._resolution = None + self._passthrough = None + self.discriminator = None + + if resolution is not None: + self.resolution = resolution + if passthrough is not None: + self.passthrough = passthrough + + @property + def resolution(self): + """Gets the resolution of this CreateStaticRenditionRequest. # noqa: E501 + + + :return: The resolution of this CreateStaticRenditionRequest. # noqa: E501 + :rtype: str + """ + return self._resolution + + @resolution.setter + def resolution(self, resolution): + """Sets the resolution of this CreateStaticRenditionRequest. + + + :param resolution: The resolution of this CreateStaticRenditionRequest. # noqa: E501 + :type resolution: str + """ + allowed_values = ["highest", "audio-only", "2160p", "1440p", "1080p", "720p", "540p", "480p", "360p", "270p"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and resolution not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `resolution` ({0}), must be one of {1}" # noqa: E501 + .format(resolution, allowed_values) + ) + + self._resolution = resolution + + @property + def passthrough(self): + """Gets the passthrough of this CreateStaticRenditionRequest. # noqa: E501 + + Arbitrary user-supplied metadata set for the static rendition. Max 255 characters. # noqa: E501 + + :return: The passthrough of this CreateStaticRenditionRequest. # noqa: E501 + :rtype: str + """ + return self._passthrough + + @passthrough.setter + def passthrough(self, passthrough): + """Sets the passthrough of this CreateStaticRenditionRequest. + + Arbitrary user-supplied metadata set for the static rendition. Max 255 characters. # noqa: E501 + + :param passthrough: The passthrough of this CreateStaticRenditionRequest. # noqa: E501 + :type passthrough: str + """ + + self._passthrough = passthrough + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateStaticRenditionRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateStaticRenditionRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/mux_python/models/create_static_rendition_response.py b/mux_python/models/create_static_rendition_response.py new file mode 100644 index 0000000..d7fca9a --- /dev/null +++ b/mux_python/models/create_static_rendition_response.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + Mux API + + 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. # noqa: E501 + + The version of the OpenAPI document: v1 + Contact: devex@mux.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from mux_python.configuration import Configuration + + +class CreateStaticRenditionResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'data': 'StaticRendition' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None, local_vars_configuration=None): # noqa: E501 + """CreateStaticRenditionResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """Gets the data of this CreateStaticRenditionResponse. # noqa: E501 + + + :return: The data of this CreateStaticRenditionResponse. # noqa: E501 + :rtype: StaticRendition + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this CreateStaticRenditionResponse. + + + :param data: The data of this CreateStaticRenditionResponse. # noqa: E501 + :type data: StaticRendition + """ + + self._data = data + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateStaticRenditionResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateStaticRenditionResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/mux_python/models/input_settings.py b/mux_python/models/input_settings.py index b713f6e..0b76132 100644 --- a/mux_python/models/input_settings.py +++ b/mux_python/models/input_settings.py @@ -350,7 +350,7 @@ def closed_captions(self, closed_captions): def passthrough(self): """Gets the passthrough of this InputSettings. # noqa: E501 - This optional parameter should be used tracks with `type` of `text` and `text_type` set to `subtitles`. # noqa: E501 + This optional parameter should be used for tracks with `type` of `text` and `text_type` set to `subtitles`. # noqa: E501 :return: The passthrough of this InputSettings. # noqa: E501 :rtype: str @@ -361,7 +361,7 @@ def passthrough(self): def passthrough(self, passthrough): """Sets the passthrough of this InputSettings. - This optional parameter should be used tracks with `type` of `text` and `text_type` set to `subtitles`. # noqa: E501 + This optional parameter should be used for tracks with `type` of `text` and `text_type` set to `subtitles`. # noqa: E501 :param passthrough: The passthrough of this InputSettings. # noqa: E501 :type passthrough: str diff --git a/mux_python/models/static_rendition.py b/mux_python/models/static_rendition.py new file mode 100644 index 0000000..1551635 --- /dev/null +++ b/mux_python/models/static_rendition.py @@ -0,0 +1,478 @@ +# coding: utf-8 + +""" + Mux API + + 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. # noqa: E501 + + The version of the OpenAPI document: v1 + Contact: devex@mux.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from mux_python.configuration import Configuration + + +class StaticRendition(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str', + 'ext': 'str', + 'height': 'int', + 'width': 'int', + 'bitrate': 'int', + 'filesize': 'str', + 'type': 'str', + 'status': 'str', + 'resolution_tier': 'str', + 'resolution': 'str', + 'id': 'str', + 'passthrough': 'str' + } + + attribute_map = { + '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' + } + + def __init__(self, name=None, ext=None, height=None, width=None, bitrate=None, filesize=None, type=None, status=None, resolution_tier=None, resolution=None, id=None, passthrough=None, local_vars_configuration=None): # noqa: E501 + """StaticRendition - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self._ext = None + self._height = None + self._width = None + self._bitrate = None + self._filesize = None + self._type = None + self._status = None + self._resolution_tier = None + self._resolution = None + self._id = None + self._passthrough = None + self.discriminator = None + + if name is not None: + self.name = name + if ext is not None: + self.ext = ext + if height is not None: + self.height = height + if width is not None: + self.width = width + if bitrate is not None: + self.bitrate = bitrate + if filesize is not None: + self.filesize = filesize + if type is not None: + self.type = type + if status is not None: + self.status = status + if resolution_tier is not None: + self.resolution_tier = resolution_tier + if resolution is not None: + self.resolution = resolution + if id is not None: + self.id = id + if passthrough is not None: + self.passthrough = passthrough + + @property + def name(self): + """Gets the name of this StaticRendition. # noqa: E501 + + Name of the static rendition file # noqa: E501 + + :return: The name of this StaticRendition. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this StaticRendition. + + Name of the static rendition file # noqa: E501 + + :param name: The name of this StaticRendition. # noqa: E501 + :type name: str + """ + allowed_values = ["low.mp4", "medium.mp4", "high.mp4", "highest.mp4", "audio.m4a", "capped-1080p.mp4", "2160p.mp4", "1440p.mp4", "1080p.mp4", "720p.mp4", "540p.mp4", "480p.mp4", "360p.mp4", "270p.mp4"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and name not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `name` ({0}), must be one of {1}" # noqa: E501 + .format(name, allowed_values) + ) + + self._name = name + + @property + def ext(self): + """Gets the ext of this StaticRendition. # noqa: E501 + + Extension of the static rendition file # noqa: E501 + + :return: The ext of this StaticRendition. # noqa: E501 + :rtype: str + """ + return self._ext + + @ext.setter + def ext(self, ext): + """Sets the ext of this StaticRendition. + + Extension of the static rendition file # noqa: E501 + + :param ext: The ext of this StaticRendition. # noqa: E501 + :type ext: str + """ + allowed_values = ["mp4", "m4a"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and ext not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `ext` ({0}), must be one of {1}" # noqa: E501 + .format(ext, allowed_values) + ) + + self._ext = ext + + @property + def height(self): + """Gets the height of this StaticRendition. # noqa: E501 + + The height of the static rendition's file in pixels # noqa: E501 + + :return: The height of this StaticRendition. # noqa: E501 + :rtype: int + """ + return self._height + + @height.setter + def height(self, height): + """Sets the height of this StaticRendition. + + The height of the static rendition's file in pixels # noqa: E501 + + :param height: The height of this StaticRendition. # noqa: E501 + :type height: int + """ + + self._height = height + + @property + def width(self): + """Gets the width of this StaticRendition. # noqa: E501 + + The width of the static rendition's file in pixels # noqa: E501 + + :return: The width of this StaticRendition. # noqa: E501 + :rtype: int + """ + return self._width + + @width.setter + def width(self, width): + """Sets the width of this StaticRendition. + + The width of the static rendition's file in pixels # noqa: E501 + + :param width: The width of this StaticRendition. # noqa: E501 + :type width: int + """ + + self._width = width + + @property + def bitrate(self): + """Gets the bitrate of this StaticRendition. # noqa: E501 + + The bitrate in bits per second # noqa: E501 + + :return: The bitrate of this StaticRendition. # noqa: E501 + :rtype: int + """ + return self._bitrate + + @bitrate.setter + def bitrate(self, bitrate): + """Sets the bitrate of this StaticRendition. + + The bitrate in bits per second # noqa: E501 + + :param bitrate: The bitrate of this StaticRendition. # noqa: E501 + :type bitrate: int + """ + + self._bitrate = bitrate + + @property + def filesize(self): + """Gets the filesize of this StaticRendition. # noqa: E501 + + The file size in bytes # noqa: E501 + + :return: The filesize of this StaticRendition. # noqa: E501 + :rtype: str + """ + return self._filesize + + @filesize.setter + def filesize(self, filesize): + """Sets the filesize of this StaticRendition. + + The file size in bytes # noqa: E501 + + :param filesize: The filesize of this StaticRendition. # noqa: E501 + :type filesize: str + """ + + self._filesize = filesize + + @property + def type(self): + """Gets the type of this StaticRendition. # noqa: E501 + + 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`. # noqa: E501 + + :return: The type of this StaticRendition. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this StaticRendition. + + 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`. # noqa: E501 + + :param type: The type of this StaticRendition. # noqa: E501 + :type type: str + """ + allowed_values = ["standard", "advanced"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 + .format(type, allowed_values) + ) + + self._type = type + + @property + def status(self): + """Gets the status of this StaticRendition. # noqa: E501 + + 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 # noqa: E501 + + :return: The status of this StaticRendition. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this StaticRendition. + + 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 # noqa: E501 + + :param status: The status of this StaticRendition. # noqa: E501 + :type status: str + """ + allowed_values = ["ready", "preparing", "skipped", "errored"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 + .format(status, allowed_values) + ) + + self._status = status + + @property + def resolution_tier(self): + """Gets the resolution_tier of this StaticRendition. # noqa: E501 + + Indicates the resolution tier of this specific MP4 version of this asset. This field is only valid for `static_renditions`, not for `mp4_support`. # noqa: E501 + + :return: The resolution_tier of this StaticRendition. # noqa: E501 + :rtype: str + """ + return self._resolution_tier + + @resolution_tier.setter + def resolution_tier(self, resolution_tier): + """Sets the resolution_tier of this StaticRendition. + + Indicates the resolution tier of this specific MP4 version of this asset. This field is only valid for `static_renditions`, not for `mp4_support`. # noqa: E501 + + :param resolution_tier: The resolution_tier of this StaticRendition. # noqa: E501 + :type resolution_tier: str + """ + allowed_values = ["2160p", "1440p", "1080p", "720p"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and resolution_tier not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `resolution_tier` ({0}), must be one of {1}" # noqa: E501 + .format(resolution_tier, allowed_values) + ) + + self._resolution_tier = resolution_tier + + @property + def resolution(self): + """Gets the resolution of this StaticRendition. # noqa: E501 + + Indicates the resolution of this specific MP4 version of this asset. This field is only valid for `static_renditions`, not for `mp4_support`. # noqa: E501 + + :return: The resolution of this StaticRendition. # noqa: E501 + :rtype: str + """ + return self._resolution + + @resolution.setter + def resolution(self, resolution): + """Sets the resolution of this StaticRendition. + + Indicates the resolution of this specific MP4 version of this asset. This field is only valid for `static_renditions`, not for `mp4_support`. # noqa: E501 + + :param resolution: The resolution of this StaticRendition. # noqa: E501 + :type resolution: str + """ + allowed_values = ["highest", "audio-only", "2160p", "1440p", "1080p", "720p", "540p", "480p", "360p", "270p"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and resolution not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `resolution` ({0}), must be one of {1}" # noqa: E501 + .format(resolution, allowed_values) + ) + + self._resolution = resolution + + @property + def id(self): + """Gets the id of this StaticRendition. # noqa: E501 + + The ID of this static rendition, used in managing this static rendition. This field is only valid for `static_renditions`, not for `mp4_support`. # noqa: E501 + + :return: The id of this StaticRendition. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this StaticRendition. + + The ID of this static rendition, used in managing this static rendition. This field is only valid for `static_renditions`, not for `mp4_support`. # noqa: E501 + + :param id: The id of this StaticRendition. # noqa: E501 + :type id: str + """ + + self._id = id + + @property + def passthrough(self): + """Gets the passthrough of this StaticRendition. # noqa: E501 + + Arbitrary user-supplied metadata set for the static rendition. Max 255 characters. # noqa: E501 + + :return: The passthrough of this StaticRendition. # noqa: E501 + :rtype: str + """ + return self._passthrough + + @passthrough.setter + def passthrough(self, passthrough): + """Sets the passthrough of this StaticRendition. + + Arbitrary user-supplied metadata set for the static rendition. Max 255 characters. # noqa: E501 + + :param passthrough: The passthrough of this StaticRendition. # noqa: E501 + :type passthrough: str + """ + + self._passthrough = passthrough + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, StaticRendition): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, StaticRendition): + return True + + return self.to_dict() != other.to_dict() diff --git a/mux_python/models/update_live_stream_new_asset_settings.py b/mux_python/models/update_live_stream_new_asset_settings.py index c7bd5c2..79a119d 100644 --- a/mux_python/models/update_live_stream_new_asset_settings.py +++ b/mux_python/models/update_live_stream_new_asset_settings.py @@ -38,15 +38,17 @@ class UpdateLiveStreamNewAssetSettings(object): """ openapi_types = { 'mp4_support': 'str', - 'master_access': 'str' + 'master_access': 'str', + 'video_quality': 'str' } attribute_map = { 'mp4_support': 'mp4_support', - 'master_access': 'master_access' + 'master_access': 'master_access', + 'video_quality': 'video_quality' } - def __init__(self, mp4_support=None, master_access=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, mp4_support=None, master_access=None, video_quality=None, local_vars_configuration=None): # noqa: E501 """UpdateLiveStreamNewAssetSettings - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() @@ -54,18 +56,21 @@ def __init__(self, mp4_support=None, master_access=None, local_vars_configuratio self._mp4_support = None self._master_access = None + self._video_quality = None self.discriminator = None if mp4_support is not None: self.mp4_support = mp4_support if master_access is not None: self.master_access = master_access + if video_quality is not None: + self.video_quality = video_quality @property def mp4_support(self): """Gets the mp4_support of this UpdateLiveStreamNewAssetSettings. # noqa: E501 - 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). # noqa: E501 + Deprecated. See the [Static Renditions API](https://www.mux.com/docs/guides/enable-static-mp4-renditions#during-live-stream-creation) for the updated API. 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). # noqa: E501 :return: The mp4_support of this UpdateLiveStreamNewAssetSettings. # noqa: E501 :rtype: str @@ -76,7 +81,7 @@ def mp4_support(self): def mp4_support(self, mp4_support): """Sets the mp4_support of this UpdateLiveStreamNewAssetSettings. - 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). # noqa: E501 + Deprecated. See the [Static Renditions API](https://www.mux.com/docs/guides/enable-static-mp4-renditions#during-live-stream-creation) for the updated API. 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). # noqa: E501 :param mp4_support: The mp4_support of this UpdateLiveStreamNewAssetSettings. # noqa: E501 :type mp4_support: str @@ -119,6 +124,35 @@ def master_access(self, master_access): self._master_access = master_access + @property + def video_quality(self): + """Gets the video_quality of this UpdateLiveStreamNewAssetSettings. # noqa: E501 + + 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) # noqa: E501 + + :return: The video_quality of this UpdateLiveStreamNewAssetSettings. # noqa: E501 + :rtype: str + """ + return self._video_quality + + @video_quality.setter + def video_quality(self, video_quality): + """Sets the video_quality of this UpdateLiveStreamNewAssetSettings. + + 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) # noqa: E501 + + :param video_quality: The video_quality of this UpdateLiveStreamNewAssetSettings. # noqa: E501 + :type video_quality: str + """ + allowed_values = ["plus", "premium"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and video_quality not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `video_quality` ({0}), must be one of {1}" # noqa: E501 + .format(video_quality, allowed_values) + ) + + self._video_quality = video_quality + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/mux_python/models/update_live_stream_new_asset_settings_static_renditions_request.py b/mux_python/models/update_live_stream_new_asset_settings_static_renditions_request.py new file mode 100644 index 0000000..9a360ae --- /dev/null +++ b/mux_python/models/update_live_stream_new_asset_settings_static_renditions_request.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + Mux API + + 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. # noqa: E501 + + The version of the OpenAPI document: v1 + Contact: devex@mux.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from mux_python.configuration import Configuration + + +class UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'static_renditions': 'list[CreateStaticRenditionRequest]' + } + + attribute_map = { + 'static_renditions': 'static_renditions' + } + + def __init__(self, static_renditions=None, local_vars_configuration=None): # noqa: E501 + """UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._static_renditions = None + self.discriminator = None + + if static_renditions is not None: + self.static_renditions = static_renditions + + @property + def static_renditions(self): + """Gets the static_renditions of this UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest. # noqa: E501 + + + :return: The static_renditions of this UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest. # noqa: E501 + :rtype: list[CreateStaticRenditionRequest] + """ + return self._static_renditions + + @static_renditions.setter + def static_renditions(self, static_renditions): + """Sets the static_renditions of this UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest. + + + :param static_renditions: The static_renditions of this UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest. # noqa: E501 + :type static_renditions: list[CreateStaticRenditionRequest] + """ + + self._static_renditions = static_renditions + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/mux_python/models/video_view.py b/mux_python/models/video_view.py index c2c11aa..bc4cb36 100644 --- a/mux_python/models/video_view.py +++ b/mux_python/models/video_view.py @@ -198,7 +198,23 @@ class VideoView(object): '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': 'str', + 'client_application_version': 'str', + 'video_affiliate': 'str', + 'viewer_plan': 'str', + 'viewer_plan_status': 'str', + 'viewer_plan_category': 'str', + 'view_drm_level': 'str', + 'video_brand': 'str', + 'used_pip': 'bool', + 'time_shift_enabled': 'bool', + 'used_captions': 'bool', + 'video_codec': 'str', + 'audio_codec': 'str', + 'video_dynamic_range_type': 'str', + 'view_cdn_edge_pop': 'str', + 'view_cdn_origin': 'str' } attribute_map = { @@ -363,10 +379,26 @@ class VideoView(object): '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' } - def __init__(self, view_total_upscaling=None, preroll_ad_asset_hostname=None, player_source_domain=None, region=None, viewer_user_agent=None, preroll_requested=None, page_type=None, startup_score=None, view_seek_duration=None, country_name=None, player_source_height=None, longitude=None, buffering_count=None, video_duration=None, player_source_type=None, city=None, view_id=None, platform_description=None, video_startup_preroll_request_time=None, viewer_device_name=None, video_series=None, viewer_application_name=None, updated_at=None, view_total_content_playback_time=None, cdn=None, player_instance_id=None, video_language=None, player_source_width=None, player_error_message=None, player_mux_plugin_version=None, watched=None, playback_score=None, page_url=None, metro=None, view_max_request_latency=None, requests_for_first_preroll=None, view_total_downscaling=None, latitude=None, player_source_host_name=None, inserted_at=None, view_end=None, mux_embed_version=None, player_language=None, page_load_time=None, viewer_device_category=None, video_startup_preroll_load_time=None, player_version=None, watch_time=None, player_source_stream_type=None, preroll_ad_tag_hostname=None, viewer_device_manufacturer=None, rebuffering_score=None, experiment_name=None, viewer_os_version=None, player_preload=None, buffering_duration=None, player_view_count=None, player_software=None, player_load_time=None, platform_summary=None, video_encoding_variant=None, player_width=None, view_seek_count=None, viewer_experience_score=None, view_error_id=None, video_variant_name=None, preroll_played=None, viewer_application_engine=None, viewer_os_architecture=None, player_error_code=None, buffering_rate=None, events=None, player_name=None, view_start=None, view_average_request_throughput=None, video_producer=None, error_type_id=None, mux_viewer_id=None, video_id=None, continent_code=None, session_id=None, exit_before_video_start=None, video_content_type=None, viewer_os_family=None, player_poster=None, view_average_request_latency=None, video_variant_id=None, player_source_duration=None, player_source_url=None, mux_api_version=None, video_title=None, id=None, short_time=None, rebuffer_percentage=None, time_to_first_frame=None, viewer_user_id=None, video_stream_type=None, player_startup_time=None, viewer_application_version=None, view_max_downscale_percentage=None, view_max_upscale_percentage=None, country_code=None, used_fullscreen=None, isp=None, property_id=None, player_autoplay=None, player_height=None, asn=None, asn_name=None, quality_score=None, player_software_version=None, player_mux_plugin_name=None, sub_property_id=None, player_remote_played=None, view_max_playhead_position=None, view_playing_time=None, view_session_id=None, viewer_connection_type=None, viewer_device_model=None, weighted_average_bitrate=None, custom_1=None, custom_2=None, custom_3=None, custom_4=None, custom_5=None, custom_6=None, custom_7=None, custom_8=None, custom_9=None, custom_10=None, live_stream_latency=None, asset_id=None, environment_id=None, live_stream_id=None, mux_embed=None, playback_id=None, player_error_context=None, view_drm_type=None, view_dropped_frame_count=None, view_has_ad=None, video_startup_failure=None, ad_attempt_count=None, ad_break_count=None, ad_break_error_count=None, ad_break_error_percentage=None, ad_error_count=None, ad_error_percentage=None, ad_impression_count=None, ad_startup_error_count=None, ad_startup_error_percentage=None, ad_exit_before_start_count=None, ad_exit_before_start_percentage=None, long_resume=None, long_rebuffering=None, playback_failure_error_type_id=None, playback_business_exception_error_type_id=None, video_startup_business_exception_error_type_id=None, playback_failure=None, ad_playback_failure_error_type_id=None, view_content_startup_time=None, ad_preroll_startup_time=None, view_dropped=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, view_total_upscaling=None, preroll_ad_asset_hostname=None, player_source_domain=None, region=None, viewer_user_agent=None, preroll_requested=None, page_type=None, startup_score=None, view_seek_duration=None, country_name=None, player_source_height=None, longitude=None, buffering_count=None, video_duration=None, player_source_type=None, city=None, view_id=None, platform_description=None, video_startup_preroll_request_time=None, viewer_device_name=None, video_series=None, viewer_application_name=None, updated_at=None, view_total_content_playback_time=None, cdn=None, player_instance_id=None, video_language=None, player_source_width=None, player_error_message=None, player_mux_plugin_version=None, watched=None, playback_score=None, page_url=None, metro=None, view_max_request_latency=None, requests_for_first_preroll=None, view_total_downscaling=None, latitude=None, player_source_host_name=None, inserted_at=None, view_end=None, mux_embed_version=None, player_language=None, page_load_time=None, viewer_device_category=None, video_startup_preroll_load_time=None, player_version=None, watch_time=None, player_source_stream_type=None, preroll_ad_tag_hostname=None, viewer_device_manufacturer=None, rebuffering_score=None, experiment_name=None, viewer_os_version=None, player_preload=None, buffering_duration=None, player_view_count=None, player_software=None, player_load_time=None, platform_summary=None, video_encoding_variant=None, player_width=None, view_seek_count=None, viewer_experience_score=None, view_error_id=None, video_variant_name=None, preroll_played=None, viewer_application_engine=None, viewer_os_architecture=None, player_error_code=None, buffering_rate=None, events=None, player_name=None, view_start=None, view_average_request_throughput=None, video_producer=None, error_type_id=None, mux_viewer_id=None, video_id=None, continent_code=None, session_id=None, exit_before_video_start=None, video_content_type=None, viewer_os_family=None, player_poster=None, view_average_request_latency=None, video_variant_id=None, player_source_duration=None, player_source_url=None, mux_api_version=None, video_title=None, id=None, short_time=None, rebuffer_percentage=None, time_to_first_frame=None, viewer_user_id=None, video_stream_type=None, player_startup_time=None, viewer_application_version=None, view_max_downscale_percentage=None, view_max_upscale_percentage=None, country_code=None, used_fullscreen=None, isp=None, property_id=None, player_autoplay=None, player_height=None, asn=None, asn_name=None, quality_score=None, player_software_version=None, player_mux_plugin_name=None, sub_property_id=None, player_remote_played=None, view_max_playhead_position=None, view_playing_time=None, view_session_id=None, viewer_connection_type=None, viewer_device_model=None, weighted_average_bitrate=None, custom_1=None, custom_2=None, custom_3=None, custom_4=None, custom_5=None, custom_6=None, custom_7=None, custom_8=None, custom_9=None, custom_10=None, live_stream_latency=None, asset_id=None, environment_id=None, live_stream_id=None, mux_embed=None, playback_id=None, player_error_context=None, view_drm_type=None, view_dropped_frame_count=None, view_has_ad=None, video_startup_failure=None, ad_attempt_count=None, ad_break_count=None, ad_break_error_count=None, ad_break_error_percentage=None, ad_error_count=None, ad_error_percentage=None, ad_impression_count=None, ad_startup_error_count=None, ad_startup_error_percentage=None, ad_exit_before_start_count=None, ad_exit_before_start_percentage=None, long_resume=None, long_rebuffering=None, playback_failure_error_type_id=None, playback_business_exception_error_type_id=None, video_startup_business_exception_error_type_id=None, playback_failure=None, ad_playback_failure_error_type_id=None, view_content_startup_time=None, ad_preroll_startup_time=None, view_dropped=None, client_application_name=None, client_application_version=None, video_affiliate=None, viewer_plan=None, viewer_plan_status=None, viewer_plan_category=None, view_drm_level=None, video_brand=None, used_pip=None, time_shift_enabled=None, used_captions=None, video_codec=None, audio_codec=None, video_dynamic_range_type=None, view_cdn_edge_pop=None, view_cdn_origin=None, local_vars_configuration=None): # noqa: E501 """VideoView - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() @@ -534,6 +566,22 @@ def __init__(self, view_total_upscaling=None, preroll_ad_asset_hostname=None, pl self._view_content_startup_time = None self._ad_preroll_startup_time = None self._view_dropped = None + self._client_application_name = None + self._client_application_version = None + self._video_affiliate = None + self._viewer_plan = None + self._viewer_plan_status = None + self._viewer_plan_category = None + self._view_drm_level = None + self._video_brand = None + self._used_pip = None + self._time_shift_enabled = None + self._used_captions = None + self._video_codec = None + self._audio_codec = None + self._video_dynamic_range_type = None + self._view_cdn_edge_pop = None + self._view_cdn_origin = None self.discriminator = None self.view_total_upscaling = view_total_upscaling @@ -722,6 +770,25 @@ def __init__(self, view_total_upscaling=None, preroll_ad_asset_hostname=None, pl self.ad_preroll_startup_time = ad_preroll_startup_time if view_dropped is not None: self.view_dropped = view_dropped + self.client_application_name = client_application_name + self.client_application_version = client_application_version + self.video_affiliate = video_affiliate + self.viewer_plan = viewer_plan + self.viewer_plan_status = viewer_plan_status + self.viewer_plan_category = viewer_plan_category + self.view_drm_level = view_drm_level + self.video_brand = video_brand + if used_pip is not None: + self.used_pip = used_pip + if time_shift_enabled is not None: + self.time_shift_enabled = time_shift_enabled + if used_captions is not None: + self.used_captions = used_captions + self.video_codec = video_codec + self.audio_codec = audio_codec + self.video_dynamic_range_type = video_dynamic_range_type + self.view_cdn_edge_pop = view_cdn_edge_pop + self.view_cdn_origin = view_cdn_origin @property def view_total_upscaling(self): @@ -4125,6 +4192,342 @@ def view_dropped(self, view_dropped): self._view_dropped = view_dropped + @property + def client_application_name(self): + """Gets the client_application_name of this VideoView. # noqa: E501 + + + :return: The client_application_name of this VideoView. # noqa: E501 + :rtype: str + """ + return self._client_application_name + + @client_application_name.setter + def client_application_name(self, client_application_name): + """Sets the client_application_name of this VideoView. + + + :param client_application_name: The client_application_name of this VideoView. # noqa: E501 + :type client_application_name: str + """ + + self._client_application_name = client_application_name + + @property + def client_application_version(self): + """Gets the client_application_version of this VideoView. # noqa: E501 + + + :return: The client_application_version of this VideoView. # noqa: E501 + :rtype: str + """ + return self._client_application_version + + @client_application_version.setter + def client_application_version(self, client_application_version): + """Sets the client_application_version of this VideoView. + + + :param client_application_version: The client_application_version of this VideoView. # noqa: E501 + :type client_application_version: str + """ + + self._client_application_version = client_application_version + + @property + def video_affiliate(self): + """Gets the video_affiliate of this VideoView. # noqa: E501 + + + :return: The video_affiliate of this VideoView. # noqa: E501 + :rtype: str + """ + return self._video_affiliate + + @video_affiliate.setter + def video_affiliate(self, video_affiliate): + """Sets the video_affiliate of this VideoView. + + + :param video_affiliate: The video_affiliate of this VideoView. # noqa: E501 + :type video_affiliate: str + """ + + self._video_affiliate = video_affiliate + + @property + def viewer_plan(self): + """Gets the viewer_plan of this VideoView. # noqa: E501 + + + :return: The viewer_plan of this VideoView. # noqa: E501 + :rtype: str + """ + return self._viewer_plan + + @viewer_plan.setter + def viewer_plan(self, viewer_plan): + """Sets the viewer_plan of this VideoView. + + + :param viewer_plan: The viewer_plan of this VideoView. # noqa: E501 + :type viewer_plan: str + """ + + self._viewer_plan = viewer_plan + + @property + def viewer_plan_status(self): + """Gets the viewer_plan_status of this VideoView. # noqa: E501 + + + :return: The viewer_plan_status of this VideoView. # noqa: E501 + :rtype: str + """ + return self._viewer_plan_status + + @viewer_plan_status.setter + def viewer_plan_status(self, viewer_plan_status): + """Sets the viewer_plan_status of this VideoView. + + + :param viewer_plan_status: The viewer_plan_status of this VideoView. # noqa: E501 + :type viewer_plan_status: str + """ + + self._viewer_plan_status = viewer_plan_status + + @property + def viewer_plan_category(self): + """Gets the viewer_plan_category of this VideoView. # noqa: E501 + + + :return: The viewer_plan_category of this VideoView. # noqa: E501 + :rtype: str + """ + return self._viewer_plan_category + + @viewer_plan_category.setter + def viewer_plan_category(self, viewer_plan_category): + """Sets the viewer_plan_category of this VideoView. + + + :param viewer_plan_category: The viewer_plan_category of this VideoView. # noqa: E501 + :type viewer_plan_category: str + """ + + self._viewer_plan_category = viewer_plan_category + + @property + def view_drm_level(self): + """Gets the view_drm_level of this VideoView. # noqa: E501 + + + :return: The view_drm_level of this VideoView. # noqa: E501 + :rtype: str + """ + return self._view_drm_level + + @view_drm_level.setter + def view_drm_level(self, view_drm_level): + """Sets the view_drm_level of this VideoView. + + + :param view_drm_level: The view_drm_level of this VideoView. # noqa: E501 + :type view_drm_level: str + """ + + self._view_drm_level = view_drm_level + + @property + def video_brand(self): + """Gets the video_brand of this VideoView. # noqa: E501 + + + :return: The video_brand of this VideoView. # noqa: E501 + :rtype: str + """ + return self._video_brand + + @video_brand.setter + def video_brand(self, video_brand): + """Sets the video_brand of this VideoView. + + + :param video_brand: The video_brand of this VideoView. # noqa: E501 + :type video_brand: str + """ + + self._video_brand = video_brand + + @property + def used_pip(self): + """Gets the used_pip of this VideoView. # noqa: E501 + + + :return: The used_pip of this VideoView. # noqa: E501 + :rtype: bool + """ + return self._used_pip + + @used_pip.setter + def used_pip(self, used_pip): + """Sets the used_pip of this VideoView. + + + :param used_pip: The used_pip of this VideoView. # noqa: E501 + :type used_pip: bool + """ + + self._used_pip = used_pip + + @property + def time_shift_enabled(self): + """Gets the time_shift_enabled of this VideoView. # noqa: E501 + + + :return: The time_shift_enabled of this VideoView. # noqa: E501 + :rtype: bool + """ + return self._time_shift_enabled + + @time_shift_enabled.setter + def time_shift_enabled(self, time_shift_enabled): + """Sets the time_shift_enabled of this VideoView. + + + :param time_shift_enabled: The time_shift_enabled of this VideoView. # noqa: E501 + :type time_shift_enabled: bool + """ + + self._time_shift_enabled = time_shift_enabled + + @property + def used_captions(self): + """Gets the used_captions of this VideoView. # noqa: E501 + + + :return: The used_captions of this VideoView. # noqa: E501 + :rtype: bool + """ + return self._used_captions + + @used_captions.setter + def used_captions(self, used_captions): + """Sets the used_captions of this VideoView. + + + :param used_captions: The used_captions of this VideoView. # noqa: E501 + :type used_captions: bool + """ + + self._used_captions = used_captions + + @property + def video_codec(self): + """Gets the video_codec of this VideoView. # noqa: E501 + + + :return: The video_codec of this VideoView. # noqa: E501 + :rtype: str + """ + return self._video_codec + + @video_codec.setter + def video_codec(self, video_codec): + """Sets the video_codec of this VideoView. + + + :param video_codec: The video_codec of this VideoView. # noqa: E501 + :type video_codec: str + """ + + self._video_codec = video_codec + + @property + def audio_codec(self): + """Gets the audio_codec of this VideoView. # noqa: E501 + + + :return: The audio_codec of this VideoView. # noqa: E501 + :rtype: str + """ + return self._audio_codec + + @audio_codec.setter + def audio_codec(self, audio_codec): + """Sets the audio_codec of this VideoView. + + + :param audio_codec: The audio_codec of this VideoView. # noqa: E501 + :type audio_codec: str + """ + + self._audio_codec = audio_codec + + @property + def video_dynamic_range_type(self): + """Gets the video_dynamic_range_type of this VideoView. # noqa: E501 + + + :return: The video_dynamic_range_type of this VideoView. # noqa: E501 + :rtype: str + """ + return self._video_dynamic_range_type + + @video_dynamic_range_type.setter + def video_dynamic_range_type(self, video_dynamic_range_type): + """Sets the video_dynamic_range_type of this VideoView. + + + :param video_dynamic_range_type: The video_dynamic_range_type of this VideoView. # noqa: E501 + :type video_dynamic_range_type: str + """ + + self._video_dynamic_range_type = video_dynamic_range_type + + @property + def view_cdn_edge_pop(self): + """Gets the view_cdn_edge_pop of this VideoView. # noqa: E501 + + + :return: The view_cdn_edge_pop of this VideoView. # noqa: E501 + :rtype: str + """ + return self._view_cdn_edge_pop + + @view_cdn_edge_pop.setter + def view_cdn_edge_pop(self, view_cdn_edge_pop): + """Sets the view_cdn_edge_pop of this VideoView. + + + :param view_cdn_edge_pop: The view_cdn_edge_pop of this VideoView. # noqa: E501 + :type view_cdn_edge_pop: str + """ + + self._view_cdn_edge_pop = view_cdn_edge_pop + + @property + def view_cdn_origin(self): + """Gets the view_cdn_origin of this VideoView. # noqa: E501 + + + :return: The view_cdn_origin of this VideoView. # noqa: E501 + :rtype: str + """ + return self._view_cdn_origin + + @view_cdn_origin.setter + def view_cdn_origin(self, view_cdn_origin): + """Sets the view_cdn_origin of this VideoView. + + + :param view_cdn_origin: The view_cdn_origin of this VideoView. # noqa: E501 + :type view_cdn_origin: str + """ + + self._view_cdn_origin = view_cdn_origin + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/setup.py b/setup.py index c8c24f5..a6721fe 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "mux_python" -VERSION = "3.20.0" +VERSION = "4.0.0" # To install the library, run the following # # python setup.py install diff --git a/test/test_create_static_rendition_request.py b/test/test_create_static_rendition_request.py new file mode 100644 index 0000000..d116919 --- /dev/null +++ b/test/test_create_static_rendition_request.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Mux API + + 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. # noqa: E501 + + The version of the OpenAPI document: v1 + Contact: devex@mux.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mux_python +from mux_python.models.create_static_rendition_request import CreateStaticRenditionRequest # noqa: E501 +from mux_python.rest import ApiException + +class TestCreateStaticRenditionRequest(unittest.TestCase): + """CreateStaticRenditionRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test CreateStaticRenditionRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mux_python.models.create_static_rendition_request.CreateStaticRenditionRequest() # noqa: E501 + if include_optional : + return CreateStaticRenditionRequest( + resolution = 'highest', + passthrough = '' + ) + else : + return CreateStaticRenditionRequest( + ) + + def testCreateStaticRenditionRequest(self): + """Test CreateStaticRenditionRequest""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_static_rendition_response.py b/test/test_create_static_rendition_response.py new file mode 100644 index 0000000..18acd47 --- /dev/null +++ b/test/test_create_static_rendition_response.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Mux API + + 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. # noqa: E501 + + The version of the OpenAPI document: v1 + Contact: devex@mux.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mux_python +from mux_python.models.create_static_rendition_response import CreateStaticRenditionResponse # noqa: E501 +from mux_python.rest import ApiException + +class TestCreateStaticRenditionResponse(unittest.TestCase): + """CreateStaticRenditionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test CreateStaticRenditionResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mux_python.models.create_static_rendition_response.CreateStaticRenditionResponse() # noqa: E501 + if include_optional : + return CreateStaticRenditionResponse( + data = mux_python.models.static_rendition.StaticRendition( + name = 'low.mp4', + ext = 'mp4', + height = 56, + width = 56, + bitrate = 56, + filesize = '', + type = 'standard', + status = 'ready', + resolution_tier = '2160p', + resolution = 'highest', + id = '', + passthrough = '', ) + ) + else : + return CreateStaticRenditionResponse( + ) + + def testCreateStaticRenditionResponse(self): + """Test CreateStaticRenditionResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_static_rendition.py b/test/test_static_rendition.py new file mode 100644 index 0000000..ec418c9 --- /dev/null +++ b/test/test_static_rendition.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + Mux API + + 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. # noqa: E501 + + The version of the OpenAPI document: v1 + Contact: devex@mux.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mux_python +from mux_python.models.static_rendition import StaticRendition # noqa: E501 +from mux_python.rest import ApiException + +class TestStaticRendition(unittest.TestCase): + """StaticRendition unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test StaticRendition + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mux_python.models.static_rendition.StaticRendition() # noqa: E501 + if include_optional : + return StaticRendition( + name = 'low.mp4', + ext = 'mp4', + height = 56, + width = 56, + bitrate = 56, + filesize = '', + type = 'standard', + status = 'ready', + resolution_tier = '2160p', + resolution = 'highest', + id = '', + passthrough = '' + ) + else : + return StaticRendition( + ) + + def testStaticRendition(self): + """Test StaticRendition""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_live_stream_new_asset_settings_static_renditions_request.py b/test/test_update_live_stream_new_asset_settings_static_renditions_request.py new file mode 100644 index 0000000..6d1db32 --- /dev/null +++ b/test/test_update_live_stream_new_asset_settings_static_renditions_request.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Mux API + + 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. # noqa: E501 + + The version of the OpenAPI document: v1 + Contact: devex@mux.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mux_python +from mux_python.models.update_live_stream_new_asset_settings_static_renditions_request import UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest # noqa: E501 +from mux_python.rest import ApiException + +class TestUpdateLiveStreamNewAssetSettingsStaticRenditionsRequest(unittest.TestCase): + """UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mux_python.models.update_live_stream_new_asset_settings_static_renditions_request.UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest() # noqa: E501 + if include_optional : + return UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest( + static_renditions = [ + mux_python.models.create_static_rendition_request.CreateStaticRenditionRequest( + resolution = 'highest', + passthrough = '', ) + ] + ) + else : + return UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest( + ) + + def testUpdateLiveStreamNewAssetSettingsStaticRenditionsRequest(self): + """Test UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main()