diff --git a/sdk/media/azure-mgmt-media/_meta.json b/sdk/media/azure-mgmt-media/_meta.json index 0ef5900c072e..2d7758dafc7c 100644 --- a/sdk/media/azure-mgmt-media/_meta.json +++ b/sdk/media/azure-mgmt-media/_meta.json @@ -1,7 +1,7 @@ { "autorest": "V2", "use": "@microsoft.azure/autorest.python@~4.0.71", - "commit": "d78e99bbaa8170a72c38d8a6dad8a896f9a5c636", + "commit": "c2ec03e5faa411e9a6785c15c3ddbd812e67ba7b", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest_command": "autorest specification/mediaservices/resource-manager/readme.md --keep-version-file --multiapi --no-async --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --use=@microsoft.azure/autorest.python@~4.0.71 --version=V2", "readme": "specification/mediaservices/resource-manager/readme.md" 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 aba56940f2d1..c0d61306138e 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 @@ -13,12 +13,12 @@ from msrest import Serializer, Deserializer from ._configuration import AzureMediaServicesConfiguration -from .operations import AccountFiltersOperations from .operations import Operations from .operations import MediaservicesOperations from .operations import PrivateLinkResourcesOperations from .operations import PrivateEndpointConnectionsOperations from .operations import LocationsOperations +from .operations import AccountFiltersOperations from .operations import AssetsOperations from .operations import AssetFiltersOperations from .operations import ContentKeyPoliciesOperations @@ -38,8 +38,6 @@ class AzureMediaServices(SDKClient): :ivar config: Configuration for client. :vartype config: AzureMediaServicesConfiguration - :ivar account_filters: AccountFilters operations - :vartype account_filters: azure.mgmt.media.operations.AccountFiltersOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.media.operations.Operations :ivar mediaservices: Mediaservices operations @@ -50,6 +48,8 @@ class AzureMediaServices(SDKClient): :vartype private_endpoint_connections: azure.mgmt.media.operations.PrivateEndpointConnectionsOperations :ivar locations: Locations operations :vartype locations: azure.mgmt.media.operations.LocationsOperations + :ivar account_filters: AccountFilters operations + :vartype account_filters: azure.mgmt.media.operations.AccountFiltersOperations :ivar assets: Assets operations :vartype assets: azure.mgmt.media.operations.AssetsOperations :ivar asset_filters: AssetFilters operations @@ -87,11 +87,10 @@ def __init__( super(AzureMediaServices, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2021-06-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) - self.account_filters = AccountFiltersOperations( - self._client, self.config, self._serialize, self._deserialize) self.operations = Operations( self._client, self.config, self._serialize, self._deserialize) self.mediaservices = MediaservicesOperations( @@ -102,6 +101,8 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.locations = LocationsOperations( self._client, self.config, self._serialize, self._deserialize) + self.account_filters = AccountFiltersOperations( + self._client, self.config, self._serialize, self._deserialize) self.assets = AssetsOperations( self._client, self.config, self._serialize, self._deserialize) self.asset_filters = AssetFiltersOperations( 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 60f6a467199f..3736892a5f39 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 @@ -17,7 +17,6 @@ from ._models_py3 import AccountFilter from ._models_py3 import AkamaiAccessControl from ._models_py3 import AkamaiSignatureHeaderAuthenticationKey - from ._models_py3 import ApiError, ApiErrorException from ._models_py3 import Asset from ._models_py3 import AssetContainerSas from ._models_py3 import AssetFileEncryptionMetadata @@ -72,6 +71,9 @@ from ._models_py3 import EnabledProtocols from ._models_py3 import EntityNameAvailabilityCheckOutput from ._models_py3 import EnvelopeEncryption + from ._models_py3 import ErrorAdditionalInfo + from ._models_py3 import ErrorDetail + from ._models_py3 import ErrorResponse, ErrorResponseException from ._models_py3 import FaceDetectorPreset from ._models_py3 import Filters from ._models_py3 import FilterTrackPropertyCondition @@ -126,7 +128,6 @@ from ._models_py3 import LiveEventPreviewAccessControl from ._models_py3 import LiveEventTranscription from ._models_py3 import LiveOutput - from ._models_py3 import Location from ._models_py3 import LogSpecification from ._models_py3 import MediaService from ._models_py3 import MediaServiceIdentity @@ -136,8 +137,8 @@ from ._models_py3 import Mp4Format from ._models_py3 import MultiBitrateFormat from ._models_py3 import NoEncryption - from ._models_py3 import ODataError from ._models_py3 import Operation + from ._models_py3 import OperationCollection from ._models_py3 import OperationDisplay from ._models_py3 import OutputFile from ._models_py3 import Overlay @@ -146,6 +147,7 @@ from ._models_py3 import PngLayer from ._models_py3 import PresentationTimeRange from ._models_py3 import Preset + from ._models_py3 import PresetConfigurations from ._models_py3 import PrivateEndpoint from ._models_py3 import PrivateEndpointConnection from ._models_py3 import PrivateEndpointConnectionListResult @@ -153,10 +155,10 @@ from ._models_py3 import PrivateLinkResourceListResult from ._models_py3 import PrivateLinkServiceConnectionState from ._models_py3 import Properties - from ._models_py3 import Provider from ._models_py3 import ProxyResource from ._models_py3 import Rectangle from ._models_py3 import Resource + from ._models_py3 import ResourceIdentity from ._models_py3 import SelectAudioTrackByAttribute from ._models_py3 import SelectAudioTrackById from ._models_py3 import SelectVideoTrackByAttribute @@ -186,6 +188,7 @@ from ._models_py3 import Transform from ._models_py3 import TransformOutput from ._models_py3 import TransportStreamFormat + from ._models_py3 import UserAssignedManagedIdentity from ._models_py3 import UtcClipTime from ._models_py3 import Video from ._models_py3 import VideoAnalyzerPreset @@ -200,7 +203,6 @@ from ._models import AccountFilter from ._models import AkamaiAccessControl from ._models import AkamaiSignatureHeaderAuthenticationKey - from ._models import ApiError, ApiErrorException from ._models import Asset from ._models import AssetContainerSas from ._models import AssetFileEncryptionMetadata @@ -255,6 +257,9 @@ from ._models import EnabledProtocols from ._models import EntityNameAvailabilityCheckOutput from ._models import EnvelopeEncryption + from ._models import ErrorAdditionalInfo + from ._models import ErrorDetail + from ._models import ErrorResponse, ErrorResponseException from ._models import FaceDetectorPreset from ._models import Filters from ._models import FilterTrackPropertyCondition @@ -309,7 +314,6 @@ from ._models import LiveEventPreviewAccessControl from ._models import LiveEventTranscription from ._models import LiveOutput - from ._models import Location from ._models import LogSpecification from ._models import MediaService from ._models import MediaServiceIdentity @@ -319,8 +323,8 @@ from ._models import Mp4Format from ._models import MultiBitrateFormat from ._models import NoEncryption - from ._models import ODataError from ._models import Operation + from ._models import OperationCollection from ._models import OperationDisplay from ._models import OutputFile from ._models import Overlay @@ -329,6 +333,7 @@ from ._models import PngLayer from ._models import PresentationTimeRange from ._models import Preset + from ._models import PresetConfigurations from ._models import PrivateEndpoint from ._models import PrivateEndpointConnection from ._models import PrivateEndpointConnectionListResult @@ -336,10 +341,10 @@ from ._models import PrivateLinkResourceListResult from ._models import PrivateLinkServiceConnectionState from ._models import Properties - from ._models import Provider from ._models import ProxyResource from ._models import Rectangle from ._models import Resource + from ._models import ResourceIdentity from ._models import SelectAudioTrackByAttribute from ._models import SelectAudioTrackById from ._models import SelectVideoTrackByAttribute @@ -369,6 +374,7 @@ from ._models import Transform from ._models import TransformOutput from ._models import TransportStreamFormat + from ._models import UserAssignedManagedIdentity from ._models import UtcClipTime from ._models import Video from ._models import VideoAnalyzerPreset @@ -383,15 +389,11 @@ from ._paged_models import LiveEventPaged from ._paged_models import LiveOutputPaged from ._paged_models import MediaServicePaged -from ._paged_models import OperationPaged from ._paged_models import StreamingEndpointPaged from ._paged_models import StreamingLocatorPaged from ._paged_models import StreamingPolicyPaged from ._paged_models import TransformPaged from ._azure_media_services_enums import ( - FilterTrackPropertyType, - FilterTrackPropertyCompareOperation, - CreatedByType, MetricUnit, MetricAggregationType, ActionType, @@ -399,9 +401,12 @@ StorageAuthentication, AccountEncryptionKeyType, DefaultAction, - ManagedIdentityType, + PublicNetworkAccess, + CreatedByType, PrivateEndpointConnectionProvisioningState, PrivateEndpointServiceConnectionStatus, + FilterTrackPropertyType, + FilterTrackPropertyCompareOperation, AssetStorageEncryptionFormat, AssetContainerPermission, ContentKeyPolicyPlayReadyUnknownOutputPassingOption, @@ -427,6 +432,8 @@ H264VideoProfile, EntropyMode, H264Complexity, + Complexity, + InterleaveOutput, EncoderNamedPreset, InsightsType, OnErrorType, @@ -456,7 +463,6 @@ 'AccountFilter', 'AkamaiAccessControl', 'AkamaiSignatureHeaderAuthenticationKey', - 'ApiError', 'ApiErrorException', 'Asset', 'AssetContainerSas', 'AssetFileEncryptionMetadata', @@ -511,6 +517,9 @@ 'EnabledProtocols', 'EntityNameAvailabilityCheckOutput', 'EnvelopeEncryption', + 'ErrorAdditionalInfo', + 'ErrorDetail', + 'ErrorResponse', 'ErrorResponseException', 'FaceDetectorPreset', 'Filters', 'FilterTrackPropertyCondition', @@ -565,7 +574,6 @@ 'LiveEventPreviewAccessControl', 'LiveEventTranscription', 'LiveOutput', - 'Location', 'LogSpecification', 'MediaService', 'MediaServiceIdentity', @@ -575,8 +583,8 @@ 'Mp4Format', 'MultiBitrateFormat', 'NoEncryption', - 'ODataError', 'Operation', + 'OperationCollection', 'OperationDisplay', 'OutputFile', 'Overlay', @@ -585,6 +593,7 @@ 'PngLayer', 'PresentationTimeRange', 'Preset', + 'PresetConfigurations', 'PrivateEndpoint', 'PrivateEndpointConnection', 'PrivateEndpointConnectionListResult', @@ -592,10 +601,10 @@ 'PrivateLinkResourceListResult', 'PrivateLinkServiceConnectionState', 'Properties', - 'Provider', 'ProxyResource', 'Rectangle', 'Resource', + 'ResourceIdentity', 'SelectAudioTrackByAttribute', 'SelectAudioTrackById', 'SelectVideoTrackByAttribute', @@ -625,15 +634,15 @@ 'Transform', 'TransformOutput', 'TransportStreamFormat', + 'UserAssignedManagedIdentity', 'UtcClipTime', 'Video', 'VideoAnalyzerPreset', 'VideoLayer', 'VideoOverlay', 'VideoTrackDescriptor', - 'AccountFilterPaged', - 'OperationPaged', 'MediaServicePaged', + 'AccountFilterPaged', 'AssetPaged', 'AssetFilterPaged', 'ContentKeyPolicyPaged', @@ -644,9 +653,6 @@ 'LiveEventPaged', 'LiveOutputPaged', 'StreamingEndpointPaged', - 'FilterTrackPropertyType', - 'FilterTrackPropertyCompareOperation', - 'CreatedByType', 'MetricUnit', 'MetricAggregationType', 'ActionType', @@ -654,9 +660,12 @@ 'StorageAuthentication', 'AccountEncryptionKeyType', 'DefaultAction', - 'ManagedIdentityType', + 'PublicNetworkAccess', + 'CreatedByType', 'PrivateEndpointConnectionProvisioningState', 'PrivateEndpointServiceConnectionStatus', + 'FilterTrackPropertyType', + 'FilterTrackPropertyCompareOperation', 'AssetStorageEncryptionFormat', 'AssetContainerPermission', 'ContentKeyPolicyPlayReadyUnknownOutputPassingOption', @@ -682,6 +691,8 @@ 'H264VideoProfile', 'EntropyMode', 'H264Complexity', + 'Complexity', + 'InterleaveOutput', 'EncoderNamedPreset', 'InsightsType', 'OnErrorType', 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 5513e1cab62d..230c4ec6aad9 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 @@ -12,30 +12,6 @@ from enum import Enum -class FilterTrackPropertyType(str, Enum): - - unknown = "Unknown" #: The unknown track property type. - type = "Type" #: The type. - name = "Name" #: The name. - language = "Language" #: The language. - four_cc = "FourCC" #: The fourCC. - bitrate = "Bitrate" #: The bitrate. - - -class FilterTrackPropertyCompareOperation(str, Enum): - - equal = "Equal" #: The equal operation. - not_equal = "NotEqual" #: The not equal operation. - - -class CreatedByType(str, Enum): - - user = "User" - application = "Application" - managed_identity = "ManagedIdentity" - key = "Key" - - class MetricUnit(str, Enum): bytes = "Bytes" #: The number of bytes. @@ -79,10 +55,18 @@ class DefaultAction(str, Enum): deny = "Deny" #: Public IP addresses are blocked. -class ManagedIdentityType(str, Enum): +class PublicNetworkAccess(str, Enum): + + enabled = "Enabled" #: Public network access is enabled. + disabled = "Disabled" #: Public network access is disabled. + + +class CreatedByType(str, Enum): - system_assigned = "SystemAssigned" #: A system-assigned managed identity. - none = "None" #: No managed identity. + user = "User" + application = "Application" + managed_identity = "ManagedIdentity" + key = "Key" class PrivateEndpointConnectionProvisioningState(str, Enum): @@ -100,6 +84,22 @@ class PrivateEndpointServiceConnectionStatus(str, Enum): rejected = "Rejected" +class FilterTrackPropertyType(str, Enum): + + unknown = "Unknown" #: The unknown track property type. + type = "Type" #: The type. + name = "Name" #: The name. + language = "Language" #: The language. + four_cc = "FourCC" #: The fourCC. + bitrate = "Bitrate" #: The bitrate. + + +class FilterTrackPropertyCompareOperation(str, Enum): + + equal = "Equal" #: The equal operation. + not_equal = "NotEqual" #: The not equal operation. + + class AssetStorageEncryptionFormat(str, Enum): none = "None" #: The Asset does not use client-side storage encryption (this is the only allowed value for new Assets). @@ -287,6 +287,19 @@ class H264Complexity(str, Enum): 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 Complexity(str, Enum): + + speed = "Speed" #: 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 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 InterleaveOutput(str, Enum): + + non_interleaved_output = "NonInterleavedOutput" #: The output is video-only or audio-only. + interleaved_output = "InterleavedOutput" #: The output includes both audio and video. + + class EncoderNamedPreset(str, Enum): h264_single_bitrate_sd = "H264SingleBitrateSD" #: 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. @@ -416,9 +429,11 @@ class LiveEventInputProtocol(str, Enum): class LiveEventEncodingType(str, Enum): - none = "None" #: A contribution live encoder sends a multiple bitrate stream. The ingested stream passes through the live event without any further processing. It is also called the pass-through mode. + none = "None" #: 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 720p in resolution. premium1080p = "Premium1080p" #: 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. 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 LiveEventResourceState(str, Enum): diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/models/_models.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/models/_models.py index dde71d02f903..02cff3047b0e 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/models/_models.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/models/_models.py @@ -221,6 +221,9 @@ def __init__(self, **kwargs): class AccountEncryption(Model): """AccountEncryption. + Variables are only populated by the server, and will be ignored when + sending a request. + All required parameters must be populated in order to send to Azure. :param type: Required. The type of key used to encrypt the Account Key. @@ -229,21 +232,30 @@ class AccountEncryption(Model): :param key_vault_properties: The properties of the key used to encrypt the account. :type key_vault_properties: ~azure.mgmt.media.models.KeyVaultProperties + :param identity: The Key Vault identity. + :type identity: ~azure.mgmt.media.models.ResourceIdentity + :ivar status: The current status of the Key Vault mapping. + :vartype status: str """ _validation = { 'type': {'required': True}, + 'status': {'readonly': True}, } _attribute_map = { 'type': {'key': 'type', 'type': 'str'}, 'key_vault_properties': {'key': 'keyVaultProperties', 'type': 'KeyVaultProperties'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'status': {'key': 'status', 'type': 'str'}, } def __init__(self, **kwargs): super(AccountEncryption, self).__init__(**kwargs) self.type = kwargs.get('type', None) self.key_vault_properties = kwargs.get('key_vault_properties', None) + self.identity = kwargs.get('identity', None) + self.status = None class Resource(Model): @@ -411,34 +423,6 @@ def __init__(self, **kwargs): self.expiration = kwargs.get('expiration', None) -class ApiError(Model): - """The API error. - - :param error: The error properties. - :type error: ~azure.mgmt.media.models.ODataError - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ODataError'}, - } - - def __init__(self, **kwargs): - super(ApiError, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class ApiErrorException(HttpOperationError): - """Server responsed with exception of type: 'ApiError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ApiErrorException, self).__init__(deserialize, response, 'ApiError', *args) - - class Asset(ProxyResource): """An Asset. @@ -1008,6 +992,10 @@ class BuiltInStandardEncoderPreset(Preset): :param odatatype: Required. Constant filled by server. :type odatatype: str + :param configurations: PresetConfigurations are only supported for the + ContentAwareEncoding and H265ContentAwareEncoding built-in presets. These + settings will not affect other built-in or custom defined presets. + :type configurations: ~azure.mgmt.media.models.PresetConfigurations :param preset_name: Required. The built-in preset to be used for encoding videos. Possible values include: 'H264SingleBitrateSD', 'H264SingleBitrate720p', 'H264SingleBitrate1080p', 'AdaptiveStreaming', @@ -1027,11 +1015,13 @@ class BuiltInStandardEncoderPreset(Preset): _attribute_map = { 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'configurations': {'key': 'configurations', 'type': 'PresetConfigurations'}, 'preset_name': {'key': 'presetName', 'type': 'str'}, } def __init__(self, **kwargs): super(BuiltInStandardEncoderPreset, self).__init__(**kwargs) + self.configurations = kwargs.get('configurations', None) self.preset_name = kwargs.get('preset_name', None) self.odatatype = '#Microsoft.Media.BuiltInStandardEncoderPreset' @@ -2393,6 +2383,110 @@ def __init__(self, **kwargs): self.custom_key_acquisition_url_template = kwargs.get('custom_key_acquisition_url_template', None) +class ErrorAdditionalInfo(Model): + """The resource management error additional info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: object + """ + + _validation = { + 'type': {'readonly': True}, + 'info': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None + + +class ErrorDetail(Model): + """The error detail. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: list[~azure.mgmt.media.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: + list[~azure.mgmt.media.models.ErrorAdditionalInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__(self, **kwargs): + super(ErrorDetail, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + +class ErrorResponse(Model): + """Error response. + + Common error response for all Azure Resource Manager APIs to return error + details for failed operations. (This also follows the OData error response + format.). + + :param error: The error object. + :type error: ~azure.mgmt.media.models.ErrorDetail + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + 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. @@ -3744,7 +3838,8 @@ class JobInputClip(JobInput): :param odatatype: Required. Constant filled by server. :type odatatype: str :param files: List of files. Required for JobInputHttp. Maximum of 4000 - characters each. + characters each. Query strings will not be returned in service responses + to prevent sensitive data exposure. :type files: list[str] :param start: Defines a point on the timeline of the input media at which processing will start. Defaults to the beginning of the input media. @@ -3800,7 +3895,8 @@ class JobInputAsset(JobInputClip): :param odatatype: Required. Constant filled by server. :type odatatype: str :param files: List of files. Required for JobInputHttp. Maximum of 4000 - characters each. + characters each. Query strings will not be returned in service responses + to prevent sensitive data exposure. :type files: list[str] :param start: Defines a point on the timeline of the input media at which processing will start. Defaults to the beginning of the input media. @@ -3852,7 +3948,8 @@ class JobInputHttp(JobInputClip): :param odatatype: Required. Constant filled by server. :type odatatype: str :param files: List of files. Required for JobInputHttp. Maximum of 4000 - characters each. + characters each. Query strings will not be returned in service responses + to prevent sensitive data exposure. :type files: list[str] :param start: Defines a point on the timeline of the input media at which processing will start. Defaults to the beginning of the input media. @@ -3874,7 +3971,8 @@ class JobInputHttp(JobInputClip): :param base_uri: Base URI for HTTPS job input. It will be concatenated with provided file names. If no base uri is given, then the provided file list is assumed to be fully qualified uris. Maximum length of 4000 - characters. + characters. The query strings will not be returned in service responses to + prevent sensitive data exposure. :type base_uri: str """ @@ -3965,6 +4063,9 @@ class JobOutput(Model): :ivar error: If the JobOutput is in the Error state, it contains the details of the error. :vartype error: ~azure.mgmt.media.models.JobError + :param preset_override: A preset used to override the preset in the + corresponding transform output. + :type preset_override: ~azure.mgmt.media.models.Preset :ivar state: Describes the state of the JobOutput. Possible values include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', 'Scheduled' @@ -4008,6 +4109,7 @@ class JobOutput(Model): _attribute_map = { 'error': {'key': 'error', 'type': 'JobError'}, + 'preset_override': {'key': 'presetOverride', 'type': 'Preset'}, 'state': {'key': 'state', 'type': 'str'}, 'progress': {'key': 'progress', 'type': 'int'}, 'label': {'key': 'label', 'type': 'str'}, @@ -4023,6 +4125,7 @@ class JobOutput(Model): def __init__(self, **kwargs): super(JobOutput, self).__init__(**kwargs) self.error = None + self.preset_override = kwargs.get('preset_override', None) self.state = None self.progress = None self.label = kwargs.get('label', None) @@ -4042,6 +4145,9 @@ class JobOutputAsset(JobOutput): :ivar error: If the JobOutput is in the Error state, it contains the details of the error. :vartype error: ~azure.mgmt.media.models.JobError + :param preset_override: A preset used to override the preset in the + corresponding transform output. + :type preset_override: ~azure.mgmt.media.models.Preset :ivar state: Describes the state of the JobOutput. Possible values include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', 'Scheduled' @@ -4088,6 +4194,7 @@ class JobOutputAsset(JobOutput): _attribute_map = { 'error': {'key': 'error', 'type': 'JobError'}, + 'preset_override': {'key': 'presetOverride', 'type': 'Preset'}, 'state': {'key': 'state', 'type': 'str'}, 'progress': {'key': 'progress', 'type': 'int'}, 'label': {'key': 'label', 'type': 'str'}, @@ -4620,13 +4727,15 @@ class LiveEventEncoding(Model): """Specifies the live event type and optional encoding settings for encoding live events. - :param encoding_type: Live event type. When encodingType is set to None, - the service simply passes through the incoming video and audio layer(s) to - the output. When encodingType is set to Standard or Premium1080p, a live - encoder transcodes the incoming stream into multiple bitrates or layers. - See https://go.microsoft.com/fwlink/?linkid=2095101 for more information. - This property cannot be modified after the live event is created. Possible - values include: 'None', 'Standard', 'Premium1080p' + :param 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 the output. When encodingType is + set to Standard or Premium1080p, a live encoder transcodes the incoming + stream into multiple bitrates or layers. See + https://go.microsoft.com/fwlink/?linkid=2095101 for more information. This + property cannot be modified after the live event is created. Possible + values include: 'None', 'Standard', 'Premium1080p', 'PassthroughBasic', + 'PassthroughStandard' :type encoding_type: str or ~azure.mgmt.media.models.LiveEventEncodingType :param preset_name: The optional encoding preset name, used when encodingType is not None. This value is specified at creation time and @@ -4941,6 +5050,8 @@ class LiveOutput(ProxyResource): values include: 'Creating', 'Running', 'Deleting' :vartype resource_state: str or ~azure.mgmt.media.models.LiveOutputResourceState + :ivar system_data: The system metadata relating to this resource. + :vartype system_data: ~azure.mgmt.media.models.SystemData """ _validation = { @@ -4953,6 +5064,7 @@ class LiveOutput(ProxyResource): 'last_modified': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'resource_state': {'readonly': True}, + 'system_data': {'readonly': True}, } _attribute_map = { @@ -4969,6 +5081,7 @@ class LiveOutput(ProxyResource): 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__(self, **kwargs): @@ -4983,28 +5096,7 @@ def __init__(self, **kwargs): self.last_modified = None self.provisioning_state = None self.resource_state = None - - -class Location(Model): - """Location. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. - :type name: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Location, self).__init__(**kwargs) - self.name = kwargs.get('name', None) + self.system_data = None class LogSpecification(Model): @@ -5073,6 +5165,11 @@ class MediaService(TrackedResource): :param key_delivery: The Key Delivery properties for Media Services account. :type key_delivery: ~azure.mgmt.media.models.KeyDelivery + :param public_network_access: Whether or not public network access is + allowed for resources under the Media Services account. Possible values + include: 'Enabled', 'Disabled' + :type public_network_access: str or + ~azure.mgmt.media.models.PublicNetworkAccess :param identity: The Managed Identity for the Media Services account. :type identity: ~azure.mgmt.media.models.MediaServiceIdentity :ivar system_data: The system metadata relating to this resource. @@ -5099,6 +5196,7 @@ class MediaService(TrackedResource): 'storage_authentication': {'key': 'properties.storageAuthentication', 'type': 'str'}, 'encryption': {'key': 'properties.encryption', 'type': 'AccountEncryption'}, 'key_delivery': {'key': 'properties.keyDelivery', 'type': 'KeyDelivery'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, 'identity': {'key': 'identity', 'type': 'MediaServiceIdentity'}, 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } @@ -5110,6 +5208,7 @@ def __init__(self, **kwargs): self.storage_authentication = kwargs.get('storage_authentication', None) self.encryption = kwargs.get('encryption', None) self.key_delivery = kwargs.get('key_delivery', None) + self.public_network_access = kwargs.get('public_network_access', None) self.identity = kwargs.get('identity', None) self.system_data = None @@ -5122,13 +5221,15 @@ class MediaServiceIdentity(Model): All required parameters must be populated in order to send to Azure. - :param type: Required. The identity type. Possible values include: - 'SystemAssigned', 'None' - :type type: str or ~azure.mgmt.media.models.ManagedIdentityType + :param type: Required. The identity type. + :type type: str :ivar principal_id: The Principal ID of the identity. :vartype principal_id: str :ivar tenant_id: The Tenant ID of the identity. :vartype tenant_id: str + :param user_assigned_identities: The user assigned managed identities. + :type user_assigned_identities: dict[str, + ~azure.mgmt.media.models.UserAssignedManagedIdentity] """ _validation = { @@ -5141,6 +5242,7 @@ class MediaServiceIdentity(Model): 'type': {'key': 'type', 'type': 'str'}, 'principal_id': {'key': 'principalId', 'type': 'str'}, 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedManagedIdentity}'}, } def __init__(self, **kwargs): @@ -5148,6 +5250,7 @@ def __init__(self, **kwargs): self.type = kwargs.get('type', None) self.principal_id = None self.tenant_id = None + self.user_assigned_identities = kwargs.get('user_assigned_identities', None) class MediaServiceUpdate(Model): @@ -5171,6 +5274,11 @@ class MediaServiceUpdate(Model): :param key_delivery: The Key Delivery properties for Media Services account. :type key_delivery: ~azure.mgmt.media.models.KeyDelivery + :param public_network_access: Whether or not public network access is + allowed for resources under the Media Services account. Possible values + include: 'Enabled', 'Disabled' + :type public_network_access: str or + ~azure.mgmt.media.models.PublicNetworkAccess :param identity: The Managed Identity for the Media Services account. :type identity: ~azure.mgmt.media.models.MediaServiceIdentity """ @@ -5186,6 +5294,7 @@ class MediaServiceUpdate(Model): 'storage_authentication': {'key': 'properties.storageAuthentication', 'type': 'str'}, 'encryption': {'key': 'properties.encryption', 'type': 'AccountEncryption'}, 'key_delivery': {'key': 'properties.keyDelivery', 'type': 'KeyDelivery'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, 'identity': {'key': 'identity', 'type': 'MediaServiceIdentity'}, } @@ -5197,6 +5306,7 @@ def __init__(self, **kwargs): self.storage_authentication = kwargs.get('storage_authentication', None) self.encryption = kwargs.get('encryption', None) self.key_delivery = kwargs.get('key_delivery', None) + self.public_network_access = kwargs.get('public_network_access', None) self.identity = kwargs.get('identity', None) @@ -5428,35 +5538,6 @@ def __init__(self, **kwargs): self.enabled_protocols = kwargs.get('enabled_protocols', None) -class ODataError(Model): - """Information about an error. - - :param code: A language-independent error name. - :type code: str - :param message: The error message. - :type message: str - :param target: The target of the error (for example, the name of the - property in error). - :type target: str - :param details: The error details. - :type details: list[~azure.mgmt.media.models.ODataError] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ODataError]'}, - } - - def __init__(self, **kwargs): - super(ODataError, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.target = kwargs.get('target', None) - self.details = kwargs.get('details', None) - - class Operation(Model): """An operation. @@ -5500,6 +5581,22 @@ def __init__(self, **kwargs): self.action_type = kwargs.get('action_type', None) +class OperationCollection(Model): + """A collection of Operation items. + + :param value: A collection of Operation items. + :type value: list[~azure.mgmt.media.models.Operation] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + } + + def __init__(self, **kwargs): + super(OperationCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + class OperationDisplay(Model): """Operation details. @@ -5754,6 +5851,68 @@ def __init__(self, **kwargs): self.force_end_timestamp = kwargs.get('force_end_timestamp', None) +class PresetConfigurations(Model): + """An object of optional configuration settings for encoder. + + :param 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 compression efficiency. Possible values + include: 'Speed', 'Balanced', 'Quality' + :type complexity: str or ~azure.mgmt.media.models.Complexity + :param interleave_output: Sets the interleave mode of the output to + control how audio and video are stored in the container format. Example: + set InterleavedOutput as NonInterleavedOutput to produce audio-only and + video-only outputs in separate MP4 files. Possible values include: + 'NonInterleavedOutput', 'InterleavedOutput' + :type interleave_output: str or ~azure.mgmt.media.models.InterleaveOutput + :param key_frame_interval_in_seconds: The key frame interval in seconds. + Example: set KeyFrameIntervalInSeconds as 2 to reduce the playback + buffering for some players. + :type key_frame_interval_in_seconds: float + :param max_bitrate_bps: The maximum bitrate in bits per second (threshold + for the top video layer). Example: set MaxBitrateBps as 6000000 to avoid + producing very high bitrate outputs for contents with high complexity. + :type max_bitrate_bps: int + :param max_height: The maximum height of output video layers. Example: set + MaxHeight as 720 to produce output layers up to 720P even if the input is + 4K. + :type max_height: int + :param max_layers: The maximum number of output video layers. Example: set + MaxLayers as 4 to make sure at most 4 output layers are produced to + control the overall cost of the encoding job. + :type max_layers: int + :param min_bitrate_bps: The minimum bitrate in bits per second (threshold + for the bottom video layer). Example: set MinBitrateBps as 200000 to have + a bottom layer that covers users with low network bandwidth. + :type min_bitrate_bps: int + :param min_height: The minimum height of output video layers. Example: set + MinHeight as 360 to avoid output layers of smaller resolutions like 180P. + :type min_height: int + """ + + _attribute_map = { + 'complexity': {'key': 'complexity', 'type': 'str'}, + 'interleave_output': {'key': 'interleaveOutput', 'type': 'str'}, + 'key_frame_interval_in_seconds': {'key': 'keyFrameIntervalInSeconds', 'type': 'float'}, + 'max_bitrate_bps': {'key': 'maxBitrateBps', 'type': 'int'}, + 'max_height': {'key': 'maxHeight', 'type': 'int'}, + 'max_layers': {'key': 'maxLayers', 'type': 'int'}, + 'min_bitrate_bps': {'key': 'minBitrateBps', 'type': 'int'}, + 'min_height': {'key': 'minHeight', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(PresetConfigurations, self).__init__(**kwargs) + self.complexity = kwargs.get('complexity', None) + self.interleave_output = kwargs.get('interleave_output', None) + self.key_frame_interval_in_seconds = kwargs.get('key_frame_interval_in_seconds', None) + self.max_bitrate_bps = kwargs.get('max_bitrate_bps', None) + self.max_height = kwargs.get('max_height', None) + self.max_layers = kwargs.get('max_layers', None) + self.min_bitrate_bps = kwargs.get('min_bitrate_bps', None) + self.min_height = kwargs.get('min_height', None) + + class PrivateEndpoint(Model): """The Private Endpoint resource. @@ -5963,28 +6122,6 @@ def __init__(self, **kwargs): self.service_specification = None -class Provider(Model): - """A resource provider. - - All required parameters must be populated in order to send to Azure. - - :param provider_name: Required. The provider name. - :type provider_name: str - """ - - _validation = { - 'provider_name': {'required': True}, - } - - _attribute_map = { - 'provider_name': {'key': 'providerName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Provider, self).__init__(**kwargs) - self.provider_name = kwargs.get('provider_name', None) - - class Rectangle(Model): """Describes the properties of a rectangular window applied to the input media before processing it. @@ -6022,6 +6159,35 @@ def __init__(self, **kwargs): self.height = kwargs.get('height', None) +class ResourceIdentity(Model): + """ResourceIdentity. + + All required parameters must be populated in order to send to Azure. + + :param user_assigned_identity: The user assigned managed identity's ARM ID + to use when accessing a resource. + :type user_assigned_identity: str + :param use_system_assigned_identity: Required. Indicates whether to use + System Assigned Managed Identity. Mutual exclusive with User Assigned + Managed Identity. + :type use_system_assigned_identity: bool + """ + + _validation = { + 'use_system_assigned_identity': {'required': True}, + } + + _attribute_map = { + 'user_assigned_identity': {'key': 'userAssignedIdentity', 'type': 'str'}, + 'use_system_assigned_identity': {'key': 'useSystemAssignedIdentity', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ResourceIdentity, self).__init__(**kwargs) + self.user_assigned_identity = kwargs.get('user_assigned_identity', None) + self.use_system_assigned_identity = kwargs.get('use_system_assigned_identity', None) + + class SelectAudioTrackByAttribute(AudioTrackDescriptor): """Select audio tracks from the input by specifying an attribute and an attribute filter. @@ -6277,6 +6443,9 @@ def __init__(self, **kwargs): class StorageAccount(Model): """The storage account details. + Variables are only populated by the server, and will be ignored when + sending a request. + All required parameters must be populated in order to send to Azure. :param id: The ID of the storage account resource. Media Services relies @@ -6288,21 +6457,30 @@ class StorageAccount(Model): :param type: Required. The type of the storage account. Possible values include: 'Primary', 'Secondary' :type type: str or ~azure.mgmt.media.models.StorageAccountType + :param identity: The storage account identity. + :type identity: ~azure.mgmt.media.models.ResourceIdentity + :ivar status: The current status of the storage account mapping. + :vartype status: str """ _validation = { 'type': {'required': True}, + 'status': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'status': {'key': 'status', 'type': 'str'}, } def __init__(self, **kwargs): super(StorageAccount, self).__init__(**kwargs) self.id = kwargs.get('id', None) self.type = kwargs.get('type', None) + self.identity = kwargs.get('identity', None) + self.status = None class StorageEncryptedAssetDecryptionData(Model): @@ -7120,6 +7298,34 @@ def __init__(self, **kwargs): self.odatatype = '#Microsoft.Media.TransportStreamFormat' +class UserAssignedManagedIdentity(Model): + """UserAssignedManagedIdentity. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar client_id: The client ID. + :vartype client_id: str + :ivar principal_id: The principal ID. + :vartype principal_id: str + """ + + _validation = { + 'client_id': {'readonly': True}, + 'principal_id': {'readonly': True}, + } + + _attribute_map = { + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserAssignedManagedIdentity, self).__init__(**kwargs) + self.client_id = None + self.principal_id = None + + 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 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 20d9e7ff377c..b479be157036 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 @@ -221,6 +221,9 @@ def __init__(self, *, default_action=None, ip_allow_list=None, **kwargs) -> None class AccountEncryption(Model): """AccountEncryption. + Variables are only populated by the server, and will be ignored when + sending a request. + All required parameters must be populated in order to send to Azure. :param type: Required. The type of key used to encrypt the Account Key. @@ -229,21 +232,30 @@ class AccountEncryption(Model): :param key_vault_properties: The properties of the key used to encrypt the account. :type key_vault_properties: ~azure.mgmt.media.models.KeyVaultProperties + :param identity: The Key Vault identity. + :type identity: ~azure.mgmt.media.models.ResourceIdentity + :ivar status: The current status of the Key Vault mapping. + :vartype status: str """ _validation = { 'type': {'required': True}, + 'status': {'readonly': True}, } _attribute_map = { 'type': {'key': 'type', 'type': 'str'}, 'key_vault_properties': {'key': 'keyVaultProperties', 'type': 'KeyVaultProperties'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'status': {'key': 'status', 'type': 'str'}, } - def __init__(self, *, type, key_vault_properties=None, **kwargs) -> None: + def __init__(self, *, type, key_vault_properties=None, identity=None, **kwargs) -> None: super(AccountEncryption, self).__init__(**kwargs) self.type = type self.key_vault_properties = key_vault_properties + self.identity = identity + self.status = None class Resource(Model): @@ -411,34 +423,6 @@ def __init__(self, *, identifier: str=None, base64_key: str=None, expiration=Non self.expiration = expiration -class ApiError(Model): - """The API error. - - :param error: The error properties. - :type error: ~azure.mgmt.media.models.ODataError - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ODataError'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(ApiError, self).__init__(**kwargs) - self.error = error - - -class ApiErrorException(HttpOperationError): - """Server responsed with exception of type: 'ApiError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ApiErrorException, self).__init__(deserialize, response, 'ApiError', *args) - - class Asset(ProxyResource): """An Asset. @@ -1008,6 +992,10 @@ class BuiltInStandardEncoderPreset(Preset): :param odatatype: Required. Constant filled by server. :type odatatype: str + :param configurations: PresetConfigurations are only supported for the + ContentAwareEncoding and H265ContentAwareEncoding built-in presets. These + settings will not affect other built-in or custom defined presets. + :type configurations: ~azure.mgmt.media.models.PresetConfigurations :param preset_name: Required. The built-in preset to be used for encoding videos. Possible values include: 'H264SingleBitrateSD', 'H264SingleBitrate720p', 'H264SingleBitrate1080p', 'AdaptiveStreaming', @@ -1027,11 +1015,13 @@ class BuiltInStandardEncoderPreset(Preset): _attribute_map = { 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'configurations': {'key': 'configurations', 'type': 'PresetConfigurations'}, 'preset_name': {'key': 'presetName', 'type': 'str'}, } - def __init__(self, *, preset_name, **kwargs) -> None: + def __init__(self, *, preset_name, configurations=None, **kwargs) -> None: super(BuiltInStandardEncoderPreset, self).__init__(**kwargs) + self.configurations = configurations self.preset_name = preset_name self.odatatype = '#Microsoft.Media.BuiltInStandardEncoderPreset' @@ -2393,6 +2383,110 @@ def __init__(self, *, enabled_protocols=None, clear_tracks=None, content_keys=No self.custom_key_acquisition_url_template = custom_key_acquisition_url_template +class ErrorAdditionalInfo(Model): + """The resource management error additional info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: object + """ + + _validation = { + 'type': {'readonly': True}, + 'info': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__(self, **kwargs) -> None: + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None + + +class ErrorDetail(Model): + """The error detail. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: list[~azure.mgmt.media.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: + list[~azure.mgmt.media.models.ErrorAdditionalInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__(self, **kwargs) -> None: + super(ErrorDetail, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + +class ErrorResponse(Model): + """Error response. + + Common error response for all Azure Resource Manager APIs to return error + details for failed operations. (This also follows the OData error response + format.). + + :param error: The error object. + :type error: ~azure.mgmt.media.models.ErrorDetail + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + 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. @@ -3744,7 +3838,8 @@ class JobInputClip(JobInput): :param odatatype: Required. Constant filled by server. :type odatatype: str :param files: List of files. Required for JobInputHttp. Maximum of 4000 - characters each. + characters each. Query strings will not be returned in service responses + to prevent sensitive data exposure. :type files: list[str] :param start: Defines a point on the timeline of the input media at which processing will start. Defaults to the beginning of the input media. @@ -3800,7 +3895,8 @@ class JobInputAsset(JobInputClip): :param odatatype: Required. Constant filled by server. :type odatatype: str :param files: List of files. Required for JobInputHttp. Maximum of 4000 - characters each. + characters each. Query strings will not be returned in service responses + to prevent sensitive data exposure. :type files: list[str] :param start: Defines a point on the timeline of the input media at which processing will start. Defaults to the beginning of the input media. @@ -3852,7 +3948,8 @@ class JobInputHttp(JobInputClip): :param odatatype: Required. Constant filled by server. :type odatatype: str :param files: List of files. Required for JobInputHttp. Maximum of 4000 - characters each. + characters each. Query strings will not be returned in service responses + to prevent sensitive data exposure. :type files: list[str] :param start: Defines a point on the timeline of the input media at which processing will start. Defaults to the beginning of the input media. @@ -3874,7 +3971,8 @@ class JobInputHttp(JobInputClip): :param base_uri: Base URI for HTTPS job input. It will be concatenated with provided file names. If no base uri is given, then the provided file list is assumed to be fully qualified uris. Maximum length of 4000 - characters. + characters. The query strings will not be returned in service responses to + prevent sensitive data exposure. :type base_uri: str """ @@ -3965,6 +4063,9 @@ class JobOutput(Model): :ivar error: If the JobOutput is in the Error state, it contains the details of the error. :vartype error: ~azure.mgmt.media.models.JobError + :param preset_override: A preset used to override the preset in the + corresponding transform output. + :type preset_override: ~azure.mgmt.media.models.Preset :ivar state: Describes the state of the JobOutput. Possible values include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', 'Scheduled' @@ -4008,6 +4109,7 @@ class JobOutput(Model): _attribute_map = { 'error': {'key': 'error', 'type': 'JobError'}, + 'preset_override': {'key': 'presetOverride', 'type': 'Preset'}, 'state': {'key': 'state', 'type': 'str'}, 'progress': {'key': 'progress', 'type': 'int'}, 'label': {'key': 'label', 'type': 'str'}, @@ -4020,9 +4122,10 @@ class JobOutput(Model): 'odatatype': {'#Microsoft.Media.JobOutputAsset': 'JobOutputAsset'} } - def __init__(self, *, label: str=None, **kwargs) -> None: + def __init__(self, *, preset_override=None, label: str=None, **kwargs) -> None: super(JobOutput, self).__init__(**kwargs) self.error = None + self.preset_override = preset_override self.state = None self.progress = None self.label = label @@ -4042,6 +4145,9 @@ class JobOutputAsset(JobOutput): :ivar error: If the JobOutput is in the Error state, it contains the details of the error. :vartype error: ~azure.mgmt.media.models.JobError + :param preset_override: A preset used to override the preset in the + corresponding transform output. + :type preset_override: ~azure.mgmt.media.models.Preset :ivar state: Describes the state of the JobOutput. Possible values include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', 'Scheduled' @@ -4088,6 +4194,7 @@ class JobOutputAsset(JobOutput): _attribute_map = { 'error': {'key': 'error', 'type': 'JobError'}, + 'preset_override': {'key': 'presetOverride', 'type': 'Preset'}, 'state': {'key': 'state', 'type': 'str'}, 'progress': {'key': 'progress', 'type': 'int'}, 'label': {'key': 'label', 'type': 'str'}, @@ -4097,8 +4204,8 @@ class JobOutputAsset(JobOutput): 'asset_name': {'key': 'assetName', 'type': 'str'}, } - def __init__(self, *, asset_name: str, label: str=None, **kwargs) -> None: - super(JobOutputAsset, self).__init__(label=label, **kwargs) + def __init__(self, *, asset_name: str, preset_override=None, label: str=None, **kwargs) -> None: + super(JobOutputAsset, self).__init__(preset_override=preset_override, label=label, **kwargs) self.asset_name = asset_name self.odatatype = '#Microsoft.Media.JobOutputAsset' @@ -4620,13 +4727,15 @@ class LiveEventEncoding(Model): """Specifies the live event type and optional encoding settings for encoding live events. - :param encoding_type: Live event type. When encodingType is set to None, - the service simply passes through the incoming video and audio layer(s) to - the output. When encodingType is set to Standard or Premium1080p, a live - encoder transcodes the incoming stream into multiple bitrates or layers. - See https://go.microsoft.com/fwlink/?linkid=2095101 for more information. - This property cannot be modified after the live event is created. Possible - values include: 'None', 'Standard', 'Premium1080p' + :param 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 the output. When encodingType is + set to Standard or Premium1080p, a live encoder transcodes the incoming + stream into multiple bitrates or layers. See + https://go.microsoft.com/fwlink/?linkid=2095101 for more information. This + property cannot be modified after the live event is created. Possible + values include: 'None', 'Standard', 'Premium1080p', 'PassthroughBasic', + 'PassthroughStandard' :type encoding_type: str or ~azure.mgmt.media.models.LiveEventEncodingType :param preset_name: The optional encoding preset name, used when encodingType is not None. This value is specified at creation time and @@ -4941,6 +5050,8 @@ class LiveOutput(ProxyResource): values include: 'Creating', 'Running', 'Deleting' :vartype resource_state: str or ~azure.mgmt.media.models.LiveOutputResourceState + :ivar system_data: The system metadata relating to this resource. + :vartype system_data: ~azure.mgmt.media.models.SystemData """ _validation = { @@ -4953,6 +5064,7 @@ class LiveOutput(ProxyResource): 'last_modified': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'resource_state': {'readonly': True}, + 'system_data': {'readonly': True}, } _attribute_map = { @@ -4969,6 +5081,7 @@ class LiveOutput(ProxyResource): 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__(self, *, asset_name: str, archive_window_length, description: str=None, manifest_name: str=None, hls=None, output_snap_time: int=None, **kwargs) -> None: @@ -4983,28 +5096,7 @@ def __init__(self, *, asset_name: str, archive_window_length, description: str=N self.last_modified = None self.provisioning_state = None self.resource_state = None - - -class Location(Model): - """Location. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. - :type name: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name: str, **kwargs) -> None: - super(Location, self).__init__(**kwargs) - self.name = name + self.system_data = None class LogSpecification(Model): @@ -5073,6 +5165,11 @@ class MediaService(TrackedResource): :param key_delivery: The Key Delivery properties for Media Services account. :type key_delivery: ~azure.mgmt.media.models.KeyDelivery + :param public_network_access: Whether or not public network access is + allowed for resources under the Media Services account. Possible values + include: 'Enabled', 'Disabled' + :type public_network_access: str or + ~azure.mgmt.media.models.PublicNetworkAccess :param identity: The Managed Identity for the Media Services account. :type identity: ~azure.mgmt.media.models.MediaServiceIdentity :ivar system_data: The system metadata relating to this resource. @@ -5099,17 +5196,19 @@ class MediaService(TrackedResource): 'storage_authentication': {'key': 'properties.storageAuthentication', 'type': 'str'}, 'encryption': {'key': 'properties.encryption', 'type': 'AccountEncryption'}, 'key_delivery': {'key': 'properties.keyDelivery', 'type': 'KeyDelivery'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, 'identity': {'key': 'identity', 'type': 'MediaServiceIdentity'}, 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } - def __init__(self, *, location: str, tags=None, storage_accounts=None, storage_authentication=None, encryption=None, key_delivery=None, identity=None, **kwargs) -> None: + def __init__(self, *, location: str, tags=None, storage_accounts=None, storage_authentication=None, encryption=None, key_delivery=None, public_network_access=None, identity=None, **kwargs) -> None: super(MediaService, self).__init__(tags=tags, location=location, **kwargs) self.media_service_id = None self.storage_accounts = storage_accounts self.storage_authentication = storage_authentication self.encryption = encryption self.key_delivery = key_delivery + self.public_network_access = public_network_access self.identity = identity self.system_data = None @@ -5122,13 +5221,15 @@ class MediaServiceIdentity(Model): All required parameters must be populated in order to send to Azure. - :param type: Required. The identity type. Possible values include: - 'SystemAssigned', 'None' - :type type: str or ~azure.mgmt.media.models.ManagedIdentityType + :param type: Required. The identity type. + :type type: str :ivar principal_id: The Principal ID of the identity. :vartype principal_id: str :ivar tenant_id: The Tenant ID of the identity. :vartype tenant_id: str + :param user_assigned_identities: The user assigned managed identities. + :type user_assigned_identities: dict[str, + ~azure.mgmt.media.models.UserAssignedManagedIdentity] """ _validation = { @@ -5141,13 +5242,15 @@ class MediaServiceIdentity(Model): 'type': {'key': 'type', 'type': 'str'}, 'principal_id': {'key': 'principalId', 'type': 'str'}, 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedManagedIdentity}'}, } - def __init__(self, *, type, **kwargs) -> None: + def __init__(self, *, type: str, user_assigned_identities=None, **kwargs) -> None: super(MediaServiceIdentity, self).__init__(**kwargs) self.type = type self.principal_id = None self.tenant_id = None + self.user_assigned_identities = user_assigned_identities class MediaServiceUpdate(Model): @@ -5171,6 +5274,11 @@ class MediaServiceUpdate(Model): :param key_delivery: The Key Delivery properties for Media Services account. :type key_delivery: ~azure.mgmt.media.models.KeyDelivery + :param public_network_access: Whether or not public network access is + allowed for resources under the Media Services account. Possible values + include: 'Enabled', 'Disabled' + :type public_network_access: str or + ~azure.mgmt.media.models.PublicNetworkAccess :param identity: The Managed Identity for the Media Services account. :type identity: ~azure.mgmt.media.models.MediaServiceIdentity """ @@ -5186,10 +5294,11 @@ class MediaServiceUpdate(Model): 'storage_authentication': {'key': 'properties.storageAuthentication', 'type': 'str'}, 'encryption': {'key': 'properties.encryption', 'type': 'AccountEncryption'}, 'key_delivery': {'key': 'properties.keyDelivery', 'type': 'KeyDelivery'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, 'identity': {'key': 'identity', 'type': 'MediaServiceIdentity'}, } - def __init__(self, *, tags=None, storage_accounts=None, storage_authentication=None, encryption=None, key_delivery=None, identity=None, **kwargs) -> None: + def __init__(self, *, tags=None, storage_accounts=None, storage_authentication=None, encryption=None, key_delivery=None, public_network_access=None, identity=None, **kwargs) -> None: super(MediaServiceUpdate, self).__init__(**kwargs) self.tags = tags self.media_service_id = None @@ -5197,6 +5306,7 @@ def __init__(self, *, tags=None, storage_accounts=None, storage_authentication=N self.storage_authentication = storage_authentication self.encryption = encryption self.key_delivery = key_delivery + self.public_network_access = public_network_access self.identity = identity @@ -5428,35 +5538,6 @@ def __init__(self, *, enabled_protocols=None, **kwargs) -> None: self.enabled_protocols = enabled_protocols -class ODataError(Model): - """Information about an error. - - :param code: A language-independent error name. - :type code: str - :param message: The error message. - :type message: str - :param target: The target of the error (for example, the name of the - property in error). - :type target: str - :param details: The error details. - :type details: list[~azure.mgmt.media.models.ODataError] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ODataError]'}, - } - - def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: - super(ODataError, self).__init__(**kwargs) - self.code = code - self.message = message - self.target = target - self.details = details - - class Operation(Model): """An operation. @@ -5500,6 +5581,22 @@ def __init__(self, *, name: str, display=None, origin: str=None, properties=None self.action_type = action_type +class OperationCollection(Model): + """A collection of Operation items. + + :param value: A collection of Operation items. + :type value: list[~azure.mgmt.media.models.Operation] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(OperationCollection, self).__init__(**kwargs) + self.value = value + + class OperationDisplay(Model): """Operation details. @@ -5754,6 +5851,68 @@ def __init__(self, *, start_timestamp: int=None, end_timestamp: int=None, presen self.force_end_timestamp = force_end_timestamp +class PresetConfigurations(Model): + """An object of optional configuration settings for encoder. + + :param 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 compression efficiency. Possible values + include: 'Speed', 'Balanced', 'Quality' + :type complexity: str or ~azure.mgmt.media.models.Complexity + :param interleave_output: Sets the interleave mode of the output to + control how audio and video are stored in the container format. Example: + set InterleavedOutput as NonInterleavedOutput to produce audio-only and + video-only outputs in separate MP4 files. Possible values include: + 'NonInterleavedOutput', 'InterleavedOutput' + :type interleave_output: str or ~azure.mgmt.media.models.InterleaveOutput + :param key_frame_interval_in_seconds: The key frame interval in seconds. + Example: set KeyFrameIntervalInSeconds as 2 to reduce the playback + buffering for some players. + :type key_frame_interval_in_seconds: float + :param max_bitrate_bps: The maximum bitrate in bits per second (threshold + for the top video layer). Example: set MaxBitrateBps as 6000000 to avoid + producing very high bitrate outputs for contents with high complexity. + :type max_bitrate_bps: int + :param max_height: The maximum height of output video layers. Example: set + MaxHeight as 720 to produce output layers up to 720P even if the input is + 4K. + :type max_height: int + :param max_layers: The maximum number of output video layers. Example: set + MaxLayers as 4 to make sure at most 4 output layers are produced to + control the overall cost of the encoding job. + :type max_layers: int + :param min_bitrate_bps: The minimum bitrate in bits per second (threshold + for the bottom video layer). Example: set MinBitrateBps as 200000 to have + a bottom layer that covers users with low network bandwidth. + :type min_bitrate_bps: int + :param min_height: The minimum height of output video layers. Example: set + MinHeight as 360 to avoid output layers of smaller resolutions like 180P. + :type min_height: int + """ + + _attribute_map = { + 'complexity': {'key': 'complexity', 'type': 'str'}, + 'interleave_output': {'key': 'interleaveOutput', 'type': 'str'}, + 'key_frame_interval_in_seconds': {'key': 'keyFrameIntervalInSeconds', 'type': 'float'}, + 'max_bitrate_bps': {'key': 'maxBitrateBps', 'type': 'int'}, + 'max_height': {'key': 'maxHeight', 'type': 'int'}, + 'max_layers': {'key': 'maxLayers', 'type': 'int'}, + 'min_bitrate_bps': {'key': 'minBitrateBps', 'type': 'int'}, + 'min_height': {'key': 'minHeight', 'type': 'int'}, + } + + def __init__(self, *, complexity=None, interleave_output=None, key_frame_interval_in_seconds: float=None, max_bitrate_bps: int=None, max_height: int=None, max_layers: int=None, min_bitrate_bps: int=None, min_height: int=None, **kwargs) -> None: + super(PresetConfigurations, self).__init__(**kwargs) + self.complexity = complexity + self.interleave_output = interleave_output + self.key_frame_interval_in_seconds = key_frame_interval_in_seconds + self.max_bitrate_bps = max_bitrate_bps + self.max_height = max_height + self.max_layers = max_layers + self.min_bitrate_bps = min_bitrate_bps + self.min_height = min_height + + class PrivateEndpoint(Model): """The Private Endpoint resource. @@ -5963,28 +6122,6 @@ def __init__(self, **kwargs) -> None: self.service_specification = None -class Provider(Model): - """A resource provider. - - All required parameters must be populated in order to send to Azure. - - :param provider_name: Required. The provider name. - :type provider_name: str - """ - - _validation = { - 'provider_name': {'required': True}, - } - - _attribute_map = { - 'provider_name': {'key': 'providerName', 'type': 'str'}, - } - - def __init__(self, *, provider_name: str, **kwargs) -> None: - super(Provider, self).__init__(**kwargs) - self.provider_name = provider_name - - class Rectangle(Model): """Describes the properties of a rectangular window applied to the input media before processing it. @@ -6022,6 +6159,35 @@ def __init__(self, *, left: str=None, top: str=None, width: str=None, height: st self.height = height +class ResourceIdentity(Model): + """ResourceIdentity. + + All required parameters must be populated in order to send to Azure. + + :param user_assigned_identity: The user assigned managed identity's ARM ID + to use when accessing a resource. + :type user_assigned_identity: str + :param use_system_assigned_identity: Required. Indicates whether to use + System Assigned Managed Identity. Mutual exclusive with User Assigned + Managed Identity. + :type use_system_assigned_identity: bool + """ + + _validation = { + 'use_system_assigned_identity': {'required': True}, + } + + _attribute_map = { + 'user_assigned_identity': {'key': 'userAssignedIdentity', 'type': 'str'}, + 'use_system_assigned_identity': {'key': 'useSystemAssignedIdentity', 'type': 'bool'}, + } + + def __init__(self, *, use_system_assigned_identity: bool, user_assigned_identity: str=None, **kwargs) -> None: + super(ResourceIdentity, self).__init__(**kwargs) + self.user_assigned_identity = user_assigned_identity + self.use_system_assigned_identity = use_system_assigned_identity + + class SelectAudioTrackByAttribute(AudioTrackDescriptor): """Select audio tracks from the input by specifying an attribute and an attribute filter. @@ -6277,6 +6443,9 @@ def __init__(self, *, codecs, formats, filters=None, **kwargs) -> None: class StorageAccount(Model): """The storage account details. + Variables are only populated by the server, and will be ignored when + sending a request. + All required parameters must be populated in order to send to Azure. :param id: The ID of the storage account resource. Media Services relies @@ -6288,21 +6457,30 @@ class StorageAccount(Model): :param type: Required. The type of the storage account. Possible values include: 'Primary', 'Secondary' :type type: str or ~azure.mgmt.media.models.StorageAccountType + :param identity: The storage account identity. + :type identity: ~azure.mgmt.media.models.ResourceIdentity + :ivar status: The current status of the storage account mapping. + :vartype status: str """ _validation = { 'type': {'required': True}, + 'status': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'status': {'key': 'status', 'type': 'str'}, } - def __init__(self, *, type, id: str=None, **kwargs) -> None: + def __init__(self, *, type, id: str=None, identity=None, **kwargs) -> None: super(StorageAccount, self).__init__(**kwargs) self.id = id self.type = type + self.identity = identity + self.status = None class StorageEncryptedAssetDecryptionData(Model): @@ -7120,6 +7298,34 @@ def __init__(self, *, filename_pattern: str, output_files=None, **kwargs) -> Non self.odatatype = '#Microsoft.Media.TransportStreamFormat' +class UserAssignedManagedIdentity(Model): + """UserAssignedManagedIdentity. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar client_id: The client ID. + :vartype client_id: str + :ivar principal_id: The principal ID. + :vartype principal_id: str + """ + + _validation = { + 'client_id': {'readonly': True}, + 'principal_id': {'readonly': True}, + } + + _attribute_map = { + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(UserAssignedManagedIdentity, self).__init__(**kwargs) + self.client_id = None + self.principal_id = None + + 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 diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/models/_paged_models.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/models/_paged_models.py index 5dc8138614d5..17933785d7e2 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/models/_paged_models.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/models/_paged_models.py @@ -12,45 +12,32 @@ from msrest.paging import Paged -class AccountFilterPaged(Paged): - """ - A paging container for iterating over a list of :class:`AccountFilter ` object - """ - - _attribute_map = { - 'next_link': {'key': '@odata\\.nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AccountFilter]'} - } - - def __init__(self, *args, **kwargs): - - super(AccountFilterPaged, self).__init__(*args, **kwargs) -class OperationPaged(Paged): +class MediaServicePaged(Paged): """ - A paging container for iterating over a list of :class:`Operation ` object + A paging container for iterating over a list of :class:`MediaService ` object """ _attribute_map = { 'next_link': {'key': '@odata\\.nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} + 'current_page': {'key': 'value', 'type': '[MediaService]'} } def __init__(self, *args, **kwargs): - super(OperationPaged, self).__init__(*args, **kwargs) -class MediaServicePaged(Paged): + super(MediaServicePaged, self).__init__(*args, **kwargs) +class AccountFilterPaged(Paged): """ - A paging container for iterating over a list of :class:`MediaService ` object + A paging container for iterating over a list of :class:`AccountFilter ` object """ _attribute_map = { 'next_link': {'key': '@odata\\.nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[MediaService]'} + 'current_page': {'key': 'value', 'type': '[AccountFilter]'} } def __init__(self, *args, **kwargs): - super(MediaServicePaged, self).__init__(*args, **kwargs) + super(AccountFilterPaged, self).__init__(*args, **kwargs) class AssetPaged(Paged): """ A paging container for iterating over a list of :class:`Asset ` object diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/__init__.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/__init__.py index 44e5a835708e..6b639d9f90fc 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/__init__.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/__init__.py @@ -9,12 +9,12 @@ # regenerated. # -------------------------------------------------------------------------- -from ._account_filters_operations import AccountFiltersOperations from ._operations import Operations from ._mediaservices_operations import MediaservicesOperations from ._private_link_resources_operations import PrivateLinkResourcesOperations from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations from ._locations_operations import LocationsOperations +from ._account_filters_operations import AccountFiltersOperations from ._assets_operations import AssetsOperations from ._asset_filters_operations import AssetFiltersOperations from ._content_key_policies_operations import ContentKeyPoliciesOperations @@ -27,12 +27,12 @@ from ._streaming_endpoints_operations import StreamingEndpointsOperations __all__ = [ - 'AccountFiltersOperations', 'Operations', 'MediaservicesOperations', 'PrivateLinkResourcesOperations', 'PrivateEndpointConnectionsOperations', 'LocationsOperations', + 'AccountFiltersOperations', 'AssetsOperations', 'AssetFiltersOperations', 'ContentKeyPoliciesOperations', 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 83f402f99996..b341a3698048 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 @@ -24,7 +24,7 @@ class AccountFiltersOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API to be used with the client request. Constant value: "2020-05-01". + :ivar api_version: The version of the API to be used with the client request. Constant value: "2021-06-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-05-01" + self.api_version = "2021-06-01" self.config = config @@ -58,7 +58,7 @@ def list( :rtype: ~azure.mgmt.media.models.AccountFilterPaged[~azure.mgmt.media.models.AccountFilter] :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -99,7 +99,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response @@ -134,7 +134,7 @@ def get( :rtype: ~azure.mgmt.media.models.AccountFilter or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -164,8 +164,8 @@ def get( request = self._client.get(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 404]: - raise models.ApiErrorException(self._deserialize, response) + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -202,7 +202,7 @@ def create_or_update( :rtype: ~azure.mgmt.media.models.AccountFilter or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.create_or_update.metadata['url'] @@ -237,7 +237,7 @@ def create_or_update( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -273,7 +273,7 @@ def delete( :return: None or ClientRawResponse if raw=true :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.delete.metadata['url'] @@ -303,7 +303,7 @@ def delete( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) @@ -334,7 +334,7 @@ def update( :rtype: ~azure.mgmt.media.models.AccountFilter or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.update.metadata['url'] @@ -369,7 +369,7 @@ def update( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: 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 3d7f9b052af6..f7f2067b1c70 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 @@ -24,7 +24,7 @@ class AssetFiltersOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API to be used with the client request. Constant value: "2020-05-01". + :ivar api_version: The version of the API to be used with the client request. Constant value: "2021-06-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-05-01" + self.api_version = "2021-06-01" self.config = config @@ -60,7 +60,7 @@ def list( :rtype: ~azure.mgmt.media.models.AssetFilterPaged[~azure.mgmt.media.models.AssetFilter] :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -102,7 +102,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response @@ -139,7 +139,7 @@ def get( :rtype: ~azure.mgmt.media.models.AssetFilter or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -170,8 +170,8 @@ def get( request = self._client.get(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 404]: - raise models.ApiErrorException(self._deserialize, response) + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -210,7 +210,7 @@ def create_or_update( :rtype: ~azure.mgmt.media.models.AssetFilter or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.create_or_update.metadata['url'] @@ -246,7 +246,7 @@ def create_or_update( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -284,7 +284,7 @@ def delete( :return: None or ClientRawResponse if raw=true :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.delete.metadata['url'] @@ -315,7 +315,7 @@ def delete( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) @@ -348,7 +348,7 @@ def update( :rtype: ~azure.mgmt.media.models.AssetFilter or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.update.metadata['url'] @@ -384,7 +384,7 @@ def update( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: 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 567c5df52671..3f7ef04f386c 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 @@ -24,7 +24,7 @@ class AssetsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API to be used with the client request. Constant value: "2020-05-01". + :ivar api_version: The version of the API to be used with the client request. Constant value: "2021-06-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-05-01" + self.api_version = "2021-06-01" self.config = config @@ -68,7 +68,7 @@ def list( :rtype: ~azure.mgmt.media.models.AssetPaged[~azure.mgmt.media.models.Asset] :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -115,7 +115,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response @@ -150,7 +150,7 @@ def get( :rtype: ~azure.mgmt.media.models.Asset or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -180,8 +180,8 @@ def get( request = self._client.get(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 404]: - raise models.ApiErrorException(self._deserialize, response) + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -218,7 +218,7 @@ def create_or_update( :rtype: ~azure.mgmt.media.models.Asset or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.create_or_update.metadata['url'] @@ -253,7 +253,7 @@ def create_or_update( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -289,7 +289,7 @@ def delete( :return: None or ClientRawResponse if raw=true :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.delete.metadata['url'] @@ -319,7 +319,7 @@ def delete( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) @@ -350,7 +350,7 @@ def update( :rtype: ~azure.mgmt.media.models.Asset or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.update.metadata['url'] @@ -385,7 +385,7 @@ def update( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -429,7 +429,7 @@ def list_container_sas( :rtype: ~azure.mgmt.media.models.AssetContainerSas or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ parameters = models.ListContainerSasInput(permissions=permissions, expiry_time=expiry_time) @@ -466,7 +466,7 @@ def list_container_sas( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -503,7 +503,7 @@ def get_encryption_key( :rtype: ~azure.mgmt.media.models.StorageEncryptedAssetDecryptionData or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.get_encryption_key.metadata['url'] @@ -534,7 +534,7 @@ def get_encryption_key( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -570,7 +570,7 @@ def list_streaming_locators( :rtype: ~azure.mgmt.media.models.ListStreamingLocatorsResponse or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.list_streaming_locators.metadata['url'] @@ -601,7 +601,7 @@ def list_streaming_locators( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: 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 8d842a870dd3..c044e7a0edfb 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 @@ -24,7 +24,7 @@ class ContentKeyPoliciesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API to be used with the client request. Constant value: "2020-05-01". + :ivar api_version: The version of the API to be used with the client request. Constant value: "2021-06-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-05-01" + self.api_version = "2021-06-01" self.config = config @@ -67,7 +67,7 @@ def list( :rtype: ~azure.mgmt.media.models.ContentKeyPolicyPaged[~azure.mgmt.media.models.ContentKeyPolicy] :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -114,7 +114,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response @@ -149,7 +149,7 @@ def get( :rtype: ~azure.mgmt.media.models.ContentKeyPolicy or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -179,8 +179,8 @@ def get( request = self._client.get(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 404]: - raise models.ApiErrorException(self._deserialize, response) + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -219,7 +219,7 @@ def create_or_update( :rtype: ~azure.mgmt.media.models.ContentKeyPolicy or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ parameters = models.ContentKeyPolicy(description=description, options=options) @@ -256,7 +256,7 @@ def create_or_update( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -292,7 +292,7 @@ def delete( :return: None or ClientRawResponse if raw=true :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.delete.metadata['url'] @@ -322,7 +322,7 @@ def delete( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) @@ -355,7 +355,7 @@ def update( :rtype: ~azure.mgmt.media.models.ContentKeyPolicy or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ parameters = models.ContentKeyPolicy(description=description, options=options) @@ -392,7 +392,7 @@ def update( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -427,7 +427,7 @@ def get_policy_properties_with_secrets( :rtype: ~azure.mgmt.media.models.ContentKeyPolicyProperties or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.get_policy_properties_with_secrets.metadata['url'] @@ -457,8 +457,8 @@ def get_policy_properties_with_secrets( request = self._client.post(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 404]: - raise models.ApiErrorException(self._deserialize, response) + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: 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 d83a92f00c1e..3b77528f8421 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 @@ -24,7 +24,7 @@ class JobsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API to be used with the client request. Constant value: "2020-05-01". + :ivar api_version: The version of the API to be used with the client request. Constant value: "2021-06-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-05-01" + self.api_version = "2021-06-01" self.config = config @@ -65,7 +65,7 @@ def list( :rtype: ~azure.mgmt.media.models.JobPaged[~azure.mgmt.media.models.Job] :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -111,7 +111,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response @@ -148,7 +148,7 @@ def get( :rtype: ~azure.mgmt.media.models.Job or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -179,8 +179,8 @@ def get( request = self._client.get(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 404]: - raise models.ApiErrorException(self._deserialize, response) + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -219,7 +219,7 @@ def create( :rtype: ~azure.mgmt.media.models.Job or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.create.metadata['url'] @@ -255,7 +255,7 @@ def create( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [201]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 201: @@ -291,7 +291,7 @@ def delete( :return: None or ClientRawResponse if raw=true :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.delete.metadata['url'] @@ -322,7 +322,7 @@ def delete( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) @@ -357,7 +357,7 @@ def update( :rtype: ~azure.mgmt.media.models.Job or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.update.metadata['url'] @@ -393,7 +393,7 @@ def update( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -429,7 +429,7 @@ def cancel_job( :return: None or ClientRawResponse if raw=true :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.cancel_job.metadata['url'] @@ -460,7 +460,7 @@ def cancel_job( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, 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 52939d530026..77b2a3ece796 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 @@ -26,7 +26,7 @@ class LiveEventsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API to be used with the client request. Constant value: "2020-05-01". + :ivar api_version: The version of the API to be used with the client request. Constant value: "2021-06-01". """ models = models @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-05-01" + self.api_version = "2021-06-01" self.config = config @@ -60,7 +60,7 @@ def list( :rtype: ~azure.mgmt.media.models.LiveEventPaged[~azure.mgmt.media.models.LiveEvent] :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -101,7 +101,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response @@ -137,7 +137,7 @@ def get( :rtype: ~azure.mgmt.media.models.LiveEvent or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -167,8 +167,8 @@ def get( request = self._client.get(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 404]: - raise models.ApiErrorException(self._deserialize, response) + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -219,7 +219,7 @@ def _create_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None @@ -265,7 +265,7 @@ def create( or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.media.models.LiveEvent]] :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ raw_result = self._create_initial( resource_group_name=resource_group_name, @@ -332,7 +332,7 @@ def _update_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None @@ -373,7 +373,7 @@ def update( or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.media.models.LiveEvent]] :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ raw_result = self._update_initial( resource_group_name=resource_group_name, @@ -434,7 +434,7 @@ def _delete_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202, 204]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) @@ -464,7 +464,7 @@ def delete( :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ raw_result = self._delete_initial( resource_group_name=resource_group_name, @@ -520,7 +520,7 @@ def _allocate_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) @@ -551,7 +551,7 @@ def allocate( :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ raw_result = self._allocate_initial( resource_group_name=resource_group_name, @@ -607,7 +607,7 @@ def _start_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) @@ -638,7 +638,7 @@ def start( :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ raw_result = self._start_initial( resource_group_name=resource_group_name, @@ -700,7 +700,7 @@ def _stop_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) @@ -734,7 +734,7 @@ def stop( :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ raw_result = self._stop_initial( resource_group_name=resource_group_name, @@ -791,7 +791,7 @@ def _reset_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) @@ -824,7 +824,7 @@ def reset( :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ raw_result = self._reset_initial( resource_group_name=resource_group_name, 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 ab3db379063e..14fcbe512d76 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 @@ -26,7 +26,7 @@ class LiveOutputsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API to be used with the client request. Constant value: "2020-05-01". + :ivar api_version: The version of the API to be used with the client request. Constant value: "2021-06-01". """ models = models @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-05-01" + self.api_version = "2021-06-01" self.config = config @@ -63,7 +63,7 @@ def list( :rtype: ~azure.mgmt.media.models.LiveOutputPaged[~azure.mgmt.media.models.LiveOutput] :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -105,7 +105,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response @@ -143,7 +143,7 @@ def get( :rtype: ~azure.mgmt.media.models.LiveOutput or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -174,8 +174,8 @@ def get( request = self._client.get(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 404]: - raise models.ApiErrorException(self._deserialize, response) + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -225,7 +225,7 @@ def _create_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None @@ -270,7 +270,7 @@ def create( or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.media.models.LiveOutput]] :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ raw_result = self._create_initial( resource_group_name=resource_group_name, @@ -333,7 +333,7 @@ def _delete_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202, 204]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) @@ -366,7 +366,7 @@ def delete( :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ raw_result = self._delete_initial( resource_group_name=resource_group_name, 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 9c57d5f8d823..e3ba741e2abb 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 @@ -24,7 +24,7 @@ class LocationsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API to be used with the client request. Constant value: "2021-05-01". + :ivar api_version: The version of the API to be used with the client request. Constant value: "2021-06-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-05-01" + self.api_version = "2021-06-01" self.config = config @@ -61,7 +61,7 @@ def check_name_availability( :rtype: ~azure.mgmt.media.models.EntityNameAvailabilityCheckOutput or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ parameters = models.CheckNameAvailabilityInput(name=name, type=type) @@ -96,7 +96,7 @@ def check_name_availability( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: 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 e81181498cf8..9e6891518319 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 @@ -24,7 +24,7 @@ class MediaservicesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API to be used with the client request. Constant value: "2021-05-01". + :ivar api_version: The version of the API to be used with the client request. Constant value: "2021-06-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-05-01" + self.api_version = "2021-06-01" self.config = config @@ -56,7 +56,7 @@ def list( :rtype: ~azure.mgmt.media.models.MediaServicePaged[~azure.mgmt.media.models.MediaService] :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -96,7 +96,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response @@ -129,7 +129,7 @@ def get( :rtype: ~azure.mgmt.media.models.MediaService or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -159,7 +159,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -194,7 +194,7 @@ def create_or_update( :rtype: ~azure.mgmt.media.models.MediaService or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.create_or_update.metadata['url'] @@ -228,7 +228,7 @@ def create_or_update( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -262,7 +262,7 @@ def delete( :return: None or ClientRawResponse if raw=true :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.delete.metadata['url'] @@ -291,7 +291,7 @@ def delete( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) @@ -320,7 +320,7 @@ def update( :rtype: ~azure.mgmt.media.models.MediaService or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.update.metadata['url'] @@ -354,7 +354,7 @@ def update( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -389,7 +389,7 @@ def sync_storage_keys( :return: None or ClientRawResponse if raw=true :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ parameters = models.SyncStorageKeysInput(id=id) @@ -424,7 +424,7 @@ def sync_storage_keys( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) @@ -455,7 +455,7 @@ def list_edge_policies( :rtype: ~azure.mgmt.media.models.EdgePolicies or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ parameters = models.ListEdgePoliciesInput(device_id=device_id) @@ -491,7 +491,7 @@ def list_edge_policies( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -519,7 +519,7 @@ def list_by_subscription( :rtype: ~azure.mgmt.media.models.MediaServicePaged[~azure.mgmt.media.models.MediaService] :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -558,7 +558,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return 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 f240bca04db6..e646126a6142 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 @@ -24,7 +24,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API to be used with the client request. Constant value: "2021-05-01". + :ivar api_version: The version of the API to be used with the client request. Constant value: "2021-06-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-05-01" + self.api_version = "2021-06-01" self.config = config @@ -49,54 +49,43 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of Operation - :rtype: - ~azure.mgmt.media.models.OperationPaged[~azure.mgmt.media.models.Operation] + :return: OperationCollection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.media.models.OperationCollection or + ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationCollection', response) - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ApiErrorException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None if raw: - header_dict = {} - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response return deserialized list.metadata = {'url': '/providers/Microsoft.Media/operations'} 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 3bdd096a4da1..8fa58e782a4c 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 @@ -24,7 +24,7 @@ class PrivateEndpointConnectionsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API to be used with the client request. Constant value: "2021-05-01". + :ivar api_version: The version of the API to be used with the client request. Constant value: "2021-06-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-05-01" + self.api_version = "2021-06-01" self.config = config @@ -59,7 +59,7 @@ def list( :rtype: ~azure.mgmt.media.models.PrivateEndpointConnectionListResult or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.list.metadata['url'] @@ -89,7 +89,7 @@ def list( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -124,7 +124,7 @@ def get( :rtype: ~azure.mgmt.media.models.PrivateEndpointConnection or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -155,7 +155,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -192,7 +192,7 @@ def create_or_update( :rtype: ~azure.mgmt.media.models.PrivateEndpointConnection or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.create_or_update.metadata['url'] @@ -227,7 +227,7 @@ def create_or_update( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -261,7 +261,7 @@ def delete( :return: None or ClientRawResponse if raw=true :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.delete.metadata['url'] @@ -290,8 +290,8 @@ def delete( request = self._client.delete(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: - raise models.ApiErrorException(self._deserialize, response) + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, 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 71808c5c481e..0a7cea4b848f 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 @@ -24,7 +24,7 @@ class PrivateLinkResourcesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API to be used with the client request. Constant value: "2021-05-01". + :ivar api_version: The version of the API to be used with the client request. Constant value: "2021-06-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-05-01" + self.api_version = "2021-06-01" self.config = config @@ -59,7 +59,7 @@ def list( :rtype: ~azure.mgmt.media.models.PrivateLinkResourceListResult or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.list.metadata['url'] @@ -89,7 +89,7 @@ def list( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -124,7 +124,7 @@ def get( :rtype: ~azure.mgmt.media.models.PrivateLinkResource or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -155,7 +155,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: 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 a8c0165c4c3a..d4ef3ad4383f 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 @@ -26,7 +26,7 @@ class StreamingEndpointsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API to be used with the client request. Constant value: "2020-05-01". + :ivar api_version: The version of the API to be used with the client request. Constant value: "2021-06-01". """ models = models @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-05-01" + self.api_version = "2021-06-01" self.config = config @@ -60,7 +60,7 @@ def list( :rtype: ~azure.mgmt.media.models.StreamingEndpointPaged[~azure.mgmt.media.models.StreamingEndpoint] :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -101,7 +101,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response @@ -137,7 +137,7 @@ def get( :rtype: ~azure.mgmt.media.models.StreamingEndpoint or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -167,8 +167,8 @@ def get( request = self._client.get(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 404]: - raise models.ApiErrorException(self._deserialize, response) + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -219,7 +219,7 @@ def _create_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None @@ -265,7 +265,7 @@ def create( or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.media.models.StreamingEndpoint]] :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ raw_result = self._create_initial( resource_group_name=resource_group_name, @@ -332,7 +332,7 @@ def _update_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None @@ -375,7 +375,7 @@ def update( or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.media.models.StreamingEndpoint]] :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ raw_result = self._update_initial( resource_group_name=resource_group_name, @@ -436,7 +436,7 @@ def _delete_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202, 204]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) @@ -466,7 +466,7 @@ def delete( :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ raw_result = self._delete_initial( resource_group_name=resource_group_name, @@ -522,7 +522,7 @@ def _start_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) @@ -552,7 +552,7 @@ def start( :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ raw_result = self._start_initial( resource_group_name=resource_group_name, @@ -608,7 +608,7 @@ def _stop_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) @@ -638,7 +638,7 @@ def stop( :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ raw_result = self._stop_initial( resource_group_name=resource_group_name, @@ -700,7 +700,7 @@ def _scale_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) @@ -732,7 +732,7 @@ def scale( :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ raw_result = self._scale_initial( resource_group_name=resource_group_name, 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 f90b5cbf4161..028b74e43e56 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 @@ -24,7 +24,7 @@ class StreamingLocatorsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API to be used with the client request. Constant value: "2020-05-01". + :ivar api_version: The version of the API to be used with the client request. Constant value: "2021-06-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-05-01" + self.api_version = "2021-06-01" self.config = config @@ -67,7 +67,7 @@ def list( :rtype: ~azure.mgmt.media.models.StreamingLocatorPaged[~azure.mgmt.media.models.StreamingLocator] :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -114,7 +114,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response @@ -149,7 +149,7 @@ def get( :rtype: ~azure.mgmt.media.models.StreamingLocator or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -179,8 +179,8 @@ def get( request = self._client.get(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 404]: - raise models.ApiErrorException(self._deserialize, response) + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -217,7 +217,7 @@ def create( :rtype: ~azure.mgmt.media.models.StreamingLocator or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.create.metadata['url'] @@ -252,7 +252,7 @@ def create( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [201]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 201: @@ -286,7 +286,7 @@ def delete( :return: None or ClientRawResponse if raw=true :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.delete.metadata['url'] @@ -316,7 +316,7 @@ def delete( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) @@ -345,7 +345,7 @@ def list_content_keys( :rtype: ~azure.mgmt.media.models.ListContentKeysResponse or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.list_content_keys.metadata['url'] @@ -376,7 +376,7 @@ def list_content_keys( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -411,7 +411,7 @@ def list_paths( :rtype: ~azure.mgmt.media.models.ListPathsResponse or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.list_paths.metadata['url'] @@ -442,7 +442,7 @@ def list_paths( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: 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 90272113dc28..d3bd2bfc5b93 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 @@ -24,7 +24,7 @@ class StreamingPoliciesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API to be used with the client request. Constant value: "2020-05-01". + :ivar api_version: The version of the API to be used with the client request. Constant value: "2021-06-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-05-01" + self.api_version = "2021-06-01" self.config = config @@ -67,7 +67,7 @@ def list( :rtype: ~azure.mgmt.media.models.StreamingPolicyPaged[~azure.mgmt.media.models.StreamingPolicy] :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -114,7 +114,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response @@ -149,7 +149,7 @@ def get( :rtype: ~azure.mgmt.media.models.StreamingPolicy or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -179,8 +179,8 @@ def get( request = self._client.get(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 404]: - raise models.ApiErrorException(self._deserialize, response) + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -217,7 +217,7 @@ def create( :rtype: ~azure.mgmt.media.models.StreamingPolicy or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.create.metadata['url'] @@ -252,7 +252,7 @@ def create( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [201]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 201: @@ -286,7 +286,7 @@ def delete( :return: None or ClientRawResponse if raw=true :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.delete.metadata['url'] @@ -316,7 +316,7 @@ def delete( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) 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 e2bad8cb194f..4350290bb885 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 @@ -24,7 +24,7 @@ class TransformsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API to be used with the client request. Constant value: "2020-05-01". + :ivar api_version: The version of the API to be used with the client request. Constant value: "2021-06-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-05-01" + self.api_version = "2021-06-01" self.config = config @@ -63,7 +63,7 @@ def list( :rtype: ~azure.mgmt.media.models.TransformPaged[~azure.mgmt.media.models.Transform] :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -108,7 +108,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response @@ -143,7 +143,7 @@ def get( :rtype: ~azure.mgmt.media.models.Transform or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -173,8 +173,8 @@ def get( request = self._client.get(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 404]: - raise models.ApiErrorException(self._deserialize, response) + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -214,7 +214,7 @@ def create_or_update( :rtype: ~azure.mgmt.media.models.Transform or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ parameters = models.Transform(description=description, outputs=outputs) @@ -251,7 +251,7 @@ def create_or_update( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -287,7 +287,7 @@ def delete( :return: None or ClientRawResponse if raw=true :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.delete.metadata['url'] @@ -317,7 +317,7 @@ def delete( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) @@ -351,7 +351,7 @@ def update( :rtype: ~azure.mgmt.media.models.Transform or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ErrorResponseException` """ parameters = models.Transform(description=description, outputs=outputs) @@ -388,7 +388,7 @@ def update( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ApiErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: