From c9275e0d4c3b1625010fc1a45fb20c78a1bf847b Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 20 Oct 2021 02:55:41 +0000 Subject: [PATCH] CodeGen from PR 16160 in Azure/azure-rest-api-specs Add Change Analysis API version from private repo (#16160) * Add API versions from private repo * Fix prettier and avocado validation report * Fix prettier and avocado validation report * push manifest from private repo * Make changes for public repo * Update to correct api-version' --- .../azure-mgmt-changeanalysis/MANIFEST.in | 1 + .../azure-mgmt-changeanalysis/_meta.json | 11 +++ ...azure_change_analysis_management_client.py | 19 +++++ .../azure/mgmt/changeanalysis/_metadata.json | 62 +++++++++++++--- .../azure/mgmt/changeanalysis/_version.py | 2 +- ...azure_change_analysis_management_client.py | 18 +++++ .../aio/operations/_changes_operations.py | 10 +-- .../aio/operations/_operations.py | 4 +- .../_resource_changes_operations.py | 4 +- .../mgmt/changeanalysis/models/_models.py | 72 +++++++++---------- .../mgmt/changeanalysis/models/_models_py3.py | 72 +++++++++---------- .../operations/_changes_operations.py | 6 +- .../changeanalysis/operations/_operations.py | 2 +- .../_resource_changes_operations.py | 2 +- 14 files changed, 188 insertions(+), 97 deletions(-) create mode 100644 sdk/changeanalysis/azure-mgmt-changeanalysis/_meta.json diff --git a/sdk/changeanalysis/azure-mgmt-changeanalysis/MANIFEST.in b/sdk/changeanalysis/azure-mgmt-changeanalysis/MANIFEST.in index a3cb07df8765..3a9b6517412b 100644 --- a/sdk/changeanalysis/azure-mgmt-changeanalysis/MANIFEST.in +++ b/sdk/changeanalysis/azure-mgmt-changeanalysis/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/changeanalysis/azure-mgmt-changeanalysis/_meta.json b/sdk/changeanalysis/azure-mgmt-changeanalysis/_meta.json new file mode 100644 index 000000000000..0a595fa11e9c --- /dev/null +++ b/sdk/changeanalysis/azure-mgmt-changeanalysis/_meta.json @@ -0,0 +1,11 @@ +{ + "autorest": "3.4.5", + "use": [ + "@autorest/python@5.8.4", + "@autorest/modelerfour@4.19.2" + ], + "commit": "8d337acd9a3c4ea81f5ac30debc349688e13946d", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/changeanalysis/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/changeanalysis/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/_azure_change_analysis_management_client.py b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/_azure_change_analysis_management_client.py index 59fade86330f..ae93a45c7ed2 100644 --- a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/_azure_change_analysis_management_client.py +++ b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/_azure_change_analysis_management_client.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 AzureChangeAnalysisManagementClientConfiguration from .operations import Operations @@ -65,6 +66,24 @@ def __init__( self.changes = ChangesOperations( 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/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/_metadata.json b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/_metadata.json index 7fd44a341edd..2c55427f37a0 100644 --- a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/_metadata.json +++ b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": false, - "client_side_validation": 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\": [\"AzureChangeAnalysisManagementClientConfiguration\"]}}, \"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\": [\"AzureChangeAnalysisManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -28,13 +30,13 @@ }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "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, # type: str", + "signature": "subscription_id: str,", "description": "The ID of the target subscription.", "docstring_type": "str", "required": true @@ -42,22 +44,62 @@ }, "constant": { }, - "call": "credential, subscription_id" + "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 + "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": { "operations": "Operations", "resource_changes": "ResourceChangesOperations", "changes": "ChangesOperations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/_version.py b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/_version.py index c47f66669f1b..e5754a47ce68 100644 --- a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/_version.py +++ b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/_azure_change_analysis_management_client.py b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/_azure_change_analysis_management_client.py index ae4782f4ec1b..12216dc70dac 100644 --- a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/_azure_change_analysis_management_client.py +++ b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/_azure_change_analysis_management_client.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 @@ -62,6 +63,23 @@ def __init__( self.changes = ChangesOperations( 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/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/operations/_changes_operations.py b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/operations/_changes_operations.py index 3f8f556d0e54..d223914d240e 100644 --- a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/operations/_changes_operations.py +++ b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/operations/_changes_operations.py @@ -48,7 +48,7 @@ def list_changes_by_resource_group( start_time: datetime.datetime, end_time: datetime.datetime, skip_token: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ChangeList"]: """List the changes of a resource group within the specified time range. Customer data will always be masked. @@ -89,7 +89,7 @@ def prepare_request(next_link=None): url = self.list_changes_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -121,7 +121,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) @@ -137,7 +137,7 @@ def list_changes_by_subscription( start_time: datetime.datetime, end_time: datetime.datetime, skip_token: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ChangeList"]: """List the changes of a subscription within the specified time range. Customer data will always be masked. @@ -207,7 +207,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/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/operations/_operations.py b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/operations/_operations.py index 2c46b20f74a6..59ad6d011ad1 100644 --- a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/operations/_operations.py +++ b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/operations/_operations.py @@ -44,7 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, skip_token: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ResourceProviderOperationList"]: """Lists all the supported operations by the Microsoft.ChangeAnalysis resource provider along with their descriptions. @@ -104,7 +104,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/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/operations/_resource_changes_operations.py b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/operations/_resource_changes_operations.py index 96944ce0b6f0..eaa9d796bca8 100644 --- a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/operations/_resource_changes_operations.py +++ b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/operations/_resource_changes_operations.py @@ -48,7 +48,7 @@ def list( start_time: datetime.datetime, end_time: datetime.datetime, skip_token: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ChangeList"]: """List the changes of a resource within the specified time range. Customer data will be masked if the user doesn't have access. @@ -120,7 +120,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/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/models/_models.py b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/models/_models.py index 67a7aa6f19d0..5d716cbbd88c 100644 --- a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/models/_models.py +++ b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/models/_models.py @@ -47,7 +47,41 @@ def __init__( self.type = None -class Change(Resource): +class ProxyResource(Resource): + """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + """ + + _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'}, + } + + def __init__( + self, + **kwargs + ): + super(ProxyResource, self).__init__(**kwargs) + + +class Change(ProxyResource): """The detected change. Variables are only populated by the server, and will be ignored when sending a request. @@ -152,7 +186,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model): :ivar type: The additional info type. :vartype type: str :ivar info: The additional info. - :vartype info: object + :vartype info: any """ _validation = { @@ -292,40 +326,6 @@ def __init__( self.is_data_masked = kwargs.get('is_data_masked', None) -class ProxyResource(Resource): - """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - """ - - _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'}, - } - - def __init__( - self, - **kwargs - ): - super(ProxyResource, self).__init__(**kwargs) - - class ResourceProviderOperationDefinition(msrest.serialization.Model): """The resource provider operation definition. diff --git a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/models/_models_py3.py b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/models/_models_py3.py index e472276a1689..7f65ab31ce54 100644 --- a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/models/_models_py3.py +++ b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/models/_models_py3.py @@ -52,7 +52,41 @@ def __init__( self.type = None -class Change(Resource): +class ProxyResource(Resource): + """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + """ + + _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'}, + } + + def __init__( + self, + **kwargs + ): + super(ProxyResource, self).__init__(**kwargs) + + +class Change(ProxyResource): """The detected change. Variables are only populated by the server, and will be ignored when sending a request. @@ -168,7 +202,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model): :ivar type: The additional info type. :vartype type: str :ivar info: The additional info. - :vartype info: object + :vartype info: any """ _validation = { @@ -320,40 +354,6 @@ def __init__( self.is_data_masked = is_data_masked -class ProxyResource(Resource): - """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - """ - - _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'}, - } - - def __init__( - self, - **kwargs - ): - super(ProxyResource, self).__init__(**kwargs) - - class ResourceProviderOperationDefinition(msrest.serialization.Model): """The resource provider operation definition. diff --git a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/operations/_changes_operations.py b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/operations/_changes_operations.py index e68df8044032..23ac8728037f 100644 --- a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/operations/_changes_operations.py +++ b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/operations/_changes_operations.py @@ -94,7 +94,7 @@ def prepare_request(next_link=None): url = self.list_changes_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -126,7 +126,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) @@ -213,7 +213,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/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/operations/_operations.py b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/operations/_operations.py index 119f3e6d2f91..56a6091e2e48 100644 --- a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/operations/_operations.py +++ b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/operations/_operations.py @@ -109,7 +109,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/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/operations/_resource_changes_operations.py b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/operations/_resource_changes_operations.py index 357cbe97225a..0021cb1b1fb0 100644 --- a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/operations/_resource_changes_operations.py +++ b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/operations/_resource_changes_operations.py @@ -125,7 +125,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)