From 7699d5d3892be360a20597f37a0c8b3435e7824c Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 16 Mar 2023 04:57:15 +0000 Subject: [PATCH] CodeGen from PR 23126 in Azure/azure-rest-api-specs Merge 9c0c5e13413ff8905ecb0f4c48224f8421179bb4 into 51b8f2084b05e705baf30f24ea0a40a346e2c5a5 --- sdk/media/azure-mgmt-media/_meta.json | 6 +- .../azure/mgmt/media/_azure_media_services.py | 4 +- .../azure/mgmt/media/_serialization.py | 87 +- .../azure/mgmt/media/_vendor.py | 5 +- .../azure/mgmt/media/_version.py | 2 +- .../mgmt/media/aio/_azure_media_services.py | 4 +- .../operations/_account_filters_operations.py | 31 +- .../operations/_asset_filters_operations.py | 29 +- .../aio/operations/_assets_operations.py | 47 +- .../_content_key_policies_operations.py | 36 +- .../media/aio/operations/_jobs_operations.py | 22 +- .../aio/operations/_live_events_operations.py | 676 ++++++- .../operations/_live_outputs_operations.py | 38 +- .../aio/operations/_locations_operations.py | 8 +- ...a_services_operation_results_operations.py | 5 +- ..._services_operation_statuses_operations.py | 5 +- .../operations/_mediaservices_operations.py | 56 +- .../_operation_results_operations.py | 5 +- .../_operation_statuses_operations.py | 5 +- .../mgmt/media/aio/operations/_operations.py | 5 +- ...private_endpoint_connections_operations.py | 23 +- .../_private_link_resources_operations.py | 10 +- .../_streaming_endpoints_operations.py | 79 +- .../_streaming_locators_operations.py | 33 +- .../_streaming_policies_operations.py | 23 +- .../aio/operations/_tracks_operations.py | 42 +- .../aio/operations/_transforms_operations.py | 19 +- .../azure/mgmt/media/models/__init__.py | 44 + .../models/_azure_media_services_enums.py | 731 ++++--- .../azure/mgmt/media/models/_models_py3.py | 1701 +++++++++++++---- .../operations/_account_filters_operations.py | 41 +- .../operations/_asset_filters_operations.py | 39 +- .../media/operations/_assets_operations.py | 63 +- .../_content_key_policies_operations.py | 48 +- .../mgmt/media/operations/_jobs_operations.py | 22 +- .../operations/_live_events_operations.py | 812 +++++++- .../operations/_live_outputs_operations.py | 50 +- .../media/operations/_locations_operations.py | 10 +- ...a_services_operation_results_operations.py | 7 +- ..._services_operation_statuses_operations.py | 7 +- .../operations/_mediaservices_operations.py | 72 +- .../_operation_results_operations.py | 7 +- .../_operation_statuses_operations.py | 7 +- .../mgmt/media/operations/_operations.py | 7 +- ...private_endpoint_connections_operations.py | 31 +- .../_private_link_resources_operations.py | 14 +- .../_streaming_endpoints_operations.py | 101 +- .../_streaming_locators_operations.py | 45 +- .../_streaming_policies_operations.py | 31 +- .../media/operations/_tracks_operations.py | 54 +- .../operations/_transforms_operations.py | 19 +- .../account_filterscreate.py | 4 +- .../account_filtersdelete.py | 4 +- .../account_filtersgetbyname.py | 4 +- .../account_filterslistall.py | 4 +- .../account_filtersupdate.py | 4 +- .../accountschecknameavailability.py | 4 +- .../generated_samples/accountsdelete.py | 4 +- .../generated_samples/accountsgetbyname.py | 4 +- .../accountslistallaccounts.py | 4 +- .../accountslistmediaedgepolicies.py | 4 +- .../accountssubscriptionlistallaccounts.py | 2 +- .../accountssyncstoragekeys.py | 4 +- .../generated_samples/asset_filterscreate.py | 4 +- .../generated_samples/asset_filtersdelete.py | 4 +- .../asset_filtersgetbyname.py | 4 +- .../generated_samples/asset_filterslistall.py | 4 +- .../generated_samples/asset_filtersupdate.py | 4 +- .../generated_samples/assetscreate.py | 4 +- .../assetscreatewithencryptionscope.py | 49 + .../generated_samples/assetsdelete.py | 4 +- .../generated_samples/assetsgetbyname.py | 4 +- .../assetsgetencryptionkeys.py | 4 +- .../generated_samples/assetslistall.py | 4 +- .../generated_samples/assetslistbydate.py | 4 +- .../assetslistindaterange.py | 4 +- .../generated_samples/assetslistsasurls.py | 4 +- .../assetsliststreaminglocators.py | 4 +- .../generated_samples/assetsupdate.py | 4 +- .../generated_samples/assettrackscreate.py | 4 +- .../generated_samples/assettracksdelete.py | 4 +- .../generated_samples/assettracksgetbyname.py | 4 +- .../generated_samples/assettrackslistall.py | 4 +- .../assettracksoperationresultbyid.py | 4 +- ...acksoperationstatusbyidnonterminalstate.py | 4 +- ...ttracksoperationstatusbyidterminalstate.py | 4 +- ...soperationstatusbyidterminalstatefailed.py | 4 +- .../generated_samples/assettracksupdate.py | 4 +- .../assettracksupdatedata.py | 4 +- .../generated_samples/asyncaccountscreate.py | 29 +- .../asyncaccountscreatemanagedidentity.py | 74 + .../generated_samples/asyncaccountsupdate.py | 4 +- .../generated_samples/asyncoperationresult.py | 2 +- ...contentkeypoliciescreatemultipleoptions.py | 4 +- .../contentkeypoliciescreatenodrmtoken.py | 4 +- .../contentkeypoliciescreateplayreadyopen.py | 4 +- .../contentkeypoliciescreatewidevinetoken.py | 4 +- .../contentkeypoliciesdelete.py | 4 +- .../contentkeypoliciesgetbyname.py | 4 +- .../contentkeypoliciesgetwithsecrets.py | 4 +- .../contentkeypolicieslistall.py | 4 +- .../contentkeypolicieslistbylast_modified.py | 4 +- .../contentkeypolicieslistindaterange.py | 4 +- .../contentkeypoliciesupdate.py | 4 +- .../generated_samples/liveeventallocate.py | 2 +- .../generated_samples/liveeventcreate.py | 2 +- .../generated_samples/liveeventdelete.py | 2 +- .../generated_samples/liveeventgetstatus.py | 43 + .../liveeventgetstreamevents.py | 43 + .../liveeventgettrackevents.py | 43 + .../generated_samples/liveeventlistall.py | 2 +- .../generated_samples/liveeventlistbyname.py | 2 +- .../liveeventoperationlocation.py | 2 +- .../generated_samples/liveeventreset.py | 2 +- .../generated_samples/liveeventstart.py | 2 +- .../generated_samples/liveeventstop.py | 2 +- .../generated_samples/liveeventupdate.py | 2 +- .../generated_samples/liveoutputcreate.py | 2 +- .../generated_samples/liveoutputdelete.py | 2 +- .../generated_samples/liveoutputlistall.py | 2 +- .../generated_samples/liveoutputlistbyname.py | 2 +- .../liveoutputoperationlocation.py | 2 +- .../mediaserviceoperationresultbyid.py | 2 +- ...viceoperationstatusbyidnonterminalstate.py | 2 +- ...erationstatusbyidnonterminalstatefailed.py | 2 +- ...serviceoperationstatusbyidterminalstate.py | 2 +- .../generated_samples/operationslistall.py | 2 +- .../privateendpointconnectiondelete.py | 4 +- .../privateendpointconnectiongetbyname.py | 4 +- .../privateendpointconnectionlist.py | 4 +- .../privateendpointconnectionput.py | 4 +- .../privatelinkresourcesgetbyname.py | 4 +- .../privatelinkresourceslist.py | 4 +- .../streamingendpointcreate.py | 2 +- .../streamingendpointdelete.py | 2 +- .../streamingendpointlistall.py | 2 +- .../streamingendpointlistbyname.py | 2 +- .../streamingendpointlistskus.py | 2 +- .../streamingendpointoperationlocation.py | 2 +- .../streamingendpointscale.py | 2 +- .../streamingendpointstart.py | 2 +- .../streamingendpointstop.py | 2 +- .../streamingendpointupdate.py | 2 +- .../streaminglocatorscreateclear.py | 4 +- .../streaminglocatorscreatesecure.py | 6 +- ...rscreatesecureuser_defined_content_keys.py | 4 +- .../streaminglocatorsdelete.py | 4 +- .../streaminglocatorsgetbyname.py | 4 +- .../streaminglocatorslist.py | 4 +- .../streaminglocatorslistcontentkeys.py | 4 +- ...nglocatorslistpathsstreaminganddownload.py | 4 +- ...streaminglocatorslistpathsstreamingonly.py | 4 +- .../streamingpoliciescreateclear.py | 6 +- ...mon_encryption_cbcsclear_key_encryption.py | 4 +- ...oliciescreatecommon_encryption_cbcsonly.py | 4 +- ...mon_encryption_cencclear_key_encryption.py | 4 +- ...oliciescreatecommon_encryption_cenconly.py | 4 +- ...ngpoliciescreateenvelope_encryptiononly.py | 4 +- .../streamingpoliciescreatesecurestreaming.py | 4 +- .../streamingpoliciesdelete.py | 4 +- .../streamingpolicieslist.py | 4 +- .../streamingpolicygetbyname.py | 4 +- 162 files changed, 4404 insertions(+), 1505 deletions(-) create mode 100644 sdk/media/azure-mgmt-media/generated_samples/assetscreatewithencryptionscope.py create mode 100644 sdk/media/azure-mgmt-media/generated_samples/asyncaccountscreatemanagedidentity.py create mode 100644 sdk/media/azure-mgmt-media/generated_samples/liveeventgetstatus.py create mode 100644 sdk/media/azure-mgmt-media/generated_samples/liveeventgetstreamevents.py create mode 100644 sdk/media/azure-mgmt-media/generated_samples/liveeventgettrackevents.py diff --git a/sdk/media/azure-mgmt-media/_meta.json b/sdk/media/azure-mgmt-media/_meta.json index 2755c0a9822d..6ccc7d4f1a5a 100644 --- a/sdk/media/azure-mgmt-media/_meta.json +++ b/sdk/media/azure-mgmt-media/_meta.json @@ -1,11 +1,11 @@ { - "commit": "6e011aae8dd50b5acb4bd5e951f5b930a010bc41", + "commit": "5f73de1e737386f8a5b8569d5b49bad5927a3045", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest": "3.9.2", "use": [ - "@autorest/python@6.2.7", + "@autorest/python@6.4.3", "@autorest/modelerfour@4.24.3" ], - "autorest_command": "autorest specification/mediaservices/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.2.7 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False", + "autorest_command": "autorest specification/mediaservices/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.4.3 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False", "readme": "specification/mediaservices/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/_azure_media_services.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/_azure_media_services.py index 7196242f33e9..4e5f64924712 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/_azure_media_services.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/_azure_media_services.py @@ -110,7 +110,7 @@ def __init__( **kwargs: Any ) -> None: self._config = AzureMediaServicesConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) - self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) @@ -187,5 +187,5 @@ def __enter__(self) -> "AzureMediaServices": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/_serialization.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/_serialization.py index 2c170e28dbca..f17c068e833e 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/_serialization.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/_serialization.py @@ -38,7 +38,22 @@ import re import sys import codecs -from typing import Optional, Union, AnyStr, IO, Mapping +from typing import ( + Dict, + Any, + cast, + Optional, + Union, + AnyStr, + IO, + Mapping, + Callable, + TypeVar, + MutableMapping, + Type, + List, + Mapping, +) try: from urllib import quote # type: ignore @@ -48,12 +63,14 @@ import isodate # type: ignore -from typing import Dict, Any, cast - from azure.core.exceptions import DeserializationError, SerializationError, raise_with_traceback +from azure.core.serialization import NULL as AzureCoreNull _BOM = codecs.BOM_UTF8.decode(encoding="utf-8") +ModelType = TypeVar("ModelType", bound="Model") +JSON = MutableMapping[str, Any] + class RawDeserializer: @@ -277,8 +294,8 @@ class Model(object): _attribute_map: Dict[str, Dict[str, Any]] = {} _validation: Dict[str, Dict[str, Any]] = {} - def __init__(self, **kwargs): - self.additional_properties = {} + def __init__(self, **kwargs: Any) -> None: + self.additional_properties: Dict[str, Any] = {} for k in kwargs: if k not in self._attribute_map: _LOGGER.warning("%s is not a known attribute of class %s and will be ignored", k, self.__class__) @@ -287,25 +304,25 @@ def __init__(self, **kwargs): else: setattr(self, k, kwargs[k]) - def __eq__(self, other): + def __eq__(self, other: Any) -> bool: """Compare objects by comparing all attributes.""" if isinstance(other, self.__class__): return self.__dict__ == other.__dict__ return False - def __ne__(self, other): + def __ne__(self, other: Any) -> bool: """Compare objects by comparing all attributes.""" return not self.__eq__(other) - def __str__(self): + def __str__(self) -> str: return str(self.__dict__) @classmethod - def enable_additional_properties_sending(cls): + def enable_additional_properties_sending(cls) -> None: cls._attribute_map["additional_properties"] = {"key": "", "type": "{object}"} @classmethod - def is_xml_model(cls): + def is_xml_model(cls) -> bool: try: cls._xml_map # type: ignore except AttributeError: @@ -322,7 +339,7 @@ def _create_xml_node(cls): return _create_xml_node(xml_map.get("name", cls.__name__), xml_map.get("prefix", None), xml_map.get("ns", None)) - def serialize(self, keep_readonly=False, **kwargs): + def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON: """Return the JSON that would be sent to azure from this model. This is an alias to `as_dict(full_restapi_key_transformer, keep_readonly=False)`. @@ -336,8 +353,13 @@ def serialize(self, keep_readonly=False, **kwargs): serializer = Serializer(self._infer_class_models()) return serializer._serialize(self, keep_readonly=keep_readonly, **kwargs) - def as_dict(self, keep_readonly=True, key_transformer=attribute_transformer, **kwargs): - """Return a dict that can be JSONify using json.dump. + def as_dict( + self, + keep_readonly: bool = True, + key_transformer: Callable[[str, Dict[str, Any], Any], Any] = attribute_transformer, + **kwargs: Any + ) -> JSON: + """Return a dict that can be serialized using json.dump. Advanced usage might optionally use a callback as parameter: @@ -384,7 +406,7 @@ def _infer_class_models(cls): return client_models @classmethod - def deserialize(cls, data, content_type=None): + def deserialize(cls: Type[ModelType], data: Any, content_type: Optional[str] = None) -> ModelType: """Parse a str using the RestAPI syntax and return a model. :param str data: A str using RestAPI structure. JSON by default. @@ -396,7 +418,12 @@ def deserialize(cls, data, content_type=None): return deserializer(cls.__name__, data, content_type=content_type) @classmethod - def from_dict(cls, data, key_extractors=None, content_type=None): + def from_dict( + cls: Type[ModelType], + data: Any, + key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None, + content_type: Optional[str] = None, + ) -> ModelType: """Parse a dict using given key extractor return a model. By default consider key @@ -409,8 +436,8 @@ def from_dict(cls, data, key_extractors=None, content_type=None): :raises: DeserializationError if something went wrong """ deserializer = Deserializer(cls._infer_class_models()) - deserializer.key_extractors = ( - [ + deserializer.key_extractors = ( # type: ignore + [ # type: ignore attribute_key_case_insensitive_extractor, rest_key_case_insensitive_extractor, last_rest_key_case_insensitive_extractor, @@ -518,7 +545,7 @@ class Serializer(object): "multiple": lambda x, y: x % y != 0, } - def __init__(self, classes=None): + def __init__(self, classes: Optional[Mapping[str, Type[ModelType]]] = None): self.serialize_type = { "iso-8601": Serializer.serialize_iso, "rfc-1123": Serializer.serialize_rfc, @@ -534,7 +561,7 @@ def __init__(self, classes=None): "[]": self.serialize_iter, "{}": self.serialize_dict, } - self.dependencies = dict(classes) if classes else {} + self.dependencies: Dict[str, Type[ModelType]] = dict(classes) if classes else {} self.key_transformer = full_restapi_key_transformer self.client_side_validation = True @@ -626,8 +653,7 @@ def _serialize(self, target_obj, data_type=None, **kwargs): serialized.append(local_node) # type: ignore else: # JSON for k in reversed(keys): # type: ignore - unflattened = {k: new_attr} - new_attr = unflattened + new_attr = {k: new_attr} _new_attr = new_attr _serialized = serialized @@ -656,8 +682,8 @@ def body(self, data, data_type, **kwargs): """ # Just in case this is a dict - internal_data_type = data_type.strip("[]{}") - internal_data_type = self.dependencies.get(internal_data_type, None) + internal_data_type_str = data_type.strip("[]{}") + internal_data_type = self.dependencies.get(internal_data_type_str, None) try: is_xml_model_serialization = kwargs["is_xml"] except KeyError: @@ -777,6 +803,8 @@ def serialize_data(self, data, data_type, **kwargs): raise ValueError("No value for given attribute") try: + if data is AzureCoreNull: + return None if data_type in self.basic_types.values(): return self.serialize_basic(data, data_type, **kwargs) @@ -1161,7 +1189,8 @@ def rest_key_extractor(attr, attr_desc, data): working_data = data while "." in key: - dict_keys = _FLATTEN.split(key) + # Need the cast, as for some reasons "split" is typed as list[str | Any] + dict_keys = cast(List[str], _FLATTEN.split(key)) if len(dict_keys) == 1: key = _decode_attribute_map_key(dict_keys[0]) break @@ -1332,7 +1361,7 @@ class Deserializer(object): valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") - def __init__(self, classes=None): + def __init__(self, classes: Optional[Mapping[str, Type[ModelType]]] = None): self.deserialize_type = { "iso-8601": Deserializer.deserialize_iso, "rfc-1123": Deserializer.deserialize_rfc, @@ -1352,7 +1381,7 @@ def __init__(self, classes=None): "duration": (isodate.Duration, datetime.timedelta), "iso-8601": (datetime.datetime), } - self.dependencies = dict(classes) if classes else {} + self.dependencies: Dict[str, Type[ModelType]] = dict(classes) if classes else {} self.key_extractors = [rest_key_extractor, xml_key_extractor] # Additional properties only works if the "rest_key_extractor" is used to # extract the keys. Making it to work whatever the key extractor is too much @@ -1471,7 +1500,7 @@ def _classify_target(self, target, data): Once classification has been determined, initialize object. :param str target: The target object type to deserialize to. - :param str/dict data: The response data to deseralize. + :param str/dict data: The response data to deserialize. """ if target is None: return None, None @@ -1486,7 +1515,7 @@ def _classify_target(self, target, data): target = target._classify(data, self.dependencies) except AttributeError: pass # Target is not a Model, no classify - return target, target.__class__.__name__ + return target, target.__class__.__name__ # type: ignore def failsafe_deserialize(self, target_obj, data, content_type=None): """Ignores any errors encountered in deserialization, @@ -1496,7 +1525,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None): a deserialization error. :param str target_obj: The target object type to deserialize to. - :param str/dict data: The response data to deseralize. + :param str/dict data: The response data to deserialize. :param str content_type: Swagger "produces" if available. """ try: diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/_vendor.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/_vendor.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/_version.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/_version.py index dca644af5794..e5754a47ce68 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/_version.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "10.2.0" +VERSION = "1.0.0b1" diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/_azure_media_services.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/_azure_media_services.py index 31b0478e6821..cac3fc932b18 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/_azure_media_services.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/_azure_media_services.py @@ -110,7 +110,7 @@ def __init__( **kwargs: Any ) -> None: self._config = AzureMediaServicesConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) - self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) @@ -187,5 +187,5 @@ async def __aenter__(self) -> "AzureMediaServices": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_account_filters_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_account_filters_operations.py index 8d7a982f30de..9852abdf4b53 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_account_filters_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_account_filters_operations.py @@ -84,7 +84,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.AccountFilterCollection] = kwargs.pop("cls", None) error_map = { @@ -127,8 +127,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -176,7 +177,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.AccountFilter] = kwargs.pop("cls", None) request = build_get_request( @@ -192,8 +193,9 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -300,7 +302,8 @@ async def create_or_update( :type account_name: str :param filter_name: The Account Filter name. Required. :type filter_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a AccountFilter type or a IO type. + Required. :type parameters: ~azure.mgmt.media.models.AccountFilter or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -321,7 +324,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AccountFilter] = kwargs.pop("cls", None) @@ -349,8 +352,9 @@ async def create_or_update( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -406,7 +410,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -422,8 +426,9 @@ async def delete( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -526,7 +531,8 @@ async def update( :type account_name: str :param filter_name: The Account Filter name. Required. :type filter_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a AccountFilter type or a IO type. + Required. :type parameters: ~azure.mgmt.media.models.AccountFilter or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -547,7 +553,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AccountFilter] = kwargs.pop("cls", None) @@ -575,8 +581,9 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_asset_filters_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_asset_filters_operations.py index 3dd41bf27e33..6c3ffd8f4321 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_asset_filters_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_asset_filters_operations.py @@ -86,7 +86,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.AssetFilterCollection] = kwargs.pop("cls", None) error_map = { @@ -130,8 +130,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -181,7 +182,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.AssetFilter] = kwargs.pop("cls", None) request = build_get_request( @@ -198,8 +199,9 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -315,7 +317,7 @@ async def create_or_update( :type asset_name: str :param filter_name: The Asset Filter name. Required. :type filter_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a AssetFilter type or a IO type. Required. :type parameters: ~azure.mgmt.media.models.AssetFilter or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -336,7 +338,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AssetFilter] = kwargs.pop("cls", None) @@ -365,8 +367,9 @@ async def create_or_update( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -424,7 +427,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -441,8 +444,9 @@ async def delete( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -554,7 +558,7 @@ async def update( :type asset_name: str :param filter_name: The Asset Filter name. Required. :type filter_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a AssetFilter type or a IO type. Required. :type parameters: ~azure.mgmt.media.models.AssetFilter or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -575,7 +579,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AssetFilter] = kwargs.pop("cls", None) @@ -604,8 +608,9 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_assets_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_assets_operations.py index 07c026b5166f..ed562f72d815 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_assets_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_assets_operations.py @@ -102,7 +102,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.AssetCollection] = kwargs.pop("cls", None) error_map = { @@ -148,8 +148,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -195,7 +196,7 @@ async def get(self, resource_group_name: str, account_name: str, asset_name: str _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.Asset] = kwargs.pop("cls", None) request = build_get_request( @@ -211,8 +212,9 @@ async def get(self, resource_group_name: str, account_name: str, asset_name: str request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -319,7 +321,7 @@ async def create_or_update( :type account_name: str :param asset_name: The Asset name. Required. :type asset_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a Asset type or a IO type. Required. :type parameters: ~azure.mgmt.media.models.Asset or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -340,7 +342,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Asset] = kwargs.pop("cls", None) @@ -368,8 +370,9 @@ async def create_or_update( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -425,7 +428,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -441,8 +444,9 @@ async def delete( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -545,7 +549,7 @@ async def update( :type account_name: str :param asset_name: The Asset name. Required. :type asset_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a Asset type or a IO type. Required. :type parameters: ~azure.mgmt.media.models.Asset or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -566,7 +570,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Asset] = kwargs.pop("cls", None) @@ -594,8 +598,9 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -705,7 +710,8 @@ async def list_container_sas( :type account_name: str :param asset_name: The Asset name. Required. :type asset_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a ListContainerSasInput type or a IO type. + Required. :type parameters: ~azure.mgmt.media.models.ListContainerSasInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -726,7 +732,7 @@ async def list_container_sas( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AssetContainerSas] = kwargs.pop("cls", None) @@ -754,8 +760,9 @@ async def list_container_sas( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -808,7 +815,7 @@ async def get_encryption_key( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.StorageEncryptedAssetDecryptionData] = kwargs.pop("cls", None) request = build_get_encryption_key_request( @@ -824,8 +831,9 @@ async def get_encryption_key( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -877,7 +885,7 @@ async def list_streaming_locators( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.ListStreamingLocatorsResponse] = kwargs.pop("cls", None) request = build_list_streaming_locators_request( @@ -893,8 +901,9 @@ async def list_streaming_locators( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_content_key_policies_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_content_key_policies_operations.py index 88e20b5164d6..d722087ac364 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_content_key_policies_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_content_key_policies_operations.py @@ -100,7 +100,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.ContentKeyPolicyCollection] = kwargs.pop("cls", None) error_map = { @@ -146,8 +146,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -195,7 +196,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.ContentKeyPolicy] = kwargs.pop("cls", None) request = build_get_request( @@ -211,8 +212,9 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -319,7 +321,8 @@ async def create_or_update( :type account_name: str :param content_key_policy_name: The Content Key Policy name. Required. :type content_key_policy_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a ContentKeyPolicy type or a IO type. + Required. :type parameters: ~azure.mgmt.media.models.ContentKeyPolicy or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -340,7 +343,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ContentKeyPolicy] = kwargs.pop("cls", None) @@ -368,8 +371,9 @@ async def create_or_update( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -425,7 +429,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -441,8 +445,9 @@ async def delete( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -545,7 +550,8 @@ async def update( :type account_name: str :param content_key_policy_name: The Content Key Policy name. Required. :type content_key_policy_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a ContentKeyPolicy type or a IO type. + Required. :type parameters: ~azure.mgmt.media.models.ContentKeyPolicy or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -566,7 +572,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ContentKeyPolicy] = kwargs.pop("cls", None) @@ -594,8 +600,9 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -647,7 +654,7 @@ async def get_policy_properties_with_secrets( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.ContentKeyPolicyProperties] = kwargs.pop("cls", None) request = build_get_policy_properties_with_secrets_request( @@ -663,8 +670,9 @@ async def get_policy_properties_with_secrets( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_jobs_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_jobs_operations.py index 42d8243d799d..ec0c8223f195 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_jobs_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_jobs_operations.py @@ -144,8 +144,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -212,8 +213,9 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -329,7 +331,7 @@ async def create( :type transform_name: str :param job_name: The Job name. Required. :type job_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a Job type or a IO type. Required. :type parameters: ~azure.mgmt.media.models.Job or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -379,8 +381,9 @@ async def create( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -451,8 +454,9 @@ async def delete( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -570,7 +574,7 @@ async def update( :type transform_name: str :param job_name: The Job name. Required. :type job_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a Job type or a IO type. Required. :type parameters: ~azure.mgmt.media.models.Job or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -620,8 +624,9 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -692,8 +697,9 @@ async def cancel_job( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_live_events_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_live_events_operations.py index cc9c7d8a5fa3..4c37aaf37a68 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_live_events_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_live_events_operations.py @@ -36,6 +36,9 @@ build_create_request, build_delete_request, build_get_request, + build_list_get_status_request, + build_list_get_stream_events_request, + build_list_get_track_ingest_heartbeats_request, build_list_request, build_operation_location_request, build_reset_request, @@ -52,7 +55,7 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class LiveEventsOperations: +class LiveEventsOperations: # pylint: disable=too-many-public-methods """ .. warning:: **DO NOT** instantiate this class directly. @@ -90,7 +93,7 @@ def list(self, resource_group_name: str, account_name: str, **kwargs: Any) -> As _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[_models.LiveEventListResult] = kwargs.pop("cls", None) error_map = { @@ -133,8 +136,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -182,7 +186,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[_models.LiveEvent] = kwargs.pop("cls", None) request = build_get_request( @@ -198,8 +202,9 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -240,7 +245,7 @@ async def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.LiveEvent] = kwargs.pop("cls", None) @@ -269,8 +274,9 @@ async def _create_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -406,8 +412,8 @@ async def begin_create( :type account_name: str :param live_event_name: The name of the live event, maximum length is 32. Required. :type live_event_name: str - :param parameters: Live event properties needed for creation. Is either a model type or a IO - type. Required. + :param parameters: Live event properties needed for creation. Is either a LiveEvent type or a + IO type. Required. :type parameters: ~azure.mgmt.media.models.LiveEvent or IO :param auto_start: The flag indicates if the resource should be automatically started on creation. Default value is None. @@ -431,7 +437,7 @@ async def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.LiveEvent] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -497,7 +503,7 @@ async def _update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.LiveEvent] = kwargs.pop("cls", None) @@ -525,8 +531,9 @@ async def _update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -647,8 +654,8 @@ async def begin_update( :type account_name: str :param live_event_name: The name of the live event, maximum length is 32. Required. :type live_event_name: str - :param parameters: Live event properties needed for patch. Is either a model type or a IO type. - Required. + :param parameters: Live event properties needed for patch. Is either a LiveEvent type or a IO + type. Required. :type parameters: ~azure.mgmt.media.models.LiveEvent or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -669,7 +676,7 @@ async def begin_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.LiveEvent] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -729,7 +736,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -745,8 +752,9 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -793,7 +801,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -848,7 +856,7 @@ async def _allocate_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_allocate_request( @@ -864,8 +872,9 @@ async def _allocate_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -912,7 +921,7 @@ async def begin_allocate( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -967,7 +976,7 @@ async def _start_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_start_request( @@ -983,8 +992,9 @@ async def _start_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1032,7 +1042,7 @@ async def begin_start( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1092,7 +1102,7 @@ async def _stop_initial( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -1120,8 +1130,9 @@ async def _stop_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1238,7 +1249,8 @@ async def begin_stop( :type account_name: str :param live_event_name: The name of the live event, maximum length is 32. Required. :type live_event_name: str - :param parameters: LiveEvent stop parameters. Is either a model type or a IO type. Required. + :param parameters: LiveEvent stop parameters. Is either a LiveEventActionInput type or a IO + type. Required. :type parameters: ~azure.mgmt.media.models.LiveEventActionInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1258,7 +1270,7 @@ async def begin_stop( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1316,7 +1328,7 @@ async def _reset_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_reset_request( @@ -1332,8 +1344,9 @@ async def _reset_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1382,7 +1395,7 @@ async def begin_reset( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1423,6 +1436,597 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/reset" } + async def _list_get_status_initial( + self, resource_group_name: str, account_name: str, live_event_name: str, **kwargs: Any + ) -> Optional[_models.LiveEventGetStatusResult]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) + cls: ClsType[Optional[_models.LiveEventGetStatusResult]] = kwargs.pop("cls", None) + + request = build_list_get_status_request( + resource_group_name=resource_group_name, + account_name=account_name, + live_event_name=live_event_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._list_get_status_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 304]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize("LiveEventGetStatusResult", pipeline_response) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _list_get_status_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/getStatus" + } + + @distributed_trace_async + async def begin_list_get_status( + self, resource_group_name: str, account_name: str, live_event_name: str, **kwargs: Any + ) -> AsyncLROPoller[AsyncIterable["_models.LiveEventStatus"]]: + """Get status of one live event. + + Gets status telemetry of a live event. + + :param resource_group_name: The name of the resource group within the Azure subscription. + Required. + :type resource_group_name: str + :param account_name: The Media Services account name. Required. + :type account_name: str + :param live_event_name: The name of the live event, maximum length is 32. Required. + :type live_event_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns an iterator like instance of either + LiveEventGetStatusResult or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.media.models.LiveEventStatus]] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) + cls: ClsType[_models.LiveEventGetStatusResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_get_status_request( + resource_group_name=resource_group_name, + account_name=account_name, + live_event_name=live_event_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.begin_list_get_status.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + request = HttpRequest("GET", next_link) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("LiveEventGetStatusResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._list_get_status_initial( + resource_group_name=resource_group_name, + account_name=account_name, + live_event_name=live_event_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + async def internal_get_next(next_link=None): + if next_link is None: + return pipeline_response + return await get_next(next_link) + + return AsyncItemPaged(internal_get_next, extract_data) + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_list_get_status.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/getStatus" + } + + async def _list_get_stream_events_initial( + self, resource_group_name: str, account_name: str, live_event_name: str, **kwargs: Any + ) -> Optional[_models.LiveEventGetStreamEventsResult]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) + cls: ClsType[Optional[_models.LiveEventGetStreamEventsResult]] = kwargs.pop("cls", None) + + request = build_list_get_stream_events_request( + resource_group_name=resource_group_name, + account_name=account_name, + live_event_name=live_event_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._list_get_stream_events_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 304]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize("LiveEventGetStreamEventsResult", pipeline_response) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _list_get_stream_events_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/getStreamEvents" + } + + @distributed_trace_async + async def begin_list_get_stream_events( + self, resource_group_name: str, account_name: str, live_event_name: str, **kwargs: Any + ) -> AsyncLROPoller[AsyncIterable["_models.LiveEventStreamEvent"]]: + """Get stream events of one live event. + + Get stream events telemetry of a live event. + + :param resource_group_name: The name of the resource group within the Azure subscription. + Required. + :type resource_group_name: str + :param account_name: The Media Services account name. Required. + :type account_name: str + :param live_event_name: The name of the live event, maximum length is 32. Required. + :type live_event_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns an iterator like instance of either + LiveEventGetStreamEventsResult or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.media.models.LiveEventStreamEvent]] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) + cls: ClsType[_models.LiveEventGetStreamEventsResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_get_stream_events_request( + resource_group_name=resource_group_name, + account_name=account_name, + live_event_name=live_event_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.begin_list_get_stream_events.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + request = HttpRequest("GET", next_link) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("LiveEventGetStreamEventsResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._list_get_stream_events_initial( + resource_group_name=resource_group_name, + account_name=account_name, + live_event_name=live_event_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + async def internal_get_next(next_link=None): + if next_link is None: + return pipeline_response + return await get_next(next_link) + + return AsyncItemPaged(internal_get_next, extract_data) + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_list_get_stream_events.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/getStreamEvents" + } + + async def _list_get_track_ingest_heartbeats_initial( + self, resource_group_name: str, account_name: str, live_event_name: str, **kwargs: Any + ) -> Optional[_models.LiveEventGetTrackIngestHeartbeatsResult]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) + cls: ClsType[Optional[_models.LiveEventGetTrackIngestHeartbeatsResult]] = kwargs.pop("cls", None) + + request = build_list_get_track_ingest_heartbeats_request( + resource_group_name=resource_group_name, + account_name=account_name, + live_event_name=live_event_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._list_get_track_ingest_heartbeats_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 304]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize("LiveEventGetTrackIngestHeartbeatsResult", pipeline_response) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _list_get_track_ingest_heartbeats_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/getTrackIngestHeartbeats" + } + + @distributed_trace_async + async def begin_list_get_track_ingest_heartbeats( + self, resource_group_name: str, account_name: str, live_event_name: str, **kwargs: Any + ) -> AsyncLROPoller[AsyncIterable["_models.LiveEventTrackEvent"]]: + """Get track events of one live event. + + Get track ingest heartbeat events telemetry of a live event. + + :param resource_group_name: The name of the resource group within the Azure subscription. + Required. + :type resource_group_name: str + :param account_name: The Media Services account name. Required. + :type account_name: str + :param live_event_name: The name of the live event, maximum length is 32. Required. + :type live_event_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns an iterator like instance of either + LiveEventGetTrackIngestHeartbeatsResult or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.media.models.LiveEventTrackEvent]] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) + cls: ClsType[_models.LiveEventGetTrackIngestHeartbeatsResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_get_track_ingest_heartbeats_request( + resource_group_name=resource_group_name, + account_name=account_name, + live_event_name=live_event_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.begin_list_get_track_ingest_heartbeats.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + request = HttpRequest("GET", next_link) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("LiveEventGetTrackIngestHeartbeatsResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._list_get_track_ingest_heartbeats_initial( + resource_group_name=resource_group_name, + account_name=account_name, + live_event_name=live_event_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + async def internal_get_next(next_link=None): + if next_link is None: + return pipeline_response + return await get_next(next_link) + + return AsyncItemPaged(internal_get_next, extract_data) + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_list_get_track_ingest_heartbeats.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/getTrackIngestHeartbeats" + } + @distributed_trace_async async def async_operation( self, resource_group_name: str, account_name: str, operation_id: str, **kwargs: Any @@ -1454,7 +2058,7 @@ async def async_operation( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[_models.AsyncOperationResult] = kwargs.pop("cls", None) request = build_async_operation_request( @@ -1470,8 +2074,9 @@ async def async_operation( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1525,7 +2130,7 @@ async def operation_location( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[Optional[_models.LiveEvent]] = kwargs.pop("cls", None) request = build_operation_location_request( @@ -1542,8 +2147,9 @@ async def operation_location( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_live_outputs_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_live_outputs_operations.py index f3fac48022fb..2861893b1515 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_live_outputs_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_live_outputs_operations.py @@ -89,7 +89,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[_models.LiveOutputListResult] = kwargs.pop("cls", None) error_map = { @@ -133,8 +133,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -184,7 +185,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[_models.LiveOutput] = kwargs.pop("cls", None) request = build_get_request( @@ -201,8 +202,9 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -243,7 +245,7 @@ async def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.LiveOutput] = kwargs.pop("cls", None) @@ -272,8 +274,9 @@ async def _create_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -409,8 +412,8 @@ async def begin_create( :type live_event_name: str :param live_output_name: The name of the live output. Required. :type live_output_name: str - :param parameters: Live Output properties needed for creation. Is either a model type or a IO - type. Required. + :param parameters: Live Output properties needed for creation. Is either a LiveOutput type or a + IO type. Required. :type parameters: ~azure.mgmt.media.models.LiveOutput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -431,7 +434,7 @@ async def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.LiveOutput] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -492,7 +495,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -509,8 +512,9 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -560,7 +564,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -633,7 +637,7 @@ async def async_operation( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[_models.AsyncOperationResult] = kwargs.pop("cls", None) request = build_async_operation_request( @@ -649,8 +653,9 @@ async def async_operation( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -712,7 +717,7 @@ async def operation_location( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[Optional[_models.LiveOutput]] = kwargs.pop("cls", None) request = build_operation_location_request( @@ -730,8 +735,9 @@ async def operation_location( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_locations_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_locations_operations.py index 4532bf8b8957..2f7a23336b8b 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_locations_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_locations_operations.py @@ -112,7 +112,8 @@ async def check_name_availability( :param location_name: Location name. Required. :type location_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a CheckNameAvailabilityInput type or a IO + type. Required. :type parameters: ~azure.mgmt.media.models.CheckNameAvailabilityInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -133,7 +134,7 @@ async def check_name_availability( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.EntityNameAvailabilityCheckOutput] = kwargs.pop("cls", None) @@ -159,8 +160,9 @@ async def check_name_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_media_services_operation_results_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_media_services_operation_results_operations.py index 6ac4aa18142b..6ac9707a5af6 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_media_services_operation_results_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_media_services_operation_results_operations.py @@ -81,7 +81,7 @@ async def get(self, location_name: str, operation_id: str, **kwargs: Any) -> Opt _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[Optional[_models.MediaService]] = kwargs.pop("cls", None) request = build_get_request( @@ -96,8 +96,9 @@ async def get(self, location_name: str, operation_id: str, **kwargs: Any) -> Opt request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_media_services_operation_statuses_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_media_services_operation_statuses_operations.py index 2a463987210a..2edba287af1d 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_media_services_operation_statuses_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_media_services_operation_statuses_operations.py @@ -81,7 +81,7 @@ async def get(self, location_name: str, operation_id: str, **kwargs: Any) -> _mo _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.MediaServiceOperationStatus] = kwargs.pop("cls", None) request = build_get_request( @@ -96,8 +96,9 @@ async def get(self, location_name: str, operation_id: str, **kwargs: Any) -> _mo request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_mediaservices_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_mediaservices_operations.py index 5b4d87f0d4c3..33ff27baed26 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_mediaservices_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_mediaservices_operations.py @@ -85,7 +85,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.MediaServiceCollection] = kwargs.pop("cls", None) error_map = { @@ -127,8 +127,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -172,7 +173,7 @@ async def get(self, resource_group_name: str, account_name: str, **kwargs: Any) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.MediaService] = kwargs.pop("cls", None) request = build_get_request( @@ -187,8 +188,9 @@ async def get(self, resource_group_name: str, account_name: str, **kwargs: Any) request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -223,7 +225,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.MediaService] = kwargs.pop("cls", None) @@ -250,8 +252,9 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -378,7 +381,8 @@ async def begin_create_or_update( :type resource_group_name: str :param account_name: The Media Services account name. Required. :type account_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a MediaService type or a IO type. + Required. :type parameters: ~azure.mgmt.media.models.MediaService or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -399,7 +403,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.MediaService] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -481,7 +485,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -496,8 +500,9 @@ async def delete( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -532,7 +537,7 @@ async def _update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.MediaService] = kwargs.pop("cls", None) @@ -559,8 +564,9 @@ async def _update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -681,7 +687,8 @@ async def begin_update( :type resource_group_name: str :param account_name: The Media Services account name. Required. :type account_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a MediaServiceUpdate type or a IO type. + Required. :type parameters: ~azure.mgmt.media.models.MediaServiceUpdate or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -702,7 +709,7 @@ async def begin_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.MediaService] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -835,7 +842,8 @@ async def sync_storage_keys( # pylint: disable=inconsistent-return-statements :type resource_group_name: str :param account_name: The Media Services account name. Required. :type account_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a SyncStorageKeysInput type or a IO type. + Required. :type parameters: ~azure.mgmt.media.models.SyncStorageKeysInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -856,7 +864,7 @@ async def sync_storage_keys( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -883,8 +891,9 @@ async def sync_storage_keys( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -978,7 +987,8 @@ async def list_edge_policies( :type resource_group_name: str :param account_name: The Media Services account name. Required. :type account_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a ListEdgePoliciesInput type or a IO type. + Required. :type parameters: ~azure.mgmt.media.models.ListEdgePoliciesInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -999,7 +1009,7 @@ async def list_edge_policies( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.EdgePolicies] = kwargs.pop("cls", None) @@ -1026,8 +1036,9 @@ async def list_edge_policies( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1062,7 +1073,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.MediaSer _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.MediaServiceCollection] = kwargs.pop("cls", None) error_map = { @@ -1103,8 +1114,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_operation_results_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_operation_results_operations.py index 67f5a5fe1804..3e22cc0a0483 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_operation_results_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_operation_results_operations.py @@ -96,7 +96,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[Optional[_models.AssetTrack]] = kwargs.pop("cls", None) request = build_get_request( @@ -114,8 +114,9 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_operation_statuses_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_operation_statuses_operations.py index 25a933b086e6..e3c37ccbd3d7 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_operation_statuses_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_operation_statuses_operations.py @@ -96,7 +96,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.AssetTrackOperationStatus] = kwargs.pop("cls", None) request = build_get_request( @@ -114,8 +114,9 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_operations.py index 48c1688b9a4f..ad10ff00ea18 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_operations.py @@ -77,7 +77,7 @@ async def list(self, **kwargs: Any) -> _models.OperationCollection: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.OperationCollection] = kwargs.pop("cls", None) request = build_list_request( @@ -89,8 +89,9 @@ async def list(self, **kwargs: Any) -> _models.OperationCollection: request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_private_endpoint_connections_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_private_endpoint_connections_operations.py index a1f1fde4ad3f..4226526d3c8c 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_private_endpoint_connections_operations.py @@ -89,7 +89,7 @@ async def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) request = build_list_request( @@ -104,8 +104,9 @@ async def list( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -157,7 +158,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) request = build_get_request( @@ -173,8 +174,9 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -281,7 +283,8 @@ async def create_or_update( :type account_name: str :param name: Required. :type name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a PrivateEndpointConnection type or a IO + type. Required. :type parameters: ~azure.mgmt.media.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -302,7 +305,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) @@ -330,8 +333,9 @@ async def create_or_update( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -383,7 +387,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -399,8 +403,9 @@ async def delete( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_private_link_resources_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_private_link_resources_operations.py index 84f33738c69c..9ecd07d79cc8 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_private_link_resources_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_private_link_resources_operations.py @@ -84,7 +84,7 @@ async def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.PrivateLinkResourceListResult] = kwargs.pop("cls", None) request = build_list_request( @@ -99,8 +99,9 @@ async def list( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -152,7 +153,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.PrivateLinkResource] = kwargs.pop("cls", None) request = build_get_request( @@ -168,8 +169,9 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_streaming_endpoints_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_streaming_endpoints_operations.py index cab149ebc966..c61cc83718da 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_streaming_endpoints_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_streaming_endpoints_operations.py @@ -92,7 +92,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[_models.StreamingEndpointListResult] = kwargs.pop("cls", None) error_map = { @@ -135,8 +135,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -185,7 +186,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[_models.StreamingEndpoint] = kwargs.pop("cls", None) request = build_get_request( @@ -201,8 +202,9 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -243,7 +245,7 @@ async def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.StreamingEndpoint] = kwargs.pop("cls", None) @@ -272,8 +274,9 @@ async def _create_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -412,8 +415,8 @@ async def begin_create( :param streaming_endpoint_name: The name of the streaming endpoint, maximum length is 24. Required. :type streaming_endpoint_name: str - :param parameters: Streaming endpoint properties needed for creation. Is either a model type or - a IO type. Required. + :param parameters: Streaming endpoint properties needed for creation. Is either a + StreamingEndpoint type or a IO type. Required. :type parameters: ~azure.mgmt.media.models.StreamingEndpoint or IO :param auto_start: The flag indicates if the resource should be automatically started on creation. Default value is None. @@ -437,7 +440,7 @@ async def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.StreamingEndpoint] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -503,7 +506,7 @@ async def _update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.StreamingEndpoint] = kwargs.pop("cls", None) @@ -531,8 +534,9 @@ async def _update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -662,8 +666,8 @@ async def begin_update( :param streaming_endpoint_name: The name of the streaming endpoint, maximum length is 24. Required. :type streaming_endpoint_name: str - :param parameters: Streaming endpoint properties needed for creation. Is either a model type or - a IO type. Required. + :param parameters: Streaming endpoint properties needed for creation. Is either a + StreamingEndpoint type or a IO type. Required. :type parameters: ~azure.mgmt.media.models.StreamingEndpoint or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -684,7 +688,7 @@ async def begin_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.StreamingEndpoint] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -744,7 +748,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -760,8 +764,9 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -809,7 +814,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -882,7 +887,7 @@ async def skus( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[_models.StreamingEndpointSkuInfoListResult] = kwargs.pop("cls", None) request = build_skus_request( @@ -898,8 +903,9 @@ async def skus( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -934,7 +940,7 @@ async def _start_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_start_request( @@ -950,8 +956,9 @@ async def _start_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -999,7 +1006,7 @@ async def begin_start( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1054,7 +1061,7 @@ async def _stop_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_stop_request( @@ -1070,8 +1077,9 @@ async def _stop_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1119,7 +1127,7 @@ async def begin_stop( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1179,7 +1187,7 @@ async def _scale_initial( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -1207,8 +1215,9 @@ async def _scale_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1328,8 +1337,8 @@ async def begin_scale( :param streaming_endpoint_name: The name of the streaming endpoint, maximum length is 24. Required. :type streaming_endpoint_name: str - :param parameters: Streaming endpoint scale parameters. Is either a model type or a IO type. - Required. + :param parameters: Streaming endpoint scale parameters. Is either a StreamingEntityScaleUnit + type or a IO type. Required. :type parameters: ~azure.mgmt.media.models.StreamingEntityScaleUnit or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1349,7 +1358,7 @@ async def begin_scale( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1424,7 +1433,7 @@ async def async_operation( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[_models.AsyncOperationResult] = kwargs.pop("cls", None) request = build_async_operation_request( @@ -1440,8 +1449,9 @@ async def async_operation( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1501,7 +1511,7 @@ async def operation_location( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[Optional[_models.StreamingEndpoint]] = kwargs.pop("cls", None) request = build_operation_location_request( @@ -1518,8 +1528,9 @@ async def operation_location( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_streaming_locators_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_streaming_locators_operations.py index c5e02c7ce955..ddfd75284f4e 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_streaming_locators_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_streaming_locators_operations.py @@ -100,7 +100,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.StreamingLocatorCollection] = kwargs.pop("cls", None) error_map = { @@ -146,8 +146,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -195,7 +196,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.StreamingLocator] = kwargs.pop("cls", None) request = build_get_request( @@ -211,8 +212,9 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -319,7 +321,8 @@ async def create( :type account_name: str :param streaming_locator_name: The Streaming Locator name. Required. :type streaming_locator_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a StreamingLocator type or a IO type. + Required. :type parameters: ~azure.mgmt.media.models.StreamingLocator or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -340,7 +343,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.StreamingLocator] = kwargs.pop("cls", None) @@ -368,8 +371,9 @@ async def create( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -421,7 +425,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -437,8 +441,9 @@ async def delete( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -486,7 +491,7 @@ async def list_content_keys( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.ListContentKeysResponse] = kwargs.pop("cls", None) request = build_list_content_keys_request( @@ -502,8 +507,9 @@ async def list_content_keys( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -555,7 +561,7 @@ async def list_paths( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.ListPathsResponse] = kwargs.pop("cls", None) request = build_list_paths_request( @@ -571,8 +577,9 @@ async def list_paths( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_streaming_policies_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_streaming_policies_operations.py index 06c876581166..b0945a930244 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_streaming_policies_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_streaming_policies_operations.py @@ -98,7 +98,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.StreamingPolicyCollection] = kwargs.pop("cls", None) error_map = { @@ -144,8 +144,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -193,7 +194,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.StreamingPolicy] = kwargs.pop("cls", None) request = build_get_request( @@ -209,8 +210,9 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -317,7 +319,8 @@ async def create( :type account_name: str :param streaming_policy_name: The Streaming Policy name. Required. :type streaming_policy_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a StreamingPolicy type or a IO type. + Required. :type parameters: ~azure.mgmt.media.models.StreamingPolicy or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -338,7 +341,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.StreamingPolicy] = kwargs.pop("cls", None) @@ -366,8 +369,9 @@ async def create( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -419,7 +423,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -435,8 +439,9 @@ async def delete( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_tracks_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_tracks_operations.py index 5fb2035c2eb2..fad3f79021ae 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_tracks_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_tracks_operations.py @@ -89,7 +89,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.AssetTrackCollection] = kwargs.pop("cls", None) error_map = { @@ -133,8 +133,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -184,7 +185,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.AssetTrack] = kwargs.pop("cls", None) request = build_get_request( @@ -201,8 +202,9 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -243,7 +245,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AssetTrack] = kwargs.pop("cls", None) @@ -272,8 +274,9 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -422,7 +425,7 @@ async def begin_create_or_update( :type asset_name: str :param track_name: The Asset Track name. Required. :type track_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a AssetTrack type or a IO type. Required. :type parameters: ~azure.mgmt.media.models.AssetTrack or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -443,7 +446,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AssetTrack] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -512,7 +515,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -529,8 +532,9 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -587,7 +591,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -649,7 +653,7 @@ async def _update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AssetTrack] = kwargs.pop("cls", None) @@ -678,8 +682,9 @@ async def _update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -818,7 +823,7 @@ async def begin_update( :type asset_name: str :param track_name: The Asset Track name. Required. :type track_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a AssetTrack type or a IO type. Required. :type parameters: ~azure.mgmt.media.models.AssetTrack or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -839,7 +844,7 @@ async def begin_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AssetTrack] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -908,7 +913,7 @@ async def _update_track_data_initial( # pylint: disable=inconsistent-return-sta _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_update_track_data_request( @@ -925,8 +930,9 @@ async def _update_track_data_initial( # pylint: disable=inconsistent-return-sta request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -986,7 +992,7 @@ async def begin_update_track_data( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_transforms_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_transforms_operations.py index 8f0bf87ad797..1304e13e7db8 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_transforms_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_transforms_operations.py @@ -139,8 +139,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -204,8 +205,9 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -312,7 +314,7 @@ async def create_or_update( :type account_name: str :param transform_name: The Transform name. Required. :type transform_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a Transform type or a IO type. Required. :type parameters: ~azure.mgmt.media.models.Transform or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -361,8 +363,9 @@ async def create_or_update( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -434,8 +437,9 @@ async def delete( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -538,7 +542,7 @@ async def update( :type account_name: str :param transform_name: The Transform name. Required. :type transform_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a Transform type or a IO type. Required. :type parameters: ~azure.mgmt.media.models.Transform or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -587,8 +591,9 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/models/__init__.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/models/__init__.py index a9b855461412..5365819249e6 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/models/__init__.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/models/__init__.py @@ -134,6 +134,11 @@ from ._models_py3 import LiveEventActionInput from ._models_py3 import LiveEventEncoding from ._models_py3 import LiveEventEndpoint +from ._models_py3 import LiveEventGetStatusResult +from ._models_py3 import LiveEventGetStreamEventsResult +from ._models_py3 import LiveEventGetTrackIngestHeartbeatsResult +from ._models_py3 import LiveEventIngestInterruption +from ._models_py3 import LiveEventIngestion from ._models_py3 import LiveEventInput from ._models_py3 import LiveEventInputAccessControl from ._models_py3 import LiveEventInputTrackSelection @@ -141,6 +146,13 @@ from ._models_py3 import LiveEventOutputTranscriptionTrack from ._models_py3 import LiveEventPreview from ._models_py3 import LiveEventPreviewAccessControl +from ._models_py3 import LiveEventStatus +from ._models_py3 import LiveEventStreamEvent +from ._models_py3 import LiveEventStreamEventData +from ._models_py3 import LiveEventTimedMetadataEndpoint +from ._models_py3 import LiveEventTrackEvent +from ._models_py3 import LiveEventTrackEventData +from ._models_py3 import LiveEventTrackStatus from ._models_py3 import LiveEventTranscription from ._models_py3 import LiveOutput from ._models_py3 import LiveOutputListResult @@ -261,11 +273,21 @@ from ._azure_media_services_enums import JobRetry from ._azure_media_services_enums import JobState from ._azure_media_services_enums import LiveEventEncodingType +from ._azure_media_services_enums import LiveEventHealthStatus from ._azure_media_services_enums import LiveEventInputProtocol from ._azure_media_services_enums import LiveEventResourceState +from ._azure_media_services_enums import LiveEventState +from ._azure_media_services_enums import LiveEventStreamEventLevel +from ._azure_media_services_enums import LiveEventStreamEventMaxTimeMediaType +from ._azure_media_services_enums import LiveEventStreamEventMediaType +from ._azure_media_services_enums import LiveEventStreamEventMinTimeMediaType +from ._azure_media_services_enums import LiveEventStreamEventType +from ._azure_media_services_enums import LiveEventTrackEventType +from ._azure_media_services_enums import LiveEventTrackType from ._azure_media_services_enums import LiveOutputResourceState from ._azure_media_services_enums import MetricAggregationType from ._azure_media_services_enums import MetricUnit +from ._azure_media_services_enums import MinimumTlsVersion from ._azure_media_services_enums import OnErrorType from ._azure_media_services_enums import Priority from ._azure_media_services_enums import PrivateEndpointConnectionProvisioningState @@ -419,6 +441,11 @@ "LiveEventActionInput", "LiveEventEncoding", "LiveEventEndpoint", + "LiveEventGetStatusResult", + "LiveEventGetStreamEventsResult", + "LiveEventGetTrackIngestHeartbeatsResult", + "LiveEventIngestInterruption", + "LiveEventIngestion", "LiveEventInput", "LiveEventInputAccessControl", "LiveEventInputTrackSelection", @@ -426,6 +453,13 @@ "LiveEventOutputTranscriptionTrack", "LiveEventPreview", "LiveEventPreviewAccessControl", + "LiveEventStatus", + "LiveEventStreamEvent", + "LiveEventStreamEventData", + "LiveEventTimedMetadataEndpoint", + "LiveEventTrackEvent", + "LiveEventTrackEventData", + "LiveEventTrackStatus", "LiveEventTranscription", "LiveOutput", "LiveOutputListResult", @@ -545,11 +579,21 @@ "JobRetry", "JobState", "LiveEventEncodingType", + "LiveEventHealthStatus", "LiveEventInputProtocol", "LiveEventResourceState", + "LiveEventState", + "LiveEventStreamEventLevel", + "LiveEventStreamEventMaxTimeMediaType", + "LiveEventStreamEventMediaType", + "LiveEventStreamEventMinTimeMediaType", + "LiveEventStreamEventType", + "LiveEventTrackEventType", + "LiveEventTrackType", "LiveOutputResourceState", "MetricAggregationType", "MetricUnit", + "MinimumTlsVersion", "OnErrorType", "Priority", "PrivateEndpointConnectionProvisioningState", diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/models/_azure_media_services_enums.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/models/_azure_media_services_enums.py index 3a5029c42d3d..516824f5b236 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/models/_azure_media_services_enums.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/models/_azure_media_services_enums.py @@ -13,28 +13,28 @@ class AacAudioProfile(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The encoding profile to be used when encoding audio with AAC.""" - #: Specifies that the output audio is to be encoded into AAC Low Complexity profile (AAC-LC). AAC_LC = "AacLc" - #: Specifies that the output audio is to be encoded into HE-AAC v1 profile. + """Specifies that the output audio is to be encoded into AAC Low Complexity profile (AAC-LC).""" HE_AAC_V1 = "HeAacV1" - #: Specifies that the output audio is to be encoded into HE-AAC v2 profile. + """Specifies that the output audio is to be encoded into HE-AAC v1 profile.""" HE_AAC_V2 = "HeAacV2" + """Specifies that the output audio is to be encoded into HE-AAC v2 profile.""" class AccountEncryptionKeyType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of key used to encrypt the Account Key.""" - #: The Account Key is encrypted with a System Key. SYSTEM_KEY = "SystemKey" - #: The Account Key is encrypted with a Customer Key. + """The Account Key is encrypted with a System Key.""" CUSTOMER_KEY = "CustomerKey" + """The Account Key is encrypted with a Customer Key.""" class ActionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Indicates the action type.""" - #: An internal action. INTERNAL = "Internal" + """An internal action.""" class AnalysisResolution(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -56,22 +56,22 @@ class AnalysisResolution(str, Enum, metaclass=CaseInsensitiveEnumMeta): class AssetContainerPermission(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The permissions to set on the SAS URL.""" - #: The SAS URL will allow read access to the container. READ = "Read" - #: The SAS URL will allow read and write access to the container. + """The SAS URL will allow read access to the container.""" READ_WRITE = "ReadWrite" - #: The SAS URL will allow read, write and delete access to the container. + """The SAS URL will allow read and write access to the container.""" READ_WRITE_DELETE = "ReadWriteDelete" + """The SAS URL will allow read, write and delete access to the container.""" class AssetStorageEncryptionFormat(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The Asset encryption format. One of None or MediaStorageEncryption.""" - #: The Asset does not use client-side storage encryption (this is the only allowed value for new - #: Assets). NONE = "None" - #: The Asset is encrypted with Media Services client-side encryption. + """The Asset does not use client-side storage encryption (this is the only allowed value for new + #: Assets).""" MEDIA_STORAGE_CLIENT_ENCRYPTION = "MediaStorageClientEncryption" + """The Asset is encrypted with Media Services client-side encryption.""" class AsyncOperationStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -85,16 +85,16 @@ class AsyncOperationStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): class AttributeFilter(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of AttributeFilter to apply to the TrackAttribute in order to select the tracks.""" - #: All tracks will be included. ALL = "All" - #: The first track will be included when the attribute is sorted in descending order. Generally - #: used to select the largest bitrate. + """All tracks will be included.""" TOP = "Top" - #: The first track will be included when the attribute is sorted in ascending order. Generally - #: used to select the smallest bitrate. + """The first track will be included when the attribute is sorted in descending order. Generally + #: used to select the largest bitrate.""" BOTTOM = "Bottom" - #: Any tracks that have an attribute equal to the value given will be included. + """The first track will be included when the attribute is sorted in ascending order. Generally + #: used to select the smallest bitrate.""" VALUE_EQUALS = "ValueEquals" + """Any tracks that have an attribute equal to the value given will be included.""" class AudioAnalysisMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -102,29 +102,29 @@ class AudioAnalysisMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): AudioAnalysisMode would be chosen. """ - #: Performs all operations included in the Basic mode, additionally performing language detection - #: and speaker diarization. STANDARD = "Standard" - #: This mode performs speech-to-text transcription and generation of a VTT subtitle/caption file. + """Performs all operations included in the Basic mode, additionally performing language detection + #: and speaker diarization.""" + BASIC = "Basic" + """This mode performs speech-to-text transcription and generation of a VTT subtitle/caption file. #: The output of this mode includes an Insights JSON file including only the keywords, #: transcription,and timing information. Automatic language detection and speaker diarization are - #: not included in this mode. - BASIC = "Basic" + #: not included in this mode.""" class BlurType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Blur type.""" - #: Box: debug filter, bounding box only BOX = "Box" - #: Low: box-car blur filter + """Box: debug filter, bounding box only""" LOW = "Low" - #: Med: Gaussian blur filter + """Low: box-car blur filter""" MED = "Med" - #: High: Confuse blur filter + """Med: Gaussian blur filter""" HIGH = "High" - #: Black: Black out filter + """High: Confuse blur filter""" BLACK = "Black" + """Black: Black out filter""" class ChannelMapping(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -132,22 +132,22 @@ class ChannelMapping(str, Enum, metaclass=CaseInsensitiveEnumMeta): stereo or multi-channel audio tracks. """ - #: The Front Left Channel. FRONT_LEFT = "FrontLeft" - #: The Front Right Channel. + """The Front Left Channel.""" FRONT_RIGHT = "FrontRight" - #: The Center Channel. + """The Front Right Channel.""" CENTER = "Center" - #: Low Frequency Effects Channel. Sometimes referred to as the subwoofer. + """The Center Channel.""" LOW_FREQUENCY_EFFECTS = "LowFrequencyEffects" - #: The Back Left Channel. Sometimes referred to as the Left Surround Channel. + """Low Frequency Effects Channel. Sometimes referred to as the subwoofer.""" BACK_LEFT = "BackLeft" - #: The Back Right Channel. Sometimes referred to as the Right Surround Channel. + """The Back Left Channel. Sometimes referred to as the Left Surround Channel.""" BACK_RIGHT = "BackRight" - #: The Left Stereo channel. Sometimes referred to as Down Mix Left. + """The Back Right Channel. Sometimes referred to as the Right Surround Channel.""" STEREO_LEFT = "StereoLeft" - #: The Right Stereo channel. Sometimes referred to as Down Mix Right. + """The Left Stereo channel. Sometimes referred to as Down Mix Left.""" STEREO_RIGHT = "StereoRight" + """The Right Stereo channel. Sometimes referred to as Down Mix Right.""" class Complexity(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -155,80 +155,80 @@ class Complexity(str, Enum, metaclass=CaseInsensitiveEnumMeta): Example: set Complexity as Speed for faster encoding but less compression efficiency. """ - #: Configures the encoder to use settings optimized for faster encoding. Quality is sacrificed to - #: decrease encoding time. SPEED = "Speed" - #: Configures the encoder to use settings that achieve a balance between speed and quality. + """Configures the encoder to use settings optimized for faster encoding. Quality is sacrificed to + #: decrease encoding time.""" BALANCED = "Balanced" - #: Configures the encoder to use settings optimized to produce higher quality output at the - #: expense of slower overall encode time. + """Configures the encoder to use settings that achieve a balance between speed and quality.""" QUALITY = "Quality" + """Configures the encoder to use settings optimized to produce higher quality output at the + #: expense of slower overall encode time.""" class ContentKeyPolicyFairPlayRentalAndLeaseKeyType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The rental and lease key type.""" - #: Represents a ContentKeyPolicyFairPlayRentalAndLeaseKeyType that is unavailable in current API - #: version. UNKNOWN = "Unknown" - #: Key duration is not specified. + """Represents a ContentKeyPolicyFairPlayRentalAndLeaseKeyType that is unavailable in current API + #: version.""" UNDEFINED = "Undefined" - #: Dual expiry for offline rental. + """Key duration is not specified.""" DUAL_EXPIRY = "DualExpiry" - #: Content key can be persisted with an unlimited duration + """Dual expiry for offline rental.""" PERSISTENT_UNLIMITED = "PersistentUnlimited" - #: Content key can be persisted and the valid duration is limited by the Rental Duration value + """Content key can be persisted with an unlimited duration""" PERSISTENT_LIMITED = "PersistentLimited" + """Content key can be persisted and the valid duration is limited by the Rental Duration value""" class ContentKeyPolicyPlayReadyContentType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The PlayReady content type.""" - #: Represents a ContentKeyPolicyPlayReadyContentType that is unavailable in current API version. UNKNOWN = "Unknown" - #: Unspecified content type. + """Represents a ContentKeyPolicyPlayReadyContentType that is unavailable in current API version.""" UNSPECIFIED = "Unspecified" - #: Ultraviolet download content type. + """Unspecified content type.""" ULTRA_VIOLET_DOWNLOAD = "UltraVioletDownload" - #: Ultraviolet streaming content type. + """Ultraviolet download content type.""" ULTRA_VIOLET_STREAMING = "UltraVioletStreaming" + """Ultraviolet streaming content type.""" class ContentKeyPolicyPlayReadyLicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The license type.""" - #: Represents a ContentKeyPolicyPlayReadyLicenseType that is unavailable in current API version. UNKNOWN = "Unknown" - #: Non persistent license. + """Represents a ContentKeyPolicyPlayReadyLicenseType that is unavailable in current API version.""" NON_PERSISTENT = "NonPersistent" - #: Persistent license. Allows offline playback. + """Non persistent license.""" PERSISTENT = "Persistent" + """Persistent license. Allows offline playback.""" class ContentKeyPolicyPlayReadyUnknownOutputPassingOption(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Configures Unknown output handling settings of the license.""" - #: Represents a ContentKeyPolicyPlayReadyUnknownOutputPassingOption that is unavailable in current - #: API version. UNKNOWN = "Unknown" - #: Passing the video portion of protected content to an Unknown Output is not allowed. + """Represents a ContentKeyPolicyPlayReadyUnknownOutputPassingOption that is unavailable in current + #: API version.""" NOT_ALLOWED = "NotAllowed" - #: Passing the video portion of protected content to an Unknown Output is allowed. + """Passing the video portion of protected content to an Unknown Output is not allowed.""" ALLOWED = "Allowed" - #: Passing the video portion of protected content to an Unknown Output is allowed but with - #: constrained resolution. + """Passing the video portion of protected content to an Unknown Output is allowed.""" ALLOWED_WITH_VIDEO_CONSTRICTION = "AllowedWithVideoConstriction" + """Passing the video portion of protected content to an Unknown Output is allowed but with + #: constrained resolution.""" class ContentKeyPolicyRestrictionTokenType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of token.""" - #: Represents a ContentKeyPolicyRestrictionTokenType that is unavailable in current API version. UNKNOWN = "Unknown" - #: Simple Web Token. + """Represents a ContentKeyPolicyRestrictionTokenType that is unavailable in current API version.""" SWT = "Swt" - #: JSON Web Token. + """Simple Web Token.""" JWT = "Jwt" + """JSON Web Token.""" class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -243,114 +243,114 @@ class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): class DefaultAction(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The behavior for IP access control in Key Delivery.""" - #: All public IP addresses are allowed. ALLOW = "Allow" - #: Public IP addresses are blocked. + """All public IP addresses are allowed.""" DENY = "Deny" + """Public IP addresses are blocked.""" class DeinterlaceMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The deinterlacing mode. Defaults to AutoPixelAdaptive.""" - #: Disables de-interlacing of the source video. OFF = "Off" - #: Apply automatic pixel adaptive de-interlacing on each frame in the input video. + """Disables de-interlacing of the source video.""" AUTO_PIXEL_ADAPTIVE = "AutoPixelAdaptive" + """Apply automatic pixel adaptive de-interlacing on each frame in the input video.""" class DeinterlaceParity(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The field parity for de-interlacing, defaults to Auto.""" - #: Automatically detect the order of fields AUTO = "Auto" - #: Apply top field first processing of input video. + """Automatically detect the order of fields""" TOP_FIELD_FIRST = "TopFieldFirst" - #: Apply bottom field first processing of input video. + """Apply top field first processing of input video.""" BOTTOM_FIELD_FIRST = "BottomFieldFirst" + """Apply bottom field first processing of input video.""" class EncoderNamedPreset(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The built-in preset to be used for encoding videos.""" - #: Produces an MP4 file where the video is encoded with H.264 codec at 2200 kbps and a picture - #: height of 480 pixels, and the stereo audio is encoded with AAC-LC codec at 128 kbps. H264_SINGLE_BITRATE_SD = "H264SingleBitrateSD" - #: Produces an MP4 file where the video is encoded with H.264 codec at 4500 kbps and a picture - #: height of 720 pixels, and the stereo audio is encoded with AAC-LC codec at 128 kbps. + """Produces an MP4 file where the video is encoded with H.264 codec at 2200 kbps and a picture + #: height of 480 pixels, and the stereo audio is encoded with AAC-LC codec at 128 kbps.""" H264_SINGLE_BITRATE720_P = "H264SingleBitrate720p" - #: Produces an MP4 file where the video is encoded with H.264 codec at 6750 kbps and a picture - #: height of 1080 pixels, and the stereo audio is encoded with AAC-LC codec at 128 kbps. + """Produces an MP4 file where the video is encoded with H.264 codec at 4500 kbps and a picture + #: height of 720 pixels, and the stereo audio is encoded with AAC-LC codec at 128 kbps.""" H264_SINGLE_BITRATE1080_P = "H264SingleBitrate1080p" - #: Produces a set of GOP aligned MP4 files with H.264 video and stereo AAC audio. Auto-generates a + """Produces an MP4 file where the video is encoded with H.264 codec at 6750 kbps and a picture + #: height of 1080 pixels, and the stereo audio is encoded with AAC-LC codec at 128 kbps.""" + ADAPTIVE_STREAMING = "AdaptiveStreaming" + """Produces a set of GOP aligned MP4 files with H.264 video and stereo AAC audio. Auto-generates a #: bitrate ladder based on the input resolution, bitrate and frame rate. The auto-generated preset #: will never exceed the input resolution. For example, if the input is 720p, output will remain - #: 720p at best. - ADAPTIVE_STREAMING = "AdaptiveStreaming" - #: Produces a single MP4 file containing only AAC stereo audio encoded at 192 kbps. + #: 720p at best.""" AAC_GOOD_QUALITY_AUDIO = "AACGoodQualityAudio" - #: Produces a single MP4 file containing only DD(Digital Dolby) stereo audio encoded at 192 kbps. + """Produces a single MP4 file containing only AAC stereo audio encoded at 192 kbps.""" DD_GOOD_QUALITY_AUDIO = "DDGoodQualityAudio" - #: Exposes an experimental preset for content-aware encoding. Given any input content, the service + """Produces a single MP4 file containing only DD(Digital Dolby) stereo audio encoded at 192 kbps.""" + CONTENT_AWARE_ENCODING_EXPERIMENTAL = "ContentAwareEncodingExperimental" + """Exposes an experimental preset for content-aware encoding. Given any input content, the service #: attempts to automatically determine the optimal number of layers, appropriate bitrate and #: resolution settings for delivery by adaptive streaming. The underlying algorithms will continue - #: to evolve over time. The output will contain MP4 files with video and audio interleaved. - CONTENT_AWARE_ENCODING_EXPERIMENTAL = "ContentAwareEncodingExperimental" - #: Produces a set of GOP-aligned MP4s by using content-aware encoding. Given any input content, + #: to evolve over time. The output will contain MP4 files with video and audio interleaved.""" + CONTENT_AWARE_ENCODING = "ContentAwareEncoding" + """Produces a set of GOP-aligned MP4s by using content-aware encoding. Given any input content, #: the service performs an initial lightweight analysis of the input content, and uses the results #: to determine the optimal number of layers, appropriate bitrate and resolution settings for #: delivery by adaptive streaming. This preset is particularly effective for low and medium #: complexity videos, where the output files will be at lower bitrates but at a quality that still #: delivers a good experience to viewers. The output will contain MP4 files with video and audio - #: interleaved. - CONTENT_AWARE_ENCODING = "ContentAwareEncoding" - #: Copy all video and audio streams from the input asset as non-interleaved video and audio output - #: files. This preset can be used to clip an existing asset or convert a group of key frame (GOP) - #: aligned MP4 files as an asset that can be streamed. + #: interleaved.""" COPY_ALL_BITRATE_NON_INTERLEAVED = "CopyAllBitrateNonInterleaved" - #: Produces a set of 8 GOP-aligned MP4 files, ranging from 6000 kbps to 400 kbps, and stereo AAC - #: audio. Resolution starts at 1080p and goes down to 180p. + """Copy all video and audio streams from the input asset as non-interleaved video and audio output + #: files. This preset can be used to clip an existing asset or convert a group of key frame (GOP) + #: aligned MP4 files as an asset that can be streamed.""" H264_MULTIPLE_BITRATE1080_P = "H264MultipleBitrate1080p" - #: Produces a set of 6 GOP-aligned MP4 files, ranging from 3400 kbps to 400 kbps, and stereo AAC - #: audio. Resolution starts at 720p and goes down to 180p. + """Produces a set of 8 GOP-aligned MP4 files, ranging from 6000 kbps to 400 kbps, and stereo AAC + #: audio. Resolution starts at 1080p and goes down to 180p.""" H264_MULTIPLE_BITRATE720_P = "H264MultipleBitrate720p" - #: Produces a set of 5 GOP-aligned MP4 files, ranging from 1900kbps to 400 kbps, and stereo AAC - #: audio. Resolution starts at 480p and goes down to 240p. + """Produces a set of 6 GOP-aligned MP4 files, ranging from 3400 kbps to 400 kbps, and stereo AAC + #: audio. Resolution starts at 720p and goes down to 180p.""" H264_MULTIPLE_BITRATE_SD = "H264MultipleBitrateSD" - #: Produces a set of GOP-aligned MP4s by using content-aware encoding. Given any input content, + """Produces a set of 5 GOP-aligned MP4 files, ranging from 1900kbps to 400 kbps, and stereo AAC + #: audio. Resolution starts at 480p and goes down to 240p.""" + H265_CONTENT_AWARE_ENCODING = "H265ContentAwareEncoding" + """Produces a set of GOP-aligned MP4s by using content-aware encoding. Given any input content, #: the service performs an initial lightweight analysis of the input content, and uses the results #: to determine the optimal number of layers, appropriate bitrate and resolution settings for #: delivery by adaptive streaming. This preset is particularly effective for low and medium #: complexity videos, where the output files will be at lower bitrates but at a quality that still #: delivers a good experience to viewers. The output will contain MP4 files with video and audio - #: interleaved. - H265_CONTENT_AWARE_ENCODING = "H265ContentAwareEncoding" - #: Produces a set of GOP aligned MP4 files with H.265 video and stereo AAC audio. Auto-generates a + #: interleaved.""" + H265_ADAPTIVE_STREAMING = "H265AdaptiveStreaming" + """Produces a set of GOP aligned MP4 files with H.265 video and stereo AAC audio. Auto-generates a #: bitrate ladder based on the input resolution, bitrate and frame rate. The auto-generated preset #: will never exceed the input resolution. For example, if the input is 720p, output will remain - #: 720p at best. - H265_ADAPTIVE_STREAMING = "H265AdaptiveStreaming" - #: Produces an MP4 file where the video is encoded with H.265 codec at 1800 kbps and a picture - #: height of 720 pixels, and the stereo audio is encoded with AAC-LC codec at 128 kbps. + #: 720p at best.""" H265_SINGLE_BITRATE720_P = "H265SingleBitrate720p" - #: Produces an MP4 file where the video is encoded with H.265 codec at 3500 kbps and a picture - #: height of 1080 pixels, and the stereo audio is encoded with AAC-LC codec at 128 kbps. + """Produces an MP4 file where the video is encoded with H.265 codec at 1800 kbps and a picture + #: height of 720 pixels, and the stereo audio is encoded with AAC-LC codec at 128 kbps.""" H265_SINGLE_BITRATE1080_P = "H265SingleBitrate1080p" - #: Produces an MP4 file where the video is encoded with H.265 codec at 9500 kbps and a picture - #: height of 2160 pixels, and the stereo audio is encoded with AAC-LC codec at 128 kbps. + """Produces an MP4 file where the video is encoded with H.265 codec at 3500 kbps and a picture + #: height of 1080 pixels, and the stereo audio is encoded with AAC-LC codec at 128 kbps.""" H265_SINGLE_BITRATE4_K = "H265SingleBitrate4K" + """Produces an MP4 file where the video is encoded with H.265 codec at 9500 kbps and a picture + #: height of 2160 pixels, and the stereo audio is encoded with AAC-LC codec at 128 kbps.""" class EncryptionScheme(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Encryption scheme.""" - #: NoEncryption scheme NO_ENCRYPTION = "NoEncryption" - #: EnvelopeEncryption scheme + """NoEncryption scheme""" ENVELOPE_ENCRYPTION = "EnvelopeEncryption" - #: CommonEncryptionCenc scheme + """EnvelopeEncryption scheme""" COMMON_ENCRYPTION_CENC = "CommonEncryptionCenc" - #: CommonEncryptionCbcs scheme + """CommonEncryptionCenc scheme""" COMMON_ENCRYPTION_CBCS = "CommonEncryptionCbcs" + """CommonEncryptionCbcs scheme""" class EntropyMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -358,10 +358,10 @@ class EntropyMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): is appropriate for the profile and level. """ - #: Context Adaptive Binary Arithmetic Coder (CABAC) entropy encoding. CABAC = "Cabac" - #: Context Adaptive Variable Length Coder (CAVLC) entropy encoding. + """Context Adaptive Binary Arithmetic Coder (CABAC) entropy encoding.""" CAVLC = "Cavlc" + """Context Adaptive Variable Length Coder (CAVLC) entropy encoding.""" class FaceRedactorMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -374,81 +374,81 @@ class FaceRedactorMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): require redaction. """ - #: Analyze mode detects faces and outputs a metadata file with the results. Allows editing of the - #: metadata file before faces are blurred with Redact mode. ANALYZE = "Analyze" - #: Redact mode consumes the metadata file from Analyze mode and redacts the faces found. + """Analyze mode detects faces and outputs a metadata file with the results. Allows editing of the + #: metadata file before faces are blurred with Redact mode.""" REDACT = "Redact" - #: Combined mode does the Analyze and Redact steps in one pass when editing the analyzed faces is - #: not desired. + """Redact mode consumes the metadata file from Analyze mode and redacts the faces found.""" COMBINED = "Combined" + """Combined mode does the Analyze and Redact steps in one pass when editing the analyzed faces is + #: not desired.""" class FilterTrackPropertyCompareOperation(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The track property condition operation.""" - #: The equal operation. EQUAL = "Equal" - #: The not equal operation. + """The equal operation.""" NOT_EQUAL = "NotEqual" + """The not equal operation.""" class FilterTrackPropertyType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The track property type.""" - #: The unknown track property type. UNKNOWN = "Unknown" - #: The type. + """The unknown track property type.""" TYPE = "Type" - #: The name. + """The type.""" NAME = "Name" - #: The language. + """The name.""" LANGUAGE = "Language" - #: The fourCC. + """The language.""" FOUR_CC = "FourCC" - #: The bitrate. + """The fourCC.""" BITRATE = "Bitrate" + """The bitrate.""" class H264Complexity(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Tells the encoder how to choose its encoding settings. The default value is Balanced.""" - #: Tells the encoder to use settings that are optimized for faster encoding. Quality is sacrificed - #: to decrease encoding time. SPEED = "Speed" - #: Tells the encoder to use settings that achieve a balance between speed and quality. + """Tells the encoder to use settings that are optimized for faster encoding. Quality is sacrificed + #: to decrease encoding time.""" BALANCED = "Balanced" - #: Tells the encoder to use settings that are optimized to produce higher quality output at the - #: expense of slower overall encode time. + """Tells the encoder to use settings that achieve a balance between speed and quality.""" QUALITY = "Quality" + """Tells the encoder to use settings that are optimized to produce higher quality output at the + #: expense of slower overall encode time.""" class H264RateControlMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The video rate control mode.""" - #: Average Bitrate (ABR) mode that hits the target bitrate: Default mode. ABR = "ABR" - #: Constant Bitrate (CBR) mode that tightens bitrate variations around target bitrate. + """Average Bitrate (ABR) mode that hits the target bitrate: Default mode.""" CBR = "CBR" - #: Constant Rate Factor (CRF) mode that targets at constant subjective quality. + """Constant Bitrate (CBR) mode that tightens bitrate variations around target bitrate.""" CRF = "CRF" + """Constant Rate Factor (CRF) mode that targets at constant subjective quality.""" class H264VideoProfile(str, Enum, metaclass=CaseInsensitiveEnumMeta): """We currently support Baseline, Main, High, High422, High444. Default is Auto.""" - #: Tells the encoder to automatically determine the appropriate H.264 profile. AUTO = "Auto" - #: Baseline profile + """Tells the encoder to automatically determine the appropriate H.264 profile.""" BASELINE = "Baseline" - #: Main profile + """Baseline profile""" MAIN = "Main" - #: High profile. + """Main profile""" HIGH = "High" - #: High 4:2:2 profile. + """High profile.""" HIGH422 = "High422" - #: High 4:4:4 predictive profile. + """High 4:2:2 profile.""" HIGH444 = "High444" + """High 4:4:4 predictive profile.""" class H265Complexity(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -457,26 +457,26 @@ class H265Complexity(str, Enum, metaclass=CaseInsensitiveEnumMeta): relatively larger file but is faster and more economical. The default value is Balanced. """ - #: Tells the encoder to use settings that are optimized for faster encoding. Quality is sacrificed - #: to decrease encoding time. SPEED = "Speed" - #: Tells the encoder to use settings that achieve a balance between speed and quality. + """Tells the encoder to use settings that are optimized for faster encoding. Quality is sacrificed + #: to decrease encoding time.""" BALANCED = "Balanced" - #: Tells the encoder to use settings that are optimized to produce higher quality output at the - #: expense of slower overall encode time. + """Tells the encoder to use settings that achieve a balance between speed and quality.""" QUALITY = "Quality" + """Tells the encoder to use settings that are optimized to produce higher quality output at the + #: expense of slower overall encode time.""" class H265VideoProfile(str, Enum, metaclass=CaseInsensitiveEnumMeta): """We currently support Main. Default is Auto.""" - #: Tells the encoder to automatically determine the appropriate H.265 profile. AUTO = "Auto" - #: Main profile - #: (https://x265.readthedocs.io/en/default/cli.html?highlight=profile#profile-level-tier) + """Tells the encoder to automatically determine the appropriate H.265 profile.""" MAIN = "Main" - #: Main 10 profile (https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding#Main_10) + """Main profile + #: (https://x265.readthedocs.io/en/default/cli.html?highlight=profile#profile-level-tier)""" MAIN10 = "Main10" + """Main 10 profile (https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding#Main_10)""" class InsightsType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -489,12 +489,12 @@ class InsightsType(str, Enum, metaclass=CaseInsensitiveEnumMeta): conditions would error out. """ - #: Generate audio only insights. Ignore video even if present. Fails if no audio is present. AUDIO_INSIGHTS_ONLY = "AudioInsightsOnly" - #: Generate video only insights. Ignore audio if present. Fails if no video is present. + """Generate audio only insights. Ignore video even if present. Fails if no audio is present.""" VIDEO_INSIGHTS_ONLY = "VideoInsightsOnly" - #: Generate both audio and video insights. Fails if either audio or video Insights fail. + """Generate video only insights. Ignore audio if present. Fails if no video is present.""" ALL_INSIGHTS = "AllInsights" + """Generate both audio and video insights. Fails if either audio or video Insights fail.""" class InterleaveOutput(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -503,61 +503,61 @@ class InterleaveOutput(str, Enum, metaclass=CaseInsensitiveEnumMeta): and video-only outputs in separate MP4 files. """ - #: The output is video-only or audio-only. NON_INTERLEAVED_OUTPUT = "NonInterleavedOutput" - #: The output includes both audio and video. + """The output is video-only or audio-only.""" INTERLEAVED_OUTPUT = "InterleavedOutput" + """The output includes both audio and video.""" class JobErrorCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Helps with categorization of errors.""" - #: The error is service related. SERVICE = "Service" - #: The error is download related. + """The error is service related.""" DOWNLOAD = "Download" - #: The error is upload related. + """The error is download related.""" UPLOAD = "Upload" - #: The error is configuration related. + """The error is upload related.""" CONFIGURATION = "Configuration" - #: The error is related to data in the input files. + """The error is configuration related.""" CONTENT = "Content" - #: The error is related to account information. + """The error is related to data in the input files.""" ACCOUNT = "Account" + """The error is related to account information.""" class JobErrorCode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Error code describing the error.""" - #: Fatal service error, please contact support. SERVICE_ERROR = "ServiceError" - #: Transient error, please retry, if retry is unsuccessful, please contact support. + """Fatal service error, please contact support.""" SERVICE_TRANSIENT_ERROR = "ServiceTransientError" - #: While trying to download the input files, the files were not accessible, please check the - #: availability of the source. + """Transient error, please retry, if retry is unsuccessful, please contact support.""" DOWNLOAD_NOT_ACCESSIBLE = "DownloadNotAccessible" - #: While trying to download the input files, there was an issue during transfer (storage service, - #: network errors), see details and check your source. + """While trying to download the input files, the files were not accessible, please check the + #: availability of the source.""" DOWNLOAD_TRANSIENT_ERROR = "DownloadTransientError" - #: While trying to upload the output files, the destination was not reachable, please check the - #: availability of the destination. + """While trying to download the input files, there was an issue during transfer (storage service, + #: network errors), see details and check your source.""" UPLOAD_NOT_ACCESSIBLE = "UploadNotAccessible" - #: While trying to upload the output files, there was an issue during transfer (storage service, - #: network errors), see details and check your destination. + """While trying to upload the output files, the destination was not reachable, please check the + #: availability of the destination.""" UPLOAD_TRANSIENT_ERROR = "UploadTransientError" - #: There was a problem with the combination of input files and the configuration settings applied, - #: fix the configuration settings and retry with the same input, or change input to match the - #: configuration. + """While trying to upload the output files, there was an issue during transfer (storage service, + #: network errors), see details and check your destination.""" CONFIGURATION_UNSUPPORTED = "ConfigurationUnsupported" - #: There was a problem with the input content (for example: zero byte files, or - #: corrupt/non-decodable files), check the input files. + """There was a problem with the combination of input files and the configuration settings applied, + #: fix the configuration settings and retry with the same input, or change input to match the + #: configuration.""" CONTENT_MALFORMED = "ContentMalformed" - #: There was a problem with the format of the input (not valid media file, or an unsupported - #: file/codec), check the validity of the input files. + """There was a problem with the input content (for example: zero byte files, or + #: corrupt/non-decodable files), check the input files.""" CONTENT_UNSUPPORTED = "ContentUnsupported" - #: There was an error verifying to the account identity. Check and fix the identity configurations - #: and retry. If unsuccessful, please contact support. + """There was a problem with the format of the input (not valid media file, or an unsupported + #: file/codec), check the validity of the input files.""" IDENTITY_UNSUPPORTED = "IdentityUnsupported" + """There was an error verifying to the account identity. Check and fix the identity configurations + #: and retry. If unsuccessful, please contact support.""" class JobRetry(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -565,32 +565,32 @@ class JobRetry(str, Enum, metaclass=CaseInsensitiveEnumMeta): Azure support via Azure Portal. """ - #: Issue needs to be investigated and then the job resubmitted with corrections or retried once - #: the underlying issue has been corrected. DO_NOT_RETRY = "DoNotRetry" - #: Issue may be resolved after waiting for a period of time and resubmitting the same Job. + """Issue needs to be investigated and then the job resubmitted with corrections or retried once + #: the underlying issue has been corrected.""" MAY_RETRY = "MayRetry" + """Issue may be resolved after waiting for a period of time and resubmitting the same Job.""" class JobState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes the state of the JobOutput.""" - #: The job was canceled. This is a final state for the job. CANCELED = "Canceled" - #: The job is in the process of being canceled. This is a transient state for the job. + """The job was canceled. This is a final state for the job.""" CANCELING = "Canceling" - #: The job has encountered an error. This is a final state for the job. + """The job is in the process of being canceled. This is a transient state for the job.""" ERROR = "Error" - #: The job is finished. This is a final state for the job. + """The job has encountered an error. This is a final state for the job.""" FINISHED = "Finished" - #: The job is processing. This is a transient state for the job. + """The job is finished. This is a final state for the job.""" PROCESSING = "Processing" - #: The job is in a queued state, waiting for resources to become available. This is a transient - #: state. + """The job is processing. This is a transient state for the job.""" QUEUED = "Queued" - #: The job is being scheduled to run on an available resource. This is a transient state, between - #: queued and processing states. + """The job is in a queued state, waiting for resources to become available. This is a transient + #: state.""" SCHEDULED = "Scheduled" + """The job is being scheduled to run on an available resource. This is a transient state, between + #: queued and processing states.""" class LiveEventEncodingType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -601,23 +601,36 @@ class LiveEventEncodingType(str, Enum, metaclass=CaseInsensitiveEnumMeta): information. This property cannot be modified after the live event is created. """ - #: This is the same as PassthroughStandard, please see description below. This enumeration value - #: is being deprecated. NONE = "None" - #: A contribution live encoder sends a single bitrate stream to the live event and Media Services - #: creates multiple bitrate streams. The output cannot exceed 720p in resolution. + """This is the same as PassthroughStandard, please see description below. This enumeration value + #: is being deprecated.""" STANDARD = "Standard" - #: A contribution live encoder sends a single bitrate stream to the live event and Media Services - #: creates multiple bitrate streams. The output cannot exceed 1080p in resolution. + """A contribution live encoder sends a single bitrate stream to the live event and Media Services + #: creates multiple bitrate streams. The output cannot exceed 720p in resolution.""" PREMIUM1080_P = "Premium1080p" - #: The ingested stream passes through the live event from the contribution encoder without any - #: further processing. In the PassthroughBasic mode, ingestion is limited to up to 5Mbps and only - #: 1 concurrent live output is allowed. Live transcription is not available. + """A contribution live encoder sends a single bitrate stream to the live event and Media Services + #: creates multiple bitrate streams. The output cannot exceed 1080p in resolution.""" PASSTHROUGH_BASIC = "PassthroughBasic" - #: The ingested stream passes through the live event from the contribution encoder without any - #: further processing. Live transcription is available. Ingestion bitrate limits are much higher - #: and up to 3 concurrent live outputs are allowed. + """The ingested stream passes through the live event from the contribution encoder without any + #: further processing. In the PassthroughBasic mode, ingestion is limited to up to 5Mbps and only + #: 1 concurrent live output is allowed. Live transcription is not available.""" PASSTHROUGH_STANDARD = "PassthroughStandard" + """The ingested stream passes through the live event from the contribution encoder without any + #: further processing. Live transcription is available. Ingestion bitrate limits are much higher + #: and up to 3 concurrent live outputs are allowed.""" + + +class LiveEventHealthStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Health status of last 20 seconds.""" + + EXCELLENT = "Excellent" + """Incoming bitrate >= 75% of target bitrate AND no Ingest warning and error AND ABS(IngestDrift) + #: is equal to 0.""" + GOOD = "Good" + """Incoming bitrate >= 20% AND no Ingest Error or warning exception discontinuities which gap < 10 + #: seconds.""" + POOR = "Poor" + """Otherwise.""" class LiveEventInputProtocol(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -625,10 +638,10 @@ class LiveEventInputProtocol(str, Enum, metaclass=CaseInsensitiveEnumMeta): updated. """ - #: Smooth Streaming input will be sent by the contribution encoder to the live event. FRAGMENTED_MP4 = "FragmentedMP4" - #: RTMP input will be sent by the contribution encoder to the live event. + """Smooth Streaming input will be sent by the contribution encoder to the live event.""" RTMP = "RTMP" + """RTMP input will be sent by the contribution encoder to the live event.""" class LiveEventResourceState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -636,67 +649,163 @@ class LiveEventResourceState(str, Enum, metaclass=CaseInsensitiveEnumMeta): more information. """ - #: This is the initial state of the live event after creation (unless autostart was set to true.) - #: No billing occurs in this state. In this state, the live event properties can be updated but - #: streaming is not allowed. STOPPED = "Stopped" - #: Allocate action was called on the live event and resources are being provisioned for this live - #: event. Once allocation completes successfully, the live event will transition to StandBy state. + """This is the initial state of the live event after creation (unless autostart was set to true.) + #: No billing occurs in this state. In this state, the live event properties can be updated but + #: streaming is not allowed.""" ALLOCATING = "Allocating" - #: Live event resources have been provisioned and is ready to start. Billing occurs in this state. - #: Most properties can still be updated, however ingest or streaming is not allowed during this - #: state. + """Allocate action was called on the live event and resources are being provisioned for this live + #: event. Once allocation completes successfully, the live event will transition to StandBy state.""" STAND_BY = "StandBy" - #: The live event is being started and resources are being allocated. No billing occurs in this - #: state. Updates or streaming are not allowed during this state. If an error occurs, the live - #: event returns to the Stopped state. + """Live event resources have been provisioned and is ready to start. Billing occurs in this state. + #: Most properties can still be updated, however ingest or streaming is not allowed during this + #: state.""" STARTING = "Starting" - #: The live event resources have been allocated, ingest and preview URLs have been generated, and - #: it is capable of receiving live streams. At this point, billing is active. You must explicitly - #: call Stop on the live event resource to halt further billing. + """The live event is being started and resources are being allocated. No billing occurs in this + #: state. Updates or streaming are not allowed during this state. If an error occurs, the live + #: event returns to the Stopped state.""" RUNNING = "Running" - #: The live event is being stopped and resources are being de-provisioned. No billing occurs in - #: this transient state. Updates or streaming are not allowed during this state. + """The live event resources have been allocated, ingest and preview URLs have been generated, and + #: it is capable of receiving live streams. At this point, billing is active. You must explicitly + #: call Stop on the live event resource to halt further billing.""" STOPPING = "Stopping" - #: The live event is being deleted. No billing occurs in this transient state. Updates or - #: streaming are not allowed during this state. + """The live event is being stopped and resources are being de-provisioned. No billing occurs in + #: this transient state. Updates or streaming are not allowed during this state.""" DELETING = "Deleting" + """The live event is being deleted. No billing occurs in this transient state. Updates or + #: streaming are not allowed during this state.""" + + +class LiveEventState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Current state of the live event. See https://go.microsoft.com/fwlink/?linkid=2139012 for more + information. + """ + + STOPPED = "Stopped" + """This is the initial state of the live event after creation (unless autostart was set to true.) + #: No billing occurs in this state. In this state, the live event properties can be updated but + #: streaming is not allowed.""" + RUNNING = "Running" + """The live event resources have been allocated, ingest and preview URLs have been generated, and + #: it is capable of receiving live streams. At this point, billing is active. You must explicitly + #: call Stop on the live event resource to halt further billing.""" + + +class LiveEventStreamEventLevel(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Event level.""" + + CRITICAL = "Critical" + ERROR = "Error" + WARNING = "Warning" + INFORMATION = "Information" + + +class LiveEventStreamEventMaxTimeMediaType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The media type of the larger timestamp of two fragments compared.""" + + AUDIO = "Audio" + VIDEO = "Video" + + +class LiveEventStreamEventMediaType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Type of the track.""" + + AUDIO = "audio" + VIDEO = "video" + + +class LiveEventStreamEventMinTimeMediaType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The media type of the smaller timestamp of two fragments compared.""" + + AUDIO = "Audio" + VIDEO = "Video" + + +class LiveEventStreamEventType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of the stream event. Format: StreamEvent/{eventType}.""" + + STREAM_EVENT_BEGIN_INGEST = "StreamEvent/BeginIngest" + """Ingest session begins.""" + STREAM_EVENT_END_INGEST = "StreamEvent/EndIngest" + """Ingest session ends.""" + STREAM_EVENT_FIRST_CHUNK_RECEIVED = "StreamEvent/FirstChunkReceived" + """First fragment received on ingest media track.""" + STREAM_EVENT_CHUNK_DROPPED = "StreamEvent/ChunkDropped" + """Fragment dropped.""" + STREAM_EVENT_UNALIGNED_KEY_FRAMES = "StreamEvent/UnalignedKeyFrames" + """Unaligned video keyframes detected.""" + STREAM_EVENT_UNALIGNED_PRESENTATION = "StreamEvent/UnalignedPresentation" + """Unaligned presentation detected, meaning two fragments across two quality levels are not time + #: aligned.""" + STREAM_EVENT_DISCONTINUITY = "StreamEvent/Discontinuity" + """Timestamp discontinuity detected.""" + STREAM_EVENT_INVALID_CONNECTION = "StreamEvent/InvalidConnection" + """Ingest session denied.""" + + +class LiveEventTrackEventType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of the track event.""" + + TRACK_EVENT_INGEST_HEARTBEAT = "TrackEvent/IngestHeartbeat" + """Track heartbeat received.""" + + +class LiveEventTrackType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Type of the track.""" + + AUDIO = "audio" + VIDEO = "video" class LiveOutputResourceState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The resource state of the live output.""" - #: Live output is being created. No content is archived in the asset until the live output is in - #: running state. CREATING = "Creating" - #: Live output is running and archiving live streaming content to the asset if there is valid - #: input from a contribution encoder. + """Live output is being created. No content is archived in the asset until the live output is in + #: running state.""" RUNNING = "Running" - #: Live output is being deleted. The live asset is being converted from live to on-demand asset. - #: Any streaming URLs created on the live output asset continue to work. + """Live output is running and archiving live streaming content to the asset if there is valid + #: input from a contribution encoder.""" DELETING = "Deleting" + """Live output is being deleted. The live asset is being converted from live to on-demand asset. + #: Any streaming URLs created on the live output asset continue to work.""" class MetricAggregationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The metric aggregation type.""" - #: The average. AVERAGE = "Average" - #: The count of a number of items, usually requests. + """The average.""" COUNT = "Count" - #: The sum. + """The count of a number of items, usually requests.""" TOTAL = "Total" + """The sum.""" class MetricUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The metric unit.""" - #: The number of bytes. BYTES = "Bytes" - #: The count. + """The number of bytes.""" COUNT = "Count" - #: The number of milliseconds. + """The count.""" MILLISECONDS = "Milliseconds" + """The number of milliseconds.""" + + +class MinimumTlsVersion(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The minimum TLS version allowed for this account's requests. This is an optional property. If + unspecified, a secure default value will be used. + """ + + TLS10 = "Tls10" + """Minimum TLS version is TLS 1.0.""" + TLS11 = "Tls11" + """Minimum TLS version is TLS 1.1.""" + TLS12 = "Tls12" + """Minimum TLS version is TLS 1.2.""" + TLS13 = "Tls13" + """Minimum TLS version is TLS 1.3.""" class OnErrorType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -706,12 +815,12 @@ class OnErrorType(str, Enum, metaclass=CaseInsensitiveEnumMeta): 'ContinueJob'. The default is 'StopProcessingJob'. """ - #: Tells the service that if this TransformOutput fails, then any other incomplete - #: TransformOutputs can be stopped. STOP_PROCESSING_JOB = "StopProcessingJob" - #: Tells the service that if this TransformOutput fails, then allow any other TransformOutput to - #: continue. + """Tells the service that if this TransformOutput fails, then any other incomplete + #: TransformOutputs can be stopped.""" CONTINUE_JOB = "ContinueJob" + """Tells the service that if this TransformOutput fails, then allow any other TransformOutput to + #: continue.""" class Priority(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -719,13 +828,13 @@ class Priority(str, Enum, metaclass=CaseInsensitiveEnumMeta): that the service uses for processing TransformOutputs. The default priority is Normal. """ - #: Used for TransformOutputs that can be generated after Normal and High priority - #: TransformOutputs. LOW = "Low" - #: Used for TransformOutputs that can be generated at Normal priority. + """Used for TransformOutputs that can be generated after Normal and High priority + #: TransformOutputs.""" NORMAL = "Normal" - #: Used for TransformOutputs that should take precedence over others. + """Used for TransformOutputs that can be generated at Normal priority.""" HIGH = "High" + """Used for TransformOutputs that should take precedence over others.""" class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -748,127 +857,127 @@ class PrivateEndpointServiceConnectionStatus(str, Enum, metaclass=CaseInsensitiv class ProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Provisioning state of the Media Services account.""" - #: Provisioning state failed. FAILED = "Failed" - #: Provisioning state in progress. + """Provisioning state failed.""" IN_PROGRESS = "InProgress" - #: Provisioning state succeeded. + """Provisioning state in progress.""" SUCCEEDED = "Succeeded" + """Provisioning state succeeded.""" class PublicNetworkAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Whether or not public network access is allowed for resources under the Media Services account.""" - #: Public network access is enabled. ENABLED = "Enabled" - #: Public network access is disabled. + """Public network access is enabled.""" DISABLED = "Disabled" + """Public network access is disabled.""" class Rotation(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The rotation, if any, to be applied to the input video, before it is encoded. Default is Auto.""" - #: Automatically detect and rotate as needed. AUTO = "Auto" - #: Do not rotate the video. If the output format supports it, any metadata about rotation is kept - #: intact. + """Automatically detect and rotate as needed.""" NONE = "None" - #: Do not rotate the video but remove any metadata about the rotation. + """Do not rotate the video. If the output format supports it, any metadata about rotation is kept + #: intact.""" ROTATE0 = "Rotate0" - #: Rotate 90 degrees clockwise. + """Do not rotate the video but remove any metadata about the rotation.""" ROTATE90 = "Rotate90" - #: Rotate 180 degrees clockwise. + """Rotate 90 degrees clockwise.""" ROTATE180 = "Rotate180" - #: Rotate 270 degrees clockwise. + """Rotate 180 degrees clockwise.""" ROTATE270 = "Rotate270" + """Rotate 270 degrees clockwise.""" class SecurityLevel(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The security level.""" - #: Represents a SecurityLevel that is unavailable in current API version. UNKNOWN = "Unknown" - #: For clients under development or test. No protection against unauthorized use. + """Represents a SecurityLevel that is unavailable in current API version.""" SL150 = "SL150" - #: For hardened devices and applications consuming commercial content. Software or hardware - #: protection. + """For clients under development or test. No protection against unauthorized use.""" SL2000 = "SL2000" - #: For hardened devices only. Hardware protection. + """For hardened devices and applications consuming commercial content. Software or hardware + #: protection.""" SL3000 = "SL3000" + """For hardened devices only. Hardware protection.""" class StorageAccountType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of the storage account.""" - #: The primary storage account for the Media Services account. PRIMARY = "Primary" - #: A secondary storage account for the Media Services account. + """The primary storage account for the Media Services account.""" SECONDARY = "Secondary" + """A secondary storage account for the Media Services account.""" class StorageAuthentication(str, Enum, metaclass=CaseInsensitiveEnumMeta): """StorageAuthentication.""" - #: System authentication. SYSTEM = "System" - #: Managed Identity authentication. + """System authentication.""" MANAGED_IDENTITY = "ManagedIdentity" + """Managed Identity authentication.""" class StreamingEndpointResourceState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The resource state of the streaming endpoint.""" - #: The initial state of a streaming endpoint after creation. Content is not ready to be streamed - #: from this endpoint. STOPPED = "Stopped" - #: The streaming endpoint is transitioning to the running state. + """The initial state of a streaming endpoint after creation. Content is not ready to be streamed + #: from this endpoint.""" STARTING = "Starting" - #: The streaming endpoint is running. It is able to stream content to clients + """The streaming endpoint is transitioning to the running state.""" RUNNING = "Running" - #: The streaming endpoint is transitioning to the stopped state. + """The streaming endpoint is running. It is able to stream content to clients""" STOPPING = "Stopping" - #: The streaming endpoint is being deleted. + """The streaming endpoint is transitioning to the stopped state.""" DELETING = "Deleting" - #: The streaming endpoint is increasing or decreasing scale units. + """The streaming endpoint is being deleted.""" SCALING = "Scaling" + """The streaming endpoint is increasing or decreasing scale units.""" class StreamingLocatorContentKeyType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Encryption type of Content Key.""" - #: Common Encryption using CENC COMMON_ENCRYPTION_CENC = "CommonEncryptionCenc" - #: Common Encryption using CBCS + """Common Encryption using CENC""" COMMON_ENCRYPTION_CBCS = "CommonEncryptionCbcs" - #: Envelope Encryption + """Common Encryption using CBCS""" ENVELOPE_ENCRYPTION = "EnvelopeEncryption" + """Envelope Encryption""" class StreamingPolicyStreamingProtocol(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Streaming protocol.""" - #: HLS protocol HLS = "Hls" - #: DASH protocol + """HLS protocol""" DASH = "Dash" - #: SmoothStreaming protocol + """DASH protocol""" SMOOTH_STREAMING = "SmoothStreaming" - #: Download protocol + """SmoothStreaming protocol""" DOWNLOAD = "Download" + """Download protocol""" class StreamOptionsFlag(str, Enum, metaclass=CaseInsensitiveEnumMeta): """StreamOptionsFlag.""" - #: Live streaming with no special latency optimizations. DEFAULT = "Default" - #: The live event provides lower end to end latency by reducing its internal buffers. + """Live streaming with no special latency optimizations.""" LOW_LATENCY = "LowLatency" - #: The live event is optimized for end to end latency. This option is only available for encoding + """The live event provides lower end to end latency by reducing its internal buffers.""" + LOW_LATENCY_V2 = "LowLatencyV2" + """The live event is optimized for end to end latency. This option is only available for encoding #: live events with RTMP input. The outputs can be streamed using HLS or DASH formats. The #: outputs' archive or DVR rewind length is limited to 6 hours. Use "LowLatency" stream option for - #: all other scenarios. - LOW_LATENCY_V2 = "LowLatencyV2" + #: all other scenarios.""" class StretchMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -876,70 +985,70 @@ class StretchMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): resolution(s). Default is AutoSize. """ - #: Strictly respect the output resolution without considering the pixel aspect ratio or display - #: aspect ratio of the input video. NONE = "None" - #: Override the output resolution, and change it to match the display aspect ratio of the input, + """Strictly respect the output resolution without considering the pixel aspect ratio or display + #: aspect ratio of the input video.""" + AUTO_SIZE = "AutoSize" + """Override the output resolution, and change it to match the display aspect ratio of the input, #: without padding. For example, if the input is 1920x1080 and the encoding preset asks for #: 1280x1280, then the value in the preset is overridden, and the output will be at 1280x720, - #: which maintains the input aspect ratio of 16:9. - AUTO_SIZE = "AutoSize" - #: Pad the output (with either letterbox or pillar box) to honor the output resolution, while + #: which maintains the input aspect ratio of 16:9.""" + AUTO_FIT = "AutoFit" + """Pad the output (with either letterbox or pillar box) to honor the output resolution, while #: ensuring that the active video region in the output has the same aspect ratio as the input. For #: example, if the input is 1920x1080 and the encoding preset asks for 1280x1280, then the output #: will be at 1280x1280, which contains an inner rectangle of 1280x720 at aspect ratio of 16:9, - #: and pillar box regions 280 pixels wide at the left and right. - AUTO_FIT = "AutoFit" + #: and pillar box regions 280 pixels wide at the left and right.""" class TrackAttribute(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The TrackAttribute to filter the tracks by.""" - #: The bitrate of the track. BITRATE = "Bitrate" - #: The language of the track. + """The bitrate of the track.""" LANGUAGE = "Language" + """The language of the track.""" class TrackPropertyCompareOperation(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Track property condition operation.""" - #: Unknown track property compare operation UNKNOWN = "Unknown" - #: Equal operation + """Unknown track property compare operation""" EQUAL = "Equal" + """Equal operation""" class TrackPropertyType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Track property type.""" - #: Unknown track property UNKNOWN = "Unknown" - #: Track FourCC + """Unknown track property""" FOUR_CC = "FourCC" + """Track FourCC""" class VideoSyncMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The Video Sync Mode.""" - #: This is the default method. Chooses between Cfr and Vfr depending on muxer capabilities. For - #: output format MP4, the default mode is Cfr. AUTO = "Auto" - #: The presentation timestamps on frames are passed through from the input file to the output file + """This is the default method. Chooses between Cfr and Vfr depending on muxer capabilities. For + #: output format MP4, the default mode is Cfr.""" + PASSTHROUGH = "Passthrough" + """The presentation timestamps on frames are passed through from the input file to the output file #: writer. Recommended when the input source has variable frame rate, and are attempting to #: produce multiple layers for adaptive streaming in the output which have aligned GOP boundaries. #: Note: if two or more frames in the input have duplicate timestamps, then the output will also - #: have the same behavior - PASSTHROUGH = "Passthrough" - #: Input frames will be repeated and/or dropped as needed to achieve exactly the requested - #: constant frame rate. Recommended when the output frame rate is explicitly set at a specified - #: value + #: have the same behavior""" CFR = "Cfr" - #: Similar to the Passthrough mode, but if the input has frames that have duplicate timestamps, + """Input frames will be repeated and/or dropped as needed to achieve exactly the requested + #: constant frame rate. Recommended when the output frame rate is explicitly set at a specified + #: value""" + VFR = "Vfr" + """Similar to the Passthrough mode, but if the input has frames that have duplicate timestamps, #: then only one frame is passed through to the output, and others are dropped. Recommended when #: the number of output frames is expected to be equal to the number of input frames. For example, - #: the output is used to calculate a quality metric like PSNR against the input - VFR = "Vfr" + #: the output is used to calculate a quality metric like PSNR against the input""" class Visibility(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -948,7 +1057,7 @@ class Visibility(str, Enum, metaclass=CaseInsensitiveEnumMeta): text will not be available to the client. The default value is "Visible". """ - #: The track is hidden to video player. HIDDEN = "Hidden" - #: The track is visible to video player. + """The track is hidden to video player.""" VISIBLE = "Visible" + """The track is visible to video player.""" diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/models/_models_py3.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/models/_models_py3.py index 68e3821acdd6..c3fb952d656b 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/models/_models_py3.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/models/_models_py3.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from .. import _serialization @@ -49,7 +49,7 @@ class Codec(_serialization.Model): } } - def __init__(self, *, label: Optional[str] = None, **kwargs): + def __init__(self, *, label: Optional[str] = None, **kwargs: Any) -> None: """ :keyword label: An optional label for the codec. The label can be used to control muxing behavior. @@ -101,8 +101,8 @@ def __init__( channels: Optional[int] = None, sampling_rate: Optional[int] = None, bitrate: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword label: An optional label for the codec. The label can be used to control muxing behavior. @@ -162,8 +162,8 @@ def __init__( sampling_rate: Optional[int] = None, bitrate: Optional[int] = None, profile: Optional[Union[str, "_models.AacAudioProfile"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword label: An optional label for the codec. The label can be used to control muxing behavior. @@ -184,7 +184,8 @@ def __init__( class ClipTime(_serialization.Model): - """Base class for specifying a clip time. Use sub classes of this class to specify the time position in the media. + """Base class for specifying a clip time. Use sub classes of this class to specify the time + position in the media. You probably want to use the sub-classes and not this class directly. Known sub-classes are: AbsoluteClipTime, UtcClipTime @@ -210,14 +211,16 @@ class ClipTime(_serialization.Model): } } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.odata_type: Optional[str] = None class AbsoluteClipTime(ClipTime): - """Specifies the clip time as an absolute time position in the media file. The absolute time can point to a different position depending on whether the media file starts from a timestamp of zero or not. + """Specifies the clip time as an absolute time position in the media file. The absolute time can + point to a different position depending on whether the media file starts from a timestamp of + zero or not. All required parameters must be populated in order to send to Azure. @@ -238,7 +241,7 @@ class AbsoluteClipTime(ClipTime): "time": {"key": "time", "type": "duration"}, } - def __init__(self, *, time: datetime.timedelta, **kwargs): + def __init__(self, *, time: datetime.timedelta, **kwargs: Any) -> None: """ :keyword time: The time position on the timeline of the input media. It is usually specified as an ISO8601 period. e.g PT30S for 30 seconds. Required. @@ -270,8 +273,8 @@ def __init__( *, default_action: Optional[Union[str, "_models.DefaultAction"]] = None, ip_allow_list: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default_action: The behavior for IP access control in Key Delivery. Known values are: "Allow" and "Deny". @@ -321,8 +324,8 @@ def __init__( type: Union[str, "_models.AccountEncryptionKeyType"], key_vault_properties: Optional["_models.KeyVaultProperties"] = None, identity: Optional["_models.ResourceIdentity"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: The type of key used to encrypt the Account Key. Required. Known values are: "SystemKey" and "CustomerKey". @@ -366,7 +369,7 @@ class Resource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -375,7 +378,8 @@ def __init__(self, **kwargs): class ProxyResource(Resource): - """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. + """The resource model definition for a Azure Resource Manager proxy resource. It will not have + tags and a location. Variables are only populated by the server, and will be ignored when sending a request. @@ -401,7 +405,7 @@ class ProxyResource(Resource): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) @@ -452,8 +456,8 @@ def __init__( presentation_time_range: Optional["_models.PresentationTimeRange"] = None, first_quality: Optional["_models.FirstQuality"] = None, tracks: Optional[List["_models.FilterTrackSelection"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword presentation_time_range: The presentation time range. :paramtype presentation_time_range: ~azure.mgmt.media.models.PresentationTimeRange @@ -485,8 +489,12 @@ class AccountFilterCollection(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.AccountFilter"]] = None, odata_next_link: Optional[str] = None, **kwargs - ): + self, + *, + value: Optional[List["_models.AccountFilter"]] = None, + odata_next_link: Optional[str] = None, + **kwargs: Any + ) -> None: """ :keyword value: A collection of AccountFilter items. :paramtype value: list[~azure.mgmt.media.models.AccountFilter] @@ -520,8 +528,8 @@ def __init__( akamai_signature_header_authentication_key_list: Optional[ List["_models.AkamaiSignatureHeaderAuthenticationKey"] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword akamai_signature_header_authentication_key_list: authentication key list. :paramtype akamai_signature_header_authentication_key_list: @@ -554,8 +562,8 @@ def __init__( identifier: Optional[str] = None, base64_key: Optional[str] = None, expiration: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword identifier: identifier of the key. :paramtype identifier: str @@ -597,8 +605,13 @@ class ArmStreamingEndpointCapacity(_serialization.Model): } def __init__( - self, *, default: Optional[int] = None, minimum: Optional[int] = None, maximum: Optional[int] = None, **kwargs - ): + self, + *, + default: Optional[int] = None, + minimum: Optional[int] = None, + maximum: Optional[int] = None, + **kwargs: Any + ) -> None: """ :keyword default: The streaming endpoint default capacity. :paramtype default: int @@ -634,7 +647,7 @@ class ArmStreamingEndpointCurrentSku(_serialization.Model): "capacity": {"key": "capacity", "type": "int"}, } - def __init__(self, *, capacity: Optional[int] = None, **kwargs): + def __init__(self, *, capacity: Optional[int] = None, **kwargs: Any) -> None: """ :keyword capacity: The streaming endpoint sku capacity. :paramtype capacity: int @@ -661,7 +674,7 @@ class ArmStreamingEndpointSku(_serialization.Model): "name": {"key": "name", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -690,8 +703,8 @@ def __init__( resource_type: Optional[str] = None, capacity: Optional["_models.ArmStreamingEndpointCapacity"] = None, sku: Optional["_models.ArmStreamingEndpointSku"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_type: :paramtype resource_type: str @@ -739,6 +752,8 @@ class Asset(ProxyResource): # pylint: disable=too-many-instance-attributes MediaStorageEncryption. Known values are: "None" and "MediaStorageClientEncryption". :vartype storage_encryption_format: str or ~azure.mgmt.media.models.AssetStorageEncryptionFormat + :ivar encryption_scope: The Asset container encryption scope in the storage account. + :vartype encryption_scope: str """ _validation = { @@ -765,6 +780,7 @@ class Asset(ProxyResource): # pylint: disable=too-many-instance-attributes "container": {"key": "properties.container", "type": "str"}, "storage_account_name": {"key": "properties.storageAccountName", "type": "str"}, "storage_encryption_format": {"key": "properties.storageEncryptionFormat", "type": "str"}, + "encryption_scope": {"key": "properties.encryptionScope", "type": "str"}, } def __init__( @@ -774,8 +790,9 @@ def __init__( description: Optional[str] = None, container: Optional[str] = None, storage_account_name: Optional[str] = None, - **kwargs - ): + encryption_scope: Optional[str] = None, + **kwargs: Any + ) -> None: """ :keyword alternate_id: The alternate ID of the Asset. :paramtype alternate_id: str @@ -785,6 +802,8 @@ def __init__( :paramtype container: str :keyword storage_account_name: The name of the storage account. :paramtype storage_account_name: str + :keyword encryption_scope: The Asset container encryption scope in the storage account. + :paramtype encryption_scope: str """ super().__init__(**kwargs) self.system_data = None @@ -796,6 +815,7 @@ def __init__( self.container = container self.storage_account_name = storage_account_name self.storage_encryption_format = None + self.encryption_scope = encryption_scope class AssetCollection(_serialization.Model): @@ -814,8 +834,8 @@ class AssetCollection(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.Asset"]] = None, odata_next_link: Optional[str] = None, **kwargs - ): + self, *, value: Optional[List["_models.Asset"]] = None, odata_next_link: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword value: A collection of Asset items. :paramtype value: list[~azure.mgmt.media.models.Asset] @@ -839,7 +859,7 @@ class AssetContainerSas(_serialization.Model): "asset_container_sas_urls": {"key": "assetContainerSasUrls", "type": "[str]"}, } - def __init__(self, *, asset_container_sas_urls: Optional[List[str]] = None, **kwargs): + def __init__(self, *, asset_container_sas_urls: Optional[List[str]] = None, **kwargs: Any) -> None: """ :keyword asset_container_sas_urls: The list of Asset container SAS URLs. :paramtype asset_container_sas_urls: list[str] @@ -877,8 +897,8 @@ def __init__( asset_file_id: str, initialization_vector: Optional[str] = None, asset_file_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword initialization_vector: The Asset File initialization vector. :paramtype initialization_vector: str @@ -939,8 +959,8 @@ def __init__( presentation_time_range: Optional["_models.PresentationTimeRange"] = None, first_quality: Optional["_models.FirstQuality"] = None, tracks: Optional[List["_models.FilterTrackSelection"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword presentation_time_range: The presentation time range. :paramtype presentation_time_range: ~azure.mgmt.media.models.PresentationTimeRange @@ -972,8 +992,12 @@ class AssetFilterCollection(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.AssetFilter"]] = None, odata_next_link: Optional[str] = None, **kwargs - ): + self, + *, + value: Optional[List["_models.AssetFilter"]] = None, + odata_next_link: Optional[str] = None, + **kwargs: Any + ) -> None: """ :keyword value: A collection of AssetFilter items. :paramtype value: list[~azure.mgmt.media.models.AssetFilter] @@ -1032,7 +1056,7 @@ class AssetStreamingLocator(_serialization.Model): "default_content_key_policy_name": {"key": "defaultContentKeyPolicyName", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -1080,7 +1104,7 @@ class AssetTrack(ProxyResource): "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, } - def __init__(self, *, track: Optional["_models.TrackBase"] = None, **kwargs): + def __init__(self, *, track: Optional["_models.TrackBase"] = None, **kwargs: Any) -> None: """ :keyword track: Detailed information about a track in the asset. :paramtype track: ~azure.mgmt.media.models.TrackBase @@ -1101,7 +1125,7 @@ class AssetTrackCollection(_serialization.Model): "value": {"key": "value", "type": "[AssetTrack]"}, } - def __init__(self, *, value: Optional[List["_models.AssetTrack"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.AssetTrack"]] = None, **kwargs: Any) -> None: """ :keyword value: A collection of AssetTrack items. :paramtype value: list[~azure.mgmt.media.models.AssetTrack] @@ -1152,8 +1176,8 @@ def __init__( start_time: Optional[datetime.datetime] = None, end_time: Optional[datetime.datetime] = None, error: Optional["_models.ErrorDetail"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Operation identifier. Required. :paramtype name: str @@ -1201,8 +1225,8 @@ def __init__( error: Optional["_models.ErrorDetail"] = None, name: Optional[str] = None, status: Optional[Union[str, "_models.AsyncOperationStatus"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword error: The error object. :paramtype error: ~azure.mgmt.media.models.ErrorDetail @@ -1219,7 +1243,8 @@ def __init__( class Preset(_serialization.Model): - """Base type for all Presets, which define the recipe or instructions on how the input media files should be processed. + """Base type for all Presets, which define the recipe or instructions on how the input media files + should be processed. You probably want to use the sub-classes and not this class directly. Known sub-classes are: AudioAnalyzerPreset, BuiltInStandardEncoderPreset, FaceDetectorPreset, StandardEncoderPreset @@ -1247,14 +1272,16 @@ class Preset(_serialization.Model): } } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.odata_type: Optional[str] = None class AudioAnalyzerPreset(Preset): - """The Audio Analyzer preset applies a pre-defined set of AI-based analysis operations, including speech transcription. Currently, the preset supports processing of content with a single audio track. + """The Audio Analyzer preset applies a pre-defined set of AI-based analysis operations, including + speech transcription. Currently, the preset supports processing of content with a single audio + track. You probably want to use the sub-classes and not this class directly. Known sub-classes are: VideoAnalyzerPreset @@ -1302,8 +1329,8 @@ def __init__( audio_language: Optional[str] = None, mode: Optional[Union[str, "_models.AudioAnalysisMode"]] = None, experimental_options: Optional[Dict[str, str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword audio_language: The language for the audio payload in the input using the BCP-47 format of 'language tag-region' (e.g: 'en-US'). If you know the language of your content, it @@ -1400,8 +1427,8 @@ def __init__( fade_in_duration: Optional[datetime.timedelta] = None, fade_out_duration: Optional[datetime.timedelta] = None, audio_gain_level: Optional[float] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword input_label: The label of the job input which is to be used as an overlay. The Input must specify exactly one file. You can specify an image file in JPG, PNG, GIF or BMP format, or @@ -1505,8 +1532,8 @@ def __init__( fade_in_duration: Optional[datetime.timedelta] = None, fade_out_duration: Optional[datetime.timedelta] = None, audio_gain_level: Optional[float] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword input_label: The label of the job input which is to be used as an overlay. The Input must specify exactly one file. You can specify an image file in JPG, PNG, GIF or BMP format, or @@ -1578,7 +1605,7 @@ class TrackBase(_serialization.Model): } } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.odata_type: Optional[str] = None @@ -1636,8 +1663,8 @@ def __init__( hls_settings: Optional["_models.HlsSettings"] = None, dash_settings: Optional["_models.DashSettings"] = None, mpeg4_track_id: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword file_name: The file name to the source file. This file is located in the storage container of the asset. @@ -1666,7 +1693,8 @@ def __init__( class TrackDescriptor(_serialization.Model): - """Base type for all TrackDescriptor types, which define the metadata and selection for tracks that should be processed by a Job. + """Base type for all TrackDescriptor types, which define the metadata and selection for tracks + that should be processed by a Job. You probably want to use the sub-classes and not this class directly. Known sub-classes are: AudioTrackDescriptor, VideoTrackDescriptor @@ -1692,7 +1720,7 @@ class TrackDescriptor(_serialization.Model): } } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.odata_type: Optional[str] = None @@ -1731,7 +1759,9 @@ class AudioTrackDescriptor(TrackDescriptor): } } - def __init__(self, *, channel_mapping: Optional[Union[str, "_models.ChannelMapping"]] = None, **kwargs): + def __init__( + self, *, channel_mapping: Optional[Union[str, "_models.ChannelMapping"]] = None, **kwargs: Any + ) -> None: """ :keyword channel_mapping: Optional designation for single channel audio tracks. Can be used to combine the tracks into stereo or multi-channel audio tracks. Known values are: "FrontLeft", @@ -1780,8 +1810,8 @@ def __init__( *, preset_name: Union[str, "_models.EncoderNamedPreset"], configurations: Optional["_models.PresetConfigurations"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword configurations: Optional configuration settings for encoder. Configurations is only supported for ContentAwareEncoding and H265ContentAwareEncoding BuiltInStandardEncoderPreset. @@ -1824,8 +1854,8 @@ def __init__( fair_play: Optional["_models.StreamingPolicyFairPlayConfiguration"] = None, play_ready: Optional["_models.StreamingPolicyPlayReadyConfiguration"] = None, widevine: Optional["_models.StreamingPolicyWidevineConfiguration"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword fair_play: FairPlay configurations. :paramtype fair_play: ~azure.mgmt.media.models.StreamingPolicyFairPlayConfiguration @@ -1859,8 +1889,8 @@ def __init__( *, play_ready: Optional["_models.StreamingPolicyPlayReadyConfiguration"] = None, widevine: Optional["_models.StreamingPolicyWidevineConfiguration"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword play_ready: PlayReady configurations. :paramtype play_ready: ~azure.mgmt.media.models.StreamingPolicyPlayReadyConfiguration @@ -1886,7 +1916,7 @@ class CheckNameAvailabilityInput(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, *, name: Optional[str] = None, type: Optional[str] = None, **kwargs): + def __init__(self, *, name: Optional[str] = None, type: Optional[str] = None, **kwargs: Any) -> None: """ :keyword name: The account name. :paramtype name: str @@ -1914,7 +1944,7 @@ class ClearKeyEncryptionConfiguration(_serialization.Model): "custom_keys_acquisition_url_template": {"key": "customKeysAcquisitionUrlTemplate", "type": "str"}, } - def __init__(self, *, custom_keys_acquisition_url_template: Optional[str] = None, **kwargs): + def __init__(self, *, custom_keys_acquisition_url_template: Optional[str] = None, **kwargs: Any) -> None: """ :keyword custom_keys_acquisition_url_template: Template for the URL of the custom service delivering content keys to end user players. Not required when using Azure Media Services for @@ -1965,8 +1995,8 @@ def __init__( content_keys: Optional["_models.StreamingPolicyContentKeys"] = None, drm: Optional["_models.CbcsDrmConfiguration"] = None, clear_key_encryption_configuration: Optional["_models.ClearKeyEncryptionConfiguration"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled_protocols: Representing supported protocols. :paramtype enabled_protocols: ~azure.mgmt.media.models.EnabledProtocols @@ -2027,8 +2057,8 @@ def __init__( content_keys: Optional["_models.StreamingPolicyContentKeys"] = None, drm: Optional["_models.CencDrmConfiguration"] = None, clear_key_encryption_configuration: Optional["_models.ClearKeyEncryptionConfiguration"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled_protocols: Representing supported protocols. :paramtype enabled_protocols: ~azure.mgmt.media.models.EnabledProtocols @@ -2106,8 +2136,8 @@ def __init__( *, description: Optional[str] = None, options: Optional[List["_models.ContentKeyPolicyOption"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword description: A description for the Policy. :paramtype description: str @@ -2124,7 +2154,8 @@ def __init__( class ContentKeyPolicyConfiguration(_serialization.Model): - """Base class for Content Key Policy configuration. A derived class must be used to create a configuration. + """Base class for Content Key Policy configuration. A derived class must be used to create a + configuration. You probably want to use the sub-classes and not this class directly. Known sub-classes are: ContentKeyPolicyClearKeyConfiguration, ContentKeyPolicyFairPlayConfiguration, @@ -2155,7 +2186,7 @@ class ContentKeyPolicyConfiguration(_serialization.Model): } } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.odata_type: Optional[str] = None @@ -2178,7 +2209,7 @@ class ContentKeyPolicyClearKeyConfiguration(ContentKeyPolicyConfiguration): "odata_type": {"key": "@odata\\.type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.odata_type: str = "#Microsoft.Media.ContentKeyPolicyClearKeyConfiguration" @@ -2204,8 +2235,8 @@ def __init__( *, value: Optional[List["_models.ContentKeyPolicy"]] = None, odata_next_link: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword value: A collection of ContentKeyPolicy items. :paramtype value: list[~azure.mgmt.media.models.ContentKeyPolicy] @@ -2276,8 +2307,8 @@ def __init__( rental_and_lease_key_type: Union[str, "_models.ContentKeyPolicyFairPlayRentalAndLeaseKeyType"], rental_duration: int, offline_rental_configuration: Optional["_models.ContentKeyPolicyFairPlayOfflineRentalConfiguration"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword ask: The key that must be used as FairPlay Application Secret key. This needs to be base64 encoded. Required. @@ -2329,7 +2360,7 @@ class ContentKeyPolicyFairPlayOfflineRentalConfiguration(_serialization.Model): "storage_duration_seconds": {"key": "storageDurationSeconds", "type": "int"}, } - def __init__(self, *, playback_duration_seconds: int, storage_duration_seconds: int, **kwargs): + def __init__(self, *, playback_duration_seconds: int, storage_duration_seconds: int, **kwargs: Any) -> None: """ :keyword playback_duration_seconds: Playback duration. Required. :paramtype playback_duration_seconds: int @@ -2342,7 +2373,8 @@ def __init__(self, *, playback_duration_seconds: int, storage_duration_seconds: class ContentKeyPolicyRestriction(_serialization.Model): - """Base class for Content Key Policy restrictions. A derived class must be used to create a restriction. + """Base class for Content Key Policy restrictions. A derived class must be used to create a + restriction. You probably want to use the sub-classes and not this class directly. Known sub-classes are: ContentKeyPolicyOpenRestriction, ContentKeyPolicyTokenRestriction, @@ -2370,7 +2402,7 @@ class ContentKeyPolicyRestriction(_serialization.Model): } } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.odata_type: Optional[str] = None @@ -2393,7 +2425,7 @@ class ContentKeyPolicyOpenRestriction(ContentKeyPolicyRestriction): "odata_type": {"key": "@odata\\.type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.odata_type: str = "#Microsoft.Media.ContentKeyPolicyOpenRestriction" @@ -2436,8 +2468,8 @@ def __init__( configuration: "_models.ContentKeyPolicyConfiguration", restriction: "_models.ContentKeyPolicyRestriction", name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The Policy Option description. :paramtype name: str @@ -2483,8 +2515,8 @@ def __init__( *, licenses: List["_models.ContentKeyPolicyPlayReadyLicense"], response_custom_data: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword licenses: The PlayReady licenses. Required. :paramtype licenses: list[~azure.mgmt.media.models.ContentKeyPolicyPlayReadyLicense] @@ -2525,7 +2557,7 @@ class ContentKeyPolicyPlayReadyContentKeyLocation(_serialization.Model): } } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.odata_type: Optional[str] = None @@ -2548,7 +2580,7 @@ class ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader(ContentKeyPolicyPl "odata_type": {"key": "@odata\\.type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.odata_type: str = "#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader" @@ -2575,7 +2607,7 @@ class ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier(ContentKeyP "key_id": {"key": "keyId", "type": "str"}, } - def __init__(self, *, key_id: str, **kwargs): + def __init__(self, *, key_id: str, **kwargs: Any) -> None: """ :keyword key_id: The content key ID. Required. :paramtype key_id: str @@ -2586,7 +2618,8 @@ def __init__(self, *, key_id: str, **kwargs): class ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction(_serialization.Model): - """Configures the Explicit Analog Television Output Restriction control bits. For further details see the PlayReady Compliance Rules. + """Configures the Explicit Analog Television Output Restriction control bits. For further details + see the PlayReady Compliance Rules. All required parameters must be populated in order to send to Azure. @@ -2608,7 +2641,7 @@ class ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction(_serializatio "configuration_data": {"key": "configurationData", "type": "int"}, } - def __init__(self, *, best_effort: bool, configuration_data: int, **kwargs): + def __init__(self, *, best_effort: bool, configuration_data: int, **kwargs: Any) -> None: """ :keyword best_effort: Indicates whether this restriction is enforced on a Best Effort basis. Required. @@ -2690,8 +2723,8 @@ def __init__( relative_expiration_date: Optional[datetime.timedelta] = None, grace_period: Optional[datetime.timedelta] = None, play_right: Optional["_models.ContentKeyPolicyPlayReadyPlayRight"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword allow_test_devices: A flag indicating whether test devices can use the license. Required. @@ -2838,8 +2871,8 @@ def __init__( analog_video_opl: Optional[int] = None, compressed_digital_audio_opl: Optional[int] = None, uncompressed_digital_audio_opl: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword first_play_expiration: The amount of time that the license is valid after the license is first used to play content. @@ -2938,7 +2971,9 @@ class ContentKeyPolicyProperties(_serialization.Model): "options": {"key": "options", "type": "[ContentKeyPolicyOption]"}, } - def __init__(self, *, options: List["_models.ContentKeyPolicyOption"], description: Optional[str] = None, **kwargs): + def __init__( + self, *, options: List["_models.ContentKeyPolicyOption"], description: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword description: A description for the Policy. :paramtype description: str @@ -2954,7 +2989,8 @@ def __init__(self, *, options: List["_models.ContentKeyPolicyOption"], descripti class ContentKeyPolicyRestrictionTokenKey(_serialization.Model): - """Base class for Content Key Policy key for token validation. A derived class must be used to create a token key. + """Base class for Content Key Policy key for token validation. A derived class must be used to + create a token key. You probably want to use the sub-classes and not this class directly. Known sub-classes are: ContentKeyPolicyRsaTokenKey, ContentKeyPolicySymmetricTokenKey, @@ -2982,7 +3018,7 @@ class ContentKeyPolicyRestrictionTokenKey(_serialization.Model): } } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.odata_type: Optional[str] = None @@ -3013,7 +3049,7 @@ class ContentKeyPolicyRsaTokenKey(ContentKeyPolicyRestrictionTokenKey): "modulus": {"key": "modulus", "type": "bytearray"}, } - def __init__(self, *, exponent: bytes, modulus: bytes, **kwargs): + def __init__(self, *, exponent: bytes, modulus: bytes, **kwargs: Any) -> None: """ :keyword exponent: The RSA Parameter exponent. Required. :paramtype exponent: bytes @@ -3047,7 +3083,7 @@ class ContentKeyPolicySymmetricTokenKey(ContentKeyPolicyRestrictionTokenKey): "key_value": {"key": "keyValue", "type": "bytearray"}, } - def __init__(self, *, key_value: bytes, **kwargs): + def __init__(self, *, key_value: bytes, **kwargs: Any) -> None: """ :keyword key_value: The key value of the key. Required. :paramtype key_value: bytes @@ -3071,7 +3107,7 @@ class ContentKeyPolicyTokenClaim(_serialization.Model): "claim_value": {"key": "claimValue", "type": "str"}, } - def __init__(self, *, claim_type: Optional[str] = None, claim_value: Optional[str] = None, **kwargs): + def __init__(self, *, claim_type: Optional[str] = None, claim_value: Optional[str] = None, **kwargs: Any) -> None: """ :keyword claim_type: Token claim type. :paramtype claim_type: str @@ -3084,7 +3120,8 @@ def __init__(self, *, claim_type: Optional[str] = None, claim_value: Optional[st class ContentKeyPolicyTokenRestriction(ContentKeyPolicyRestriction): - """Represents a token restriction. Provided token must match these requirements for successful license or key delivery. + """Represents a token restriction. Provided token must match these requirements for successful + license or key delivery. All required parameters must be populated in order to send to Azure. @@ -3141,8 +3178,8 @@ def __init__( alternate_verification_keys: Optional[List["_models.ContentKeyPolicyRestrictionTokenKey"]] = None, required_claims: Optional[List["_models.ContentKeyPolicyTokenClaim"]] = None, open_id_connect_discovery_document: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword issuer: The token issuer. Required. :paramtype issuer: str @@ -3191,7 +3228,7 @@ class ContentKeyPolicyUnknownConfiguration(ContentKeyPolicyConfiguration): "odata_type": {"key": "@odata\\.type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.odata_type: str = "#Microsoft.Media.ContentKeyPolicyUnknownConfiguration" @@ -3214,7 +3251,7 @@ class ContentKeyPolicyUnknownRestriction(ContentKeyPolicyRestriction): "odata_type": {"key": "@odata\\.type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.odata_type: str = "#Microsoft.Media.ContentKeyPolicyUnknownRestriction" @@ -3241,7 +3278,7 @@ class ContentKeyPolicyWidevineConfiguration(ContentKeyPolicyConfiguration): "widevine_template": {"key": "widevineTemplate", "type": "str"}, } - def __init__(self, *, widevine_template: str, **kwargs): + def __init__(self, *, widevine_template: str, **kwargs: Any) -> None: """ :keyword widevine_template: The Widevine template. Required. :paramtype widevine_template: str @@ -3273,7 +3310,7 @@ class ContentKeyPolicyX509CertificateTokenKey(ContentKeyPolicyRestrictionTokenKe "raw_body": {"key": "rawBody", "type": "bytearray"}, } - def __init__(self, *, raw_body: bytes, **kwargs): + def __init__(self, *, raw_body: bytes, **kwargs: Any) -> None: """ :keyword raw_body: The raw data field of a certificate in PKCS 12 format (X509Certificate2 in .NET). Required. @@ -3304,7 +3341,7 @@ class CopyAudio(Codec): "label": {"key": "label", "type": "str"}, } - def __init__(self, *, label: Optional[str] = None, **kwargs): + def __init__(self, *, label: Optional[str] = None, **kwargs: Any) -> None: """ :keyword label: An optional label for the codec. The label can be used to control muxing behavior. @@ -3334,7 +3371,7 @@ class CopyVideo(Codec): "label": {"key": "label", "type": "str"}, } - def __init__(self, *, label: Optional[str] = None, **kwargs): + def __init__(self, *, label: Optional[str] = None, **kwargs: Any) -> None: """ :keyword label: An optional label for the codec. The label can be used to control muxing behavior. @@ -3359,8 +3396,8 @@ class CrossSiteAccessPolicies(_serialization.Model): } def __init__( - self, *, client_access_policy: Optional[str] = None, cross_domain_policy: Optional[str] = None, **kwargs - ): + self, *, client_access_policy: Optional[str] = None, cross_domain_policy: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword client_access_policy: The content of clientaccesspolicy.xml used by Silverlight. :paramtype client_access_policy: str @@ -3383,7 +3420,7 @@ class DashSettings(_serialization.Model): "role": {"key": "role", "type": "str"}, } - def __init__(self, *, role: Optional[str] = None, **kwargs): + def __init__(self, *, role: Optional[str] = None, **kwargs: Any) -> None: """ :keyword role: The role for the DASH setting. :paramtype role: str @@ -3393,7 +3430,11 @@ def __init__(self, *, role: Optional[str] = None, **kwargs): class DDAudio(Audio): - """Describes Dolby Digital Audio Codec (AC3) audio encoding settings. The current implementation for Dolby Digital Audio support are: Audio channel numbers at 1((mono), 2(stereo), 6(5.1side); Audio sampling frequency rates at: 32K/44.1K/48K Hz; Audio bitrate values as AC3 specification supports: 32000, 40000, 48000, 56000, 64000, 80000, 96000, 112000, 128000, 160000, 192000, 224000, 256000, 320000, 384000, 448000, 512000, 576000, 640000 bps. + """Describes Dolby Digital Audio Codec (AC3) audio encoding settings. The current implementation + for Dolby Digital Audio support are: Audio channel numbers at 1((mono), 2(stereo), 6(5.1side); + Audio sampling frequency rates at: 32K/44.1K/48K Hz; Audio bitrate values as AC3 specification + supports: 32000, 40000, 48000, 56000, 64000, 80000, 96000, 112000, 128000, 160000, 192000, + 224000, 256000, 320000, 384000, 448000, 512000, 576000, 640000 bps. All required parameters must be populated in order to send to Azure. @@ -3428,8 +3469,8 @@ def __init__( channels: Optional[int] = None, sampling_rate: Optional[int] = None, bitrate: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword label: An optional label for the codec. The label can be used to control muxing behavior. @@ -3459,7 +3500,7 @@ class DefaultKey(_serialization.Model): "policy_name": {"key": "policyName", "type": "str"}, } - def __init__(self, *, label: Optional[str] = None, policy_name: Optional[str] = None, **kwargs): + def __init__(self, *, label: Optional[str] = None, policy_name: Optional[str] = None, **kwargs: Any) -> None: """ :keyword label: Label can be used to specify Content Key when creating a Streaming Locator. :paramtype label: str @@ -3492,8 +3533,8 @@ def __init__( *, parity: Optional[Union[str, "_models.DeinterlaceParity"]] = None, mode: Optional[Union[str, "_models.DeinterlaceMode"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword parity: The field parity for de-interlacing, defaults to Auto. Known values are: "Auto", "TopFieldFirst", and "BottomFieldFirst". @@ -3519,8 +3560,8 @@ class EdgePolicies(_serialization.Model): } def __init__( - self, *, usage_data_collection_policy: Optional["_models.EdgeUsageDataCollectionPolicy"] = None, **kwargs - ): + self, *, usage_data_collection_policy: Optional["_models.EdgeUsageDataCollectionPolicy"] = None, **kwargs: Any + ) -> None: """ :keyword usage_data_collection_policy: :paramtype usage_data_collection_policy: ~azure.mgmt.media.models.EdgeUsageDataCollectionPolicy @@ -3559,8 +3600,8 @@ def __init__( data_reporting_frequency: Optional[str] = None, max_allowed_unreported_usage_duration: Optional[str] = None, event_hub_details: Optional["_models.EdgeUsageDataEventHub"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword data_collection_frequency: Usage data collection frequency in ISO 8601 duration format e.g. PT10M , PT5H. @@ -3599,8 +3640,8 @@ class EdgeUsageDataEventHub(_serialization.Model): } def __init__( - self, *, name: Optional[str] = None, namespace: Optional[str] = None, token: Optional[str] = None, **kwargs - ): + self, *, name: Optional[str] = None, namespace: Optional[str] = None, token: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword name: Name of the Event Hub where usage will be reported. :paramtype name: str @@ -3644,7 +3685,7 @@ class EnabledProtocols(_serialization.Model): "smooth_streaming": {"key": "smoothStreaming", "type": "bool"}, } - def __init__(self, *, download: bool, dash: bool, hls: bool, smooth_streaming: bool, **kwargs): + def __init__(self, *, download: bool, dash: bool, hls: bool, smooth_streaming: bool, **kwargs: Any) -> None: """ :keyword download: Enable Download protocol or not. Required. :paramtype download: bool @@ -3685,7 +3726,9 @@ class EntityNameAvailabilityCheckOutput(_serialization.Model): "message": {"key": "message", "type": "str"}, } - def __init__(self, *, name_available: bool, reason: Optional[str] = None, message: Optional[str] = None, **kwargs): + def __init__( + self, *, name_available: bool, reason: Optional[str] = None, message: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword name_available: Specifies if the name is available. Required. :paramtype name_available: bool @@ -3734,8 +3777,8 @@ def __init__( clear_tracks: Optional[List["_models.TrackSelection"]] = None, content_keys: Optional["_models.StreamingPolicyContentKeys"] = None, custom_key_acquisition_url_template: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword enabled_protocols: Representing supported protocols. :paramtype enabled_protocols: ~azure.mgmt.media.models.EnabledProtocols @@ -3781,7 +3824,7 @@ class ErrorAdditionalInfo(_serialization.Model): "info": {"key": "info", "type": "object"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.type = None @@ -3821,7 +3864,7 @@ class ErrorDetail(_serialization.Model): "additional_info": {"key": "additionalInfo", "type": "[ErrorAdditionalInfo]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.code = None @@ -3832,7 +3875,8 @@ def __init__(self, **kwargs): class ErrorResponse(_serialization.Model): - """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). + """Common error response for all Azure Resource Manager APIs to return error details for failed + operations. (This also follows the OData error response format.). :ivar error: The error object. :vartype error: ~azure.mgmt.media.models.ErrorDetail @@ -3842,7 +3886,7 @@ class ErrorResponse(_serialization.Model): "error": {"key": "error", "type": "ErrorDetail"}, } - def __init__(self, *, error: Optional["_models.ErrorDetail"] = None, **kwargs): + def __init__(self, *, error: Optional["_models.ErrorDetail"] = None, **kwargs: Any) -> None: """ :keyword error: The error object. :paramtype error: ~azure.mgmt.media.models.ErrorDetail @@ -3852,7 +3896,8 @@ def __init__(self, *, error: Optional["_models.ErrorDetail"] = None, **kwargs): class FaceDetectorPreset(Preset): - """Describes all the settings to be used when analyzing a video in order to detect (and optionally redact) all the faces present. + """Describes all the settings to be used when analyzing a video in order to detect (and optionally + redact) all the faces present. All required parameters must be populated in order to send to Azure. @@ -3903,8 +3948,8 @@ def __init__( mode: Optional[Union[str, "_models.FaceRedactorMode"]] = None, blur_type: Optional[Union[str, "_models.BlurType"]] = None, experimental_options: Optional[Dict[str, str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resolution: Specifies the maximum resolution at which your video is analyzed. The default behavior is "SourceResolution," which will keep the input video at its original @@ -3971,7 +4016,9 @@ class Fade(_serialization.Model): "start": {"key": "start", "type": "str"}, } - def __init__(self, *, duration: datetime.timedelta, fade_color: str, start: Optional[str] = None, **kwargs): + def __init__( + self, *, duration: datetime.timedelta, fade_color: str, start: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword duration: The Duration of the fade effect in the video. The value can be in ISO 8601 format (For example, PT05S to fade In/Out a color during 5 seconds), or a frame count (For @@ -3995,7 +4042,8 @@ def __init__(self, *, duration: datetime.timedelta, fade_color: str, start: Opti class Filters(_serialization.Model): - """Describes all the filtering operations, such as de-interlacing, rotation etc. that are to be applied to the input media before encoding. + """Describes all the filtering operations, such as de-interlacing, rotation etc. that are to be + applied to the input media before encoding. :ivar deinterlace: The de-interlacing settings. :vartype deinterlace: ~azure.mgmt.media.models.Deinterlace @@ -4032,8 +4080,8 @@ def __init__( fade_in: Optional["_models.Fade"] = None, fade_out: Optional["_models.Fade"] = None, overlays: Optional[List["_models.Overlay"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword deinterlace: The de-interlacing settings. :paramtype deinterlace: ~azure.mgmt.media.models.Deinterlace @@ -4090,11 +4138,11 @@ class FilterTrackPropertyCondition(_serialization.Model): def __init__( self, *, - property: Union[str, "_models.FilterTrackPropertyType"], + property: Union[str, "_models.FilterTrackPropertyType"], # pylint: disable=redefined-builtin value: str, operation: Union[str, "_models.FilterTrackPropertyCompareOperation"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword property: The track property type. Required. Known values are: "Unknown", "Type", "Name", "Language", "FourCC", and "Bitrate". @@ -4112,7 +4160,8 @@ def __init__( class FilterTrackSelection(_serialization.Model): - """Representing a list of FilterTrackPropertyConditions to select a track. The filters are combined using a logical AND operation. + """Representing a list of FilterTrackPropertyConditions to select a track. The filters are + combined using a logical AND operation. All required parameters must be populated in order to send to Azure. @@ -4128,7 +4177,7 @@ class FilterTrackSelection(_serialization.Model): "track_selections": {"key": "trackSelections", "type": "[FilterTrackPropertyCondition]"}, } - def __init__(self, *, track_selections: List["_models.FilterTrackPropertyCondition"], **kwargs): + def __init__(self, *, track_selections: List["_models.FilterTrackPropertyCondition"], **kwargs: Any) -> None: """ :keyword track_selections: The track selections. Required. :paramtype track_selections: list[~azure.mgmt.media.models.FilterTrackPropertyCondition] @@ -4154,7 +4203,7 @@ class FirstQuality(_serialization.Model): "bitrate": {"key": "bitrate", "type": "int"}, } - def __init__(self, *, bitrate: int, **kwargs): + def __init__(self, *, bitrate: int, **kwargs: Any) -> None: """ :keyword bitrate: The first quality bitrate. Required. :paramtype bitrate: int @@ -4204,7 +4253,7 @@ class Format(_serialization.Model): } } - def __init__(self, *, filename_pattern: str, **kwargs): + def __init__(self, *, filename_pattern: str, **kwargs: Any) -> None: """ :keyword filename_pattern: The file naming pattern used for the creation of output files. The following macros are supported in the file name: {Basename} - An expansion macro that will use @@ -4225,7 +4274,8 @@ def __init__(self, *, filename_pattern: str, **kwargs): class InputDefinition(_serialization.Model): - """Base class for defining an input. Use sub classes of this class to specify tracks selections and related metadata. + """Base class for defining an input. Use sub classes of this class to specify tracks selections + and related metadata. You probably want to use the sub-classes and not this class directly. Known sub-classes are: FromAllInputFile, FromEachInputFile, InputFile @@ -4256,7 +4306,7 @@ class InputDefinition(_serialization.Model): } } - def __init__(self, *, included_tracks: Optional[List["_models.TrackDescriptor"]] = None, **kwargs): + def __init__(self, *, included_tracks: Optional[List["_models.TrackDescriptor"]] = None, **kwargs: Any) -> None: """ :keyword included_tracks: The list of TrackDescriptors which define the metadata and selection of tracks in the input. @@ -4268,7 +4318,9 @@ def __init__(self, *, included_tracks: Optional[List["_models.TrackDescriptor"]] class FromAllInputFile(InputDefinition): - """An InputDefinition that looks across all of the files provided to select tracks specified by the IncludedTracks property. Generally used with the AudioTrackByAttribute and VideoTrackByAttribute to allow selection of a single track across a set of input files. + """An InputDefinition that looks across all of the files provided to select tracks specified by + the IncludedTracks property. Generally used with the AudioTrackByAttribute and + VideoTrackByAttribute to allow selection of a single track across a set of input files. All required parameters must be populated in order to send to Azure. @@ -4288,7 +4340,7 @@ class FromAllInputFile(InputDefinition): "included_tracks": {"key": "includedTracks", "type": "[TrackDescriptor]"}, } - def __init__(self, *, included_tracks: Optional[List["_models.TrackDescriptor"]] = None, **kwargs): + def __init__(self, *, included_tracks: Optional[List["_models.TrackDescriptor"]] = None, **kwargs: Any) -> None: """ :keyword included_tracks: The list of TrackDescriptors which define the metadata and selection of tracks in the input. @@ -4299,7 +4351,9 @@ def __init__(self, *, included_tracks: Optional[List["_models.TrackDescriptor"]] class FromEachInputFile(InputDefinition): - """An InputDefinition that looks at each input file provided to select tracks specified by the IncludedTracks property. Generally used with the AudioTrackByAttribute and VideoTrackByAttribute to select tracks from each file given. + """An InputDefinition that looks at each input file provided to select tracks specified by the + IncludedTracks property. Generally used with the AudioTrackByAttribute and + VideoTrackByAttribute to select tracks from each file given. All required parameters must be populated in order to send to Azure. @@ -4319,7 +4373,7 @@ class FromEachInputFile(InputDefinition): "included_tracks": {"key": "includedTracks", "type": "[TrackDescriptor]"}, } - def __init__(self, *, included_tracks: Optional[List["_models.TrackDescriptor"]] = None, **kwargs): + def __init__(self, *, included_tracks: Optional[List["_models.TrackDescriptor"]] = None, **kwargs: Any) -> None: """ :keyword included_tracks: The list of TrackDescriptors which define the metadata and selection of tracks in the input. @@ -4330,7 +4384,9 @@ def __init__(self, *, included_tracks: Optional[List["_models.TrackDescriptor"]] class Layer(_serialization.Model): - """The encoder can be configured to produce video and/or images (thumbnails) at different resolutions, by specifying a layer for each desired resolution. A layer represents the properties for the video or image at a resolution. + """The encoder can be configured to produce video and/or images (thumbnails) at different + resolutions, by specifying a layer for each desired resolution. A layer represents the + properties for the video or image at a resolution. :ivar width: The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many @@ -4352,8 +4408,8 @@ class Layer(_serialization.Model): } def __init__( - self, *, width: Optional[str] = None, height: Optional[str] = None, label: Optional[str] = None, **kwargs - ): + self, *, width: Optional[str] = None, height: Optional[str] = None, label: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword width: The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many @@ -4374,7 +4430,8 @@ def __init__( class VideoLayer(Layer): - """Describes the settings to be used when encoding the input video into a desired output bitrate layer. + """Describes the settings to be used when encoding the input video into a desired output bitrate + layer. All required parameters must be populated in order to send to Azure. @@ -4441,8 +4498,8 @@ def __init__( frame_rate: Optional[str] = None, slices: Optional[int] = None, adaptive_b_frame: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword width: The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many @@ -4488,7 +4545,8 @@ def __init__( class H264Layer(VideoLayer): # pylint: disable=too-many-instance-attributes - """Describes the settings to be used when encoding the input video into a desired output bitrate layer with the H.264 video codec. + """Describes the settings to be used when encoding the input video into a desired output bitrate + layer with the H.264 video codec. All required parameters must be populated in order to send to Azure. @@ -4591,8 +4649,8 @@ def __init__( crf: Optional[float] = None, reference_frames: Optional[int] = None, entropy_mode: Optional[Union[str, "_models.EntropyMode"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword width: The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many @@ -4725,8 +4783,8 @@ def __init__( key_frame_interval: Optional[datetime.timedelta] = None, stretch_mode: Optional[Union[str, "_models.StretchMode"]] = None, sync_mode: Optional[Union[str, "_models.VideoSyncMode"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword label: An optional label for the codec. The label can be used to control muxing behavior. @@ -4812,8 +4870,8 @@ def __init__( layers: Optional[List["_models.H264Layer"]] = None, rate_control_mode: Optional[Union[str, "_models.H264RateControlMode"]] = None, scene_change_detection: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword label: An optional label for the codec. The label can be used to control muxing behavior. @@ -4854,7 +4912,8 @@ def __init__( class H265VideoLayer(Layer): - """Describes the settings to be used when encoding the input video into a desired output bitrate layer. + """Describes the settings to be used when encoding the input video into a desired output bitrate + layer. All required parameters must be populated in order to send to Azure. @@ -4922,8 +4981,8 @@ def __init__( frame_rate: Optional[str] = None, slices: Optional[int] = None, adaptive_b_frame: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword width: The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many @@ -4970,7 +5029,8 @@ def __init__( class H265Layer(H265VideoLayer): # pylint: disable=too-many-instance-attributes - """Describes the settings to be used when encoding the input video into a desired output bitrate layer with the H.265 video codec. + """Describes the settings to be used when encoding the input video into a desired output bitrate + layer with the H.265 video codec. All required parameters must be populated in order to send to Azure. @@ -5068,8 +5128,8 @@ def __init__( buffer_window: Optional[datetime.timedelta] = None, crf: Optional[float] = None, reference_frames: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword width: The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many @@ -5204,8 +5264,8 @@ def __init__( scene_change_detection: Optional[bool] = None, complexity: Optional[Union[str, "_models.H265Complexity"]] = None, layers: Optional[List["_models.H265Layer"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword label: An optional label for the codec. The label can be used to control muxing behavior. @@ -5256,7 +5316,7 @@ class Hls(_serialization.Model): "fragments_per_ts_segment": {"key": "fragmentsPerTsSegment", "type": "int"}, } - def __init__(self, *, fragments_per_ts_segment: Optional[int] = None, **kwargs): + def __init__(self, *, fragments_per_ts_segment: Optional[int] = None, **kwargs: Any) -> None: """ :keyword fragments_per_ts_segment: The number of fragments in an HTTP Live Streaming (HLS) TS segment in the output of the live event. This value does not affect the packing ratio for HLS @@ -5290,8 +5350,8 @@ def __init__( default: Optional[bool] = None, forced: Optional[bool] = None, characteristics: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default: The default for the HLS setting. :paramtype default: bool @@ -5386,8 +5446,8 @@ def __init__( sync_mode: Optional[Union[str, "_models.VideoSyncMode"]] = None, step: Optional[str] = None, range: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword label: An optional label for the codec. The label can be used to control muxing behavior. @@ -5479,7 +5539,7 @@ class ImageFormat(Format): "odata_type": {"#Microsoft.Media.JpgFormat": "JpgFormat", "#Microsoft.Media.PngFormat": "PngFormat"} } - def __init__(self, *, filename_pattern: str, **kwargs): + def __init__(self, *, filename_pattern: str, **kwargs: Any) -> None: """ :keyword filename_pattern: The file naming pattern used for the creation of output files. The following macros are supported in the file name: {Basename} - An expansion macro that will use @@ -5527,8 +5587,8 @@ def __init__( *, included_tracks: Optional[List["_models.TrackDescriptor"]] = None, filename: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword included_tracks: The list of TrackDescriptors which define the metadata and selection of tracks in the input. @@ -5552,7 +5612,7 @@ class IPAccessControl(_serialization.Model): "allow": {"key": "allow", "type": "[IPRange]"}, } - def __init__(self, *, allow: Optional[List["_models.IPRange"]] = None, **kwargs): + def __init__(self, *, allow: Optional[List["_models.IPRange"]] = None, **kwargs: Any) -> None: """ :keyword allow: The IP allow list. :paramtype allow: list[~azure.mgmt.media.models.IPRange] @@ -5584,8 +5644,8 @@ def __init__( name: Optional[str] = None, address: Optional[str] = None, subnet_prefix_length: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The friendly name for the IP address range. :paramtype name: str @@ -5601,7 +5661,8 @@ def __init__( class Job(ProxyResource): # pylint: disable=too-many-instance-attributes - """A Job resource type. The progress and state can be obtained by polling a Job or subscribing to events using EventGrid. + """A Job resource type. The progress and state can be obtained by polling a Job or subscribing to + events using EventGrid. Variables are only populated by the server, and will be ignored when sending a request. @@ -5680,8 +5741,8 @@ def __init__( outputs: Optional[List["_models.JobOutput"]] = None, priority: Optional[Union[str, "_models.Priority"]] = None, correlation_data: Optional[Dict[str, str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword description: Optional customer supplied description of the Job. :paramtype description: str @@ -5726,7 +5787,9 @@ class JobCollection(_serialization.Model): "odata_next_link": {"key": "@odata\\.nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Job"]] = None, odata_next_link: Optional[str] = None, **kwargs): + def __init__( + self, *, value: Optional[List["_models.Job"]] = None, odata_next_link: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword value: A collection of Job items. :paramtype value: list[~azure.mgmt.media.models.Job] @@ -5777,7 +5840,7 @@ class JobError(_serialization.Model): "details": {"key": "details", "type": "[JobErrorDetail]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.code = None @@ -5808,7 +5871,7 @@ class JobErrorDetail(_serialization.Model): "message": {"key": "message", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.code = None @@ -5843,7 +5906,7 @@ class JobInput(_serialization.Model): } } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.odata_type: Optional[str] = None @@ -5907,8 +5970,8 @@ def __init__( end: Optional["_models.ClipTime"] = None, label: Optional[str] = None, input_definitions: Optional[List["_models.InputDefinition"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword files: List of files. Required for JobInputHttp. Maximum of 4000 characters each. Query strings will not be returned in service responses to prevent sensitive data exposure. @@ -5991,8 +6054,8 @@ def __init__( end: Optional["_models.ClipTime"] = None, label: Optional[str] = None, input_definitions: Optional[List["_models.InputDefinition"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword files: List of files. Required for JobInputHttp. Maximum of 4000 characters each. Query strings will not be returned in service responses to prevent sensitive data exposure. @@ -6075,8 +6138,8 @@ def __init__( label: Optional[str] = None, input_definitions: Optional[List["_models.InputDefinition"]] = None, base_uri: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword files: List of files. Required for JobInputHttp. Maximum of 4000 characters each. Query strings will not be returned in service responses to prevent sensitive data exposure. @@ -6127,7 +6190,7 @@ class JobInputs(JobInput): "inputs": {"key": "inputs", "type": "[JobInput]"}, } - def __init__(self, *, inputs: Optional[List["_models.JobInput"]] = None, **kwargs): + def __init__(self, *, inputs: Optional[List["_models.JobInput"]] = None, **kwargs: Any) -> None: """ :keyword inputs: List of inputs to a Job. :paramtype inputs: list[~azure.mgmt.media.models.JobInput] @@ -6138,7 +6201,8 @@ def __init__(self, *, inputs: Optional[List["_models.JobInput"]] = None, **kwarg class JobInputSequence(JobInput): - """A Sequence contains an ordered list of Clips where each clip is a JobInput. The Sequence will be treated as a single input. + """A Sequence contains an ordered list of Clips where each clip is a JobInput. The Sequence will + be treated as a single input. All required parameters must be populated in order to send to Azure. @@ -6157,7 +6221,7 @@ class JobInputSequence(JobInput): "inputs": {"key": "inputs", "type": "[JobInputClip]"}, } - def __init__(self, *, inputs: Optional[List["_models.JobInputClip"]] = None, **kwargs): + def __init__(self, *, inputs: Optional[List["_models.JobInputClip"]] = None, **kwargs: Any) -> None: """ :keyword inputs: JobInputs that make up the timeline. :paramtype inputs: list[~azure.mgmt.media.models.JobInputClip] @@ -6230,7 +6294,9 @@ class JobOutput(_serialization.Model): _subtype_map = {"odata_type": {"#Microsoft.Media.JobOutputAsset": "JobOutputAsset"}} - def __init__(self, *, preset_override: Optional["_models.Preset"] = None, label: Optional[str] = None, **kwargs): + def __init__( + self, *, preset_override: Optional["_models.Preset"] = None, label: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword preset_override: A preset used to override the preset in the corresponding transform output. @@ -6326,8 +6392,8 @@ def __init__( asset_name: str, preset_override: Optional["_models.Preset"] = None, label: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword preset_override: A preset used to override the preset in the corresponding transform output. @@ -6382,7 +6448,7 @@ class JpgFormat(ImageFormat): "filename_pattern": {"key": "filenamePattern", "type": "str"}, } - def __init__(self, *, filename_pattern: str, **kwargs): + def __init__(self, *, filename_pattern: str, **kwargs: Any) -> None: """ :keyword filename_pattern: The file naming pattern used for the creation of output files. The following macros are supported in the file name: {Basename} - An expansion macro that will use @@ -6488,8 +6554,8 @@ def __init__( range: Optional[str] = None, layers: Optional[List["_models.JpgLayer"]] = None, sprite_column: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword label: An optional label for the codec. The label can be used to control muxing behavior. @@ -6590,8 +6656,8 @@ def __init__( height: Optional[str] = None, label: Optional[str] = None, quality: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword width: The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many @@ -6623,7 +6689,7 @@ class KeyDelivery(_serialization.Model): "access_control": {"key": "accessControl", "type": "AccessControl"}, } - def __init__(self, *, access_control: Optional["_models.AccessControl"] = None, **kwargs): + def __init__(self, *, access_control: Optional["_models.AccessControl"] = None, **kwargs: Any) -> None: """ :keyword access_control: The access control properties for Key Delivery. :paramtype access_control: ~azure.mgmt.media.models.AccessControl @@ -6655,7 +6721,7 @@ class KeyVaultProperties(_serialization.Model): "current_key_identifier": {"key": "currentKeyIdentifier", "type": "str"}, } - def __init__(self, *, key_identifier: Optional[str] = None, **kwargs): + def __init__(self, *, key_identifier: Optional[str] = None, **kwargs: Any) -> None: """ :keyword key_identifier: The URL of the Key Vault key used to encrypt the account. The key may either be versioned (for example https://vault/keys/mykey/version1) or reference a key without @@ -6688,8 +6754,8 @@ def __init__( *, permissions: Optional[Union[str, "_models.AssetContainerPermission"]] = None, expiry_time: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword permissions: The permissions to set on the SAS URL. Known values are: "Read", "ReadWrite", and "ReadWriteDelete". @@ -6714,7 +6780,9 @@ class ListContentKeysResponse(_serialization.Model): "content_keys": {"key": "contentKeys", "type": "[StreamingLocatorContentKey]"}, } - def __init__(self, *, content_keys: Optional[List["_models.StreamingLocatorContentKey"]] = None, **kwargs): + def __init__( + self, *, content_keys: Optional[List["_models.StreamingLocatorContentKey"]] = None, **kwargs: Any + ) -> None: """ :keyword content_keys: ContentKeys used by current Streaming Locator. :paramtype content_keys: list[~azure.mgmt.media.models.StreamingLocatorContentKey] @@ -6734,7 +6802,7 @@ class ListEdgePoliciesInput(_serialization.Model): "device_id": {"key": "deviceId", "type": "str"}, } - def __init__(self, *, device_id: Optional[str] = None, **kwargs): + def __init__(self, *, device_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword device_id: Unique identifier of the edge device. :paramtype device_id: str @@ -6762,8 +6830,8 @@ def __init__( *, streaming_paths: Optional[List["_models.StreamingPath"]] = None, download_paths: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword streaming_paths: Streaming Paths supported by current Streaming Locator. :paramtype streaming_paths: list[~azure.mgmt.media.models.StreamingPath] @@ -6792,14 +6860,15 @@ class ListStreamingLocatorsResponse(_serialization.Model): "streaming_locators": {"key": "streamingLocators", "type": "[AssetStreamingLocator]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.streaming_locators = None class TrackedResource(Resource): - """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. + """The resource model definition for an Azure Resource Manager tracked top level resource which + has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. @@ -6834,7 +6903,7 @@ class TrackedResource(Resource): "location": {"key": "location", "type": "str"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -6957,8 +7026,8 @@ def __init__( use_static_hostname: Optional[bool] = None, hostname_prefix: Optional[str] = None, stream_options: Optional[List[Union[str, "_models.StreamOptionsFlag"]]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -7024,7 +7093,7 @@ class LiveEventActionInput(_serialization.Model): "remove_outputs_on_stop": {"key": "removeOutputsOnStop", "type": "bool"}, } - def __init__(self, *, remove_outputs_on_stop: Optional[bool] = None, **kwargs): + def __init__(self, *, remove_outputs_on_stop: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword remove_outputs_on_stop: The flag indicates whether live outputs are automatically deleted when live event is being stopped. Deleting live outputs do not delete the underlying @@ -7077,8 +7146,8 @@ def __init__( preset_name: Optional[str] = None, stretch_mode: Optional[Union[str, "_models.StretchMode"]] = None, key_frame_interval: Optional[datetime.timedelta] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword encoding_type: Live event type. When encodingType is set to PassthroughBasic or PassthroughStandard, the service simply passes through the incoming video and audio layer(s) to @@ -7125,7 +7194,7 @@ class LiveEventEndpoint(_serialization.Model): "url": {"key": "url", "type": "str"}, } - def __init__(self, *, protocol: Optional[str] = None, url: Optional[str] = None, **kwargs): + def __init__(self, *, protocol: Optional[str] = None, url: Optional[str] = None, **kwargs: Any) -> None: """ :keyword protocol: The endpoint protocol. :paramtype protocol: str @@ -7137,6 +7206,169 @@ def __init__(self, *, protocol: Optional[str] = None, url: Optional[str] = None, self.url = url +class LiveEventGetStatusResult(_serialization.Model): + """Get live event status result. + + :ivar value: The result of the get live event status. + :vartype value: list[~azure.mgmt.media.models.LiveEventStatus] + """ + + _attribute_map = { + "value": {"key": "value", "type": "[LiveEventStatus]"}, + } + + def __init__(self, *, value: Optional[List["_models.LiveEventStatus"]] = None, **kwargs: Any) -> None: + """ + :keyword value: The result of the get live event status. + :paramtype value: list[~azure.mgmt.media.models.LiveEventStatus] + """ + super().__init__(**kwargs) + self.value = value + + +class LiveEventGetStreamEventsResult(_serialization.Model): + """Get live event stream events result. + + :ivar value: The result of the get live event stream events. + :vartype value: list[~azure.mgmt.media.models.LiveEventStreamEvent] + """ + + _attribute_map = { + "value": {"key": "value", "type": "[LiveEventStreamEvent]"}, + } + + def __init__(self, *, value: Optional[List["_models.LiveEventStreamEvent"]] = None, **kwargs: Any) -> None: + """ + :keyword value: The result of the get live event stream events. + :paramtype value: list[~azure.mgmt.media.models.LiveEventStreamEvent] + """ + super().__init__(**kwargs) + self.value = value + + +class LiveEventGetTrackIngestHeartbeatsResult(_serialization.Model): + """Get live event track ingest heart beats result. + + :ivar value: The result of the get live event track events. + :vartype value: list[~azure.mgmt.media.models.LiveEventTrackEvent] + """ + + _attribute_map = { + "value": {"key": "value", "type": "[LiveEventTrackEvent]"}, + } + + def __init__(self, *, value: Optional[List["_models.LiveEventTrackEvent"]] = None, **kwargs: Any) -> None: + """ + :keyword value: The result of the get live event track events. + :paramtype value: list[~azure.mgmt.media.models.LiveEventTrackEvent] + """ + super().__init__(**kwargs) + self.value = value + + +class LiveEventIngestInterruption(_serialization.Model): + """The live event ingest interruption data. + + :ivar begin: UTC time of interruption start, encoder disconnected. + :vartype begin: ~datetime.datetime + :ivar end: UTC time of interruption end, encoder re-connected. + :vartype end: ~datetime.datetime + :ivar duration: Duration of interruption in ISO 8601 time. For example, use PT1H30M to indicate + 1 hour and 30 minutes. + :vartype duration: ~datetime.timedelta + :ivar reason: Interruption reason. + :vartype reason: str + """ + + _attribute_map = { + "begin": {"key": "begin", "type": "iso-8601"}, + "end": {"key": "end", "type": "iso-8601"}, + "duration": {"key": "duration", "type": "duration"}, + "reason": {"key": "reason", "type": "str"}, + } + + def __init__( + self, + *, + begin: Optional[datetime.datetime] = None, + end: Optional[datetime.datetime] = None, + duration: Optional[datetime.timedelta] = None, + reason: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword begin: UTC time of interruption start, encoder disconnected. + :paramtype begin: ~datetime.datetime + :keyword end: UTC time of interruption end, encoder re-connected. + :paramtype end: ~datetime.datetime + :keyword duration: Duration of interruption in ISO 8601 time. For example, use PT1H30M to + indicate 1 hour and 30 minutes. + :paramtype duration: ~datetime.timedelta + :keyword reason: Interruption reason. + :paramtype reason: str + """ + super().__init__(**kwargs) + self.begin = begin + self.end = end + self.duration = duration + self.reason = reason + + +class LiveEventIngestion(_serialization.Model): + """The live event ingestion telemetry data. + + :ivar stream_name: Ingestion stream name. + :vartype stream_name: str + :ivar begin: Ingestion begin time in UTC. + :vartype begin: ~datetime.datetime + :ivar end: Ingestion end time in UTC. Empty if it's not stopped yet. + :vartype end: ~datetime.datetime + :ivar end_reason: Reason why ingestion stops. Empty if it's not stopped yet. E.g) Service + Stopped. No Ingestion. + :vartype end_reason: str + :ivar ingest_interruptions: IngestInterruption entry list. + :vartype ingest_interruptions: list[~azure.mgmt.media.models.LiveEventIngestInterruption] + """ + + _attribute_map = { + "stream_name": {"key": "streamName", "type": "str"}, + "begin": {"key": "begin", "type": "iso-8601"}, + "end": {"key": "end", "type": "iso-8601"}, + "end_reason": {"key": "endReason", "type": "str"}, + "ingest_interruptions": {"key": "ingestInterruptions", "type": "[LiveEventIngestInterruption]"}, + } + + def __init__( + self, + *, + stream_name: Optional[str] = None, + begin: Optional[datetime.datetime] = None, + end: Optional[datetime.datetime] = None, + end_reason: Optional[str] = None, + ingest_interruptions: Optional[List["_models.LiveEventIngestInterruption"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword stream_name: Ingestion stream name. + :paramtype stream_name: str + :keyword begin: Ingestion begin time in UTC. + :paramtype begin: ~datetime.datetime + :keyword end: Ingestion end time in UTC. Empty if it's not stopped yet. + :paramtype end: ~datetime.datetime + :keyword end_reason: Reason why ingestion stops. Empty if it's not stopped yet. E.g) Service + Stopped. No Ingestion. + :paramtype end_reason: str + :keyword ingest_interruptions: IngestInterruption entry list. + :paramtype ingest_interruptions: list[~azure.mgmt.media.models.LiveEventIngestInterruption] + """ + super().__init__(**kwargs) + self.stream_name = stream_name + self.begin = begin + self.end = end + self.end_reason = end_reason + self.ingest_interruptions = ingest_interruptions + + class LiveEventInput(_serialization.Model): """The live event input. @@ -7157,6 +7389,9 @@ class LiveEventInput(_serialization.Model): :vartype access_token: str :ivar endpoints: The input endpoints for the live event. :vartype endpoints: list[~azure.mgmt.media.models.LiveEventEndpoint] + :ivar timed_metadata_endpoints: The metadata endpoints for the live event. + :vartype timed_metadata_endpoints: + list[~azure.mgmt.media.models.LiveEventTimedMetadataEndpoint] """ _validation = { @@ -7169,6 +7404,7 @@ class LiveEventInput(_serialization.Model): "key_frame_interval_duration": {"key": "keyFrameIntervalDuration", "type": "str"}, "access_token": {"key": "accessToken", "type": "str"}, "endpoints": {"key": "endpoints", "type": "[LiveEventEndpoint]"}, + "timed_metadata_endpoints": {"key": "timedMetadataEndpoints", "type": "[LiveEventTimedMetadataEndpoint]"}, } def __init__( @@ -7179,8 +7415,9 @@ def __init__( key_frame_interval_duration: Optional[str] = None, access_token: Optional[str] = None, endpoints: Optional[List["_models.LiveEventEndpoint"]] = None, - **kwargs - ): + timed_metadata_endpoints: Optional[List["_models.LiveEventTimedMetadataEndpoint"]] = None, + **kwargs: Any + ) -> None: """ :keyword streaming_protocol: The input protocol for the live event. This is specified at creation time and cannot be updated. Required. Known values are: "FragmentedMP4" and "RTMP". @@ -7197,6 +7434,9 @@ def __init__( :paramtype access_token: str :keyword endpoints: The input endpoints for the live event. :paramtype endpoints: list[~azure.mgmt.media.models.LiveEventEndpoint] + :keyword timed_metadata_endpoints: The metadata endpoints for the live event. + :paramtype timed_metadata_endpoints: + list[~azure.mgmt.media.models.LiveEventTimedMetadataEndpoint] """ super().__init__(**kwargs) self.streaming_protocol = streaming_protocol @@ -7204,6 +7444,7 @@ def __init__( self.key_frame_interval_duration = key_frame_interval_duration self.access_token = access_token self.endpoints = endpoints + self.timed_metadata_endpoints = timed_metadata_endpoints class LiveEventInputAccessControl(_serialization.Model): @@ -7217,7 +7458,7 @@ class LiveEventInputAccessControl(_serialization.Model): "ip": {"key": "ip", "type": "IPAccessControl"}, } - def __init__(self, *, ip: Optional["_models.IPAccessControl"] = None, **kwargs): + def __init__(self, *, ip: Optional["_models.IPAccessControl"] = None, **kwargs: Any) -> None: """ :keyword ip: The IP access control properties. :paramtype ip: ~azure.mgmt.media.models.IPAccessControl @@ -7227,7 +7468,8 @@ def __init__(self, *, ip: Optional["_models.IPAccessControl"] = None, **kwargs): class LiveEventInputTrackSelection(_serialization.Model): - """A track selection condition. This property is reserved for future use, any value set on this property will be ignored. + """A track selection condition. This property is reserved for future use, any value set on this + property will be ignored. :ivar property: Property name to select. This property is reserved for future use, any value set on this property will be ignored. @@ -7247,8 +7489,13 @@ class LiveEventInputTrackSelection(_serialization.Model): } def __init__( - self, *, property: Optional[str] = None, operation: Optional[str] = None, value: Optional[str] = None, **kwargs - ): + self, + *, + property: Optional[str] = None, # pylint: disable=redefined-builtin + operation: Optional[str] = None, + value: Optional[str] = None, + **kwargs: Any + ) -> None: """ :keyword property: Property name to select. This property is reserved for future use, any value set on this property will be ignored. @@ -7290,8 +7537,8 @@ def __init__( value: Optional[List["_models.LiveEvent"]] = None, odata_count: Optional[int] = None, odata_next_link: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword value: The result of the List Live Event operation. :paramtype value: list[~azure.mgmt.media.models.LiveEvent] @@ -7308,7 +7555,9 @@ def __init__( class LiveEventOutputTranscriptionTrack(_serialization.Model): - """Describes a transcription track in the output of a live event, generated using speech-to-text transcription. This property is reserved for future use, any value set on this property will be ignored. + """Describes a transcription track in the output of a live event, generated using speech-to-text + transcription. This property is reserved for future use, any value set on this property will be + ignored. All required parameters must be populated in order to send to Azure. @@ -7325,7 +7574,7 @@ class LiveEventOutputTranscriptionTrack(_serialization.Model): "track_name": {"key": "trackName", "type": "str"}, } - def __init__(self, *, track_name: str, **kwargs): + def __init__(self, *, track_name: str, **kwargs: Any) -> None: """ :keyword track_name: The output track name. This property is reserved for future use, any value set on this property will be ignored. Required. @@ -7375,8 +7624,8 @@ def __init__( preview_locator: Optional[str] = None, streaming_policy_name: Optional[str] = None, alternative_media_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword endpoints: The endpoints for preview. Do not share the preview URL with the live event audience. @@ -7417,7 +7666,7 @@ class LiveEventPreviewAccessControl(_serialization.Model): "ip": {"key": "ip", "type": "IPAccessControl"}, } - def __init__(self, *, ip: Optional["_models.IPAccessControl"] = None, **kwargs): + def __init__(self, *, ip: Optional["_models.IPAccessControl"] = None, **kwargs: Any) -> None: """ :keyword ip: The IP access control properties. :paramtype ip: ~azure.mgmt.media.models.IPAccessControl @@ -7426,8 +7675,658 @@ def __init__(self, *, ip: Optional["_models.IPAccessControl"] = None, **kwargs): self.ip = ip +class LiveEventStatus(_serialization.Model): + """The live event status. + + :ivar state: Current state of the live event. See + https://go.microsoft.com/fwlink/?linkid=2139012 for more information. Known values are: + "Stopped" and "Running". + :vartype state: str or ~azure.mgmt.media.models.LiveEventState + :ivar health_status: Health status of last 20 seconds. Known values are: "Excellent", "Good", + and "Poor". + :vartype health_status: str or ~azure.mgmt.media.models.LiveEventHealthStatus + :ivar health_descriptions: List of strings justifying the health status. + :vartype health_descriptions: list[str] + :ivar last_updated_time: Last updated UTC time of this status. + :vartype last_updated_time: ~datetime.datetime + :ivar ingestion: Live event ingestion entry. + :vartype ingestion: ~azure.mgmt.media.models.LiveEventIngestion + :ivar track_status: Track entry list. + :vartype track_status: list[~azure.mgmt.media.models.LiveEventTrackStatus] + """ + + _attribute_map = { + "state": {"key": "state", "type": "str"}, + "health_status": {"key": "healthStatus", "type": "str"}, + "health_descriptions": {"key": "healthDescriptions", "type": "[str]"}, + "last_updated_time": {"key": "lastUpdatedTime", "type": "iso-8601"}, + "ingestion": {"key": "ingestion", "type": "LiveEventIngestion"}, + "track_status": {"key": "trackStatus", "type": "[LiveEventTrackStatus]"}, + } + + def __init__( + self, + *, + state: Optional[Union[str, "_models.LiveEventState"]] = None, + health_status: Optional[Union[str, "_models.LiveEventHealthStatus"]] = None, + health_descriptions: Optional[List[str]] = None, + last_updated_time: Optional[datetime.datetime] = None, + ingestion: Optional["_models.LiveEventIngestion"] = None, + track_status: Optional[List["_models.LiveEventTrackStatus"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword state: Current state of the live event. See + https://go.microsoft.com/fwlink/?linkid=2139012 for more information. Known values are: + "Stopped" and "Running". + :paramtype state: str or ~azure.mgmt.media.models.LiveEventState + :keyword health_status: Health status of last 20 seconds. Known values are: "Excellent", + "Good", and "Poor". + :paramtype health_status: str or ~azure.mgmt.media.models.LiveEventHealthStatus + :keyword health_descriptions: List of strings justifying the health status. + :paramtype health_descriptions: list[str] + :keyword last_updated_time: Last updated UTC time of this status. + :paramtype last_updated_time: ~datetime.datetime + :keyword ingestion: Live event ingestion entry. + :paramtype ingestion: ~azure.mgmt.media.models.LiveEventIngestion + :keyword track_status: Track entry list. + :paramtype track_status: list[~azure.mgmt.media.models.LiveEventTrackStatus] + """ + super().__init__(**kwargs) + self.state = state + self.health_status = health_status + self.health_descriptions = health_descriptions + self.last_updated_time = last_updated_time + self.ingestion = ingestion + self.track_status = track_status + + +class LiveEventStreamEvent(_serialization.Model): + """The live event stream event. + + :ivar event_type: The type of the stream event. Format: StreamEvent/{eventType}. Known values + are: "StreamEvent/BeginIngest", "StreamEvent/EndIngest", "StreamEvent/FirstChunkReceived", + "StreamEvent/ChunkDropped", "StreamEvent/UnalignedKeyFrames", + "StreamEvent/UnalignedPresentation", "StreamEvent/Discontinuity", and + "StreamEvent/InvalidConnection". + :vartype event_type: str or ~azure.mgmt.media.models.LiveEventStreamEventType + :ivar event_time: The time event raised. + :vartype event_time: ~datetime.datetime + :ivar event_level: Event level. Known values are: "Critical", "Error", "Warning", and + "Information". + :vartype event_level: str or ~azure.mgmt.media.models.LiveEventStreamEventLevel + :ivar data: Event data based on event type. + :vartype data: ~azure.mgmt.media.models.LiveEventStreamEventData + """ + + _attribute_map = { + "event_type": {"key": "eventType", "type": "str"}, + "event_time": {"key": "eventTime", "type": "iso-8601"}, + "event_level": {"key": "eventLevel", "type": "str"}, + "data": {"key": "data", "type": "LiveEventStreamEventData"}, + } + + def __init__( + self, + *, + event_type: Optional[Union[str, "_models.LiveEventStreamEventType"]] = None, + event_time: Optional[datetime.datetime] = None, + event_level: Optional[Union[str, "_models.LiveEventStreamEventLevel"]] = None, + data: Optional["_models.LiveEventStreamEventData"] = None, + **kwargs: Any + ) -> None: + """ + :keyword event_type: The type of the stream event. Format: StreamEvent/{eventType}. Known + values are: "StreamEvent/BeginIngest", "StreamEvent/EndIngest", + "StreamEvent/FirstChunkReceived", "StreamEvent/ChunkDropped", "StreamEvent/UnalignedKeyFrames", + "StreamEvent/UnalignedPresentation", "StreamEvent/Discontinuity", and + "StreamEvent/InvalidConnection". + :paramtype event_type: str or ~azure.mgmt.media.models.LiveEventStreamEventType + :keyword event_time: The time event raised. + :paramtype event_time: ~datetime.datetime + :keyword event_level: Event level. Known values are: "Critical", "Error", "Warning", and + "Information". + :paramtype event_level: str or ~azure.mgmt.media.models.LiveEventStreamEventLevel + :keyword data: Event data based on event type. + :paramtype data: ~azure.mgmt.media.models.LiveEventStreamEventData + """ + super().__init__(**kwargs) + self.event_type = event_type + self.event_time = event_time + self.event_level = event_level + self.data = data + + +class LiveEventStreamEventData(_serialization.Model): # pylint: disable=too-many-instance-attributes + """The live event stream event data. + + :ivar track_name: Name of the track. + :vartype track_name: str + :ivar stream_id: Stream ID in the format "trackName_bitrate". + :vartype stream_id: str + :ivar track_id: Track index. + :vartype track_id: int + :ivar media_type: Type of the track. Known values are: "audio" and "video". + :vartype media_type: str or ~azure.mgmt.media.models.LiveEventStreamEventMediaType + :ivar bitrate: Bitrate of the track. + :vartype bitrate: int + :ivar media_timestamp: Fragment timestamp in timescale. + :vartype media_timestamp: str + :ivar timescale: Timescale in which timestamps are expressed. + :vartype timescale: str + :ivar previous_fragment_timestamp: Previous fragment timestamp in timescale. + :vartype previous_fragment_timestamp: str + :ivar previous_fragment_duration: Previous fragment duration in timescale. + :vartype previous_fragment_duration: str + :ivar current_fragment_timestamp: Current fragment timestamp in timescale. + :vartype current_fragment_timestamp: str + :ivar fragment_one_timestamp: Timestamp of first fragment used to make a comparison, in + timescale. + :vartype fragment_one_timestamp: str + :ivar fragment_one_duration: Duration of first fragment used to make a comparison, in + timescale. + :vartype fragment_one_duration: str + :ivar fragment_two_timestamp: Timestamp of second fragment used to make a comparison, in + timescale. + :vartype fragment_two_timestamp: str + :ivar fragment_two_duration: Duration of second fragment used to make a comparison, in + timescale. + :vartype fragment_two_duration: str + :ivar fragment_drop_reason: Reason the fragment was dropped. + :vartype fragment_drop_reason: str + :ivar discontinuity_gap: Length of the discontinuity gap in timescale. + :vartype discontinuity_gap: int + :ivar stream_name: Identifier of the stream or connection. Encoder or customer is responsible + to add this ID in the ingest URL. + :vartype stream_name: str + :ivar result_code: Result code. + :vartype result_code: str + :ivar result_message: Result message. + :vartype result_message: str + :ivar duration: Fragment duration. + :vartype duration: str + :ivar resolution: Width x Height for video, null otherwise. + :vartype resolution: str + :ivar min_time: The smaller timestamp of the two fragments compared. + :vartype min_time: str + :ivar min_time_media_type: The media type of the smaller timestamp of two fragments compared. + Known values are: "Audio" and "Video". + :vartype min_time_media_type: str or + ~azure.mgmt.media.models.LiveEventStreamEventMinTimeMediaType + :ivar max_time: The larger timestamp of the two fragments compared. + :vartype max_time: str + :ivar max_time_media_type: The media type of the larger timestamp of two fragments compared. + Known values are: "Audio" and "Video". + :vartype max_time_media_type: str or + ~azure.mgmt.media.models.LiveEventStreamEventMaxTimeMediaType + :ivar timescale_of_min_time: Timescale of the fragment with the smaller timestamp. + :vartype timescale_of_min_time: str + :ivar timescale_of_max_time: Timescale of the fragment with the larger timestamp. + :vartype timescale_of_max_time: str + :ivar remote_ip: Truncated IP of the encoder. + :vartype remote_ip: str + :ivar remote_port: Port of the encoder. + :vartype remote_port: str + """ + + _attribute_map = { + "track_name": {"key": "trackName", "type": "str"}, + "stream_id": {"key": "streamId", "type": "str"}, + "track_id": {"key": "trackId", "type": "int"}, + "media_type": {"key": "mediaType", "type": "str"}, + "bitrate": {"key": "bitrate", "type": "int"}, + "media_timestamp": {"key": "mediaTimestamp", "type": "str"}, + "timescale": {"key": "timescale", "type": "str"}, + "previous_fragment_timestamp": {"key": "previousFragmentTimestamp", "type": "str"}, + "previous_fragment_duration": {"key": "previousFragmentDuration", "type": "str"}, + "current_fragment_timestamp": {"key": "currentFragmentTimestamp", "type": "str"}, + "fragment_one_timestamp": {"key": "fragmentOneTimestamp", "type": "str"}, + "fragment_one_duration": {"key": "fragmentOneDuration", "type": "str"}, + "fragment_two_timestamp": {"key": "fragmentTwoTimestamp", "type": "str"}, + "fragment_two_duration": {"key": "fragmentTwoDuration", "type": "str"}, + "fragment_drop_reason": {"key": "fragmentDropReason", "type": "str"}, + "discontinuity_gap": {"key": "discontinuityGap", "type": "int"}, + "stream_name": {"key": "streamName", "type": "str"}, + "result_code": {"key": "resultCode", "type": "str"}, + "result_message": {"key": "resultMessage", "type": "str"}, + "duration": {"key": "duration", "type": "str"}, + "resolution": {"key": "resolution", "type": "str"}, + "min_time": {"key": "minTime", "type": "str"}, + "min_time_media_type": {"key": "minTimeMediaType", "type": "str"}, + "max_time": {"key": "maxTime", "type": "str"}, + "max_time_media_type": {"key": "maxTimeMediaType", "type": "str"}, + "timescale_of_min_time": {"key": "timescaleOfMinTime", "type": "str"}, + "timescale_of_max_time": {"key": "timescaleOfMaxTime", "type": "str"}, + "remote_ip": {"key": "remoteIp", "type": "str"}, + "remote_port": {"key": "remotePort", "type": "str"}, + } + + def __init__( # pylint: disable=too-many-locals + self, + *, + track_name: Optional[str] = None, + stream_id: Optional[str] = None, + track_id: Optional[int] = None, + media_type: Optional[Union[str, "_models.LiveEventStreamEventMediaType"]] = None, + bitrate: Optional[int] = None, + media_timestamp: Optional[str] = None, + timescale: Optional[str] = None, + previous_fragment_timestamp: Optional[str] = None, + previous_fragment_duration: Optional[str] = None, + current_fragment_timestamp: Optional[str] = None, + fragment_one_timestamp: Optional[str] = None, + fragment_one_duration: Optional[str] = None, + fragment_two_timestamp: Optional[str] = None, + fragment_two_duration: Optional[str] = None, + fragment_drop_reason: Optional[str] = None, + discontinuity_gap: Optional[int] = None, + stream_name: Optional[str] = None, + result_code: Optional[str] = None, + result_message: Optional[str] = None, + duration: Optional[str] = None, + resolution: Optional[str] = None, + min_time: Optional[str] = None, + min_time_media_type: Optional[Union[str, "_models.LiveEventStreamEventMinTimeMediaType"]] = None, + max_time: Optional[str] = None, + max_time_media_type: Optional[Union[str, "_models.LiveEventStreamEventMaxTimeMediaType"]] = None, + timescale_of_min_time: Optional[str] = None, + timescale_of_max_time: Optional[str] = None, + remote_ip: Optional[str] = None, + remote_port: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword track_name: Name of the track. + :paramtype track_name: str + :keyword stream_id: Stream ID in the format "trackName_bitrate". + :paramtype stream_id: str + :keyword track_id: Track index. + :paramtype track_id: int + :keyword media_type: Type of the track. Known values are: "audio" and "video". + :paramtype media_type: str or ~azure.mgmt.media.models.LiveEventStreamEventMediaType + :keyword bitrate: Bitrate of the track. + :paramtype bitrate: int + :keyword media_timestamp: Fragment timestamp in timescale. + :paramtype media_timestamp: str + :keyword timescale: Timescale in which timestamps are expressed. + :paramtype timescale: str + :keyword previous_fragment_timestamp: Previous fragment timestamp in timescale. + :paramtype previous_fragment_timestamp: str + :keyword previous_fragment_duration: Previous fragment duration in timescale. + :paramtype previous_fragment_duration: str + :keyword current_fragment_timestamp: Current fragment timestamp in timescale. + :paramtype current_fragment_timestamp: str + :keyword fragment_one_timestamp: Timestamp of first fragment used to make a comparison, in + timescale. + :paramtype fragment_one_timestamp: str + :keyword fragment_one_duration: Duration of first fragment used to make a comparison, in + timescale. + :paramtype fragment_one_duration: str + :keyword fragment_two_timestamp: Timestamp of second fragment used to make a comparison, in + timescale. + :paramtype fragment_two_timestamp: str + :keyword fragment_two_duration: Duration of second fragment used to make a comparison, in + timescale. + :paramtype fragment_two_duration: str + :keyword fragment_drop_reason: Reason the fragment was dropped. + :paramtype fragment_drop_reason: str + :keyword discontinuity_gap: Length of the discontinuity gap in timescale. + :paramtype discontinuity_gap: int + :keyword stream_name: Identifier of the stream or connection. Encoder or customer is + responsible to add this ID in the ingest URL. + :paramtype stream_name: str + :keyword result_code: Result code. + :paramtype result_code: str + :keyword result_message: Result message. + :paramtype result_message: str + :keyword duration: Fragment duration. + :paramtype duration: str + :keyword resolution: Width x Height for video, null otherwise. + :paramtype resolution: str + :keyword min_time: The smaller timestamp of the two fragments compared. + :paramtype min_time: str + :keyword min_time_media_type: The media type of the smaller timestamp of two fragments + compared. Known values are: "Audio" and "Video". + :paramtype min_time_media_type: str or + ~azure.mgmt.media.models.LiveEventStreamEventMinTimeMediaType + :keyword max_time: The larger timestamp of the two fragments compared. + :paramtype max_time: str + :keyword max_time_media_type: The media type of the larger timestamp of two fragments compared. + Known values are: "Audio" and "Video". + :paramtype max_time_media_type: str or + ~azure.mgmt.media.models.LiveEventStreamEventMaxTimeMediaType + :keyword timescale_of_min_time: Timescale of the fragment with the smaller timestamp. + :paramtype timescale_of_min_time: str + :keyword timescale_of_max_time: Timescale of the fragment with the larger timestamp. + :paramtype timescale_of_max_time: str + :keyword remote_ip: Truncated IP of the encoder. + :paramtype remote_ip: str + :keyword remote_port: Port of the encoder. + :paramtype remote_port: str + """ + super().__init__(**kwargs) + self.track_name = track_name + self.stream_id = stream_id + self.track_id = track_id + self.media_type = media_type + self.bitrate = bitrate + self.media_timestamp = media_timestamp + self.timescale = timescale + self.previous_fragment_timestamp = previous_fragment_timestamp + self.previous_fragment_duration = previous_fragment_duration + self.current_fragment_timestamp = current_fragment_timestamp + self.fragment_one_timestamp = fragment_one_timestamp + self.fragment_one_duration = fragment_one_duration + self.fragment_two_timestamp = fragment_two_timestamp + self.fragment_two_duration = fragment_two_duration + self.fragment_drop_reason = fragment_drop_reason + self.discontinuity_gap = discontinuity_gap + self.stream_name = stream_name + self.result_code = result_code + self.result_message = result_message + self.duration = duration + self.resolution = resolution + self.min_time = min_time + self.min_time_media_type = min_time_media_type + self.max_time = max_time + self.max_time_media_type = max_time_media_type + self.timescale_of_min_time = timescale_of_min_time + self.timescale_of_max_time = timescale_of_max_time + self.remote_ip = remote_ip + self.remote_port = remote_port + + +class LiveEventTimedMetadataEndpoint(_serialization.Model): + """The live event metadata insertion endpoint. + + :ivar url: The metadata endpoint URL. + :vartype url: str + """ + + _attribute_map = { + "url": {"key": "url", "type": "str"}, + } + + def __init__(self, *, url: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword url: The metadata endpoint URL. + :paramtype url: str + """ + super().__init__(**kwargs) + self.url = url + + +class LiveEventTrackEvent(_serialization.Model): + """The live event track event. + + :ivar event_type: The type of the track event. "TrackEvent/IngestHeartbeat" + :vartype event_type: str or ~azure.mgmt.media.models.LiveEventTrackEventType + :ivar event_time: The time event raised. + :vartype event_time: ~datetime.datetime + :ivar data: Event data. + :vartype data: ~azure.mgmt.media.models.LiveEventTrackEventData + """ + + _attribute_map = { + "event_type": {"key": "eventType", "type": "str"}, + "event_time": {"key": "eventTime", "type": "iso-8601"}, + "data": {"key": "data", "type": "LiveEventTrackEventData"}, + } + + def __init__( + self, + *, + event_type: Optional[Union[str, "_models.LiveEventTrackEventType"]] = None, + event_time: Optional[datetime.datetime] = None, + data: Optional["_models.LiveEventTrackEventData"] = None, + **kwargs: Any + ) -> None: + """ + :keyword event_type: The type of the track event. "TrackEvent/IngestHeartbeat" + :paramtype event_type: str or ~azure.mgmt.media.models.LiveEventTrackEventType + :keyword event_time: The time event raised. + :paramtype event_time: ~datetime.datetime + :keyword data: Event data. + :paramtype data: ~azure.mgmt.media.models.LiveEventTrackEventData + """ + super().__init__(**kwargs) + self.event_type = event_type + self.event_time = event_time + self.data = data + + +class LiveEventTrackEventData(_serialization.Model): # pylint: disable=too-many-instance-attributes + """The live event track ingest heart beat event data. + + :ivar track_name: Name of the track. + :vartype track_name: str + :ivar track_type: Type of the track. Known values are: "audio" and "video". + :vartype track_type: str or ~azure.mgmt.media.models.LiveEventTrackType + :ivar bitrate: Bitrate of the track. + :vartype bitrate: int + :ivar incoming_bitrate: Calculated bitrate based on data chunks coming from encoder. + :vartype incoming_bitrate: int + :ivar last_timestamp: Latest timestamp received for a track in last 20 seconds. + :vartype last_timestamp: str + :ivar timescale: Timescale in which timestamps are expressed. + :vartype timescale: str + :ivar overlap_count: Number of data chunks that had overlapped timestamps in last 20 seconds. + :vartype overlap_count: int + :ivar discontinuity_count: Number of discontinuities detected in the last 20 seconds. + :vartype discontinuity_count: int + :ivar nonincreasing_count: Number of data chunks with timestamps in the past that were received + in last 20 seconds. + :vartype nonincreasing_count: int + :ivar unexpected_bitrate: If expected and actual bitrates differ by more than allowed limit in + last 20 seconds. + :vartype unexpected_bitrate: bool + :ivar state: State of the live event. + :vartype state: str + :ivar healthy: Indicates whether ingest is healthy. + :vartype healthy: bool + :ivar last_fragment_arrival_time: The last timestamp in UTC that a fragment arrived at the + ingest endpoint. + :vartype last_fragment_arrival_time: ~datetime.datetime + :ivar ingest_drift_value: Indicates the speed of delay, in seconds-per-minute, of the incoming + audio or video data during the last minute. The value is greater than zero if data is arriving + to the live event slower than expected in the last minute; zero if data arrived with no delay; + and "n/a" if no audio or video data was received. For example, if you have a contribution + encoder sending in live content, and it is slowing down due to processing issues, or network + latency, it may be only able to deliver a total of 58 seconds of audio or video in a one-minute + period. This would be reported as two seconds-per-minute of drift. If the encoder is able to + catch up and send all 60 seconds or more of data every minute, you will see this value reported + as 0. If there was a disconnection or discontinuity from the encoder, this value may still + display as 0, as it does not account for breaks in the data - only data that is delayed in + timestamps. + :vartype ingest_drift_value: str + :ivar transcription_state: This value is "On" for audio track heartbeats if live transcription + is turned on, otherwise you will see an empty string. This state is only applicable to track + type of "audio" for Live transcription. All other tracks will have an empty value. + :vartype transcription_state: str + :ivar transcription_language: The language code (in BCP-47 format) of the transcription + language. For example, "de-de" indicates German (Germany). The value is empty for the video + track heartbeats, or when live transcription is turned off. + :vartype transcription_language: str + """ + + _attribute_map = { + "track_name": {"key": "trackName", "type": "str"}, + "track_type": {"key": "trackType", "type": "str"}, + "bitrate": {"key": "bitrate", "type": "int"}, + "incoming_bitrate": {"key": "incomingBitrate", "type": "int"}, + "last_timestamp": {"key": "lastTimestamp", "type": "str"}, + "timescale": {"key": "timescale", "type": "str"}, + "overlap_count": {"key": "overlapCount", "type": "int"}, + "discontinuity_count": {"key": "discontinuityCount", "type": "int"}, + "nonincreasing_count": {"key": "nonincreasingCount", "type": "int"}, + "unexpected_bitrate": {"key": "unexpectedBitrate", "type": "bool"}, + "state": {"key": "state", "type": "str"}, + "healthy": {"key": "healthy", "type": "bool"}, + "last_fragment_arrival_time": {"key": "lastFragmentArrivalTime", "type": "iso-8601"}, + "ingest_drift_value": {"key": "ingestDriftValue", "type": "str"}, + "transcription_state": {"key": "transcriptionState", "type": "str"}, + "transcription_language": {"key": "transcriptionLanguage", "type": "str"}, + } + + def __init__( + self, + *, + track_name: Optional[str] = None, + track_type: Optional[Union[str, "_models.LiveEventTrackType"]] = None, + bitrate: Optional[int] = None, + incoming_bitrate: Optional[int] = None, + last_timestamp: Optional[str] = None, + timescale: Optional[str] = None, + overlap_count: Optional[int] = None, + discontinuity_count: Optional[int] = None, + nonincreasing_count: Optional[int] = None, + unexpected_bitrate: Optional[bool] = None, + state: Optional[str] = None, + healthy: Optional[bool] = None, + last_fragment_arrival_time: Optional[datetime.datetime] = None, + ingest_drift_value: Optional[str] = None, + transcription_state: Optional[str] = None, + transcription_language: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword track_name: Name of the track. + :paramtype track_name: str + :keyword track_type: Type of the track. Known values are: "audio" and "video". + :paramtype track_type: str or ~azure.mgmt.media.models.LiveEventTrackType + :keyword bitrate: Bitrate of the track. + :paramtype bitrate: int + :keyword incoming_bitrate: Calculated bitrate based on data chunks coming from encoder. + :paramtype incoming_bitrate: int + :keyword last_timestamp: Latest timestamp received for a track in last 20 seconds. + :paramtype last_timestamp: str + :keyword timescale: Timescale in which timestamps are expressed. + :paramtype timescale: str + :keyword overlap_count: Number of data chunks that had overlapped timestamps in last 20 + seconds. + :paramtype overlap_count: int + :keyword discontinuity_count: Number of discontinuities detected in the last 20 seconds. + :paramtype discontinuity_count: int + :keyword nonincreasing_count: Number of data chunks with timestamps in the past that were + received in last 20 seconds. + :paramtype nonincreasing_count: int + :keyword unexpected_bitrate: If expected and actual bitrates differ by more than allowed limit + in last 20 seconds. + :paramtype unexpected_bitrate: bool + :keyword state: State of the live event. + :paramtype state: str + :keyword healthy: Indicates whether ingest is healthy. + :paramtype healthy: bool + :keyword last_fragment_arrival_time: The last timestamp in UTC that a fragment arrived at the + ingest endpoint. + :paramtype last_fragment_arrival_time: ~datetime.datetime + :keyword ingest_drift_value: Indicates the speed of delay, in seconds-per-minute, of the + incoming audio or video data during the last minute. The value is greater than zero if data is + arriving to the live event slower than expected in the last minute; zero if data arrived with + no delay; and "n/a" if no audio or video data was received. For example, if you have a + contribution encoder sending in live content, and it is slowing down due to processing issues, + or network latency, it may be only able to deliver a total of 58 seconds of audio or video in a + one-minute period. This would be reported as two seconds-per-minute of drift. If the encoder is + able to catch up and send all 60 seconds or more of data every minute, you will see this value + reported as 0. If there was a disconnection or discontinuity from the encoder, this value may + still display as 0, as it does not account for breaks in the data - only data that is delayed + in timestamps. + :paramtype ingest_drift_value: str + :keyword transcription_state: This value is "On" for audio track heartbeats if live + transcription is turned on, otherwise you will see an empty string. This state is only + applicable to track type of "audio" for Live transcription. All other tracks will have an empty + value. + :paramtype transcription_state: str + :keyword transcription_language: The language code (in BCP-47 format) of the transcription + language. For example, "de-de" indicates German (Germany). The value is empty for the video + track heartbeats, or when live transcription is turned off. + :paramtype transcription_language: str + """ + super().__init__(**kwargs) + self.track_name = track_name + self.track_type = track_type + self.bitrate = bitrate + self.incoming_bitrate = incoming_bitrate + self.last_timestamp = last_timestamp + self.timescale = timescale + self.overlap_count = overlap_count + self.discontinuity_count = discontinuity_count + self.nonincreasing_count = nonincreasing_count + self.unexpected_bitrate = unexpected_bitrate + self.state = state + self.healthy = healthy + self.last_fragment_arrival_time = last_fragment_arrival_time + self.ingest_drift_value = ingest_drift_value + self.transcription_state = transcription_state + self.transcription_language = transcription_language + + +class LiveEventTrackStatus(_serialization.Model): + """The live event track status. + + :ivar track_id: Track Id. + :vartype track_id: str + :ivar expected_bitrate: Expected bitrate for this track. + :vartype expected_bitrate: int + :ivar incoming_bitrate: Average incoming bitrate for last 20 seconds when live event is + running. + :vartype incoming_bitrate: int + :ivar ingest_drift: Current ingest drift value in seconds for last 1 minute. + :vartype ingest_drift: str + :ivar request_received: Total number of timed metadata request received. + :vartype request_received: int + :ivar request_succeeded: Total number of successful timed metadata request received. + :vartype request_succeeded: int + """ + + _attribute_map = { + "track_id": {"key": "trackId", "type": "str"}, + "expected_bitrate": {"key": "expectedBitrate", "type": "int"}, + "incoming_bitrate": {"key": "incomingBitrate", "type": "int"}, + "ingest_drift": {"key": "ingestDrift", "type": "str"}, + "request_received": {"key": "requestReceived", "type": "int"}, + "request_succeeded": {"key": "requestSucceeded", "type": "int"}, + } + + def __init__( + self, + *, + track_id: Optional[str] = None, + expected_bitrate: Optional[int] = None, + incoming_bitrate: Optional[int] = None, + ingest_drift: Optional[str] = None, + request_received: Optional[int] = None, + request_succeeded: Optional[int] = None, + **kwargs: Any + ) -> None: + """ + :keyword track_id: Track Id. + :paramtype track_id: str + :keyword expected_bitrate: Expected bitrate for this track. + :paramtype expected_bitrate: int + :keyword incoming_bitrate: Average incoming bitrate for last 20 seconds when live event is + running. + :paramtype incoming_bitrate: int + :keyword ingest_drift: Current ingest drift value in seconds for last 1 minute. + :paramtype ingest_drift: str + :keyword request_received: Total number of timed metadata request received. + :paramtype request_received: int + :keyword request_succeeded: Total number of successful timed metadata request received. + :paramtype request_succeeded: int + """ + super().__init__(**kwargs) + self.track_id = track_id + self.expected_bitrate = expected_bitrate + self.incoming_bitrate = incoming_bitrate + self.ingest_drift = ingest_drift + self.request_received = request_received + self.request_succeeded = request_succeeded + + class LiveEventTranscription(_serialization.Model): - """Describes the transcription tracks in the output of a live event, generated using speech-to-text transcription. This property is reserved for future use, any value set on this property will be ignored. + """Describes the transcription tracks in the output of a live event, generated using + speech-to-text transcription. This property is reserved for future use, any value set on this + property will be ignored. :ivar language: Specifies the language (locale) to be used for speech-to-text transcription – it should match the spoken language in the audio track. The value should be in BCP-47 format @@ -7456,8 +8355,8 @@ def __init__( language: Optional[str] = None, input_track_selection: Optional[List["_models.LiveEventInputTrackSelection"]] = None, output_transcription_track: Optional["_models.LiveEventOutputTranscriptionTrack"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword language: Specifies the language (locale) to be used for speech-to-text transcription – it should match the spoken language in the audio track. The value should be in BCP-47 format @@ -7568,8 +8467,8 @@ def __init__( manifest_name: Optional[str] = None, hls: Optional["_models.Hls"] = None, output_snap_time: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword description: The description of the live output. :paramtype description: str @@ -7634,8 +8533,8 @@ def __init__( value: Optional[List["_models.LiveOutput"]] = None, odata_count: Optional[int] = None, odata_next_link: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword value: The result of the List LiveOutput operation. :paramtype value: list[~azure.mgmt.media.models.LiveOutput] @@ -7676,7 +8575,7 @@ class LogSpecification(_serialization.Model): "blob_duration": {"key": "blobDuration", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -7726,6 +8625,10 @@ class MediaService(TrackedResource): # pylint: disable=too-many-instance-attrib :ivar private_endpoint_connections: The Private Endpoint Connections created for the Media Service account. :vartype private_endpoint_connections: list[~azure.mgmt.media.models.PrivateEndpointConnection] + :ivar minimum_tls_version: The minimum TLS version allowed for this account's requests. This is + an optional property. If unspecified, a secure default value will be used. Known values are: + "Tls10", "Tls11", "Tls12", and "Tls13". + :vartype minimum_tls_version: str or ~azure.mgmt.media.models.MinimumTlsVersion """ _validation = { @@ -7758,6 +8661,7 @@ class MediaService(TrackedResource): # pylint: disable=too-many-instance-attrib "key": "properties.privateEndpointConnections", "type": "[PrivateEndpointConnection]", }, + "minimum_tls_version": {"key": "properties.minimumTlsVersion", "type": "str"}, } def __init__( @@ -7771,8 +8675,9 @@ def __init__( encryption: Optional["_models.AccountEncryption"] = None, key_delivery: Optional["_models.KeyDelivery"] = None, public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, - **kwargs - ): + minimum_tls_version: Union[str, "_models.MinimumTlsVersion"] = "Tls12", + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -7791,6 +8696,10 @@ def __init__( :keyword public_network_access: Whether or not public network access is allowed for resources under the Media Services account. Known values are: "Enabled" and "Disabled". :paramtype public_network_access: str or ~azure.mgmt.media.models.PublicNetworkAccess + :keyword minimum_tls_version: The minimum TLS version allowed for this account's requests. This + is an optional property. If unspecified, a secure default value will be used. Known values are: + "Tls10", "Tls11", "Tls12", and "Tls13". + :paramtype minimum_tls_version: str or ~azure.mgmt.media.models.MinimumTlsVersion """ super().__init__(tags=tags, location=location, **kwargs) self.system_data = None @@ -7803,6 +8712,7 @@ def __init__( self.public_network_access = public_network_access self.provisioning_state = None self.private_endpoint_connections = None + self.minimum_tls_version = minimum_tls_version class MediaServiceCollection(_serialization.Model): @@ -7821,8 +8731,12 @@ class MediaServiceCollection(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.MediaService"]] = None, odata_next_link: Optional[str] = None, **kwargs - ): + self, + *, + value: Optional[List["_models.MediaService"]] = None, + odata_next_link: Optional[str] = None, + **kwargs: Any + ) -> None: """ :keyword value: A collection of MediaService items. :paramtype value: list[~azure.mgmt.media.models.MediaService] @@ -7871,8 +8785,8 @@ def __init__( *, type: str, user_assigned_identities: Optional[Dict[str, "_models.UserAssignedManagedIdentity"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: The identity type. Required. :paramtype type: str @@ -7929,8 +8843,8 @@ def __init__( start_time: Optional[datetime.datetime] = None, end_time: Optional[datetime.datetime] = None, error: Optional["_models.ErrorDetail"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Operation identifier. Required. :paramtype name: str @@ -7954,7 +8868,7 @@ def __init__( self.error = error -class MediaServiceUpdate(_serialization.Model): +class MediaServiceUpdate(_serialization.Model): # pylint: disable=too-many-instance-attributes """A Media Services account update. Variables are only populated by the server, and will be ignored when sending a request. @@ -7982,6 +8896,10 @@ class MediaServiceUpdate(_serialization.Model): :ivar private_endpoint_connections: The Private Endpoint Connections created for the Media Service account. :vartype private_endpoint_connections: list[~azure.mgmt.media.models.PrivateEndpointConnection] + :ivar minimum_tls_version: The minimum TLS version allowed for this account's requests. This is + an optional property. If unspecified, a secure default value will be used. Known values are: + "Tls10", "Tls11", "Tls12", and "Tls13". + :vartype minimum_tls_version: str or ~azure.mgmt.media.models.MinimumTlsVersion """ _validation = { @@ -8004,6 +8922,7 @@ class MediaServiceUpdate(_serialization.Model): "key": "properties.privateEndpointConnections", "type": "[PrivateEndpointConnection]", }, + "minimum_tls_version": {"key": "properties.minimumTlsVersion", "type": "str"}, } def __init__( @@ -8016,8 +8935,9 @@ def __init__( encryption: Optional["_models.AccountEncryption"] = None, key_delivery: Optional["_models.KeyDelivery"] = None, public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, - **kwargs - ): + minimum_tls_version: Union[str, "_models.MinimumTlsVersion"] = "Tls12", + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -8034,6 +8954,10 @@ def __init__( :keyword public_network_access: Whether or not public network access is allowed for resources under the Media Services account. Known values are: "Enabled" and "Disabled". :paramtype public_network_access: str or ~azure.mgmt.media.models.PublicNetworkAccess + :keyword minimum_tls_version: The minimum TLS version allowed for this account's requests. This + is an optional property. If unspecified, a secure default value will be used. Known values are: + "Tls10", "Tls11", "Tls12", and "Tls13". + :paramtype minimum_tls_version: str or ~azure.mgmt.media.models.MinimumTlsVersion """ super().__init__(**kwargs) self.tags = tags @@ -8046,6 +8970,7 @@ def __init__( self.public_network_access = public_network_access self.provisioning_state = None self.private_endpoint_connections = None + self.minimum_tls_version = minimum_tls_version class MetricDimension(_serialization.Model): @@ -8073,7 +8998,7 @@ class MetricDimension(_serialization.Model): "to_be_exported_for_shoebox": {"key": "toBeExportedForShoebox", "type": "bool"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -8143,7 +9068,7 @@ class MetricSpecification(_serialization.Model): # pylint: disable=too-many-ins "supported_time_grain_types": {"key": "supportedTimeGrainTypes", "type": "[str]"}, } - def __init__(self, *, supported_aggregation_types: Optional[List[str]] = None, **kwargs): + def __init__(self, *, supported_aggregation_types: Optional[List[str]] = None, **kwargs: Any) -> None: """ :keyword supported_aggregation_types: Supported aggregation types. :paramtype supported_aggregation_types: list[str] @@ -8164,7 +9089,10 @@ def __init__(self, *, supported_aggregation_types: Optional[List[str]] = None, * class MultiBitrateFormat(Format): - """Describes the properties for producing a collection of GOP aligned multi-bitrate files. The default behavior is to produce one output file for each video layer which is muxed together with all the audios. The exact output files produced can be controlled by specifying the outputFiles collection. + """Describes the properties for producing a collection of GOP aligned multi-bitrate files. The + default behavior is to produce one output file for each video layer which is muxed together + with all the audios. The exact output files produced can be controlled by specifying the + outputFiles collection. You probably want to use the sub-classes and not this class directly. Known sub-classes are: Mp4Format, TransportStreamFormat @@ -8208,7 +9136,9 @@ class MultiBitrateFormat(Format): } } - def __init__(self, *, filename_pattern: str, output_files: Optional[List["_models.OutputFile"]] = None, **kwargs): + def __init__( + self, *, filename_pattern: str, output_files: Optional[List["_models.OutputFile"]] = None, **kwargs: Any + ) -> None: """ :keyword filename_pattern: The file naming pattern used for the creation of output files. The following macros are supported in the file name: {Basename} - An expansion macro that will use @@ -8266,7 +9196,9 @@ class Mp4Format(MultiBitrateFormat): "output_files": {"key": "outputFiles", "type": "[OutputFile]"}, } - def __init__(self, *, filename_pattern: str, output_files: Optional[List["_models.OutputFile"]] = None, **kwargs): + def __init__( + self, *, filename_pattern: str, output_files: Optional[List["_models.OutputFile"]] = None, **kwargs: Any + ) -> None: """ :keyword filename_pattern: The file naming pattern used for the creation of output files. The following macros are supported in the file name: {Basename} - An expansion macro that will use @@ -8299,7 +9231,7 @@ class NoEncryption(_serialization.Model): "enabled_protocols": {"key": "enabledProtocols", "type": "EnabledProtocols"}, } - def __init__(self, *, enabled_protocols: Optional["_models.EnabledProtocols"] = None, **kwargs): + def __init__(self, *, enabled_protocols: Optional["_models.EnabledProtocols"] = None, **kwargs: Any) -> None: """ :keyword enabled_protocols: Representing supported protocols. :paramtype enabled_protocols: ~azure.mgmt.media.models.EnabledProtocols @@ -8349,8 +9281,8 @@ def __init__( properties: Optional["_models.Properties"] = None, is_data_action: Optional[bool] = None, action_type: Optional[Union[str, "_models.ActionType"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The operation name. Required. :paramtype name: str @@ -8385,7 +9317,7 @@ class OperationCollection(_serialization.Model): "value": {"key": "value", "type": "[Operation]"}, } - def __init__(self, *, value: Optional[List["_models.Operation"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.Operation"]] = None, **kwargs: Any) -> None: """ :keyword value: A collection of Operation items. :paramtype value: list[~azure.mgmt.media.models.Operation] @@ -8421,8 +9353,8 @@ def __init__( resource: Optional[str] = None, operation: Optional[str] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword provider: The service provider. :paramtype provider: str @@ -8461,7 +9393,7 @@ class OutputFile(_serialization.Model): "labels": {"key": "labels", "type": "[str]"}, } - def __init__(self, *, labels: List[str], **kwargs): + def __init__(self, *, labels: List[str], **kwargs: Any) -> None: """ :keyword labels: The list of labels that describe how the encoder should multiplex video and audio into an output file. For example, if the encoder is producing two video layers with @@ -8505,7 +9437,7 @@ class PngFormat(ImageFormat): "filename_pattern": {"key": "filenamePattern", "type": "str"}, } - def __init__(self, *, filename_pattern: str, **kwargs): + def __init__(self, *, filename_pattern: str, **kwargs: Any) -> None: """ :keyword filename_pattern: The file naming pattern used for the creation of output files. The following macros are supported in the file name: {Basename} - An expansion macro that will use @@ -8603,8 +9535,8 @@ def __init__( step: Optional[str] = None, range: Optional[str] = None, layers: Optional[List["_models.PngLayer"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword label: An optional label for the codec. The label can be used to control muxing behavior. @@ -8688,8 +9620,8 @@ class PngLayer(Layer): } def __init__( - self, *, width: Optional[str] = None, height: Optional[str] = None, label: Optional[str] = None, **kwargs - ): + self, *, width: Optional[str] = None, height: Optional[str] = None, label: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword width: The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many @@ -8741,8 +9673,8 @@ def __init__( live_backoff_duration: Optional[int] = None, timescale: Optional[int] = None, force_end_timestamp: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword start_timestamp: The absolute start time boundary. :paramtype start_timestamp: int @@ -8822,8 +9754,8 @@ def __init__( max_layers: Optional[int] = None, min_bitrate_bps: Optional[int] = None, min_height: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword complexity: Allows you to configure the encoder settings to control the balance between speed and quality. Example: set Complexity as Speed for faster encoding but less @@ -8883,7 +9815,7 @@ class PrivateEndpoint(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -8938,8 +9870,8 @@ def __init__( *, private_endpoint: Optional["_models.PrivateEndpoint"] = None, private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword private_endpoint: The resource of private end point. :paramtype private_endpoint: ~azure.mgmt.media.models.PrivateEndpoint @@ -8965,7 +9897,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: """ :keyword value: Array of private endpoint connections. :paramtype value: list[~azure.mgmt.media.models.PrivateEndpointConnection] @@ -9012,7 +9944,7 @@ class PrivateLinkResource(Resource): "required_zone_names": {"key": "properties.requiredZoneNames", "type": "[str]"}, } - def __init__(self, *, required_zone_names: Optional[List[str]] = None, **kwargs): + def __init__(self, *, required_zone_names: Optional[List[str]] = None, **kwargs: Any) -> None: """ :keyword required_zone_names: The private link resource Private link DNS zone name. :paramtype required_zone_names: list[str] @@ -9034,7 +9966,7 @@ class PrivateLinkResourceListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: """ :keyword value: Array of private link resources. :paramtype value: list[~azure.mgmt.media.models.PrivateLinkResource] @@ -9044,7 +9976,8 @@ def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = Non class PrivateLinkServiceConnectionState(_serialization.Model): - """A collection of information about the state of the connection between service consumer and provider. + """A collection of information about the state of the connection between service consumer and + provider. :ivar status: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Known values are: "Pending", "Approved", and "Rejected". @@ -9068,8 +10001,8 @@ def __init__( status: Optional[Union[str, "_models.PrivateEndpointServiceConnectionStatus"]] = None, description: Optional[str] = None, actions_required: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword status: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Known values are: "Pending", "Approved", and "Rejected". @@ -9103,14 +10036,15 @@ class Properties(_serialization.Model): "service_specification": {"key": "serviceSpecification", "type": "ServiceSpecification"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.service_specification = None class Rectangle(_serialization.Model): - """Describes the properties of a rectangular window applied to the input media before processing it. + """Describes the properties of a rectangular window applied to the input media before processing + it. :ivar left: The number of pixels from the left-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%). @@ -9140,8 +10074,8 @@ def __init__( top: Optional[str] = None, width: Optional[str] = None, height: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword left: The number of pixels from the left-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%). @@ -9185,7 +10119,9 @@ class ResourceIdentity(_serialization.Model): "use_system_assigned_identity": {"key": "useSystemAssignedIdentity", "type": "bool"}, } - def __init__(self, *, use_system_assigned_identity: bool, user_assigned_identity: Optional[str] = None, **kwargs): + def __init__( + self, *, use_system_assigned_identity: bool, user_assigned_identity: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword user_assigned_identity: The user assigned managed identity's ARM ID to use when accessing a resource. @@ -9243,8 +10179,8 @@ def __init__( filter: Union[str, "_models.AttributeFilter"], # pylint: disable=redefined-builtin channel_mapping: Optional[Union[str, "_models.ChannelMapping"]] = None, filter_value: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword channel_mapping: Optional designation for single channel audio tracks. Can be used to combine the tracks into stereo or multi-channel audio tracks. Known values are: "FrontLeft", @@ -9296,8 +10232,8 @@ class SelectAudioTrackById(AudioTrackDescriptor): } def __init__( - self, *, track_id: int, channel_mapping: Optional[Union[str, "_models.ChannelMapping"]] = None, **kwargs - ): + self, *, track_id: int, channel_mapping: Optional[Union[str, "_models.ChannelMapping"]] = None, **kwargs: Any + ) -> None: """ :keyword channel_mapping: Optional designation for single channel audio tracks. Can be used to combine the tracks into stereo or multi-channel audio tracks. Known values are: "FrontLeft", @@ -9339,7 +10275,7 @@ class VideoTrackDescriptor(TrackDescriptor): } } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.odata_type: str = "#Microsoft.Media.VideoTrackDescriptor" @@ -9384,8 +10320,8 @@ def __init__( attribute: Union[str, "_models.TrackAttribute"], filter: Union[str, "_models.AttributeFilter"], # pylint: disable=redefined-builtin filter_value: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword attribute: The TrackAttribute to filter the tracks by. Required. Known values are: "Bitrate" and "Language". @@ -9427,7 +10363,7 @@ class SelectVideoTrackById(VideoTrackDescriptor): "track_id": {"key": "trackId", "type": "int"}, } - def __init__(self, *, track_id: int, **kwargs): + def __init__(self, *, track_id: int, **kwargs: Any) -> None: """ :keyword track_id: Track identifier to select. Required. :paramtype track_id: int @@ -9458,7 +10394,7 @@ class ServiceSpecification(_serialization.Model): "metric_specifications": {"key": "metricSpecifications", "type": "[MetricSpecification]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.log_specifications = None @@ -9505,8 +10441,8 @@ def __init__( formats: List["_models.Format"], experimental_options: Optional[Dict[str, str]] = None, filters: Optional["_models.Filters"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword experimental_options: Dictionary containing key value pairs for parameters not exposed in the preset itself. @@ -9566,8 +10502,8 @@ def __init__( type: Union[str, "_models.StorageAccountType"], id: Optional[str] = None, # pylint: disable=redefined-builtin identity: Optional["_models.ResourceIdentity"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: The ID of the storage account resource. Media Services relies on tables and queues as well as blobs, so the primary storage account must be a Standard Storage account (either @@ -9610,8 +10546,8 @@ def __init__( *, key: Optional[bytes] = None, asset_file_encryption_metadata: Optional[List["_models.AssetFileEncryptionMetadata"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword key: The Asset File storage encryption key. :paramtype key: bytes @@ -9738,8 +10674,8 @@ def __init__( cdn_provider: Optional[str] = None, cdn_profile: Optional[str] = None, cross_site_access_policies: Optional["_models.CrossSiteAccessPolicies"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -9809,8 +10745,8 @@ def __init__( *, akamai: Optional["_models.AkamaiAccessControl"] = None, ip: Optional["_models.IPAccessControl"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword akamai: The access control of Akamai. :paramtype akamai: ~azure.mgmt.media.models.AkamaiAccessControl @@ -9846,8 +10782,8 @@ def __init__( value: Optional[List["_models.StreamingEndpoint"]] = None, odata_count: Optional[int] = None, odata_next_link: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword value: The result of the List StreamingEndpoint operation. :paramtype value: list[~azure.mgmt.media.models.StreamingEndpoint] @@ -9874,7 +10810,7 @@ class StreamingEndpointSkuInfoListResult(_serialization.Model): "value": {"key": "value", "type": "[ArmStreamingEndpointSkuInfo]"}, } - def __init__(self, *, value: Optional[List["_models.ArmStreamingEndpointSkuInfo"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ArmStreamingEndpointSkuInfo"]] = None, **kwargs: Any) -> None: """ :keyword value: The result of the List StreamingEndpoint skus. :paramtype value: list[~azure.mgmt.media.models.ArmStreamingEndpointSkuInfo] @@ -9894,7 +10830,7 @@ class StreamingEntityScaleUnit(_serialization.Model): "scale_unit": {"key": "scaleUnit", "type": "int"}, } - def __init__(self, *, scale_unit: Optional[int] = None, **kwargs): + def __init__(self, *, scale_unit: Optional[int] = None, **kwargs: Any) -> None: """ :keyword scale_unit: The scale unit number of the streaming endpoint. :paramtype scale_unit: int @@ -9982,8 +10918,8 @@ def __init__( content_keys: Optional[List["_models.StreamingLocatorContentKey"]] = None, alternative_media_id: Optional[str] = None, filters: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword asset_name: Asset Name. :paramtype asset_name: str @@ -10043,8 +10979,8 @@ def __init__( *, value: Optional[List["_models.StreamingLocator"]] = None, odata_next_link: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword value: A collection of StreamingLocator items. :paramtype value: list[~azure.mgmt.media.models.StreamingLocator] @@ -10102,8 +11038,8 @@ def __init__( id: str, # pylint: disable=redefined-builtin label_reference_in_streaming_policy: Optional[str] = None, value: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: ID of Content Key. Required. :paramtype id: str @@ -10154,8 +11090,8 @@ def __init__( streaming_protocol: Union[str, "_models.StreamingPolicyStreamingProtocol"], encryption_scheme: Union[str, "_models.EncryptionScheme"], paths: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword streaming_protocol: Streaming protocol. Required. Known values are: "Hls", "Dash", "SmoothStreaming", and "Download". @@ -10230,8 +11166,8 @@ def __init__( common_encryption_cenc: Optional["_models.CommonEncryptionCenc"] = None, common_encryption_cbcs: Optional["_models.CommonEncryptionCbcs"] = None, no_encryption: Optional["_models.NoEncryption"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default_content_key_policy_name: Default ContentKey used by current Streaming Policy. :paramtype default_content_key_policy_name: str @@ -10274,8 +11210,8 @@ def __init__( *, value: Optional[List["_models.StreamingPolicy"]] = None, odata_next_link: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword value: A collection of StreamingPolicy items. :paramtype value: list[~azure.mgmt.media.models.StreamingPolicy] @@ -10311,8 +11247,8 @@ def __init__( label: Optional[str] = None, policy_name: Optional[str] = None, tracks: Optional[List["_models.TrackSelection"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword label: Label can be used to specify Content Key when creating a Streaming Locator. :paramtype label: str @@ -10346,8 +11282,8 @@ def __init__( *, default_key: Optional["_models.DefaultKey"] = None, key_to_track_mappings: Optional[List["_models.StreamingPolicyContentKey"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword default_key: Default content key for an encryption scheme. :paramtype default_key: ~azure.mgmt.media.models.DefaultKey @@ -10386,8 +11322,12 @@ class StreamingPolicyFairPlayConfiguration(_serialization.Model): } def __init__( - self, *, allow_persistent_license: bool, custom_license_acquisition_url_template: Optional[str] = None, **kwargs - ): + self, + *, + allow_persistent_license: bool, + custom_license_acquisition_url_template: Optional[str] = None, + **kwargs: Any + ) -> None: """ :keyword custom_license_acquisition_url_template: Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media Services for @@ -10430,8 +11370,8 @@ def __init__( *, custom_license_acquisition_url_template: Optional[str] = None, play_ready_custom_attributes: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword custom_license_acquisition_url_template: Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media Services for @@ -10466,7 +11406,7 @@ class StreamingPolicyWidevineConfiguration(_serialization.Model): "custom_license_acquisition_url_template": {"key": "customLicenseAcquisitionUrlTemplate", "type": "str"}, } - def __init__(self, *, custom_license_acquisition_url_template: Optional[str] = None, **kwargs): + def __init__(self, *, custom_license_acquisition_url_template: Optional[str] = None, **kwargs: Any) -> None: """ :keyword custom_license_acquisition_url_template: Template for the URL of the custom service delivering licenses to end user players. Not required when using Azure Media Services for @@ -10492,7 +11432,7 @@ class SyncStorageKeysInput(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The ID of the storage account resource. :paramtype id: str @@ -10538,8 +11478,8 @@ def __init__( last_modified_by: Optional[str] = None, last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword created_by: The identity that created the resource. :paramtype created_by: str @@ -10566,7 +11506,8 @@ def __init__( class TextTrack(TrackBase): - """Represents a text track in an asset. A text track is usually used for sparse data related to the audio or video tracks. + """Represents a text track in an asset. A text track is usually used for sparse data related to + the audio or video tracks. Variables are only populated by the server, and will be ignored when sending a request. @@ -10612,8 +11553,8 @@ def __init__( display_name: Optional[str] = None, player_visibility: Optional[Union[str, "_models.Visibility"]] = None, hls_settings: Optional["_models.HlsSettings"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword file_name: The file name to the source file. This file is located in the storage container of the asset. @@ -10666,11 +11607,11 @@ class TrackPropertyCondition(_serialization.Model): def __init__( self, *, - property: Union[str, "_models.TrackPropertyType"], + property: Union[str, "_models.TrackPropertyType"], # pylint: disable=redefined-builtin operation: Union[str, "_models.TrackPropertyCompareOperation"], value: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword property: Track property type. Required. Known values are: "Unknown" and "FourCC". :paramtype property: str or ~azure.mgmt.media.models.TrackPropertyType @@ -10698,7 +11639,9 @@ class TrackSelection(_serialization.Model): "track_selections": {"key": "trackSelections", "type": "[TrackPropertyCondition]"}, } - def __init__(self, *, track_selections: Optional[List["_models.TrackPropertyCondition"]] = None, **kwargs): + def __init__( + self, *, track_selections: Optional[List["_models.TrackPropertyCondition"]] = None, **kwargs: Any + ) -> None: """ :keyword track_selections: TrackSelections is a track property condition list which can specify track(s). @@ -10709,7 +11652,9 @@ def __init__(self, *, track_selections: Optional[List["_models.TrackPropertyCond class Transform(ProxyResource): - """A Transform encapsulates the rules or instructions for generating desired outputs from input media, such as by transcoding or by extracting insights. After the Transform is created, it can be applied to input media by creating Jobs. + """A Transform encapsulates the rules or instructions for generating desired outputs from input + media, such as by transcoding or by extracting insights. After the Transform is created, it can + be applied to input media by creating Jobs. Variables are only populated by the server, and will be ignored when sending a request. @@ -10756,8 +11701,12 @@ class Transform(ProxyResource): } def __init__( - self, *, description: Optional[str] = None, outputs: Optional[List["_models.TransformOutput"]] = None, **kwargs - ): + self, + *, + description: Optional[str] = None, + outputs: Optional[List["_models.TransformOutput"]] = None, + **kwargs: Any + ) -> None: """ :keyword description: An optional verbose description of the Transform. :paramtype description: str @@ -10788,8 +11737,8 @@ class TransformCollection(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.Transform"]] = None, odata_next_link: Optional[str] = None, **kwargs - ): + self, *, value: Optional[List["_models.Transform"]] = None, odata_next_link: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword value: A collection of Transform items. :paramtype value: list[~azure.mgmt.media.models.Transform] @@ -10803,7 +11752,8 @@ def __init__( class TransformOutput(_serialization.Model): - """Describes the properties of a TransformOutput, which are the rules to be applied while generating the desired output. + """Describes the properties of a TransformOutput, which are the rules to be applied while + generating the desired output. All required parameters must be populated in order to send to Azure. @@ -10838,8 +11788,8 @@ def __init__( preset: "_models.Preset", on_error: Optional[Union[str, "_models.OnErrorType"]] = None, relative_priority: Optional[Union[str, "_models.Priority"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword on_error: A Transform can define more than one outputs. This property defines what the service should do when one output fails - either continue to produce other outputs, or, stop @@ -10862,7 +11812,8 @@ def __init__( class TransportStreamFormat(MultiBitrateFormat): - """Describes the properties for generating an MPEG-2 Transport Stream (ISO/IEC 13818-1) output video file(s). + """Describes the properties for generating an MPEG-2 Transport Stream (ISO/IEC 13818-1) output + video file(s). All required parameters must be populated in order to send to Azure. @@ -10896,7 +11847,9 @@ class TransportStreamFormat(MultiBitrateFormat): "output_files": {"key": "outputFiles", "type": "[OutputFile]"}, } - def __init__(self, *, filename_pattern: str, output_files: Optional[List["_models.OutputFile"]] = None, **kwargs): + def __init__( + self, *, filename_pattern: str, output_files: Optional[List["_models.OutputFile"]] = None, **kwargs: Any + ) -> None: """ :keyword filename_pattern: The file naming pattern used for the creation of output files. The following macros are supported in the file name: {Basename} - An expansion macro that will use @@ -10939,7 +11892,7 @@ class UserAssignedManagedIdentity(_serialization.Model): "principal_id": {"key": "principalId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.client_id = None @@ -10947,7 +11900,8 @@ def __init__(self, **kwargs): class UtcClipTime(ClipTime): - """Specifies the clip time as a Utc time position in the media file. The Utc time can point to a different position depending on whether the media file starts from a timestamp of zero or not. + """Specifies the clip time as a Utc time position in the media file. The Utc time can point to a + different position depending on whether the media file starts from a timestamp of zero or not. All required parameters must be populated in order to send to Azure. @@ -10967,7 +11921,7 @@ class UtcClipTime(ClipTime): "time": {"key": "time", "type": "iso-8601"}, } - def __init__(self, *, time: datetime.datetime, **kwargs): + def __init__(self, *, time: datetime.datetime, **kwargs: Any) -> None: """ :keyword time: The time position on the timeline of the input media based on Utc time. Required. @@ -10979,7 +11933,8 @@ def __init__(self, *, time: datetime.datetime, **kwargs): class VideoAnalyzerPreset(AudioAnalyzerPreset): - """A video analyzer preset that extracts insights (rich metadata) from both audio and video, and outputs a JSON format file. + """A video analyzer preset that extracts insights (rich metadata) from both audio and video, and + outputs a JSON format file. All required parameters must be populated in order to send to Azure. @@ -11033,8 +11988,8 @@ def __init__( mode: Optional[Union[str, "_models.AudioAnalysisMode"]] = None, experimental_options: Optional[Dict[str, str]] = None, insights_to_extract: Optional[Union[str, "_models.InsightsType"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword audio_language: The language for the audio payload in the input using the BCP-47 format of 'language tag-region' (e.g: 'en-US'). If you know the language of your content, it @@ -11144,8 +12099,8 @@ def __init__( position: Optional["_models.Rectangle"] = None, opacity: Optional[float] = None, crop_rectangle: Optional["_models.Rectangle"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword input_label: The label of the job input which is to be used as an overlay. The Input must specify exactly one file. You can specify an image file in JPG, PNG, GIF or BMP format, or @@ -11217,7 +12172,7 @@ class VideoTrack(TrackBase): "odata_type": {"key": "@odata\\.type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.odata_type: str = "#Microsoft.Media.VideoTrack" diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_account_filters_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_account_filters_operations.py index 19affc4f7a1d..87ad7d968125 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_account_filters_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_account_filters_operations.py @@ -44,7 +44,7 @@ def build_list_request(resource_group_name: str, account_name: str, subscription _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -75,7 +75,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -107,7 +107,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -142,7 +142,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -174,7 +174,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -241,7 +241,7 @@ def list(self, resource_group_name: str, account_name: str, **kwargs: Any) -> It _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.AccountFilterCollection] = kwargs.pop("cls", None) error_map = { @@ -284,8 +284,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -333,7 +334,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.AccountFilter] = kwargs.pop("cls", None) request = build_get_request( @@ -349,8 +350,9 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -457,7 +459,8 @@ def create_or_update( :type account_name: str :param filter_name: The Account Filter name. Required. :type filter_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a AccountFilter type or a IO type. + Required. :type parameters: ~azure.mgmt.media.models.AccountFilter or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -478,7 +481,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AccountFilter] = kwargs.pop("cls", None) @@ -506,8 +509,9 @@ def create_or_update( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -563,7 +567,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -579,8 +583,9 @@ def delete( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -683,7 +688,8 @@ def update( :type account_name: str :param filter_name: The Account Filter name. Required. :type filter_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a AccountFilter type or a IO type. + Required. :type parameters: ~azure.mgmt.media.models.AccountFilter or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -704,7 +710,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AccountFilter] = kwargs.pop("cls", None) @@ -732,8 +738,9 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_asset_filters_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_asset_filters_operations.py index 379bfbc85942..8d98e7f8cd5e 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_asset_filters_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_asset_filters_operations.py @@ -46,7 +46,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -78,7 +78,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -111,7 +111,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -147,7 +147,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -180,7 +180,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -252,7 +252,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.AssetFilterCollection] = kwargs.pop("cls", None) error_map = { @@ -296,8 +296,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -347,7 +348,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.AssetFilter] = kwargs.pop("cls", None) request = build_get_request( @@ -364,8 +365,9 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -481,7 +483,7 @@ def create_or_update( :type asset_name: str :param filter_name: The Asset Filter name. Required. :type filter_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a AssetFilter type or a IO type. Required. :type parameters: ~azure.mgmt.media.models.AssetFilter or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -502,7 +504,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AssetFilter] = kwargs.pop("cls", None) @@ -531,8 +533,9 @@ def create_or_update( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -590,7 +593,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -607,8 +610,9 @@ def delete( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -720,7 +724,7 @@ def update( :type asset_name: str :param filter_name: The Asset Filter name. Required. :type filter_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a AssetFilter type or a IO type. Required. :type parameters: ~azure.mgmt.media.models.AssetFilter or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -741,7 +745,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AssetFilter] = kwargs.pop("cls", None) @@ -770,8 +774,9 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_assets_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_assets_operations.py index aa9df731ac14..6edebed3d704 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_assets_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_assets_operations.py @@ -53,7 +53,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -90,7 +90,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -122,7 +122,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -157,7 +157,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -189,7 +189,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -224,7 +224,7 @@ def build_list_container_sas_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -259,7 +259,7 @@ def build_get_encryption_key_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -291,7 +291,7 @@ def build_list_streaming_locators_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -372,7 +372,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.AssetCollection] = kwargs.pop("cls", None) error_map = { @@ -418,8 +418,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -465,7 +466,7 @@ def get(self, resource_group_name: str, account_name: str, asset_name: str, **kw _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.Asset] = kwargs.pop("cls", None) request = build_get_request( @@ -481,8 +482,9 @@ def get(self, resource_group_name: str, account_name: str, asset_name: str, **kw request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -589,7 +591,7 @@ def create_or_update( :type account_name: str :param asset_name: The Asset name. Required. :type asset_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a Asset type or a IO type. Required. :type parameters: ~azure.mgmt.media.models.Asset or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -610,7 +612,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Asset] = kwargs.pop("cls", None) @@ -638,8 +640,9 @@ def create_or_update( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -695,7 +698,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -711,8 +714,9 @@ def delete( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -815,7 +819,7 @@ def update( :type account_name: str :param asset_name: The Asset name. Required. :type asset_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a Asset type or a IO type. Required. :type parameters: ~azure.mgmt.media.models.Asset or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -836,7 +840,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Asset] = kwargs.pop("cls", None) @@ -864,8 +868,9 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -975,7 +980,8 @@ def list_container_sas( :type account_name: str :param asset_name: The Asset name. Required. :type asset_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a ListContainerSasInput type or a IO type. + Required. :type parameters: ~azure.mgmt.media.models.ListContainerSasInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -996,7 +1002,7 @@ def list_container_sas( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AssetContainerSas] = kwargs.pop("cls", None) @@ -1024,8 +1030,9 @@ def list_container_sas( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1078,7 +1085,7 @@ def get_encryption_key( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.StorageEncryptedAssetDecryptionData] = kwargs.pop("cls", None) request = build_get_encryption_key_request( @@ -1094,8 +1101,9 @@ def get_encryption_key( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1147,7 +1155,7 @@ def list_streaming_locators( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.ListStreamingLocatorsResponse] = kwargs.pop("cls", None) request = build_list_streaming_locators_request( @@ -1163,8 +1171,9 @@ def list_streaming_locators( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_content_key_policies_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_content_key_policies_operations.py index 45469f4e22d9..47fc13b1baf5 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_content_key_policies_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_content_key_policies_operations.py @@ -53,7 +53,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -90,7 +90,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -122,7 +122,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -157,7 +157,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -189,7 +189,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -224,7 +224,7 @@ def build_get_policy_properties_with_secrets_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -305,7 +305,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.ContentKeyPolicyCollection] = kwargs.pop("cls", None) error_map = { @@ -351,8 +351,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -400,7 +401,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.ContentKeyPolicy] = kwargs.pop("cls", None) request = build_get_request( @@ -416,8 +417,9 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -524,7 +526,8 @@ def create_or_update( :type account_name: str :param content_key_policy_name: The Content Key Policy name. Required. :type content_key_policy_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a ContentKeyPolicy type or a IO type. + Required. :type parameters: ~azure.mgmt.media.models.ContentKeyPolicy or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -545,7 +548,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ContentKeyPolicy] = kwargs.pop("cls", None) @@ -573,8 +576,9 @@ def create_or_update( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -630,7 +634,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -646,8 +650,9 @@ def delete( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -750,7 +755,8 @@ def update( :type account_name: str :param content_key_policy_name: The Content Key Policy name. Required. :type content_key_policy_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a ContentKeyPolicy type or a IO type. + Required. :type parameters: ~azure.mgmt.media.models.ContentKeyPolicy or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -771,7 +777,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ContentKeyPolicy] = kwargs.pop("cls", None) @@ -799,8 +805,9 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -852,7 +859,7 @@ def get_policy_properties_with_secrets( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.ContentKeyPolicyProperties] = kwargs.pop("cls", None) request = build_get_policy_properties_with_secrets_request( @@ -868,8 +875,9 @@ def get_policy_properties_with_secrets( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_jobs_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_jobs_operations.py index 6fc59ecec02d..9230a96e4014 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_jobs_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_jobs_operations.py @@ -353,8 +353,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -421,8 +422,9 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -538,7 +540,7 @@ def create( :type transform_name: str :param job_name: The Job name. Required. :type job_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a Job type or a IO type. Required. :type parameters: ~azure.mgmt.media.models.Job or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -588,8 +590,9 @@ def create( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -660,8 +663,9 @@ def delete( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -779,7 +783,7 @@ def update( :type transform_name: str :param job_name: The Job name. Required. :type job_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a Job type or a IO type. Required. :type parameters: ~azure.mgmt.media.models.Job or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -829,8 +833,9 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -901,8 +906,9 @@ def cancel_job( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_live_events_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_live_events_operations.py index d486e2e7590b..f0cd0e116f8b 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_live_events_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_live_events_operations.py @@ -46,7 +46,7 @@ def build_list_request(resource_group_name: str, account_name: str, subscription _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -77,7 +77,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -122,7 +122,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -166,7 +166,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -208,7 +208,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -247,7 +247,7 @@ def build_allocate_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -286,7 +286,7 @@ def build_start_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -325,7 +325,7 @@ def build_stop_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -367,7 +367,7 @@ def build_reset_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -400,13 +400,130 @@ def build_reset_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) +def build_list_get_status_request( + resource_group_name: str, account_name: str, live_event_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/getStatus", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "accountName": _SERIALIZER.url("account_name", account_name, "str"), + "liveEventName": _SERIALIZER.url( + "live_event_name", + live_event_name, + "str", + max_length=32, + min_length=1, + pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_list_get_stream_events_request( + resource_group_name: str, account_name: str, live_event_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/getStreamEvents", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "accountName": _SERIALIZER.url("account_name", account_name, "str"), + "liveEventName": _SERIALIZER.url( + "live_event_name", + live_event_name, + "str", + max_length=32, + min_length=1, + pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_list_get_track_ingest_heartbeats_request( + resource_group_name: str, account_name: str, live_event_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/getTrackIngestHeartbeats", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "accountName": _SERIALIZER.url("account_name", account_name, "str"), + "liveEventName": _SERIALIZER.url( + "live_event_name", + live_event_name, + "str", + max_length=32, + min_length=1, + pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + def build_async_operation_request( resource_group_name: str, account_name: str, operation_id: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -443,7 +560,7 @@ def build_operation_location_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -477,7 +594,7 @@ def build_operation_location_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -class LiveEventsOperations: +class LiveEventsOperations: # pylint: disable=too-many-public-methods """ .. warning:: **DO NOT** instantiate this class directly. @@ -515,7 +632,7 @@ def list(self, resource_group_name: str, account_name: str, **kwargs: Any) -> It _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[_models.LiveEventListResult] = kwargs.pop("cls", None) error_map = { @@ -558,8 +675,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -607,7 +725,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[_models.LiveEvent] = kwargs.pop("cls", None) request = build_get_request( @@ -623,8 +741,9 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -665,7 +784,7 @@ def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.LiveEvent] = kwargs.pop("cls", None) @@ -694,8 +813,9 @@ def _create_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -829,8 +949,8 @@ def begin_create( :type account_name: str :param live_event_name: The name of the live event, maximum length is 32. Required. :type live_event_name: str - :param parameters: Live event properties needed for creation. Is either a model type or a IO - type. Required. + :param parameters: Live event properties needed for creation. Is either a LiveEvent type or a + IO type. Required. :type parameters: ~azure.mgmt.media.models.LiveEvent or IO :param auto_start: The flag indicates if the resource should be automatically started on creation. Default value is None. @@ -853,7 +973,7 @@ def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.LiveEvent] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -919,7 +1039,7 @@ def _update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.LiveEvent] = kwargs.pop("cls", None) @@ -947,8 +1067,9 @@ def _update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1067,8 +1188,8 @@ def begin_update( :type account_name: str :param live_event_name: The name of the live event, maximum length is 32. Required. :type live_event_name: str - :param parameters: Live event properties needed for patch. Is either a model type or a IO type. - Required. + :param parameters: Live event properties needed for patch. Is either a LiveEvent type or a IO + type. Required. :type parameters: ~azure.mgmt.media.models.LiveEvent or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1088,7 +1209,7 @@ def begin_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.LiveEvent] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1148,7 +1269,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -1164,8 +1285,9 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1212,7 +1334,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1267,7 +1389,7 @@ def _allocate_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_allocate_request( @@ -1283,8 +1405,9 @@ def _allocate_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1331,7 +1454,7 @@ def begin_allocate( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1386,7 +1509,7 @@ def _start_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_start_request( @@ -1402,8 +1525,9 @@ def _start_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1451,7 +1575,7 @@ def begin_start( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1511,7 +1635,7 @@ def _stop_initial( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -1539,8 +1663,9 @@ def _stop_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1657,7 +1782,8 @@ def begin_stop( :type account_name: str :param live_event_name: The name of the live event, maximum length is 32. Required. :type live_event_name: str - :param parameters: LiveEvent stop parameters. Is either a model type or a IO type. Required. + :param parameters: LiveEvent stop parameters. Is either a LiveEventActionInput type or a IO + type. Required. :type parameters: ~azure.mgmt.media.models.LiveEventActionInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1677,7 +1803,7 @@ def begin_stop( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1735,7 +1861,7 @@ def _reset_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_reset_request( @@ -1751,8 +1877,9 @@ def _reset_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1801,7 +1928,7 @@ def begin_reset( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1842,6 +1969,597 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/reset" } + def _list_get_status_initial( + self, resource_group_name: str, account_name: str, live_event_name: str, **kwargs: Any + ) -> Optional[_models.LiveEventGetStatusResult]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) + cls: ClsType[Optional[_models.LiveEventGetStatusResult]] = kwargs.pop("cls", None) + + request = build_list_get_status_request( + resource_group_name=resource_group_name, + account_name=account_name, + live_event_name=live_event_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._list_get_status_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 304]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize("LiveEventGetStatusResult", pipeline_response) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _list_get_status_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/getStatus" + } + + @distributed_trace + def begin_list_get_status( + self, resource_group_name: str, account_name: str, live_event_name: str, **kwargs: Any + ) -> LROPoller[Iterable["_models.LiveEventStatus"]]: + """Get status of one live event. + + Gets status telemetry of a live event. + + :param resource_group_name: The name of the resource group within the Azure subscription. + Required. + :type resource_group_name: str + :param account_name: The Media Services account name. Required. + :type account_name: str + :param live_event_name: The name of the live event, maximum length is 32. Required. + :type live_event_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns an iterator like instance of either + LiveEventGetStatusResult or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.core.paging.ItemPaged[~azure.mgmt.media.models.LiveEventStatus]] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) + cls: ClsType[_models.LiveEventGetStatusResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_get_status_request( + resource_group_name=resource_group_name, + account_name=account_name, + live_event_name=live_event_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.begin_list_get_status.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + request = HttpRequest("GET", next_link) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("LiveEventGetStatusResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._list_get_status_initial( + resource_group_name=resource_group_name, + account_name=account_name, + live_event_name=live_event_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + def internal_get_next(next_link=None): + if next_link is None: + return pipeline_response + return get_next(next_link) + + return ItemPaged(internal_get_next, extract_data) + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_list_get_status.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/getStatus" + } + + def _list_get_stream_events_initial( + self, resource_group_name: str, account_name: str, live_event_name: str, **kwargs: Any + ) -> Optional[_models.LiveEventGetStreamEventsResult]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) + cls: ClsType[Optional[_models.LiveEventGetStreamEventsResult]] = kwargs.pop("cls", None) + + request = build_list_get_stream_events_request( + resource_group_name=resource_group_name, + account_name=account_name, + live_event_name=live_event_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._list_get_stream_events_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 304]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize("LiveEventGetStreamEventsResult", pipeline_response) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _list_get_stream_events_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/getStreamEvents" + } + + @distributed_trace + def begin_list_get_stream_events( + self, resource_group_name: str, account_name: str, live_event_name: str, **kwargs: Any + ) -> LROPoller[Iterable["_models.LiveEventStreamEvent"]]: + """Get stream events of one live event. + + Get stream events telemetry of a live event. + + :param resource_group_name: The name of the resource group within the Azure subscription. + Required. + :type resource_group_name: str + :param account_name: The Media Services account name. Required. + :type account_name: str + :param live_event_name: The name of the live event, maximum length is 32. Required. + :type live_event_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns an iterator like instance of either + LiveEventGetStreamEventsResult or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.core.paging.ItemPaged[~azure.mgmt.media.models.LiveEventStreamEvent]] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) + cls: ClsType[_models.LiveEventGetStreamEventsResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_get_stream_events_request( + resource_group_name=resource_group_name, + account_name=account_name, + live_event_name=live_event_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.begin_list_get_stream_events.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + request = HttpRequest("GET", next_link) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("LiveEventGetStreamEventsResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._list_get_stream_events_initial( + resource_group_name=resource_group_name, + account_name=account_name, + live_event_name=live_event_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + def internal_get_next(next_link=None): + if next_link is None: + return pipeline_response + return get_next(next_link) + + return ItemPaged(internal_get_next, extract_data) + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_list_get_stream_events.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/getStreamEvents" + } + + def _list_get_track_ingest_heartbeats_initial( + self, resource_group_name: str, account_name: str, live_event_name: str, **kwargs: Any + ) -> Optional[_models.LiveEventGetTrackIngestHeartbeatsResult]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) + cls: ClsType[Optional[_models.LiveEventGetTrackIngestHeartbeatsResult]] = kwargs.pop("cls", None) + + request = build_list_get_track_ingest_heartbeats_request( + resource_group_name=resource_group_name, + account_name=account_name, + live_event_name=live_event_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._list_get_track_ingest_heartbeats_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 304]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize("LiveEventGetTrackIngestHeartbeatsResult", pipeline_response) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _list_get_track_ingest_heartbeats_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/getTrackIngestHeartbeats" + } + + @distributed_trace + def begin_list_get_track_ingest_heartbeats( + self, resource_group_name: str, account_name: str, live_event_name: str, **kwargs: Any + ) -> LROPoller[Iterable["_models.LiveEventTrackEvent"]]: + """Get track events of one live event. + + Get track ingest heartbeat events telemetry of a live event. + + :param resource_group_name: The name of the resource group within the Azure subscription. + Required. + :type resource_group_name: str + :param account_name: The Media Services account name. Required. + :type account_name: str + :param live_event_name: The name of the live event, maximum length is 32. Required. + :type live_event_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns an iterator like instance of either + LiveEventGetTrackIngestHeartbeatsResult or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.core.paging.ItemPaged[~azure.mgmt.media.models.LiveEventTrackEvent]] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) + cls: ClsType[_models.LiveEventGetTrackIngestHeartbeatsResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_get_track_ingest_heartbeats_request( + resource_group_name=resource_group_name, + account_name=account_name, + live_event_name=live_event_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.begin_list_get_track_ingest_heartbeats.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + request = HttpRequest("GET", next_link) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("LiveEventGetTrackIngestHeartbeatsResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._list_get_track_ingest_heartbeats_initial( + resource_group_name=resource_group_name, + account_name=account_name, + live_event_name=live_event_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + def internal_get_next(next_link=None): + if next_link is None: + return pipeline_response + return get_next(next_link) + + return ItemPaged(internal_get_next, extract_data) + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_list_get_track_ingest_heartbeats.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/getTrackIngestHeartbeats" + } + @distributed_trace def async_operation( self, resource_group_name: str, account_name: str, operation_id: str, **kwargs: Any @@ -1873,7 +2591,7 @@ def async_operation( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[_models.AsyncOperationResult] = kwargs.pop("cls", None) request = build_async_operation_request( @@ -1889,8 +2607,9 @@ def async_operation( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1944,7 +2663,7 @@ def operation_location( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[Optional[_models.LiveEvent]] = kwargs.pop("cls", None) request = build_operation_location_request( @@ -1961,8 +2680,9 @@ def operation_location( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_live_outputs_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_live_outputs_operations.py index 876dc30c966b..9e24aaffd4b0 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_live_outputs_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_live_outputs_operations.py @@ -48,7 +48,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -92,7 +92,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -144,7 +144,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -199,7 +199,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -246,7 +246,7 @@ def build_async_operation_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -284,7 +284,7 @@ def build_operation_location_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -368,7 +368,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[_models.LiveOutputListResult] = kwargs.pop("cls", None) error_map = { @@ -412,8 +412,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -463,7 +464,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[_models.LiveOutput] = kwargs.pop("cls", None) request = build_get_request( @@ -480,8 +481,9 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -522,7 +524,7 @@ def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.LiveOutput] = kwargs.pop("cls", None) @@ -551,8 +553,9 @@ def _create_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -686,8 +689,8 @@ def begin_create( :type live_event_name: str :param live_output_name: The name of the live output. Required. :type live_output_name: str - :param parameters: Live Output properties needed for creation. Is either a model type or a IO - type. Required. + :param parameters: Live Output properties needed for creation. Is either a LiveOutput type or a + IO type. Required. :type parameters: ~azure.mgmt.media.models.LiveOutput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -707,7 +710,7 @@ def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.LiveOutput] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -768,7 +771,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -785,8 +788,9 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -836,7 +840,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -909,7 +913,7 @@ def async_operation( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[_models.AsyncOperationResult] = kwargs.pop("cls", None) request = build_async_operation_request( @@ -925,8 +929,9 @@ def async_operation( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -988,7 +993,7 @@ def operation_location( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[Optional[_models.LiveOutput]] = kwargs.pop("cls", None) request = build_operation_location_request( @@ -1006,8 +1011,9 @@ def operation_location( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_locations_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_locations_operations.py index 3089de8720bc..a764b05efe13 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_locations_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_locations_operations.py @@ -43,7 +43,7 @@ def build_check_name_availability_request(location_name: str, subscription_id: s _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -146,7 +146,8 @@ def check_name_availability( :param location_name: Location name. Required. :type location_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a CheckNameAvailabilityInput type or a IO + type. Required. :type parameters: ~azure.mgmt.media.models.CheckNameAvailabilityInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -167,7 +168,7 @@ def check_name_availability( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.EntityNameAvailabilityCheckOutput] = kwargs.pop("cls", None) @@ -193,8 +194,9 @@ def check_name_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_media_services_operation_results_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_media_services_operation_results_operations.py index ca2a298df647..0ab3102be7c3 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_media_services_operation_results_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_media_services_operation_results_operations.py @@ -43,7 +43,7 @@ def build_get_request(location_name: str, operation_id: str, subscription_id: st _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -113,7 +113,7 @@ def get(self, location_name: str, operation_id: str, **kwargs: Any) -> Optional[ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[Optional[_models.MediaService]] = kwargs.pop("cls", None) request = build_get_request( @@ -128,8 +128,9 @@ def get(self, location_name: str, operation_id: str, **kwargs: Any) -> Optional[ request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_media_services_operation_statuses_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_media_services_operation_statuses_operations.py index 61c84d2c786f..0aaec4eda2d9 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_media_services_operation_statuses_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_media_services_operation_statuses_operations.py @@ -43,7 +43,7 @@ def build_get_request(location_name: str, operation_id: str, subscription_id: st _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -113,7 +113,7 @@ def get(self, location_name: str, operation_id: str, **kwargs: Any) -> _models.M _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.MediaServiceOperationStatus] = kwargs.pop("cls", None) request = build_get_request( @@ -128,8 +128,9 @@ def get(self, location_name: str, operation_id: str, **kwargs: Any) -> _models.M request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_mediaservices_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_mediaservices_operations.py index 18ee53938f39..87495b35a8d9 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_mediaservices_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_mediaservices_operations.py @@ -46,7 +46,7 @@ def build_list_request(resource_group_name: str, subscription_id: str, **kwargs: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -74,7 +74,7 @@ def build_get_request(resource_group_name: str, account_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -105,7 +105,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -139,7 +139,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -170,7 +170,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -204,7 +204,7 @@ def build_sync_storage_keys_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -238,7 +238,7 @@ def build_list_edge_policies_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -270,7 +270,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -326,7 +326,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Med _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.MediaServiceCollection] = kwargs.pop("cls", None) error_map = { @@ -368,8 +368,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -413,7 +414,7 @@ def get(self, resource_group_name: str, account_name: str, **kwargs: Any) -> _mo _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.MediaService] = kwargs.pop("cls", None) request = build_get_request( @@ -428,8 +429,9 @@ def get(self, resource_group_name: str, account_name: str, **kwargs: Any) -> _mo request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -464,7 +466,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.MediaService] = kwargs.pop("cls", None) @@ -491,8 +493,9 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -619,7 +622,8 @@ def begin_create_or_update( :type resource_group_name: str :param account_name: The Media Services account name. Required. :type account_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a MediaService type or a IO type. + Required. :type parameters: ~azure.mgmt.media.models.MediaService or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -640,7 +644,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.MediaService] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -722,7 +726,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -737,8 +741,9 @@ def delete( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -773,7 +778,7 @@ def _update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.MediaService] = kwargs.pop("cls", None) @@ -800,8 +805,9 @@ def _update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -922,7 +928,8 @@ def begin_update( :type resource_group_name: str :param account_name: The Media Services account name. Required. :type account_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a MediaServiceUpdate type or a IO type. + Required. :type parameters: ~azure.mgmt.media.models.MediaServiceUpdate or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -943,7 +950,7 @@ def begin_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.MediaService] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1076,7 +1083,8 @@ def sync_storage_keys( # pylint: disable=inconsistent-return-statements :type resource_group_name: str :param account_name: The Media Services account name. Required. :type account_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a SyncStorageKeysInput type or a IO type. + Required. :type parameters: ~azure.mgmt.media.models.SyncStorageKeysInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1097,7 +1105,7 @@ def sync_storage_keys( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -1124,8 +1132,9 @@ def sync_storage_keys( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1219,7 +1228,8 @@ def list_edge_policies( :type resource_group_name: str :param account_name: The Media Services account name. Required. :type account_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a ListEdgePoliciesInput type or a IO type. + Required. :type parameters: ~azure.mgmt.media.models.ListEdgePoliciesInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1240,7 +1250,7 @@ def list_edge_policies( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.EdgePolicies] = kwargs.pop("cls", None) @@ -1267,8 +1277,9 @@ def list_edge_policies( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1303,7 +1314,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.MediaService" _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.MediaServiceCollection] = kwargs.pop("cls", None) error_map = { @@ -1344,8 +1355,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_operation_results_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_operation_results_operations.py index faa8a96708b9..311a241a4cef 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_operation_results_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_operation_results_operations.py @@ -51,7 +51,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -139,7 +139,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[Optional[_models.AssetTrack]] = kwargs.pop("cls", None) request = build_get_request( @@ -157,8 +157,9 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_operation_statuses_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_operation_statuses_operations.py index 166bf7855644..1eebc97b01f7 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_operation_statuses_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_operation_statuses_operations.py @@ -51,7 +51,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -139,7 +139,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.AssetTrackOperationStatus] = kwargs.pop("cls", None) request = build_get_request( @@ -157,8 +157,9 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_operations.py index 1fc8f21dc8f5..d875cde166f9 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_operations.py @@ -43,7 +43,7 @@ def build_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -99,7 +99,7 @@ def list(self, **kwargs: Any) -> _models.OperationCollection: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.OperationCollection] = kwargs.pop("cls", None) request = build_list_request( @@ -111,8 +111,9 @@ def list(self, **kwargs: Any) -> _models.OperationCollection: request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_private_endpoint_connections_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_private_endpoint_connections_operations.py index c5ef11869790..87b8900f3929 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_private_endpoint_connections_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_private_endpoint_connections_operations.py @@ -43,7 +43,7 @@ def build_list_request(resource_group_name: str, account_name: str, subscription _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -74,7 +74,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -106,7 +106,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -141,7 +141,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -215,7 +215,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) request = build_list_request( @@ -230,8 +230,9 @@ def list( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -283,7 +284,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) request = build_get_request( @@ -299,8 +300,9 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -407,7 +409,8 @@ def create_or_update( :type account_name: str :param name: Required. :type name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a PrivateEndpointConnection type or a IO + type. Required. :type parameters: ~azure.mgmt.media.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -428,7 +431,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) @@ -456,8 +459,9 @@ def create_or_update( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -509,7 +513,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -525,8 +529,9 @@ def delete( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_private_link_resources_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_private_link_resources_operations.py index 3ece6dfe7c4f..beeea221728c 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_private_link_resources_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_private_link_resources_operations.py @@ -43,7 +43,7 @@ def build_list_request(resource_group_name: str, account_name: str, subscription _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -74,7 +74,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -146,7 +146,7 @@ def list(self, resource_group_name: str, account_name: str, **kwargs: Any) -> _m _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.PrivateLinkResourceListResult] = kwargs.pop("cls", None) request = build_list_request( @@ -161,8 +161,9 @@ def list(self, resource_group_name: str, account_name: str, **kwargs: Any) -> _m request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -212,7 +213,7 @@ def get(self, resource_group_name: str, account_name: str, name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.PrivateLinkResource] = kwargs.pop("cls", None) request = build_get_request( @@ -228,8 +229,9 @@ def get(self, resource_group_name: str, account_name: str, name: str, **kwargs: request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_streaming_endpoints_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_streaming_endpoints_operations.py index e7a42e39e814..37e083b31a6d 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_streaming_endpoints_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_streaming_endpoints_operations.py @@ -46,7 +46,7 @@ def build_list_request(resource_group_name: str, account_name: str, subscription _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -77,7 +77,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -122,7 +122,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -166,7 +166,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -208,7 +208,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -247,7 +247,7 @@ def build_skus_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -286,7 +286,7 @@ def build_start_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -325,7 +325,7 @@ def build_stop_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -364,7 +364,7 @@ def build_scale_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -406,7 +406,7 @@ def build_async_operation_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -443,7 +443,7 @@ def build_operation_location_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -515,7 +515,7 @@ def list(self, resource_group_name: str, account_name: str, **kwargs: Any) -> It _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[_models.StreamingEndpointListResult] = kwargs.pop("cls", None) error_map = { @@ -558,8 +558,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -608,7 +609,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[_models.StreamingEndpoint] = kwargs.pop("cls", None) request = build_get_request( @@ -624,8 +625,9 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -666,7 +668,7 @@ def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.StreamingEndpoint] = kwargs.pop("cls", None) @@ -695,8 +697,9 @@ def _create_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -835,8 +838,8 @@ def begin_create( :param streaming_endpoint_name: The name of the streaming endpoint, maximum length is 24. Required. :type streaming_endpoint_name: str - :param parameters: Streaming endpoint properties needed for creation. Is either a model type or - a IO type. Required. + :param parameters: Streaming endpoint properties needed for creation. Is either a + StreamingEndpoint type or a IO type. Required. :type parameters: ~azure.mgmt.media.models.StreamingEndpoint or IO :param auto_start: The flag indicates if the resource should be automatically started on creation. Default value is None. @@ -860,7 +863,7 @@ def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.StreamingEndpoint] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -926,7 +929,7 @@ def _update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.StreamingEndpoint] = kwargs.pop("cls", None) @@ -954,8 +957,9 @@ def _update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1085,8 +1089,8 @@ def begin_update( :param streaming_endpoint_name: The name of the streaming endpoint, maximum length is 24. Required. :type streaming_endpoint_name: str - :param parameters: Streaming endpoint properties needed for creation. Is either a model type or - a IO type. Required. + :param parameters: Streaming endpoint properties needed for creation. Is either a + StreamingEndpoint type or a IO type. Required. :type parameters: ~azure.mgmt.media.models.StreamingEndpoint or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1107,7 +1111,7 @@ def begin_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.StreamingEndpoint] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1167,7 +1171,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -1183,8 +1187,9 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1232,7 +1237,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1305,7 +1310,7 @@ def skus( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[_models.StreamingEndpointSkuInfoListResult] = kwargs.pop("cls", None) request = build_skus_request( @@ -1321,8 +1326,9 @@ def skus( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1357,7 +1363,7 @@ def _start_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_start_request( @@ -1373,8 +1379,9 @@ def _start_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1422,7 +1429,7 @@ def begin_start( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1477,7 +1484,7 @@ def _stop_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_stop_request( @@ -1493,8 +1500,9 @@ def _stop_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1542,7 +1550,7 @@ def begin_stop( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1602,7 +1610,7 @@ def _scale_initial( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -1630,8 +1638,9 @@ def _scale_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1751,8 +1760,8 @@ def begin_scale( :param streaming_endpoint_name: The name of the streaming endpoint, maximum length is 24. Required. :type streaming_endpoint_name: str - :param parameters: Streaming endpoint scale parameters. Is either a model type or a IO type. - Required. + :param parameters: Streaming endpoint scale parameters. Is either a StreamingEntityScaleUnit + type or a IO type. Required. :type parameters: ~azure.mgmt.media.models.StreamingEntityScaleUnit or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1772,7 +1781,7 @@ def begin_scale( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1847,7 +1856,7 @@ def async_operation( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[_models.AsyncOperationResult] = kwargs.pop("cls", None) request = build_async_operation_request( @@ -1863,8 +1872,9 @@ def async_operation( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1924,7 +1934,7 @@ def operation_location( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2022-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-11-01")) cls: ClsType[Optional[_models.StreamingEndpoint]] = kwargs.pop("cls", None) request = build_operation_location_request( @@ -1941,8 +1951,9 @@ def operation_location( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_streaming_locators_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_streaming_locators_operations.py index d370e3483ffa..ae5c216103dd 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_streaming_locators_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_streaming_locators_operations.py @@ -53,7 +53,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -90,7 +90,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -122,7 +122,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -157,7 +157,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -189,7 +189,7 @@ def build_list_content_keys_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -221,7 +221,7 @@ def build_list_paths_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -302,7 +302,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.StreamingLocatorCollection] = kwargs.pop("cls", None) error_map = { @@ -348,8 +348,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -397,7 +398,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.StreamingLocator] = kwargs.pop("cls", None) request = build_get_request( @@ -413,8 +414,9 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -521,7 +523,8 @@ def create( :type account_name: str :param streaming_locator_name: The Streaming Locator name. Required. :type streaming_locator_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a StreamingLocator type or a IO type. + Required. :type parameters: ~azure.mgmt.media.models.StreamingLocator or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -542,7 +545,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.StreamingLocator] = kwargs.pop("cls", None) @@ -570,8 +573,9 @@ def create( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -623,7 +627,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -639,8 +643,9 @@ def delete( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -688,7 +693,7 @@ def list_content_keys( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.ListContentKeysResponse] = kwargs.pop("cls", None) request = build_list_content_keys_request( @@ -704,8 +709,9 @@ def list_content_keys( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -757,7 +763,7 @@ def list_paths( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.ListPathsResponse] = kwargs.pop("cls", None) request = build_list_paths_request( @@ -773,8 +779,9 @@ def list_paths( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_streaming_policies_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_streaming_policies_operations.py index df6483f4b7d4..eac0b1315578 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_streaming_policies_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_streaming_policies_operations.py @@ -53,7 +53,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -90,7 +90,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -122,7 +122,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -157,7 +157,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -238,7 +238,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.StreamingPolicyCollection] = kwargs.pop("cls", None) error_map = { @@ -284,8 +284,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -333,7 +334,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.StreamingPolicy] = kwargs.pop("cls", None) request = build_get_request( @@ -349,8 +350,9 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -457,7 +459,8 @@ def create( :type account_name: str :param streaming_policy_name: The Streaming Policy name. Required. :type streaming_policy_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a StreamingPolicy type or a IO type. + Required. :type parameters: ~azure.mgmt.media.models.StreamingPolicy or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -478,7 +481,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.StreamingPolicy] = kwargs.pop("cls", None) @@ -506,8 +509,9 @@ def create( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -559,7 +563,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -575,8 +579,9 @@ def delete( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_tracks_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_tracks_operations.py index e2de59fcbb57..4317a2a4be2a 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_tracks_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_tracks_operations.py @@ -48,7 +48,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -80,7 +80,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -113,7 +113,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -149,7 +149,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -182,7 +182,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -218,7 +218,7 @@ def build_update_track_data_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -287,7 +287,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.AssetTrackCollection] = kwargs.pop("cls", None) error_map = { @@ -331,8 +331,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -382,7 +383,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.AssetTrack] = kwargs.pop("cls", None) request = build_get_request( @@ -399,8 +400,9 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -441,7 +443,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AssetTrack] = kwargs.pop("cls", None) @@ -470,8 +472,9 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -618,7 +621,7 @@ def begin_create_or_update( :type asset_name: str :param track_name: The Asset Track name. Required. :type track_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a AssetTrack type or a IO type. Required. :type parameters: ~azure.mgmt.media.models.AssetTrack or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -638,7 +641,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AssetTrack] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -707,7 +710,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -724,8 +727,9 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -782,7 +786,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -844,7 +848,7 @@ def _update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AssetTrack] = kwargs.pop("cls", None) @@ -873,8 +877,9 @@ def _update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1011,7 +1016,7 @@ def begin_update( :type asset_name: str :param track_name: The Asset Track name. Required. :type track_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a AssetTrack type or a IO type. Required. :type parameters: ~azure.mgmt.media.models.AssetTrack or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1031,7 +1036,7 @@ def begin_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AssetTrack] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1100,7 +1105,7 @@ def _update_track_data_initial( # pylint: disable=inconsistent-return-statement _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_update_track_data_request( @@ -1117,8 +1122,9 @@ def _update_track_data_initial( # pylint: disable=inconsistent-return-statement request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1178,7 +1184,7 @@ def begin_update_track_data( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_transforms_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_transforms_operations.py index 57d764d42b3e..6c94fb04b9bd 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_transforms_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_transforms_operations.py @@ -310,8 +310,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -373,8 +374,9 @@ def get(self, resource_group_name: str, account_name: str, transform_name: str, request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -481,7 +483,7 @@ def create_or_update( :type account_name: str :param transform_name: The Transform name. Required. :type transform_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a Transform type or a IO type. Required. :type parameters: ~azure.mgmt.media.models.Transform or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -530,8 +532,9 @@ def create_or_update( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -603,8 +606,9 @@ def delete( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -707,7 +711,7 @@ def update( :type account_name: str :param transform_name: The Transform name. Required. :type transform_name: str - :param parameters: The request parameters. Is either a model type or a IO type. Required. + :param parameters: The request parameters. Is either a Transform type or a IO type. Required. :type parameters: ~azure.mgmt.media.models.Transform or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -756,8 +760,9 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/media/azure-mgmt-media/generated_samples/account_filterscreate.py b/sdk/media/azure-mgmt-media/generated_samples/account_filterscreate.py index 4963743b973f..bc825cdf1714 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/account_filterscreate.py +++ b/sdk/media/azure-mgmt-media/generated_samples/account_filterscreate.py @@ -30,7 +30,7 @@ def main(): ) response = client.account_filters.create_or_update( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", filter_name="newAccountFilter", parameters={ @@ -65,6 +65,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/accountFilters-create.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/accountFilters-create.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/account_filtersdelete.py b/sdk/media/azure-mgmt-media/generated_samples/account_filtersdelete.py index b11f2f939ea9..016f207069ba 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/account_filtersdelete.py +++ b/sdk/media/azure-mgmt-media/generated_samples/account_filtersdelete.py @@ -30,13 +30,13 @@ def main(): ) response = client.account_filters.delete( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", filter_name="accountFilterWithTimeWindowAndTrack", ) print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/accountFilters-delete.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/accountFilters-delete.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/account_filtersgetbyname.py b/sdk/media/azure-mgmt-media/generated_samples/account_filtersgetbyname.py index 19c368572bf7..6495e26f5a88 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/account_filtersgetbyname.py +++ b/sdk/media/azure-mgmt-media/generated_samples/account_filtersgetbyname.py @@ -30,13 +30,13 @@ def main(): ) response = client.account_filters.get( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", filter_name="accountFilterWithTrack", ) print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/accountFilters-get-by-name.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/accountFilters-get-by-name.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/account_filterslistall.py b/sdk/media/azure-mgmt-media/generated_samples/account_filterslistall.py index 82a5b45f596e..d887786478b6 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/account_filterslistall.py +++ b/sdk/media/azure-mgmt-media/generated_samples/account_filterslistall.py @@ -30,13 +30,13 @@ def main(): ) response = client.account_filters.list( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", ) for item in response: print(item) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/accountFilters-list-all.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/accountFilters-list-all.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/account_filtersupdate.py b/sdk/media/azure-mgmt-media/generated_samples/account_filtersupdate.py index d247e28c1109..fa951140beaf 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/account_filtersupdate.py +++ b/sdk/media/azure-mgmt-media/generated_samples/account_filtersupdate.py @@ -30,7 +30,7 @@ def main(): ) response = client.account_filters.update( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", filter_name="accountFilterWithTimeWindowAndTrack", parameters={ @@ -50,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/accountFilters-update.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/accountFilters-update.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/accountschecknameavailability.py b/sdk/media/azure-mgmt-media/generated_samples/accountschecknameavailability.py index 89b035f448c0..091d23f08449 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/accountschecknameavailability.py +++ b/sdk/media/azure-mgmt-media/generated_samples/accountschecknameavailability.py @@ -31,11 +31,11 @@ def main(): response = client.locations.check_name_availability( location_name="japanwest", - parameters={"name": "contosotv", "type": "videoAnalyzers"}, + parameters={"name": "contosotv", "type": "Microsoft.Media/mediaservices"}, ) print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/accounts-check-name-availability.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2023-01-01/examples/accounts-check-name-availability.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/accountsdelete.py b/sdk/media/azure-mgmt-media/generated_samples/accountsdelete.py index d6a05913d676..99bf8e60165c 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/accountsdelete.py +++ b/sdk/media/azure-mgmt-media/generated_samples/accountsdelete.py @@ -30,12 +30,12 @@ def main(): ) response = client.mediaservices.delete( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contososports", ) print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/accounts-delete.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2023-01-01/examples/accounts-delete.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/accountsgetbyname.py b/sdk/media/azure-mgmt-media/generated_samples/accountsgetbyname.py index c45f3449ff60..d9217ed022ce 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/accountsgetbyname.py +++ b/sdk/media/azure-mgmt-media/generated_samples/accountsgetbyname.py @@ -30,12 +30,12 @@ def main(): ) response = client.mediaservices.get( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosotv", ) print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/accounts-get-by-name.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2023-01-01/examples/accounts-get-by-name.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/accountslistallaccounts.py b/sdk/media/azure-mgmt-media/generated_samples/accountslistallaccounts.py index 5448255fa964..bccbb95e9e0a 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/accountslistallaccounts.py +++ b/sdk/media/azure-mgmt-media/generated_samples/accountslistallaccounts.py @@ -30,12 +30,12 @@ def main(): ) response = client.mediaservices.list( - resource_group_name="contoso", + resource_group_name="contosorg", ) for item in response: print(item) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/accounts-list-all-accounts.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2023-01-01/examples/accounts-list-all-accounts.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/accountslistmediaedgepolicies.py b/sdk/media/azure-mgmt-media/generated_samples/accountslistmediaedgepolicies.py index c203c2c87f18..a9ba13b66a2c 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/accountslistmediaedgepolicies.py +++ b/sdk/media/azure-mgmt-media/generated_samples/accountslistmediaedgepolicies.py @@ -30,13 +30,13 @@ def main(): ) response = client.mediaservices.list_edge_policies( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contososports", parameters={"deviceId": "contosiothubhost_contosoiotdevice"}, ) print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/accounts-list-media-edge-policies.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2023-01-01/examples/accounts-list-media-edge-policies.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/accountssubscriptionlistallaccounts.py b/sdk/media/azure-mgmt-media/generated_samples/accountssubscriptionlistallaccounts.py index 47bfb67c4341..d11cd672cefb 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/accountssubscriptionlistallaccounts.py +++ b/sdk/media/azure-mgmt-media/generated_samples/accountssubscriptionlistallaccounts.py @@ -34,6 +34,6 @@ def main(): print(item) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/accounts-subscription-list-all-accounts.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2023-01-01/examples/accounts-subscription-list-all-accounts.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/accountssyncstoragekeys.py b/sdk/media/azure-mgmt-media/generated_samples/accountssyncstoragekeys.py index 66b43e0ca898..2163821e6d24 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/accountssyncstoragekeys.py +++ b/sdk/media/azure-mgmt-media/generated_samples/accountssyncstoragekeys.py @@ -30,13 +30,13 @@ def main(): ) response = client.mediaservices.sync_storage_keys( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contososports", parameters={"id": "contososportsstore"}, ) print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/accounts-sync-storage-keys.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2023-01-01/examples/accounts-sync-storage-keys.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/asset_filterscreate.py b/sdk/media/azure-mgmt-media/generated_samples/asset_filterscreate.py index 2880a3e373da..2cd01c5e46b5 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/asset_filterscreate.py +++ b/sdk/media/azure-mgmt-media/generated_samples/asset_filterscreate.py @@ -30,7 +30,7 @@ def main(): ) response = client.asset_filters.create_or_update( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", asset_name="ClimbingMountRainer", filter_name="newAssetFilter", @@ -66,6 +66,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assetFilters-create.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/assetFilters-create.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/asset_filtersdelete.py b/sdk/media/azure-mgmt-media/generated_samples/asset_filtersdelete.py index 5d1a710b5f80..d98e9b6d134b 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/asset_filtersdelete.py +++ b/sdk/media/azure-mgmt-media/generated_samples/asset_filtersdelete.py @@ -30,7 +30,7 @@ def main(): ) response = client.asset_filters.delete( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", asset_name="ClimbingMountRainer", filter_name="assetFilterWithTimeWindowAndTrack", @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assetFilters-delete.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/assetFilters-delete.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/asset_filtersgetbyname.py b/sdk/media/azure-mgmt-media/generated_samples/asset_filtersgetbyname.py index 18c6cf20573e..4d8b0a595de2 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/asset_filtersgetbyname.py +++ b/sdk/media/azure-mgmt-media/generated_samples/asset_filtersgetbyname.py @@ -30,7 +30,7 @@ def main(): ) response = client.asset_filters.get( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", asset_name="ClimbingMountRainer", filter_name="assetFilterWithTimeWindowAndTrack", @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assetFilters-get-by-name.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/assetFilters-get-by-name.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/asset_filterslistall.py b/sdk/media/azure-mgmt-media/generated_samples/asset_filterslistall.py index 97af3669f57d..49bf2e59a728 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/asset_filterslistall.py +++ b/sdk/media/azure-mgmt-media/generated_samples/asset_filterslistall.py @@ -30,7 +30,7 @@ def main(): ) response = client.asset_filters.list( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", asset_name="ClimbingMountRainer", ) @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assetFilters-list-all.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/assetFilters-list-all.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/asset_filtersupdate.py b/sdk/media/azure-mgmt-media/generated_samples/asset_filtersupdate.py index e1756aa36e9c..b10edefd4028 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/asset_filtersupdate.py +++ b/sdk/media/azure-mgmt-media/generated_samples/asset_filtersupdate.py @@ -30,7 +30,7 @@ def main(): ) response = client.asset_filters.update( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", asset_name="ClimbingMountRainer", filter_name="assetFilterWithTimeWindowAndTrack", @@ -51,6 +51,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assetFilters-update.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/assetFilters-update.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/assetscreate.py b/sdk/media/azure-mgmt-media/generated_samples/assetscreate.py index fe4a7cc79b6c..3c855d75fdc9 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/assetscreate.py +++ b/sdk/media/azure-mgmt-media/generated_samples/assetscreate.py @@ -30,7 +30,7 @@ def main(): ) response = client.assets.create_or_update( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", asset_name="ClimbingMountLogan", parameters={ @@ -43,6 +43,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assets-create.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/assets-create.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/assetscreatewithencryptionscope.py b/sdk/media/azure-mgmt-media/generated_samples/assetscreatewithencryptionscope.py new file mode 100644 index 000000000000..e66d0a03ae49 --- /dev/null +++ b/sdk/media/azure-mgmt-media/generated_samples/assetscreatewithencryptionscope.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential +from azure.mgmt.media import AzureMediaServices + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-media +# USAGE + python assetscreatewithencryptionscope.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = AzureMediaServices( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.assets.create_or_update( + resource_group_name="contosorg", + account_name="contosomedia", + asset_name="ClimbingMountLogan", + parameters={ + "properties": { + "description": "A documentary showing the ascent of Mount Logan", + "encryptionScope": "encryptionScope1", + "storageAccountName": "storage0", + } + }, + ) + print(response) + + +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/assets-create-with-encryption-scope.json +if __name__ == "__main__": + main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/assetsdelete.py b/sdk/media/azure-mgmt-media/generated_samples/assetsdelete.py index c94596e81d1c..55a8e31b9c32 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/assetsdelete.py +++ b/sdk/media/azure-mgmt-media/generated_samples/assetsdelete.py @@ -30,13 +30,13 @@ def main(): ) response = client.assets.delete( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", asset_name="ClimbingMountAdams", ) print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assets-delete.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/assets-delete.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/assetsgetbyname.py b/sdk/media/azure-mgmt-media/generated_samples/assetsgetbyname.py index 172bdf391c68..38fe0545e5d1 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/assetsgetbyname.py +++ b/sdk/media/azure-mgmt-media/generated_samples/assetsgetbyname.py @@ -30,13 +30,13 @@ def main(): ) response = client.assets.get( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", asset_name="ClimbingMountAdams", ) print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assets-get-by-name.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/assets-get-by-name.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/assetsgetencryptionkeys.py b/sdk/media/azure-mgmt-media/generated_samples/assetsgetencryptionkeys.py index 72302c9445d2..8973a4ec4d23 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/assetsgetencryptionkeys.py +++ b/sdk/media/azure-mgmt-media/generated_samples/assetsgetencryptionkeys.py @@ -30,13 +30,13 @@ def main(): ) response = client.assets.get_encryption_key( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", asset_name="ClimbingMountSaintHelens", ) print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assets-get-encryption-keys.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/assets-get-encryption-keys.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/assetslistall.py b/sdk/media/azure-mgmt-media/generated_samples/assetslistall.py index 6d5eb72cc890..146f4a01935b 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/assetslistall.py +++ b/sdk/media/azure-mgmt-media/generated_samples/assetslistall.py @@ -30,13 +30,13 @@ def main(): ) response = client.assets.list( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", ) for item in response: print(item) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assets-list-all.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/assets-list-all.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/assetslistbydate.py b/sdk/media/azure-mgmt-media/generated_samples/assetslistbydate.py index a3cb40645d27..9c8a3fea1977 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/assetslistbydate.py +++ b/sdk/media/azure-mgmt-media/generated_samples/assetslistbydate.py @@ -30,13 +30,13 @@ def main(): ) response = client.assets.list( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", ) for item in response: print(item) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assets-list-by-date.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/assets-list-by-date.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/assetslistindaterange.py b/sdk/media/azure-mgmt-media/generated_samples/assetslistindaterange.py index 8e3f38c4ca78..fe620f9cebe2 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/assetslistindaterange.py +++ b/sdk/media/azure-mgmt-media/generated_samples/assetslistindaterange.py @@ -30,13 +30,13 @@ def main(): ) response = client.assets.list( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", ) for item in response: print(item) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assets-list-in-date-range.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/assets-list-in-date-range.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/assetslistsasurls.py b/sdk/media/azure-mgmt-media/generated_samples/assetslistsasurls.py index 65e4f0f83861..48ef41b892aa 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/assetslistsasurls.py +++ b/sdk/media/azure-mgmt-media/generated_samples/assetslistsasurls.py @@ -30,7 +30,7 @@ def main(): ) response = client.assets.list_container_sas( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", asset_name="ClimbingMountBaker", parameters={"expiryTime": "2018-01-01T10:00:00.007Z", "permissions": "ReadWrite"}, @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assets-list-sas-urls.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/assets-list-sas-urls.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/assetsliststreaminglocators.py b/sdk/media/azure-mgmt-media/generated_samples/assetsliststreaminglocators.py index 0f4a3a65dc01..b09b58a36324 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/assetsliststreaminglocators.py +++ b/sdk/media/azure-mgmt-media/generated_samples/assetsliststreaminglocators.py @@ -30,13 +30,13 @@ def main(): ) response = client.assets.list_streaming_locators( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", asset_name="ClimbingMountSaintHelens", ) print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assets-list-streaming-locators.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/assets-list-streaming-locators.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/assetsupdate.py b/sdk/media/azure-mgmt-media/generated_samples/assetsupdate.py index ef9e334dfae3..3fbabe86745d 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/assetsupdate.py +++ b/sdk/media/azure-mgmt-media/generated_samples/assetsupdate.py @@ -30,7 +30,7 @@ def main(): ) response = client.assets.update( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", asset_name="ClimbingMountBaker", parameters={"properties": {"description": "A documentary showing the ascent of Mount Baker in HD"}}, @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/assets-update.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/assets-update.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/assettrackscreate.py b/sdk/media/azure-mgmt-media/generated_samples/assettrackscreate.py index 56c367b2a4a0..8ce4f5514e0a 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/assettrackscreate.py +++ b/sdk/media/azure-mgmt-media/generated_samples/assettrackscreate.py @@ -30,7 +30,7 @@ def main(): ) response = client.tracks.begin_create_or_update( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", asset_name="ClimbingMountRainer", track_name="text3", @@ -48,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/asset-tracks-create.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/asset-tracks-create.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/assettracksdelete.py b/sdk/media/azure-mgmt-media/generated_samples/assettracksdelete.py index 0ed05872431a..32ab1db3c25a 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/assettracksdelete.py +++ b/sdk/media/azure-mgmt-media/generated_samples/assettracksdelete.py @@ -30,7 +30,7 @@ def main(): ) response = client.tracks.begin_delete( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", asset_name="ClimbingMountRainer", track_name="text2", @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/asset-tracks-delete.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/asset-tracks-delete.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/assettracksgetbyname.py b/sdk/media/azure-mgmt-media/generated_samples/assettracksgetbyname.py index bef62b5cfd5d..1bb2266883af 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/assettracksgetbyname.py +++ b/sdk/media/azure-mgmt-media/generated_samples/assettracksgetbyname.py @@ -30,7 +30,7 @@ def main(): ) response = client.tracks.get( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", asset_name="ClimbingMountRainer", track_name="text1", @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/asset-tracks-get-by-name.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/asset-tracks-get-by-name.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/assettrackslistall.py b/sdk/media/azure-mgmt-media/generated_samples/assettrackslistall.py index 296f6871b941..04854fe58c97 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/assettrackslistall.py +++ b/sdk/media/azure-mgmt-media/generated_samples/assettrackslistall.py @@ -30,7 +30,7 @@ def main(): ) response = client.tracks.list( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", asset_name="ClimbingMountRainer", ) @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/asset-tracks-list-all.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/asset-tracks-list-all.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/assettracksoperationresultbyid.py b/sdk/media/azure-mgmt-media/generated_samples/assettracksoperationresultbyid.py index cd11ad9f90b9..77cab70a04db 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/assettracksoperationresultbyid.py +++ b/sdk/media/azure-mgmt-media/generated_samples/assettracksoperationresultbyid.py @@ -30,7 +30,7 @@ def main(): ) response = client.operation_results.get( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", asset_name="ClimbingMountRainer", track_name="text1", @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/asset-tracks-operation-result-by-id.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/asset-tracks-operation-result-by-id.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/assettracksoperationstatusbyidnonterminalstate.py b/sdk/media/azure-mgmt-media/generated_samples/assettracksoperationstatusbyidnonterminalstate.py index f8e60f21a98e..5f1cb0e1ce65 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/assettracksoperationstatusbyidnonterminalstate.py +++ b/sdk/media/azure-mgmt-media/generated_samples/assettracksoperationstatusbyidnonterminalstate.py @@ -30,7 +30,7 @@ def main(): ) response = client.operation_statuses.get( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", asset_name="ClimbingMountRainer", track_name="text1", @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/asset-tracks-operation-status-by-id-non-terminal-state.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/asset-tracks-operation-status-by-id-non-terminal-state.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/assettracksoperationstatusbyidterminalstate.py b/sdk/media/azure-mgmt-media/generated_samples/assettracksoperationstatusbyidterminalstate.py index c310eb474d0c..ad220197c28e 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/assettracksoperationstatusbyidterminalstate.py +++ b/sdk/media/azure-mgmt-media/generated_samples/assettracksoperationstatusbyidterminalstate.py @@ -30,7 +30,7 @@ def main(): ) response = client.operation_statuses.get( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", asset_name="ClimbingMountRainer", track_name="text1", @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/asset-tracks-operation-status-by-id-terminal-state.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/asset-tracks-operation-status-by-id-terminal-state.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/assettracksoperationstatusbyidterminalstatefailed.py b/sdk/media/azure-mgmt-media/generated_samples/assettracksoperationstatusbyidterminalstatefailed.py index ab5848d89914..df7e9d3c32a6 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/assettracksoperationstatusbyidterminalstatefailed.py +++ b/sdk/media/azure-mgmt-media/generated_samples/assettracksoperationstatusbyidterminalstatefailed.py @@ -30,7 +30,7 @@ def main(): ) response = client.operation_statuses.get( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", asset_name="ClimbingMountRainer", track_name="text1", @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/asset-tracks-operation-status-by-id-terminal-state-failed.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/asset-tracks-operation-status-by-id-terminal-state-failed.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/assettracksupdate.py b/sdk/media/azure-mgmt-media/generated_samples/assettracksupdate.py index 723a1084fb9f..22aa5382a7b0 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/assettracksupdate.py +++ b/sdk/media/azure-mgmt-media/generated_samples/assettracksupdate.py @@ -30,7 +30,7 @@ def main(): ) response = client.tracks.begin_update( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", asset_name="ClimbingMountRainer", track_name="text1", @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/asset-tracks-update.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/asset-tracks-update.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/assettracksupdatedata.py b/sdk/media/azure-mgmt-media/generated_samples/assettracksupdatedata.py index 4c59d56c43df..e0a7038e7617 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/assettracksupdatedata.py +++ b/sdk/media/azure-mgmt-media/generated_samples/assettracksupdatedata.py @@ -30,7 +30,7 @@ def main(): ) response = client.tracks.begin_update_track_data( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", asset_name="ClimbingMountRainer", track_name="text2", @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/asset-tracks-update-data.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/asset-tracks-update-data.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/asyncaccountscreate.py b/sdk/media/azure-mgmt-media/generated_samples/asyncaccountscreate.py index 6fec55e37882..029abe0778e7 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/asyncaccountscreate.py +++ b/sdk/media/azure-mgmt-media/generated_samples/asyncaccountscreate.py @@ -30,38 +30,17 @@ def main(): ) response = client.mediaservices.begin_create_or_update( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contososports", parameters={ - "identity": { - "type": "UserAssigned", - "userAssignedIdentities": { - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {}, - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": {}, - }, - }, "location": "South Central US", "properties": { - "encryption": { - "identity": { - "useSystemAssignedIdentity": False, - "userAssignedIdentity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1", - }, - "type": "CustomerKey", - }, - "keyDelivery": {"accessControl": {"defaultAction": "Allow"}}, - "publicNetworkAccess": "Enabled", "storageAccounts": [ { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Storage/storageAccounts/contososportsstore", - "identity": { - "useSystemAssignedIdentity": False, - "userAssignedIdentity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1", - }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Storage/storageAccounts/teststorageaccount", "type": "Primary", } - ], - "storageAuthentication": "ManagedIdentity", + ] }, "tags": {"key1": "value1", "key2": "value2"}, }, @@ -69,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/async-accounts-create.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2023-01-01/examples/async-accounts-create.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/asyncaccountscreatemanagedidentity.py b/sdk/media/azure-mgmt-media/generated_samples/asyncaccountscreatemanagedidentity.py new file mode 100644 index 000000000000..7bf4bc6686bc --- /dev/null +++ b/sdk/media/azure-mgmt-media/generated_samples/asyncaccountscreatemanagedidentity.py @@ -0,0 +1,74 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential +from azure.mgmt.media import AzureMediaServices + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-media +# USAGE + python asyncaccountscreatemanagedidentity.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = AzureMediaServices( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.mediaservices.begin_create_or_update( + resource_group_name="contosorg", + account_name="contososports", + parameters={ + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {}, + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": {}, + }, + }, + "location": "South Central US", + "properties": { + "encryption": { + "identity": { + "useSystemAssignedIdentity": False, + "userAssignedIdentity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1", + }, + "type": "CustomerKey", + }, + "keyDelivery": {"accessControl": {"defaultAction": "Allow"}}, + "publicNetworkAccess": "Enabled", + "storageAccounts": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Storage/storageAccounts/contososportsstore", + "identity": { + "useSystemAssignedIdentity": False, + "userAssignedIdentity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1", + }, + "type": "Primary", + } + ], + "storageAuthentication": "ManagedIdentity", + }, + "tags": {"key1": "value1", "key2": "value2"}, + }, + ).result() + print(response) + + +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2023-01-01/examples/async-accounts-create-managed-identity.json +if __name__ == "__main__": + main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/asyncaccountsupdate.py b/sdk/media/azure-mgmt-media/generated_samples/asyncaccountsupdate.py index 872640e9a159..d734dbee2df7 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/asyncaccountsupdate.py +++ b/sdk/media/azure-mgmt-media/generated_samples/asyncaccountsupdate.py @@ -30,13 +30,13 @@ def main(): ) response = client.mediaservices.begin_update( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contososports", parameters={"tags": {"key1": "value3"}}, ).result() print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/async-accounts-update.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2023-01-01/examples/async-accounts-update.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/asyncoperationresult.py b/sdk/media/azure-mgmt-media/generated_samples/asyncoperationresult.py index 1f52d49c2cd3..ef240d4750c3 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/asyncoperationresult.py +++ b/sdk/media/azure-mgmt-media/generated_samples/asyncoperationresult.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/async-operation-result.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-11-01/examples/async-operation-result.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/contentkeypoliciescreatemultipleoptions.py b/sdk/media/azure-mgmt-media/generated_samples/contentkeypoliciescreatemultipleoptions.py index b88e49f15ee1..9861bf2bbcf4 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/contentkeypoliciescreatemultipleoptions.py +++ b/sdk/media/azure-mgmt-media/generated_samples/contentkeypoliciescreatemultipleoptions.py @@ -30,7 +30,7 @@ def main(): ) response = client.content_key_policies.create_or_update( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", content_key_policy_name="PolicyCreatedWithMultipleOptions", parameters={ @@ -66,6 +66,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/content-key-policies-create-multiple-options.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/content-key-policies-create-multiple-options.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/contentkeypoliciescreatenodrmtoken.py b/sdk/media/azure-mgmt-media/generated_samples/contentkeypoliciescreatenodrmtoken.py index 1a269a333a59..2916fd820ce0 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/contentkeypoliciescreatenodrmtoken.py +++ b/sdk/media/azure-mgmt-media/generated_samples/contentkeypoliciescreatenodrmtoken.py @@ -30,7 +30,7 @@ def main(): ) response = client.content_key_policies.create_or_update( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", content_key_policy_name="PolicyWithClearKeyOptionAndSwtTokenRestriction", parameters={ @@ -58,6 +58,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/content-key-policies-create-nodrm-token.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/content-key-policies-create-nodrm-token.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/contentkeypoliciescreateplayreadyopen.py b/sdk/media/azure-mgmt-media/generated_samples/contentkeypoliciescreateplayreadyopen.py index 630ecf6b7cc8..f0f6646f8aef 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/contentkeypoliciescreateplayreadyopen.py +++ b/sdk/media/azure-mgmt-media/generated_samples/contentkeypoliciescreateplayreadyopen.py @@ -30,7 +30,7 @@ def main(): ) response = client.content_key_policies.create_or_update( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", content_key_policy_name="PolicyWithPlayReadyOptionAndOpenRestriction", parameters={ @@ -70,6 +70,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/content-key-policies-create-playready-open.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/content-key-policies-create-playready-open.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/contentkeypoliciescreatewidevinetoken.py b/sdk/media/azure-mgmt-media/generated_samples/contentkeypoliciescreatewidevinetoken.py index a2ea33886afe..76950411d304 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/contentkeypoliciescreatewidevinetoken.py +++ b/sdk/media/azure-mgmt-media/generated_samples/contentkeypoliciescreatewidevinetoken.py @@ -30,7 +30,7 @@ def main(): ) response = client.content_key_policies.create_or_update( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", content_key_policy_name="PolicyWithWidevineOptionAndJwtTokenRestriction", parameters={ @@ -68,6 +68,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/content-key-policies-create-widevine-token.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/content-key-policies-create-widevine-token.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/contentkeypoliciesdelete.py b/sdk/media/azure-mgmt-media/generated_samples/contentkeypoliciesdelete.py index 8eb17fe3332b..406c6a920e64 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/contentkeypoliciesdelete.py +++ b/sdk/media/azure-mgmt-media/generated_samples/contentkeypoliciesdelete.py @@ -30,13 +30,13 @@ def main(): ) response = client.content_key_policies.delete( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", content_key_policy_name="PolicyWithPlayReadyOptionAndOpenRestriction", ) print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/content-key-policies-delete.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/content-key-policies-delete.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/contentkeypoliciesgetbyname.py b/sdk/media/azure-mgmt-media/generated_samples/contentkeypoliciesgetbyname.py index 095a03b8ebcc..af06b94d599f 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/contentkeypoliciesgetbyname.py +++ b/sdk/media/azure-mgmt-media/generated_samples/contentkeypoliciesgetbyname.py @@ -30,13 +30,13 @@ def main(): ) response = client.content_key_policies.get( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", content_key_policy_name="PolicyWithMultipleOptions", ) print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/content-key-policies-get-by-name.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/content-key-policies-get-by-name.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/contentkeypoliciesgetwithsecrets.py b/sdk/media/azure-mgmt-media/generated_samples/contentkeypoliciesgetwithsecrets.py index 9d956de4da50..0e198e951f9b 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/contentkeypoliciesgetwithsecrets.py +++ b/sdk/media/azure-mgmt-media/generated_samples/contentkeypoliciesgetwithsecrets.py @@ -30,13 +30,13 @@ def main(): ) response = client.content_key_policies.get_policy_properties_with_secrets( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", content_key_policy_name="PolicyWithMultipleOptions", ) print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/content-key-policies-get-with-secrets.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/content-key-policies-get-with-secrets.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/contentkeypolicieslistall.py b/sdk/media/azure-mgmt-media/generated_samples/contentkeypolicieslistall.py index d588e1524540..ebfd7660c91c 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/contentkeypolicieslistall.py +++ b/sdk/media/azure-mgmt-media/generated_samples/contentkeypolicieslistall.py @@ -30,13 +30,13 @@ def main(): ) response = client.content_key_policies.list( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", ) for item in response: print(item) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/content-key-policies-list-all.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/content-key-policies-list-all.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/contentkeypolicieslistbylast_modified.py b/sdk/media/azure-mgmt-media/generated_samples/contentkeypolicieslistbylast_modified.py index c90181a9add1..7087de1cc092 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/contentkeypolicieslistbylast_modified.py +++ b/sdk/media/azure-mgmt-media/generated_samples/contentkeypolicieslistbylast_modified.py @@ -30,13 +30,13 @@ def main(): ) response = client.content_key_policies.list( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", ) for item in response: print(item) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/content-key-policies-list-by-lastModified.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/content-key-policies-list-by-lastModified.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/contentkeypolicieslistindaterange.py b/sdk/media/azure-mgmt-media/generated_samples/contentkeypolicieslistindaterange.py index 1729906c0b48..aa66aba9a9e0 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/contentkeypolicieslistindaterange.py +++ b/sdk/media/azure-mgmt-media/generated_samples/contentkeypolicieslistindaterange.py @@ -30,13 +30,13 @@ def main(): ) response = client.content_key_policies.list( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", ) for item in response: print(item) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/content-key-policies-list-in-date-range.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/content-key-policies-list-in-date-range.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/contentkeypoliciesupdate.py b/sdk/media/azure-mgmt-media/generated_samples/contentkeypoliciesupdate.py index 282fd62eb70a..45a49211fb72 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/contentkeypoliciesupdate.py +++ b/sdk/media/azure-mgmt-media/generated_samples/contentkeypoliciesupdate.py @@ -30,7 +30,7 @@ def main(): ) response = client.content_key_policies.update( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", content_key_policy_name="PolicyWithClearKeyOptionAndTokenRestriction", parameters={ @@ -49,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/content-key-policies-update.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/content-key-policies-update.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/liveeventallocate.py b/sdk/media/azure-mgmt-media/generated_samples/liveeventallocate.py index e8668818bd56..001b90674dd4 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/liveeventallocate.py +++ b/sdk/media/azure-mgmt-media/generated_samples/liveeventallocate.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/liveevent-allocate.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-11-01/examples/liveevent-allocate.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/liveeventcreate.py b/sdk/media/azure-mgmt-media/generated_samples/liveeventcreate.py index d429122ae613..49c24aacbe5f 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/liveeventcreate.py +++ b/sdk/media/azure-mgmt-media/generated_samples/liveeventcreate.py @@ -56,6 +56,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/liveevent-create.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-11-01/examples/liveevent-create.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/liveeventdelete.py b/sdk/media/azure-mgmt-media/generated_samples/liveeventdelete.py index 20153875f105..2e151ad9026e 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/liveeventdelete.py +++ b/sdk/media/azure-mgmt-media/generated_samples/liveeventdelete.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/liveevent-delete.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-11-01/examples/liveevent-delete.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/liveeventgetstatus.py b/sdk/media/azure-mgmt-media/generated_samples/liveeventgetstatus.py new file mode 100644 index 000000000000..d8f437de1f85 --- /dev/null +++ b/sdk/media/azure-mgmt-media/generated_samples/liveeventgetstatus.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential +from azure.mgmt.media import AzureMediaServices + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-media +# USAGE + python liveeventgetstatus.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = AzureMediaServices( + credential=DefaultAzureCredential(), + subscription_id="0a6ec948-5a62-437d-b9df-934dc7c1b722", + ) + + response = client.live_events.begin_list_get_status( + resource_group_name="mediaresources", + account_name="slitestmedia10", + live_event_name="myLiveEvent1", + ).result() + for item in response: + print(item) + + +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-11-01/examples/liveevent-get-status.json +if __name__ == "__main__": + main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/liveeventgetstreamevents.py b/sdk/media/azure-mgmt-media/generated_samples/liveeventgetstreamevents.py new file mode 100644 index 000000000000..b67b7f6045b7 --- /dev/null +++ b/sdk/media/azure-mgmt-media/generated_samples/liveeventgetstreamevents.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential +from azure.mgmt.media import AzureMediaServices + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-media +# USAGE + python liveeventgetstreamevents.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = AzureMediaServices( + credential=DefaultAzureCredential(), + subscription_id="0a6ec948-5a62-437d-b9df-934dc7c1b722", + ) + + response = client.live_events.begin_list_get_stream_events( + resource_group_name="mediaresources", + account_name="slitestmedia10", + live_event_name="myLiveEvent1", + ).result() + for item in response: + print(item) + + +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-11-01/examples/liveevent-get-stream-events.json +if __name__ == "__main__": + main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/liveeventgettrackevents.py b/sdk/media/azure-mgmt-media/generated_samples/liveeventgettrackevents.py new file mode 100644 index 000000000000..402e78a8dfda --- /dev/null +++ b/sdk/media/azure-mgmt-media/generated_samples/liveeventgettrackevents.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential +from azure.mgmt.media import AzureMediaServices + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-media +# USAGE + python liveeventgettrackevents.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = AzureMediaServices( + credential=DefaultAzureCredential(), + subscription_id="0a6ec948-5a62-437d-b9df-934dc7c1b722", + ) + + response = client.live_events.begin_list_get_track_ingest_heartbeats( + resource_group_name="mediaresources", + account_name="slitestmedia10", + live_event_name="myLiveEvent1", + ).result() + for item in response: + print(item) + + +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-11-01/examples/liveevent-get-track-events.json +if __name__ == "__main__": + main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/liveeventlistall.py b/sdk/media/azure-mgmt-media/generated_samples/liveeventlistall.py index e56b08174e92..c5140439d369 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/liveeventlistall.py +++ b/sdk/media/azure-mgmt-media/generated_samples/liveeventlistall.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/liveevent-list-all.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-11-01/examples/liveevent-list-all.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/liveeventlistbyname.py b/sdk/media/azure-mgmt-media/generated_samples/liveeventlistbyname.py index 47f08f8eb38d..fb015f9f538f 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/liveeventlistbyname.py +++ b/sdk/media/azure-mgmt-media/generated_samples/liveeventlistbyname.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/liveevent-list-by-name.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-11-01/examples/liveevent-list-by-name.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/liveeventoperationlocation.py b/sdk/media/azure-mgmt-media/generated_samples/liveeventoperationlocation.py index 596e36161512..94d9fc044c4e 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/liveeventoperationlocation.py +++ b/sdk/media/azure-mgmt-media/generated_samples/liveeventoperationlocation.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/liveevent-operation-location.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-11-01/examples/liveevent-operation-location.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/liveeventreset.py b/sdk/media/azure-mgmt-media/generated_samples/liveeventreset.py index f827979edf6d..2e69a3ce9ecc 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/liveeventreset.py +++ b/sdk/media/azure-mgmt-media/generated_samples/liveeventreset.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/liveevent-reset.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-11-01/examples/liveevent-reset.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/liveeventstart.py b/sdk/media/azure-mgmt-media/generated_samples/liveeventstart.py index dc76246382a3..7b940da79795 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/liveeventstart.py +++ b/sdk/media/azure-mgmt-media/generated_samples/liveeventstart.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/liveevent-start.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-11-01/examples/liveevent-start.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/liveeventstop.py b/sdk/media/azure-mgmt-media/generated_samples/liveeventstop.py index 58b5446eb799..76c05ec06e87 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/liveeventstop.py +++ b/sdk/media/azure-mgmt-media/generated_samples/liveeventstop.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/liveevent-stop.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-11-01/examples/liveevent-stop.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/liveeventupdate.py b/sdk/media/azure-mgmt-media/generated_samples/liveeventupdate.py index b1b7eba18a74..d3d8abc367dc 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/liveeventupdate.py +++ b/sdk/media/azure-mgmt-media/generated_samples/liveeventupdate.py @@ -50,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/liveevent-update.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-11-01/examples/liveevent-update.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/liveoutputcreate.py b/sdk/media/azure-mgmt-media/generated_samples/liveoutputcreate.py index 6c1dc54d4d98..e7b246720841 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/liveoutputcreate.py +++ b/sdk/media/azure-mgmt-media/generated_samples/liveoutputcreate.py @@ -48,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/liveoutput-create.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-11-01/examples/liveoutput-create.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/liveoutputdelete.py b/sdk/media/azure-mgmt-media/generated_samples/liveoutputdelete.py index 50bc971243ba..c4e7a9d5f515 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/liveoutputdelete.py +++ b/sdk/media/azure-mgmt-media/generated_samples/liveoutputdelete.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/liveoutput-delete.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-11-01/examples/liveoutput-delete.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/liveoutputlistall.py b/sdk/media/azure-mgmt-media/generated_samples/liveoutputlistall.py index 8a7dd347f931..95223f56f389 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/liveoutputlistall.py +++ b/sdk/media/azure-mgmt-media/generated_samples/liveoutputlistall.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/liveoutput-list-all.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-11-01/examples/liveoutput-list-all.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/liveoutputlistbyname.py b/sdk/media/azure-mgmt-media/generated_samples/liveoutputlistbyname.py index a413c8f177f3..6ff49dee2704 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/liveoutputlistbyname.py +++ b/sdk/media/azure-mgmt-media/generated_samples/liveoutputlistbyname.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/liveoutput-list-by-name.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-11-01/examples/liveoutput-list-by-name.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/liveoutputoperationlocation.py b/sdk/media/azure-mgmt-media/generated_samples/liveoutputoperationlocation.py index b8f83e51a72a..301075bf5166 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/liveoutputoperationlocation.py +++ b/sdk/media/azure-mgmt-media/generated_samples/liveoutputoperationlocation.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/liveoutput-operation-location.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-11-01/examples/liveoutput-operation-location.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/mediaserviceoperationresultbyid.py b/sdk/media/azure-mgmt-media/generated_samples/mediaserviceoperationresultbyid.py index 1edfc361c182..43590e651fb4 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/mediaserviceoperationresultbyid.py +++ b/sdk/media/azure-mgmt-media/generated_samples/mediaserviceoperationresultbyid.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/media-service-operation-result-by-id.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2023-01-01/examples/media-service-operation-result-by-id.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/mediaserviceoperationstatusbyidnonterminalstate.py b/sdk/media/azure-mgmt-media/generated_samples/mediaserviceoperationstatusbyidnonterminalstate.py index c002241116e9..5e716df9b0a3 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/mediaserviceoperationstatusbyidnonterminalstate.py +++ b/sdk/media/azure-mgmt-media/generated_samples/mediaserviceoperationstatusbyidnonterminalstate.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/media-service-operation-status-by-id-non-terminal-state.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2023-01-01/examples/media-service-operation-status-by-id-non-terminal-state.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/mediaserviceoperationstatusbyidnonterminalstatefailed.py b/sdk/media/azure-mgmt-media/generated_samples/mediaserviceoperationstatusbyidnonterminalstatefailed.py index 10f83bf37ff2..d81d806834f1 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/mediaserviceoperationstatusbyidnonterminalstatefailed.py +++ b/sdk/media/azure-mgmt-media/generated_samples/mediaserviceoperationstatusbyidnonterminalstatefailed.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/media-service-operation-status-by-id-non-terminal-state-failed.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2023-01-01/examples/media-service-operation-status-by-id-non-terminal-state-failed.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/mediaserviceoperationstatusbyidterminalstate.py b/sdk/media/azure-mgmt-media/generated_samples/mediaserviceoperationstatusbyidterminalstate.py index 9428e1bd6d81..660c84267cd5 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/mediaserviceoperationstatusbyidterminalstate.py +++ b/sdk/media/azure-mgmt-media/generated_samples/mediaserviceoperationstatusbyidterminalstate.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/media-service-operation-status-by-id-terminal-state.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2023-01-01/examples/media-service-operation-status-by-id-terminal-state.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/operationslistall.py b/sdk/media/azure-mgmt-media/generated_samples/operationslistall.py index 751e2f1301c0..1697c1af715e 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/operationslistall.py +++ b/sdk/media/azure-mgmt-media/generated_samples/operationslistall.py @@ -33,6 +33,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/operations-list-all.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2023-01-01/examples/operations-list-all.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/privateendpointconnectiondelete.py b/sdk/media/azure-mgmt-media/generated_samples/privateendpointconnectiondelete.py index 7a8f9b1f5d72..6fc1a8289092 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/privateendpointconnectiondelete.py +++ b/sdk/media/azure-mgmt-media/generated_samples/privateendpointconnectiondelete.py @@ -30,13 +30,13 @@ def main(): ) response = client.private_endpoint_connections.delete( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contososports", name="connectionName1", ) print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/private-endpoint-connection-delete.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2023-01-01/examples/private-endpoint-connection-delete.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/privateendpointconnectiongetbyname.py b/sdk/media/azure-mgmt-media/generated_samples/privateendpointconnectiongetbyname.py index e874f223d6c5..5d115ea6f671 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/privateendpointconnectiongetbyname.py +++ b/sdk/media/azure-mgmt-media/generated_samples/privateendpointconnectiongetbyname.py @@ -30,13 +30,13 @@ def main(): ) response = client.private_endpoint_connections.get( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contososports", name="connectionName1", ) print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/private-endpoint-connection-get-by-name.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2023-01-01/examples/private-endpoint-connection-get-by-name.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/privateendpointconnectionlist.py b/sdk/media/azure-mgmt-media/generated_samples/privateendpointconnectionlist.py index f5ae82624c6b..807ac87dad96 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/privateendpointconnectionlist.py +++ b/sdk/media/azure-mgmt-media/generated_samples/privateendpointconnectionlist.py @@ -30,12 +30,12 @@ def main(): ) response = client.private_endpoint_connections.list( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contososports", ) print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/private-endpoint-connection-list.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2023-01-01/examples/private-endpoint-connection-list.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/privateendpointconnectionput.py b/sdk/media/azure-mgmt-media/generated_samples/privateendpointconnectionput.py index 027106714bd9..9849e71e93d9 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/privateendpointconnectionput.py +++ b/sdk/media/azure-mgmt-media/generated_samples/privateendpointconnectionput.py @@ -30,7 +30,7 @@ def main(): ) response = client.private_endpoint_connections.create_or_update( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contososports", name="connectionName1", parameters={ @@ -42,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/private-endpoint-connection-put.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2023-01-01/examples/private-endpoint-connection-put.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/privatelinkresourcesgetbyname.py b/sdk/media/azure-mgmt-media/generated_samples/privatelinkresourcesgetbyname.py index 9a2e9db8d2c4..3213e902136f 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/privatelinkresourcesgetbyname.py +++ b/sdk/media/azure-mgmt-media/generated_samples/privatelinkresourcesgetbyname.py @@ -30,13 +30,13 @@ def main(): ) response = client.private_link_resources.get( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contososports", name="keydelivery", ) print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/private-link-resources-get-by-name.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2023-01-01/examples/private-link-resources-get-by-name.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/privatelinkresourceslist.py b/sdk/media/azure-mgmt-media/generated_samples/privatelinkresourceslist.py index e31bbe53f6fe..22f945079131 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/privatelinkresourceslist.py +++ b/sdk/media/azure-mgmt-media/generated_samples/privatelinkresourceslist.py @@ -30,12 +30,12 @@ def main(): ) response = client.private_link_resources.list( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contososports", ) print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/examples/private-link-resources-list.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2023-01-01/examples/private-link-resources-list.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/streamingendpointcreate.py b/sdk/media/azure-mgmt-media/generated_samples/streamingendpointcreate.py index f48c1d95ac36..11e0e47404ac 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/streamingendpointcreate.py +++ b/sdk/media/azure-mgmt-media/generated_samples/streamingendpointcreate.py @@ -64,6 +64,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/streamingendpoint-create.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-11-01/examples/streamingendpoint-create.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/streamingendpointdelete.py b/sdk/media/azure-mgmt-media/generated_samples/streamingendpointdelete.py index 38b7401b0704..d3052cbe46d3 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/streamingendpointdelete.py +++ b/sdk/media/azure-mgmt-media/generated_samples/streamingendpointdelete.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/streamingendpoint-delete.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-11-01/examples/streamingendpoint-delete.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/streamingendpointlistall.py b/sdk/media/azure-mgmt-media/generated_samples/streamingendpointlistall.py index 4d32506013a5..3fda4110387c 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/streamingendpointlistall.py +++ b/sdk/media/azure-mgmt-media/generated_samples/streamingendpointlistall.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/streamingendpoint-list-all.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-11-01/examples/streamingendpoint-list-all.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/streamingendpointlistbyname.py b/sdk/media/azure-mgmt-media/generated_samples/streamingendpointlistbyname.py index a4bb9a6264d7..5364005f4e8d 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/streamingendpointlistbyname.py +++ b/sdk/media/azure-mgmt-media/generated_samples/streamingendpointlistbyname.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/streamingendpoint-list-by-name.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-11-01/examples/streamingendpoint-list-by-name.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/streamingendpointlistskus.py b/sdk/media/azure-mgmt-media/generated_samples/streamingendpointlistskus.py index cb23baefa9c8..facb7d713110 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/streamingendpointlistskus.py +++ b/sdk/media/azure-mgmt-media/generated_samples/streamingendpointlistskus.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/streamingendpoint-list-skus.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-11-01/examples/streamingendpoint-list-skus.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/streamingendpointoperationlocation.py b/sdk/media/azure-mgmt-media/generated_samples/streamingendpointoperationlocation.py index 88a979fd5b8b..8de7975f3e4a 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/streamingendpointoperationlocation.py +++ b/sdk/media/azure-mgmt-media/generated_samples/streamingendpointoperationlocation.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/streamingendpoint-operation-location.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-11-01/examples/streamingendpoint-operation-location.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/streamingendpointscale.py b/sdk/media/azure-mgmt-media/generated_samples/streamingendpointscale.py index 6ce791cd6fbe..1ce693e93966 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/streamingendpointscale.py +++ b/sdk/media/azure-mgmt-media/generated_samples/streamingendpointscale.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/streamingendpoint-scale.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-11-01/examples/streamingendpoint-scale.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/streamingendpointstart.py b/sdk/media/azure-mgmt-media/generated_samples/streamingendpointstart.py index 4f4e59aa8184..ee28562039a1 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/streamingendpointstart.py +++ b/sdk/media/azure-mgmt-media/generated_samples/streamingendpointstart.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/streamingendpoint-start.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-11-01/examples/streamingendpoint-start.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/streamingendpointstop.py b/sdk/media/azure-mgmt-media/generated_samples/streamingendpointstop.py index ebdd70a597b7..e00ed1d9fb06 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/streamingendpointstop.py +++ b/sdk/media/azure-mgmt-media/generated_samples/streamingendpointstop.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/streamingendpoint-stop.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-11-01/examples/streamingendpoint-stop.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/streamingendpointupdate.py b/sdk/media/azure-mgmt-media/generated_samples/streamingendpointupdate.py index 448e3183d0e6..958341c4f291 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/streamingendpointupdate.py +++ b/sdk/media/azure-mgmt-media/generated_samples/streamingendpointupdate.py @@ -42,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-08-01/examples/streamingendpoint-update.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-11-01/examples/streamingendpoint-update.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/streaminglocatorscreateclear.py b/sdk/media/azure-mgmt-media/generated_samples/streaminglocatorscreateclear.py index 6734a7c19e1d..72b3bca09d0a 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/streaminglocatorscreateclear.py +++ b/sdk/media/azure-mgmt-media/generated_samples/streaminglocatorscreateclear.py @@ -30,7 +30,7 @@ def main(): ) response = client.streaming_locators.create( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", streaming_locator_name="UserCreatedClearStreamingLocator", parameters={"properties": {"assetName": "ClimbingMountRainier", "streamingPolicyName": "clearStreamingPolicy"}}, @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-locators-create-clear.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/streaming-locators-create-clear.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/streaminglocatorscreatesecure.py b/sdk/media/azure-mgmt-media/generated_samples/streaminglocatorscreatesecure.py index 20728c4f80d2..df8ed1376389 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/streaminglocatorscreatesecure.py +++ b/sdk/media/azure-mgmt-media/generated_samples/streaminglocatorscreatesecure.py @@ -30,7 +30,7 @@ def main(): ) response = client.streaming_locators.create( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", streaming_locator_name="UserCreatedSecureStreamingLocator", parameters={ @@ -38,13 +38,13 @@ def main(): "assetName": "ClimbingMountRainier", "endTime": "2028-12-31T23:59:59.9999999Z", "startTime": "2018-03-01T00:00:00Z", - "streamingPolicyName": "secureStreamingPolicy", + "streamingPolicyName": "UserCreatedSecureStreamingPolicy", } }, ) print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-locators-create-secure.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/streaming-locators-create-secure.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/streaminglocatorscreatesecureuser_defined_content_keys.py b/sdk/media/azure-mgmt-media/generated_samples/streaminglocatorscreatesecureuser_defined_content_keys.py index 82437b6dd1cd..c2b2c6f46593 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/streaminglocatorscreatesecureuser_defined_content_keys.py +++ b/sdk/media/azure-mgmt-media/generated_samples/streaminglocatorscreatesecureuser_defined_content_keys.py @@ -30,7 +30,7 @@ def main(): ) response = client.streaming_locators.create( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", streaming_locator_name="UserCreatedSecureStreamingLocatorWithUserDefinedContentKeys", parameters={ @@ -61,6 +61,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-locators-create-secure-userDefinedContentKeys.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/streaming-locators-create-secure-userDefinedContentKeys.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/streaminglocatorsdelete.py b/sdk/media/azure-mgmt-media/generated_samples/streaminglocatorsdelete.py index cfcee8370d28..090af316f4ba 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/streaminglocatorsdelete.py +++ b/sdk/media/azure-mgmt-media/generated_samples/streaminglocatorsdelete.py @@ -30,13 +30,13 @@ def main(): ) response = client.streaming_locators.delete( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", streaming_locator_name="clearStreamingLocator", ) print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-locators-delete.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/streaming-locators-delete.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/streaminglocatorsgetbyname.py b/sdk/media/azure-mgmt-media/generated_samples/streaminglocatorsgetbyname.py index 71d6b34df2a8..70d13862af20 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/streaminglocatorsgetbyname.py +++ b/sdk/media/azure-mgmt-media/generated_samples/streaminglocatorsgetbyname.py @@ -30,13 +30,13 @@ def main(): ) response = client.streaming_locators.get( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", streaming_locator_name="clearStreamingLocator", ) print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-locators-get-by-name.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/streaming-locators-get-by-name.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/streaminglocatorslist.py b/sdk/media/azure-mgmt-media/generated_samples/streaminglocatorslist.py index 80f7fc328f8d..26179f4a2ac2 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/streaminglocatorslist.py +++ b/sdk/media/azure-mgmt-media/generated_samples/streaminglocatorslist.py @@ -30,13 +30,13 @@ def main(): ) response = client.streaming_locators.list( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", ) for item in response: print(item) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-locators-list.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/streaming-locators-list.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/streaminglocatorslistcontentkeys.py b/sdk/media/azure-mgmt-media/generated_samples/streaminglocatorslistcontentkeys.py index c58d7801b21e..a88332045108 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/streaminglocatorslistcontentkeys.py +++ b/sdk/media/azure-mgmt-media/generated_samples/streaminglocatorslistcontentkeys.py @@ -30,13 +30,13 @@ def main(): ) response = client.streaming_locators.list_content_keys( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", streaming_locator_name="secureStreamingLocator", ) print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-locators-list-content-keys.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/streaming-locators-list-content-keys.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/streaminglocatorslistpathsstreaminganddownload.py b/sdk/media/azure-mgmt-media/generated_samples/streaminglocatorslistpathsstreaminganddownload.py index afd78320e38e..5030a9157f6d 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/streaminglocatorslistpathsstreaminganddownload.py +++ b/sdk/media/azure-mgmt-media/generated_samples/streaminglocatorslistpathsstreaminganddownload.py @@ -30,13 +30,13 @@ def main(): ) response = client.streaming_locators.list_paths( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", streaming_locator_name="clearStreamingLocator", ) print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-locators-list-paths-streaming-and-download.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/streaming-locators-list-paths-streaming-and-download.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/streaminglocatorslistpathsstreamingonly.py b/sdk/media/azure-mgmt-media/generated_samples/streaminglocatorslistpathsstreamingonly.py index 669e71c4613d..b8aca6f6c5b0 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/streaminglocatorslistpathsstreamingonly.py +++ b/sdk/media/azure-mgmt-media/generated_samples/streaminglocatorslistpathsstreamingonly.py @@ -30,13 +30,13 @@ def main(): ) response = client.streaming_locators.list_paths( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", streaming_locator_name="secureStreamingLocator", ) print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-locators-list-paths-streaming-only.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/streaming-locators-list-paths-streaming-only.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/streamingpoliciescreateclear.py b/sdk/media/azure-mgmt-media/generated_samples/streamingpoliciescreateclear.py index ba259b5e9f26..f376673b6309 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/streamingpoliciescreateclear.py +++ b/sdk/media/azure-mgmt-media/generated_samples/streamingpoliciescreateclear.py @@ -30,9 +30,9 @@ def main(): ) response = client.streaming_policies.create( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", - streaming_policy_name="UserCreatedClearStreamingPolicy", + streaming_policy_name="clearStreamingPolicy", parameters={ "properties": { "noEncryption": { @@ -44,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-policies-create-clear.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/streaming-policies-create-clear.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/streamingpoliciescreatecommon_encryption_cbcsclear_key_encryption.py b/sdk/media/azure-mgmt-media/generated_samples/streamingpoliciescreatecommon_encryption_cbcsclear_key_encryption.py index 33249e6e6167..6bebe9e404fb 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/streamingpoliciescreatecommon_encryption_cbcsclear_key_encryption.py +++ b/sdk/media/azure-mgmt-media/generated_samples/streamingpoliciescreatecommon_encryption_cbcsclear_key_encryption.py @@ -30,7 +30,7 @@ def main(): ) response = client.streaming_policies.create( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", streaming_policy_name="UserCreatedSecureStreamingPolicyWithCommonEncryptionCbcsOnly", parameters={ @@ -49,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-policies-create-commonEncryptionCbcs-clearKeyEncryption.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/streaming-policies-create-commonEncryptionCbcs-clearKeyEncryption.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/streamingpoliciescreatecommon_encryption_cbcsonly.py b/sdk/media/azure-mgmt-media/generated_samples/streamingpoliciescreatecommon_encryption_cbcsonly.py index e2949b943217..6357dec85c34 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/streamingpoliciescreatecommon_encryption_cbcsonly.py +++ b/sdk/media/azure-mgmt-media/generated_samples/streamingpoliciescreatecommon_encryption_cbcsonly.py @@ -30,7 +30,7 @@ def main(): ) response = client.streaming_policies.create( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", streaming_policy_name="UserCreatedSecureStreamingPolicyWithCommonEncryptionCbcsOnly", parameters={ @@ -52,6 +52,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-policies-create-commonEncryptionCbcs-only.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/streaming-policies-create-commonEncryptionCbcs-only.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/streamingpoliciescreatecommon_encryption_cencclear_key_encryption.py b/sdk/media/azure-mgmt-media/generated_samples/streamingpoliciescreatecommon_encryption_cencclear_key_encryption.py index 2f45c0d3aa77..b10ed4ea5014 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/streamingpoliciescreatecommon_encryption_cencclear_key_encryption.py +++ b/sdk/media/azure-mgmt-media/generated_samples/streamingpoliciescreatecommon_encryption_cencclear_key_encryption.py @@ -30,7 +30,7 @@ def main(): ) response = client.streaming_policies.create( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", streaming_policy_name="UserCreatedSecureStreamingPolicyWithCommonEncryptionCencOnly", parameters={ @@ -52,6 +52,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-policies-create-commonEncryptionCenc-clearKeyEncryption.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/streaming-policies-create-commonEncryptionCenc-clearKeyEncryption.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/streamingpoliciescreatecommon_encryption_cenconly.py b/sdk/media/azure-mgmt-media/generated_samples/streamingpoliciescreatecommon_encryption_cenconly.py index 5dc1602dd33f..70285157db26 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/streamingpoliciescreatecommon_encryption_cenconly.py +++ b/sdk/media/azure-mgmt-media/generated_samples/streamingpoliciescreatecommon_encryption_cenconly.py @@ -30,7 +30,7 @@ def main(): ) response = client.streaming_policies.create( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", streaming_policy_name="UserCreatedSecureStreamingPolicyWithCommonEncryptionCencOnly", parameters={ @@ -58,6 +58,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-policies-create-commonEncryptionCenc-only.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/streaming-policies-create-commonEncryptionCenc-only.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/streamingpoliciescreateenvelope_encryptiononly.py b/sdk/media/azure-mgmt-media/generated_samples/streamingpoliciescreateenvelope_encryptiononly.py index 928db2e04888..7025f3073048 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/streamingpoliciescreateenvelope_encryptiononly.py +++ b/sdk/media/azure-mgmt-media/generated_samples/streamingpoliciescreateenvelope_encryptiononly.py @@ -30,7 +30,7 @@ def main(): ) response = client.streaming_policies.create( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", streaming_policy_name="UserCreatedSecureStreamingPolicyWithEnvelopeEncryptionOnly", parameters={ @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-policies-create-envelopeEncryption-only.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/streaming-policies-create-envelopeEncryption-only.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/streamingpoliciescreatesecurestreaming.py b/sdk/media/azure-mgmt-media/generated_samples/streamingpoliciescreatesecurestreaming.py index d903a8f6437b..3466d8e44b7c 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/streamingpoliciescreatesecurestreaming.py +++ b/sdk/media/azure-mgmt-media/generated_samples/streamingpoliciescreatesecurestreaming.py @@ -30,7 +30,7 @@ def main(): ) response = client.streaming_policies.create( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", streaming_policy_name="UserCreatedSecureStreamingPolicy", parameters={ @@ -73,6 +73,6 @@ def main(): print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-policies-create-secure-streaming.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/streaming-policies-create-secure-streaming.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/streamingpoliciesdelete.py b/sdk/media/azure-mgmt-media/generated_samples/streamingpoliciesdelete.py index 84fd3b72ec59..1a19fff4cc74 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/streamingpoliciesdelete.py +++ b/sdk/media/azure-mgmt-media/generated_samples/streamingpoliciesdelete.py @@ -30,13 +30,13 @@ def main(): ) response = client.streaming_policies.delete( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", streaming_policy_name="secureStreamingPolicyWithCommonEncryptionCbcsOnly", ) print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-policies-delete.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/streaming-policies-delete.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/streamingpolicieslist.py b/sdk/media/azure-mgmt-media/generated_samples/streamingpolicieslist.py index 245a734d1e6b..ed1fcde5ff0c 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/streamingpolicieslist.py +++ b/sdk/media/azure-mgmt-media/generated_samples/streamingpolicieslist.py @@ -30,13 +30,13 @@ def main(): ) response = client.streaming_policies.list( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", ) for item in response: print(item) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-policies-list.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/streaming-policies-list.json if __name__ == "__main__": main() diff --git a/sdk/media/azure-mgmt-media/generated_samples/streamingpolicygetbyname.py b/sdk/media/azure-mgmt-media/generated_samples/streamingpolicygetbyname.py index 1fc2b9ad4db2..dee0cd114539 100644 --- a/sdk/media/azure-mgmt-media/generated_samples/streamingpolicygetbyname.py +++ b/sdk/media/azure-mgmt-media/generated_samples/streamingpolicygetbyname.py @@ -30,13 +30,13 @@ def main(): ) response = client.streaming_policies.get( - resource_group_name="contoso", + resource_group_name="contosorg", account_name="contosomedia", streaming_policy_name="clearStreamingPolicy", ) print(response) -# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2022-08-01/examples/streaming-policy-get-by-name.json +# x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Metadata/stable/2023-01-01/examples/streaming-policy-get-by-name.json if __name__ == "__main__": main()