From c7be4d311eec2c16be369d3fa9f8659b5ea183f4 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 23 Apr 2021 02:35:29 +0000 Subject: [PATCH] CodeGen from PR 14075 in Azure/azure-rest-api-specs maps t2 config (#14075) Co-authored-by: Yan Zhang (WICRESOFT NORTH AMERICA LTD) --- sdk/maps/azure-mgmt-maps/MANIFEST.in | 1 + sdk/maps/azure-mgmt-maps/_meta.json | 8 ++ .../maps/_azure_maps_resource_provider.py | 19 ++++ .../azure/mgmt/maps/_metadata.json | 106 ++++++++++++++++++ .../azure/mgmt/maps/_version.py | 3 +- .../maps/aio/_azure_maps_resource_provider.py | 18 +++ .../aio/operations/_accounts_operations.py | 16 +-- .../aio/operations/_creators_operations.py | 10 +- .../maps/aio/operations/_maps_operations.py | 2 +- .../operations/_private_atlases_operations.py | 26 ++--- .../azure/mgmt/maps/models/_models.py | 4 +- .../azure/mgmt/maps/models/_models_py3.py | 4 +- .../maps/operations/_accounts_operations.py | 16 +-- .../maps/operations/_creators_operations.py | 10 +- .../mgmt/maps/operations/_maps_operations.py | 2 +- .../operations/_private_atlases_operations.py | 26 ++--- 16 files changed, 211 insertions(+), 60 deletions(-) create mode 100644 sdk/maps/azure-mgmt-maps/_meta.json create mode 100644 sdk/maps/azure-mgmt-maps/azure/mgmt/maps/_metadata.json diff --git a/sdk/maps/azure-mgmt-maps/MANIFEST.in b/sdk/maps/azure-mgmt-maps/MANIFEST.in index a3cb07df8765..3a9b6517412b 100644 --- a/sdk/maps/azure-mgmt-maps/MANIFEST.in +++ b/sdk/maps/azure-mgmt-maps/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/maps/azure-mgmt-maps/_meta.json b/sdk/maps/azure-mgmt-maps/_meta.json new file mode 100644 index 000000000000..115285e6ba2d --- /dev/null +++ b/sdk/maps/azure-mgmt-maps/_meta.json @@ -0,0 +1,8 @@ +{ + "autorest": "3.3.0", + "use": "@autorest/python@5.6.6", + "commit": "c555c1c8bc915132c6f3df485ea49c42765ef32a", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/maps/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", + "readme": "specification/maps/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/_azure_maps_resource_provider.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/_azure_maps_resource_provider.py index d3f177b959ea..1ff841729b20 100644 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/_azure_maps_resource_provider.py +++ b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/_azure_maps_resource_provider.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import AzureMapsResourceProviderConfiguration from .operations import AccountsOperations @@ -70,6 +71,24 @@ def __init__( self.creators = CreatorsOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/_metadata.json b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/_metadata.json new file mode 100644 index 000000000000..1f7104180450 --- /dev/null +++ b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/_metadata.json @@ -0,0 +1,106 @@ +{ + "chosen_version": "2020-02-01-preview", + "total_api_version_list": ["2020-02-01-preview"], + "client": { + "name": "AzureMapsResourceProvider", + "filename": "_azure_maps_resource_provider", + "description": "Resource Provider.", + "base_url": "\u0027https://management.azure.com\u0027", + "custom_base_url": null, + "azure_arm": true, + "has_lro_operations": false, + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"AzureMapsResourceProviderConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"AzureMapsResourceProviderConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" + }, + "global_parameters": { + "sync": { + "credential": { + "signature": "credential, # type: \"TokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "The ID of the target subscription.", + "docstring_type": "str", + "required": true + } + }, + "async": { + "credential": { + "signature": "credential: \"AsyncTokenCredential\",", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id: str,", + "description": "The ID of the target subscription.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } + }, + "config": { + "credential": true, + "credential_scopes": ["https://management.azure.com/.default"], + "credential_default_policy_type": "BearerTokenCredentialPolicy", + "credential_default_policy_type_has_async_version": true, + "credential_key_header_name": null, + "sync_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\": [\"TokenCredential\"]}}}", + "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": { + "accounts": "AccountsOperations", + "maps": "MapsOperations", + "private_atlases": "PrivateAtlasesOperations", + "creators": "CreatorsOperations" + } +} \ No newline at end of file diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/_version.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/_version.py index 515f51c112dd..eae7c95b6fbd 100644 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/_version.py +++ b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/_version.py @@ -6,5 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0b1" - +VERSION = "0.1.0" diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/aio/_azure_maps_resource_provider.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/aio/_azure_maps_resource_provider.py index 7d9c893664d2..b19f42571fdb 100644 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/aio/_azure_maps_resource_provider.py +++ b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/aio/_azure_maps_resource_provider.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -67,6 +68,23 @@ def __init__( self.creators = CreatorsOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/aio/operations/_accounts_operations.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/aio/operations/_accounts_operations.py index c492897d8510..9326a6fab987 100644 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/aio/operations/_accounts_operations.py +++ b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/aio/operations/_accounts_operations.py @@ -98,7 +98,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(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -170,7 +170,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(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MapsAccount', pipeline_response) @@ -229,7 +229,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(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -285,7 +285,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MapsAccount', pipeline_response) @@ -356,7 +356,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, 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) @@ -423,7 +423,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, 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) @@ -484,7 +484,7 @@ async def list_keys( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MapsAccountKeys', pipeline_response) @@ -552,7 +552,7 @@ async def regenerate_keys( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MapsAccountKeys', pipeline_response) diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/aio/operations/_creators_operations.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/aio/operations/_creators_operations.py index b80f0b9c0755..48ccb5866b4e 100644 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/aio/operations/_creators_operations.py +++ b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/aio/operations/_creators_operations.py @@ -105,7 +105,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, 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) @@ -178,7 +178,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(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -254,7 +254,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(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Creator', pipeline_response) @@ -317,7 +317,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(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -377,7 +377,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Creator', pipeline_response) diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/aio/operations/_maps_operations.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/aio/operations/_maps_operations.py index 789717f68559..edebe5234a2e 100644 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/aio/operations/_maps_operations.py +++ b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/aio/operations/_maps_operations.py @@ -93,7 +93,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, 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) diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/aio/operations/_private_atlases_operations.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/aio/operations/_private_atlases_operations.py index 82853f302398..1636b0e0f0eb 100644 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/aio/operations/_private_atlases_operations.py +++ b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/aio/operations/_private_atlases_operations.py @@ -49,9 +49,9 @@ async def create_or_update( private_atlas_create_parameters: "_models.PrivateAtlasCreateParameters", **kwargs ) -> "_models.PrivateAtlas": - """Create or update a Private Atlas resource. Private Atlas resource will enable the usage of - Azure resources to build a custom set of mapping data. It requires an account to exist before - it can be created. + """[Deprecated] Create or update a Private Atlas resource. Private Atlas resource will enable the + usage of Azure resources to build a custom set of mapping data. It requires an account to exist + before it can be created. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -104,7 +104,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(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -127,8 +127,8 @@ async def update( private_atlas_update_parameters: "_models.PrivateAtlasUpdateParameters", **kwargs ) -> "_models.PrivateAtlas": - """Updates the Private Atlas resource. Only a subset of the parameters may be updated after - creation, such as Tags. + """[Deprecated] Updates the Private Atlas resource. Only a subset of the parameters may be updated + after creation, such as Tags. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -180,7 +180,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(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateAtlas', pipeline_response) @@ -198,7 +198,7 @@ async def delete( private_atlas_name: str, **kwargs ) -> None: - """Delete a Private Atlas resource. + """[Deprecated] Delete a Private Atlas resource. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -243,7 +243,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(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -258,7 +258,7 @@ async def get( private_atlas_name: str, **kwargs ) -> "_models.PrivateAtlas": - """Get a Private Atlas resource. + """[Deprecated] Get a Private Atlas resource. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -303,7 +303,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateAtlas', pipeline_response) @@ -320,7 +320,7 @@ def list_by_account( account_name: str, **kwargs ) -> AsyncIterable["_models.PrivateAtlasList"]: - """Get all Private Atlas instances for an Azure Map Account. + """[Deprecated] Get all Private Atlas instances for an Azure Map Account. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -378,7 +378,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, 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) diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/_models.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/_models.py index e694438dd3e7..1300820182c0 100644 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/_models.py +++ b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/_models.py @@ -48,7 +48,7 @@ def __init__( class TrackedResource(Resource): - """The resource model definition for an Azure Resource Manager tracked top level resource. + """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. @@ -849,7 +849,7 @@ class SystemData(msrest.serialization.Model): :param last_modified_by_type: The type of identity that last modified the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key". :type last_modified_by_type: str or ~azure.mgmt.maps.models.CreatedByType - :param last_modified_at: The type of identity that last modified the resource. + :param last_modified_at: The timestamp of resource last modification (UTC). :type last_modified_at: ~datetime.datetime """ diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/_models_py3.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/_models_py3.py index 47e32beb23d2..6d4ec7d0f696 100644 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/_models_py3.py +++ b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/_models_py3.py @@ -53,7 +53,7 @@ def __init__( class TrackedResource(Resource): - """The resource model definition for an Azure Resource Manager tracked top level resource. + """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. @@ -899,7 +899,7 @@ class SystemData(msrest.serialization.Model): :param last_modified_by_type: The type of identity that last modified the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key". :type last_modified_by_type: str or ~azure.mgmt.maps.models.CreatedByType - :param last_modified_at: The type of identity that last modified the resource. + :param last_modified_at: The timestamp of resource last modification (UTC). :type last_modified_at: ~datetime.datetime """ diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/_accounts_operations.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/_accounts_operations.py index fa07ba458958..f412a9fd3553 100644 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/_accounts_operations.py +++ b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/_accounts_operations.py @@ -103,7 +103,7 @@ 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(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -176,7 +176,7 @@ 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(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MapsAccount', pipeline_response) @@ -236,7 +236,7 @@ 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(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -293,7 +293,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MapsAccount', pipeline_response) @@ -365,7 +365,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, 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) @@ -433,7 +433,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, 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) @@ -495,7 +495,7 @@ def list_keys( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MapsAccountKeys', pipeline_response) @@ -564,7 +564,7 @@ def regenerate_keys( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MapsAccountKeys', pipeline_response) diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/_creators_operations.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/_creators_operations.py index d9194e76924a..d16c49a65d5a 100644 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/_creators_operations.py +++ b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/_creators_operations.py @@ -110,7 +110,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, 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) @@ -184,7 +184,7 @@ 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(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -261,7 +261,7 @@ 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(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Creator', pipeline_response) @@ -325,7 +325,7 @@ 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(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -386,7 +386,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Creator', pipeline_response) diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/_maps_operations.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/_maps_operations.py index 594e5fbc93ac..2b00d08756e9 100644 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/_maps_operations.py +++ b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/_maps_operations.py @@ -98,7 +98,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, 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) diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/_private_atlases_operations.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/_private_atlases_operations.py index 49a6cceb2855..76eccc770840 100644 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/_private_atlases_operations.py +++ b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/_private_atlases_operations.py @@ -54,9 +54,9 @@ def create_or_update( **kwargs # type: Any ): # type: (...) -> "_models.PrivateAtlas" - """Create or update a Private Atlas resource. Private Atlas resource will enable the usage of - Azure resources to build a custom set of mapping data. It requires an account to exist before - it can be created. + """[Deprecated] Create or update a Private Atlas resource. Private Atlas resource will enable the + usage of Azure resources to build a custom set of mapping data. It requires an account to exist + before it can be created. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -109,7 +109,7 @@ 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(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -133,8 +133,8 @@ def update( **kwargs # type: Any ): # type: (...) -> "_models.PrivateAtlas" - """Updates the Private Atlas resource. Only a subset of the parameters may be updated after - creation, such as Tags. + """[Deprecated] Updates the Private Atlas resource. Only a subset of the parameters may be updated + after creation, such as Tags. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -186,7 +186,7 @@ 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(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateAtlas', pipeline_response) @@ -205,7 +205,7 @@ def delete( **kwargs # type: Any ): # type: (...) -> None - """Delete a Private Atlas resource. + """[Deprecated] Delete a Private Atlas resource. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -250,7 +250,7 @@ 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(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -266,7 +266,7 @@ def get( **kwargs # type: Any ): # type: (...) -> "_models.PrivateAtlas" - """Get a Private Atlas resource. + """[Deprecated] Get a Private Atlas resource. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -311,7 +311,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateAtlas', pipeline_response) @@ -329,7 +329,7 @@ def list_by_account( **kwargs # type: Any ): # type: (...) -> Iterable["_models.PrivateAtlasList"] - """Get all Private Atlas instances for an Azure Map Account. + """[Deprecated] Get all Private Atlas instances for an Azure Map Account. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -387,7 +387,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, 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)