From 39d60f6c529eea71239b6b7870850ad7ec354f54 Mon Sep 17 00:00:00 2001 From: Phil <578330+philcluff@users.noreply.github.com> Date: Thu, 27 Mar 2025 13:29:43 +0000 Subject: [PATCH] Regenerate for V5 --- .openapi-generator/FILES | 3 + docs/Asset.md | 3 +- docs/AssetMetadata.md | 12 ++ docs/AssetsApi.md | 2 +- docs/CreateAssetRequest.md | 11 +- docs/CreateLiveStreamRequest.md | 5 +- docs/DirectUploadsApi.md | 2 +- docs/LiveStreamsApi.md | 2 +- docs/UpdateAssetRequest.md | 3 +- docs/UpdateLiveStreamNewAssetSettings.md | 1 + .../UpdateReferrerDomainRestrictionRequest.md | 1 + docs/Upload.md | 2 +- docs/VideoView.md | 1 + gen/generator-config.json | 2 +- mux_python/__init__.py | 3 +- mux_python/api_client.py | 2 +- mux_python/configuration.py | 2 +- mux_python/models/__init__.py | 1 + mux_python/models/asset.py | 36 +++- mux_python/models/asset_metadata.py | 199 ++++++++++++++++++ mux_python/models/create_asset_request.py | 104 ++++++++- .../models/create_live_stream_request.py | 36 +++- mux_python/models/update_asset_request.py | 36 +++- .../update_live_stream_new_asset_settings.py | 32 ++- mux_python/models/upload.py | 6 +- mux_python/models/video_view.py | 31 ++- setup.py | 2 +- test/test_asset_metadata.py | 54 +++++ 28 files changed, 544 insertions(+), 50 deletions(-) create mode 100644 docs/AssetMetadata.md create mode 100644 mux_python/models/asset_metadata.py create mode 100644 test/test_asset_metadata.py diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index f0b72ff..ddb3adf 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -6,6 +6,7 @@ docs/Asset.md docs/AssetErrors.md docs/AssetGeneratedSubtitleSettings.md docs/AssetMaster.md +docs/AssetMetadata.md docs/AssetNonStandardInputReasons.md docs/AssetRecordingTimes.md docs/AssetResponse.md @@ -205,6 +206,7 @@ mux_python/models/asset.py mux_python/models/asset_errors.py mux_python/models/asset_generated_subtitle_settings.py mux_python/models/asset_master.py +mux_python/models/asset_metadata.py mux_python/models/asset_non_standard_input_reasons.py mux_python/models/asset_recording_times.py mux_python/models/asset_response.py @@ -359,4 +361,5 @@ setup.cfg setup.py test-requirements.txt test/__init__.py +test/test_asset_metadata.py tox.ini diff --git a/docs/Asset.md b/docs/Asset.md index c46e579..3c4a371 100644 --- a/docs/Asset.md +++ b/docs/Asset.md @@ -20,7 +20,7 @@ Name | Type | Description | Notes **per_title_encode** | **bool** | | [optional] **upload_id** | **str** | Unique identifier for the Direct Upload. This is an optional parameter added when the asset is created from a direct upload. | [optional] **is_live** | **bool** | Indicates whether the live stream that created this asset is currently `active` and not in `idle` state. This is an optional parameter added when the asset is created from a live stream. | [optional] -**passthrough** | **str** | Arbitrary user-supplied metadata set for the asset. Max 255 characters. | [optional] +**passthrough** | **str** | You can set this field to anything you want. It will be included in the asset details and related webhooks. If you're looking for more structured metadata, such as `title` or `external_id` , you can use the `meta` object instead. **Max: 255 characters**. | [optional] **live_stream_id** | **str** | Unique identifier for the live stream. This is an optional parameter added when the asset is created from a live stream. | [optional] **master** | [**AssetMaster**](AssetMaster.md) | | [optional] **master_access** | **str** | | [optional] [default to 'none'] @@ -32,6 +32,7 @@ Name | Type | Description | Notes **non_standard_input_reasons** | [**AssetNonStandardInputReasons**](AssetNonStandardInputReasons.md) | | [optional] **test** | **bool** | True means this live stream is a test asset. A test asset can help evaluate the Mux Video APIs without incurring any cost. There is no limit on number of test assets created. Test assets are watermarked with the Mux logo, limited to 10 seconds, and deleted after 24 hrs. | [optional] **ingest_type** | **str** | The type of ingest used to create the asset. | [optional] +**meta** | [**AssetMetadata**](AssetMetadata.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/AssetMetadata.md b/docs/AssetMetadata.md new file mode 100644 index 0000000..7167ffd --- /dev/null +++ b/docs/AssetMetadata.md @@ -0,0 +1,12 @@ +# AssetMetadata + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | The video title. Max 512 code points. | [optional] +**creator_id** | **str** | This is an identifier you provide to keep track of the creator of the video. Max 128 code points. | [optional] +**external_id** | **str** | This is an identifier you provide to link the video to your own data. Max 128 code points. | [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 b552ae5..8d4000e 100644 --- a/docs/AssetsApi.md +++ b/docs/AssetsApi.md @@ -59,7 +59,7 @@ configuration = mux_python.Configuration( with mux_python.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = mux_python.AssetsApi(api_client) - create_asset_request = {"input":[{"url":"https://muxed.s3.amazonaws.com/leds.mp4"}],"playback_policy":["public"],"video_quality":"basic"} # CreateAssetRequest | + create_asset_request = {"inputs":[{"url":"https://muxed.s3.amazonaws.com/leds.mp4"}],"playback_policies":["public"],"video_quality":"basic"} # CreateAssetRequest | try: # Create an asset diff --git a/docs/CreateAssetRequest.md b/docs/CreateAssetRequest.md index 658a4fa..8f24f9a 100644 --- a/docs/CreateAssetRequest.md +++ b/docs/CreateAssetRequest.md @@ -3,11 +3,13 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**input** | [**list[InputSettings]**](InputSettings.md) | An array of objects that each describe an input file to be used to create the asset. As a shortcut, input can also be a string URL for a file when only one input file is used. See `input[].url` for requirements. | [optional] -**playback_policy** | [**list[PlaybackPolicy]**](PlaybackPolicy.md) | An array of playback policy names that you want applied to this asset and available through `playback_ids`. Options include: * `\"public\"` (anyone with the playback URL can stream the asset). * `\"signed\"` (an additional access token is required to play the asset). If no `playback_policy` is set, the asset will have no playback IDs and will therefore not be playable. For simplicity, a single string name can be used in place of the array in the case of only one playback policy. | [optional] -**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] +**input** | [**list[InputSettings]**](InputSettings.md) | Deprecated. Use `inputs` instead, which accepts an identical type. | [optional] +**inputs** | [**list[InputSettings]**](InputSettings.md) | An array of objects that each describe an input file to be used to create the asset. As a shortcut, input can also be a string URL for a file when only one input file is used. See `input[].url` for requirements. | [optional] +**playback_policy** | [**list[PlaybackPolicy]**](PlaybackPolicy.md) | Deprecated. Use `playback_policies` instead, which accepts an identical type. | [optional] +**playback_policies** | [**list[PlaybackPolicy]**](PlaybackPolicy.md) | An array of playback policy names that you want applied to this asset and available through `playback_ids`. Options include: * `\"public\"` (anyone with the playback URL can stream the asset). * `\"signed\"` (an additional access token is required to play the asset). If no `playback_policies` are set, the asset will have no playback IDs and will therefore not be playable. For simplicity, a single string name can be used in place of the array in the case of only one playback policy. | [optional] +**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_policies` 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] +**passthrough** | **str** | You can set this field to anything you want. It will be included in the asset details and related webhooks. If you're looking for more structured metadata, such as `title` or `external_id`, you can use the `meta` object instead. **Max: 255 characters**. | [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] @@ -16,6 +18,7 @@ Name | Type | Description | Notes **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] +**meta** | [**AssetMetadata**](AssetMetadata.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/CreateLiveStreamRequest.md b/docs/CreateLiveStreamRequest.md index ef921d5..e2bbfe7 100644 --- a/docs/CreateLiveStreamRequest.md +++ b/docs/CreateLiveStreamRequest.md @@ -3,8 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**playback_policy** | [**list[PlaybackPolicy]**](PlaybackPolicy.md) | | [optional] -**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] +**playback_policy** | [**list[PlaybackPolicy]**](PlaybackPolicy.md) | Deprecated. Use `playback_policies` instead, which accepts an identical type. | [optional] +**playback_policies** | [**list[PlaybackPolicy]**](PlaybackPolicy.md) | An array of playback policy names that you want applied to this live stream and available through `playback_ids`. Options include: * `\"public\"` (anyone with the playback URL can stream the live stream). * `\"signed\"` (an additional access token is required to play the live stream). If no `playback_policies` is set, the live stream will have no playback IDs and will therefore not be playable. For simplicity, a single string name can be used in place of the array in the case of only one playback policy. | [optional] +**advanced_playback_policies** | [**list[CreatePlaybackIDRequest]**](CreatePlaybackIDRequest.md) | An array of playback policy objects that you want applied on this live stream and available through `playback_ids`. `advanced_playback_policies` must be used instead of `playback_policies` when creating a DRM playback ID. | [optional] **new_asset_settings** | [**CreateAssetRequest**](CreateAssetRequest.md) | | [optional] **reconnect_window** | **float** | When live streaming software disconnects from Mux, either intentionally or due to a drop in the network, the Reconnect Window is the time in seconds that Mux should wait for the streaming software to reconnect before considering the live stream finished and completing the recorded asset. Defaults to 60 seconds on the API if not specified. If not specified directly, Standard Latency streams have a Reconnect Window of 60 seconds; Reduced and Low Latency streams have a default of 0 seconds, or no Reconnect Window. For that reason, we suggest specifying a value other than zero for Reduced and Low Latency streams. Reduced and Low Latency streams with a Reconnect Window greater than zero will insert slate media into the recorded asset while waiting for the streaming software to reconnect or when there are brief interruptions in the live stream media. When using a Reconnect Window setting higher than 60 seconds with a Standard Latency stream, we highly recommend enabling slate with the `use_slate_for_standard_latency` option. | [optional] [default to 60] **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] diff --git a/docs/DirectUploadsApi.md b/docs/DirectUploadsApi.md index 0be7ad7..caa6088 100644 --- a/docs/DirectUploadsApi.md +++ b/docs/DirectUploadsApi.md @@ -121,7 +121,7 @@ configuration = mux_python.Configuration( with mux_python.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = mux_python.DirectUploadsApi(api_client) - create_upload_request = {"cors_origin":"https://example.com/","new_asset_settings":{"playback_policy":["public"]}} # CreateUploadRequest | + create_upload_request = {"cors_origin":"https://example.com/","new_asset_settings":{"playback_policies":["public"]}} # CreateUploadRequest | try: # Create a new direct upload URL diff --git a/docs/LiveStreamsApi.md b/docs/LiveStreamsApi.md index 80d22c2..1583efd 100644 --- a/docs/LiveStreamsApi.md +++ b/docs/LiveStreamsApi.md @@ -62,7 +62,7 @@ configuration = mux_python.Configuration( with mux_python.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = mux_python.LiveStreamsApi(api_client) - create_live_stream_request = {"playback_policy":["public"],"new_asset_settings":{"playback_policy":["public"]}} # CreateLiveStreamRequest | + create_live_stream_request = {"playback_policies":["public"],"new_asset_settings":{"playback_policies":["public"]}} # CreateLiveStreamRequest | try: # Create a live stream diff --git a/docs/UpdateAssetRequest.md b/docs/UpdateAssetRequest.md index 3ee0c7f..cc176e3 100644 --- a/docs/UpdateAssetRequest.md +++ b/docs/UpdateAssetRequest.md @@ -3,7 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**passthrough** | **str** | Arbitrary metadata set for the Asset. Max 255 characters. In order to clear this value, the field should be included with an empty string value. | [optional] +**passthrough** | **str** | You can set this field to anything you want. It will be included in the asset details and related webhooks. If you're looking for more structured metadata, such as `title` or `external_id` , you can use the `meta` object instead. **Max: 255 characters**. In order to clear this value, the field should be included with an empty string value. | [optional] +**meta** | [**AssetMetadata**](AssetMetadata.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/UpdateLiveStreamNewAssetSettings.md b/docs/UpdateLiveStreamNewAssetSettings.md index 211e870..7dff0cf 100644 --- a/docs/UpdateLiveStreamNewAssetSettings.md +++ b/docs/UpdateLiveStreamNewAssetSettings.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **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] +**meta** | [**AssetMetadata**](AssetMetadata.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/UpdateReferrerDomainRestrictionRequest.md b/docs/UpdateReferrerDomainRestrictionRequest.md index c40c0b1..132e618 100644 --- a/docs/UpdateReferrerDomainRestrictionRequest.md +++ b/docs/UpdateReferrerDomainRestrictionRequest.md @@ -1,5 +1,6 @@ # UpdateReferrerDomainRestrictionRequest +A list of domains allowed to play your videos. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/Upload.md b/docs/Upload.md index 53f8211..effa5af 100644 --- a/docs/Upload.md +++ b/docs/Upload.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **id** | **str** | Unique identifier for the Direct Upload. | [optional] **timeout** | **int** | Max time in seconds for the signed upload URL to be valid. If a successful upload has not occurred before the timeout limit, the direct upload is marked `timed_out` | [optional] [default to 3600] **status** | **str** | | [optional] -**new_asset_settings** | [**Asset**](Asset.md) | | [optional] +**new_asset_settings** | [**CreateAssetRequest**](CreateAssetRequest.md) | | [optional] **asset_id** | **str** | Only set once the upload is in the `asset_created` state. | [optional] **error** | [**UploadError**](UploadError.md) | | [optional] **cors_origin** | **str** | If the upload URL will be used in a browser, you must specify the origin in order for the signed URL to have the correct CORS headers. | [optional] diff --git a/docs/VideoView.md b/docs/VideoView.md index 3f4f66b..759934e 100644 --- a/docs/VideoView.md +++ b/docs/VideoView.md @@ -181,6 +181,7 @@ Name | Type | Description | Notes **video_dynamic_range_type** | **str** | | [optional] **view_cdn_edge_pop** | **str** | | [optional] **view_cdn_origin** | **str** | | [optional] +**video_creator_id** | **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 be295aa..bb20437 100644 --- a/gen/generator-config.json +++ b/gen/generator-config.json @@ -3,5 +3,5 @@ "packageName": "mux_python", "projectName": "mux_python", "licenseInfo" : "MIT", - "packageVersion": "4.0.0" + "packageVersion": "5.0.0" } diff --git a/mux_python/__init__.py b/mux_python/__init__.py index d98e113..5f4d81f 100644 --- a/mux_python/__init__.py +++ b/mux_python/__init__.py @@ -15,7 +15,7 @@ from __future__ import absolute_import -__version__ = "4.0.0" +__version__ = "5.0.0" # import apis into sdk package from mux_python.api.assets_api import AssetsApi @@ -54,6 +54,7 @@ from mux_python.models.asset_errors import AssetErrors from mux_python.models.asset_generated_subtitle_settings import AssetGeneratedSubtitleSettings from mux_python.models.asset_master import AssetMaster +from mux_python.models.asset_metadata import AssetMetadata from mux_python.models.asset_non_standard_input_reasons import AssetNonStandardInputReasons from mux_python.models.asset_recording_times import AssetRecordingTimes from mux_python.models.asset_response import AssetResponse diff --git a/mux_python/api_client.py b/mux_python/api_client.py index 81da01b..4a5c4f1 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 | 4.0.0' + self.user_agent = 'Mux Python | 5.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 faca9b4..d887e2b 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: 4.0.0".\ + "SDK Package Version: 5.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 6f880aa..751065f 100644 --- a/mux_python/models/__init__.py +++ b/mux_python/models/__init__.py @@ -20,6 +20,7 @@ from mux_python.models.asset_errors import AssetErrors from mux_python.models.asset_generated_subtitle_settings import AssetGeneratedSubtitleSettings from mux_python.models.asset_master import AssetMaster +from mux_python.models.asset_metadata import AssetMetadata from mux_python.models.asset_non_standard_input_reasons import AssetNonStandardInputReasons from mux_python.models.asset_recording_times import AssetRecordingTimes from mux_python.models.asset_response import AssetResponse diff --git a/mux_python/models/asset.py b/mux_python/models/asset.py index c8ce56b..8010b93 100644 --- a/mux_python/models/asset.py +++ b/mux_python/models/asset.py @@ -65,7 +65,8 @@ class Asset(object): 'recording_times': 'list[AssetRecordingTimes]', 'non_standard_input_reasons': 'AssetNonStandardInputReasons', 'test': 'bool', - 'ingest_type': 'str' + 'ingest_type': 'str', + 'meta': 'AssetMetadata' } attribute_map = { @@ -97,10 +98,11 @@ class Asset(object): 'recording_times': 'recording_times', 'non_standard_input_reasons': 'non_standard_input_reasons', 'test': 'test', - 'ingest_type': 'ingest_type' + 'ingest_type': 'ingest_type', + 'meta': 'meta' } - def __init__(self, id=None, created_at=None, status=None, duration=None, max_stored_resolution=None, resolution_tier=None, max_resolution_tier=None, encoding_tier=None, video_quality=None, max_stored_frame_rate=None, aspect_ratio=None, playback_ids=None, tracks=None, errors=None, per_title_encode=None, upload_id=None, is_live=None, passthrough=None, live_stream_id=None, master=None, master_access='none', mp4_support='none', source_asset_id=None, normalize_audio=False, static_renditions=None, recording_times=None, non_standard_input_reasons=None, test=None, ingest_type=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, id=None, created_at=None, status=None, duration=None, max_stored_resolution=None, resolution_tier=None, max_resolution_tier=None, encoding_tier=None, video_quality=None, max_stored_frame_rate=None, aspect_ratio=None, playback_ids=None, tracks=None, errors=None, per_title_encode=None, upload_id=None, is_live=None, passthrough=None, live_stream_id=None, master=None, master_access='none', mp4_support='none', source_asset_id=None, normalize_audio=False, static_renditions=None, recording_times=None, non_standard_input_reasons=None, test=None, ingest_type=None, meta=None, local_vars_configuration=None): # noqa: E501 """Asset - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() @@ -135,6 +137,7 @@ def __init__(self, id=None, created_at=None, status=None, duration=None, max_sto self._non_standard_input_reasons = None self._test = None self._ingest_type = None + self._meta = None self.discriminator = None if id is not None: @@ -195,6 +198,8 @@ def __init__(self, id=None, created_at=None, status=None, duration=None, max_sto self.test = test if ingest_type is not None: self.ingest_type = ingest_type + if meta is not None: + self.meta = meta @property def id(self): @@ -623,7 +628,7 @@ def is_live(self, is_live): def passthrough(self): """Gets the passthrough of this Asset. # noqa: E501 - Arbitrary user-supplied metadata set for the asset. Max 255 characters. # noqa: E501 + You can set this field to anything you want. It will be included in the asset details and related webhooks. If you're looking for more structured metadata, such as `title` or `external_id` , you can use the `meta` object instead. **Max: 255 characters**. # noqa: E501 :return: The passthrough of this Asset. # noqa: E501 :rtype: str @@ -634,7 +639,7 @@ def passthrough(self): def passthrough(self, passthrough): """Sets the passthrough of this Asset. - Arbitrary user-supplied metadata set for the asset. Max 255 characters. # noqa: E501 + You can set this field to anything you want. It will be included in the asset details and related webhooks. If you're looking for more structured metadata, such as `title` or `external_id` , you can use the `meta` object instead. **Max: 255 characters**. # noqa: E501 :param passthrough: The passthrough of this Asset. # noqa: E501 :type passthrough: str @@ -903,6 +908,27 @@ def ingest_type(self, ingest_type): self._ingest_type = ingest_type + @property + def meta(self): + """Gets the meta of this Asset. # noqa: E501 + + + :return: The meta of this Asset. # noqa: E501 + :rtype: AssetMetadata + """ + return self._meta + + @meta.setter + def meta(self, meta): + """Sets the meta of this Asset. + + + :param meta: The meta of this Asset. # noqa: E501 + :type meta: AssetMetadata + """ + + self._meta = meta + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/mux_python/models/asset_metadata.py b/mux_python/models/asset_metadata.py new file mode 100644 index 0000000..24ef695 --- /dev/null +++ b/mux_python/models/asset_metadata.py @@ -0,0 +1,199 @@ +# 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 AssetMetadata(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 = { + 'title': 'str', + 'creator_id': 'str', + 'external_id': 'str' + } + + attribute_map = { + 'title': 'title', + 'creator_id': 'creator_id', + 'external_id': 'external_id' + } + + def __init__(self, title=None, creator_id=None, external_id=None, local_vars_configuration=None): # noqa: E501 + """AssetMetadata - 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._title = None + self._creator_id = None + self._external_id = None + self.discriminator = None + + if title is not None: + self.title = title + if creator_id is not None: + self.creator_id = creator_id + if external_id is not None: + self.external_id = external_id + + @property + def title(self): + """Gets the title of this AssetMetadata. # noqa: E501 + + The video title. Max 512 code points. # noqa: E501 + + :return: The title of this AssetMetadata. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this AssetMetadata. + + The video title. Max 512 code points. # noqa: E501 + + :param title: The title of this AssetMetadata. # noqa: E501 + :type title: str + """ + if (self.local_vars_configuration.client_side_validation and + title is not None and len(title) > 512): + raise ValueError("Invalid value for `title`, length must be less than or equal to `512`") # noqa: E501 + + self._title = title + + @property + def creator_id(self): + """Gets the creator_id of this AssetMetadata. # noqa: E501 + + This is an identifier you provide to keep track of the creator of the video. Max 128 code points. # noqa: E501 + + :return: The creator_id of this AssetMetadata. # noqa: E501 + :rtype: str + """ + return self._creator_id + + @creator_id.setter + def creator_id(self, creator_id): + """Sets the creator_id of this AssetMetadata. + + This is an identifier you provide to keep track of the creator of the video. Max 128 code points. # noqa: E501 + + :param creator_id: The creator_id of this AssetMetadata. # noqa: E501 + :type creator_id: str + """ + if (self.local_vars_configuration.client_side_validation and + creator_id is not None and len(creator_id) > 128): + raise ValueError("Invalid value for `creator_id`, length must be less than or equal to `128`") # noqa: E501 + + self._creator_id = creator_id + + @property + def external_id(self): + """Gets the external_id of this AssetMetadata. # noqa: E501 + + This is an identifier you provide to link the video to your own data. Max 128 code points. # noqa: E501 + + :return: The external_id of this AssetMetadata. # noqa: E501 + :rtype: str + """ + return self._external_id + + @external_id.setter + def external_id(self, external_id): + """Sets the external_id of this AssetMetadata. + + This is an identifier you provide to link the video to your own data. Max 128 code points. # noqa: E501 + + :param external_id: The external_id of this AssetMetadata. # noqa: E501 + :type external_id: str + """ + if (self.local_vars_configuration.client_side_validation and + external_id is not None and len(external_id) > 128): + raise ValueError("Invalid value for `external_id`, length must be less than or equal to `128`") # noqa: E501 + + self._external_id = external_id + + 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, AssetMetadata): + 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, AssetMetadata): + return True + + return self.to_dict() != other.to_dict() diff --git a/mux_python/models/create_asset_request.py b/mux_python/models/create_asset_request.py index af92fb5..4a4fe31 100644 --- a/mux_python/models/create_asset_request.py +++ b/mux_python/models/create_asset_request.py @@ -38,7 +38,9 @@ class CreateAssetRequest(object): """ openapi_types = { 'input': 'list[InputSettings]', + 'inputs': 'list[InputSettings]', 'playback_policy': 'list[PlaybackPolicy]', + 'playback_policies': 'list[PlaybackPolicy]', 'advanced_playback_policies': 'list[CreatePlaybackIDRequest]', 'per_title_encode': 'bool', 'passthrough': 'str', @@ -49,12 +51,15 @@ class CreateAssetRequest(object): 'max_resolution_tier': 'str', 'encoding_tier': 'str', 'video_quality': 'str', - 'static_renditions': 'list[CreateStaticRenditionRequest]' + 'static_renditions': 'list[CreateStaticRenditionRequest]', + 'meta': 'AssetMetadata' } attribute_map = { 'input': 'input', + 'inputs': 'inputs', 'playback_policy': 'playback_policy', + 'playback_policies': 'playback_policies', 'advanced_playback_policies': 'advanced_playback_policies', 'per_title_encode': 'per_title_encode', 'passthrough': 'passthrough', @@ -65,17 +70,20 @@ class CreateAssetRequest(object): 'max_resolution_tier': 'max_resolution_tier', 'encoding_tier': 'encoding_tier', 'video_quality': 'video_quality', - 'static_renditions': 'static_renditions' + 'static_renditions': 'static_renditions', + 'meta': 'meta' } - 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 + def __init__(self, input=None, inputs=None, playback_policy=None, playback_policies=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, meta=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() self.local_vars_configuration = local_vars_configuration self._input = None + self._inputs = None self._playback_policy = None + self._playback_policies = None self._advanced_playback_policies = None self._per_title_encode = None self._passthrough = None @@ -87,12 +95,17 @@ def __init__(self, input=None, playback_policy=None, advanced_playback_policies= self._encoding_tier = None self._video_quality = None self._static_renditions = None + self._meta = None self.discriminator = None if input is not None: self.input = input + if inputs is not None: + self.inputs = inputs if playback_policy is not None: self.playback_policy = playback_policy + if playback_policies is not None: + self.playback_policies = playback_policies if advanced_playback_policies is not None: self.advanced_playback_policies = advanced_playback_policies if per_title_encode is not None: @@ -115,12 +128,14 @@ def __init__(self, input=None, playback_policy=None, advanced_playback_policies= self.video_quality = video_quality if static_renditions is not None: self.static_renditions = static_renditions + if meta is not None: + self.meta = meta @property def input(self): """Gets the input of this CreateAssetRequest. # noqa: E501 - An array of objects that each describe an input file to be used to create the asset. As a shortcut, input can also be a string URL for a file when only one input file is used. See `input[].url` for requirements. # noqa: E501 + Deprecated. Use `inputs` instead, which accepts an identical type. # noqa: E501 :return: The input of this CreateAssetRequest. # noqa: E501 :rtype: list[InputSettings] @@ -131,7 +146,7 @@ def input(self): def input(self, input): """Sets the input of this CreateAssetRequest. - An array of objects that each describe an input file to be used to create the asset. As a shortcut, input can also be a string URL for a file when only one input file is used. See `input[].url` for requirements. # noqa: E501 + Deprecated. Use `inputs` instead, which accepts an identical type. # noqa: E501 :param input: The input of this CreateAssetRequest. # noqa: E501 :type input: list[InputSettings] @@ -139,11 +154,34 @@ def input(self, input): self._input = input + @property + def inputs(self): + """Gets the inputs of this CreateAssetRequest. # noqa: E501 + + An array of objects that each describe an input file to be used to create the asset. As a shortcut, input can also be a string URL for a file when only one input file is used. See `input[].url` for requirements. # noqa: E501 + + :return: The inputs of this CreateAssetRequest. # noqa: E501 + :rtype: list[InputSettings] + """ + return self._inputs + + @inputs.setter + def inputs(self, inputs): + """Sets the inputs of this CreateAssetRequest. + + An array of objects that each describe an input file to be used to create the asset. As a shortcut, input can also be a string URL for a file when only one input file is used. See `input[].url` for requirements. # noqa: E501 + + :param inputs: The inputs of this CreateAssetRequest. # noqa: E501 + :type inputs: list[InputSettings] + """ + + self._inputs = inputs + @property def playback_policy(self): """Gets the playback_policy of this CreateAssetRequest. # noqa: E501 - An array of playback policy names that you want applied to this asset and available through `playback_ids`. Options include: * `\"public\"` (anyone with the playback URL can stream the asset). * `\"signed\"` (an additional access token is required to play the asset). If no `playback_policy` is set, the asset will have no playback IDs and will therefore not be playable. For simplicity, a single string name can be used in place of the array in the case of only one playback policy. # noqa: E501 + Deprecated. Use `playback_policies` instead, which accepts an identical type. # noqa: E501 :return: The playback_policy of this CreateAssetRequest. # noqa: E501 :rtype: list[PlaybackPolicy] @@ -154,7 +192,7 @@ def playback_policy(self): def playback_policy(self, playback_policy): """Sets the playback_policy of this CreateAssetRequest. - An array of playback policy names that you want applied to this asset and available through `playback_ids`. Options include: * `\"public\"` (anyone with the playback URL can stream the asset). * `\"signed\"` (an additional access token is required to play the asset). If no `playback_policy` is set, the asset will have no playback IDs and will therefore not be playable. For simplicity, a single string name can be used in place of the array in the case of only one playback policy. # noqa: E501 + Deprecated. Use `playback_policies` instead, which accepts an identical type. # noqa: E501 :param playback_policy: The playback_policy of this CreateAssetRequest. # noqa: E501 :type playback_policy: list[PlaybackPolicy] @@ -162,11 +200,34 @@ def playback_policy(self, playback_policy): self._playback_policy = playback_policy + @property + def playback_policies(self): + """Gets the playback_policies of this CreateAssetRequest. # noqa: E501 + + An array of playback policy names that you want applied to this asset and available through `playback_ids`. Options include: * `\"public\"` (anyone with the playback URL can stream the asset). * `\"signed\"` (an additional access token is required to play the asset). If no `playback_policies` are set, the asset will have no playback IDs and will therefore not be playable. For simplicity, a single string name can be used in place of the array in the case of only one playback policy. # noqa: E501 + + :return: The playback_policies of this CreateAssetRequest. # noqa: E501 + :rtype: list[PlaybackPolicy] + """ + return self._playback_policies + + @playback_policies.setter + def playback_policies(self, playback_policies): + """Sets the playback_policies of this CreateAssetRequest. + + An array of playback policy names that you want applied to this asset and available through `playback_ids`. Options include: * `\"public\"` (anyone with the playback URL can stream the asset). * `\"signed\"` (an additional access token is required to play the asset). If no `playback_policies` are set, the asset will have no playback IDs and will therefore not be playable. For simplicity, a single string name can be used in place of the array in the case of only one playback policy. # noqa: E501 + + :param playback_policies: The playback_policies of this CreateAssetRequest. # noqa: E501 + :type playback_policies: list[PlaybackPolicy] + """ + + self._playback_policies = playback_policies + @property def advanced_playback_policies(self): """Gets the advanced_playback_policies of this CreateAssetRequest. # noqa: E501 - 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. # noqa: E501 + 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_policies` when creating a DRM playback ID. # noqa: E501 :return: The advanced_playback_policies of this CreateAssetRequest. # noqa: E501 :rtype: list[CreatePlaybackIDRequest] @@ -177,7 +238,7 @@ def advanced_playback_policies(self): def advanced_playback_policies(self, advanced_playback_policies): """Sets the advanced_playback_policies of this CreateAssetRequest. - 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. # noqa: E501 + 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_policies` when creating a DRM playback ID. # noqa: E501 :param advanced_playback_policies: The advanced_playback_policies of this CreateAssetRequest. # noqa: E501 :type advanced_playback_policies: list[CreatePlaybackIDRequest] @@ -210,7 +271,7 @@ def per_title_encode(self, per_title_encode): def passthrough(self): """Gets the passthrough of this CreateAssetRequest. # noqa: E501 - 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**. # noqa: E501 + You can set this field to anything you want. It will be included in the asset details and related webhooks. If you're looking for more structured metadata, such as `title` or `external_id`, you can use the `meta` object instead. **Max: 255 characters**. # noqa: E501 :return: The passthrough of this CreateAssetRequest. # noqa: E501 :rtype: str @@ -221,7 +282,7 @@ def passthrough(self): def passthrough(self, passthrough): """Sets the passthrough of this CreateAssetRequest. - 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**. # noqa: E501 + You can set this field to anything you want. It will be included in the asset details and related webhooks. If you're looking for more structured metadata, such as `title` or `external_id`, you can use the `meta` object instead. **Max: 255 characters**. # noqa: E501 :param passthrough: The passthrough of this CreateAssetRequest. # noqa: E501 :type passthrough: str @@ -443,6 +504,27 @@ def static_renditions(self, static_renditions): self._static_renditions = static_renditions + @property + def meta(self): + """Gets the meta of this CreateAssetRequest. # noqa: E501 + + + :return: The meta of this CreateAssetRequest. # noqa: E501 + :rtype: AssetMetadata + """ + return self._meta + + @meta.setter + def meta(self, meta): + """Sets the meta of this CreateAssetRequest. + + + :param meta: The meta of this CreateAssetRequest. # noqa: E501 + :type meta: AssetMetadata + """ + + self._meta = meta + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/mux_python/models/create_live_stream_request.py b/mux_python/models/create_live_stream_request.py index 9c6c621..5797a6b 100644 --- a/mux_python/models/create_live_stream_request.py +++ b/mux_python/models/create_live_stream_request.py @@ -38,6 +38,7 @@ class CreateLiveStreamRequest(object): """ openapi_types = { 'playback_policy': 'list[PlaybackPolicy]', + 'playback_policies': 'list[PlaybackPolicy]', 'advanced_playback_policies': 'list[CreatePlaybackIDRequest]', 'new_asset_settings': 'CreateAssetRequest', 'reconnect_window': 'float', @@ -57,6 +58,7 @@ class CreateLiveStreamRequest(object): attribute_map = { 'playback_policy': 'playback_policy', + 'playback_policies': 'playback_policies', 'advanced_playback_policies': 'advanced_playback_policies', 'new_asset_settings': 'new_asset_settings', 'reconnect_window': 'reconnect_window', @@ -74,13 +76,14 @@ class CreateLiveStreamRequest(object): 'max_continuous_duration': 'max_continuous_duration' } - def __init__(self, playback_policy=None, advanced_playback_policies=None, new_asset_settings=None, reconnect_window=60, use_slate_for_standard_latency=False, reconnect_slate_url=None, passthrough=None, audio_only=None, embedded_subtitles=None, generated_subtitles=None, reduced_latency=None, low_latency=None, latency_mode=None, test=None, simulcast_targets=None, max_continuous_duration=43200, local_vars_configuration=None): # noqa: E501 + def __init__(self, playback_policy=None, playback_policies=None, advanced_playback_policies=None, new_asset_settings=None, reconnect_window=60, use_slate_for_standard_latency=False, reconnect_slate_url=None, passthrough=None, audio_only=None, embedded_subtitles=None, generated_subtitles=None, reduced_latency=None, low_latency=None, latency_mode=None, test=None, simulcast_targets=None, max_continuous_duration=43200, local_vars_configuration=None): # noqa: E501 """CreateLiveStreamRequest - 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._playback_policy = None + self._playback_policies = None self._advanced_playback_policies = None self._new_asset_settings = None self._reconnect_window = None @@ -100,6 +103,8 @@ def __init__(self, playback_policy=None, advanced_playback_policies=None, new_as if playback_policy is not None: self.playback_policy = playback_policy + if playback_policies is not None: + self.playback_policies = playback_policies if advanced_playback_policies is not None: self.advanced_playback_policies = advanced_playback_policies if new_asset_settings is not None: @@ -135,6 +140,7 @@ def __init__(self, playback_policy=None, advanced_playback_policies=None, new_as def playback_policy(self): """Gets the playback_policy of this CreateLiveStreamRequest. # noqa: E501 + Deprecated. Use `playback_policies` instead, which accepts an identical type. # noqa: E501 :return: The playback_policy of this CreateLiveStreamRequest. # noqa: E501 :rtype: list[PlaybackPolicy] @@ -145,6 +151,7 @@ def playback_policy(self): def playback_policy(self, playback_policy): """Sets the playback_policy of this CreateLiveStreamRequest. + Deprecated. Use `playback_policies` instead, which accepts an identical type. # noqa: E501 :param playback_policy: The playback_policy of this CreateLiveStreamRequest. # noqa: E501 :type playback_policy: list[PlaybackPolicy] @@ -152,11 +159,34 @@ def playback_policy(self, playback_policy): self._playback_policy = playback_policy + @property + def playback_policies(self): + """Gets the playback_policies of this CreateLiveStreamRequest. # noqa: E501 + + An array of playback policy names that you want applied to this live stream and available through `playback_ids`. Options include: * `\"public\"` (anyone with the playback URL can stream the live stream). * `\"signed\"` (an additional access token is required to play the live stream). If no `playback_policies` is set, the live stream will have no playback IDs and will therefore not be playable. For simplicity, a single string name can be used in place of the array in the case of only one playback policy. # noqa: E501 + + :return: The playback_policies of this CreateLiveStreamRequest. # noqa: E501 + :rtype: list[PlaybackPolicy] + """ + return self._playback_policies + + @playback_policies.setter + def playback_policies(self, playback_policies): + """Sets the playback_policies of this CreateLiveStreamRequest. + + An array of playback policy names that you want applied to this live stream and available through `playback_ids`. Options include: * `\"public\"` (anyone with the playback URL can stream the live stream). * `\"signed\"` (an additional access token is required to play the live stream). If no `playback_policies` is set, the live stream will have no playback IDs and will therefore not be playable. For simplicity, a single string name can be used in place of the array in the case of only one playback policy. # noqa: E501 + + :param playback_policies: The playback_policies of this CreateLiveStreamRequest. # noqa: E501 + :type playback_policies: list[PlaybackPolicy] + """ + + self._playback_policies = playback_policies + @property def advanced_playback_policies(self): """Gets the advanced_playback_policies of this CreateLiveStreamRequest. # noqa: E501 - 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. # noqa: E501 + An array of playback policy objects that you want applied on this live stream and available through `playback_ids`. `advanced_playback_policies` must be used instead of `playback_policies` when creating a DRM playback ID. # noqa: E501 :return: The advanced_playback_policies of this CreateLiveStreamRequest. # noqa: E501 :rtype: list[CreatePlaybackIDRequest] @@ -167,7 +197,7 @@ def advanced_playback_policies(self): def advanced_playback_policies(self, advanced_playback_policies): """Sets the advanced_playback_policies of this CreateLiveStreamRequest. - 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. # noqa: E501 + An array of playback policy objects that you want applied on this live stream and available through `playback_ids`. `advanced_playback_policies` must be used instead of `playback_policies` when creating a DRM playback ID. # noqa: E501 :param advanced_playback_policies: The advanced_playback_policies of this CreateLiveStreamRequest. # noqa: E501 :type advanced_playback_policies: list[CreatePlaybackIDRequest] diff --git a/mux_python/models/update_asset_request.py b/mux_python/models/update_asset_request.py index 76b3571..4be5ff0 100644 --- a/mux_python/models/update_asset_request.py +++ b/mux_python/models/update_asset_request.py @@ -37,30 +37,35 @@ class UpdateAssetRequest(object): and the value is json key in definition. """ openapi_types = { - 'passthrough': 'str' + 'passthrough': 'str', + 'meta': 'AssetMetadata' } attribute_map = { - 'passthrough': 'passthrough' + 'passthrough': 'passthrough', + 'meta': 'meta' } - def __init__(self, passthrough=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, passthrough=None, meta=None, local_vars_configuration=None): # noqa: E501 """UpdateAssetRequest - 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._passthrough = None + self._meta = None self.discriminator = None if passthrough is not None: self.passthrough = passthrough + if meta is not None: + self.meta = meta @property def passthrough(self): """Gets the passthrough of this UpdateAssetRequest. # noqa: E501 - Arbitrary metadata set for the Asset. Max 255 characters. In order to clear this value, the field should be included with an empty string value. # noqa: E501 + You can set this field to anything you want. It will be included in the asset details and related webhooks. If you're looking for more structured metadata, such as `title` or `external_id` , you can use the `meta` object instead. **Max: 255 characters**. In order to clear this value, the field should be included with an empty string value. # noqa: E501 :return: The passthrough of this UpdateAssetRequest. # noqa: E501 :rtype: str @@ -71,7 +76,7 @@ def passthrough(self): def passthrough(self, passthrough): """Sets the passthrough of this UpdateAssetRequest. - Arbitrary metadata set for the Asset. Max 255 characters. In order to clear this value, the field should be included with an empty string value. # noqa: E501 + You can set this field to anything you want. It will be included in the asset details and related webhooks. If you're looking for more structured metadata, such as `title` or `external_id` , you can use the `meta` object instead. **Max: 255 characters**. In order to clear this value, the field should be included with an empty string value. # noqa: E501 :param passthrough: The passthrough of this UpdateAssetRequest. # noqa: E501 :type passthrough: str @@ -79,6 +84,27 @@ def passthrough(self, passthrough): self._passthrough = passthrough + @property + def meta(self): + """Gets the meta of this UpdateAssetRequest. # noqa: E501 + + + :return: The meta of this UpdateAssetRequest. # noqa: E501 + :rtype: AssetMetadata + """ + return self._meta + + @meta.setter + def meta(self, meta): + """Sets the meta of this UpdateAssetRequest. + + + :param meta: The meta of this UpdateAssetRequest. # noqa: E501 + :type meta: AssetMetadata + """ + + self._meta = meta + 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 index 79a119d..a67ac0b 100644 --- a/mux_python/models/update_live_stream_new_asset_settings.py +++ b/mux_python/models/update_live_stream_new_asset_settings.py @@ -39,16 +39,18 @@ class UpdateLiveStreamNewAssetSettings(object): openapi_types = { 'mp4_support': 'str', 'master_access': 'str', - 'video_quality': 'str' + 'video_quality': 'str', + 'meta': 'AssetMetadata' } attribute_map = { 'mp4_support': 'mp4_support', 'master_access': 'master_access', - 'video_quality': 'video_quality' + 'video_quality': 'video_quality', + 'meta': 'meta' } - def __init__(self, mp4_support=None, master_access=None, video_quality=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, mp4_support=None, master_access=None, video_quality=None, meta=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() @@ -57,6 +59,7 @@ def __init__(self, mp4_support=None, master_access=None, video_quality=None, loc self._mp4_support = None self._master_access = None self._video_quality = None + self._meta = None self.discriminator = None if mp4_support is not None: @@ -65,6 +68,8 @@ def __init__(self, mp4_support=None, master_access=None, video_quality=None, loc self.master_access = master_access if video_quality is not None: self.video_quality = video_quality + if meta is not None: + self.meta = meta @property def mp4_support(self): @@ -153,6 +158,27 @@ def video_quality(self, video_quality): self._video_quality = video_quality + @property + def meta(self): + """Gets the meta of this UpdateLiveStreamNewAssetSettings. # noqa: E501 + + + :return: The meta of this UpdateLiveStreamNewAssetSettings. # noqa: E501 + :rtype: AssetMetadata + """ + return self._meta + + @meta.setter + def meta(self, meta): + """Sets the meta of this UpdateLiveStreamNewAssetSettings. + + + :param meta: The meta of this UpdateLiveStreamNewAssetSettings. # noqa: E501 + :type meta: AssetMetadata + """ + + self._meta = meta + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/mux_python/models/upload.py b/mux_python/models/upload.py index 9dfeff5..a46bc93 100644 --- a/mux_python/models/upload.py +++ b/mux_python/models/upload.py @@ -40,7 +40,7 @@ class Upload(object): 'id': 'str', 'timeout': 'int', 'status': 'str', - 'new_asset_settings': 'Asset', + 'new_asset_settings': 'CreateAssetRequest', 'asset_id': 'str', 'error': 'UploadError', 'cors_origin': 'str', @@ -181,7 +181,7 @@ def new_asset_settings(self): :return: The new_asset_settings of this Upload. # noqa: E501 - :rtype: Asset + :rtype: CreateAssetRequest """ return self._new_asset_settings @@ -191,7 +191,7 @@ def new_asset_settings(self, new_asset_settings): :param new_asset_settings: The new_asset_settings of this Upload. # noqa: E501 - :type new_asset_settings: Asset + :type new_asset_settings: CreateAssetRequest """ self._new_asset_settings = new_asset_settings diff --git a/mux_python/models/video_view.py b/mux_python/models/video_view.py index bc4cb36..15de451 100644 --- a/mux_python/models/video_view.py +++ b/mux_python/models/video_view.py @@ -214,7 +214,8 @@ class VideoView(object): 'audio_codec': 'str', 'video_dynamic_range_type': 'str', 'view_cdn_edge_pop': 'str', - 'view_cdn_origin': 'str' + 'view_cdn_origin': 'str', + 'video_creator_id': 'str' } attribute_map = { @@ -395,10 +396,11 @@ class VideoView(object): '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' + 'view_cdn_origin': 'view_cdn_origin', + 'video_creator_id': 'video_creator_id' } - 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 + 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, video_creator_id=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() @@ -582,6 +584,7 @@ def __init__(self, view_total_upscaling=None, preroll_ad_asset_hostname=None, pl self._video_dynamic_range_type = None self._view_cdn_edge_pop = None self._view_cdn_origin = None + self._video_creator_id = None self.discriminator = None self.view_total_upscaling = view_total_upscaling @@ -789,6 +792,7 @@ def __init__(self, view_total_upscaling=None, preroll_ad_asset_hostname=None, pl 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 + self.video_creator_id = video_creator_id @property def view_total_upscaling(self): @@ -4528,6 +4532,27 @@ def view_cdn_origin(self, view_cdn_origin): self._view_cdn_origin = view_cdn_origin + @property + def video_creator_id(self): + """Gets the video_creator_id of this VideoView. # noqa: E501 + + + :return: The video_creator_id of this VideoView. # noqa: E501 + :rtype: str + """ + return self._video_creator_id + + @video_creator_id.setter + def video_creator_id(self, video_creator_id): + """Sets the video_creator_id of this VideoView. + + + :param video_creator_id: The video_creator_id of this VideoView. # noqa: E501 + :type video_creator_id: str + """ + + self._video_creator_id = video_creator_id + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/setup.py b/setup.py index a6721fe..9c0e723 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "mux_python" -VERSION = "4.0.0" +VERSION = "5.0.0" # To install the library, run the following # # python setup.py install diff --git a/test/test_asset_metadata.py b/test/test_asset_metadata.py new file mode 100644 index 0000000..9905a4b --- /dev/null +++ b/test/test_asset_metadata.py @@ -0,0 +1,54 @@ +# 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.asset_metadata import AssetMetadata # noqa: E501 +from mux_python.rest import ApiException + +class TestAssetMetadata(unittest.TestCase): + """AssetMetadata unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test AssetMetadata + 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.asset_metadata.AssetMetadata() # noqa: E501 + if include_optional : + return AssetMetadata( + title = '', + creator_id = '', + external_id = '' + ) + else : + return AssetMetadata( + ) + + def testAssetMetadata(self): + """Test AssetMetadata""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main()