diff --git a/azure-mgmt-media/azure/mgmt/media/azure_media_services.py b/azure-mgmt-media/azure/mgmt/media/azure_media_services.py index 746a9a325e6d..e62aea9c5796 100644 --- a/azure-mgmt-media/azure/mgmt/media/azure_media_services.py +++ b/azure-mgmt-media/azure/mgmt/media/azure_media_services.py @@ -13,10 +13,12 @@ from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION +from .operations.account_filters_operations import AccountFiltersOperations from .operations.operations import Operations from .operations.mediaservices_operations import MediaservicesOperations from .operations.locations_operations import LocationsOperations from .operations.assets_operations import AssetsOperations +from .operations.asset_filters_operations import AssetFiltersOperations from .operations.content_key_policies_operations import ContentKeyPoliciesOperations from .operations.transforms_operations import TransformsOperations from .operations.jobs_operations import JobsOperations @@ -67,6 +69,8 @@ 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 @@ -75,6 +79,8 @@ class AzureMediaServices(SDKClient): :vartype locations: azure.mgmt.media.operations.LocationsOperations :ivar assets: Assets operations :vartype assets: azure.mgmt.media.operations.AssetsOperations + :ivar asset_filters: AssetFilters operations + :vartype asset_filters: azure.mgmt.media.operations.AssetFiltersOperations :ivar content_key_policies: ContentKeyPolicies operations :vartype content_key_policies: azure.mgmt.media.operations.ContentKeyPoliciesOperations :ivar transforms: Transforms operations @@ -108,10 +114,12 @@ 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 = '2018-06-01-preview' + self.api_version = '2018-07-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( @@ -120,6 +128,8 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.assets = AssetsOperations( self._client, self.config, self._serialize, self._deserialize) + self.asset_filters = AssetFiltersOperations( + self._client, self.config, self._serialize, self._deserialize) self.content_key_policies = ContentKeyPoliciesOperations( self._client, self.config, self._serialize, self._deserialize) self.transforms = TransformsOperations( diff --git a/azure-mgmt-media/azure/mgmt/media/models/__init__.py b/azure-mgmt-media/azure/mgmt/media/models/__init__.py index d07fed7bfdb1..313de9af0224 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/__init__.py +++ b/azure-mgmt-media/azure/mgmt/media/models/__init__.py @@ -10,8 +10,22 @@ # -------------------------------------------------------------------------- try: + from .presentation_time_range_py3 import PresentationTimeRange + from .filter_track_property_condition_py3 import FilterTrackPropertyCondition + from .first_quality_py3 import FirstQuality + from .filter_track_selection_py3 import FilterTrackSelection + from .account_filter_py3 import AccountFilter + from .odata_error_py3 import ODataError + from .api_error_py3 import ApiError, ApiErrorException + from .tracked_resource_py3 import TrackedResource + from .resource_py3 import Resource + from .proxy_resource_py3 import ProxyResource from .provider_py3 import Provider from .operation_display_py3 import OperationDisplay + from .metric_dimension_py3 import MetricDimension + from .metric_py3 import Metric + from .service_specification_py3 import ServiceSpecification + from .metric_properties_py3 import MetricProperties from .operation_py3 import Operation from .location_py3 import Location from .entity_name_availability_check_output_py3 import EntityNameAvailabilityCheckOutput @@ -19,15 +33,14 @@ from .sync_storage_keys_input_py3 import SyncStorageKeysInput from .media_service_py3 import MediaService from .subscription_media_service_py3 import SubscriptionMediaService - from .odata_error_py3 import ODataError - from .api_error_py3 import ApiError, ApiErrorException from .check_name_availability_input_py3 import CheckNameAvailabilityInput - from .proxy_resource_py3 import ProxyResource - from .resource_py3 import Resource - from .tracked_resource_py3 import TrackedResource from .asset_container_sas_py3 import AssetContainerSas - from .asset_storage_encryption_key_py3 import AssetStorageEncryptionKey + from .asset_file_encryption_metadata_py3 import AssetFileEncryptionMetadata + from .storage_encrypted_asset_decryption_data_py3 import StorageEncryptedAssetDecryptionData + from .asset_streaming_locator_py3 import AssetStreamingLocator + from .list_streaming_locators_response_py3 import ListStreamingLocatorsResponse from .asset_py3 import Asset + from .asset_filter_py3 import AssetFilter from .list_container_sas_input_py3 import ListContainerSasInput from .content_key_policy_play_ready_explicit_analog_television_restriction_py3 import ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction from .content_key_policy_play_ready_content_key_location_py3 import ContentKeyPolicyPlayReadyContentKeyLocation @@ -123,9 +136,10 @@ from .hls_py3 import Hls from .live_output_py3 import LiveOutput from .live_event_endpoint_py3 import LiveEventEndpoint - from .live_event_input_py3 import LiveEventInput from .ip_range_py3 import IPRange from .ip_access_control_py3 import IPAccessControl + from .live_event_input_access_control_py3 import LiveEventInputAccessControl + from .live_event_input_py3 import LiveEventInput from .live_event_preview_access_control_py3 import LiveEventPreviewAccessControl from .live_event_preview_py3 import LiveEventPreview from .live_event_encoding_py3 import LiveEventEncoding @@ -138,8 +152,22 @@ from .streaming_entity_scale_unit_py3 import StreamingEntityScaleUnit from .streaming_endpoint_py3 import StreamingEndpoint except (SyntaxError, ImportError): + from .presentation_time_range import PresentationTimeRange + from .filter_track_property_condition import FilterTrackPropertyCondition + from .first_quality import FirstQuality + from .filter_track_selection import FilterTrackSelection + from .account_filter import AccountFilter + from .odata_error import ODataError + from .api_error import ApiError, ApiErrorException + from .tracked_resource import TrackedResource + from .resource import Resource + from .proxy_resource import ProxyResource from .provider import Provider from .operation_display import OperationDisplay + from .metric_dimension import MetricDimension + from .metric import Metric + from .service_specification import ServiceSpecification + from .metric_properties import MetricProperties from .operation import Operation from .location import Location from .entity_name_availability_check_output import EntityNameAvailabilityCheckOutput @@ -147,15 +175,14 @@ from .sync_storage_keys_input import SyncStorageKeysInput from .media_service import MediaService from .subscription_media_service import SubscriptionMediaService - from .odata_error import ODataError - from .api_error import ApiError, ApiErrorException from .check_name_availability_input import CheckNameAvailabilityInput - from .proxy_resource import ProxyResource - from .resource import Resource - from .tracked_resource import TrackedResource from .asset_container_sas import AssetContainerSas - from .asset_storage_encryption_key import AssetStorageEncryptionKey + from .asset_file_encryption_metadata import AssetFileEncryptionMetadata + from .storage_encrypted_asset_decryption_data import StorageEncryptedAssetDecryptionData + from .asset_streaming_locator import AssetStreamingLocator + from .list_streaming_locators_response import ListStreamingLocatorsResponse from .asset import Asset + from .asset_filter import AssetFilter from .list_container_sas_input import ListContainerSasInput from .content_key_policy_play_ready_explicit_analog_television_restriction import ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction from .content_key_policy_play_ready_content_key_location import ContentKeyPolicyPlayReadyContentKeyLocation @@ -251,9 +278,10 @@ from .hls import Hls from .live_output import LiveOutput from .live_event_endpoint import LiveEventEndpoint - from .live_event_input import LiveEventInput from .ip_range import IPRange from .ip_access_control import IPAccessControl + from .live_event_input_access_control import LiveEventInputAccessControl + from .live_event_input import LiveEventInput from .live_event_preview_access_control import LiveEventPreviewAccessControl from .live_event_preview import LiveEventPreview from .live_event_encoding import LiveEventEncoding @@ -265,10 +293,12 @@ from .streaming_endpoint_access_control import StreamingEndpointAccessControl from .streaming_entity_scale_unit import StreamingEntityScaleUnit from .streaming_endpoint import StreamingEndpoint +from .account_filter_paged import AccountFilterPaged from .operation_paged import OperationPaged from .media_service_paged import MediaServicePaged from .subscription_media_service_paged import SubscriptionMediaServicePaged from .asset_paged import AssetPaged +from .asset_filter_paged import AssetFilterPaged from .content_key_policy_paged import ContentKeyPolicyPaged from .transform_paged import TransformPaged from .job_paged import JobPaged @@ -278,6 +308,10 @@ from .live_output_paged import LiveOutputPaged from .streaming_endpoint_paged import StreamingEndpointPaged from .azure_media_services_enums import ( + FilterTrackPropertyType, + FilterTrackPropertyCompareOperation, + MetricUnit, + MetricAggregationType, StorageAccountType, AssetStorageEncryptionFormat, AssetContainerPermission, @@ -295,6 +329,7 @@ EntropyMode, H264Complexity, EncoderNamedPreset, + InsightsType, OnErrorType, Priority, JobErrorCode, @@ -315,8 +350,22 @@ ) __all__ = [ + 'PresentationTimeRange', + 'FilterTrackPropertyCondition', + 'FirstQuality', + 'FilterTrackSelection', + 'AccountFilter', + 'ODataError', + 'ApiError', 'ApiErrorException', + 'TrackedResource', + 'Resource', + 'ProxyResource', 'Provider', 'OperationDisplay', + 'MetricDimension', + 'Metric', + 'ServiceSpecification', + 'MetricProperties', 'Operation', 'Location', 'EntityNameAvailabilityCheckOutput', @@ -324,15 +373,14 @@ 'SyncStorageKeysInput', 'MediaService', 'SubscriptionMediaService', - 'ODataError', - 'ApiError', 'ApiErrorException', 'CheckNameAvailabilityInput', - 'ProxyResource', - 'Resource', - 'TrackedResource', 'AssetContainerSas', - 'AssetStorageEncryptionKey', + 'AssetFileEncryptionMetadata', + 'StorageEncryptedAssetDecryptionData', + 'AssetStreamingLocator', + 'ListStreamingLocatorsResponse', 'Asset', + 'AssetFilter', 'ListContainerSasInput', 'ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction', 'ContentKeyPolicyPlayReadyContentKeyLocation', @@ -428,9 +476,10 @@ 'Hls', 'LiveOutput', 'LiveEventEndpoint', - 'LiveEventInput', 'IPRange', 'IPAccessControl', + 'LiveEventInputAccessControl', + 'LiveEventInput', 'LiveEventPreviewAccessControl', 'LiveEventPreview', 'LiveEventEncoding', @@ -442,10 +491,12 @@ 'StreamingEndpointAccessControl', 'StreamingEntityScaleUnit', 'StreamingEndpoint', + 'AccountFilterPaged', 'OperationPaged', 'MediaServicePaged', 'SubscriptionMediaServicePaged', 'AssetPaged', + 'AssetFilterPaged', 'ContentKeyPolicyPaged', 'TransformPaged', 'JobPaged', @@ -454,6 +505,10 @@ 'LiveEventPaged', 'LiveOutputPaged', 'StreamingEndpointPaged', + 'FilterTrackPropertyType', + 'FilterTrackPropertyCompareOperation', + 'MetricUnit', + 'MetricAggregationType', 'StorageAccountType', 'AssetStorageEncryptionFormat', 'AssetContainerPermission', @@ -471,6 +526,7 @@ 'EntropyMode', 'H264Complexity', 'EncoderNamedPreset', + 'InsightsType', 'OnErrorType', 'Priority', 'JobErrorCode', diff --git a/azure-mgmt-media/azure/mgmt/media/models/account_filter.py b/azure-mgmt-media/azure/mgmt/media/models/account_filter.py new file mode 100644 index 000000000000..1fbb17b33478 --- /dev/null +++ b/azure-mgmt-media/azure/mgmt/media/models/account_filter.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource import ProxyResource + + +class AccountFilter(ProxyResource): + """An Account Filter. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource ID for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param presentation_time_range: The presentation time range. + :type presentation_time_range: + ~azure.mgmt.media.models.PresentationTimeRange + :param first_quality: The first quality. + :type first_quality: ~azure.mgmt.media.models.FirstQuality + :param tracks: The tracks selection conditions. + :type tracks: list[~azure.mgmt.media.models.FilterTrackSelection] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'presentation_time_range': {'key': 'properties.presentationTimeRange', 'type': 'PresentationTimeRange'}, + 'first_quality': {'key': 'properties.firstQuality', 'type': 'FirstQuality'}, + 'tracks': {'key': 'properties.tracks', 'type': '[FilterTrackSelection]'}, + } + + def __init__(self, **kwargs): + super(AccountFilter, self).__init__(**kwargs) + self.presentation_time_range = kwargs.get('presentation_time_range', None) + self.first_quality = kwargs.get('first_quality', None) + self.tracks = kwargs.get('tracks', None) diff --git a/azure-mgmt-media/azure/mgmt/media/models/account_filter_paged.py b/azure-mgmt-media/azure/mgmt/media/models/account_filter_paged.py new file mode 100644 index 000000000000..85be59b48d21 --- /dev/null +++ b/azure-mgmt-media/azure/mgmt/media/models/account_filter_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from 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) diff --git a/azure-mgmt-media/azure/mgmt/media/models/account_filter_py3.py b/azure-mgmt-media/azure/mgmt/media/models/account_filter_py3.py new file mode 100644 index 000000000000..ad44b4042617 --- /dev/null +++ b/azure-mgmt-media/azure/mgmt/media/models/account_filter_py3.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource_py3 import ProxyResource + + +class AccountFilter(ProxyResource): + """An Account Filter. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource ID for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param presentation_time_range: The presentation time range. + :type presentation_time_range: + ~azure.mgmt.media.models.PresentationTimeRange + :param first_quality: The first quality. + :type first_quality: ~azure.mgmt.media.models.FirstQuality + :param tracks: The tracks selection conditions. + :type tracks: list[~azure.mgmt.media.models.FilterTrackSelection] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'presentation_time_range': {'key': 'properties.presentationTimeRange', 'type': 'PresentationTimeRange'}, + 'first_quality': {'key': 'properties.firstQuality', 'type': 'FirstQuality'}, + 'tracks': {'key': 'properties.tracks', 'type': '[FilterTrackSelection]'}, + } + + def __init__(self, *, presentation_time_range=None, first_quality=None, tracks=None, **kwargs) -> None: + super(AccountFilter, self).__init__(**kwargs) + self.presentation_time_range = presentation_time_range + self.first_quality = first_quality + self.tracks = tracks diff --git a/azure-mgmt-media/azure/mgmt/media/models/akamai_signature_header_authentication_key.py b/azure-mgmt-media/azure/mgmt/media/models/akamai_signature_header_authentication_key.py index 72aae07435fd..a8f5cf92b2a1 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/akamai_signature_header_authentication_key.py +++ b/azure-mgmt-media/azure/mgmt/media/models/akamai_signature_header_authentication_key.py @@ -19,7 +19,7 @@ class AkamaiSignatureHeaderAuthenticationKey(Model): :type identifier: str :param base64_key: authentication key :type base64_key: str - :param expiration: The exact time the authentication key. + :param expiration: The expiration time of the authentication key. :type expiration: datetime """ diff --git a/azure-mgmt-media/azure/mgmt/media/models/akamai_signature_header_authentication_key_py3.py b/azure-mgmt-media/azure/mgmt/media/models/akamai_signature_header_authentication_key_py3.py index 3e8a54eb85f9..ca8fcf6ec53c 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/akamai_signature_header_authentication_key_py3.py +++ b/azure-mgmt-media/azure/mgmt/media/models/akamai_signature_header_authentication_key_py3.py @@ -19,7 +19,7 @@ class AkamaiSignatureHeaderAuthenticationKey(Model): :type identifier: str :param base64_key: authentication key :type base64_key: str - :param expiration: The exact time the authentication key. + :param expiration: The expiration time of the authentication key. :type expiration: datetime """ diff --git a/azure-mgmt-media/azure/mgmt/media/models/api_error.py b/azure-mgmt-media/azure/mgmt/media/models/api_error.py index 2f1bcdff16e7..0443e9b1e04a 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/api_error.py +++ b/azure-mgmt-media/azure/mgmt/media/models/api_error.py @@ -16,7 +16,7 @@ class ApiError(Model): """The API error. - :param error: The error properties. + :param error: ApiError. The error properties. :type error: ~azure.mgmt.media.models.ODataError """ diff --git a/azure-mgmt-media/azure/mgmt/media/models/api_error_py3.py b/azure-mgmt-media/azure/mgmt/media/models/api_error_py3.py index b73c93202d2b..ba67fd69a832 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/api_error_py3.py +++ b/azure-mgmt-media/azure/mgmt/media/models/api_error_py3.py @@ -16,7 +16,7 @@ class ApiError(Model): """The API error. - :param error: The error properties. + :param error: ApiError. The error properties. :type error: ~azure.mgmt.media.models.ODataError """ diff --git a/azure-mgmt-media/azure/mgmt/media/models/asset_file_encryption_metadata.py b/azure-mgmt-media/azure/mgmt/media/models/asset_file_encryption_metadata.py new file mode 100644 index 000000000000..5c10d567373d --- /dev/null +++ b/azure-mgmt-media/azure/mgmt/media/models/asset_file_encryption_metadata.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AssetFileEncryptionMetadata(Model): + """The Asset File Storage encryption metadata. + + All required parameters must be populated in order to send to Azure. + + :param initialization_vector: The Asset File initialization vector. + :type initialization_vector: str + :param asset_file_name: The Asset File name. + :type asset_file_name: str + :param asset_file_id: Required. The Asset File Id. + :type asset_file_id: str + """ + + _validation = { + 'asset_file_id': {'required': True}, + } + + _attribute_map = { + 'initialization_vector': {'key': 'initializationVector', 'type': 'str'}, + 'asset_file_name': {'key': 'assetFileName', 'type': 'str'}, + 'asset_file_id': {'key': 'assetFileId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AssetFileEncryptionMetadata, self).__init__(**kwargs) + self.initialization_vector = kwargs.get('initialization_vector', None) + self.asset_file_name = kwargs.get('asset_file_name', None) + self.asset_file_id = kwargs.get('asset_file_id', None) diff --git a/azure-mgmt-media/azure/mgmt/media/models/asset_file_encryption_metadata_py3.py b/azure-mgmt-media/azure/mgmt/media/models/asset_file_encryption_metadata_py3.py new file mode 100644 index 000000000000..e4e0fd18382e --- /dev/null +++ b/azure-mgmt-media/azure/mgmt/media/models/asset_file_encryption_metadata_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AssetFileEncryptionMetadata(Model): + """The Asset File Storage encryption metadata. + + All required parameters must be populated in order to send to Azure. + + :param initialization_vector: The Asset File initialization vector. + :type initialization_vector: str + :param asset_file_name: The Asset File name. + :type asset_file_name: str + :param asset_file_id: Required. The Asset File Id. + :type asset_file_id: str + """ + + _validation = { + 'asset_file_id': {'required': True}, + } + + _attribute_map = { + 'initialization_vector': {'key': 'initializationVector', 'type': 'str'}, + 'asset_file_name': {'key': 'assetFileName', 'type': 'str'}, + 'asset_file_id': {'key': 'assetFileId', 'type': 'str'}, + } + + def __init__(self, *, asset_file_id: str, initialization_vector: str=None, asset_file_name: str=None, **kwargs) -> None: + super(AssetFileEncryptionMetadata, self).__init__(**kwargs) + self.initialization_vector = initialization_vector + self.asset_file_name = asset_file_name + self.asset_file_id = asset_file_id diff --git a/azure-mgmt-media/azure/mgmt/media/models/asset_filter.py b/azure-mgmt-media/azure/mgmt/media/models/asset_filter.py new file mode 100644 index 000000000000..3ce9ac059845 --- /dev/null +++ b/azure-mgmt-media/azure/mgmt/media/models/asset_filter.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource import ProxyResource + + +class AssetFilter(ProxyResource): + """An Asset Filter. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource ID for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param presentation_time_range: The presentation time range. + :type presentation_time_range: + ~azure.mgmt.media.models.PresentationTimeRange + :param first_quality: The first quality. + :type first_quality: ~azure.mgmt.media.models.FirstQuality + :param tracks: The tracks selection conditions. + :type tracks: list[~azure.mgmt.media.models.FilterTrackSelection] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'presentation_time_range': {'key': 'properties.presentationTimeRange', 'type': 'PresentationTimeRange'}, + 'first_quality': {'key': 'properties.firstQuality', 'type': 'FirstQuality'}, + 'tracks': {'key': 'properties.tracks', 'type': '[FilterTrackSelection]'}, + } + + def __init__(self, **kwargs): + super(AssetFilter, self).__init__(**kwargs) + self.presentation_time_range = kwargs.get('presentation_time_range', None) + self.first_quality = kwargs.get('first_quality', None) + self.tracks = kwargs.get('tracks', None) diff --git a/azure-mgmt-media/azure/mgmt/media/models/asset_filter_paged.py b/azure-mgmt-media/azure/mgmt/media/models/asset_filter_paged.py new file mode 100644 index 000000000000..a4811a6f843b --- /dev/null +++ b/azure-mgmt-media/azure/mgmt/media/models/asset_filter_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class AssetFilterPaged(Paged): + """ + A paging container for iterating over a list of :class:`AssetFilter ` object + """ + + _attribute_map = { + 'next_link': {'key': '@odata\\.nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AssetFilter]'} + } + + def __init__(self, *args, **kwargs): + + super(AssetFilterPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-media/azure/mgmt/media/models/asset_filter_py3.py b/azure-mgmt-media/azure/mgmt/media/models/asset_filter_py3.py new file mode 100644 index 000000000000..b502bdd4f2d2 --- /dev/null +++ b/azure-mgmt-media/azure/mgmt/media/models/asset_filter_py3.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource_py3 import ProxyResource + + +class AssetFilter(ProxyResource): + """An Asset Filter. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource ID for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param presentation_time_range: The presentation time range. + :type presentation_time_range: + ~azure.mgmt.media.models.PresentationTimeRange + :param first_quality: The first quality. + :type first_quality: ~azure.mgmt.media.models.FirstQuality + :param tracks: The tracks selection conditions. + :type tracks: list[~azure.mgmt.media.models.FilterTrackSelection] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'presentation_time_range': {'key': 'properties.presentationTimeRange', 'type': 'PresentationTimeRange'}, + 'first_quality': {'key': 'properties.firstQuality', 'type': 'FirstQuality'}, + 'tracks': {'key': 'properties.tracks', 'type': '[FilterTrackSelection]'}, + } + + def __init__(self, *, presentation_time_range=None, first_quality=None, tracks=None, **kwargs) -> None: + super(AssetFilter, self).__init__(**kwargs) + self.presentation_time_range = presentation_time_range + self.first_quality = first_quality + self.tracks = tracks diff --git a/azure-mgmt-media/azure/mgmt/media/models/asset_streaming_locator.py b/azure-mgmt-media/azure/mgmt/media/models/asset_streaming_locator.py new file mode 100644 index 000000000000..836dba6a6dd4 --- /dev/null +++ b/azure-mgmt-media/azure/mgmt/media/models/asset_streaming_locator.py @@ -0,0 +1,72 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AssetStreamingLocator(Model): + """Properties of the Streaming Locator. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Streaming Locator name. + :vartype name: str + :ivar asset_name: Asset Name. + :vartype asset_name: str + :ivar created: The creation time of the Streaming Locator. + :vartype created: datetime + :ivar start_time: The start time of the Streaming Locator. + :vartype start_time: datetime + :ivar end_time: The end time of the Streaming Locator. + :vartype end_time: datetime + :ivar streaming_locator_id: StreamingLocatorId of the Streaming Locator. + :vartype streaming_locator_id: str + :ivar streaming_policy_name: Name of the Streaming Policy used by this + Streaming Locator. + :vartype streaming_policy_name: str + :ivar default_content_key_policy_name: Name of the default + ContentKeyPolicy used by this Streaming Locator. + :vartype default_content_key_policy_name: str + """ + + _validation = { + 'name': {'readonly': True}, + 'asset_name': {'readonly': True}, + 'created': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'streaming_locator_id': {'readonly': True}, + 'streaming_policy_name': {'readonly': True}, + 'default_content_key_policy_name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'asset_name': {'key': 'assetName', 'type': 'str'}, + 'created': {'key': 'created', 'type': 'iso-8601'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'streaming_locator_id': {'key': 'streamingLocatorId', 'type': 'str'}, + 'streaming_policy_name': {'key': 'streamingPolicyName', 'type': 'str'}, + 'default_content_key_policy_name': {'key': 'defaultContentKeyPolicyName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AssetStreamingLocator, self).__init__(**kwargs) + self.name = None + self.asset_name = None + self.created = None + self.start_time = None + self.end_time = None + self.streaming_locator_id = None + self.streaming_policy_name = None + self.default_content_key_policy_name = None diff --git a/azure-mgmt-media/azure/mgmt/media/models/asset_streaming_locator_py3.py b/azure-mgmt-media/azure/mgmt/media/models/asset_streaming_locator_py3.py new file mode 100644 index 000000000000..7e0a49d60455 --- /dev/null +++ b/azure-mgmt-media/azure/mgmt/media/models/asset_streaming_locator_py3.py @@ -0,0 +1,72 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AssetStreamingLocator(Model): + """Properties of the Streaming Locator. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Streaming Locator name. + :vartype name: str + :ivar asset_name: Asset Name. + :vartype asset_name: str + :ivar created: The creation time of the Streaming Locator. + :vartype created: datetime + :ivar start_time: The start time of the Streaming Locator. + :vartype start_time: datetime + :ivar end_time: The end time of the Streaming Locator. + :vartype end_time: datetime + :ivar streaming_locator_id: StreamingLocatorId of the Streaming Locator. + :vartype streaming_locator_id: str + :ivar streaming_policy_name: Name of the Streaming Policy used by this + Streaming Locator. + :vartype streaming_policy_name: str + :ivar default_content_key_policy_name: Name of the default + ContentKeyPolicy used by this Streaming Locator. + :vartype default_content_key_policy_name: str + """ + + _validation = { + 'name': {'readonly': True}, + 'asset_name': {'readonly': True}, + 'created': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'streaming_locator_id': {'readonly': True}, + 'streaming_policy_name': {'readonly': True}, + 'default_content_key_policy_name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'asset_name': {'key': 'assetName', 'type': 'str'}, + 'created': {'key': 'created', 'type': 'iso-8601'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'streaming_locator_id': {'key': 'streamingLocatorId', 'type': 'str'}, + 'streaming_policy_name': {'key': 'streamingPolicyName', 'type': 'str'}, + 'default_content_key_policy_name': {'key': 'defaultContentKeyPolicyName', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(AssetStreamingLocator, self).__init__(**kwargs) + self.name = None + self.asset_name = None + self.created = None + self.start_time = None + self.end_time = None + self.streaming_locator_id = None + self.streaming_policy_name = None + self.default_content_key_policy_name = None diff --git a/azure-mgmt-media/azure/mgmt/media/models/audio_analyzer_preset.py b/azure-mgmt-media/azure/mgmt/media/models/audio_analyzer_preset.py index 1333892c607d..9f5f5f61defd 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/audio_analyzer_preset.py +++ b/azure-mgmt-media/azure/mgmt/media/models/audio_analyzer_preset.py @@ -27,7 +27,13 @@ class AudioAnalyzerPreset(Preset): :param audio_language: The language for the audio payload in the input using the BCP-47 format of 'language tag-region' (e.g: 'en-US'). The list of supported languages are, 'en-US', 'en-GB', 'es-ES', 'es-MX', 'fr-FR', - 'it-IT', 'ja-JP', 'pt-BR', 'zh-CN'. + 'it-IT', 'ja-JP', 'pt-BR', 'zh-CN', 'de-DE', 'ar-EG', 'ru-RU', 'hi-IN'. If + not specified, automatic language detection would be employed. This + feature currently supports English, Chinese, French, German, Italian, + Japanese, Spanish, Russian, and Portuguese. The automatic detection works + best with audio recordings with clearly discernable speech. If automatic + detection fails to find the language, transcription would fallback to + English. :type audio_language: str """ diff --git a/azure-mgmt-media/azure/mgmt/media/models/audio_analyzer_preset_py3.py b/azure-mgmt-media/azure/mgmt/media/models/audio_analyzer_preset_py3.py index 2f0b32645a49..fb0c4f426094 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/audio_analyzer_preset_py3.py +++ b/azure-mgmt-media/azure/mgmt/media/models/audio_analyzer_preset_py3.py @@ -27,7 +27,13 @@ class AudioAnalyzerPreset(Preset): :param audio_language: The language for the audio payload in the input using the BCP-47 format of 'language tag-region' (e.g: 'en-US'). The list of supported languages are, 'en-US', 'en-GB', 'es-ES', 'es-MX', 'fr-FR', - 'it-IT', 'ja-JP', 'pt-BR', 'zh-CN'. + 'it-IT', 'ja-JP', 'pt-BR', 'zh-CN', 'de-DE', 'ar-EG', 'ru-RU', 'hi-IN'. If + not specified, automatic language detection would be employed. This + feature currently supports English, Chinese, French, German, Italian, + Japanese, Spanish, Russian, and Portuguese. The automatic detection works + best with audio recordings with clearly discernable speech. If automatic + detection fails to find the language, transcription would fallback to + English. :type audio_language: str """ diff --git a/azure-mgmt-media/azure/mgmt/media/models/azure_media_services_enums.py b/azure-mgmt-media/azure/mgmt/media/models/azure_media_services_enums.py index ce57fe502188..6798d1b9d5fe 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/azure_media_services_enums.py +++ b/azure-mgmt-media/azure/mgmt/media/models/azure_media_services_enums.py @@ -12,6 +12,36 @@ 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 MetricUnit(str, Enum): + + bytes = "Bytes" #: The number of bytes. + count = "Count" #: The count. + milliseconds = "Milliseconds" #: The number of milliseconds. + + +class MetricAggregationType(str, Enum): + + average = "Average" #: The average. + count = "Count" #: The count of a number of items, usually requests. + total = "Total" #: The sum. + + class StorageAccountType(str, Enum): primary = "Primary" #: The primary storage account for the Media Services account. @@ -131,6 +161,9 @@ class H264Complexity(str, Enum): 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 64 kbps. + h264_single_bitrate720p = "H264SingleBitrate720p" #: Produces an MP4 file where the video is encoded with H.264 codec at 4500 kbps and a picture height of 720 pixels, and the stereo audio is encoded with AAC-LC codec at 64 kbps. + h264_single_bitrate1080p = "H264SingleBitrate1080p" #: Produces an MP4 file where the video is encoded with H.264 codec at 6750 kbps and a picture height of 1080 pixels, and the stereo audio is encoded with AAC-LC codec at 64 kbps. adaptive_streaming = "AdaptiveStreaming" #: Produces a set of GOP aligned MP4 files with H.264 video and stereo AAC audio. Auto-generates a bitrate ladder based on the input resolution and bitrate. The auto-generated preset will never exceed the input resolution and bitrate. For example, if the input is 720p at 3 Mbps, output will remain 720p at best, and will start at rates lower than 3 Mbps. The output will will have video and audio in separate MP4 files, which is optimal for adaptive streaming. aac_good_quality_audio = "AACGoodQualityAudio" #: Produces a single MP4 file containing only stereo audio encoded at 192 kbps. h264_multiple_bitrate1080p = "H264MultipleBitrate1080p" #: Produces a set of 8 GOP-aligned MP4 files, ranging from 6000 kbps to 400 kbps, and stereo AAC audio. Resolution starts at 1080p and goes down to 360p. @@ -138,6 +171,13 @@ class EncoderNamedPreset(str, Enum): h264_multiple_bitrate_sd = "H264MultipleBitrateSD" #: Produces a set of 5 GOP-aligned MP4 files, ranging from 1600kbps to 400 kbps, and stereo AAC audio. Resolution starts at 480p and goes down to 360p. +class InsightsType(str, Enum): + + audio_insights_only = "AudioInsightsOnly" #: Generate audio only insights. Ignore video even if present. Fails if no audio is present. + video_insights_only = "VideoInsightsOnly" #: Generate video only insights. Ignore audio if present. Fails if no video is present. + all_insights = "AllInsights" #: Generate both audio and video insights. Fails if either audio or video Insights fail. + + class OnErrorType(str, Enum): stop_processing_job = "StopProcessingJob" #: Tells the service that if this TransformOutput fails, then any other incomplete TransformOutputs can be stopped. diff --git a/azure-mgmt-media/azure/mgmt/media/models/built_in_standard_encoder_preset.py b/azure-mgmt-media/azure/mgmt/media/models/built_in_standard_encoder_preset.py index ca3160283985..e38ec79bbd0d 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/built_in_standard_encoder_preset.py +++ b/azure-mgmt-media/azure/mgmt/media/models/built_in_standard_encoder_preset.py @@ -21,7 +21,8 @@ class BuiltInStandardEncoderPreset(Preset): :param odatatype: Required. Constant filled by server. :type odatatype: str :param preset_name: Required. The built-in preset to be used for encoding - videos. Possible values include: 'AdaptiveStreaming', + videos. Possible values include: 'H264SingleBitrateSD', + 'H264SingleBitrate720p', 'H264SingleBitrate1080p', 'AdaptiveStreaming', 'AACGoodQualityAudio', 'H264MultipleBitrate1080p', 'H264MultipleBitrate720p', 'H264MultipleBitrateSD' :type preset_name: str or ~azure.mgmt.media.models.EncoderNamedPreset diff --git a/azure-mgmt-media/azure/mgmt/media/models/built_in_standard_encoder_preset_py3.py b/azure-mgmt-media/azure/mgmt/media/models/built_in_standard_encoder_preset_py3.py index c9e25be5cff7..f5a25712acd3 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/built_in_standard_encoder_preset_py3.py +++ b/azure-mgmt-media/azure/mgmt/media/models/built_in_standard_encoder_preset_py3.py @@ -21,7 +21,8 @@ class BuiltInStandardEncoderPreset(Preset): :param odatatype: Required. Constant filled by server. :type odatatype: str :param preset_name: Required. The built-in preset to be used for encoding - videos. Possible values include: 'AdaptiveStreaming', + videos. Possible values include: 'H264SingleBitrateSD', + 'H264SingleBitrate720p', 'H264SingleBitrate1080p', 'AdaptiveStreaming', 'AACGoodQualityAudio', 'H264MultipleBitrate1080p', 'H264MultipleBitrate720p', 'H264MultipleBitrateSD' :type preset_name: str or ~azure.mgmt.media.models.EncoderNamedPreset diff --git a/azure-mgmt-media/azure/mgmt/media/models/content_key_policy_fair_play_configuration.py b/azure-mgmt-media/azure/mgmt/media/models/content_key_policy_fair_play_configuration.py index 41f284bf3af5..c03e24b9d77b 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/content_key_policy_fair_play_configuration.py +++ b/azure-mgmt-media/azure/mgmt/media/models/content_key_policy_fair_play_configuration.py @@ -19,7 +19,8 @@ class ContentKeyPolicyFairPlayConfiguration(ContentKeyPolicyConfiguration): :param odatatype: Required. Constant filled by server. :type odatatype: str - :param ask: Required. The key that must be used as FairPlay ASk. + :param ask: Required. The key that must be used as FairPlay Application + Secret key. :type ask: bytearray :param fair_play_pfx_password: Required. The password encrypting FairPlay certificate in PKCS 12 (pfx) format. diff --git a/azure-mgmt-media/azure/mgmt/media/models/content_key_policy_fair_play_configuration_py3.py b/azure-mgmt-media/azure/mgmt/media/models/content_key_policy_fair_play_configuration_py3.py index b0e4cb88d280..4d97e09b7a34 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/content_key_policy_fair_play_configuration_py3.py +++ b/azure-mgmt-media/azure/mgmt/media/models/content_key_policy_fair_play_configuration_py3.py @@ -19,7 +19,8 @@ class ContentKeyPolicyFairPlayConfiguration(ContentKeyPolicyConfiguration): :param odatatype: Required. Constant filled by server. :type odatatype: str - :param ask: Required. The key that must be used as FairPlay ASk. + :param ask: Required. The key that must be used as FairPlay Application + Secret key. :type ask: bytearray :param fair_play_pfx_password: Required. The password encrypting FairPlay certificate in PKCS 12 (pfx) format. diff --git a/azure-mgmt-media/azure/mgmt/media/models/filter_track_property_condition.py b/azure-mgmt-media/azure/mgmt/media/models/filter_track_property_condition.py new file mode 100644 index 000000000000..87bdd8310918 --- /dev/null +++ b/azure-mgmt-media/azure/mgmt/media/models/filter_track_property_condition.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FilterTrackPropertyCondition(Model): + """The class to specify one track property condition. + + All required parameters must be populated in order to send to Azure. + + :param property: Required. The track property type. Possible values + include: 'Unknown', 'Type', 'Name', 'Language', 'FourCC', 'Bitrate' + :type property: str or ~azure.mgmt.media.models.FilterTrackPropertyType + :param value: Required. The track proprty value. + :type value: str + :param operation: Required. The track property condition operation. + Possible values include: 'Equal', 'NotEqual' + :type operation: str or + ~azure.mgmt.media.models.FilterTrackPropertyCompareOperation + """ + + _validation = { + 'property': {'required': True}, + 'value': {'required': True}, + 'operation': {'required': True}, + } + + _attribute_map = { + 'property': {'key': 'property', 'type': 'FilterTrackPropertyType'}, + 'value': {'key': 'value', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'FilterTrackPropertyCompareOperation'}, + } + + def __init__(self, **kwargs): + super(FilterTrackPropertyCondition, self).__init__(**kwargs) + self.property = kwargs.get('property', None) + self.value = kwargs.get('value', None) + self.operation = kwargs.get('operation', None) diff --git a/azure-mgmt-media/azure/mgmt/media/models/filter_track_property_condition_py3.py b/azure-mgmt-media/azure/mgmt/media/models/filter_track_property_condition_py3.py new file mode 100644 index 000000000000..e39b0da1bb01 --- /dev/null +++ b/azure-mgmt-media/azure/mgmt/media/models/filter_track_property_condition_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FilterTrackPropertyCondition(Model): + """The class to specify one track property condition. + + All required parameters must be populated in order to send to Azure. + + :param property: Required. The track property type. Possible values + include: 'Unknown', 'Type', 'Name', 'Language', 'FourCC', 'Bitrate' + :type property: str or ~azure.mgmt.media.models.FilterTrackPropertyType + :param value: Required. The track proprty value. + :type value: str + :param operation: Required. The track property condition operation. + Possible values include: 'Equal', 'NotEqual' + :type operation: str or + ~azure.mgmt.media.models.FilterTrackPropertyCompareOperation + """ + + _validation = { + 'property': {'required': True}, + 'value': {'required': True}, + 'operation': {'required': True}, + } + + _attribute_map = { + 'property': {'key': 'property', 'type': 'FilterTrackPropertyType'}, + 'value': {'key': 'value', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'FilterTrackPropertyCompareOperation'}, + } + + def __init__(self, *, property, value: str, operation, **kwargs) -> None: + super(FilterTrackPropertyCondition, self).__init__(**kwargs) + self.property = property + self.value = value + self.operation = operation diff --git a/azure-mgmt-media/azure/mgmt/media/models/filter_track_selection.py b/azure-mgmt-media/azure/mgmt/media/models/filter_track_selection.py new file mode 100644 index 000000000000..04ad9d71c383 --- /dev/null +++ b/azure-mgmt-media/azure/mgmt/media/models/filter_track_selection.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FilterTrackSelection(Model): + """Representing a list of FilterTrackPropertyConditions to select a track. + The filters are combined using a logical AND operation. + + All required parameters must be populated in order to send to Azure. + + :param track_selections: Required. The track selections. + :type track_selections: + list[~azure.mgmt.media.models.FilterTrackPropertyCondition] + """ + + _validation = { + 'track_selections': {'required': True}, + } + + _attribute_map = { + 'track_selections': {'key': 'trackSelections', 'type': '[FilterTrackPropertyCondition]'}, + } + + def __init__(self, **kwargs): + super(FilterTrackSelection, self).__init__(**kwargs) + self.track_selections = kwargs.get('track_selections', None) diff --git a/azure-mgmt-media/azure/mgmt/media/models/filter_track_selection_py3.py b/azure-mgmt-media/azure/mgmt/media/models/filter_track_selection_py3.py new file mode 100644 index 000000000000..e3dd68283ba3 --- /dev/null +++ b/azure-mgmt-media/azure/mgmt/media/models/filter_track_selection_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FilterTrackSelection(Model): + """Representing a list of FilterTrackPropertyConditions to select a track. + The filters are combined using a logical AND operation. + + All required parameters must be populated in order to send to Azure. + + :param track_selections: Required. The track selections. + :type track_selections: + list[~azure.mgmt.media.models.FilterTrackPropertyCondition] + """ + + _validation = { + 'track_selections': {'required': True}, + } + + _attribute_map = { + 'track_selections': {'key': 'trackSelections', 'type': '[FilterTrackPropertyCondition]'}, + } + + def __init__(self, *, track_selections, **kwargs) -> None: + super(FilterTrackSelection, self).__init__(**kwargs) + self.track_selections = track_selections diff --git a/azure-mgmt-media/azure/mgmt/media/models/asset_storage_encryption_key_py3.py b/azure-mgmt-media/azure/mgmt/media/models/first_quality.py similarity index 53% rename from azure-mgmt-media/azure/mgmt/media/models/asset_storage_encryption_key_py3.py rename to azure-mgmt-media/azure/mgmt/media/models/first_quality.py index 510fbb0af58b..bb814dad000c 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/asset_storage_encryption_key_py3.py +++ b/azure-mgmt-media/azure/mgmt/media/models/first_quality.py @@ -12,17 +12,23 @@ from msrest.serialization import Model -class AssetStorageEncryptionKey(Model): - """The Asset Storage encryption key. +class FirstQuality(Model): + """Filter First Quality. - :param storage_encryption_key: The Asset storage encryption key. - :type storage_encryption_key: str + All required parameters must be populated in order to send to Azure. + + :param bitrate: Required. The first quality bitrate. + :type bitrate: int """ + _validation = { + 'bitrate': {'required': True}, + } + _attribute_map = { - 'storage_encryption_key': {'key': 'storageEncryptionKey', 'type': 'str'}, + 'bitrate': {'key': 'bitrate', 'type': 'int'}, } - def __init__(self, *, storage_encryption_key: str=None, **kwargs) -> None: - super(AssetStorageEncryptionKey, self).__init__(**kwargs) - self.storage_encryption_key = storage_encryption_key + def __init__(self, **kwargs): + super(FirstQuality, self).__init__(**kwargs) + self.bitrate = kwargs.get('bitrate', None) diff --git a/azure-mgmt-media/azure/mgmt/media/models/first_quality_py3.py b/azure-mgmt-media/azure/mgmt/media/models/first_quality_py3.py new file mode 100644 index 000000000000..1b68b1b79a52 --- /dev/null +++ b/azure-mgmt-media/azure/mgmt/media/models/first_quality_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FirstQuality(Model): + """Filter First Quality. + + All required parameters must be populated in order to send to Azure. + + :param bitrate: Required. The first quality bitrate. + :type bitrate: int + """ + + _validation = { + 'bitrate': {'required': True}, + } + + _attribute_map = { + 'bitrate': {'key': 'bitrate', 'type': 'int'}, + } + + def __init__(self, *, bitrate: int, **kwargs) -> None: + super(FirstQuality, self).__init__(**kwargs) + self.bitrate = bitrate diff --git a/azure-mgmt-media/azure/mgmt/media/models/job.py b/azure-mgmt-media/azure/mgmt/media/models/job.py index 24dd1a3ad3f6..b7e28c275d68 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/job.py +++ b/azure-mgmt-media/azure/mgmt/media/models/job.py @@ -48,7 +48,7 @@ class Job(ProxyResource): default is normal. Possible values include: 'Low', 'Normal', 'High' :type priority: str or ~azure.mgmt.media.models.Priority :param correlation_data: Customer provided correlation data that will be - returned in Job completed events. + returned in Job and JobOutput state events. :type correlation_data: dict[str, str] """ diff --git a/azure-mgmt-media/azure/mgmt/media/models/job_input.py b/azure-mgmt-media/azure/mgmt/media/models/job_input.py index 90ea8ff41864..5a65a203cc3e 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/job_input.py +++ b/azure-mgmt-media/azure/mgmt/media/models/job_input.py @@ -20,13 +20,6 @@ class JobInput(Model): All required parameters must be populated in order to send to Azure. - :param label: A label that is assigned to a JobInput, that is used to - satisfy a reference used in the Transform. For example, a Transform can be - authored so as to take an image file with the label 'xyz' and apply it as - an overlay onto the input video before it is encoded. When submitting a - Job, exactly one of the JobInputs should be the image file, and it should - have the label 'xyz'. - :type label: str :param odatatype: Required. Constant filled by server. :type odatatype: str """ @@ -36,7 +29,6 @@ class JobInput(Model): } _attribute_map = { - 'label': {'key': 'label', 'type': 'str'}, 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, } @@ -46,5 +38,4 @@ class JobInput(Model): def __init__(self, **kwargs): super(JobInput, self).__init__(**kwargs) - self.label = kwargs.get('label', None) self.odatatype = None diff --git a/azure-mgmt-media/azure/mgmt/media/models/job_input_asset.py b/azure-mgmt-media/azure/mgmt/media/models/job_input_asset.py index e83a706c7921..db205ff0064e 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/job_input_asset.py +++ b/azure-mgmt-media/azure/mgmt/media/models/job_input_asset.py @@ -17,17 +17,17 @@ class JobInputAsset(JobInputClip): All required parameters must be populated in order to send to Azure. - :param label: A label that is assigned to a JobInput, that is used to + :param odatatype: Required. Constant filled by server. + :type odatatype: str + :param files: List of files. Required for JobInputHttp. + :type files: list[str] + :param label: A label that is assigned to a JobInputClip, that is used to satisfy a reference used in the Transform. For example, a Transform can be authored so as to take an image file with the label 'xyz' and apply it as an overlay onto the input video before it is encoded. When submitting a Job, exactly one of the JobInputs should be the image file, and it should have the label 'xyz'. :type label: str - :param odatatype: Required. Constant filled by server. - :type odatatype: str - :param files: List of files. Required for JobInputHttp. - :type files: list[str] :param asset_name: Required. The name of the input Asset. :type asset_name: str """ @@ -38,9 +38,9 @@ class JobInputAsset(JobInputClip): } _attribute_map = { - 'label': {'key': 'label', 'type': 'str'}, 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, 'files': {'key': 'files', 'type': '[str]'}, + 'label': {'key': 'label', 'type': 'str'}, 'asset_name': {'key': 'assetName', 'type': 'str'}, } diff --git a/azure-mgmt-media/azure/mgmt/media/models/job_input_asset_py3.py b/azure-mgmt-media/azure/mgmt/media/models/job_input_asset_py3.py index 0bb6932fa19b..ea95bb8d8ced 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/job_input_asset_py3.py +++ b/azure-mgmt-media/azure/mgmt/media/models/job_input_asset_py3.py @@ -17,17 +17,17 @@ class JobInputAsset(JobInputClip): All required parameters must be populated in order to send to Azure. - :param label: A label that is assigned to a JobInput, that is used to + :param odatatype: Required. Constant filled by server. + :type odatatype: str + :param files: List of files. Required for JobInputHttp. + :type files: list[str] + :param label: A label that is assigned to a JobInputClip, that is used to satisfy a reference used in the Transform. For example, a Transform can be authored so as to take an image file with the label 'xyz' and apply it as an overlay onto the input video before it is encoded. When submitting a Job, exactly one of the JobInputs should be the image file, and it should have the label 'xyz'. :type label: str - :param odatatype: Required. Constant filled by server. - :type odatatype: str - :param files: List of files. Required for JobInputHttp. - :type files: list[str] :param asset_name: Required. The name of the input Asset. :type asset_name: str """ @@ -38,13 +38,13 @@ class JobInputAsset(JobInputClip): } _attribute_map = { - 'label': {'key': 'label', 'type': 'str'}, 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, 'files': {'key': 'files', 'type': '[str]'}, + 'label': {'key': 'label', 'type': 'str'}, 'asset_name': {'key': 'assetName', 'type': 'str'}, } - def __init__(self, *, asset_name: str, label: str=None, files=None, **kwargs) -> None: - super(JobInputAsset, self).__init__(label=label, files=files, **kwargs) + def __init__(self, *, asset_name: str, files=None, label: str=None, **kwargs) -> None: + super(JobInputAsset, self).__init__(files=files, label=label, **kwargs) self.asset_name = asset_name self.odatatype = '#Microsoft.Media.JobInputAsset' diff --git a/azure-mgmt-media/azure/mgmt/media/models/job_input_clip.py b/azure-mgmt-media/azure/mgmt/media/models/job_input_clip.py index 35ae5d3acdd3..5c36848da19b 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/job_input_clip.py +++ b/azure-mgmt-media/azure/mgmt/media/models/job_input_clip.py @@ -20,17 +20,17 @@ class JobInputClip(JobInput): All required parameters must be populated in order to send to Azure. - :param label: A label that is assigned to a JobInput, that is used to + :param odatatype: Required. Constant filled by server. + :type odatatype: str + :param files: List of files. Required for JobInputHttp. + :type files: list[str] + :param label: A label that is assigned to a JobInputClip, that is used to satisfy a reference used in the Transform. For example, a Transform can be authored so as to take an image file with the label 'xyz' and apply it as an overlay onto the input video before it is encoded. When submitting a Job, exactly one of the JobInputs should be the image file, and it should have the label 'xyz'. :type label: str - :param odatatype: Required. Constant filled by server. - :type odatatype: str - :param files: List of files. Required for JobInputHttp. - :type files: list[str] """ _validation = { @@ -38,9 +38,9 @@ class JobInputClip(JobInput): } _attribute_map = { - 'label': {'key': 'label', 'type': 'str'}, 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, 'files': {'key': 'files', 'type': '[str]'}, + 'label': {'key': 'label', 'type': 'str'}, } _subtype_map = { @@ -50,4 +50,5 @@ class JobInputClip(JobInput): def __init__(self, **kwargs): super(JobInputClip, self).__init__(**kwargs) self.files = kwargs.get('files', None) + self.label = kwargs.get('label', None) self.odatatype = '#Microsoft.Media.JobInputClip' diff --git a/azure-mgmt-media/azure/mgmt/media/models/job_input_clip_py3.py b/azure-mgmt-media/azure/mgmt/media/models/job_input_clip_py3.py index 69f390a41eac..18af26239f74 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/job_input_clip_py3.py +++ b/azure-mgmt-media/azure/mgmt/media/models/job_input_clip_py3.py @@ -20,17 +20,17 @@ class JobInputClip(JobInput): All required parameters must be populated in order to send to Azure. - :param label: A label that is assigned to a JobInput, that is used to + :param odatatype: Required. Constant filled by server. + :type odatatype: str + :param files: List of files. Required for JobInputHttp. + :type files: list[str] + :param label: A label that is assigned to a JobInputClip, that is used to satisfy a reference used in the Transform. For example, a Transform can be authored so as to take an image file with the label 'xyz' and apply it as an overlay onto the input video before it is encoded. When submitting a Job, exactly one of the JobInputs should be the image file, and it should have the label 'xyz'. :type label: str - :param odatatype: Required. Constant filled by server. - :type odatatype: str - :param files: List of files. Required for JobInputHttp. - :type files: list[str] """ _validation = { @@ -38,16 +38,17 @@ class JobInputClip(JobInput): } _attribute_map = { - 'label': {'key': 'label', 'type': 'str'}, 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, 'files': {'key': 'files', 'type': '[str]'}, + 'label': {'key': 'label', 'type': 'str'}, } _subtype_map = { 'odatatype': {'#Microsoft.Media.JobInputAsset': 'JobInputAsset', '#Microsoft.Media.JobInputHttp': 'JobInputHttp'} } - def __init__(self, *, label: str=None, files=None, **kwargs) -> None: - super(JobInputClip, self).__init__(label=label, **kwargs) + def __init__(self, *, files=None, label: str=None, **kwargs) -> None: + super(JobInputClip, self).__init__(**kwargs) self.files = files + self.label = label self.odatatype = '#Microsoft.Media.JobInputClip' diff --git a/azure-mgmt-media/azure/mgmt/media/models/job_input_http.py b/azure-mgmt-media/azure/mgmt/media/models/job_input_http.py index e330c0f5a234..3c739e4ee848 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/job_input_http.py +++ b/azure-mgmt-media/azure/mgmt/media/models/job_input_http.py @@ -17,17 +17,17 @@ class JobInputHttp(JobInputClip): All required parameters must be populated in order to send to Azure. - :param label: A label that is assigned to a JobInput, that is used to + :param odatatype: Required. Constant filled by server. + :type odatatype: str + :param files: List of files. Required for JobInputHttp. + :type files: list[str] + :param label: A label that is assigned to a JobInputClip, that is used to satisfy a reference used in the Transform. For example, a Transform can be authored so as to take an image file with the label 'xyz' and apply it as an overlay onto the input video before it is encoded. When submitting a Job, exactly one of the JobInputs should be the image file, and it should have the label 'xyz'. :type label: str - :param odatatype: Required. Constant filled by server. - :type odatatype: str - :param files: List of files. Required for JobInputHttp. - :type files: list[str] :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. @@ -39,9 +39,9 @@ class JobInputHttp(JobInputClip): } _attribute_map = { - 'label': {'key': 'label', 'type': 'str'}, 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, 'files': {'key': 'files', 'type': '[str]'}, + 'label': {'key': 'label', 'type': 'str'}, 'base_uri': {'key': 'baseUri', 'type': 'str'}, } diff --git a/azure-mgmt-media/azure/mgmt/media/models/job_input_http_py3.py b/azure-mgmt-media/azure/mgmt/media/models/job_input_http_py3.py index 7dda64a529c6..55436af89760 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/job_input_http_py3.py +++ b/azure-mgmt-media/azure/mgmt/media/models/job_input_http_py3.py @@ -17,17 +17,17 @@ class JobInputHttp(JobInputClip): All required parameters must be populated in order to send to Azure. - :param label: A label that is assigned to a JobInput, that is used to + :param odatatype: Required. Constant filled by server. + :type odatatype: str + :param files: List of files. Required for JobInputHttp. + :type files: list[str] + :param label: A label that is assigned to a JobInputClip, that is used to satisfy a reference used in the Transform. For example, a Transform can be authored so as to take an image file with the label 'xyz' and apply it as an overlay onto the input video before it is encoded. When submitting a Job, exactly one of the JobInputs should be the image file, and it should have the label 'xyz'. :type label: str - :param odatatype: Required. Constant filled by server. - :type odatatype: str - :param files: List of files. Required for JobInputHttp. - :type files: list[str] :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. @@ -39,13 +39,13 @@ class JobInputHttp(JobInputClip): } _attribute_map = { - 'label': {'key': 'label', 'type': 'str'}, 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, 'files': {'key': 'files', 'type': '[str]'}, + 'label': {'key': 'label', 'type': 'str'}, 'base_uri': {'key': 'baseUri', 'type': 'str'}, } - def __init__(self, *, label: str=None, files=None, base_uri: str=None, **kwargs) -> None: - super(JobInputHttp, self).__init__(label=label, files=files, **kwargs) + def __init__(self, *, files=None, label: str=None, base_uri: str=None, **kwargs) -> None: + super(JobInputHttp, self).__init__(files=files, label=label, **kwargs) self.base_uri = base_uri self.odatatype = '#Microsoft.Media.JobInputHttp' diff --git a/azure-mgmt-media/azure/mgmt/media/models/job_input_py3.py b/azure-mgmt-media/azure/mgmt/media/models/job_input_py3.py index 17e20e9ec76b..e67513fe2f42 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/job_input_py3.py +++ b/azure-mgmt-media/azure/mgmt/media/models/job_input_py3.py @@ -20,13 +20,6 @@ class JobInput(Model): All required parameters must be populated in order to send to Azure. - :param label: A label that is assigned to a JobInput, that is used to - satisfy a reference used in the Transform. For example, a Transform can be - authored so as to take an image file with the label 'xyz' and apply it as - an overlay onto the input video before it is encoded. When submitting a - Job, exactly one of the JobInputs should be the image file, and it should - have the label 'xyz'. - :type label: str :param odatatype: Required. Constant filled by server. :type odatatype: str """ @@ -36,7 +29,6 @@ class JobInput(Model): } _attribute_map = { - 'label': {'key': 'label', 'type': 'str'}, 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, } @@ -44,7 +36,6 @@ class JobInput(Model): 'odatatype': {'#Microsoft.Media.JobInputClip': 'JobInputClip', '#Microsoft.Media.JobInputs': 'JobInputs'} } - def __init__(self, *, label: str=None, **kwargs) -> None: + def __init__(self, **kwargs) -> None: super(JobInput, self).__init__(**kwargs) - self.label = label self.odatatype = None diff --git a/azure-mgmt-media/azure/mgmt/media/models/job_inputs.py b/azure-mgmt-media/azure/mgmt/media/models/job_inputs.py index 8dadccb695b5..e5ead7fc055a 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/job_inputs.py +++ b/azure-mgmt-media/azure/mgmt/media/models/job_inputs.py @@ -17,13 +17,6 @@ class JobInputs(JobInput): All required parameters must be populated in order to send to Azure. - :param label: A label that is assigned to a JobInput, that is used to - satisfy a reference used in the Transform. For example, a Transform can be - authored so as to take an image file with the label 'xyz' and apply it as - an overlay onto the input video before it is encoded. When submitting a - Job, exactly one of the JobInputs should be the image file, and it should - have the label 'xyz'. - :type label: str :param odatatype: Required. Constant filled by server. :type odatatype: str :param inputs: List of inputs to a Job. @@ -35,7 +28,6 @@ class JobInputs(JobInput): } _attribute_map = { - 'label': {'key': 'label', 'type': 'str'}, 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, 'inputs': {'key': 'inputs', 'type': '[JobInput]'}, } diff --git a/azure-mgmt-media/azure/mgmt/media/models/job_inputs_py3.py b/azure-mgmt-media/azure/mgmt/media/models/job_inputs_py3.py index 2b81a299310b..91c7ef1339f7 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/job_inputs_py3.py +++ b/azure-mgmt-media/azure/mgmt/media/models/job_inputs_py3.py @@ -17,13 +17,6 @@ class JobInputs(JobInput): All required parameters must be populated in order to send to Azure. - :param label: A label that is assigned to a JobInput, that is used to - satisfy a reference used in the Transform. For example, a Transform can be - authored so as to take an image file with the label 'xyz' and apply it as - an overlay onto the input video before it is encoded. When submitting a - Job, exactly one of the JobInputs should be the image file, and it should - have the label 'xyz'. - :type label: str :param odatatype: Required. Constant filled by server. :type odatatype: str :param inputs: List of inputs to a Job. @@ -35,12 +28,11 @@ class JobInputs(JobInput): } _attribute_map = { - 'label': {'key': 'label', 'type': 'str'}, 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, 'inputs': {'key': 'inputs', 'type': '[JobInput]'}, } - def __init__(self, *, label: str=None, inputs=None, **kwargs) -> None: - super(JobInputs, self).__init__(label=label, **kwargs) + def __init__(self, *, inputs=None, **kwargs) -> None: + super(JobInputs, self).__init__(**kwargs) self.inputs = inputs self.odatatype = '#Microsoft.Media.JobInputs' diff --git a/azure-mgmt-media/azure/mgmt/media/models/job_output.py b/azure-mgmt-media/azure/mgmt/media/models/job_output.py index b9c0c9890478..b25474b06424 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/job_output.py +++ b/azure-mgmt-media/azure/mgmt/media/models/job_output.py @@ -31,10 +31,23 @@ class JobOutput(Model): 'Queued', 'Scheduled' :vartype state: str or ~azure.mgmt.media.models.JobState :ivar progress: If the JobOutput is in a Processing state, this contains - the job completion percentage. The value is an estimate and not intended - to be used to predict job completion times. To determine if the JobOutput + the Job completion percentage. The value is an estimate and not intended + to be used to predict Job completion times. To determine if the JobOutput is complete, use the State property. :vartype progress: int + :param label: A label that is assigned to a JobOutput in order to help + uniquely identify it. This is useful when your Transform has more than one + TransformOutput, whereby your Job has more than one JobOutput. In such + cases, when you submit the Job, you will add two or more JobOutputs, in + the same order as TransformOutputs in the Transform. Subsequently, when + you retrieve the Job, either through events or on a GET request, you can + use the label to easily identify the JobOutput. If a label is not + provided, a default value of '{presetName}_{outputIndex}' will be used, + where the preset name is the name of the preset in the corresponding + TransformOutput and the output index is the relative index of the this + JobOutput within the Job. Note that this index is the same as the relative + index of the corresponding TransformOutput within its Transform. + :type label: str :param odatatype: Required. Constant filled by server. :type odatatype: str """ @@ -50,6 +63,7 @@ class JobOutput(Model): 'error': {'key': 'error', 'type': 'JobError'}, 'state': {'key': 'state', 'type': 'JobState'}, 'progress': {'key': 'progress', 'type': 'int'}, + 'label': {'key': 'label', 'type': 'str'}, 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, } @@ -62,4 +76,5 @@ def __init__(self, **kwargs): self.error = None self.state = None self.progress = None + self.label = kwargs.get('label', None) self.odatatype = None diff --git a/azure-mgmt-media/azure/mgmt/media/models/job_output_asset.py b/azure-mgmt-media/azure/mgmt/media/models/job_output_asset.py index 929b4b449645..c0205ad529b9 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/job_output_asset.py +++ b/azure-mgmt-media/azure/mgmt/media/models/job_output_asset.py @@ -28,10 +28,23 @@ class JobOutputAsset(JobOutput): 'Queued', 'Scheduled' :vartype state: str or ~azure.mgmt.media.models.JobState :ivar progress: If the JobOutput is in a Processing state, this contains - the job completion percentage. The value is an estimate and not intended - to be used to predict job completion times. To determine if the JobOutput + the Job completion percentage. The value is an estimate and not intended + to be used to predict Job completion times. To determine if the JobOutput is complete, use the State property. :vartype progress: int + :param label: A label that is assigned to a JobOutput in order to help + uniquely identify it. This is useful when your Transform has more than one + TransformOutput, whereby your Job has more than one JobOutput. In such + cases, when you submit the Job, you will add two or more JobOutputs, in + the same order as TransformOutputs in the Transform. Subsequently, when + you retrieve the Job, either through events or on a GET request, you can + use the label to easily identify the JobOutput. If a label is not + provided, a default value of '{presetName}_{outputIndex}' will be used, + where the preset name is the name of the preset in the corresponding + TransformOutput and the output index is the relative index of the this + JobOutput within the Job. Note that this index is the same as the relative + index of the corresponding TransformOutput within its Transform. + :type label: str :param odatatype: Required. Constant filled by server. :type odatatype: str :param asset_name: Required. The name of the output Asset. @@ -50,6 +63,7 @@ class JobOutputAsset(JobOutput): 'error': {'key': 'error', 'type': 'JobError'}, 'state': {'key': 'state', 'type': 'JobState'}, 'progress': {'key': 'progress', 'type': 'int'}, + 'label': {'key': 'label', 'type': 'str'}, 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, 'asset_name': {'key': 'assetName', 'type': 'str'}, } diff --git a/azure-mgmt-media/azure/mgmt/media/models/job_output_asset_py3.py b/azure-mgmt-media/azure/mgmt/media/models/job_output_asset_py3.py index 562b6353687e..6affa709dc2a 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/job_output_asset_py3.py +++ b/azure-mgmt-media/azure/mgmt/media/models/job_output_asset_py3.py @@ -28,10 +28,23 @@ class JobOutputAsset(JobOutput): 'Queued', 'Scheduled' :vartype state: str or ~azure.mgmt.media.models.JobState :ivar progress: If the JobOutput is in a Processing state, this contains - the job completion percentage. The value is an estimate and not intended - to be used to predict job completion times. To determine if the JobOutput + the Job completion percentage. The value is an estimate and not intended + to be used to predict Job completion times. To determine if the JobOutput is complete, use the State property. :vartype progress: int + :param label: A label that is assigned to a JobOutput in order to help + uniquely identify it. This is useful when your Transform has more than one + TransformOutput, whereby your Job has more than one JobOutput. In such + cases, when you submit the Job, you will add two or more JobOutputs, in + the same order as TransformOutputs in the Transform. Subsequently, when + you retrieve the Job, either through events or on a GET request, you can + use the label to easily identify the JobOutput. If a label is not + provided, a default value of '{presetName}_{outputIndex}' will be used, + where the preset name is the name of the preset in the corresponding + TransformOutput and the output index is the relative index of the this + JobOutput within the Job. Note that this index is the same as the relative + index of the corresponding TransformOutput within its Transform. + :type label: str :param odatatype: Required. Constant filled by server. :type odatatype: str :param asset_name: Required. The name of the output Asset. @@ -50,11 +63,12 @@ class JobOutputAsset(JobOutput): 'error': {'key': 'error', 'type': 'JobError'}, 'state': {'key': 'state', 'type': 'JobState'}, 'progress': {'key': 'progress', 'type': 'int'}, + 'label': {'key': 'label', 'type': 'str'}, 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, 'asset_name': {'key': 'assetName', 'type': 'str'}, } - def __init__(self, *, asset_name: str, **kwargs) -> None: - super(JobOutputAsset, self).__init__(**kwargs) + def __init__(self, *, asset_name: str, label: str=None, **kwargs) -> None: + super(JobOutputAsset, self).__init__(label=label, **kwargs) self.asset_name = asset_name self.odatatype = '#Microsoft.Media.JobOutputAsset' diff --git a/azure-mgmt-media/azure/mgmt/media/models/job_output_py3.py b/azure-mgmt-media/azure/mgmt/media/models/job_output_py3.py index ab4f3ef23549..9bb7548f1772 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/job_output_py3.py +++ b/azure-mgmt-media/azure/mgmt/media/models/job_output_py3.py @@ -31,10 +31,23 @@ class JobOutput(Model): 'Queued', 'Scheduled' :vartype state: str or ~azure.mgmt.media.models.JobState :ivar progress: If the JobOutput is in a Processing state, this contains - the job completion percentage. The value is an estimate and not intended - to be used to predict job completion times. To determine if the JobOutput + the Job completion percentage. The value is an estimate and not intended + to be used to predict Job completion times. To determine if the JobOutput is complete, use the State property. :vartype progress: int + :param label: A label that is assigned to a JobOutput in order to help + uniquely identify it. This is useful when your Transform has more than one + TransformOutput, whereby your Job has more than one JobOutput. In such + cases, when you submit the Job, you will add two or more JobOutputs, in + the same order as TransformOutputs in the Transform. Subsequently, when + you retrieve the Job, either through events or on a GET request, you can + use the label to easily identify the JobOutput. If a label is not + provided, a default value of '{presetName}_{outputIndex}' will be used, + where the preset name is the name of the preset in the corresponding + TransformOutput and the output index is the relative index of the this + JobOutput within the Job. Note that this index is the same as the relative + index of the corresponding TransformOutput within its Transform. + :type label: str :param odatatype: Required. Constant filled by server. :type odatatype: str """ @@ -50,6 +63,7 @@ class JobOutput(Model): 'error': {'key': 'error', 'type': 'JobError'}, 'state': {'key': 'state', 'type': 'JobState'}, 'progress': {'key': 'progress', 'type': 'int'}, + 'label': {'key': 'label', 'type': 'str'}, 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, } @@ -57,9 +71,10 @@ class JobOutput(Model): 'odatatype': {'#Microsoft.Media.JobOutputAsset': 'JobOutputAsset'} } - def __init__(self, **kwargs) -> None: + def __init__(self, *, label: str=None, **kwargs) -> None: super(JobOutput, self).__init__(**kwargs) self.error = None self.state = None self.progress = None + self.label = label self.odatatype = None diff --git a/azure-mgmt-media/azure/mgmt/media/models/job_py3.py b/azure-mgmt-media/azure/mgmt/media/models/job_py3.py index 34f35a4eb8aa..2b3ee6745134 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/job_py3.py +++ b/azure-mgmt-media/azure/mgmt/media/models/job_py3.py @@ -48,7 +48,7 @@ class Job(ProxyResource): default is normal. Possible values include: 'Low', 'Normal', 'High' :type priority: str or ~azure.mgmt.media.models.Priority :param correlation_data: Customer provided correlation data that will be - returned in Job completed events. + returned in Job and JobOutput state events. :type correlation_data: dict[str, str] """ diff --git a/azure-mgmt-media/azure/mgmt/media/models/list_container_sas_input.py b/azure-mgmt-media/azure/mgmt/media/models/list_container_sas_input.py index 7958825c6ebb..737995c2b770 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/list_container_sas_input.py +++ b/azure-mgmt-media/azure/mgmt/media/models/list_container_sas_input.py @@ -13,7 +13,7 @@ class ListContainerSasInput(Model): - """The parameters to the list SAS requet. + """The parameters to the list SAS request. :param permissions: The permissions to set on the SAS URL. Possible values include: 'Read', 'ReadWrite', 'ReadWriteDelete' diff --git a/azure-mgmt-media/azure/mgmt/media/models/list_container_sas_input_py3.py b/azure-mgmt-media/azure/mgmt/media/models/list_container_sas_input_py3.py index 8dde54180d9c..54183398e7de 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/list_container_sas_input_py3.py +++ b/azure-mgmt-media/azure/mgmt/media/models/list_container_sas_input_py3.py @@ -13,7 +13,7 @@ class ListContainerSasInput(Model): - """The parameters to the list SAS requet. + """The parameters to the list SAS request. :param permissions: The permissions to set on the SAS URL. Possible values include: 'Read', 'ReadWrite', 'ReadWriteDelete' diff --git a/azure-mgmt-media/azure/mgmt/media/models/list_streaming_locators_response.py b/azure-mgmt-media/azure/mgmt/media/models/list_streaming_locators_response.py new file mode 100644 index 000000000000..f165f46b19d1 --- /dev/null +++ b/azure-mgmt-media/azure/mgmt/media/models/list_streaming_locators_response.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ListStreamingLocatorsResponse(Model): + """The Streaming Locators associated with this Asset. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar streaming_locators: The list of Streaming Locators. + :vartype streaming_locators: + list[~azure.mgmt.media.models.AssetStreamingLocator] + """ + + _validation = { + 'streaming_locators': {'readonly': True}, + } + + _attribute_map = { + 'streaming_locators': {'key': 'streamingLocators', 'type': '[AssetStreamingLocator]'}, + } + + def __init__(self, **kwargs): + super(ListStreamingLocatorsResponse, self).__init__(**kwargs) + self.streaming_locators = None diff --git a/azure-mgmt-media/azure/mgmt/media/models/list_streaming_locators_response_py3.py b/azure-mgmt-media/azure/mgmt/media/models/list_streaming_locators_response_py3.py new file mode 100644 index 000000000000..a9f307de2cc5 --- /dev/null +++ b/azure-mgmt-media/azure/mgmt/media/models/list_streaming_locators_response_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ListStreamingLocatorsResponse(Model): + """The Streaming Locators associated with this Asset. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar streaming_locators: The list of Streaming Locators. + :vartype streaming_locators: + list[~azure.mgmt.media.models.AssetStreamingLocator] + """ + + _validation = { + 'streaming_locators': {'readonly': True}, + } + + _attribute_map = { + 'streaming_locators': {'key': 'streamingLocators', 'type': '[AssetStreamingLocator]'}, + } + + def __init__(self, **kwargs) -> None: + super(ListStreamingLocatorsResponse, self).__init__(**kwargs) + self.streaming_locators = None diff --git a/azure-mgmt-media/azure/mgmt/media/models/live_event.py b/azure-mgmt-media/azure/mgmt/media/models/live_event.py index d4550e9bf1f9..ee3e149c9db5 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/live_event.py +++ b/azure-mgmt-media/azure/mgmt/media/models/live_event.py @@ -47,9 +47,11 @@ class LiveEvent(TrackedResource): :param cross_site_access_policies: The Live Event access policies. :type cross_site_access_policies: ~azure.mgmt.media.models.CrossSiteAccessPolicies - :param vanity_url: The Live Event vanity URL flag. + :param vanity_url: Specifies whether to use a vanity url with the Live + Event. This value is specified at creation time and cannot be updated. :type vanity_url: bool - :param stream_options: The stream options. + :param stream_options: The options to use for the LiveEvent. This value + is specified at creation time and cannot be updated. :type stream_options: list[str or ~azure.mgmt.media.models.StreamOptionsFlag] :ivar created: The exact time the Live Event was created. diff --git a/azure-mgmt-media/azure/mgmt/media/models/live_event_encoding.py b/azure-mgmt-media/azure/mgmt/media/models/live_event_encoding.py index 88ce519ee2f2..4e2a35b36756 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/live_event_encoding.py +++ b/azure-mgmt-media/azure/mgmt/media/models/live_event_encoding.py @@ -15,10 +15,12 @@ class LiveEventEncoding(Model): """The Live Event encoding. - :param encoding_type: The encoding type for Live Event. Possible values - include: 'None', 'Basic' + :param encoding_type: The encoding type for Live Event. This value is + specified at creation time and cannot be updated. Possible values include: + 'None', 'Basic' :type encoding_type: str or ~azure.mgmt.media.models.LiveEventEncodingType - :param preset_name: The encoding preset name. + :param preset_name: The encoding preset name. This value is specified at + creation time and cannot be updated. :type preset_name: str """ diff --git a/azure-mgmt-media/azure/mgmt/media/models/live_event_encoding_py3.py b/azure-mgmt-media/azure/mgmt/media/models/live_event_encoding_py3.py index c964f9949875..cad68859f1db 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/live_event_encoding_py3.py +++ b/azure-mgmt-media/azure/mgmt/media/models/live_event_encoding_py3.py @@ -15,10 +15,12 @@ class LiveEventEncoding(Model): """The Live Event encoding. - :param encoding_type: The encoding type for Live Event. Possible values - include: 'None', 'Basic' + :param encoding_type: The encoding type for Live Event. This value is + specified at creation time and cannot be updated. Possible values include: + 'None', 'Basic' :type encoding_type: str or ~azure.mgmt.media.models.LiveEventEncodingType - :param preset_name: The encoding preset name. + :param preset_name: The encoding preset name. This value is specified at + creation time and cannot be updated. :type preset_name: str """ diff --git a/azure-mgmt-media/azure/mgmt/media/models/live_event_input.py b/azure-mgmt-media/azure/mgmt/media/models/live_event_input.py index 07018e2075f3..5182171471fa 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/live_event_input.py +++ b/azure-mgmt-media/azure/mgmt/media/models/live_event_input.py @@ -18,13 +18,18 @@ class LiveEventInput(Model): All required parameters must be populated in order to send to Azure. :param streaming_protocol: Required. The streaming protocol for the Live - Event. Possible values include: 'FragmentedMP4', 'RTMP' + Event. This is specified at creation time and cannot be updated. Possible + values include: 'FragmentedMP4', 'RTMP' :type streaming_protocol: str or ~azure.mgmt.media.models.LiveEventInputProtocol + :param access_control: The access control for LiveEvent Input. + :type access_control: ~azure.mgmt.media.models.LiveEventInputAccessControl :param key_frame_interval_duration: ISO 8601 timespan duration of the key frame interval duration. :type key_frame_interval_duration: str - :param access_token: The access token. + :param access_token: A unique identifier for a stream. This can be + specified at creation time but cannot be updated. If omitted, the service + will generate a unique value. :type access_token: str :param endpoints: The input endpoints for the Live Event. :type endpoints: list[~azure.mgmt.media.models.LiveEventEndpoint] @@ -36,6 +41,7 @@ class LiveEventInput(Model): _attribute_map = { 'streaming_protocol': {'key': 'streamingProtocol', 'type': 'LiveEventInputProtocol'}, + 'access_control': {'key': 'accessControl', 'type': 'LiveEventInputAccessControl'}, 'key_frame_interval_duration': {'key': 'keyFrameIntervalDuration', 'type': 'str'}, 'access_token': {'key': 'accessToken', 'type': 'str'}, 'endpoints': {'key': 'endpoints', 'type': '[LiveEventEndpoint]'}, @@ -44,6 +50,7 @@ class LiveEventInput(Model): def __init__(self, **kwargs): super(LiveEventInput, self).__init__(**kwargs) self.streaming_protocol = kwargs.get('streaming_protocol', None) + self.access_control = kwargs.get('access_control', None) self.key_frame_interval_duration = kwargs.get('key_frame_interval_duration', None) self.access_token = kwargs.get('access_token', None) self.endpoints = kwargs.get('endpoints', None) diff --git a/azure-mgmt-media/azure/mgmt/media/models/asset_storage_encryption_key.py b/azure-mgmt-media/azure/mgmt/media/models/live_event_input_access_control.py similarity index 58% rename from azure-mgmt-media/azure/mgmt/media/models/asset_storage_encryption_key.py rename to azure-mgmt-media/azure/mgmt/media/models/live_event_input_access_control.py index 33599d1256b4..00f0b5b5af32 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/asset_storage_encryption_key.py +++ b/azure-mgmt-media/azure/mgmt/media/models/live_event_input_access_control.py @@ -12,17 +12,17 @@ from msrest.serialization import Model -class AssetStorageEncryptionKey(Model): - """The Asset Storage encryption key. +class LiveEventInputAccessControl(Model): + """The IP access control for Live Event Input. - :param storage_encryption_key: The Asset storage encryption key. - :type storage_encryption_key: str + :param ip: The IP access control properties. + :type ip: ~azure.mgmt.media.models.IPAccessControl """ _attribute_map = { - 'storage_encryption_key': {'key': 'storageEncryptionKey', 'type': 'str'}, + 'ip': {'key': 'ip', 'type': 'IPAccessControl'}, } def __init__(self, **kwargs): - super(AssetStorageEncryptionKey, self).__init__(**kwargs) - self.storage_encryption_key = kwargs.get('storage_encryption_key', None) + super(LiveEventInputAccessControl, self).__init__(**kwargs) + self.ip = kwargs.get('ip', None) diff --git a/azure-mgmt-media/azure/mgmt/media/models/live_event_input_access_control_py3.py b/azure-mgmt-media/azure/mgmt/media/models/live_event_input_access_control_py3.py new file mode 100644 index 000000000000..976f68002798 --- /dev/null +++ b/azure-mgmt-media/azure/mgmt/media/models/live_event_input_access_control_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LiveEventInputAccessControl(Model): + """The IP access control for Live Event Input. + + :param ip: The IP access control properties. + :type ip: ~azure.mgmt.media.models.IPAccessControl + """ + + _attribute_map = { + 'ip': {'key': 'ip', 'type': 'IPAccessControl'}, + } + + def __init__(self, *, ip=None, **kwargs) -> None: + super(LiveEventInputAccessControl, self).__init__(**kwargs) + self.ip = ip diff --git a/azure-mgmt-media/azure/mgmt/media/models/live_event_input_py3.py b/azure-mgmt-media/azure/mgmt/media/models/live_event_input_py3.py index 46a4b68928a3..278eec4b9e0c 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/live_event_input_py3.py +++ b/azure-mgmt-media/azure/mgmt/media/models/live_event_input_py3.py @@ -18,13 +18,18 @@ class LiveEventInput(Model): All required parameters must be populated in order to send to Azure. :param streaming_protocol: Required. The streaming protocol for the Live - Event. Possible values include: 'FragmentedMP4', 'RTMP' + Event. This is specified at creation time and cannot be updated. Possible + values include: 'FragmentedMP4', 'RTMP' :type streaming_protocol: str or ~azure.mgmt.media.models.LiveEventInputProtocol + :param access_control: The access control for LiveEvent Input. + :type access_control: ~azure.mgmt.media.models.LiveEventInputAccessControl :param key_frame_interval_duration: ISO 8601 timespan duration of the key frame interval duration. :type key_frame_interval_duration: str - :param access_token: The access token. + :param access_token: A unique identifier for a stream. This can be + specified at creation time but cannot be updated. If omitted, the service + will generate a unique value. :type access_token: str :param endpoints: The input endpoints for the Live Event. :type endpoints: list[~azure.mgmt.media.models.LiveEventEndpoint] @@ -36,14 +41,16 @@ class LiveEventInput(Model): _attribute_map = { 'streaming_protocol': {'key': 'streamingProtocol', 'type': 'LiveEventInputProtocol'}, + 'access_control': {'key': 'accessControl', 'type': 'LiveEventInputAccessControl'}, 'key_frame_interval_duration': {'key': 'keyFrameIntervalDuration', 'type': 'str'}, 'access_token': {'key': 'accessToken', 'type': 'str'}, 'endpoints': {'key': 'endpoints', 'type': '[LiveEventEndpoint]'}, } - def __init__(self, *, streaming_protocol, key_frame_interval_duration: str=None, access_token: str=None, endpoints=None, **kwargs) -> None: + def __init__(self, *, streaming_protocol, access_control=None, key_frame_interval_duration: str=None, access_token: str=None, endpoints=None, **kwargs) -> None: super(LiveEventInput, self).__init__(**kwargs) self.streaming_protocol = streaming_protocol + self.access_control = access_control self.key_frame_interval_duration = key_frame_interval_duration self.access_token = access_token self.endpoints = endpoints diff --git a/azure-mgmt-media/azure/mgmt/media/models/live_event_preview.py b/azure-mgmt-media/azure/mgmt/media/models/live_event_preview.py index 4e7aca455f41..0c69f5653ef7 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/live_event_preview.py +++ b/azure-mgmt-media/azure/mgmt/media/models/live_event_preview.py @@ -20,16 +20,22 @@ class LiveEventPreview(Model): :param access_control: The access control for LiveEvent preview. :type access_control: ~azure.mgmt.media.models.LiveEventPreviewAccessControl - :param preview_locator: The preview locator Guid. + :param preview_locator: The identifier of the preview locator in Guid + format. Specifying this at creation time allows the caller to know the + preview locator url before the event is created. If omitted, the service + will generate a random identifier. This value cannot be updated once the + live event is created. :type preview_locator: str - :param streaming_policy_name: The name of streaming policy used for - LiveEvent preview + :param streaming_policy_name: The name of streaming policy used for the + LiveEvent preview. This value is specified at creation time and cannot be + updated. :type streaming_policy_name: str :param alternative_media_id: An Alternative Media Identifier associated - with the preview url. This identifier can be used to distinguish the - preview of different live events for authorization purposes in the - CustomLicenseAcquisitionUrlTemplate or the CustomKeyAcquisitionUrlTemplate - of the StreamingPolicy specified in the StreamingPolicyName field. + with the StreamingLocator created for the preview. This value is + specified at creation time and cannot be updated. The identifier can be + used in the CustomLicenseAcquisitionUrlTemplate or the + CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the + StreamingPolicyName field. :type alternative_media_id: str """ diff --git a/azure-mgmt-media/azure/mgmt/media/models/live_event_preview_py3.py b/azure-mgmt-media/azure/mgmt/media/models/live_event_preview_py3.py index c071c9854d95..8240b773b9d3 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/live_event_preview_py3.py +++ b/azure-mgmt-media/azure/mgmt/media/models/live_event_preview_py3.py @@ -20,16 +20,22 @@ class LiveEventPreview(Model): :param access_control: The access control for LiveEvent preview. :type access_control: ~azure.mgmt.media.models.LiveEventPreviewAccessControl - :param preview_locator: The preview locator Guid. + :param preview_locator: The identifier of the preview locator in Guid + format. Specifying this at creation time allows the caller to know the + preview locator url before the event is created. If omitted, the service + will generate a random identifier. This value cannot be updated once the + live event is created. :type preview_locator: str - :param streaming_policy_name: The name of streaming policy used for - LiveEvent preview + :param streaming_policy_name: The name of streaming policy used for the + LiveEvent preview. This value is specified at creation time and cannot be + updated. :type streaming_policy_name: str :param alternative_media_id: An Alternative Media Identifier associated - with the preview url. This identifier can be used to distinguish the - preview of different live events for authorization purposes in the - CustomLicenseAcquisitionUrlTemplate or the CustomKeyAcquisitionUrlTemplate - of the StreamingPolicy specified in the StreamingPolicyName field. + with the StreamingLocator created for the preview. This value is + specified at creation time and cannot be updated. The identifier can be + used in the CustomLicenseAcquisitionUrlTemplate or the + CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the + StreamingPolicyName field. :type alternative_media_id: str """ diff --git a/azure-mgmt-media/azure/mgmt/media/models/live_event_py3.py b/azure-mgmt-media/azure/mgmt/media/models/live_event_py3.py index 62878a1aab90..75659a2a9e1c 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/live_event_py3.py +++ b/azure-mgmt-media/azure/mgmt/media/models/live_event_py3.py @@ -47,9 +47,11 @@ class LiveEvent(TrackedResource): :param cross_site_access_policies: The Live Event access policies. :type cross_site_access_policies: ~azure.mgmt.media.models.CrossSiteAccessPolicies - :param vanity_url: The Live Event vanity URL flag. + :param vanity_url: Specifies whether to use a vanity url with the Live + Event. This value is specified at creation time and cannot be updated. :type vanity_url: bool - :param stream_options: The stream options. + :param stream_options: The options to use for the LiveEvent. This value + is specified at creation time and cannot be updated. :type stream_options: list[str or ~azure.mgmt.media.models.StreamOptionsFlag] :ivar created: The exact time the Live Event was created. diff --git a/azure-mgmt-media/azure/mgmt/media/models/live_output.py b/azure-mgmt-media/azure/mgmt/media/models/live_output.py index 5b9238b53d96..aacba416697b 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/live_output.py +++ b/azure-mgmt-media/azure/mgmt/media/models/live_output.py @@ -34,7 +34,8 @@ class LiveOutput(ProxyResource): archive window length. This is duration that customer want to retain the recorded content. :type archive_window_length: timedelta - :param manifest_name: The manifest file name. + :param manifest_name: The manifest file name. If not provided, the + service will generate one automatically. :type manifest_name: str :param hls: The HLS configuration. :type hls: ~azure.mgmt.media.models.Hls diff --git a/azure-mgmt-media/azure/mgmt/media/models/live_output_py3.py b/azure-mgmt-media/azure/mgmt/media/models/live_output_py3.py index f5e5682d05a7..529f2da31efa 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/live_output_py3.py +++ b/azure-mgmt-media/azure/mgmt/media/models/live_output_py3.py @@ -34,7 +34,8 @@ class LiveOutput(ProxyResource): archive window length. This is duration that customer want to retain the recorded content. :type archive_window_length: timedelta - :param manifest_name: The manifest file name. + :param manifest_name: The manifest file name. If not provided, the + service will generate one automatically. :type manifest_name: str :param hls: The HLS configuration. :type hls: ~azure.mgmt.media.models.Hls diff --git a/azure-mgmt-media/azure/mgmt/media/models/metric.py b/azure-mgmt-media/azure/mgmt/media/models/metric.py new file mode 100644 index 000000000000..72bbed5d2179 --- /dev/null +++ b/azure-mgmt-media/azure/mgmt/media/models/metric.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Metric(Model): + """A metric emitted by service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The metric name. + :vartype name: str + :ivar display_name: The metric display name. + :vartype display_name: str + :ivar display_description: The metric display description. + :vartype display_description: str + :ivar unit: The metric unit. Possible values include: 'Bytes', 'Count', + 'Milliseconds' + :vartype unit: str or ~azure.mgmt.media.models.MetricUnit + :ivar aggregation_type: The metric aggregation type. Possible values + include: 'Average', 'Count', 'Total' + :vartype aggregation_type: str or + ~azure.mgmt.media.models.MetricAggregationType + :ivar dimensions: The metric dimensions. + :vartype dimensions: list[~azure.mgmt.media.models.MetricDimension] + """ + + _validation = { + 'name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'display_description': {'readonly': True}, + 'unit': {'readonly': True}, + 'aggregation_type': {'readonly': True}, + 'dimensions': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'MetricUnit'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'MetricAggregationType'}, + 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, + } + + def __init__(self, **kwargs): + super(Metric, self).__init__(**kwargs) + self.name = None + self.display_name = None + self.display_description = None + self.unit = None + self.aggregation_type = None + self.dimensions = None diff --git a/azure-mgmt-media/azure/mgmt/media/models/metric_dimension.py b/azure-mgmt-media/azure/mgmt/media/models/metric_dimension.py new file mode 100644 index 000000000000..cbf83600fed5 --- /dev/null +++ b/azure-mgmt-media/azure/mgmt/media/models/metric_dimension.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricDimension(Model): + """A metric dimension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The metric dimension name. + :vartype name: str + :ivar display_name: The display name for the dimension. + :vartype display_name: str + :ivar to_be_exported_for_shoebox: Whether to export metric to shoebox. + :vartype to_be_exported_for_shoebox: bool + """ + + _validation = { + 'name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'to_be_exported_for_shoebox': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(MetricDimension, self).__init__(**kwargs) + self.name = None + self.display_name = None + self.to_be_exported_for_shoebox = None diff --git a/azure-mgmt-media/azure/mgmt/media/models/metric_dimension_py3.py b/azure-mgmt-media/azure/mgmt/media/models/metric_dimension_py3.py new file mode 100644 index 000000000000..8304cbeac402 --- /dev/null +++ b/azure-mgmt-media/azure/mgmt/media/models/metric_dimension_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricDimension(Model): + """A metric dimension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The metric dimension name. + :vartype name: str + :ivar display_name: The display name for the dimension. + :vartype display_name: str + :ivar to_be_exported_for_shoebox: Whether to export metric to shoebox. + :vartype to_be_exported_for_shoebox: bool + """ + + _validation = { + 'name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'to_be_exported_for_shoebox': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + } + + def __init__(self, **kwargs) -> None: + super(MetricDimension, self).__init__(**kwargs) + self.name = None + self.display_name = None + self.to_be_exported_for_shoebox = None diff --git a/azure-mgmt-media/azure/mgmt/media/models/metric_properties.py b/azure-mgmt-media/azure/mgmt/media/models/metric_properties.py new file mode 100644 index 000000000000..6c8713c20666 --- /dev/null +++ b/azure-mgmt-media/azure/mgmt/media/models/metric_properties.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricProperties(Model): + """Metric properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar service_specification: The service specifications. + :vartype service_specification: + ~azure.mgmt.media.models.ServiceSpecification + """ + + _validation = { + 'service_specification': {'readonly': True}, + } + + _attribute_map = { + 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__(self, **kwargs): + super(MetricProperties, self).__init__(**kwargs) + self.service_specification = None diff --git a/azure-mgmt-media/azure/mgmt/media/models/metric_properties_py3.py b/azure-mgmt-media/azure/mgmt/media/models/metric_properties_py3.py new file mode 100644 index 000000000000..39e9393415d1 --- /dev/null +++ b/azure-mgmt-media/azure/mgmt/media/models/metric_properties_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricProperties(Model): + """Metric properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar service_specification: The service specifications. + :vartype service_specification: + ~azure.mgmt.media.models.ServiceSpecification + """ + + _validation = { + 'service_specification': {'readonly': True}, + } + + _attribute_map = { + 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__(self, **kwargs) -> None: + super(MetricProperties, self).__init__(**kwargs) + self.service_specification = None diff --git a/azure-mgmt-media/azure/mgmt/media/models/metric_py3.py b/azure-mgmt-media/azure/mgmt/media/models/metric_py3.py new file mode 100644 index 000000000000..64011bedf65c --- /dev/null +++ b/azure-mgmt-media/azure/mgmt/media/models/metric_py3.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Metric(Model): + """A metric emitted by service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The metric name. + :vartype name: str + :ivar display_name: The metric display name. + :vartype display_name: str + :ivar display_description: The metric display description. + :vartype display_description: str + :ivar unit: The metric unit. Possible values include: 'Bytes', 'Count', + 'Milliseconds' + :vartype unit: str or ~azure.mgmt.media.models.MetricUnit + :ivar aggregation_type: The metric aggregation type. Possible values + include: 'Average', 'Count', 'Total' + :vartype aggregation_type: str or + ~azure.mgmt.media.models.MetricAggregationType + :ivar dimensions: The metric dimensions. + :vartype dimensions: list[~azure.mgmt.media.models.MetricDimension] + """ + + _validation = { + 'name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'display_description': {'readonly': True}, + 'unit': {'readonly': True}, + 'aggregation_type': {'readonly': True}, + 'dimensions': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'MetricUnit'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'MetricAggregationType'}, + 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, + } + + def __init__(self, **kwargs) -> None: + super(Metric, self).__init__(**kwargs) + self.name = None + self.display_name = None + self.display_description = None + self.unit = None + self.aggregation_type = None + self.dimensions = None diff --git a/azure-mgmt-media/azure/mgmt/media/models/operation.py b/azure-mgmt-media/azure/mgmt/media/models/operation.py index 1ae9bfb6ec1e..c10dee416561 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/operation.py +++ b/azure-mgmt-media/azure/mgmt/media/models/operation.py @@ -21,6 +21,10 @@ class Operation(Model): :type name: str :param display: The operation display name. :type display: ~azure.mgmt.media.models.OperationDisplay + :param origin: Origin of the operation. + :type origin: str + :param properties: Operation properties format. + :type properties: ~azure.mgmt.media.models.MetricProperties """ _validation = { @@ -30,9 +34,13 @@ class Operation(Model): _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'MetricProperties'}, } def __init__(self, **kwargs): super(Operation, self).__init__(**kwargs) self.name = kwargs.get('name', None) self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-media/azure/mgmt/media/models/operation_py3.py b/azure-mgmt-media/azure/mgmt/media/models/operation_py3.py index 43e4d8ee6f2b..7d2026e582f0 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/operation_py3.py +++ b/azure-mgmt-media/azure/mgmt/media/models/operation_py3.py @@ -21,6 +21,10 @@ class Operation(Model): :type name: str :param display: The operation display name. :type display: ~azure.mgmt.media.models.OperationDisplay + :param origin: Origin of the operation. + :type origin: str + :param properties: Operation properties format. + :type properties: ~azure.mgmt.media.models.MetricProperties """ _validation = { @@ -30,9 +34,13 @@ class Operation(Model): _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'MetricProperties'}, } - def __init__(self, *, name: str, display=None, **kwargs) -> None: + def __init__(self, *, name: str, display=None, origin: str=None, properties=None, **kwargs) -> None: super(Operation, self).__init__(**kwargs) self.name = name self.display = display + self.origin = origin + self.properties = properties diff --git a/azure-mgmt-media/azure/mgmt/media/models/presentation_time_range.py b/azure-mgmt-media/azure/mgmt/media/models/presentation_time_range.py new file mode 100644 index 000000000000..79d9ce841aca --- /dev/null +++ b/azure-mgmt-media/azure/mgmt/media/models/presentation_time_range.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PresentationTimeRange(Model): + """The presentation time range, this is asset related and not recommended for + Account Filter. + + All required parameters must be populated in order to send to Azure. + + :param start_timestamp: Required. The absolute start time boundary. + :type start_timestamp: long + :param end_timestamp: Required. The absolute end time boundary. + :type end_timestamp: long + :param presentation_window_duration: Required. The relative to end sliding + window. + :type presentation_window_duration: long + :param live_backoff_duration: Required. The relative to end right edge. + :type live_backoff_duration: long + :param timescale: Required. The time scale of time stamps. + :type timescale: long + :param force_end_timestamp: Required. The indicator of forcing exsiting of + end time stamp. + :type force_end_timestamp: bool + """ + + _validation = { + 'start_timestamp': {'required': True}, + 'end_timestamp': {'required': True}, + 'presentation_window_duration': {'required': True}, + 'live_backoff_duration': {'required': True}, + 'timescale': {'required': True}, + 'force_end_timestamp': {'required': True}, + } + + _attribute_map = { + 'start_timestamp': {'key': 'startTimestamp', 'type': 'long'}, + 'end_timestamp': {'key': 'endTimestamp', 'type': 'long'}, + 'presentation_window_duration': {'key': 'presentationWindowDuration', 'type': 'long'}, + 'live_backoff_duration': {'key': 'liveBackoffDuration', 'type': 'long'}, + 'timescale': {'key': 'timescale', 'type': 'long'}, + 'force_end_timestamp': {'key': 'forceEndTimestamp', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(PresentationTimeRange, self).__init__(**kwargs) + self.start_timestamp = kwargs.get('start_timestamp', None) + self.end_timestamp = kwargs.get('end_timestamp', None) + self.presentation_window_duration = kwargs.get('presentation_window_duration', None) + self.live_backoff_duration = kwargs.get('live_backoff_duration', None) + self.timescale = kwargs.get('timescale', None) + self.force_end_timestamp = kwargs.get('force_end_timestamp', None) diff --git a/azure-mgmt-media/azure/mgmt/media/models/presentation_time_range_py3.py b/azure-mgmt-media/azure/mgmt/media/models/presentation_time_range_py3.py new file mode 100644 index 000000000000..57a4306cf30d --- /dev/null +++ b/azure-mgmt-media/azure/mgmt/media/models/presentation_time_range_py3.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PresentationTimeRange(Model): + """The presentation time range, this is asset related and not recommended for + Account Filter. + + All required parameters must be populated in order to send to Azure. + + :param start_timestamp: Required. The absolute start time boundary. + :type start_timestamp: long + :param end_timestamp: Required. The absolute end time boundary. + :type end_timestamp: long + :param presentation_window_duration: Required. The relative to end sliding + window. + :type presentation_window_duration: long + :param live_backoff_duration: Required. The relative to end right edge. + :type live_backoff_duration: long + :param timescale: Required. The time scale of time stamps. + :type timescale: long + :param force_end_timestamp: Required. The indicator of forcing exsiting of + end time stamp. + :type force_end_timestamp: bool + """ + + _validation = { + 'start_timestamp': {'required': True}, + 'end_timestamp': {'required': True}, + 'presentation_window_duration': {'required': True}, + 'live_backoff_duration': {'required': True}, + 'timescale': {'required': True}, + 'force_end_timestamp': {'required': True}, + } + + _attribute_map = { + 'start_timestamp': {'key': 'startTimestamp', 'type': 'long'}, + 'end_timestamp': {'key': 'endTimestamp', 'type': 'long'}, + 'presentation_window_duration': {'key': 'presentationWindowDuration', 'type': 'long'}, + 'live_backoff_duration': {'key': 'liveBackoffDuration', 'type': 'long'}, + 'timescale': {'key': 'timescale', 'type': 'long'}, + 'force_end_timestamp': {'key': 'forceEndTimestamp', 'type': 'bool'}, + } + + def __init__(self, *, start_timestamp: int, end_timestamp: int, presentation_window_duration: int, live_backoff_duration: int, timescale: int, force_end_timestamp: bool, **kwargs) -> None: + super(PresentationTimeRange, self).__init__(**kwargs) + self.start_timestamp = start_timestamp + self.end_timestamp = end_timestamp + self.presentation_window_duration = presentation_window_duration + self.live_backoff_duration = live_backoff_duration + self.timescale = timescale + self.force_end_timestamp = force_end_timestamp diff --git a/azure-mgmt-media/azure/mgmt/media/models/service_specification.py b/azure-mgmt-media/azure/mgmt/media/models/service_specification.py new file mode 100644 index 000000000000..c1b360d2ee40 --- /dev/null +++ b/azure-mgmt-media/azure/mgmt/media/models/service_specification.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceSpecification(Model): + """The service metric specifications. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar metric_specifications: List of metric specifications. + :vartype metric_specifications: list[~azure.mgmt.media.models.Metric] + """ + + _validation = { + 'metric_specifications': {'readonly': True}, + } + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[Metric]'}, + } + + def __init__(self, **kwargs): + super(ServiceSpecification, self).__init__(**kwargs) + self.metric_specifications = None diff --git a/azure-mgmt-media/azure/mgmt/media/models/service_specification_py3.py b/azure-mgmt-media/azure/mgmt/media/models/service_specification_py3.py new file mode 100644 index 000000000000..c46af945238e --- /dev/null +++ b/azure-mgmt-media/azure/mgmt/media/models/service_specification_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceSpecification(Model): + """The service metric specifications. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar metric_specifications: List of metric specifications. + :vartype metric_specifications: list[~azure.mgmt.media.models.Metric] + """ + + _validation = { + 'metric_specifications': {'readonly': True}, + } + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[Metric]'}, + } + + def __init__(self, **kwargs) -> None: + super(ServiceSpecification, self).__init__(**kwargs) + self.metric_specifications = None diff --git a/azure-mgmt-media/azure/mgmt/media/models/storage_encrypted_asset_decryption_data.py b/azure-mgmt-media/azure/mgmt/media/models/storage_encrypted_asset_decryption_data.py new file mode 100644 index 000000000000..b5dd5feb9bda --- /dev/null +++ b/azure-mgmt-media/azure/mgmt/media/models/storage_encrypted_asset_decryption_data.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageEncryptedAssetDecryptionData(Model): + """Data needed to decrypt asset files encrypted with legacy storage + encryption. + + :param key: The Asset File storage encryption key. + :type key: bytearray + :param asset_file_encryption_metadata: Asset File encryption metadata. + :type asset_file_encryption_metadata: + list[~azure.mgmt.media.models.AssetFileEncryptionMetadata] + """ + + _attribute_map = { + 'key': {'key': 'key', 'type': 'bytearray'}, + 'asset_file_encryption_metadata': {'key': 'assetFileEncryptionMetadata', 'type': '[AssetFileEncryptionMetadata]'}, + } + + def __init__(self, **kwargs): + super(StorageEncryptedAssetDecryptionData, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + self.asset_file_encryption_metadata = kwargs.get('asset_file_encryption_metadata', None) diff --git a/azure-mgmt-media/azure/mgmt/media/models/storage_encrypted_asset_decryption_data_py3.py b/azure-mgmt-media/azure/mgmt/media/models/storage_encrypted_asset_decryption_data_py3.py new file mode 100644 index 000000000000..2180f3000c68 --- /dev/null +++ b/azure-mgmt-media/azure/mgmt/media/models/storage_encrypted_asset_decryption_data_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageEncryptedAssetDecryptionData(Model): + """Data needed to decrypt asset files encrypted with legacy storage + encryption. + + :param key: The Asset File storage encryption key. + :type key: bytearray + :param asset_file_encryption_metadata: Asset File encryption metadata. + :type asset_file_encryption_metadata: + list[~azure.mgmt.media.models.AssetFileEncryptionMetadata] + """ + + _attribute_map = { + 'key': {'key': 'key', 'type': 'bytearray'}, + 'asset_file_encryption_metadata': {'key': 'assetFileEncryptionMetadata', 'type': '[AssetFileEncryptionMetadata]'}, + } + + def __init__(self, *, key: bytearray=None, asset_file_encryption_metadata=None, **kwargs) -> None: + super(StorageEncryptedAssetDecryptionData, self).__init__(**kwargs) + self.key = key + self.asset_file_encryption_metadata = asset_file_encryption_metadata diff --git a/azure-mgmt-media/azure/mgmt/media/models/streaming_endpoint.py b/azure-mgmt-media/azure/mgmt/media/models/streaming_endpoint.py index 54ca78ba316c..9e09f9317e07 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/streaming_endpoint.py +++ b/azure-mgmt-media/azure/mgmt/media/models/streaming_endpoint.py @@ -18,6 +18,8 @@ class StreamingEndpoint(TrackedResource): 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. + :ivar id: Fully qualified resource ID for the resource. :vartype id: str :ivar name: The name of the resource. @@ -30,9 +32,12 @@ class StreamingEndpoint(TrackedResource): :type location: str :param description: The StreamingEndpoint description. :type description: str - :param scale_units: The number of scale units. + :param scale_units: Required. The number of scale units. Use the Scale + operation to adjust this value. :type scale_units: int - :param availability_set_name: AvailabilitySet name + :param availability_set_name: The name of the AvailabilitySet used with + this StreamingEndpoint for high availability streaming. This value can + only be set at creation time. :type availability_set_name: str :param access_control: The access control definition of the StreamingEndpoint. @@ -73,6 +78,7 @@ class StreamingEndpoint(TrackedResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'scale_units': {'required': True}, 'host_name': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'resource_state': {'readonly': True}, diff --git a/azure-mgmt-media/azure/mgmt/media/models/streaming_endpoint_py3.py b/azure-mgmt-media/azure/mgmt/media/models/streaming_endpoint_py3.py index 111e28e6e79f..155128da3000 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/streaming_endpoint_py3.py +++ b/azure-mgmt-media/azure/mgmt/media/models/streaming_endpoint_py3.py @@ -18,6 +18,8 @@ class StreamingEndpoint(TrackedResource): 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. + :ivar id: Fully qualified resource ID for the resource. :vartype id: str :ivar name: The name of the resource. @@ -30,9 +32,12 @@ class StreamingEndpoint(TrackedResource): :type location: str :param description: The StreamingEndpoint description. :type description: str - :param scale_units: The number of scale units. + :param scale_units: Required. The number of scale units. Use the Scale + operation to adjust this value. :type scale_units: int - :param availability_set_name: AvailabilitySet name + :param availability_set_name: The name of the AvailabilitySet used with + this StreamingEndpoint for high availability streaming. This value can + only be set at creation time. :type availability_set_name: str :param access_control: The access control definition of the StreamingEndpoint. @@ -73,6 +78,7 @@ class StreamingEndpoint(TrackedResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'scale_units': {'required': True}, 'host_name': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'resource_state': {'readonly': True}, @@ -105,7 +111,7 @@ class StreamingEndpoint(TrackedResource): 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, } - def __init__(self, *, tags=None, location: str=None, description: str=None, scale_units: int=None, availability_set_name: str=None, access_control=None, max_cache_age: int=None, custom_host_names=None, cdn_enabled: bool=None, cdn_provider: str=None, cdn_profile: str=None, cross_site_access_policies=None, **kwargs) -> None: + def __init__(self, *, scale_units: int, tags=None, location: str=None, description: str=None, availability_set_name: str=None, access_control=None, max_cache_age: int=None, custom_host_names=None, cdn_enabled: bool=None, cdn_provider: str=None, cdn_profile: str=None, cross_site_access_policies=None, **kwargs) -> None: super(StreamingEndpoint, self).__init__(tags=tags, location=location, **kwargs) self.description = description self.scale_units = scale_units diff --git a/azure-mgmt-media/azure/mgmt/media/models/streaming_entity_scale_unit.py b/azure-mgmt-media/azure/mgmt/media/models/streaming_entity_scale_unit.py index 0c77d5894b54..4f74310062f3 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/streaming_entity_scale_unit.py +++ b/azure-mgmt-media/azure/mgmt/media/models/streaming_entity_scale_unit.py @@ -15,8 +15,7 @@ class StreamingEntityScaleUnit(Model): """scale units definition. - :param scale_unit: ScaleUnit. The scale unit number of the - StreamingEndpoint. + :param scale_unit: The scale unit number of the StreamingEndpoint. :type scale_unit: int """ diff --git a/azure-mgmt-media/azure/mgmt/media/models/streaming_entity_scale_unit_py3.py b/azure-mgmt-media/azure/mgmt/media/models/streaming_entity_scale_unit_py3.py index e38310c79f76..a419e3158946 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/streaming_entity_scale_unit_py3.py +++ b/azure-mgmt-media/azure/mgmt/media/models/streaming_entity_scale_unit_py3.py @@ -15,8 +15,7 @@ class StreamingEntityScaleUnit(Model): """scale units definition. - :param scale_unit: ScaleUnit. The scale unit number of the - StreamingEndpoint. + :param scale_unit: The scale unit number of the StreamingEndpoint. :type scale_unit: int """ diff --git a/azure-mgmt-media/azure/mgmt/media/models/streaming_locator.py b/azure-mgmt-media/azure/mgmt/media/models/streaming_locator.py index c33ebff92bc8..45e12258448b 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/streaming_locator.py +++ b/azure-mgmt-media/azure/mgmt/media/models/streaming_locator.py @@ -28,34 +28,31 @@ class StreamingLocator(ProxyResource): :vartype type: str :param asset_name: Required. Asset Name :type asset_name: str - :ivar created: Creation time of Streaming Locator + :ivar created: The creation time of the Streaming Locator. :vartype created: datetime - :param start_time: StartTime of Streaming Locator + :param start_time: The start time of the Streaming Locator. :type start_time: datetime - :param end_time: EndTime of Streaming Locator + :param end_time: The end time of the Streaming Locator. :type end_time: datetime - :param streaming_locator_id: StreamingLocatorId of Streaming Locator + :param streaming_locator_id: The StreamingLocatorId of the Streaming + Locator. :type streaming_locator_id: str - :param streaming_policy_name: Required. Streaming policy name used by this - streaming locator. Either specify the name of streaming policy you created - or use one of the predefined streaming polices. The predefined streaming - policies available are: 'Predefined_DownloadOnly', + :param streaming_policy_name: Required. Name of the Streaming Policy used + by this Streaming Locator. Either specify the name of Streaming Policy you + created or use one of the predefined Streaming Policies. The predefined + Streaming Policies available are: 'Predefined_DownloadOnly', 'Predefined_ClearStreamingOnly', 'Predefined_DownloadAndClearStreaming', - 'Predefined_ClearKey', 'Predefined_SecureStreaming' and - 'Predefined_SecureStreamingWithFairPlay' + 'Predefined_ClearKey', 'Predefined_MultiDrmCencStreaming' and + 'Predefined_MultiDrmStreaming' :type streaming_policy_name: str - :param default_content_key_policy_name: Default ContentKeyPolicy used by - this Streaming Locator + :param default_content_key_policy_name: Name of the default + ContentKeyPolicy used by this Streaming Locator. :type default_content_key_policy_name: str - :param content_keys: ContentKeys used by this Streaming Locator + :param content_keys: The ContentKeys used by this Streaming Locator. :type content_keys: list[~azure.mgmt.media.models.StreamingLocatorContentKey] - :param alternative_media_id: An Alternative Media Identifier associated - with the StreamingLocator. This identifier can be used to distinguish - different StreamingLocators for the same Asset for authorization purposes - in the CustomLicenseAcquisitionUrlTemplate or the - CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the - StreamingPolicyName field. + :param alternative_media_id: Alternative Media ID of this Streaming + Locator :type alternative_media_id: str """ diff --git a/azure-mgmt-media/azure/mgmt/media/models/streaming_locator_content_key.py b/azure-mgmt-media/azure/mgmt/media/models/streaming_locator_content_key.py index 2c03ee059d94..3b5d0ac57245 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/streaming_locator_content_key.py +++ b/azure-mgmt-media/azure/mgmt/media/models/streaming_locator_content_key.py @@ -26,26 +26,28 @@ class StreamingLocatorContentKey(Model): 'CommonEncryptionCenc', 'CommonEncryptionCbcs', 'EnvelopeEncryption' :vartype type: str or ~azure.mgmt.media.models.StreamingLocatorContentKeyType - :param label: Label of Content Key - :type label: str + :param label_reference_in_streaming_policy: Label of Content Key as + specified in the Streaming Policy + :type label_reference_in_streaming_policy: str :param value: Value of of Content Key :type value: str :ivar policy_name: ContentKeyPolicy used by Content Key :vartype policy_name: str - :param tracks: Tracks which use this Content Key - :type tracks: list[~azure.mgmt.media.models.TrackSelection] + :ivar tracks: Tracks which use this Content Key + :vartype tracks: list[~azure.mgmt.media.models.TrackSelection] """ _validation = { 'id': {'required': True}, 'type': {'readonly': True}, 'policy_name': {'readonly': True}, + 'tracks': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'StreamingLocatorContentKeyType'}, - 'label': {'key': 'label', 'type': 'str'}, + 'label_reference_in_streaming_policy': {'key': 'labelReferenceInStreamingPolicy', 'type': 'str'}, 'value': {'key': 'value', 'type': 'str'}, 'policy_name': {'key': 'policyName', 'type': 'str'}, 'tracks': {'key': 'tracks', 'type': '[TrackSelection]'}, @@ -55,7 +57,7 @@ def __init__(self, **kwargs): super(StreamingLocatorContentKey, self).__init__(**kwargs) self.id = kwargs.get('id', None) self.type = None - self.label = kwargs.get('label', None) + self.label_reference_in_streaming_policy = kwargs.get('label_reference_in_streaming_policy', None) self.value = kwargs.get('value', None) self.policy_name = None - self.tracks = kwargs.get('tracks', None) + self.tracks = None diff --git a/azure-mgmt-media/azure/mgmt/media/models/streaming_locator_content_key_py3.py b/azure-mgmt-media/azure/mgmt/media/models/streaming_locator_content_key_py3.py index a905b73f3c8e..0f39bb963e77 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/streaming_locator_content_key_py3.py +++ b/azure-mgmt-media/azure/mgmt/media/models/streaming_locator_content_key_py3.py @@ -26,36 +26,38 @@ class StreamingLocatorContentKey(Model): 'CommonEncryptionCenc', 'CommonEncryptionCbcs', 'EnvelopeEncryption' :vartype type: str or ~azure.mgmt.media.models.StreamingLocatorContentKeyType - :param label: Label of Content Key - :type label: str + :param label_reference_in_streaming_policy: Label of Content Key as + specified in the Streaming Policy + :type label_reference_in_streaming_policy: str :param value: Value of of Content Key :type value: str :ivar policy_name: ContentKeyPolicy used by Content Key :vartype policy_name: str - :param tracks: Tracks which use this Content Key - :type tracks: list[~azure.mgmt.media.models.TrackSelection] + :ivar tracks: Tracks which use this Content Key + :vartype tracks: list[~azure.mgmt.media.models.TrackSelection] """ _validation = { 'id': {'required': True}, 'type': {'readonly': True}, 'policy_name': {'readonly': True}, + 'tracks': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'StreamingLocatorContentKeyType'}, - 'label': {'key': 'label', 'type': 'str'}, + 'label_reference_in_streaming_policy': {'key': 'labelReferenceInStreamingPolicy', 'type': 'str'}, 'value': {'key': 'value', 'type': 'str'}, 'policy_name': {'key': 'policyName', 'type': 'str'}, 'tracks': {'key': 'tracks', 'type': '[TrackSelection]'}, } - def __init__(self, *, id: str, label: str=None, value: str=None, tracks=None, **kwargs) -> None: + def __init__(self, *, id: str, label_reference_in_streaming_policy: str=None, value: str=None, **kwargs) -> None: super(StreamingLocatorContentKey, self).__init__(**kwargs) self.id = id self.type = None - self.label = label + self.label_reference_in_streaming_policy = label_reference_in_streaming_policy self.value = value self.policy_name = None - self.tracks = tracks + self.tracks = None diff --git a/azure-mgmt-media/azure/mgmt/media/models/streaming_locator_py3.py b/azure-mgmt-media/azure/mgmt/media/models/streaming_locator_py3.py index 9d260824f2fd..fb6670dabaf5 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/streaming_locator_py3.py +++ b/azure-mgmt-media/azure/mgmt/media/models/streaming_locator_py3.py @@ -28,34 +28,31 @@ class StreamingLocator(ProxyResource): :vartype type: str :param asset_name: Required. Asset Name :type asset_name: str - :ivar created: Creation time of Streaming Locator + :ivar created: The creation time of the Streaming Locator. :vartype created: datetime - :param start_time: StartTime of Streaming Locator + :param start_time: The start time of the Streaming Locator. :type start_time: datetime - :param end_time: EndTime of Streaming Locator + :param end_time: The end time of the Streaming Locator. :type end_time: datetime - :param streaming_locator_id: StreamingLocatorId of Streaming Locator + :param streaming_locator_id: The StreamingLocatorId of the Streaming + Locator. :type streaming_locator_id: str - :param streaming_policy_name: Required. Streaming policy name used by this - streaming locator. Either specify the name of streaming policy you created - or use one of the predefined streaming polices. The predefined streaming - policies available are: 'Predefined_DownloadOnly', + :param streaming_policy_name: Required. Name of the Streaming Policy used + by this Streaming Locator. Either specify the name of Streaming Policy you + created or use one of the predefined Streaming Policies. The predefined + Streaming Policies available are: 'Predefined_DownloadOnly', 'Predefined_ClearStreamingOnly', 'Predefined_DownloadAndClearStreaming', - 'Predefined_ClearKey', 'Predefined_SecureStreaming' and - 'Predefined_SecureStreamingWithFairPlay' + 'Predefined_ClearKey', 'Predefined_MultiDrmCencStreaming' and + 'Predefined_MultiDrmStreaming' :type streaming_policy_name: str - :param default_content_key_policy_name: Default ContentKeyPolicy used by - this Streaming Locator + :param default_content_key_policy_name: Name of the default + ContentKeyPolicy used by this Streaming Locator. :type default_content_key_policy_name: str - :param content_keys: ContentKeys used by this Streaming Locator + :param content_keys: The ContentKeys used by this Streaming Locator. :type content_keys: list[~azure.mgmt.media.models.StreamingLocatorContentKey] - :param alternative_media_id: An Alternative Media Identifier associated - with the StreamingLocator. This identifier can be used to distinguish - different StreamingLocators for the same Asset for authorization purposes - in the CustomLicenseAcquisitionUrlTemplate or the - CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the - StreamingPolicyName field. + :param alternative_media_id: Alternative Media ID of this Streaming + Locator :type alternative_media_id: str """ diff --git a/azure-mgmt-media/azure/mgmt/media/models/transform_output.py b/azure-mgmt-media/azure/mgmt/media/models/transform_output.py index 785ff6972137..c55989028d02 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/transform_output.py +++ b/azure-mgmt-media/azure/mgmt/media/models/transform_output.py @@ -20,8 +20,10 @@ class TransformOutput(Model): :param on_error: A Transform can define more than one outputs. This property defines what the service should do when one output fails - either - continue to produce other outputs, or, stop the other outputs. The default - is stop. Possible values include: 'StopProcessingJob', 'ContinueJob' + continue to produce other outputs, or, stop the other outputs. The overall + Job state will not reflect failures of outputs that are specified with + 'ContinueJob'. The default is 'StopProcessingJob'. Possible values + include: 'StopProcessingJob', 'ContinueJob' :type on_error: str or ~azure.mgmt.media.models.OnErrorType :param relative_priority: Sets the relative priority of the TransformOutputs within a Transform. This sets the priority that the diff --git a/azure-mgmt-media/azure/mgmt/media/models/transform_output_py3.py b/azure-mgmt-media/azure/mgmt/media/models/transform_output_py3.py index 4413f1b3f8d5..b941aee9f4c4 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/transform_output_py3.py +++ b/azure-mgmt-media/azure/mgmt/media/models/transform_output_py3.py @@ -20,8 +20,10 @@ class TransformOutput(Model): :param on_error: A Transform can define more than one outputs. This property defines what the service should do when one output fails - either - continue to produce other outputs, or, stop the other outputs. The default - is stop. Possible values include: 'StopProcessingJob', 'ContinueJob' + continue to produce other outputs, or, stop the other outputs. The overall + Job state will not reflect failures of outputs that are specified with + 'ContinueJob'. The default is 'StopProcessingJob'. Possible values + include: 'StopProcessingJob', 'ContinueJob' :type on_error: str or ~azure.mgmt.media.models.OnErrorType :param relative_priority: Sets the relative priority of the TransformOutputs within a Transform. This sets the priority that the diff --git a/azure-mgmt-media/azure/mgmt/media/models/video_analyzer_preset.py b/azure-mgmt-media/azure/mgmt/media/models/video_analyzer_preset.py index b940656eedc3..2da00b718057 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/video_analyzer_preset.py +++ b/azure-mgmt-media/azure/mgmt/media/models/video_analyzer_preset.py @@ -23,11 +23,20 @@ class VideoAnalyzerPreset(AudioAnalyzerPreset): :param audio_language: The language for the audio payload in the input using the BCP-47 format of 'language tag-region' (e.g: 'en-US'). The list of supported languages are, 'en-US', 'en-GB', 'es-ES', 'es-MX', 'fr-FR', - 'it-IT', 'ja-JP', 'pt-BR', 'zh-CN'. + 'it-IT', 'ja-JP', 'pt-BR', 'zh-CN', 'de-DE', 'ar-EG', 'ru-RU', 'hi-IN'. If + not specified, automatic language detection would be employed. This + feature currently supports English, Chinese, French, German, Italian, + Japanese, Spanish, Russian, and Portuguese. The automatic detection works + best with audio recordings with clearly discernable speech. If automatic + detection fails to find the language, transcription would fallback to + English. :type audio_language: str - :param audio_insights_only: Whether to only extract audio insights when - processing a video file. - :type audio_insights_only: bool + :param insights_to_extract: The type of insights to be extracted. If not + set then based on the content the type will selected. If the content is + audi only then only audio insights are extraced and if it is video only. + Possible values include: 'AudioInsightsOnly', 'VideoInsightsOnly', + 'AllInsights' + :type insights_to_extract: str or ~azure.mgmt.media.models.InsightsType """ _validation = { @@ -37,10 +46,10 @@ class VideoAnalyzerPreset(AudioAnalyzerPreset): _attribute_map = { 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, 'audio_language': {'key': 'audioLanguage', 'type': 'str'}, - 'audio_insights_only': {'key': 'audioInsightsOnly', 'type': 'bool'}, + 'insights_to_extract': {'key': 'insightsToExtract', 'type': 'InsightsType'}, } def __init__(self, **kwargs): super(VideoAnalyzerPreset, self).__init__(**kwargs) - self.audio_insights_only = kwargs.get('audio_insights_only', None) + self.insights_to_extract = kwargs.get('insights_to_extract', None) self.odatatype = '#Microsoft.Media.VideoAnalyzerPreset' diff --git a/azure-mgmt-media/azure/mgmt/media/models/video_analyzer_preset_py3.py b/azure-mgmt-media/azure/mgmt/media/models/video_analyzer_preset_py3.py index 39ae967e81a4..d0c2ede45f48 100644 --- a/azure-mgmt-media/azure/mgmt/media/models/video_analyzer_preset_py3.py +++ b/azure-mgmt-media/azure/mgmt/media/models/video_analyzer_preset_py3.py @@ -23,11 +23,20 @@ class VideoAnalyzerPreset(AudioAnalyzerPreset): :param audio_language: The language for the audio payload in the input using the BCP-47 format of 'language tag-region' (e.g: 'en-US'). The list of supported languages are, 'en-US', 'en-GB', 'es-ES', 'es-MX', 'fr-FR', - 'it-IT', 'ja-JP', 'pt-BR', 'zh-CN'. + 'it-IT', 'ja-JP', 'pt-BR', 'zh-CN', 'de-DE', 'ar-EG', 'ru-RU', 'hi-IN'. If + not specified, automatic language detection would be employed. This + feature currently supports English, Chinese, French, German, Italian, + Japanese, Spanish, Russian, and Portuguese. The automatic detection works + best with audio recordings with clearly discernable speech. If automatic + detection fails to find the language, transcription would fallback to + English. :type audio_language: str - :param audio_insights_only: Whether to only extract audio insights when - processing a video file. - :type audio_insights_only: bool + :param insights_to_extract: The type of insights to be extracted. If not + set then based on the content the type will selected. If the content is + audi only then only audio insights are extraced and if it is video only. + Possible values include: 'AudioInsightsOnly', 'VideoInsightsOnly', + 'AllInsights' + :type insights_to_extract: str or ~azure.mgmt.media.models.InsightsType """ _validation = { @@ -37,10 +46,10 @@ class VideoAnalyzerPreset(AudioAnalyzerPreset): _attribute_map = { 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, 'audio_language': {'key': 'audioLanguage', 'type': 'str'}, - 'audio_insights_only': {'key': 'audioInsightsOnly', 'type': 'bool'}, + 'insights_to_extract': {'key': 'insightsToExtract', 'type': 'InsightsType'}, } - def __init__(self, *, audio_language: str=None, audio_insights_only: bool=None, **kwargs) -> None: + def __init__(self, *, audio_language: str=None, insights_to_extract=None, **kwargs) -> None: super(VideoAnalyzerPreset, self).__init__(audio_language=audio_language, **kwargs) - self.audio_insights_only = audio_insights_only + self.insights_to_extract = insights_to_extract self.odatatype = '#Microsoft.Media.VideoAnalyzerPreset' diff --git a/azure-mgmt-media/azure/mgmt/media/operations/__init__.py b/azure-mgmt-media/azure/mgmt/media/operations/__init__.py index 2b71a38b9fd2..42693e437634 100644 --- a/azure-mgmt-media/azure/mgmt/media/operations/__init__.py +++ b/azure-mgmt-media/azure/mgmt/media/operations/__init__.py @@ -9,10 +9,12 @@ # regenerated. # -------------------------------------------------------------------------- +from .account_filters_operations import AccountFiltersOperations from .operations import Operations from .mediaservices_operations import MediaservicesOperations from .locations_operations import LocationsOperations from .assets_operations import AssetsOperations +from .asset_filters_operations import AssetFiltersOperations from .content_key_policies_operations import ContentKeyPoliciesOperations from .transforms_operations import TransformsOperations from .jobs_operations import JobsOperations @@ -23,10 +25,12 @@ from .streaming_endpoints_operations import StreamingEndpointsOperations __all__ = [ + 'AccountFiltersOperations', 'Operations', 'MediaservicesOperations', 'LocationsOperations', 'AssetsOperations', + 'AssetFiltersOperations', 'ContentKeyPoliciesOperations', 'TransformsOperations', 'JobsOperations', diff --git a/azure-mgmt-media/azure/mgmt/media/operations/account_filters_operations.py b/azure-mgmt-media/azure/mgmt/media/operations/account_filters_operations.py new file mode 100644 index 000000000000..891e32e3dc9c --- /dev/null +++ b/azure-mgmt-media/azure/mgmt/media/operations/account_filters_operations.py @@ -0,0 +1,382 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class AccountFiltersOperations(object): + """AccountFiltersOperations operations. + + :param client: Client for service requests. + :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: "2018-07-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-07-01" + + self.config = config + + def list( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """List Account Filters. + + List Account Filters in the Media Services account. + + :param resource_group_name: The name of the resource group within the + Azure subscription. + :type resource_group_name: str + :param account_name: The Media Services account name. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AccountFilter + :rtype: + ~azure.mgmt.media.models.AccountFilterPaged[~azure.mgmt.media.models.AccountFilter] + :raises: + :class:`ApiErrorException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # 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) + 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 + deserialized = models.AccountFilterPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.AccountFilterPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/accountFilters'} + + def get( + self, resource_group_name, account_name, filter_name, custom_headers=None, raw=False, **operation_config): + """Get an Account Filter. + + Get the details of an Account Filter in the Media Services account. + + :param resource_group_name: The name of the resource group within the + Azure subscription. + :type resource_group_name: str + :param account_name: The Media Services account name. + :type account_name: str + :param filter_name: The Account Filter name + :type filter_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AccountFilter or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.media.models.AccountFilter or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'filterName': self._serialize.url("filter_name", filter_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # 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, 404]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AccountFilter', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/accountFilters/{filterName}'} + + def create_or_update( + self, resource_group_name, account_name, filter_name, parameters, custom_headers=None, raw=False, **operation_config): + """Create or update an Account Filter. + + Creates or updates an Account Filter in the Media Services account. + + :param resource_group_name: The name of the resource group within the + Azure subscription. + :type resource_group_name: str + :param account_name: The Media Services account name. + :type account_name: str + :param filter_name: The Account Filter name + :type filter_name: str + :param parameters: The request parameters + :type parameters: ~azure.mgmt.media.models.AccountFilter + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AccountFilter or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.media.models.AccountFilter or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'filterName': self._serialize.url("filter_name", filter_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # 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' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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 body + body_content = self._serialize.body(parameters, 'AccountFilter') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AccountFilter', response) + if response.status_code == 201: + deserialized = self._deserialize('AccountFilter', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/accountFilters/{filterName}'} + + def delete( + self, resource_group_name, account_name, filter_name, custom_headers=None, raw=False, **operation_config): + """Delete an Account Filter. + + Deletes an Account Filter in the Media Services account. + + :param resource_group_name: The name of the resource group within the + Azure subscription. + :type resource_group_name: str + :param account_name: The Media Services account name. + :type account_name: str + :param filter_name: The Account Filter name + :type filter_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'filterName': self._serialize.url("filter_name", filter_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ApiErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/accountFilters/{filterName}'} + + def update( + self, resource_group_name, account_name, filter_name, parameters, custom_headers=None, raw=False, **operation_config): + """Update an Account Filter. + + Updates an existing Account Filter in the Media Services account. + + :param resource_group_name: The name of the resource group within the + Azure subscription. + :type resource_group_name: str + :param account_name: The Media Services account name. + :type account_name: str + :param filter_name: The Account Filter name + :type filter_name: str + :param parameters: The request parameters + :type parameters: ~azure.mgmt.media.models.AccountFilter + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AccountFilter or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.media.models.AccountFilter or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'filterName': self._serialize.url("filter_name", filter_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # 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' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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 body + body_content = self._serialize.body(parameters, 'AccountFilter') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AccountFilter', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/accountFilters/{filterName}'} diff --git a/azure-mgmt-media/azure/mgmt/media/operations/asset_filters_operations.py b/azure-mgmt-media/azure/mgmt/media/operations/asset_filters_operations.py new file mode 100644 index 000000000000..45bb5fa9ab1e --- /dev/null +++ b/azure-mgmt-media/azure/mgmt/media/operations/asset_filters_operations.py @@ -0,0 +1,397 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class AssetFiltersOperations(object): + """AssetFiltersOperations operations. + + :param client: Client for service requests. + :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: "2018-07-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-07-01" + + self.config = config + + def list( + self, resource_group_name, account_name, asset_name, custom_headers=None, raw=False, **operation_config): + """List Asset Filters. + + List Asset Filters associated with the specified Asset. + + :param resource_group_name: The name of the resource group within the + Azure subscription. + :type resource_group_name: str + :param account_name: The Media Services account name. + :type account_name: str + :param asset_name: The Asset name. + :type asset_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AssetFilter + :rtype: + ~azure.mgmt.media.models.AssetFilterPaged[~azure.mgmt.media.models.AssetFilter] + :raises: + :class:`ApiErrorException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'assetName': self._serialize.url("asset_name", asset_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # 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) + 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 + deserialized = models.AssetFilterPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.AssetFilterPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/assetFilters'} + + def get( + self, resource_group_name, account_name, asset_name, filter_name, custom_headers=None, raw=False, **operation_config): + """Get an Asset Filter. + + Get the details of an Asset Filter associated with the specified Asset. + + :param resource_group_name: The name of the resource group within the + Azure subscription. + :type resource_group_name: str + :param account_name: The Media Services account name. + :type account_name: str + :param asset_name: The Asset name. + :type asset_name: str + :param filter_name: The Asset Filter name + :type filter_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AssetFilter or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.media.models.AssetFilter or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'assetName': self._serialize.url("asset_name", asset_name, 'str'), + 'filterName': self._serialize.url("filter_name", filter_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # 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, 404]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AssetFilter', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/assetFilters/{filterName}'} + + def create_or_update( + self, resource_group_name, account_name, asset_name, filter_name, parameters, custom_headers=None, raw=False, **operation_config): + """Create or update an Asset Filter. + + Creates or updates an Asset Filter associated with the specified Asset. + + :param resource_group_name: The name of the resource group within the + Azure subscription. + :type resource_group_name: str + :param account_name: The Media Services account name. + :type account_name: str + :param asset_name: The Asset name. + :type asset_name: str + :param filter_name: The Asset Filter name + :type filter_name: str + :param parameters: The request parameters + :type parameters: ~azure.mgmt.media.models.AssetFilter + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AssetFilter or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.media.models.AssetFilter or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'assetName': self._serialize.url("asset_name", asset_name, 'str'), + 'filterName': self._serialize.url("filter_name", filter_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # 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' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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 body + body_content = self._serialize.body(parameters, 'AssetFilter') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AssetFilter', response) + if response.status_code == 201: + deserialized = self._deserialize('AssetFilter', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/assetFilters/{filterName}'} + + def delete( + self, resource_group_name, account_name, asset_name, filter_name, custom_headers=None, raw=False, **operation_config): + """Delete an Asset Filter. + + Deletes an Asset Filter associated with the specified Asset. + + :param resource_group_name: The name of the resource group within the + Azure subscription. + :type resource_group_name: str + :param account_name: The Media Services account name. + :type account_name: str + :param asset_name: The Asset name. + :type asset_name: str + :param filter_name: The Asset Filter name + :type filter_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'assetName': self._serialize.url("asset_name", asset_name, 'str'), + 'filterName': self._serialize.url("filter_name", filter_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ApiErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/assetFilters/{filterName}'} + + def update( + self, resource_group_name, account_name, asset_name, filter_name, parameters, custom_headers=None, raw=False, **operation_config): + """Update an Asset Filter. + + Updates an existing Asset Filter associated with the specified Asset. + + :param resource_group_name: The name of the resource group within the + Azure subscription. + :type resource_group_name: str + :param account_name: The Media Services account name. + :type account_name: str + :param asset_name: The Asset name. + :type asset_name: str + :param filter_name: The Asset Filter name + :type filter_name: str + :param parameters: The request parameters + :type parameters: ~azure.mgmt.media.models.AssetFilter + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AssetFilter or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.media.models.AssetFilter or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'assetName': self._serialize.url("asset_name", asset_name, 'str'), + 'filterName': self._serialize.url("filter_name", filter_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # 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' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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 body + body_content = self._serialize.body(parameters, 'AssetFilter') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AssetFilter', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/assetFilters/{filterName}'} diff --git a/azure-mgmt-media/azure/mgmt/media/operations/assets_operations.py b/azure-mgmt-media/azure/mgmt/media/operations/assets_operations.py index 89f5234824e4..02511f0c2476 100644 --- a/azure-mgmt-media/azure/mgmt/media/operations/assets_operations.py +++ b/azure-mgmt-media/azure/mgmt/media/operations/assets_operations.py @@ -22,7 +22,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: "2018-06-01-preview". + :ivar api_version: The Version of the API to be used with the client request. Constant value: "2018-07-01". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-06-01-preview" + self.api_version = "2018-07-01" self.config = config @@ -96,7 +96,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -105,9 +105,8 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + 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.ApiErrorException(self._deserialize, response) @@ -165,7 +164,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -174,8 +173,8 @@ def get( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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) @@ -234,6 +233,7 @@ def create_or_update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -246,9 +246,8 @@ def create_or_update( body_content = self._serialize.body(parameters, 'Asset') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: raise models.ApiErrorException(self._deserialize, response) @@ -306,7 +305,6 @@ def delete( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -315,8 +313,8 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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, 204]: raise models.ApiErrorException(self._deserialize, response) @@ -368,6 +366,7 @@ def update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -380,9 +379,8 @@ def update( body_content = self._serialize.body(parameters, 'Asset') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.ApiErrorException(self._deserialize, response) @@ -450,6 +448,7 @@ def list_container_sas( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -462,9 +461,8 @@ def list_container_sas( body_content = self._serialize.body(parameters, 'ListContainerSasInput') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.ApiErrorException(self._deserialize, response) @@ -500,9 +498,10 @@ def get_encryption_key( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: AssetStorageEncryptionKey or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.media.models.AssetStorageEncryptionKey or - ~msrest.pipeline.ClientRawResponse + :return: StorageEncryptedAssetDecryptionData or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.media.models.StorageEncryptedAssetDecryptionData + or ~msrest.pipeline.ClientRawResponse :raises: :class:`ApiErrorException` """ @@ -522,7 +521,7 @@ def get_encryption_key( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -531,8 +530,8 @@ def get_encryption_key( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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]: raise models.ApiErrorException(self._deserialize, response) @@ -540,7 +539,7 @@ def get_encryption_key( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('AssetStorageEncryptionKey', response) + deserialized = self._deserialize('StorageEncryptedAssetDecryptionData', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -548,3 +547,71 @@ def get_encryption_key( return deserialized get_encryption_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/getEncryptionKey'} + + def list_streaming_locators( + self, resource_group_name, account_name, asset_name, custom_headers=None, raw=False, **operation_config): + """List Streaming Locators. + + Lists Streaming Locators which are associated with this asset. + + :param resource_group_name: The name of the resource group within the + Azure subscription. + :type resource_group_name: str + :param account_name: The Media Services account name. + :type account_name: str + :param asset_name: The Asset name. + :type asset_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ListStreamingLocatorsResponse or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.media.models.ListStreamingLocatorsResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + # Construct URL + url = self.list_streaming_locators.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'assetName': self._serialize.url("asset_name", asset_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # 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.post(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) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ListStreamingLocatorsResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_streaming_locators.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/listStreamingLocators'} diff --git a/azure-mgmt-media/azure/mgmt/media/operations/content_key_policies_operations.py b/azure-mgmt-media/azure/mgmt/media/operations/content_key_policies_operations.py index a5d2809b1093..51a53ba8bfe7 100644 --- a/azure-mgmt-media/azure/mgmt/media/operations/content_key_policies_operations.py +++ b/azure-mgmt-media/azure/mgmt/media/operations/content_key_policies_operations.py @@ -22,7 +22,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: "2018-06-01-preview". + :ivar api_version: The Version of the API to be used with the client request. Constant value: "2018-07-01". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-06-01-preview" + self.api_version = "2018-07-01" self.config = config @@ -95,7 +95,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -104,9 +104,8 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + 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.ApiErrorException(self._deserialize, response) @@ -164,7 +163,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -173,8 +172,8 @@ def get( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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) @@ -237,6 +236,7 @@ def create_or_update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -249,9 +249,8 @@ def create_or_update( body_content = self._serialize.body(parameters, 'ContentKeyPolicy') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: raise models.ApiErrorException(self._deserialize, response) @@ -309,7 +308,6 @@ def delete( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -318,8 +316,8 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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, 204]: raise models.ApiErrorException(self._deserialize, response) @@ -375,6 +373,7 @@ def update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -387,9 +386,8 @@ def update( body_content = self._serialize.body(parameters, 'ContentKeyPolicy') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.ApiErrorException(self._deserialize, response) @@ -446,7 +444,7 @@ def get_policy_properties_with_secrets( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -455,8 +453,8 @@ def get_policy_properties_with_secrets( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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) diff --git a/azure-mgmt-media/azure/mgmt/media/operations/jobs_operations.py b/azure-mgmt-media/azure/mgmt/media/operations/jobs_operations.py index bb59c5478e1a..f16c91831fcf 100644 --- a/azure-mgmt-media/azure/mgmt/media/operations/jobs_operations.py +++ b/azure-mgmt-media/azure/mgmt/media/operations/jobs_operations.py @@ -22,7 +22,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: "2018-06-01-preview". + :ivar api_version: The Version of the API to be used with the client request. Constant value: "2018-07-01". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-06-01-preview" + self.api_version = "2018-07-01" self.config = config @@ -99,7 +99,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -108,9 +108,8 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + 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.ApiErrorException(self._deserialize, response) @@ -171,7 +170,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -180,8 +179,8 @@ def get( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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) @@ -243,6 +242,7 @@ def create( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -255,9 +255,8 @@ def create( body_content = self._serialize.body(parameters, 'Job') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [201]: raise models.ApiErrorException(self._deserialize, response) @@ -316,7 +315,6 @@ def delete( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -325,8 +323,8 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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, 204]: raise models.ApiErrorException(self._deserialize, response) @@ -336,6 +334,82 @@ def delete( return client_raw_response delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/transforms/{transformName}/jobs/{jobName}'} + def update( + self, resource_group_name, account_name, transform_name, job_name, parameters, custom_headers=None, raw=False, **operation_config): + """Update Job. + + Updates a Job. + + :param resource_group_name: The name of the resource group within the + Azure subscription. + :type resource_group_name: str + :param account_name: The Media Services account name. + :type account_name: str + :param transform_name: The Transform name. + :type transform_name: str + :param job_name: The Job name. + :type job_name: str + :param parameters: The request parameters + :type parameters: ~azure.mgmt.media.models.Job + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Job or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.media.models.Job or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'transformName': self._serialize.url("transform_name", transform_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # 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' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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 body + body_content = self._serialize.body(parameters, 'Job') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Job', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/transforms/{transformName}/jobs/{jobName}'} + def cancel_job( self, resource_group_name, account_name, transform_name, job_name, custom_headers=None, raw=False, **operation_config): """Cancel Job. @@ -378,7 +452,6 @@ def cancel_job( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -387,8 +460,8 @@ def cancel_job( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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]: raise models.ApiErrorException(self._deserialize, response) diff --git a/azure-mgmt-media/azure/mgmt/media/operations/live_events_operations.py b/azure-mgmt-media/azure/mgmt/media/operations/live_events_operations.py index e25ab34f493f..6af08112a079 100644 --- a/azure-mgmt-media/azure/mgmt/media/operations/live_events_operations.py +++ b/azure-mgmt-media/azure/mgmt/media/operations/live_events_operations.py @@ -24,7 +24,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: "2018-06-01-preview". + :ivar api_version: The Version of the API to be used with the client request. Constant value: "2018-07-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 = "2018-06-01-preview" + self.api_version = "2018-07-01" self.config = config @@ -82,7 +82,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -91,9 +91,8 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + 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.ApiErrorException(self._deserialize, response) @@ -151,7 +150,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -160,8 +159,8 @@ def get( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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) @@ -199,6 +198,7 @@ def _create_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -211,9 +211,8 @@ def _create_initial( body_content = self._serialize.body(parameters, 'LiveEvent') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: raise models.ApiErrorException(self._deserialize, response) @@ -246,7 +245,8 @@ def create( :type live_event_name: str :param parameters: Live Event properties needed for creation. :type parameters: ~azure.mgmt.media.models.LiveEvent - :param auto_start: The flag indicates if auto start the Live Event. + :param auto_start: The flag indicates if the resource should be + automatically started on creation. :type auto_start: bool :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the @@ -310,6 +310,7 @@ def _update_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -322,9 +323,8 @@ def _update_initial( body_content = self._serialize.body(parameters, 'LiveEvent') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: raise models.ApiErrorException(self._deserialize, response) @@ -416,7 +416,6 @@ def _delete_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -425,8 +424,8 @@ def _delete_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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, 202, 204]: raise models.ApiErrorException(self._deserialize, response) @@ -502,7 +501,6 @@ def _start_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -511,8 +509,8 @@ def _start_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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, 202]: raise models.ApiErrorException(self._deserialize, response) @@ -602,9 +600,8 @@ def _stop_initial( body_content = self._serialize.body(parameters, 'LiveEventActionInput') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: raise models.ApiErrorException(self._deserialize, response) @@ -684,7 +681,6 @@ def _reset_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -693,8 +689,8 @@ def _reset_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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, 202]: raise models.ApiErrorException(self._deserialize, response) diff --git a/azure-mgmt-media/azure/mgmt/media/operations/live_outputs_operations.py b/azure-mgmt-media/azure/mgmt/media/operations/live_outputs_operations.py index 2dff2d2c0147..536bc9772000 100644 --- a/azure-mgmt-media/azure/mgmt/media/operations/live_outputs_operations.py +++ b/azure-mgmt-media/azure/mgmt/media/operations/live_outputs_operations.py @@ -24,7 +24,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: "2018-06-01-preview". + :ivar api_version: The Version of the API to be used with the client request. Constant value: "2018-07-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 = "2018-06-01-preview" + self.api_version = "2018-07-01" self.config = config @@ -85,7 +85,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -94,9 +94,8 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + 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.ApiErrorException(self._deserialize, response) @@ -157,7 +156,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -166,8 +165,8 @@ def get( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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) @@ -204,6 +203,7 @@ def _create_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -216,9 +216,8 @@ def _create_initial( body_content = self._serialize.body(parameters, 'LiveOutput') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: raise models.ApiErrorException(self._deserialize, response) @@ -316,7 +315,6 @@ def _delete_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -325,8 +323,8 @@ def _delete_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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, 202, 204]: raise models.ApiErrorException(self._deserialize, response) diff --git a/azure-mgmt-media/azure/mgmt/media/operations/locations_operations.py b/azure-mgmt-media/azure/mgmt/media/operations/locations_operations.py index 00e53e9e2219..36f04426d5a2 100644 --- a/azure-mgmt-media/azure/mgmt/media/operations/locations_operations.py +++ b/azure-mgmt-media/azure/mgmt/media/operations/locations_operations.py @@ -22,7 +22,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: "2018-06-01-preview". + :ivar api_version: The Version of the API to be used with the client request. Constant value: "2018-07-01". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-06-01-preview" + self.api_version = "2018-07-01" self.config = config @@ -42,7 +42,7 @@ def check_name_availability( Checks whether the Media Service resource name is available. - :param location_name: + :param location_name: The name of the location :type location_name: str :param name: The account name. :type name: str @@ -77,6 +77,7 @@ def check_name_availability( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -89,9 +90,8 @@ def check_name_availability( body_content = self._serialize.body(parameters, 'CheckNameAvailabilityInput') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.ApiErrorException(self._deserialize, response) diff --git a/azure-mgmt-media/azure/mgmt/media/operations/mediaservices_operations.py b/azure-mgmt-media/azure/mgmt/media/operations/mediaservices_operations.py index 254717aa692d..ef7b236eca31 100644 --- a/azure-mgmt-media/azure/mgmt/media/operations/mediaservices_operations.py +++ b/azure-mgmt-media/azure/mgmt/media/operations/mediaservices_operations.py @@ -22,7 +22,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: "2018-06-01-preview". + :ivar api_version: The Version of the API to be used with the client request. Constant value: "2018-07-01". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-06-01-preview" + self.api_version = "2018-07-01" self.config = config @@ -77,7 +77,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -86,9 +86,8 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + 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.ApiErrorException(self._deserialize, response) @@ -143,7 +142,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -152,8 +151,8 @@ def get( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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.ApiErrorException(self._deserialize, response) @@ -209,6 +208,7 @@ def create_or_update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -221,9 +221,8 @@ def create_or_update( body_content = self._serialize.body(parameters, 'MediaService') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: raise models.ApiErrorException(self._deserialize, response) @@ -278,7 +277,6 @@ def delete( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -287,8 +285,8 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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) @@ -337,6 +335,7 @@ def update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -349,9 +348,8 @@ def update( body_content = self._serialize.body(parameters, 'MediaService') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.ApiErrorException(self._deserialize, response) @@ -421,9 +419,8 @@ def sync_storage_keys( body_content = self._serialize.body(parameters, 'SyncStorageKeysInput') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.ApiErrorException(self._deserialize, response) @@ -470,7 +467,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -479,9 +476,8 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + 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.ApiErrorException(self._deserialize, response) @@ -532,7 +528,7 @@ def get_by_subscription( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -541,8 +537,8 @@ def get_by_subscription( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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.ApiErrorException(self._deserialize, response) diff --git a/azure-mgmt-media/azure/mgmt/media/operations/operations.py b/azure-mgmt-media/azure/mgmt/media/operations/operations.py index fbf16f510d84..b595bda1c84f 100644 --- a/azure-mgmt-media/azure/mgmt/media/operations/operations.py +++ b/azure-mgmt-media/azure/mgmt/media/operations/operations.py @@ -22,7 +22,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: "2018-06-01-preview". + :ivar api_version: The Version of the API to be used with the client request. Constant value: "2018-07-01". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-06-01-preview" + self.api_version = "2018-07-01" self.config = config @@ -69,7 +69,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -78,9 +78,8 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + 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.ApiErrorException(self._deserialize, response) diff --git a/azure-mgmt-media/azure/mgmt/media/operations/streaming_endpoints_operations.py b/azure-mgmt-media/azure/mgmt/media/operations/streaming_endpoints_operations.py index 97550b18c87f..2c2c6511076f 100644 --- a/azure-mgmt-media/azure/mgmt/media/operations/streaming_endpoints_operations.py +++ b/azure-mgmt-media/azure/mgmt/media/operations/streaming_endpoints_operations.py @@ -24,7 +24,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: "2018-06-01-preview". + :ivar api_version: The Version of the API to be used with the client request. Constant value: "2018-07-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 = "2018-06-01-preview" + self.api_version = "2018-07-01" self.config = config @@ -82,7 +82,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -91,9 +91,8 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + 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.ApiErrorException(self._deserialize, response) @@ -151,7 +150,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -160,8 +159,8 @@ def get( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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) @@ -199,6 +198,7 @@ def _create_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -211,9 +211,8 @@ def _create_initial( body_content = self._serialize.body(parameters, 'StreamingEndpoint') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: raise models.ApiErrorException(self._deserialize, response) @@ -246,7 +245,8 @@ def create( :type streaming_endpoint_name: str :param parameters: StreamingEndpoint properties needed for creation. :type parameters: ~azure.mgmt.media.models.StreamingEndpoint - :param auto_start: The flag indicates if auto start the Live Event. + :param auto_start: The flag indicates if the resource should be + automatically started on creation. :type auto_start: bool :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the @@ -310,6 +310,7 @@ def _update_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -322,9 +323,8 @@ def _update_initial( body_content = self._serialize.body(parameters, 'StreamingEndpoint') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: raise models.ApiErrorException(self._deserialize, response) @@ -418,7 +418,6 @@ def _delete_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -427,8 +426,8 @@ def _delete_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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, 202, 204]: raise models.ApiErrorException(self._deserialize, response) @@ -504,7 +503,6 @@ def _start_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -513,8 +511,8 @@ def _start_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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, 202]: raise models.ApiErrorException(self._deserialize, response) @@ -590,7 +588,6 @@ def _stop_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -599,8 +596,8 @@ def _stop_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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, 202]: raise models.ApiErrorException(self._deserialize, response) @@ -690,9 +687,8 @@ def _scale_initial( body_content = self._serialize.body(parameters, 'StreamingEntityScaleUnit') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: raise models.ApiErrorException(self._deserialize, response) @@ -714,8 +710,7 @@ def scale( :type account_name: str :param streaming_endpoint_name: The name of the StreamingEndpoint. :type streaming_endpoint_name: str - :param scale_unit: ScaleUnit The scale unit number of the - StreamingEndpoint. + :param scale_unit: The scale unit number of the StreamingEndpoint. :type scale_unit: int :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the diff --git a/azure-mgmt-media/azure/mgmt/media/operations/streaming_locators_operations.py b/azure-mgmt-media/azure/mgmt/media/operations/streaming_locators_operations.py index 7c23eaafddc0..3b4c78540c63 100644 --- a/azure-mgmt-media/azure/mgmt/media/operations/streaming_locators_operations.py +++ b/azure-mgmt-media/azure/mgmt/media/operations/streaming_locators_operations.py @@ -22,7 +22,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: "2018-06-01-preview". + :ivar api_version: The Version of the API to be used with the client request. Constant value: "2018-07-01". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-06-01-preview" + self.api_version = "2018-07-01" self.config = config @@ -95,7 +95,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -104,9 +104,8 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + 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.ApiErrorException(self._deserialize, response) @@ -164,7 +163,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -173,8 +172,8 @@ def get( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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) @@ -233,6 +232,7 @@ def create( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -245,9 +245,8 @@ def create( body_content = self._serialize.body(parameters, 'StreamingLocator') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [201]: raise models.ApiErrorException(self._deserialize, response) @@ -303,7 +302,6 @@ def delete( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -312,8 +310,8 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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, 204]: raise models.ApiErrorException(self._deserialize, response) @@ -363,7 +361,7 @@ def list_content_keys( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -372,8 +370,8 @@ def list_content_keys( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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]: raise models.ApiErrorException(self._deserialize, response) @@ -430,7 +428,7 @@ def list_paths( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -439,8 +437,8 @@ def list_paths( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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]: raise models.ApiErrorException(self._deserialize, response) diff --git a/azure-mgmt-media/azure/mgmt/media/operations/streaming_policies_operations.py b/azure-mgmt-media/azure/mgmt/media/operations/streaming_policies_operations.py index 930de467a644..4af7dab71dfb 100644 --- a/azure-mgmt-media/azure/mgmt/media/operations/streaming_policies_operations.py +++ b/azure-mgmt-media/azure/mgmt/media/operations/streaming_policies_operations.py @@ -22,7 +22,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: "2018-06-01-preview". + :ivar api_version: The Version of the API to be used with the client request. Constant value: "2018-07-01". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-06-01-preview" + self.api_version = "2018-07-01" self.config = config @@ -95,7 +95,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -104,9 +104,8 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + 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.ApiErrorException(self._deserialize, response) @@ -164,7 +163,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -173,8 +172,8 @@ def get( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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) @@ -233,6 +232,7 @@ def create( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -245,9 +245,8 @@ def create( body_content = self._serialize.body(parameters, 'StreamingPolicy') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [201]: raise models.ApiErrorException(self._deserialize, response) @@ -303,7 +302,6 @@ def delete( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -312,8 +310,8 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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, 204]: raise models.ApiErrorException(self._deserialize, response) diff --git a/azure-mgmt-media/azure/mgmt/media/operations/transforms_operations.py b/azure-mgmt-media/azure/mgmt/media/operations/transforms_operations.py index 528edb66b958..7b2d2c316596 100644 --- a/azure-mgmt-media/azure/mgmt/media/operations/transforms_operations.py +++ b/azure-mgmt-media/azure/mgmt/media/operations/transforms_operations.py @@ -22,7 +22,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: "2018-06-01-preview". + :ivar api_version: The Version of the API to be used with the client request. Constant value: "2018-07-01". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-06-01-preview" + self.api_version = "2018-07-01" self.config = config @@ -96,7 +96,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -105,9 +105,8 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + 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.ApiErrorException(self._deserialize, response) @@ -165,7 +164,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -174,8 +173,8 @@ def get( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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) @@ -239,6 +238,7 @@ def create_or_update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -251,9 +251,8 @@ def create_or_update( body_content = self._serialize.body(parameters, 'Transform') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: raise models.ApiErrorException(self._deserialize, response) @@ -311,7 +310,6 @@ def delete( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -320,8 +318,8 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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, 204]: raise models.ApiErrorException(self._deserialize, response) @@ -378,6 +376,7 @@ def update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -390,9 +389,8 @@ def update( body_content = self._serialize.body(parameters, 'Transform') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.ApiErrorException(self._deserialize, response) diff --git a/azure-mgmt-media/azure/mgmt/media/version.py b/azure-mgmt-media/azure/mgmt/media/version.py index 99dcc0aea3f2..8b09f47f15f0 100644 --- a/azure-mgmt-media/azure/mgmt/media/version.py +++ b/azure-mgmt-media/azure/mgmt/media/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0rc2" +VERSION = "2018-07-01" diff --git a/azure-mgmt-media/setup.py b/azure-mgmt-media/setup.py index 49be05b7b104..7786b894a0af 100644 --- a/azure-mgmt-media/setup.py +++ b/azure-mgmt-media/setup.py @@ -78,6 +78,7 @@ zip_safe=False, packages=find_packages(exclude=["tests"]), install_requires=[ + 'msrest>=0.5.0', 'msrestazure>=0.4.32,<2.0.0', 'azure-common~=1.1', ],