Skip to content

Commit

Permalink
CodeGen from PR 15281 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Fix descriptions for encoding types (Azure#15281)
  • Loading branch information
SDKAuto committed Jul 21, 2021
1 parent 1614c53 commit f2e7f34
Show file tree
Hide file tree
Showing 45 changed files with 1,366 additions and 1,048 deletions.
11 changes: 7 additions & 4 deletions sdk/media/azure-mgmt-media/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"autorest": "3.3.0",
"use": "@autorest/python@5.6.6",
"commit": "d78e99bbaa8170a72c38d8a6dad8a896f9a5c636",
"autorest": "3.4.5",
"use": [
"@autorest/python@5.8.4",
"@autorest/modelerfour@4.19.2"
],
"commit": "c2ec03e5faa411e9a6785c15c3ddbd812e67ba7b",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/mediaservices/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.6.6 --version=3.3.0",
"autorest_command": "autorest specification/mediaservices/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5",
"readme": "specification/mediaservices/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
from azure.core.pipeline.transport import HttpRequest, HttpResponse

from ._configuration import AzureMediaServicesConfiguration
from .operations import AccountFiltersOperations
from .operations import Operations
from .operations import MediaservicesOperations
from .operations import PrivateLinkResourcesOperations
from .operations import PrivateEndpointConnectionsOperations
from .operations import LocationsOperations
from .operations import AccountFiltersOperations
from .operations import AssetsOperations
from .operations import AssetFiltersOperations
from .operations import ContentKeyPoliciesOperations
Expand All @@ -41,8 +41,6 @@
class AzureMediaServices(object):
"""This Swagger was generated by the API Framework.
:ivar account_filters: AccountFiltersOperations operations
:vartype account_filters: azure.mgmt.media.operations.AccountFiltersOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.media.operations.Operations
:ivar mediaservices: MediaservicesOperations operations
Expand All @@ -53,6 +51,8 @@ class AzureMediaServices(object):
:vartype private_endpoint_connections: azure.mgmt.media.operations.PrivateEndpointConnectionsOperations
:ivar locations: LocationsOperations operations
:vartype locations: azure.mgmt.media.operations.LocationsOperations
:ivar account_filters: AccountFiltersOperations operations
:vartype account_filters: azure.mgmt.media.operations.AccountFiltersOperations
:ivar assets: AssetsOperations operations
:vartype assets: azure.mgmt.media.operations.AssetsOperations
:ivar asset_filters: AssetFiltersOperations operations
Expand Down Expand Up @@ -99,8 +99,6 @@ def __init__(
self._serialize.client_side_validation = False
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(
Expand All @@ -111,6 +109,8 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize)
self.locations = LocationsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.account_filters = AccountFiltersOperations(
self._client, self._config, self._serialize, self._deserialize)
self.assets = AssetsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.asset_filters = AssetFiltersOperations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2021-06-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-media/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
6 changes: 3 additions & 3 deletions sdk/media/azure-mgmt-media/azure/mgmt/media/_metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"chosen_version": "",
"total_api_version_list": ["2020-05-01", "2021-05-01"],
"chosen_version": "2021-06-01",
"total_api_version_list": ["2021-06-01"],
"client": {
"name": "AzureMediaServices",
"filename": "_azure_media_services",
Expand Down Expand Up @@ -98,12 +98,12 @@
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
},
"operation_groups": {
"account_filters": "AccountFiltersOperations",
"operations": "Operations",
"mediaservices": "MediaservicesOperations",
"private_link_resources": "PrivateLinkResourcesOperations",
"private_endpoint_connections": "PrivateEndpointConnectionsOperations",
"locations": "LocationsOperations",
"account_filters": "AccountFiltersOperations",
"assets": "AssetsOperations",
"asset_filters": "AssetFiltersOperations",
"content_key_policies": "ContentKeyPoliciesOperations",
Expand Down
2 changes: 1 addition & 1 deletion sdk/media/azure-mgmt-media/azure/mgmt/media/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "7.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
from azure.core.credentials_async import AsyncTokenCredential

from ._configuration import AzureMediaServicesConfiguration
from .operations import AccountFiltersOperations
from .operations import Operations
from .operations import MediaservicesOperations
from .operations import PrivateLinkResourcesOperations
from .operations import PrivateEndpointConnectionsOperations
from .operations import LocationsOperations
from .operations import AccountFiltersOperations
from .operations import AssetsOperations
from .operations import AssetFiltersOperations
from .operations import ContentKeyPoliciesOperations
Expand All @@ -39,8 +39,6 @@
class AzureMediaServices(object):
"""This Swagger was generated by the API Framework.
:ivar account_filters: AccountFiltersOperations operations
:vartype account_filters: azure.mgmt.media.aio.operations.AccountFiltersOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.media.aio.operations.Operations
:ivar mediaservices: MediaservicesOperations operations
Expand All @@ -51,6 +49,8 @@ class AzureMediaServices(object):
:vartype private_endpoint_connections: azure.mgmt.media.aio.operations.PrivateEndpointConnectionsOperations
:ivar locations: LocationsOperations operations
:vartype locations: azure.mgmt.media.aio.operations.LocationsOperations
:ivar account_filters: AccountFiltersOperations operations
:vartype account_filters: azure.mgmt.media.aio.operations.AccountFiltersOperations
:ivar assets: AssetsOperations operations
:vartype assets: azure.mgmt.media.aio.operations.AssetsOperations
:ivar asset_filters: AssetFiltersOperations operations
Expand Down Expand Up @@ -96,8 +96,6 @@ def __init__(
self._serialize.client_side_validation = False
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(
Expand All @@ -108,6 +106,8 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize)
self.locations = LocationsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.account_filters = AccountFiltersOperations(
self._client, self._config, self._serialize, self._deserialize)
self.assets = AssetsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.asset_filters = AssetFiltersOperations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2021-06-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-media/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._account_filters_operations import AccountFiltersOperations
from ._operations import Operations
from ._mediaservices_operations import MediaservicesOperations
from ._private_link_resources_operations import PrivateLinkResourcesOperations
from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations
from ._locations_operations import LocationsOperations
from ._account_filters_operations import AccountFiltersOperations
from ._assets_operations import AssetsOperations
from ._asset_filters_operations import AssetFiltersOperations
from ._content_key_policies_operations import ContentKeyPoliciesOperations
Expand All @@ -24,12 +24,12 @@
from ._streaming_endpoints_operations import StreamingEndpointsOperations

__all__ = [
'AccountFiltersOperations',
'Operations',
'MediaservicesOperations',
'PrivateLinkResourcesOperations',
'PrivateEndpointConnectionsOperations',
'LocationsOperations',
'AccountFiltersOperations',
'AssetsOperations',
'AssetFiltersOperations',
'ContentKeyPoliciesOperations',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def list(
self,
resource_group_name: str,
account_name: str,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.AccountFilterCollection"]:
"""List Account Filters.
Expand All @@ -65,7 +65,7 @@ def list(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-05-01"
api_version = "2021-06-01"
accept = "application/json"

def prepare_request(next_link=None):
Expand Down Expand Up @@ -107,7 +107,7 @@ async def get_next(next_link=None):
response = pipeline_response.http_response

if response.status_code not in [200]:
error = self._deserialize.failsafe_deserialize(_models.ApiError, response)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

Expand All @@ -123,8 +123,8 @@ async def get(
resource_group_name: str,
account_name: str,
filter_name: str,
**kwargs
) -> Optional["_models.AccountFilter"]:
**kwargs: Any
) -> "_models.AccountFilter":
"""Get an Account Filter.
Get the details of an Account Filter in the Media Services account.
Expand All @@ -137,15 +137,15 @@ async def get(
:type filter_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: AccountFilter, or the result of cls(response)
:rtype: ~azure.mgmt.media.models.AccountFilter or None
:rtype: ~azure.mgmt.media.models.AccountFilter
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.AccountFilter"]]
cls = kwargs.pop('cls', None) # type: ClsType["_models.AccountFilter"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-05-01"
api_version = "2021-06-01"
accept = "application/json"

# Construct URL
Expand All @@ -170,14 +170,12 @@ async def get(
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response

if response.status_code not in [200, 404]:
if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize.failsafe_deserialize(_models.ApiError, response)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('AccountFilter', pipeline_response)
deserialized = self._deserialize('AccountFilter', pipeline_response)

if cls:
return cls(pipeline_response, deserialized, {})
Expand All @@ -191,7 +189,7 @@ async def create_or_update(
account_name: str,
filter_name: str,
parameters: "_models.AccountFilter",
**kwargs
**kwargs: Any
) -> "_models.AccountFilter":
"""Create or update an Account Filter.
Expand All @@ -215,7 +213,7 @@ async def create_or_update(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-05-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Expand Down Expand Up @@ -247,7 +245,7 @@ async def create_or_update(

if response.status_code not in [200, 201]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize.failsafe_deserialize(_models.ApiError, response)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

if response.status_code == 200:
Expand All @@ -267,7 +265,7 @@ async def delete(
resource_group_name: str,
account_name: str,
filter_name: str,
**kwargs
**kwargs: Any
) -> None:
"""Delete an Account Filter.
Expand All @@ -289,7 +287,7 @@ async def delete(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-05-01"
api_version = "2021-06-01"
accept = "application/json"

# Construct URL
Expand All @@ -316,7 +314,7 @@ async def delete(

if response.status_code not in [200, 204]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize.failsafe_deserialize(_models.ApiError, response)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

if cls:
Expand All @@ -330,7 +328,7 @@ async def update(
account_name: str,
filter_name: str,
parameters: "_models.AccountFilter",
**kwargs
**kwargs: Any
) -> "_models.AccountFilter":
"""Update an Account Filter.
Expand All @@ -354,7 +352,7 @@ async def update(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-05-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Expand Down Expand Up @@ -386,7 +384,7 @@ async def update(

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize.failsafe_deserialize(_models.ApiError, response)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

deserialized = self._deserialize('AccountFilter', pipeline_response)
Expand Down
Loading

0 comments on commit f2e7f34

Please sign in to comment.