From ef762ab1db1cc00b36cb217c951ad53137a015fe Mon Sep 17 00:00:00 2001 From: Justin Sanford Date: Tue, 7 May 2024 09:48:08 -0700 Subject: [PATCH] v3.16.0 (#79) --- .openapi-generator/FILES | 12 ++ docs/AbridgedVideoView.md | 1 + docs/CreatePlaybackRestrictionRequest.md | 1 + docs/DeliveryReport.md | 1 + docs/GenerateTrackSubtitlesResponse.md | 2 +- docs/PlaybackRestriction.md | 1 + docs/PlaybackRestrictionsApi.md | 78 +++++++- docs/UpdateLiveStreamNewAssetSettings.md | 11 ++ docs/UpdateLiveStreamRequest.md | 1 + docs/UpdateUserAgentRestrictionRequest.md | 11 ++ docs/UserAgentRestrictionRequest.md | 12 ++ docs/UserAgentRestrictionSettings.md | 12 ++ docs/VideoView.md | 6 + gen/generator-config.json | 2 +- mux_python/__init__.py | 6 +- mux_python/api/playback_restrictions_api.py | 150 ++++++++++++++++ mux_python/api_client.py | 2 +- mux_python/configuration.py | 2 +- mux_python/models/__init__.py | 4 + mux_python/models/abridged_video_view.py | 32 +++- .../create_playback_restriction_request.py | 32 +++- mux_python/models/delivery_report.py | 36 +++- .../generate_track_subtitles_response.py | 6 +- mux_python/models/playback_restriction.py | 32 +++- .../update_live_stream_new_asset_settings.py | 140 +++++++++++++++ .../models/update_live_stream_request.py | 32 +++- .../update_user_agent_restriction_request.py | 162 +++++++++++++++++ .../models/user_agent_restriction_request.py | 162 +++++++++++++++++ .../models/user_agent_restriction_settings.py | 162 +++++++++++++++++ mux_python/models/video_view.py | 166 +++++++++++++++++- setup.py | 2 +- ...t_update_live_stream_new_asset_settings.py | 52 ++++++ ...t_update_user_agent_restriction_request.py | 53 ++++++ test/test_user_agent_restriction_request.py | 53 ++++++ test/test_user_agent_restriction_settings.py | 53 ++++++ 35 files changed, 1458 insertions(+), 32 deletions(-) create mode 100644 docs/UpdateLiveStreamNewAssetSettings.md create mode 100644 docs/UpdateUserAgentRestrictionRequest.md create mode 100644 docs/UserAgentRestrictionRequest.md create mode 100644 docs/UserAgentRestrictionSettings.md create mode 100644 mux_python/models/update_live_stream_new_asset_settings.py create mode 100644 mux_python/models/update_user_agent_restriction_request.py create mode 100644 mux_python/models/user_agent_restriction_request.py create mode 100644 mux_python/models/user_agent_restriction_settings.py create mode 100644 test/test_update_live_stream_new_asset_settings.py create mode 100644 test/test_update_user_agent_restriction_request.py create mode 100644 test/test_user_agent_restriction_request.py create mode 100644 test/test_user_agent_restriction_settings.py diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index f695866..ce0d6e4 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -164,13 +164,17 @@ docs/UpdateAssetMasterAccessRequest.md docs/UpdateAssetRequest.md docs/UpdateLiveStreamEmbeddedSubtitlesRequest.md docs/UpdateLiveStreamGeneratedSubtitlesRequest.md +docs/UpdateLiveStreamNewAssetSettings.md docs/UpdateLiveStreamRequest.md docs/UpdateReferrerDomainRestrictionRequest.md docs/UpdateTranscriptionVocabularyRequest.md +docs/UpdateUserAgentRestrictionRequest.md docs/UpdateWebInputUrlRequest.md docs/Upload.md docs/UploadError.md docs/UploadResponse.md +docs/UserAgentRestrictionRequest.md +docs/UserAgentRestrictionSettings.md docs/VideoView.md docs/VideoViewEvent.md docs/VideoViewResponse.md @@ -349,13 +353,17 @@ mux_python/models/update_asset_mp4_support_request.py 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_request.py mux_python/models/update_referrer_domain_restriction_request.py mux_python/models/update_transcription_vocabulary_request.py +mux_python/models/update_user_agent_restriction_request.py mux_python/models/update_web_input_url_request.py mux_python/models/upload.py mux_python/models/upload_error.py mux_python/models/upload_response.py +mux_python/models/user_agent_restriction_request.py +mux_python/models/user_agent_restriction_settings.py mux_python/models/video_view.py mux_python/models/video_view_event.py mux_python/models/video_view_response.py @@ -367,4 +375,8 @@ setup.cfg setup.py test-requirements.txt test/__init__.py +test/test_update_live_stream_new_asset_settings.py +test/test_update_user_agent_restriction_request.py +test/test_user_agent_restriction_request.py +test/test_user_agent_restriction_settings.py tox.ini diff --git a/docs/AbridgedVideoView.md b/docs/AbridgedVideoView.md index 9289eaa..edabf88 100644 --- a/docs/AbridgedVideoView.md +++ b/docs/AbridgedVideoView.md @@ -16,6 +16,7 @@ Name | Type | Description | Notes **view_end** | **str** | | [optional] **viewer_experience_score** | **float** | | [optional] **watch_time** | **int** | | [optional] +**playback_failure** | **bool** | | [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/CreatePlaybackRestrictionRequest.md b/docs/CreatePlaybackRestrictionRequest.md index 7e0772d..116cb5a 100644 --- a/docs/CreatePlaybackRestrictionRequest.md +++ b/docs/CreatePlaybackRestrictionRequest.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **referrer** | [**ReferrerDomainRestriction**](ReferrerDomainRestriction.md) | | [optional] +**user_agent** | [**UserAgentRestrictionRequest**](UserAgentRestrictionRequest.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/DeliveryReport.md b/docs/DeliveryReport.md index a41b7ab..b1c860c 100644 --- a/docs/DeliveryReport.md +++ b/docs/DeliveryReport.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **asset_state** | **str** | The state of the asset. | [optional] **asset_duration** | **float** | The duration of the asset in seconds. | [optional] **asset_resolution_tier** | **str** | The resolution tier that the asset was ingested at, affecting billing for ingest & storage | [optional] +**asset_encoding_tier** | **str** | The encoding tier that the asset was ingested at. [See the encoding tiers guide for more details.](https://docs.mux.com/guides/use-encoding-tiers) | [optional] **delivered_seconds** | **float** | Total number of delivered seconds during this time window. | [optional] **delivered_seconds_by_resolution** | [**DeliveryReportDeliveredSecondsByResolution**](DeliveryReportDeliveredSecondsByResolution.md) | | [optional] diff --git a/docs/GenerateTrackSubtitlesResponse.md b/docs/GenerateTrackSubtitlesResponse.md index 6e00d2a..754f711 100644 --- a/docs/GenerateTrackSubtitlesResponse.md +++ b/docs/GenerateTrackSubtitlesResponse.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**Track**](Track.md) | | [optional] +**data** | [**list[Track]**](Track.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/PlaybackRestriction.md b/docs/PlaybackRestriction.md index 03b5fad..8487653 100644 --- a/docs/PlaybackRestriction.md +++ b/docs/PlaybackRestriction.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **created_at** | **str** | Time the Playback Restriction was created, defined as a Unix timestamp (seconds since epoch). | [optional] **updated_at** | **str** | Time the Playback Restriction was last updated, defined as a Unix timestamp (seconds since epoch). | [optional] **referrer** | [**ReferrerDomainRestriction**](ReferrerDomainRestriction.md) | | [optional] +**user_agent** | [**UserAgentRestrictionSettings**](UserAgentRestrictionSettings.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/PlaybackRestrictionsApi.md b/docs/PlaybackRestrictionsApi.md index e6f4805..2b299e3 100644 --- a/docs/PlaybackRestrictionsApi.md +++ b/docs/PlaybackRestrictionsApi.md @@ -9,6 +9,7 @@ Method | HTTP request | Description [**get_playback_restriction**](PlaybackRestrictionsApi.md#get_playback_restriction) | **GET** /video/v1/playback-restrictions/{PLAYBACK_RESTRICTION_ID} | Retrieve a Playback Restriction [**list_playback_restrictions**](PlaybackRestrictionsApi.md#list_playback_restrictions) | **GET** /video/v1/playback-restrictions | List Playback Restrictions [**update_referrer_domain_restriction**](PlaybackRestrictionsApi.md#update_referrer_domain_restriction) | **PUT** /video/v1/playback-restrictions/{PLAYBACK_RESTRICTION_ID}/referrer | Update the Referrer Playback Restriction +[**update_user_agent_restriction**](PlaybackRestrictionsApi.md#update_user_agent_restriction) | **PUT** /video/v1/playback-restrictions/{PLAYBACK_RESTRICTION_ID}/user_agent | Update the User Agent Restriction # **create_playback_restriction** @@ -48,7 +49,7 @@ configuration = mux_python.Configuration( with mux_python.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = mux_python.PlaybackRestrictionsApi(api_client) - create_playback_restriction_request = {"referrer":{"allowed_domains":["*.example.com"],"allow_no_referrer":true}} # CreatePlaybackRestrictionRequest | + create_playback_restriction_request = {"referrer":{"allowed_domains":["*.example.com"],"allow_no_referrer":true},"user_agent":{"allow_no_user_agent":false,"allow_high_risk_user_agent":false}} # CreatePlaybackRestrictionRequest | try: # Create a Playback Restriction @@ -379,3 +380,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_user_agent_restriction** +> PlaybackRestrictionResponse update_user_agent_restriction(playback_restriction_id, update_user_agent_restriction_request) + +Update the User Agent Restriction + +Allows you to modify how Mux validates playback requests with different user agents. Please see [Using User-Agent HTTP header for validation](https://docs.mux.com/guides/secure-video-playback#using-user-agent-http-header-for-validation) for more details on this feature. + +### 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.PlaybackRestrictionsApi(api_client) + playback_restriction_id = 'playback_restriction_id_example' # str | ID of the Playback Restriction. +update_user_agent_restriction_request = {"allow_no_user_agent":false,"allow_high_risk_user_agent":false} # UpdateUserAgentRestrictionRequest | + + try: + # Update the User Agent Restriction + api_response = api_instance.update_user_agent_restriction(playback_restriction_id, update_user_agent_restriction_request) + pprint(api_response) + except ApiException as e: + print("Exception when calling PlaybackRestrictionsApi->update_user_agent_restriction: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **playback_restriction_id** | **str**| ID of the Playback Restriction. | + **update_user_agent_restriction_request** | [**UpdateUserAgentRestrictionRequest**](UpdateUserAgentRestrictionRequest.md)| | + +### Return type + +[**PlaybackRestrictionResponse**](PlaybackRestrictionResponse.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/UpdateLiveStreamNewAssetSettings.md b/docs/UpdateLiveStreamNewAssetSettings.md new file mode 100644 index 0000000..62d0db2 --- /dev/null +++ b/docs/UpdateLiveStreamNewAssetSettings.md @@ -0,0 +1,11 @@ +# UpdateLiveStreamNewAssetSettings + +Updates the new asset settings to use to generate a new asset for this live stream. Only the `mp4_support` setting 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] + +[[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/UpdateLiveStreamRequest.md b/docs/UpdateLiveStreamRequest.md index cbf8a91..888230a 100644 --- a/docs/UpdateLiveStreamRequest.md +++ b/docs/UpdateLiveStreamRequest.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **use_slate_for_standard_latency** | **bool** | By default, Standard Latency live streams do not have slate media inserted while waiting for live streaming software to reconnect to Mux. Setting this to true enables slate insertion on a Standard Latency stream. | [optional] [default to False] **reconnect_slate_url** | **str** | The URL of the image file that Mux should download and use as slate media during interruptions of the live stream media. This file will be downloaded each time a new recorded asset is created from the live stream. Set this to a blank string to clear the value so that the default slate media will be used. | [optional] **max_continuous_duration** | **int** | The time in seconds a live stream may be continuously active before being disconnected. Defaults to 12 hours. | [optional] [default to 43200] +**new_asset_settings** | [**UpdateLiveStreamNewAssetSettings**](UpdateLiveStreamNewAssetSettings.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/UpdateUserAgentRestrictionRequest.md b/docs/UpdateUserAgentRestrictionRequest.md new file mode 100644 index 0000000..b69222f --- /dev/null +++ b/docs/UpdateUserAgentRestrictionRequest.md @@ -0,0 +1,11 @@ +# UpdateUserAgentRestrictionRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allow_no_user_agent** | **bool** | Whether or not to allow views without a `User-Agent` HTTP request header. | [optional] [default to True] +**allow_high_risk_user_agent** | **bool** | Whether or not to allow high risk user agents. The high risk user agents are defined by Mux. | [optional] [default to True] + +[[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/UserAgentRestrictionRequest.md b/docs/UserAgentRestrictionRequest.md new file mode 100644 index 0000000..e222d42 --- /dev/null +++ b/docs/UserAgentRestrictionRequest.md @@ -0,0 +1,12 @@ +# UserAgentRestrictionRequest + +Rules that control what user agents are allowed to play your videos. Please see [Using User-Agent HTTP header for validation](https://docs.mux.com/guides/secure-video-playback#using-user-agent-http-header-for-validation) for more details on this feature. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allow_no_user_agent** | **bool** | Whether or not to allow views without a `User-Agent` HTTP request header. | [optional] [default to True] +**allow_high_risk_user_agent** | **bool** | Whether or not to allow high risk user agents. The high risk user agents are defined by Mux. | [optional] [default to True] + +[[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/UserAgentRestrictionSettings.md b/docs/UserAgentRestrictionSettings.md new file mode 100644 index 0000000..7f29179 --- /dev/null +++ b/docs/UserAgentRestrictionSettings.md @@ -0,0 +1,12 @@ +# UserAgentRestrictionSettings + +Rules that control what user agents are allowed to play your videos. Please see [Using User-Agent HTTP header for validation](https://docs.mux.com/guides/secure-video-playback#using-user-agent-http-header-for-validation) for more details on this feature. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allow_no_user_agent** | **bool** | Whether or not to allow views without a `User-Agent` HTTP request header. | [optional] [default to True] +**allow_high_risk_user_agent** | **bool** | Whether or not to allow high risk user agents. The high risk user agents are defined by Mux. | [optional] [default to True] + +[[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 9a3be07..209bcd0 100644 --- a/docs/VideoView.md +++ b/docs/VideoView.md @@ -160,6 +160,12 @@ Name | Type | Description | Notes **playback_failure_error_type_id** | **int** | | [optional] **playback_business_exception_error_type_id** | **int** | | [optional] **video_startup_business_exception_error_type_id** | **int** | | [optional] +**playback_failure** | **bool** | | [optional] +**ad_playback_failure_error_type_id** | **int** | | [optional] +**view_content_startup_time** | **int** | | [optional] +**ad_preroll_startup_time** | **int** | | [optional] +**ad_watch_time** | **int** | | [optional] +**view_content_watch_time** | **int** | | [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 bfecf22..ca50ef8 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.15.0" + "packageVersion": "3.16.0" } diff --git a/mux_python/__init__.py b/mux_python/__init__.py index d2eaee0..6605cac 100644 --- a/mux_python/__init__.py +++ b/mux_python/__init__.py @@ -15,7 +15,7 @@ from __future__ import absolute_import -__version__ = "3.15.0" +__version__ = "3.16.0" # import apis into sdk package from mux_python.api.assets_api import AssetsApi @@ -194,13 +194,17 @@ from mux_python.models.update_asset_request import UpdateAssetRequest 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_request import UpdateLiveStreamRequest from mux_python.models.update_referrer_domain_restriction_request import UpdateReferrerDomainRestrictionRequest from mux_python.models.update_transcription_vocabulary_request import UpdateTranscriptionVocabularyRequest +from mux_python.models.update_user_agent_restriction_request import UpdateUserAgentRestrictionRequest from mux_python.models.update_web_input_url_request import UpdateWebInputUrlRequest from mux_python.models.upload import Upload from mux_python.models.upload_error import UploadError from mux_python.models.upload_response import UploadResponse +from mux_python.models.user_agent_restriction_request import UserAgentRestrictionRequest +from mux_python.models.user_agent_restriction_settings import UserAgentRestrictionSettings from mux_python.models.video_view import VideoView from mux_python.models.video_view_event import VideoViewEvent from mux_python.models.video_view_response import VideoViewResponse diff --git a/mux_python/api/playback_restrictions_api.py b/mux_python/api/playback_restrictions_api.py index bdf2003..5c80a6e 100644 --- a/mux_python/api/playback_restrictions_api.py +++ b/mux_python/api/playback_restrictions_api.py @@ -727,3 +727,153 @@ def update_referrer_domain_restriction_with_http_info(self, playback_restriction _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) + + def update_user_agent_restriction(self, playback_restriction_id, update_user_agent_restriction_request, **kwargs): # noqa: E501 + """Update the User Agent Restriction # noqa: E501 + + Allows you to modify how Mux validates playback requests with different user agents. Please see [Using User-Agent HTTP header for validation](https://docs.mux.com/guides/secure-video-playback#using-user-agent-http-header-for-validation) for more details on this feature. # 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_user_agent_restriction(playback_restriction_id, update_user_agent_restriction_request, async_req=True) + >>> result = thread.get() + + :param playback_restriction_id: ID of the Playback Restriction. (required) + :type playback_restriction_id: str + :param update_user_agent_restriction_request: (required) + :type update_user_agent_restriction_request: UpdateUserAgentRestrictionRequest + :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: PlaybackRestrictionResponse + """ + kwargs['_return_http_data_only'] = True + return self.update_user_agent_restriction_with_http_info(playback_restriction_id, update_user_agent_restriction_request, **kwargs) # noqa: E501 + + def update_user_agent_restriction_with_http_info(self, playback_restriction_id, update_user_agent_restriction_request, **kwargs): # noqa: E501 + """Update the User Agent Restriction # noqa: E501 + + Allows you to modify how Mux validates playback requests with different user agents. Please see [Using User-Agent HTTP header for validation](https://docs.mux.com/guides/secure-video-playback#using-user-agent-http-header-for-validation) for more details on this feature. # 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_user_agent_restriction_with_http_info(playback_restriction_id, update_user_agent_restriction_request, async_req=True) + >>> result = thread.get() + + :param playback_restriction_id: ID of the Playback Restriction. (required) + :type playback_restriction_id: str + :param update_user_agent_restriction_request: (required) + :type update_user_agent_restriction_request: UpdateUserAgentRestrictionRequest + :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(PlaybackRestrictionResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'playback_restriction_id', + 'update_user_agent_restriction_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_user_agent_restriction" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'playback_restriction_id' is set + if self.api_client.client_side_validation and ('playback_restriction_id' not in local_var_params or # noqa: E501 + local_var_params['playback_restriction_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `playback_restriction_id` when calling `update_user_agent_restriction`") # noqa: E501 + # verify the required parameter 'update_user_agent_restriction_request' is set + if self.api_client.client_side_validation and ('update_user_agent_restriction_request' not in local_var_params or # noqa: E501 + local_var_params['update_user_agent_restriction_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `update_user_agent_restriction_request` when calling `update_user_agent_restriction`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'playback_restriction_id' in local_var_params: + path_params['PLAYBACK_RESTRICTION_ID'] = local_var_params['playback_restriction_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'update_user_agent_restriction_request' in local_var_params: + body_params = local_var_params['update_user_agent_restriction_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: "PlaybackRestrictionResponse", + } + + return self.api_client.call_api( + '/video/v1/playback-restrictions/{PLAYBACK_RESTRICTION_ID}/user_agent', '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 89eccb8..0945ed8 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 = 'OpenAPI-Generator/3.15.0/python' + self.user_agent = 'OpenAPI-Generator/3.16.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/mux_python/configuration.py b/mux_python/configuration.py index 08e4e8c..27acd4b 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.15.0".\ + "SDK Package Version: 3.16.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 a6fb3f1..3458182 100644 --- a/mux_python/models/__init__.py +++ b/mux_python/models/__init__.py @@ -160,13 +160,17 @@ from mux_python.models.update_asset_request import UpdateAssetRequest 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_request import UpdateLiveStreamRequest from mux_python.models.update_referrer_domain_restriction_request import UpdateReferrerDomainRestrictionRequest from mux_python.models.update_transcription_vocabulary_request import UpdateTranscriptionVocabularyRequest +from mux_python.models.update_user_agent_restriction_request import UpdateUserAgentRestrictionRequest from mux_python.models.update_web_input_url_request import UpdateWebInputUrlRequest from mux_python.models.upload import Upload from mux_python.models.upload_error import UploadError from mux_python.models.upload_response import UploadResponse +from mux_python.models.user_agent_restriction_request import UserAgentRestrictionRequest +from mux_python.models.user_agent_restriction_settings import UserAgentRestrictionSettings from mux_python.models.video_view import VideoView from mux_python.models.video_view_event import VideoViewEvent from mux_python.models.video_view_response import VideoViewResponse diff --git a/mux_python/models/abridged_video_view.py b/mux_python/models/abridged_video_view.py index 50789e7..a613614 100644 --- a/mux_python/models/abridged_video_view.py +++ b/mux_python/models/abridged_video_view.py @@ -49,7 +49,8 @@ class AbridgedVideoView(object): 'view_start': 'str', 'view_end': 'str', 'viewer_experience_score': 'float', - 'watch_time': 'int' + 'watch_time': 'int', + 'playback_failure': 'bool' } attribute_map = { @@ -65,10 +66,11 @@ class AbridgedVideoView(object): 'view_start': 'view_start', 'view_end': 'view_end', 'viewer_experience_score': 'viewer_experience_score', - 'watch_time': 'watch_time' + 'watch_time': 'watch_time', + 'playback_failure': 'playback_failure' } - def __init__(self, id=None, viewer_os_family=None, viewer_application_name=None, video_title=None, total_row_count=None, player_error_message=None, player_error_code=None, error_type_id=None, country_code=None, view_start=None, view_end=None, viewer_experience_score=None, watch_time=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, id=None, viewer_os_family=None, viewer_application_name=None, video_title=None, total_row_count=None, player_error_message=None, player_error_code=None, error_type_id=None, country_code=None, view_start=None, view_end=None, viewer_experience_score=None, watch_time=None, playback_failure=None, local_vars_configuration=None): # noqa: E501 """AbridgedVideoView - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() @@ -87,6 +89,7 @@ def __init__(self, id=None, viewer_os_family=None, viewer_application_name=None, self._view_end = None self._viewer_experience_score = None self._watch_time = None + self._playback_failure = None self.discriminator = None if id is not None: @@ -106,6 +109,8 @@ def __init__(self, id=None, viewer_os_family=None, viewer_application_name=None, self.view_end = view_end self.viewer_experience_score = viewer_experience_score self.watch_time = watch_time + if playback_failure is not None: + self.playback_failure = playback_failure @property def id(self): @@ -380,6 +385,27 @@ def watch_time(self, watch_time): self._watch_time = watch_time + @property + def playback_failure(self): + """Gets the playback_failure of this AbridgedVideoView. # noqa: E501 + + + :return: The playback_failure of this AbridgedVideoView. # noqa: E501 + :rtype: bool + """ + return self._playback_failure + + @playback_failure.setter + def playback_failure(self, playback_failure): + """Sets the playback_failure of this AbridgedVideoView. + + + :param playback_failure: The playback_failure of this AbridgedVideoView. # noqa: E501 + :type playback_failure: bool + """ + + self._playback_failure = playback_failure + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/mux_python/models/create_playback_restriction_request.py b/mux_python/models/create_playback_restriction_request.py index 303adda..3607a84 100644 --- a/mux_python/models/create_playback_restriction_request.py +++ b/mux_python/models/create_playback_restriction_request.py @@ -37,24 +37,29 @@ class CreatePlaybackRestrictionRequest(object): and the value is json key in definition. """ openapi_types = { - 'referrer': 'ReferrerDomainRestriction' + 'referrer': 'ReferrerDomainRestriction', + 'user_agent': 'UserAgentRestrictionRequest' } attribute_map = { - 'referrer': 'referrer' + 'referrer': 'referrer', + 'user_agent': 'user_agent' } - def __init__(self, referrer=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, referrer=None, user_agent=None, local_vars_configuration=None): # noqa: E501 """CreatePlaybackRestrictionRequest - 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._referrer = None + self._user_agent = None self.discriminator = None if referrer is not None: self.referrer = referrer + if user_agent is not None: + self.user_agent = user_agent @property def referrer(self): @@ -77,6 +82,27 @@ def referrer(self, referrer): self._referrer = referrer + @property + def user_agent(self): + """Gets the user_agent of this CreatePlaybackRestrictionRequest. # noqa: E501 + + + :return: The user_agent of this CreatePlaybackRestrictionRequest. # noqa: E501 + :rtype: UserAgentRestrictionRequest + """ + return self._user_agent + + @user_agent.setter + def user_agent(self, user_agent): + """Sets the user_agent of this CreatePlaybackRestrictionRequest. + + + :param user_agent: The user_agent of this CreatePlaybackRestrictionRequest. # noqa: E501 + :type user_agent: UserAgentRestrictionRequest + """ + + self._user_agent = user_agent + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/mux_python/models/delivery_report.py b/mux_python/models/delivery_report.py index febfa7e..cfd605a 100644 --- a/mux_python/models/delivery_report.py +++ b/mux_python/models/delivery_report.py @@ -45,6 +45,7 @@ class DeliveryReport(object): 'asset_state': 'str', 'asset_duration': 'float', 'asset_resolution_tier': 'str', + 'asset_encoding_tier': 'str', 'delivered_seconds': 'float', 'delivered_seconds_by_resolution': 'DeliveryReportDeliveredSecondsByResolution' } @@ -58,11 +59,12 @@ class DeliveryReport(object): 'asset_state': 'asset_state', 'asset_duration': 'asset_duration', 'asset_resolution_tier': 'asset_resolution_tier', + 'asset_encoding_tier': 'asset_encoding_tier', 'delivered_seconds': 'delivered_seconds', 'delivered_seconds_by_resolution': 'delivered_seconds_by_resolution' } - def __init__(self, live_stream_id=None, asset_id=None, passthrough=None, created_at=None, deleted_at=None, asset_state=None, asset_duration=None, asset_resolution_tier=None, delivered_seconds=None, delivered_seconds_by_resolution=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, live_stream_id=None, asset_id=None, passthrough=None, created_at=None, deleted_at=None, asset_state=None, asset_duration=None, asset_resolution_tier=None, asset_encoding_tier=None, delivered_seconds=None, delivered_seconds_by_resolution=None, local_vars_configuration=None): # noqa: E501 """DeliveryReport - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() @@ -76,6 +78,7 @@ def __init__(self, live_stream_id=None, asset_id=None, passthrough=None, created self._asset_state = None self._asset_duration = None self._asset_resolution_tier = None + self._asset_encoding_tier = None self._delivered_seconds = None self._delivered_seconds_by_resolution = None self.discriminator = None @@ -96,6 +99,8 @@ def __init__(self, live_stream_id=None, asset_id=None, passthrough=None, created self.asset_duration = asset_duration if asset_resolution_tier is not None: self.asset_resolution_tier = asset_resolution_tier + if asset_encoding_tier is not None: + self.asset_encoding_tier = asset_encoding_tier if delivered_seconds is not None: self.delivered_seconds = delivered_seconds if delivered_seconds_by_resolution is not None: @@ -297,6 +302,35 @@ def asset_resolution_tier(self, asset_resolution_tier): self._asset_resolution_tier = asset_resolution_tier + @property + def asset_encoding_tier(self): + """Gets the asset_encoding_tier of this DeliveryReport. # noqa: E501 + + The encoding tier that the asset was ingested at. [See the encoding tiers guide for more details.](https://docs.mux.com/guides/use-encoding-tiers) # noqa: E501 + + :return: The asset_encoding_tier of this DeliveryReport. # noqa: E501 + :rtype: str + """ + return self._asset_encoding_tier + + @asset_encoding_tier.setter + def asset_encoding_tier(self, asset_encoding_tier): + """Sets the asset_encoding_tier of this DeliveryReport. + + The encoding tier that the asset was ingested at. [See the encoding tiers guide for more details.](https://docs.mux.com/guides/use-encoding-tiers) # noqa: E501 + + :param asset_encoding_tier: The asset_encoding_tier of this DeliveryReport. # noqa: E501 + :type asset_encoding_tier: str + """ + allowed_values = ["smart", "baseline"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and asset_encoding_tier not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `asset_encoding_tier` ({0}), must be one of {1}" # noqa: E501 + .format(asset_encoding_tier, allowed_values) + ) + + self._asset_encoding_tier = asset_encoding_tier + @property def delivered_seconds(self): """Gets the delivered_seconds of this DeliveryReport. # noqa: E501 diff --git a/mux_python/models/generate_track_subtitles_response.py b/mux_python/models/generate_track_subtitles_response.py index 29a36af..e4b0c69 100644 --- a/mux_python/models/generate_track_subtitles_response.py +++ b/mux_python/models/generate_track_subtitles_response.py @@ -37,7 +37,7 @@ class GenerateTrackSubtitlesResponse(object): and the value is json key in definition. """ openapi_types = { - 'data': 'Track' + 'data': 'list[Track]' } attribute_map = { @@ -62,7 +62,7 @@ def data(self): :return: The data of this GenerateTrackSubtitlesResponse. # noqa: E501 - :rtype: Track + :rtype: list[Track] """ return self._data @@ -72,7 +72,7 @@ def data(self, data): :param data: The data of this GenerateTrackSubtitlesResponse. # noqa: E501 - :type data: Track + :type data: list[Track] """ self._data = data diff --git a/mux_python/models/playback_restriction.py b/mux_python/models/playback_restriction.py index 8b60d92..e498746 100644 --- a/mux_python/models/playback_restriction.py +++ b/mux_python/models/playback_restriction.py @@ -40,17 +40,19 @@ class PlaybackRestriction(object): 'id': 'str', 'created_at': 'str', 'updated_at': 'str', - 'referrer': 'ReferrerDomainRestriction' + 'referrer': 'ReferrerDomainRestriction', + 'user_agent': 'UserAgentRestrictionSettings' } attribute_map = { 'id': 'id', 'created_at': 'created_at', 'updated_at': 'updated_at', - 'referrer': 'referrer' + 'referrer': 'referrer', + 'user_agent': 'user_agent' } - def __init__(self, id=None, created_at=None, updated_at=None, referrer=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, id=None, created_at=None, updated_at=None, referrer=None, user_agent=None, local_vars_configuration=None): # noqa: E501 """PlaybackRestriction - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() @@ -60,6 +62,7 @@ def __init__(self, id=None, created_at=None, updated_at=None, referrer=None, loc self._created_at = None self._updated_at = None self._referrer = None + self._user_agent = None self.discriminator = None if id is not None: @@ -70,6 +73,8 @@ def __init__(self, id=None, created_at=None, updated_at=None, referrer=None, loc self.updated_at = updated_at if referrer is not None: self.referrer = referrer + if user_agent is not None: + self.user_agent = user_agent @property def id(self): @@ -161,6 +166,27 @@ def referrer(self, referrer): self._referrer = referrer + @property + def user_agent(self): + """Gets the user_agent of this PlaybackRestriction. # noqa: E501 + + + :return: The user_agent of this PlaybackRestriction. # noqa: E501 + :rtype: UserAgentRestrictionSettings + """ + return self._user_agent + + @user_agent.setter + def user_agent(self, user_agent): + """Sets the user_agent of this PlaybackRestriction. + + + :param user_agent: The user_agent of this PlaybackRestriction. # noqa: E501 + :type user_agent: UserAgentRestrictionSettings + """ + + self._user_agent = user_agent + 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.py b/mux_python/models/update_live_stream_new_asset_settings.py new file mode 100644 index 0000000..7e1fe9d --- /dev/null +++ b/mux_python/models/update_live_stream_new_asset_settings.py @@ -0,0 +1,140 @@ +# 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 UpdateLiveStreamNewAssetSettings(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 = { + 'mp4_support': 'str' + } + + attribute_map = { + 'mp4_support': 'mp4_support' + } + + def __init__(self, mp4_support=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() + self.local_vars_configuration = local_vars_configuration + + self._mp4_support = None + self.discriminator = None + + if mp4_support is not None: + self.mp4_support = mp4_support + + @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 + + :return: The mp4_support of this UpdateLiveStreamNewAssetSettings. # noqa: E501 + :rtype: str + """ + return self._mp4_support + + @mp4_support.setter + 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 + + :param mp4_support: The mp4_support of this UpdateLiveStreamNewAssetSettings. # noqa: E501 + :type mp4_support: str + """ + allowed_values = ["none", "standard", "capped-1080p", "audio-only", "audio-only,capped-1080p"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and mp4_support not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `mp4_support` ({0}), must be one of {1}" # noqa: E501 + .format(mp4_support, allowed_values) + ) + + self._mp4_support = mp4_support + + 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, UpdateLiveStreamNewAssetSettings): + 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, UpdateLiveStreamNewAssetSettings): + return True + + return self.to_dict() != other.to_dict() diff --git a/mux_python/models/update_live_stream_request.py b/mux_python/models/update_live_stream_request.py index cbbd8ac..6662dd7 100644 --- a/mux_python/models/update_live_stream_request.py +++ b/mux_python/models/update_live_stream_request.py @@ -42,7 +42,8 @@ class UpdateLiveStreamRequest(object): 'reconnect_window': 'float', 'use_slate_for_standard_latency': 'bool', 'reconnect_slate_url': 'str', - 'max_continuous_duration': 'int' + 'max_continuous_duration': 'int', + 'new_asset_settings': 'UpdateLiveStreamNewAssetSettings' } attribute_map = { @@ -51,10 +52,11 @@ class UpdateLiveStreamRequest(object): 'reconnect_window': 'reconnect_window', 'use_slate_for_standard_latency': 'use_slate_for_standard_latency', 'reconnect_slate_url': 'reconnect_slate_url', - 'max_continuous_duration': 'max_continuous_duration' + 'max_continuous_duration': 'max_continuous_duration', + 'new_asset_settings': 'new_asset_settings' } - def __init__(self, passthrough=None, latency_mode=None, reconnect_window=60, use_slate_for_standard_latency=False, reconnect_slate_url=None, max_continuous_duration=43200, local_vars_configuration=None): # noqa: E501 + def __init__(self, passthrough=None, latency_mode=None, reconnect_window=60, use_slate_for_standard_latency=False, reconnect_slate_url=None, max_continuous_duration=43200, new_asset_settings=None, local_vars_configuration=None): # noqa: E501 """UpdateLiveStreamRequest - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() @@ -66,6 +68,7 @@ def __init__(self, passthrough=None, latency_mode=None, reconnect_window=60, use self._use_slate_for_standard_latency = None self._reconnect_slate_url = None self._max_continuous_duration = None + self._new_asset_settings = None self.discriminator = None if passthrough is not None: @@ -80,6 +83,8 @@ def __init__(self, passthrough=None, latency_mode=None, reconnect_window=60, use self.reconnect_slate_url = reconnect_slate_url if max_continuous_duration is not None: self.max_continuous_duration = max_continuous_duration + if new_asset_settings is not None: + self.new_asset_settings = new_asset_settings @property def passthrough(self): @@ -237,6 +242,27 @@ def max_continuous_duration(self, max_continuous_duration): self._max_continuous_duration = max_continuous_duration + @property + def new_asset_settings(self): + """Gets the new_asset_settings of this UpdateLiveStreamRequest. # noqa: E501 + + + :return: The new_asset_settings of this UpdateLiveStreamRequest. # noqa: E501 + :rtype: UpdateLiveStreamNewAssetSettings + """ + return self._new_asset_settings + + @new_asset_settings.setter + def new_asset_settings(self, new_asset_settings): + """Sets the new_asset_settings of this UpdateLiveStreamRequest. + + + :param new_asset_settings: The new_asset_settings of this UpdateLiveStreamRequest. # noqa: E501 + :type new_asset_settings: UpdateLiveStreamNewAssetSettings + """ + + self._new_asset_settings = new_asset_settings + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/mux_python/models/update_user_agent_restriction_request.py b/mux_python/models/update_user_agent_restriction_request.py new file mode 100644 index 0000000..7f1c018 --- /dev/null +++ b/mux_python/models/update_user_agent_restriction_request.py @@ -0,0 +1,162 @@ +# 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 UpdateUserAgentRestrictionRequest(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 = { + 'allow_no_user_agent': 'bool', + 'allow_high_risk_user_agent': 'bool' + } + + attribute_map = { + 'allow_no_user_agent': 'allow_no_user_agent', + 'allow_high_risk_user_agent': 'allow_high_risk_user_agent' + } + + def __init__(self, allow_no_user_agent=True, allow_high_risk_user_agent=True, local_vars_configuration=None): # noqa: E501 + """UpdateUserAgentRestrictionRequest - 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._allow_no_user_agent = None + self._allow_high_risk_user_agent = None + self.discriminator = None + + if allow_no_user_agent is not None: + self.allow_no_user_agent = allow_no_user_agent + if allow_high_risk_user_agent is not None: + self.allow_high_risk_user_agent = allow_high_risk_user_agent + + @property + def allow_no_user_agent(self): + """Gets the allow_no_user_agent of this UpdateUserAgentRestrictionRequest. # noqa: E501 + + Whether or not to allow views without a `User-Agent` HTTP request header. # noqa: E501 + + :return: The allow_no_user_agent of this UpdateUserAgentRestrictionRequest. # noqa: E501 + :rtype: bool + """ + return self._allow_no_user_agent + + @allow_no_user_agent.setter + def allow_no_user_agent(self, allow_no_user_agent): + """Sets the allow_no_user_agent of this UpdateUserAgentRestrictionRequest. + + Whether or not to allow views without a `User-Agent` HTTP request header. # noqa: E501 + + :param allow_no_user_agent: The allow_no_user_agent of this UpdateUserAgentRestrictionRequest. # noqa: E501 + :type allow_no_user_agent: bool + """ + + self._allow_no_user_agent = allow_no_user_agent + + @property + def allow_high_risk_user_agent(self): + """Gets the allow_high_risk_user_agent of this UpdateUserAgentRestrictionRequest. # noqa: E501 + + Whether or not to allow high risk user agents. The high risk user agents are defined by Mux. # noqa: E501 + + :return: The allow_high_risk_user_agent of this UpdateUserAgentRestrictionRequest. # noqa: E501 + :rtype: bool + """ + return self._allow_high_risk_user_agent + + @allow_high_risk_user_agent.setter + def allow_high_risk_user_agent(self, allow_high_risk_user_agent): + """Sets the allow_high_risk_user_agent of this UpdateUserAgentRestrictionRequest. + + Whether or not to allow high risk user agents. The high risk user agents are defined by Mux. # noqa: E501 + + :param allow_high_risk_user_agent: The allow_high_risk_user_agent of this UpdateUserAgentRestrictionRequest. # noqa: E501 + :type allow_high_risk_user_agent: bool + """ + + self._allow_high_risk_user_agent = allow_high_risk_user_agent + + 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, UpdateUserAgentRestrictionRequest): + 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, UpdateUserAgentRestrictionRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/mux_python/models/user_agent_restriction_request.py b/mux_python/models/user_agent_restriction_request.py new file mode 100644 index 0000000..8fdacc9 --- /dev/null +++ b/mux_python/models/user_agent_restriction_request.py @@ -0,0 +1,162 @@ +# 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 UserAgentRestrictionRequest(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 = { + 'allow_no_user_agent': 'bool', + 'allow_high_risk_user_agent': 'bool' + } + + attribute_map = { + 'allow_no_user_agent': 'allow_no_user_agent', + 'allow_high_risk_user_agent': 'allow_high_risk_user_agent' + } + + def __init__(self, allow_no_user_agent=True, allow_high_risk_user_agent=True, local_vars_configuration=None): # noqa: E501 + """UserAgentRestrictionRequest - 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._allow_no_user_agent = None + self._allow_high_risk_user_agent = None + self.discriminator = None + + if allow_no_user_agent is not None: + self.allow_no_user_agent = allow_no_user_agent + if allow_high_risk_user_agent is not None: + self.allow_high_risk_user_agent = allow_high_risk_user_agent + + @property + def allow_no_user_agent(self): + """Gets the allow_no_user_agent of this UserAgentRestrictionRequest. # noqa: E501 + + Whether or not to allow views without a `User-Agent` HTTP request header. # noqa: E501 + + :return: The allow_no_user_agent of this UserAgentRestrictionRequest. # noqa: E501 + :rtype: bool + """ + return self._allow_no_user_agent + + @allow_no_user_agent.setter + def allow_no_user_agent(self, allow_no_user_agent): + """Sets the allow_no_user_agent of this UserAgentRestrictionRequest. + + Whether or not to allow views without a `User-Agent` HTTP request header. # noqa: E501 + + :param allow_no_user_agent: The allow_no_user_agent of this UserAgentRestrictionRequest. # noqa: E501 + :type allow_no_user_agent: bool + """ + + self._allow_no_user_agent = allow_no_user_agent + + @property + def allow_high_risk_user_agent(self): + """Gets the allow_high_risk_user_agent of this UserAgentRestrictionRequest. # noqa: E501 + + Whether or not to allow high risk user agents. The high risk user agents are defined by Mux. # noqa: E501 + + :return: The allow_high_risk_user_agent of this UserAgentRestrictionRequest. # noqa: E501 + :rtype: bool + """ + return self._allow_high_risk_user_agent + + @allow_high_risk_user_agent.setter + def allow_high_risk_user_agent(self, allow_high_risk_user_agent): + """Sets the allow_high_risk_user_agent of this UserAgentRestrictionRequest. + + Whether or not to allow high risk user agents. The high risk user agents are defined by Mux. # noqa: E501 + + :param allow_high_risk_user_agent: The allow_high_risk_user_agent of this UserAgentRestrictionRequest. # noqa: E501 + :type allow_high_risk_user_agent: bool + """ + + self._allow_high_risk_user_agent = allow_high_risk_user_agent + + 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, UserAgentRestrictionRequest): + 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, UserAgentRestrictionRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/mux_python/models/user_agent_restriction_settings.py b/mux_python/models/user_agent_restriction_settings.py new file mode 100644 index 0000000..65c5f81 --- /dev/null +++ b/mux_python/models/user_agent_restriction_settings.py @@ -0,0 +1,162 @@ +# 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 UserAgentRestrictionSettings(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 = { + 'allow_no_user_agent': 'bool', + 'allow_high_risk_user_agent': 'bool' + } + + attribute_map = { + 'allow_no_user_agent': 'allow_no_user_agent', + 'allow_high_risk_user_agent': 'allow_high_risk_user_agent' + } + + def __init__(self, allow_no_user_agent=True, allow_high_risk_user_agent=True, local_vars_configuration=None): # noqa: E501 + """UserAgentRestrictionSettings - 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._allow_no_user_agent = None + self._allow_high_risk_user_agent = None + self.discriminator = None + + if allow_no_user_agent is not None: + self.allow_no_user_agent = allow_no_user_agent + if allow_high_risk_user_agent is not None: + self.allow_high_risk_user_agent = allow_high_risk_user_agent + + @property + def allow_no_user_agent(self): + """Gets the allow_no_user_agent of this UserAgentRestrictionSettings. # noqa: E501 + + Whether or not to allow views without a `User-Agent` HTTP request header. # noqa: E501 + + :return: The allow_no_user_agent of this UserAgentRestrictionSettings. # noqa: E501 + :rtype: bool + """ + return self._allow_no_user_agent + + @allow_no_user_agent.setter + def allow_no_user_agent(self, allow_no_user_agent): + """Sets the allow_no_user_agent of this UserAgentRestrictionSettings. + + Whether or not to allow views without a `User-Agent` HTTP request header. # noqa: E501 + + :param allow_no_user_agent: The allow_no_user_agent of this UserAgentRestrictionSettings. # noqa: E501 + :type allow_no_user_agent: bool + """ + + self._allow_no_user_agent = allow_no_user_agent + + @property + def allow_high_risk_user_agent(self): + """Gets the allow_high_risk_user_agent of this UserAgentRestrictionSettings. # noqa: E501 + + Whether or not to allow high risk user agents. The high risk user agents are defined by Mux. # noqa: E501 + + :return: The allow_high_risk_user_agent of this UserAgentRestrictionSettings. # noqa: E501 + :rtype: bool + """ + return self._allow_high_risk_user_agent + + @allow_high_risk_user_agent.setter + def allow_high_risk_user_agent(self, allow_high_risk_user_agent): + """Sets the allow_high_risk_user_agent of this UserAgentRestrictionSettings. + + Whether or not to allow high risk user agents. The high risk user agents are defined by Mux. # noqa: E501 + + :param allow_high_risk_user_agent: The allow_high_risk_user_agent of this UserAgentRestrictionSettings. # noqa: E501 + :type allow_high_risk_user_agent: bool + """ + + self._allow_high_risk_user_agent = allow_high_risk_user_agent + + 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, UserAgentRestrictionSettings): + 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, UserAgentRestrictionSettings): + 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 18f3439..96401ef 100644 --- a/mux_python/models/video_view.py +++ b/mux_python/models/video_view.py @@ -193,7 +193,13 @@ class VideoView(object): 'long_rebuffering': 'bool', 'playback_failure_error_type_id': 'int', 'playback_business_exception_error_type_id': 'int', - 'video_startup_business_exception_error_type_id': 'int' + 'video_startup_business_exception_error_type_id': 'int', + 'playback_failure': 'bool', + 'ad_playback_failure_error_type_id': 'int', + 'view_content_startup_time': 'int', + 'ad_preroll_startup_time': 'int', + 'ad_watch_time': 'int', + 'view_content_watch_time': 'int' } attribute_map = { @@ -353,10 +359,16 @@ class VideoView(object): 'long_rebuffering': 'long_rebuffering', 'playback_failure_error_type_id': 'playback_failure_error_type_id', 'playback_business_exception_error_type_id': 'playback_business_exception_error_type_id', - 'video_startup_business_exception_error_type_id': 'video_startup_business_exception_error_type_id' + 'video_startup_business_exception_error_type_id': 'video_startup_business_exception_error_type_id', + 'playback_failure': 'playback_failure', + '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', + 'ad_watch_time': 'ad_watch_time', + 'view_content_watch_time': 'view_content_watch_time' } - 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, 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, ad_watch_time=None, view_content_watch_time=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() @@ -519,6 +531,12 @@ def __init__(self, view_total_upscaling=None, preroll_ad_asset_hostname=None, pl self._playback_failure_error_type_id = None self._playback_business_exception_error_type_id = None self._video_startup_business_exception_error_type_id = None + self._playback_failure = None + self._ad_playback_failure_error_type_id = None + self._view_content_startup_time = None + self._ad_preroll_startup_time = None + self._ad_watch_time = None + self._view_content_watch_time = None self.discriminator = None self.view_total_upscaling = view_total_upscaling @@ -697,12 +715,16 @@ def __init__(self, view_total_upscaling=None, preroll_ad_asset_hostname=None, pl self.long_resume = long_resume if long_rebuffering is not None: self.long_rebuffering = long_rebuffering - if playback_failure_error_type_id is not None: - self.playback_failure_error_type_id = playback_failure_error_type_id - if playback_business_exception_error_type_id is not None: - self.playback_business_exception_error_type_id = playback_business_exception_error_type_id - if video_startup_business_exception_error_type_id is not None: - self.video_startup_business_exception_error_type_id = video_startup_business_exception_error_type_id + self.playback_failure_error_type_id = playback_failure_error_type_id + self.playback_business_exception_error_type_id = playback_business_exception_error_type_id + self.video_startup_business_exception_error_type_id = video_startup_business_exception_error_type_id + if playback_failure is not None: + self.playback_failure = playback_failure + self.ad_playback_failure_error_type_id = ad_playback_failure_error_type_id + self.view_content_startup_time = view_content_startup_time + self.ad_preroll_startup_time = ad_preroll_startup_time + self.ad_watch_time = ad_watch_time + self.view_content_watch_time = view_content_watch_time @property def view_total_upscaling(self): @@ -4001,6 +4023,132 @@ def video_startup_business_exception_error_type_id(self, video_startup_business_ self._video_startup_business_exception_error_type_id = video_startup_business_exception_error_type_id + @property + def playback_failure(self): + """Gets the playback_failure of this VideoView. # noqa: E501 + + + :return: The playback_failure of this VideoView. # noqa: E501 + :rtype: bool + """ + return self._playback_failure + + @playback_failure.setter + def playback_failure(self, playback_failure): + """Sets the playback_failure of this VideoView. + + + :param playback_failure: The playback_failure of this VideoView. # noqa: E501 + :type playback_failure: bool + """ + + self._playback_failure = playback_failure + + @property + def ad_playback_failure_error_type_id(self): + """Gets the ad_playback_failure_error_type_id of this VideoView. # noqa: E501 + + + :return: The ad_playback_failure_error_type_id of this VideoView. # noqa: E501 + :rtype: int + """ + return self._ad_playback_failure_error_type_id + + @ad_playback_failure_error_type_id.setter + def ad_playback_failure_error_type_id(self, ad_playback_failure_error_type_id): + """Sets the ad_playback_failure_error_type_id of this VideoView. + + + :param ad_playback_failure_error_type_id: The ad_playback_failure_error_type_id of this VideoView. # noqa: E501 + :type ad_playback_failure_error_type_id: int + """ + + self._ad_playback_failure_error_type_id = ad_playback_failure_error_type_id + + @property + def view_content_startup_time(self): + """Gets the view_content_startup_time of this VideoView. # noqa: E501 + + + :return: The view_content_startup_time of this VideoView. # noqa: E501 + :rtype: int + """ + return self._view_content_startup_time + + @view_content_startup_time.setter + def view_content_startup_time(self, view_content_startup_time): + """Sets the view_content_startup_time of this VideoView. + + + :param view_content_startup_time: The view_content_startup_time of this VideoView. # noqa: E501 + :type view_content_startup_time: int + """ + + self._view_content_startup_time = view_content_startup_time + + @property + def ad_preroll_startup_time(self): + """Gets the ad_preroll_startup_time of this VideoView. # noqa: E501 + + + :return: The ad_preroll_startup_time of this VideoView. # noqa: E501 + :rtype: int + """ + return self._ad_preroll_startup_time + + @ad_preroll_startup_time.setter + def ad_preroll_startup_time(self, ad_preroll_startup_time): + """Sets the ad_preroll_startup_time of this VideoView. + + + :param ad_preroll_startup_time: The ad_preroll_startup_time of this VideoView. # noqa: E501 + :type ad_preroll_startup_time: int + """ + + self._ad_preroll_startup_time = ad_preroll_startup_time + + @property + def ad_watch_time(self): + """Gets the ad_watch_time of this VideoView. # noqa: E501 + + + :return: The ad_watch_time of this VideoView. # noqa: E501 + :rtype: int + """ + return self._ad_watch_time + + @ad_watch_time.setter + def ad_watch_time(self, ad_watch_time): + """Sets the ad_watch_time of this VideoView. + + + :param ad_watch_time: The ad_watch_time of this VideoView. # noqa: E501 + :type ad_watch_time: int + """ + + self._ad_watch_time = ad_watch_time + + @property + def view_content_watch_time(self): + """Gets the view_content_watch_time of this VideoView. # noqa: E501 + + + :return: The view_content_watch_time of this VideoView. # noqa: E501 + :rtype: int + """ + return self._view_content_watch_time + + @view_content_watch_time.setter + def view_content_watch_time(self, view_content_watch_time): + """Sets the view_content_watch_time of this VideoView. + + + :param view_content_watch_time: The view_content_watch_time of this VideoView. # noqa: E501 + :type view_content_watch_time: int + """ + + self._view_content_watch_time = view_content_watch_time + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/setup.py b/setup.py index 83560cd..1d7ac5c 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "mux_python" -VERSION = "3.15.0" +VERSION = "3.16.0" # To install the library, run the following # # python setup.py install diff --git a/test/test_update_live_stream_new_asset_settings.py b/test/test_update_live_stream_new_asset_settings.py new file mode 100644 index 0000000..07e4b73 --- /dev/null +++ b/test/test_update_live_stream_new_asset_settings.py @@ -0,0 +1,52 @@ +# 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 import UpdateLiveStreamNewAssetSettings # noqa: E501 +from mux_python.rest import ApiException + +class TestUpdateLiveStreamNewAssetSettings(unittest.TestCase): + """UpdateLiveStreamNewAssetSettings unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test UpdateLiveStreamNewAssetSettings + 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.UpdateLiveStreamNewAssetSettings() # noqa: E501 + if include_optional : + return UpdateLiveStreamNewAssetSettings( + mp4_support = 'none' + ) + else : + return UpdateLiveStreamNewAssetSettings( + ) + + def testUpdateLiveStreamNewAssetSettings(self): + """Test UpdateLiveStreamNewAssetSettings""" + 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_user_agent_restriction_request.py b/test/test_update_user_agent_restriction_request.py new file mode 100644 index 0000000..a4043c8 --- /dev/null +++ b/test/test_update_user_agent_restriction_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.update_user_agent_restriction_request import UpdateUserAgentRestrictionRequest # noqa: E501 +from mux_python.rest import ApiException + +class TestUpdateUserAgentRestrictionRequest(unittest.TestCase): + """UpdateUserAgentRestrictionRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test UpdateUserAgentRestrictionRequest + 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_user_agent_restriction_request.UpdateUserAgentRestrictionRequest() # noqa: E501 + if include_optional : + return UpdateUserAgentRestrictionRequest( + allow_no_user_agent = True, + allow_high_risk_user_agent = True + ) + else : + return UpdateUserAgentRestrictionRequest( + ) + + def testUpdateUserAgentRestrictionRequest(self): + """Test UpdateUserAgentRestrictionRequest""" + 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_user_agent_restriction_request.py b/test/test_user_agent_restriction_request.py new file mode 100644 index 0000000..9b9db0f --- /dev/null +++ b/test/test_user_agent_restriction_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.user_agent_restriction_request import UserAgentRestrictionRequest # noqa: E501 +from mux_python.rest import ApiException + +class TestUserAgentRestrictionRequest(unittest.TestCase): + """UserAgentRestrictionRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test UserAgentRestrictionRequest + 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.user_agent_restriction_request.UserAgentRestrictionRequest() # noqa: E501 + if include_optional : + return UserAgentRestrictionRequest( + allow_no_user_agent = True, + allow_high_risk_user_agent = True + ) + else : + return UserAgentRestrictionRequest( + ) + + def testUserAgentRestrictionRequest(self): + """Test UserAgentRestrictionRequest""" + 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_user_agent_restriction_settings.py b/test/test_user_agent_restriction_settings.py new file mode 100644 index 0000000..8e7aeb7 --- /dev/null +++ b/test/test_user_agent_restriction_settings.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.user_agent_restriction_settings import UserAgentRestrictionSettings # noqa: E501 +from mux_python.rest import ApiException + +class TestUserAgentRestrictionSettings(unittest.TestCase): + """UserAgentRestrictionSettings unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test UserAgentRestrictionSettings + 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.user_agent_restriction_settings.UserAgentRestrictionSettings() # noqa: E501 + if include_optional : + return UserAgentRestrictionSettings( + allow_no_user_agent = True, + allow_high_risk_user_agent = True + ) + else : + return UserAgentRestrictionSettings( + ) + + def testUserAgentRestrictionSettings(self): + """Test UserAgentRestrictionSettings""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main()