From fc6a51de9d83565c3463691ed671a1694917fa89 Mon Sep 17 00:00:00 2001 From: Azure CLI Bot Date: Wed, 19 May 2021 11:34:25 +0800 Subject: [PATCH] [AutoRelease] t2-digitaltwins-2021-05-18-25594(wave4) (#18786) * CodeGen from PR 14269 in Azure/azure-rest-api-specs digitaltwins track2 config (#14269) * digitaltwins config * second * Update readme.python.md Co-authored-by: Yan Zhang (WICRESOFT NORTH AMERICA LTD) Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> * version,CHANGELOG * changelog config Co-authored-by: SDKAuto Co-authored-by: Yan Zhang (WICRESOFT NORTH AMERICA LTD) Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> Co-authored-by: PythonSdkPipelines Co-authored-by: Zed Lei <59104634+RAY-316@users.noreply.github.com> Co-authored-by: Zed <601306339@qq.com> --- .../azure-mgmt-digitaltwins/CHANGELOG.md | 4 + .../azure-mgmt-digitaltwins/MANIFEST.in | 1 + .../azure-mgmt-digitaltwins/_meta.json | 8 + .../_azure_digital_twins_management_client.py | 26 +++- .../azure/mgmt/digitaltwins/_configuration.py | 7 +- .../azure/mgmt/digitaltwins/_version.py | 2 +- .../_azure_digital_twins_management_client.py | 28 ++-- .../mgmt/digitaltwins/aio/_configuration.py | 9 +- .../_azure_digital_twins_management_client.py | 26 +++- .../v2020_03_01_preview/_metadata.json | 62 ++++++-- .../v2020_03_01_preview/_version.py | 10 +- .../_azure_digital_twins_management_client.py | 25 +++- .../_digital_twins_endpoint_operations.py | 26 ++-- .../operations/_digital_twins_operations.py | 46 +++--- .../aio/operations/_operations.py | 6 +- .../v2020_03_01_preview/models/_models.py | 47 +++--- .../v2020_03_01_preview/models/_models_py3.py | 47 +++--- .../_digital_twins_endpoint_operations.py | 26 ++-- .../operations/_digital_twins_operations.py | 46 +++--- .../operations/_operations.py | 6 +- .../_azure_digital_twins_management_client.py | 26 +++- .../digitaltwins/v2020_10_31/_metadata.json | 62 ++++++-- .../mgmt/digitaltwins/v2020_10_31/_version.py | 10 +- .../_azure_digital_twins_management_client.py | 25 +++- .../_digital_twins_endpoint_operations.py | 28 ++-- .../operations/_digital_twins_operations.py | 44 +++--- .../v2020_10_31/aio/operations/_operations.py | 6 +- .../v2020_10_31/models/_models.py | 40 ++--- .../v2020_10_31/models/_models_py3.py | 40 ++--- .../_digital_twins_endpoint_operations.py | 28 ++-- .../operations/_digital_twins_operations.py | 44 +++--- .../v2020_10_31/operations/_operations.py | 6 +- .../_azure_digital_twins_management_client.py | 30 +++- .../digitaltwins/v2020_12_01/_metadata.json | 62 ++++++-- .../mgmt/digitaltwins/v2020_12_01/_version.py | 10 +- .../_azure_digital_twins_management_client.py | 29 +++- .../_digital_twins_endpoint_operations.py | 28 ++-- .../operations/_digital_twins_operations.py | 48 +++--- .../v2020_12_01/aio/operations/_operations.py | 6 +- ...private_endpoint_connections_operations.py | 26 ++-- .../_private_link_resources_operations.py | 10 +- .../v2020_12_01/models/_models.py | 128 +++++++++------- .../v2020_12_01/models/_models_py3.py | 140 ++++++++++-------- .../_digital_twins_endpoint_operations.py | 28 ++-- .../operations/_digital_twins_operations.py | 48 +++--- .../v2020_12_01/operations/_operations.py | 6 +- ...private_endpoint_connections_operations.py | 26 ++-- .../_private_link_resources_operations.py | 10 +- .../azure-mgmt-digitaltwins/setup.py | 2 +- shared_requirements.txt | 2 + 50 files changed, 895 insertions(+), 561 deletions(-) create mode 100644 sdk/digitaltwins/azure-mgmt-digitaltwins/_meta.json diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/CHANGELOG.md b/sdk/digitaltwins/azure-mgmt-digitaltwins/CHANGELOG.md index d30326757154..dffd92460b40 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/CHANGELOG.md +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History +## 6.0.0 (2021-05-18) + +- GA release + ## 6.0.0b2 (2021-02-26) * Fix version problem. diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/MANIFEST.in b/sdk/digitaltwins/azure-mgmt-digitaltwins/MANIFEST.in index a3cb07df8765..3a9b6517412b 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/MANIFEST.in +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/_meta.json b/sdk/digitaltwins/azure-mgmt-digitaltwins/_meta.json new file mode 100644 index 000000000000..3cc3ba4e250e --- /dev/null +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/_meta.json @@ -0,0 +1,8 @@ +{ + "autorest": "3.3.0", + "use": "@autorest/python@5.6.6", + "commit": "dda51a4bf761a7e9e22c9085623f6201910f5efd", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/digitaltwins/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/digitaltwins/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/_azure_digital_twins_management_client.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/_azure_digital_twins_management_client.py index 9072a50f4bee..e3ece9f6d5a5 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/_azure_digital_twins_management_client.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/_azure_digital_twins_management_client.py @@ -9,13 +9,22 @@ # regenerated. # -------------------------------------------------------------------------- -from azure.mgmt.core import ARMPipelineClient -from msrest import Serializer, Deserializer +from typing import TYPE_CHECKING +from azure.mgmt.core import ARMPipelineClient from azure.profiles import KnownProfiles, ProfileDefinition from azure.profiles.multiapiclient import MultiApiClientMixin +from msrest import Deserializer, Serializer + from ._configuration import AzureDigitalTwinsManagementClientConfiguration +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse + class _SDKClient(object): def __init__(self, *args, **kwargs): """This is a fake class to support current implemetation of MultiApiClientMixin." @@ -38,9 +47,10 @@ class AzureDigitalTwinsManagementClient(MultiApiClientMixin, _SDKClient): :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The subscription identifier. :type subscription_id: str - :param str api_version: API version to use if no profile is provided, or if - missing in profile. - :param str base_url: Service URL + :param api_version: API version to use if no profile is provided, or if missing in profile. + :type api_version: str + :param base_url: Service URL + :type base_url: str :param profile: A profile definition, from KnownProfiles to dict. :type profile: azure.profiles.KnownProfiles :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. @@ -59,9 +69,9 @@ def __init__( self, credential, # type: "TokenCredential" subscription_id, # type: str - api_version=None, - base_url=None, - profile=KnownProfiles.default, + api_version=None, # type: Optional[str] + base_url=None, # type: Optional[str] + profile=KnownProfiles.default, # type: KnownProfiles **kwargs # type: Any ): if not base_url: diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/_configuration.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/_configuration.py index 3484babacaeb..1c0621877786 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/_configuration.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/_configuration.py @@ -8,7 +8,7 @@ # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- -from typing import Any +from typing import TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import policies @@ -16,6 +16,11 @@ from ._version import VERSION +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential class AzureDigitalTwinsManagementClientConfiguration(Configuration): """Configuration for AzureDigitalTwinsManagementClient. diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/_version.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/_version.py index eb995b3fdcdc..37725706ef72 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/_version.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/_version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0b2" +VERSION = "6.0.0" diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/aio/_azure_digital_twins_management_client.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/aio/_azure_digital_twins_management_client.py index d6ce4dd7e37f..06ff20c0e7c8 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/aio/_azure_digital_twins_management_client.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/aio/_azure_digital_twins_management_client.py @@ -9,13 +9,20 @@ # regenerated. # -------------------------------------------------------------------------- -from azure.mgmt.core import AsyncARMPipelineClient -from msrest import Serializer, Deserializer +from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient from azure.profiles import KnownProfiles, ProfileDefinition from azure.profiles.multiapiclient import MultiApiClientMixin +from msrest import Deserializer, Serializer + from ._configuration import AzureDigitalTwinsManagementClientConfiguration +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + class _SDKClient(object): def __init__(self, *args, **kwargs): """This is a fake class to support current implemetation of MultiApiClientMixin." @@ -38,9 +45,10 @@ class AzureDigitalTwinsManagementClient(MultiApiClientMixin, _SDKClient): :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The subscription identifier. :type subscription_id: str - :param str api_version: API version to use if no profile is provided, or if - missing in profile. - :param str base_url: Service URL + :param api_version: API version to use if no profile is provided, or if missing in profile. + :type api_version: str + :param base_url: Service URL + :type base_url: str :param profile: A profile definition, from KnownProfiles to dict. :type profile: azure.profiles.KnownProfiles :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. @@ -57,11 +65,11 @@ class AzureDigitalTwinsManagementClient(MultiApiClientMixin, _SDKClient): def __init__( self, - credential, # type: "AsyncTokenCredential" - subscription_id, # type: str - api_version=None, - base_url=None, - profile=KnownProfiles.default, + credential: "AsyncTokenCredential", + subscription_id: str, + api_version: Optional[str] = None, + base_url: Optional[str] = None, + profile: KnownProfiles = KnownProfiles.default, **kwargs # type: Any ) -> None: if not base_url: diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/aio/_configuration.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/aio/_configuration.py index ff7ee4e741b1..b483b4b5fbf7 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/aio/_configuration.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/aio/_configuration.py @@ -8,7 +8,7 @@ # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- -from typing import Any +from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import policies @@ -16,6 +16,9 @@ from .._version import VERSION +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential class AzureDigitalTwinsManagementClientConfiguration(Configuration): """Configuration for AzureDigitalTwinsManagementClient. @@ -31,8 +34,8 @@ class AzureDigitalTwinsManagementClientConfiguration(Configuration): def __init__( self, - credential, # type: "AsyncTokenCredential" - subscription_id, # type: str + credential: "AsyncTokenCredential", + subscription_id: str, **kwargs # type: Any ) -> None: if credential is None: diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/_azure_digital_twins_management_client.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/_azure_digital_twins_management_client.py index 8e4ec6576d4c..bdccb7f8328a 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/_azure_digital_twins_management_client.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/_azure_digital_twins_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 AzureDigitalTwinsManagementClientConfiguration from .operations import DigitalTwinsOperations @@ -28,11 +29,11 @@ class AzureDigitalTwinsManagementClient(object): """Azure Digital Twins Client for managing DigitalTwinsInstance. :ivar digital_twins: DigitalTwinsOperations operations - :vartype digital_twins: azure.mgmt.digitaltwins.operations.DigitalTwinsOperations + :vartype digital_twins: azure.mgmt.digitaltwins.v2020_03_01_preview.operations.DigitalTwinsOperations :ivar digital_twins_endpoint: DigitalTwinsEndpointOperations operations - :vartype digital_twins_endpoint: azure.mgmt.digitaltwins.operations.DigitalTwinsEndpointOperations + :vartype digital_twins_endpoint: azure.mgmt.digitaltwins.v2020_03_01_preview.operations.DigitalTwinsEndpointOperations :ivar operations: Operations operations - :vartype operations: azure.mgmt.digitaltwins.operations.Operations + :vartype operations: azure.mgmt.digitaltwins.v2020_03_01_preview.operations.Operations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The subscription identifier. @@ -56,6 +57,7 @@ def __init__( client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.digital_twins = DigitalTwinsOperations( @@ -65,6 +67,24 @@ def __init__( self.operations = Operations( 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'), + } + 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/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/_metadata.json b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/_metadata.json index 08248c557e7f..8badd3e0d518 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/_metadata.json +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": true, - "client_side_validation": true + "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\": [\"AzureDigitalTwinsManagementClientConfiguration\"]}}, \"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\": [\"AzureDigitalTwinsManagementClientConfiguration\"]}}, \"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 subscription identifier.", "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": { "digital_twins": "DigitalTwinsOperations", "digital_twins_endpoint": "DigitalTwinsEndpointOperations", "operations": "Operations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/_version.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/_version.py index eb995b3fdcdc..caf312bd2d0b 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/_version.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/_version.py @@ -1,13 +1,9 @@ # 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. -# +# 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. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0b2" - +VERSION = "6.0.0" diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/aio/_azure_digital_twins_management_client.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/aio/_azure_digital_twins_management_client.py index 4f21cc15db26..4a3a95dcbc73 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/aio/_azure_digital_twins_management_client.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/aio/_azure_digital_twins_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 @@ -26,11 +27,11 @@ class AzureDigitalTwinsManagementClient(object): """Azure Digital Twins Client for managing DigitalTwinsInstance. :ivar digital_twins: DigitalTwinsOperations operations - :vartype digital_twins: azure.mgmt.digitaltwins.aio.operations.DigitalTwinsOperations + :vartype digital_twins: azure.mgmt.digitaltwins.v2020_03_01_preview.aio.operations.DigitalTwinsOperations :ivar digital_twins_endpoint: DigitalTwinsEndpointOperations operations - :vartype digital_twins_endpoint: azure.mgmt.digitaltwins.aio.operations.DigitalTwinsEndpointOperations + :vartype digital_twins_endpoint: azure.mgmt.digitaltwins.v2020_03_01_preview.aio.operations.DigitalTwinsEndpointOperations :ivar operations: Operations operations - :vartype operations: azure.mgmt.digitaltwins.aio.operations.Operations + :vartype operations: azure.mgmt.digitaltwins.v2020_03_01_preview.aio.operations.Operations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The subscription identifier. @@ -53,6 +54,7 @@ def __init__( client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.digital_twins = DigitalTwinsOperations( @@ -62,6 +64,23 @@ def __init__( self.operations = Operations( 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'), + } + 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/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/aio/operations/_digital_twins_endpoint_operations.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/aio/operations/_digital_twins_endpoint_operations.py index fa52375cc424..daefc2b6909b 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/aio/operations/_digital_twins_endpoint_operations.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/aio/operations/_digital_twins_endpoint_operations.py @@ -28,7 +28,7 @@ class DigitalTwinsEndpointOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.digitaltwins.models + :type models: ~azure.mgmt.digitaltwins.v2020_03_01_preview.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -58,7 +58,7 @@ def list( :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DigitalTwinsEndpointResourceListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResourceListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.digitaltwins.v2020_03_01_preview.models.DigitalTwinsEndpointResourceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DigitalTwinsEndpointResourceListResult"] @@ -108,7 +108,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 @@ async def get( :type endpoint_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DigitalTwinsEndpointResource, or the result of cls(response) - :rtype: ~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResource + :rtype: ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.DigitalTwinsEndpointResource :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DigitalTwinsEndpointResource"] @@ -172,7 +172,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('DigitalTwinsEndpointResource', pipeline_response) @@ -228,7 +228,7 @@ async def _create_or_update_initial( 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,15 +261,15 @@ async def begin_create_or_update( :param endpoint_name: Name of Endpoint Resource. :type endpoint_name: str :param endpoint_description: The DigitalTwinsInstance endpoint metadata and security metadata. - :type endpoint_description: ~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResource + :type endpoint_description: ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.DigitalTwinsEndpointResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either DigitalTwinsEndpointResource or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResource] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.digitaltwins.v2020_03_01_preview.models.DigitalTwinsEndpointResource] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -359,7 +359,7 @@ async def _delete_initial( if response.status_code not in [200, 202, 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) deserialized = None @@ -390,8 +390,8 @@ async def begin_delete( :type endpoint_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/aio/operations/_digital_twins_operations.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/aio/operations/_digital_twins_operations.py index 97b8b5b5f349..ad10fc1251df 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/aio/operations/_digital_twins_operations.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/aio/operations/_digital_twins_operations.py @@ -28,7 +28,7 @@ class DigitalTwinsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.digitaltwins.models + :type models: ~azure.mgmt.digitaltwins.v2020_03_01_preview.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -58,7 +58,7 @@ async def get( :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DigitalTwinsDescription, or the result of cls(response) - :rtype: ~azure.mgmt.digitaltwins.models.DigitalTwinsDescription + :rtype: ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.DigitalTwinsDescription :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DigitalTwinsDescription"] @@ -92,7 +92,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('DigitalTwinsDescription', pipeline_response) @@ -146,7 +146,7 @@ async def _create_or_update_initial( 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: @@ -178,15 +178,15 @@ async def begin_create_or_update( :param resource_name: The name of the DigitalTwinsInstance. :type resource_name: str :param digital_twins_create: The DigitalTwinsInstance and security metadata. - :type digital_twins_create: ~azure.mgmt.digitaltwins.models.DigitalTwinsDescription + :type digital_twins_create: ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.DigitalTwinsDescription :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either DigitalTwinsDescription or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.digitaltwins.models.DigitalTwinsDescription] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.digitaltwins.v2020_03_01_preview.models.DigitalTwinsDescription] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -278,7 +278,7 @@ async def _update_initial( 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) deserialized = None @@ -306,15 +306,15 @@ async def begin_update( :param resource_name: The name of the DigitalTwinsInstance. :type resource_name: str :param digital_twins_patch_description: The DigitalTwinsInstance and security metadata. - :type digital_twins_patch_description: ~azure.mgmt.digitaltwins.models.DigitalTwinsPatchDescription + :type digital_twins_patch_description: ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.DigitalTwinsPatchDescription :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either DigitalTwinsDescription or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.digitaltwins.models.DigitalTwinsDescription] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.digitaltwins.v2020_03_01_preview.models.DigitalTwinsDescription] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -400,7 +400,7 @@ async def _delete_initial( if response.status_code not in [200, 202, 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) deserialized = None @@ -428,8 +428,8 @@ async def begin_delete( :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -489,7 +489,7 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DigitalTwinsDescriptionListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.digitaltwins.models.DigitalTwinsDescriptionListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.digitaltwins.v2020_03_01_preview.models.DigitalTwinsDescriptionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DigitalTwinsDescriptionListResult"] @@ -537,7 +537,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) @@ -560,7 +560,7 @@ def list_by_resource_group( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DigitalTwinsDescriptionListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.digitaltwins.models.DigitalTwinsDescriptionListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.digitaltwins.v2020_03_01_preview.models.DigitalTwinsDescriptionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DigitalTwinsDescriptionListResult"] @@ -609,7 +609,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) @@ -632,10 +632,10 @@ async def check_name_availability( :type location: str :param digital_twins_instance_check_name: Set the name parameter in the DigitalTwinsInstanceCheckName structure to the name of the DigitalTwinsInstance to check. - :type digital_twins_instance_check_name: ~azure.mgmt.digitaltwins.models.CheckNameRequest + :type digital_twins_instance_check_name: ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.CheckNameRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: CheckNameResult, or the result of cls(response) - :rtype: ~azure.mgmt.digitaltwins.models.CheckNameResult + :rtype: ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.CheckNameResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameResult"] @@ -673,7 +673,7 @@ async def check_name_availability( 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('CheckNameResult', pipeline_response) diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/aio/operations/_operations.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/aio/operations/_operations.py index 71561d54f3bf..2d7e526dea69 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/aio/operations/_operations.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/aio/operations/_operations.py @@ -26,7 +26,7 @@ class Operations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.digitaltwins.models + :type models: ~azure.mgmt.digitaltwins.v2020_03_01_preview.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -49,7 +49,7 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OperationListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.digitaltwins.models.OperationListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.digitaltwins.v2020_03_01_preview.models.OperationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] @@ -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/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/models/_models.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/models/_models.py index 0e301516c480..d39a92c25bb2 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/models/_models.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/models/_models.py @@ -57,7 +57,7 @@ class CheckNameResult(msrest.serialization.Model): :type message: str :param reason: Message providing the reason why the given name is invalid. Possible values include: "Invalid", "AlreadyExists". - :type reason: str or ~azure.mgmt.digitaltwins.models.Reason + :type reason: str or ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.Reason """ _attribute_map = { @@ -96,7 +96,7 @@ class DigitalTwinsResource(msrest.serialization.Model): :param tags: A set of tags. The resource tags. :type tags: dict[str, str] :param sku: This property is reserved for future use, and will be ignored/omitted. - :type sku: ~azure.mgmt.digitaltwins.models.DigitalTwinsSkuInfo + :type sku: ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.DigitalTwinsSkuInfo """ _validation = { @@ -146,14 +146,15 @@ class DigitalTwinsDescription(DigitalTwinsResource): :param tags: A set of tags. The resource tags. :type tags: dict[str, str] :param sku: This property is reserved for future use, and will be ignored/omitted. - :type sku: ~azure.mgmt.digitaltwins.models.DigitalTwinsSkuInfo + :type sku: ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.DigitalTwinsSkuInfo :ivar created_time: Time when DigitalTwinsInstance was created. :vartype created_time: ~datetime.datetime :ivar last_updated_time: Time when DigitalTwinsInstance was created. :vartype last_updated_time: ~datetime.datetime :ivar provisioning_state: The provisioning state. Possible values include: "Provisioning", "Deleting", "Succeeded", "Failed", "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.digitaltwins.models.ProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.ProvisioningState :ivar host_name: Api endpoint to work with DigitalTwinsInstance. :vartype host_name: str """ @@ -199,7 +200,7 @@ class DigitalTwinsDescriptionListResult(msrest.serialization.Model): :param next_link: The link used to get the next page of DigitalTwins description objects. :type next_link: str :param value: A list of DigitalTwins description objects. - :type value: list[~azure.mgmt.digitaltwins.models.DigitalTwinsDescription] + :type value: list[~azure.mgmt.digitaltwins.v2020_03_01_preview.models.DigitalTwinsDescription] """ _attribute_map = { @@ -263,7 +264,8 @@ class DigitalTwinsEndpointResource(ExternalResource): :ivar type: The resource type. :vartype type: str :param properties: DigitalTwinsInstance endpoint resource properties. - :type properties: ~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResourceProperties + :type properties: + ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.DigitalTwinsEndpointResourceProperties """ _validation = { @@ -293,7 +295,8 @@ class DigitalTwinsEndpointResourceListResult(msrest.serialization.Model): :param next_link: The link used to get the next page of DigitalTwinsInstance Endpoints. :type next_link: str :param value: A list of DigitalTwinsInstance Endpoints. - :type value: list[~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResource] + :type value: + list[~azure.mgmt.digitaltwins.v2020_03_01_preview.models.DigitalTwinsEndpointResource] """ _attribute_map = { @@ -322,10 +325,11 @@ class DigitalTwinsEndpointResourceProperties(msrest.serialization.Model): :param endpoint_type: Required. The type of Digital Twins endpoint.Constant filled by server. Possible values include: "EventHub", "EventGrid", "ServiceBus". - :type endpoint_type: str or ~azure.mgmt.digitaltwins.models.EndpointType + :type endpoint_type: str or ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.EndpointType :ivar provisioning_state: The provisioning state. Possible values include: "Provisioning", "Deleting", "Succeeded", "Failed", "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.digitaltwins.models.EndpointProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.EndpointProvisioningState :ivar created_time: Time when the Endpoint was added to DigitalTwinsInstance. :vartype created_time: ~datetime.datetime :param tags: A set of tags. The resource tags. @@ -385,7 +389,7 @@ class DigitalTwinsSkuInfo(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param name: Required. The name of the SKU. Possible values include: "F1". - :type name: str or ~azure.mgmt.digitaltwins.models.DigitalTwinsSku + :type name: str or ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.DigitalTwinsSku """ _validation = { @@ -414,7 +418,7 @@ class ErrorDefinition(msrest.serialization.Model): :ivar message: Description of the error. :vartype message: str :ivar details: Internal error details. - :vartype details: list[~azure.mgmt.digitaltwins.models.ErrorDefinition] + :vartype details: list[~azure.mgmt.digitaltwins.v2020_03_01_preview.models.ErrorDefinition] """ _validation = { @@ -443,7 +447,7 @@ class ErrorResponse(msrest.serialization.Model): """Error response. :param error: Error description. - :type error: ~azure.mgmt.digitaltwins.models.ErrorDefinition + :type error: ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.ErrorDefinition """ _attribute_map = { @@ -467,10 +471,11 @@ class EventGrid(DigitalTwinsEndpointResourceProperties): :param endpoint_type: Required. The type of Digital Twins endpoint.Constant filled by server. Possible values include: "EventHub", "EventGrid", "ServiceBus". - :type endpoint_type: str or ~azure.mgmt.digitaltwins.models.EndpointType + :type endpoint_type: str or ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.EndpointType :ivar provisioning_state: The provisioning state. Possible values include: "Provisioning", "Deleting", "Succeeded", "Failed", "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.digitaltwins.models.EndpointProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.EndpointProvisioningState :ivar created_time: Time when the Endpoint was added to DigitalTwinsInstance. :vartype created_time: ~datetime.datetime :param tags: A set of tags. The resource tags. @@ -521,10 +526,11 @@ class EventHub(DigitalTwinsEndpointResourceProperties): :param endpoint_type: Required. The type of Digital Twins endpoint.Constant filled by server. Possible values include: "EventHub", "EventGrid", "ServiceBus". - :type endpoint_type: str or ~azure.mgmt.digitaltwins.models.EndpointType + :type endpoint_type: str or ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.EndpointType :ivar provisioning_state: The provisioning state. Possible values include: "Provisioning", "Deleting", "Succeeded", "Failed", "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.digitaltwins.models.EndpointProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.EndpointProvisioningState :ivar created_time: Time when the Endpoint was added to DigitalTwinsInstance. :vartype created_time: ~datetime.datetime :param tags: A set of tags. The resource tags. @@ -572,7 +578,7 @@ class Operation(msrest.serialization.Model): :ivar name: Operation name: {provider}/{resource}/{read | write | action | delete}. :vartype name: str :param display: Operation properties display. - :type display: ~azure.mgmt.digitaltwins.models.OperationDisplay + :type display: ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.OperationDisplay """ _validation = { @@ -642,7 +648,7 @@ class OperationListResult(msrest.serialization.Model): :type next_link: str :ivar value: A list of DigitalTwins operations supported by the Microsoft.DigitalTwins resource provider. - :vartype value: list[~azure.mgmt.digitaltwins.models.Operation] + :vartype value: list[~azure.mgmt.digitaltwins.v2020_03_01_preview.models.Operation] """ _validation = { @@ -672,10 +678,11 @@ class ServiceBus(DigitalTwinsEndpointResourceProperties): :param endpoint_type: Required. The type of Digital Twins endpoint.Constant filled by server. Possible values include: "EventHub", "EventGrid", "ServiceBus". - :type endpoint_type: str or ~azure.mgmt.digitaltwins.models.EndpointType + :type endpoint_type: str or ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.EndpointType :ivar provisioning_state: The provisioning state. Possible values include: "Provisioning", "Deleting", "Succeeded", "Failed", "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.digitaltwins.models.EndpointProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.EndpointProvisioningState :ivar created_time: Time when the Endpoint was added to DigitalTwinsInstance. :vartype created_time: ~datetime.datetime :param tags: A set of tags. The resource tags. diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/models/_models_py3.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/models/_models_py3.py index 0c6171f1c938..8bf217cbf7ac 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/models/_models_py3.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/models/_models_py3.py @@ -63,7 +63,7 @@ class CheckNameResult(msrest.serialization.Model): :type message: str :param reason: Message providing the reason why the given name is invalid. Possible values include: "Invalid", "AlreadyExists". - :type reason: str or ~azure.mgmt.digitaltwins.models.Reason + :type reason: str or ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.Reason """ _attribute_map = { @@ -107,7 +107,7 @@ class DigitalTwinsResource(msrest.serialization.Model): :param tags: A set of tags. The resource tags. :type tags: dict[str, str] :param sku: This property is reserved for future use, and will be ignored/omitted. - :type sku: ~azure.mgmt.digitaltwins.models.DigitalTwinsSkuInfo + :type sku: ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.DigitalTwinsSkuInfo """ _validation = { @@ -161,14 +161,15 @@ class DigitalTwinsDescription(DigitalTwinsResource): :param tags: A set of tags. The resource tags. :type tags: dict[str, str] :param sku: This property is reserved for future use, and will be ignored/omitted. - :type sku: ~azure.mgmt.digitaltwins.models.DigitalTwinsSkuInfo + :type sku: ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.DigitalTwinsSkuInfo :ivar created_time: Time when DigitalTwinsInstance was created. :vartype created_time: ~datetime.datetime :ivar last_updated_time: Time when DigitalTwinsInstance was created. :vartype last_updated_time: ~datetime.datetime :ivar provisioning_state: The provisioning state. Possible values include: "Provisioning", "Deleting", "Succeeded", "Failed", "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.digitaltwins.models.ProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.ProvisioningState :ivar host_name: Api endpoint to work with DigitalTwinsInstance. :vartype host_name: str """ @@ -218,7 +219,7 @@ class DigitalTwinsDescriptionListResult(msrest.serialization.Model): :param next_link: The link used to get the next page of DigitalTwins description objects. :type next_link: str :param value: A list of DigitalTwins description objects. - :type value: list[~azure.mgmt.digitaltwins.models.DigitalTwinsDescription] + :type value: list[~azure.mgmt.digitaltwins.v2020_03_01_preview.models.DigitalTwinsDescription] """ _attribute_map = { @@ -285,7 +286,8 @@ class DigitalTwinsEndpointResource(ExternalResource): :ivar type: The resource type. :vartype type: str :param properties: DigitalTwinsInstance endpoint resource properties. - :type properties: ~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResourceProperties + :type properties: + ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.DigitalTwinsEndpointResourceProperties """ _validation = { @@ -317,7 +319,8 @@ class DigitalTwinsEndpointResourceListResult(msrest.serialization.Model): :param next_link: The link used to get the next page of DigitalTwinsInstance Endpoints. :type next_link: str :param value: A list of DigitalTwinsInstance Endpoints. - :type value: list[~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResource] + :type value: + list[~azure.mgmt.digitaltwins.v2020_03_01_preview.models.DigitalTwinsEndpointResource] """ _attribute_map = { @@ -349,10 +352,11 @@ class DigitalTwinsEndpointResourceProperties(msrest.serialization.Model): :param endpoint_type: Required. The type of Digital Twins endpoint.Constant filled by server. Possible values include: "EventHub", "EventGrid", "ServiceBus". - :type endpoint_type: str or ~azure.mgmt.digitaltwins.models.EndpointType + :type endpoint_type: str or ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.EndpointType :ivar provisioning_state: The provisioning state. Possible values include: "Provisioning", "Deleting", "Succeeded", "Failed", "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.digitaltwins.models.EndpointProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.EndpointProvisioningState :ivar created_time: Time when the Endpoint was added to DigitalTwinsInstance. :vartype created_time: ~datetime.datetime :param tags: A set of tags. The resource tags. @@ -416,7 +420,7 @@ class DigitalTwinsSkuInfo(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param name: Required. The name of the SKU. Possible values include: "F1". - :type name: str or ~azure.mgmt.digitaltwins.models.DigitalTwinsSku + :type name: str or ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.DigitalTwinsSku """ _validation = { @@ -447,7 +451,7 @@ class ErrorDefinition(msrest.serialization.Model): :ivar message: Description of the error. :vartype message: str :ivar details: Internal error details. - :vartype details: list[~azure.mgmt.digitaltwins.models.ErrorDefinition] + :vartype details: list[~azure.mgmt.digitaltwins.v2020_03_01_preview.models.ErrorDefinition] """ _validation = { @@ -476,7 +480,7 @@ class ErrorResponse(msrest.serialization.Model): """Error response. :param error: Error description. - :type error: ~azure.mgmt.digitaltwins.models.ErrorDefinition + :type error: ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.ErrorDefinition """ _attribute_map = { @@ -502,10 +506,11 @@ class EventGrid(DigitalTwinsEndpointResourceProperties): :param endpoint_type: Required. The type of Digital Twins endpoint.Constant filled by server. Possible values include: "EventHub", "EventGrid", "ServiceBus". - :type endpoint_type: str or ~azure.mgmt.digitaltwins.models.EndpointType + :type endpoint_type: str or ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.EndpointType :ivar provisioning_state: The provisioning state. Possible values include: "Provisioning", "Deleting", "Succeeded", "Failed", "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.digitaltwins.models.EndpointProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.EndpointProvisioningState :ivar created_time: Time when the Endpoint was added to DigitalTwinsInstance. :vartype created_time: ~datetime.datetime :param tags: A set of tags. The resource tags. @@ -561,10 +566,11 @@ class EventHub(DigitalTwinsEndpointResourceProperties): :param endpoint_type: Required. The type of Digital Twins endpoint.Constant filled by server. Possible values include: "EventHub", "EventGrid", "ServiceBus". - :type endpoint_type: str or ~azure.mgmt.digitaltwins.models.EndpointType + :type endpoint_type: str or ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.EndpointType :ivar provisioning_state: The provisioning state. Possible values include: "Provisioning", "Deleting", "Succeeded", "Failed", "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.digitaltwins.models.EndpointProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.EndpointProvisioningState :ivar created_time: Time when the Endpoint was added to DigitalTwinsInstance. :vartype created_time: ~datetime.datetime :param tags: A set of tags. The resource tags. @@ -616,7 +622,7 @@ class Operation(msrest.serialization.Model): :ivar name: Operation name: {provider}/{resource}/{read | write | action | delete}. :vartype name: str :param display: Operation properties display. - :type display: ~azure.mgmt.digitaltwins.models.OperationDisplay + :type display: ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.OperationDisplay """ _validation = { @@ -688,7 +694,7 @@ class OperationListResult(msrest.serialization.Model): :type next_link: str :ivar value: A list of DigitalTwins operations supported by the Microsoft.DigitalTwins resource provider. - :vartype value: list[~azure.mgmt.digitaltwins.models.Operation] + :vartype value: list[~azure.mgmt.digitaltwins.v2020_03_01_preview.models.Operation] """ _validation = { @@ -720,10 +726,11 @@ class ServiceBus(DigitalTwinsEndpointResourceProperties): :param endpoint_type: Required. The type of Digital Twins endpoint.Constant filled by server. Possible values include: "EventHub", "EventGrid", "ServiceBus". - :type endpoint_type: str or ~azure.mgmt.digitaltwins.models.EndpointType + :type endpoint_type: str or ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.EndpointType :ivar provisioning_state: The provisioning state. Possible values include: "Provisioning", "Deleting", "Succeeded", "Failed", "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.digitaltwins.models.EndpointProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.EndpointProvisioningState :ivar created_time: Time when the Endpoint was added to DigitalTwinsInstance. :vartype created_time: ~datetime.datetime :param tags: A set of tags. The resource tags. diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/operations/_digital_twins_endpoint_operations.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/operations/_digital_twins_endpoint_operations.py index 0a8928fe1f10..1b0c0e5044fb 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/operations/_digital_twins_endpoint_operations.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/operations/_digital_twins_endpoint_operations.py @@ -32,7 +32,7 @@ class DigitalTwinsEndpointOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.digitaltwins.models + :type models: ~azure.mgmt.digitaltwins.v2020_03_01_preview.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -63,7 +63,7 @@ def list( :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DigitalTwinsEndpointResourceListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResourceListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.digitaltwins.v2020_03_01_preview.models.DigitalTwinsEndpointResourceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DigitalTwinsEndpointResourceListResult"] @@ -113,7 +113,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) @@ -143,7 +143,7 @@ def get( :type endpoint_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DigitalTwinsEndpointResource, or the result of cls(response) - :rtype: ~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResource + :rtype: ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.DigitalTwinsEndpointResource :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DigitalTwinsEndpointResource"] @@ -178,7 +178,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('DigitalTwinsEndpointResource', pipeline_response) @@ -235,7 +235,7 @@ def _create_or_update_initial( 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: @@ -269,15 +269,15 @@ def begin_create_or_update( :param endpoint_name: Name of Endpoint Resource. :type endpoint_name: str :param endpoint_description: The DigitalTwinsInstance endpoint metadata and security metadata. - :type endpoint_description: ~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResource + :type endpoint_description: ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.DigitalTwinsEndpointResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either DigitalTwinsEndpointResource or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResource] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.digitaltwins.v2020_03_01_preview.models.DigitalTwinsEndpointResource] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -368,7 +368,7 @@ def _delete_initial( if response.status_code not in [200, 202, 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) deserialized = None @@ -400,8 +400,8 @@ def begin_delete( :type endpoint_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/operations/_digital_twins_operations.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/operations/_digital_twins_operations.py index 158bfee16cb0..5ef969942d6c 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/operations/_digital_twins_operations.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/operations/_digital_twins_operations.py @@ -32,7 +32,7 @@ class DigitalTwinsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.digitaltwins.models + :type models: ~azure.mgmt.digitaltwins.v2020_03_01_preview.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -63,7 +63,7 @@ def get( :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DigitalTwinsDescription, or the result of cls(response) - :rtype: ~azure.mgmt.digitaltwins.models.DigitalTwinsDescription + :rtype: ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.DigitalTwinsDescription :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DigitalTwinsDescription"] @@ -97,7 +97,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('DigitalTwinsDescription', pipeline_response) @@ -152,7 +152,7 @@ def _create_or_update_initial( 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: @@ -185,15 +185,15 @@ def begin_create_or_update( :param resource_name: The name of the DigitalTwinsInstance. :type resource_name: str :param digital_twins_create: The DigitalTwinsInstance and security metadata. - :type digital_twins_create: ~azure.mgmt.digitaltwins.models.DigitalTwinsDescription + :type digital_twins_create: ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.DigitalTwinsDescription :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either DigitalTwinsDescription or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.digitaltwins.models.DigitalTwinsDescription] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.digitaltwins.v2020_03_01_preview.models.DigitalTwinsDescription] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -286,7 +286,7 @@ def _update_initial( 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) deserialized = None @@ -315,15 +315,15 @@ def begin_update( :param resource_name: The name of the DigitalTwinsInstance. :type resource_name: str :param digital_twins_patch_description: The DigitalTwinsInstance and security metadata. - :type digital_twins_patch_description: ~azure.mgmt.digitaltwins.models.DigitalTwinsPatchDescription + :type digital_twins_patch_description: ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.DigitalTwinsPatchDescription :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either DigitalTwinsDescription or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.digitaltwins.models.DigitalTwinsDescription] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.digitaltwins.v2020_03_01_preview.models.DigitalTwinsDescription] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -410,7 +410,7 @@ def _delete_initial( if response.status_code not in [200, 202, 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) deserialized = None @@ -439,8 +439,8 @@ def begin_delete( :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -501,7 +501,7 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DigitalTwinsDescriptionListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.digitaltwins.models.DigitalTwinsDescriptionListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.digitaltwins.v2020_03_01_preview.models.DigitalTwinsDescriptionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DigitalTwinsDescriptionListResult"] @@ -549,7 +549,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) @@ -573,7 +573,7 @@ def list_by_resource_group( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DigitalTwinsDescriptionListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.digitaltwins.models.DigitalTwinsDescriptionListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.digitaltwins.v2020_03_01_preview.models.DigitalTwinsDescriptionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DigitalTwinsDescriptionListResult"] @@ -622,7 +622,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) @@ -646,10 +646,10 @@ def check_name_availability( :type location: str :param digital_twins_instance_check_name: Set the name parameter in the DigitalTwinsInstanceCheckName structure to the name of the DigitalTwinsInstance to check. - :type digital_twins_instance_check_name: ~azure.mgmt.digitaltwins.models.CheckNameRequest + :type digital_twins_instance_check_name: ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.CheckNameRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: CheckNameResult, or the result of cls(response) - :rtype: ~azure.mgmt.digitaltwins.models.CheckNameResult + :rtype: ~azure.mgmt.digitaltwins.v2020_03_01_preview.models.CheckNameResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameResult"] @@ -687,7 +687,7 @@ def check_name_availability( 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('CheckNameResult', pipeline_response) diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/operations/_operations.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/operations/_operations.py index 991fbf5a1df1..02aeef005b65 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/operations/_operations.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_03_01_preview/operations/_operations.py @@ -30,7 +30,7 @@ class Operations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.digitaltwins.models + :type models: ~azure.mgmt.digitaltwins.v2020_03_01_preview.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -54,7 +54,7 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OperationListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.digitaltwins.models.OperationListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.digitaltwins.v2020_03_01_preview.models.OperationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] @@ -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/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/_azure_digital_twins_management_client.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/_azure_digital_twins_management_client.py index 8e4ec6576d4c..3c8c6016dfee 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/_azure_digital_twins_management_client.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/_azure_digital_twins_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 AzureDigitalTwinsManagementClientConfiguration from .operations import DigitalTwinsOperations @@ -28,11 +29,11 @@ class AzureDigitalTwinsManagementClient(object): """Azure Digital Twins Client for managing DigitalTwinsInstance. :ivar digital_twins: DigitalTwinsOperations operations - :vartype digital_twins: azure.mgmt.digitaltwins.operations.DigitalTwinsOperations + :vartype digital_twins: azure.mgmt.digitaltwins.v2020_10_31.operations.DigitalTwinsOperations :ivar digital_twins_endpoint: DigitalTwinsEndpointOperations operations - :vartype digital_twins_endpoint: azure.mgmt.digitaltwins.operations.DigitalTwinsEndpointOperations + :vartype digital_twins_endpoint: azure.mgmt.digitaltwins.v2020_10_31.operations.DigitalTwinsEndpointOperations :ivar operations: Operations operations - :vartype operations: azure.mgmt.digitaltwins.operations.Operations + :vartype operations: azure.mgmt.digitaltwins.v2020_10_31.operations.Operations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The subscription identifier. @@ -56,6 +57,7 @@ def __init__( client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.digital_twins = DigitalTwinsOperations( @@ -65,6 +67,24 @@ def __init__( self.operations = Operations( 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'), + } + 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/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/_metadata.json b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/_metadata.json index 3945a815a47e..6dcc776b4502 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/_metadata.json +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": true, - "client_side_validation": true + "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\": [\"AzureDigitalTwinsManagementClientConfiguration\"]}}, \"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\": [\"AzureDigitalTwinsManagementClientConfiguration\"]}}, \"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 subscription identifier.", "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": { "digital_twins": "DigitalTwinsOperations", "digital_twins_endpoint": "DigitalTwinsEndpointOperations", "operations": "Operations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/_version.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/_version.py index eb995b3fdcdc..caf312bd2d0b 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/_version.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/_version.py @@ -1,13 +1,9 @@ # 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. -# +# 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. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0b2" - +VERSION = "6.0.0" diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/aio/_azure_digital_twins_management_client.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/aio/_azure_digital_twins_management_client.py index 4f21cc15db26..629dc0a67fe0 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/aio/_azure_digital_twins_management_client.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/aio/_azure_digital_twins_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 @@ -26,11 +27,11 @@ class AzureDigitalTwinsManagementClient(object): """Azure Digital Twins Client for managing DigitalTwinsInstance. :ivar digital_twins: DigitalTwinsOperations operations - :vartype digital_twins: azure.mgmt.digitaltwins.aio.operations.DigitalTwinsOperations + :vartype digital_twins: azure.mgmt.digitaltwins.v2020_10_31.aio.operations.DigitalTwinsOperations :ivar digital_twins_endpoint: DigitalTwinsEndpointOperations operations - :vartype digital_twins_endpoint: azure.mgmt.digitaltwins.aio.operations.DigitalTwinsEndpointOperations + :vartype digital_twins_endpoint: azure.mgmt.digitaltwins.v2020_10_31.aio.operations.DigitalTwinsEndpointOperations :ivar operations: Operations operations - :vartype operations: azure.mgmt.digitaltwins.aio.operations.Operations + :vartype operations: azure.mgmt.digitaltwins.v2020_10_31.aio.operations.Operations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The subscription identifier. @@ -53,6 +54,7 @@ def __init__( client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.digital_twins = DigitalTwinsOperations( @@ -62,6 +64,23 @@ def __init__( self.operations = Operations( 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'), + } + 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/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/aio/operations/_digital_twins_endpoint_operations.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/aio/operations/_digital_twins_endpoint_operations.py index b30768123653..6231d7d26695 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/aio/operations/_digital_twins_endpoint_operations.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/aio/operations/_digital_twins_endpoint_operations.py @@ -28,7 +28,7 @@ class DigitalTwinsEndpointOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.digitaltwins.models + :type models: ~azure.mgmt.digitaltwins.v2020_10_31.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -58,7 +58,7 @@ def list( :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DigitalTwinsEndpointResourceListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResourceListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.digitaltwins.v2020_10_31.models.DigitalTwinsEndpointResourceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DigitalTwinsEndpointResourceListResult"] @@ -108,7 +108,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 @@ async def get( :type endpoint_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DigitalTwinsEndpointResource, or the result of cls(response) - :rtype: ~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResource + :rtype: ~azure.mgmt.digitaltwins.v2020_10_31.models.DigitalTwinsEndpointResource :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DigitalTwinsEndpointResource"] @@ -172,7 +172,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('DigitalTwinsEndpointResource', pipeline_response) @@ -228,7 +228,7 @@ async def _create_or_update_initial( 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,15 +261,15 @@ async def begin_create_or_update( :param endpoint_name: Name of Endpoint Resource. :type endpoint_name: str :param endpoint_description: The DigitalTwinsInstance endpoint metadata and security metadata. - :type endpoint_description: ~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResource + :type endpoint_description: ~azure.mgmt.digitaltwins.v2020_10_31.models.DigitalTwinsEndpointResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either DigitalTwinsEndpointResource or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResource] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.digitaltwins.v2020_10_31.models.DigitalTwinsEndpointResource] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -359,7 +359,7 @@ async def _delete_initial( if response.status_code not in [200, 202, 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) deserialized = None @@ -393,12 +393,12 @@ async def begin_delete( :type endpoint_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either DigitalTwinsEndpointResource or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResource] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.digitaltwins.v2020_10_31.models.DigitalTwinsEndpointResource] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/aio/operations/_digital_twins_operations.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/aio/operations/_digital_twins_operations.py index 7334020e71bd..a889fe75fa91 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/aio/operations/_digital_twins_operations.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/aio/operations/_digital_twins_operations.py @@ -28,7 +28,7 @@ class DigitalTwinsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.digitaltwins.models + :type models: ~azure.mgmt.digitaltwins.v2020_10_31.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -58,7 +58,7 @@ async def get( :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DigitalTwinsDescription, or the result of cls(response) - :rtype: ~azure.mgmt.digitaltwins.models.DigitalTwinsDescription + :rtype: ~azure.mgmt.digitaltwins.v2020_10_31.models.DigitalTwinsDescription :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DigitalTwinsDescription"] @@ -92,7 +92,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('DigitalTwinsDescription', pipeline_response) @@ -146,7 +146,7 @@ async def _create_or_update_initial( 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: @@ -178,15 +178,15 @@ async def begin_create_or_update( :param resource_name: The name of the DigitalTwinsInstance. :type resource_name: str :param digital_twins_create: The DigitalTwinsInstance and security metadata. - :type digital_twins_create: ~azure.mgmt.digitaltwins.models.DigitalTwinsDescription + :type digital_twins_create: ~azure.mgmt.digitaltwins.v2020_10_31.models.DigitalTwinsDescription :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either DigitalTwinsDescription or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.digitaltwins.models.DigitalTwinsDescription] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.digitaltwins.v2020_10_31.models.DigitalTwinsDescription] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -250,10 +250,10 @@ async def update( :param resource_name: The name of the DigitalTwinsInstance. :type resource_name: str :param digital_twins_patch_description: The DigitalTwinsInstance and security metadata. - :type digital_twins_patch_description: ~azure.mgmt.digitaltwins.models.DigitalTwinsPatchDescription + :type digital_twins_patch_description: ~azure.mgmt.digitaltwins.v2020_10_31.models.DigitalTwinsPatchDescription :keyword callable cls: A custom type or function that will be passed the direct response :return: DigitalTwinsDescription, or the result of cls(response) - :rtype: ~azure.mgmt.digitaltwins.models.DigitalTwinsDescription + :rtype: ~azure.mgmt.digitaltwins.v2020_10_31.models.DigitalTwinsDescription :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DigitalTwinsDescription"] @@ -292,7 +292,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('DigitalTwinsDescription', pipeline_response) @@ -340,7 +340,7 @@ async def _delete_initial( if response.status_code not in [200, 202, 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) deserialized = None @@ -371,12 +371,12 @@ async def begin_delete( :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either DigitalTwinsDescription or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.digitaltwins.models.DigitalTwinsDescription] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.digitaltwins.v2020_10_31.models.DigitalTwinsDescription] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -432,7 +432,7 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DigitalTwinsDescriptionListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.digitaltwins.models.DigitalTwinsDescriptionListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.digitaltwins.v2020_10_31.models.DigitalTwinsDescriptionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DigitalTwinsDescriptionListResult"] @@ -480,7 +480,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) @@ -503,7 +503,7 @@ def list_by_resource_group( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DigitalTwinsDescriptionListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.digitaltwins.models.DigitalTwinsDescriptionListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.digitaltwins.v2020_10_31.models.DigitalTwinsDescriptionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DigitalTwinsDescriptionListResult"] @@ -552,7 +552,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) @@ -575,10 +575,10 @@ async def check_name_availability( :type location: str :param digital_twins_instance_check_name: Set the name parameter in the DigitalTwinsInstanceCheckName structure to the name of the DigitalTwinsInstance to check. - :type digital_twins_instance_check_name: ~azure.mgmt.digitaltwins.models.CheckNameRequest + :type digital_twins_instance_check_name: ~azure.mgmt.digitaltwins.v2020_10_31.models.CheckNameRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: CheckNameResult, or the result of cls(response) - :rtype: ~azure.mgmt.digitaltwins.models.CheckNameResult + :rtype: ~azure.mgmt.digitaltwins.v2020_10_31.models.CheckNameResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameResult"] @@ -616,7 +616,7 @@ async def check_name_availability( 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('CheckNameResult', pipeline_response) diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/aio/operations/_operations.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/aio/operations/_operations.py index e4cf1154832c..0b3368f926d1 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/aio/operations/_operations.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/aio/operations/_operations.py @@ -26,7 +26,7 @@ class Operations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.digitaltwins.models + :type models: ~azure.mgmt.digitaltwins.v2020_10_31.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -49,7 +49,7 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OperationListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.digitaltwins.models.OperationListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.digitaltwins.v2020_10_31.models.OperationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] @@ -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/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/models/_models.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/models/_models.py index 52290588ec8c..f4d77e5370ba 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/models/_models.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/models/_models.py @@ -55,7 +55,7 @@ class CheckNameResult(msrest.serialization.Model): :type message: str :param reason: Message providing the reason why the given name is invalid. Possible values include: "Invalid", "AlreadyExists". - :type reason: str or ~azure.mgmt.digitaltwins.models.Reason + :type reason: str or ~azure.mgmt.digitaltwins.v2020_10_31.models.Reason """ _attribute_map = { @@ -144,7 +144,8 @@ class DigitalTwinsDescription(DigitalTwinsResource): :ivar provisioning_state: The provisioning state. Possible values include: "Provisioning", "Deleting", "Succeeded", "Failed", "Canceled", "Deleted", "Warning", "Suspending", "Restoring", "Moving". - :vartype provisioning_state: str or ~azure.mgmt.digitaltwins.models.ProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.digitaltwins.v2020_10_31.models.ProvisioningState :ivar host_name: Api endpoint to work with DigitalTwinsInstance. :vartype host_name: str """ @@ -189,7 +190,7 @@ class DigitalTwinsDescriptionListResult(msrest.serialization.Model): :param next_link: The link used to get the next page of DigitalTwins description objects. :type next_link: str :param value: A list of DigitalTwins description objects. - :type value: list[~azure.mgmt.digitaltwins.models.DigitalTwinsDescription] + :type value: list[~azure.mgmt.digitaltwins.v2020_10_31.models.DigitalTwinsDescription] """ _attribute_map = { @@ -255,7 +256,8 @@ class DigitalTwinsEndpointResource(ExternalResource): :ivar type: The resource type. :vartype type: str :param properties: Required. DigitalTwinsInstance endpoint resource properties. - :type properties: ~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResourceProperties + :type properties: + ~azure.mgmt.digitaltwins.v2020_10_31.models.DigitalTwinsEndpointResourceProperties """ _validation = { @@ -286,7 +288,7 @@ class DigitalTwinsEndpointResourceListResult(msrest.serialization.Model): :param next_link: The link used to get the next page of DigitalTwinsInstance Endpoints. :type next_link: str :param value: A list of DigitalTwinsInstance Endpoints. - :type value: list[~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResource] + :type value: list[~azure.mgmt.digitaltwins.v2020_10_31.models.DigitalTwinsEndpointResource] """ _attribute_map = { @@ -315,11 +317,12 @@ class DigitalTwinsEndpointResourceProperties(msrest.serialization.Model): :param endpoint_type: Required. The type of Digital Twins endpoint.Constant filled by server. Possible values include: "EventHub", "EventGrid", "ServiceBus". - :type endpoint_type: str or ~azure.mgmt.digitaltwins.models.EndpointType + :type endpoint_type: str or ~azure.mgmt.digitaltwins.v2020_10_31.models.EndpointType :ivar provisioning_state: The provisioning state. Possible values include: "Provisioning", "Deleting", "Succeeded", "Failed", "Canceled", "Deleted", "Warning", "Suspending", "Restoring", "Moving", "Disabled". - :vartype provisioning_state: str or ~azure.mgmt.digitaltwins.models.EndpointProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.digitaltwins.v2020_10_31.models.EndpointProvisioningState :ivar created_time: Time when the Endpoint was added to DigitalTwinsInstance. :vartype created_time: ~datetime.datetime :param dead_letter_secret: Dead letter storage secret. Will be obfuscated during read. @@ -383,7 +386,7 @@ class ErrorDefinition(msrest.serialization.Model): :ivar message: Description of the error. :vartype message: str :ivar details: Internal error details. - :vartype details: list[~azure.mgmt.digitaltwins.models.ErrorDefinition] + :vartype details: list[~azure.mgmt.digitaltwins.v2020_10_31.models.ErrorDefinition] """ _validation = { @@ -412,7 +415,7 @@ class ErrorResponse(msrest.serialization.Model): """Error response. :param error: Error description. - :type error: ~azure.mgmt.digitaltwins.models.ErrorDefinition + :type error: ~azure.mgmt.digitaltwins.v2020_10_31.models.ErrorDefinition """ _attribute_map = { @@ -436,11 +439,12 @@ class EventGrid(DigitalTwinsEndpointResourceProperties): :param endpoint_type: Required. The type of Digital Twins endpoint.Constant filled by server. Possible values include: "EventHub", "EventGrid", "ServiceBus". - :type endpoint_type: str or ~azure.mgmt.digitaltwins.models.EndpointType + :type endpoint_type: str or ~azure.mgmt.digitaltwins.v2020_10_31.models.EndpointType :ivar provisioning_state: The provisioning state. Possible values include: "Provisioning", "Deleting", "Succeeded", "Failed", "Canceled", "Deleted", "Warning", "Suspending", "Restoring", "Moving", "Disabled". - :vartype provisioning_state: str or ~azure.mgmt.digitaltwins.models.EndpointProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.digitaltwins.v2020_10_31.models.EndpointProvisioningState :ivar created_time: Time when the Endpoint was added to DigitalTwinsInstance. :vartype created_time: ~datetime.datetime :param dead_letter_secret: Dead letter storage secret. Will be obfuscated during read. @@ -491,11 +495,12 @@ class EventHub(DigitalTwinsEndpointResourceProperties): :param endpoint_type: Required. The type of Digital Twins endpoint.Constant filled by server. Possible values include: "EventHub", "EventGrid", "ServiceBus". - :type endpoint_type: str or ~azure.mgmt.digitaltwins.models.EndpointType + :type endpoint_type: str or ~azure.mgmt.digitaltwins.v2020_10_31.models.EndpointType :ivar provisioning_state: The provisioning state. Possible values include: "Provisioning", "Deleting", "Succeeded", "Failed", "Canceled", "Deleted", "Warning", "Suspending", "Restoring", "Moving", "Disabled". - :vartype provisioning_state: str or ~azure.mgmt.digitaltwins.models.EndpointProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.digitaltwins.v2020_10_31.models.EndpointProvisioningState :ivar created_time: Time when the Endpoint was added to DigitalTwinsInstance. :vartype created_time: ~datetime.datetime :param dead_letter_secret: Dead letter storage secret. Will be obfuscated during read. @@ -542,7 +547,7 @@ class Operation(msrest.serialization.Model): :ivar name: Operation name: {provider}/{resource}/{read | write | action | delete}. :vartype name: str :param display: Operation properties display. - :type display: ~azure.mgmt.digitaltwins.models.OperationDisplay + :type display: ~azure.mgmt.digitaltwins.v2020_10_31.models.OperationDisplay :ivar origin: The intended executor of the operation. :vartype origin: str :ivar is_data_action: If the operation is a data action (for data plane rbac). @@ -622,7 +627,7 @@ class OperationListResult(msrest.serialization.Model): :type next_link: str :ivar value: A list of DigitalTwins operations supported by the Microsoft.DigitalTwins resource provider. - :vartype value: list[~azure.mgmt.digitaltwins.models.Operation] + :vartype value: list[~azure.mgmt.digitaltwins.v2020_10_31.models.Operation] """ _validation = { @@ -652,11 +657,12 @@ class ServiceBus(DigitalTwinsEndpointResourceProperties): :param endpoint_type: Required. The type of Digital Twins endpoint.Constant filled by server. Possible values include: "EventHub", "EventGrid", "ServiceBus". - :type endpoint_type: str or ~azure.mgmt.digitaltwins.models.EndpointType + :type endpoint_type: str or ~azure.mgmt.digitaltwins.v2020_10_31.models.EndpointType :ivar provisioning_state: The provisioning state. Possible values include: "Provisioning", "Deleting", "Succeeded", "Failed", "Canceled", "Deleted", "Warning", "Suspending", "Restoring", "Moving", "Disabled". - :vartype provisioning_state: str or ~azure.mgmt.digitaltwins.models.EndpointProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.digitaltwins.v2020_10_31.models.EndpointProvisioningState :ivar created_time: Time when the Endpoint was added to DigitalTwinsInstance. :vartype created_time: ~datetime.datetime :param dead_letter_secret: Dead letter storage secret. Will be obfuscated during read. diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/models/_models_py3.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/models/_models_py3.py index cc2fd2a15292..974e52023390 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/models/_models_py3.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/models/_models_py3.py @@ -61,7 +61,7 @@ class CheckNameResult(msrest.serialization.Model): :type message: str :param reason: Message providing the reason why the given name is invalid. Possible values include: "Invalid", "AlreadyExists". - :type reason: str or ~azure.mgmt.digitaltwins.models.Reason + :type reason: str or ~azure.mgmt.digitaltwins.v2020_10_31.models.Reason """ _attribute_map = { @@ -157,7 +157,8 @@ class DigitalTwinsDescription(DigitalTwinsResource): :ivar provisioning_state: The provisioning state. Possible values include: "Provisioning", "Deleting", "Succeeded", "Failed", "Canceled", "Deleted", "Warning", "Suspending", "Restoring", "Moving". - :vartype provisioning_state: str or ~azure.mgmt.digitaltwins.models.ProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.digitaltwins.v2020_10_31.models.ProvisioningState :ivar host_name: Api endpoint to work with DigitalTwinsInstance. :vartype host_name: str """ @@ -205,7 +206,7 @@ class DigitalTwinsDescriptionListResult(msrest.serialization.Model): :param next_link: The link used to get the next page of DigitalTwins description objects. :type next_link: str :param value: A list of DigitalTwins description objects. - :type value: list[~azure.mgmt.digitaltwins.models.DigitalTwinsDescription] + :type value: list[~azure.mgmt.digitaltwins.v2020_10_31.models.DigitalTwinsDescription] """ _attribute_map = { @@ -274,7 +275,8 @@ class DigitalTwinsEndpointResource(ExternalResource): :ivar type: The resource type. :vartype type: str :param properties: Required. DigitalTwinsInstance endpoint resource properties. - :type properties: ~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResourceProperties + :type properties: + ~azure.mgmt.digitaltwins.v2020_10_31.models.DigitalTwinsEndpointResourceProperties """ _validation = { @@ -307,7 +309,7 @@ class DigitalTwinsEndpointResourceListResult(msrest.serialization.Model): :param next_link: The link used to get the next page of DigitalTwinsInstance Endpoints. :type next_link: str :param value: A list of DigitalTwinsInstance Endpoints. - :type value: list[~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResource] + :type value: list[~azure.mgmt.digitaltwins.v2020_10_31.models.DigitalTwinsEndpointResource] """ _attribute_map = { @@ -339,11 +341,12 @@ class DigitalTwinsEndpointResourceProperties(msrest.serialization.Model): :param endpoint_type: Required. The type of Digital Twins endpoint.Constant filled by server. Possible values include: "EventHub", "EventGrid", "ServiceBus". - :type endpoint_type: str or ~azure.mgmt.digitaltwins.models.EndpointType + :type endpoint_type: str or ~azure.mgmt.digitaltwins.v2020_10_31.models.EndpointType :ivar provisioning_state: The provisioning state. Possible values include: "Provisioning", "Deleting", "Succeeded", "Failed", "Canceled", "Deleted", "Warning", "Suspending", "Restoring", "Moving", "Disabled". - :vartype provisioning_state: str or ~azure.mgmt.digitaltwins.models.EndpointProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.digitaltwins.v2020_10_31.models.EndpointProvisioningState :ivar created_time: Time when the Endpoint was added to DigitalTwinsInstance. :vartype created_time: ~datetime.datetime :param dead_letter_secret: Dead letter storage secret. Will be obfuscated during read. @@ -411,7 +414,7 @@ class ErrorDefinition(msrest.serialization.Model): :ivar message: Description of the error. :vartype message: str :ivar details: Internal error details. - :vartype details: list[~azure.mgmt.digitaltwins.models.ErrorDefinition] + :vartype details: list[~azure.mgmt.digitaltwins.v2020_10_31.models.ErrorDefinition] """ _validation = { @@ -440,7 +443,7 @@ class ErrorResponse(msrest.serialization.Model): """Error response. :param error: Error description. - :type error: ~azure.mgmt.digitaltwins.models.ErrorDefinition + :type error: ~azure.mgmt.digitaltwins.v2020_10_31.models.ErrorDefinition """ _attribute_map = { @@ -466,11 +469,12 @@ class EventGrid(DigitalTwinsEndpointResourceProperties): :param endpoint_type: Required. The type of Digital Twins endpoint.Constant filled by server. Possible values include: "EventHub", "EventGrid", "ServiceBus". - :type endpoint_type: str or ~azure.mgmt.digitaltwins.models.EndpointType + :type endpoint_type: str or ~azure.mgmt.digitaltwins.v2020_10_31.models.EndpointType :ivar provisioning_state: The provisioning state. Possible values include: "Provisioning", "Deleting", "Succeeded", "Failed", "Canceled", "Deleted", "Warning", "Suspending", "Restoring", "Moving", "Disabled". - :vartype provisioning_state: str or ~azure.mgmt.digitaltwins.models.EndpointProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.digitaltwins.v2020_10_31.models.EndpointProvisioningState :ivar created_time: Time when the Endpoint was added to DigitalTwinsInstance. :vartype created_time: ~datetime.datetime :param dead_letter_secret: Dead letter storage secret. Will be obfuscated during read. @@ -526,11 +530,12 @@ class EventHub(DigitalTwinsEndpointResourceProperties): :param endpoint_type: Required. The type of Digital Twins endpoint.Constant filled by server. Possible values include: "EventHub", "EventGrid", "ServiceBus". - :type endpoint_type: str or ~azure.mgmt.digitaltwins.models.EndpointType + :type endpoint_type: str or ~azure.mgmt.digitaltwins.v2020_10_31.models.EndpointType :ivar provisioning_state: The provisioning state. Possible values include: "Provisioning", "Deleting", "Succeeded", "Failed", "Canceled", "Deleted", "Warning", "Suspending", "Restoring", "Moving", "Disabled". - :vartype provisioning_state: str or ~azure.mgmt.digitaltwins.models.EndpointProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.digitaltwins.v2020_10_31.models.EndpointProvisioningState :ivar created_time: Time when the Endpoint was added to DigitalTwinsInstance. :vartype created_time: ~datetime.datetime :param dead_letter_secret: Dead letter storage secret. Will be obfuscated during read. @@ -581,7 +586,7 @@ class Operation(msrest.serialization.Model): :ivar name: Operation name: {provider}/{resource}/{read | write | action | delete}. :vartype name: str :param display: Operation properties display. - :type display: ~azure.mgmt.digitaltwins.models.OperationDisplay + :type display: ~azure.mgmt.digitaltwins.v2020_10_31.models.OperationDisplay :ivar origin: The intended executor of the operation. :vartype origin: str :ivar is_data_action: If the operation is a data action (for data plane rbac). @@ -663,7 +668,7 @@ class OperationListResult(msrest.serialization.Model): :type next_link: str :ivar value: A list of DigitalTwins operations supported by the Microsoft.DigitalTwins resource provider. - :vartype value: list[~azure.mgmt.digitaltwins.models.Operation] + :vartype value: list[~azure.mgmt.digitaltwins.v2020_10_31.models.Operation] """ _validation = { @@ -695,11 +700,12 @@ class ServiceBus(DigitalTwinsEndpointResourceProperties): :param endpoint_type: Required. The type of Digital Twins endpoint.Constant filled by server. Possible values include: "EventHub", "EventGrid", "ServiceBus". - :type endpoint_type: str or ~azure.mgmt.digitaltwins.models.EndpointType + :type endpoint_type: str or ~azure.mgmt.digitaltwins.v2020_10_31.models.EndpointType :ivar provisioning_state: The provisioning state. Possible values include: "Provisioning", "Deleting", "Succeeded", "Failed", "Canceled", "Deleted", "Warning", "Suspending", "Restoring", "Moving", "Disabled". - :vartype provisioning_state: str or ~azure.mgmt.digitaltwins.models.EndpointProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.digitaltwins.v2020_10_31.models.EndpointProvisioningState :ivar created_time: Time when the Endpoint was added to DigitalTwinsInstance. :vartype created_time: ~datetime.datetime :param dead_letter_secret: Dead letter storage secret. Will be obfuscated during read. diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/operations/_digital_twins_endpoint_operations.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/operations/_digital_twins_endpoint_operations.py index 1b908acdec02..ede25cf8f668 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/operations/_digital_twins_endpoint_operations.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/operations/_digital_twins_endpoint_operations.py @@ -32,7 +32,7 @@ class DigitalTwinsEndpointOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.digitaltwins.models + :type models: ~azure.mgmt.digitaltwins.v2020_10_31.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -63,7 +63,7 @@ def list( :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DigitalTwinsEndpointResourceListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResourceListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.digitaltwins.v2020_10_31.models.DigitalTwinsEndpointResourceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DigitalTwinsEndpointResourceListResult"] @@ -113,7 +113,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) @@ -143,7 +143,7 @@ def get( :type endpoint_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DigitalTwinsEndpointResource, or the result of cls(response) - :rtype: ~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResource + :rtype: ~azure.mgmt.digitaltwins.v2020_10_31.models.DigitalTwinsEndpointResource :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DigitalTwinsEndpointResource"] @@ -178,7 +178,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('DigitalTwinsEndpointResource', pipeline_response) @@ -235,7 +235,7 @@ def _create_or_update_initial( 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: @@ -269,15 +269,15 @@ def begin_create_or_update( :param endpoint_name: Name of Endpoint Resource. :type endpoint_name: str :param endpoint_description: The DigitalTwinsInstance endpoint metadata and security metadata. - :type endpoint_description: ~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResource + :type endpoint_description: ~azure.mgmt.digitaltwins.v2020_10_31.models.DigitalTwinsEndpointResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either DigitalTwinsEndpointResource or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResource] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.digitaltwins.v2020_10_31.models.DigitalTwinsEndpointResource] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -368,7 +368,7 @@ def _delete_initial( if response.status_code not in [200, 202, 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) deserialized = None @@ -403,12 +403,12 @@ def begin_delete( :type endpoint_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either DigitalTwinsEndpointResource or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResource] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.digitaltwins.v2020_10_31.models.DigitalTwinsEndpointResource] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/operations/_digital_twins_operations.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/operations/_digital_twins_operations.py index c6a66d4987da..1b1ab07792a4 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/operations/_digital_twins_operations.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/operations/_digital_twins_operations.py @@ -32,7 +32,7 @@ class DigitalTwinsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.digitaltwins.models + :type models: ~azure.mgmt.digitaltwins.v2020_10_31.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -63,7 +63,7 @@ def get( :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DigitalTwinsDescription, or the result of cls(response) - :rtype: ~azure.mgmt.digitaltwins.models.DigitalTwinsDescription + :rtype: ~azure.mgmt.digitaltwins.v2020_10_31.models.DigitalTwinsDescription :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DigitalTwinsDescription"] @@ -97,7 +97,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('DigitalTwinsDescription', pipeline_response) @@ -152,7 +152,7 @@ def _create_or_update_initial( 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: @@ -185,15 +185,15 @@ def begin_create_or_update( :param resource_name: The name of the DigitalTwinsInstance. :type resource_name: str :param digital_twins_create: The DigitalTwinsInstance and security metadata. - :type digital_twins_create: ~azure.mgmt.digitaltwins.models.DigitalTwinsDescription + :type digital_twins_create: ~azure.mgmt.digitaltwins.v2020_10_31.models.DigitalTwinsDescription :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either DigitalTwinsDescription or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.digitaltwins.models.DigitalTwinsDescription] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.digitaltwins.v2020_10_31.models.DigitalTwinsDescription] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -258,10 +258,10 @@ def update( :param resource_name: The name of the DigitalTwinsInstance. :type resource_name: str :param digital_twins_patch_description: The DigitalTwinsInstance and security metadata. - :type digital_twins_patch_description: ~azure.mgmt.digitaltwins.models.DigitalTwinsPatchDescription + :type digital_twins_patch_description: ~azure.mgmt.digitaltwins.v2020_10_31.models.DigitalTwinsPatchDescription :keyword callable cls: A custom type or function that will be passed the direct response :return: DigitalTwinsDescription, or the result of cls(response) - :rtype: ~azure.mgmt.digitaltwins.models.DigitalTwinsDescription + :rtype: ~azure.mgmt.digitaltwins.v2020_10_31.models.DigitalTwinsDescription :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DigitalTwinsDescription"] @@ -300,7 +300,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('DigitalTwinsDescription', pipeline_response) @@ -349,7 +349,7 @@ def _delete_initial( if response.status_code not in [200, 202, 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) deserialized = None @@ -381,12 +381,12 @@ def begin_delete( :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either DigitalTwinsDescription or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.digitaltwins.models.DigitalTwinsDescription] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.digitaltwins.v2020_10_31.models.DigitalTwinsDescription] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -443,7 +443,7 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DigitalTwinsDescriptionListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.digitaltwins.models.DigitalTwinsDescriptionListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.digitaltwins.v2020_10_31.models.DigitalTwinsDescriptionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DigitalTwinsDescriptionListResult"] @@ -491,7 +491,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) @@ -515,7 +515,7 @@ def list_by_resource_group( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DigitalTwinsDescriptionListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.digitaltwins.models.DigitalTwinsDescriptionListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.digitaltwins.v2020_10_31.models.DigitalTwinsDescriptionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DigitalTwinsDescriptionListResult"] @@ -564,7 +564,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) @@ -588,10 +588,10 @@ def check_name_availability( :type location: str :param digital_twins_instance_check_name: Set the name parameter in the DigitalTwinsInstanceCheckName structure to the name of the DigitalTwinsInstance to check. - :type digital_twins_instance_check_name: ~azure.mgmt.digitaltwins.models.CheckNameRequest + :type digital_twins_instance_check_name: ~azure.mgmt.digitaltwins.v2020_10_31.models.CheckNameRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: CheckNameResult, or the result of cls(response) - :rtype: ~azure.mgmt.digitaltwins.models.CheckNameResult + :rtype: ~azure.mgmt.digitaltwins.v2020_10_31.models.CheckNameResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameResult"] @@ -629,7 +629,7 @@ def check_name_availability( 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('CheckNameResult', pipeline_response) diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/operations/_operations.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/operations/_operations.py index 667a01d658cd..f02ed7a4a391 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/operations/_operations.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/operations/_operations.py @@ -30,7 +30,7 @@ class Operations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.digitaltwins.models + :type models: ~azure.mgmt.digitaltwins.v2020_10_31.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -54,7 +54,7 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OperationListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.digitaltwins.models.OperationListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.digitaltwins.v2020_10_31.models.OperationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] @@ -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/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/_azure_digital_twins_management_client.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/_azure_digital_twins_management_client.py index 54ee5e33471d..57bed34bd12b 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/_azure_digital_twins_management_client.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/_azure_digital_twins_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 AzureDigitalTwinsManagementClientConfiguration from .operations import DigitalTwinsOperations @@ -30,15 +31,15 @@ class AzureDigitalTwinsManagementClient(object): """Azure Digital Twins Client for managing DigitalTwinsInstance. :ivar digital_twins: DigitalTwinsOperations operations - :vartype digital_twins: azure.mgmt.digitaltwins.operations.DigitalTwinsOperations + :vartype digital_twins: azure.mgmt.digitaltwins.v2020_12_01.operations.DigitalTwinsOperations :ivar digital_twins_endpoint: DigitalTwinsEndpointOperations operations - :vartype digital_twins_endpoint: azure.mgmt.digitaltwins.operations.DigitalTwinsEndpointOperations + :vartype digital_twins_endpoint: azure.mgmt.digitaltwins.v2020_12_01.operations.DigitalTwinsEndpointOperations :ivar operations: Operations operations - :vartype operations: azure.mgmt.digitaltwins.operations.Operations + :vartype operations: azure.mgmt.digitaltwins.v2020_12_01.operations.Operations :ivar private_link_resources: PrivateLinkResourcesOperations operations - :vartype private_link_resources: azure.mgmt.digitaltwins.operations.PrivateLinkResourcesOperations + :vartype private_link_resources: azure.mgmt.digitaltwins.v2020_12_01.operations.PrivateLinkResourcesOperations :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations - :vartype private_endpoint_connections: azure.mgmt.digitaltwins.operations.PrivateEndpointConnectionsOperations + :vartype private_endpoint_connections: azure.mgmt.digitaltwins.v2020_12_01.operations.PrivateEndpointConnectionsOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The subscription identifier. @@ -62,6 +63,7 @@ def __init__( client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.digital_twins = DigitalTwinsOperations( @@ -75,6 +77,24 @@ def __init__( self.private_endpoint_connections = PrivateEndpointConnectionsOperations( 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'), + } + 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/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/_metadata.json b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/_metadata.json index bb63c971a5da..77d0d5b9bd74 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/_metadata.json +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": true, - "client_side_validation": true + "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\": [\"AzureDigitalTwinsManagementClientConfiguration\"]}}, \"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\": [\"AzureDigitalTwinsManagementClientConfiguration\"]}}, \"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 subscription identifier.", "docstring_type": "str", "required": true @@ -42,14 +44,58 @@ }, "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": { "digital_twins": "DigitalTwinsOperations", @@ -57,9 +103,5 @@ "operations": "Operations", "private_link_resources": "PrivateLinkResourcesOperations", "private_endpoint_connections": "PrivateEndpointConnectionsOperations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/_version.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/_version.py index eb995b3fdcdc..caf312bd2d0b 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/_version.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/_version.py @@ -1,13 +1,9 @@ # 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. -# +# 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. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0b2" - +VERSION = "6.0.0" diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/aio/_azure_digital_twins_management_client.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/aio/_azure_digital_twins_management_client.py index cdc4041ba381..704306023b60 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/aio/_azure_digital_twins_management_client.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/aio/_azure_digital_twins_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 @@ -28,15 +29,15 @@ class AzureDigitalTwinsManagementClient(object): """Azure Digital Twins Client for managing DigitalTwinsInstance. :ivar digital_twins: DigitalTwinsOperations operations - :vartype digital_twins: azure.mgmt.digitaltwins.aio.operations.DigitalTwinsOperations + :vartype digital_twins: azure.mgmt.digitaltwins.v2020_12_01.aio.operations.DigitalTwinsOperations :ivar digital_twins_endpoint: DigitalTwinsEndpointOperations operations - :vartype digital_twins_endpoint: azure.mgmt.digitaltwins.aio.operations.DigitalTwinsEndpointOperations + :vartype digital_twins_endpoint: azure.mgmt.digitaltwins.v2020_12_01.aio.operations.DigitalTwinsEndpointOperations :ivar operations: Operations operations - :vartype operations: azure.mgmt.digitaltwins.aio.operations.Operations + :vartype operations: azure.mgmt.digitaltwins.v2020_12_01.aio.operations.Operations :ivar private_link_resources: PrivateLinkResourcesOperations operations - :vartype private_link_resources: azure.mgmt.digitaltwins.aio.operations.PrivateLinkResourcesOperations + :vartype private_link_resources: azure.mgmt.digitaltwins.v2020_12_01.aio.operations.PrivateLinkResourcesOperations :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations - :vartype private_endpoint_connections: azure.mgmt.digitaltwins.aio.operations.PrivateEndpointConnectionsOperations + :vartype private_endpoint_connections: azure.mgmt.digitaltwins.v2020_12_01.aio.operations.PrivateEndpointConnectionsOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The subscription identifier. @@ -59,6 +60,7 @@ def __init__( client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.digital_twins = DigitalTwinsOperations( @@ -72,6 +74,23 @@ def __init__( self.private_endpoint_connections = PrivateEndpointConnectionsOperations( 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'), + } + 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/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/aio/operations/_digital_twins_endpoint_operations.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/aio/operations/_digital_twins_endpoint_operations.py index 8e0ba9f58d7c..442949ce289f 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/aio/operations/_digital_twins_endpoint_operations.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/aio/operations/_digital_twins_endpoint_operations.py @@ -28,7 +28,7 @@ class DigitalTwinsEndpointOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.digitaltwins.models + :type models: ~azure.mgmt.digitaltwins.v2020_12_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -58,7 +58,7 @@ def list( :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DigitalTwinsEndpointResourceListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResourceListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsEndpointResourceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DigitalTwinsEndpointResourceListResult"] @@ -108,7 +108,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 @@ async def get( :type endpoint_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DigitalTwinsEndpointResource, or the result of cls(response) - :rtype: ~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResource + :rtype: ~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsEndpointResource :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DigitalTwinsEndpointResource"] @@ -172,7 +172,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('DigitalTwinsEndpointResource', pipeline_response) @@ -228,7 +228,7 @@ async def _create_or_update_initial( 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,15 +261,15 @@ async def begin_create_or_update( :param endpoint_name: Name of Endpoint Resource. :type endpoint_name: str :param endpoint_description: The DigitalTwinsInstance endpoint metadata and security metadata. - :type endpoint_description: ~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResource + :type endpoint_description: ~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsEndpointResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either DigitalTwinsEndpointResource or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResource] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsEndpointResource] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -359,7 +359,7 @@ async def _delete_initial( if response.status_code not in [200, 202, 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) deserialized = None @@ -393,12 +393,12 @@ async def begin_delete( :type endpoint_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either DigitalTwinsEndpointResource or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResource] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsEndpointResource] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/aio/operations/_digital_twins_operations.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/aio/operations/_digital_twins_operations.py index 1db82547c8d3..2ec6f32fb49b 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/aio/operations/_digital_twins_operations.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/aio/operations/_digital_twins_operations.py @@ -28,7 +28,7 @@ class DigitalTwinsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.digitaltwins.models + :type models: ~azure.mgmt.digitaltwins.v2020_12_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -58,7 +58,7 @@ async def get( :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DigitalTwinsDescription, or the result of cls(response) - :rtype: ~azure.mgmt.digitaltwins.models.DigitalTwinsDescription + :rtype: ~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsDescription :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DigitalTwinsDescription"] @@ -92,7 +92,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('DigitalTwinsDescription', pipeline_response) @@ -146,7 +146,7 @@ async def _create_or_update_initial( 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: @@ -178,15 +178,15 @@ async def begin_create_or_update( :param resource_name: The name of the DigitalTwinsInstance. :type resource_name: str :param digital_twins_create: The DigitalTwinsInstance and security metadata. - :type digital_twins_create: ~azure.mgmt.digitaltwins.models.DigitalTwinsDescription + :type digital_twins_create: ~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsDescription :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either DigitalTwinsDescription or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.digitaltwins.models.DigitalTwinsDescription] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsDescription] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -278,7 +278,7 @@ async def _update_initial( if response.status_code not in [200, 202]: 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: @@ -308,15 +308,15 @@ async def begin_update( :param resource_name: The name of the DigitalTwinsInstance. :type resource_name: str :param digital_twins_patch_description: The DigitalTwinsInstance and security metadata. - :type digital_twins_patch_description: ~azure.mgmt.digitaltwins.models.DigitalTwinsPatchDescription + :type digital_twins_patch_description: ~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsPatchDescription :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either DigitalTwinsDescription or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.digitaltwins.models.DigitalTwinsDescription] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsDescription] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -402,7 +402,7 @@ async def _delete_initial( if response.status_code not in [200, 202, 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) deserialized = None @@ -433,12 +433,12 @@ async def begin_delete( :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either DigitalTwinsDescription or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.digitaltwins.models.DigitalTwinsDescription] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsDescription] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -494,7 +494,7 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DigitalTwinsDescriptionListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.digitaltwins.models.DigitalTwinsDescriptionListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsDescriptionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DigitalTwinsDescriptionListResult"] @@ -542,7 +542,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) @@ -565,7 +565,7 @@ def list_by_resource_group( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DigitalTwinsDescriptionListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.digitaltwins.models.DigitalTwinsDescriptionListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsDescriptionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DigitalTwinsDescriptionListResult"] @@ -614,7 +614,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) @@ -637,10 +637,10 @@ async def check_name_availability( :type location: str :param digital_twins_instance_check_name: Set the name parameter in the DigitalTwinsInstanceCheckName structure to the name of the DigitalTwinsInstance to check. - :type digital_twins_instance_check_name: ~azure.mgmt.digitaltwins.models.CheckNameRequest + :type digital_twins_instance_check_name: ~azure.mgmt.digitaltwins.v2020_12_01.models.CheckNameRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: CheckNameResult, or the result of cls(response) - :rtype: ~azure.mgmt.digitaltwins.models.CheckNameResult + :rtype: ~azure.mgmt.digitaltwins.v2020_12_01.models.CheckNameResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameResult"] @@ -678,7 +678,7 @@ async def check_name_availability( 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('CheckNameResult', pipeline_response) diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/aio/operations/_operations.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/aio/operations/_operations.py index d431199387f3..986d51c8aa36 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/aio/operations/_operations.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/aio/operations/_operations.py @@ -26,7 +26,7 @@ class Operations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.digitaltwins.models + :type models: ~azure.mgmt.digitaltwins.v2020_12_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -49,7 +49,7 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OperationListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.digitaltwins.models.OperationListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.digitaltwins.v2020_12_01.models.OperationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] @@ -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/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/aio/operations/_private_endpoint_connections_operations.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/aio/operations/_private_endpoint_connections_operations.py index 6b8a8d9a526e..0a95a1dd5a8f 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/aio/operations/_private_endpoint_connections_operations.py @@ -27,7 +27,7 @@ class PrivateEndpointConnectionsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.digitaltwins.models + :type models: ~azure.mgmt.digitaltwins.v2020_12_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -57,7 +57,7 @@ async def list( :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PrivateEndpointConnectionsResponse, or the result of cls(response) - :rtype: ~azure.mgmt.digitaltwins.models.PrivateEndpointConnectionsResponse + :rtype: ~azure.mgmt.digitaltwins.v2020_12_01.models.PrivateEndpointConnectionsResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionsResponse"] @@ -91,7 +91,7 @@ async def list( 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('PrivateEndpointConnectionsResponse', pipeline_response) @@ -120,7 +120,7 @@ async def get( :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PrivateEndpointConnection, or the result of cls(response) - :rtype: ~azure.mgmt.digitaltwins.models.PrivateEndpointConnection + :rtype: ~azure.mgmt.digitaltwins.v2020_12_01.models.PrivateEndpointConnection :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] @@ -155,7 +155,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('PrivateEndpointConnection', pipeline_response) @@ -205,7 +205,7 @@ async def _delete_initial( if response.status_code not in [200, 202, 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: @@ -231,8 +231,8 @@ async def begin_delete( :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -328,7 +328,7 @@ async def _create_or_update_initial( if response.status_code not in [200, 202]: 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: @@ -361,15 +361,15 @@ async def begin_create_or_update( :param private_endpoint_connection_name: The name of the private endpoint connection. :type private_endpoint_connection_name: str :param private_endpoint_connection: The private endpoint connection with updated properties. - :type private_endpoint_connection: ~azure.mgmt.digitaltwins.models.PrivateEndpointConnection + :type private_endpoint_connection: ~azure.mgmt.digitaltwins.v2020_12_01.models.PrivateEndpointConnection :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnection or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.digitaltwins.models.PrivateEndpointConnection] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.digitaltwins.v2020_12_01.models.PrivateEndpointConnection] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/aio/operations/_private_link_resources_operations.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/aio/operations/_private_link_resources_operations.py index 8858011c37a5..00d31af87a55 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/aio/operations/_private_link_resources_operations.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/aio/operations/_private_link_resources_operations.py @@ -25,7 +25,7 @@ class PrivateLinkResourcesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.digitaltwins.models + :type models: ~azure.mgmt.digitaltwins.v2020_12_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -55,7 +55,7 @@ async def list( :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: GroupIdInformationResponse, or the result of cls(response) - :rtype: ~azure.mgmt.digitaltwins.models.GroupIdInformationResponse + :rtype: ~azure.mgmt.digitaltwins.v2020_12_01.models.GroupIdInformationResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.GroupIdInformationResponse"] @@ -89,7 +89,7 @@ async def list( 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('GroupIdInformationResponse', pipeline_response) @@ -118,7 +118,7 @@ async def get( :type resource_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: GroupIdInformation, or the result of cls(response) - :rtype: ~azure.mgmt.digitaltwins.models.GroupIdInformation + :rtype: ~azure.mgmt.digitaltwins.v2020_12_01.models.GroupIdInformation :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.GroupIdInformation"] @@ -153,7 +153,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('GroupIdInformation', pipeline_response) diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/models/_models.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/models/_models.py index 81c42ff1b911..a087b0291239 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/models/_models.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/models/_models.py @@ -55,7 +55,7 @@ class CheckNameResult(msrest.serialization.Model): :type message: str :param reason: Message providing the reason why the given name is invalid. Possible values include: "Invalid", "AlreadyExists". - :type reason: str or ~azure.mgmt.digitaltwins.models.Reason + :type reason: str or ~azure.mgmt.digitaltwins.v2020_12_01.models.Reason """ _attribute_map = { @@ -82,14 +82,15 @@ class ConnectionProperties(msrest.serialization.Model): :ivar provisioning_state: The provisioning state. Possible values include: "Pending", "Approved", "Rejected", "Disconnected". :vartype provisioning_state: str or - ~azure.mgmt.digitaltwins.models.ConnectionPropertiesProvisioningState - :param private_endpoint: The private endpoint property of a private endpoint connection. - :type private_endpoint: ~azure.mgmt.digitaltwins.models.PrivateEndpoint + ~azure.mgmt.digitaltwins.v2020_12_01.models.ConnectionPropertiesProvisioningState + :param private_endpoint: + :type private_endpoint: + ~azure.mgmt.digitaltwins.v2020_12_01.models.ConnectionPropertiesPrivateEndpoint :param group_ids: The list of group ids for the private endpoint connection. :type group_ids: list[str] - :param private_link_service_connection_state: The current state of a private endpoint - connection. - :type private_link_service_connection_state: ~azure.mgmt.digitaltwins.models.ConnectionState + :param private_link_service_connection_state: + :type private_link_service_connection_state: + ~azure.mgmt.digitaltwins.v2020_12_01.models.ConnectionPropertiesPrivateLinkServiceConnectionState """ _validation = { @@ -98,9 +99,9 @@ class ConnectionProperties(msrest.serialization.Model): _attribute_map = { 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'private_endpoint': {'key': 'privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_endpoint': {'key': 'privateEndpoint', 'type': 'ConnectionPropertiesPrivateEndpoint'}, 'group_ids': {'key': 'groupIds', 'type': '[str]'}, - 'private_link_service_connection_state': {'key': 'privateLinkServiceConnectionState', 'type': 'ConnectionState'}, + 'private_link_service_connection_state': {'key': 'privateLinkServiceConnectionState', 'type': 'ConnectionPropertiesPrivateLinkServiceConnectionState'}, } def __init__( @@ -170,7 +171,8 @@ class ConnectionState(msrest.serialization.Model): :param status: Required. The status of a private endpoint connection. Possible values include: "Pending", "Approved", "Rejected", "Disconnected". - :type status: str or ~azure.mgmt.digitaltwins.models.PrivateLinkServiceConnectionStatus + :type status: str or + ~azure.mgmt.digitaltwins.v2020_12_01.models.PrivateLinkServiceConnectionStatus :param description: Required. The description for the current state of a private endpoint connection. :type description: str @@ -206,7 +208,8 @@ class ConnectionPropertiesPrivateLinkServiceConnectionState(ConnectionState): :param status: Required. The status of a private endpoint connection. Possible values include: "Pending", "Approved", "Rejected", "Disconnected". - :type status: str or ~azure.mgmt.digitaltwins.models.PrivateLinkServiceConnectionStatus + :type status: str or + ~azure.mgmt.digitaltwins.v2020_12_01.models.PrivateLinkServiceConnectionStatus :param description: Required. The description for the current state of a private endpoint connection. :type description: str @@ -250,7 +253,7 @@ class DigitalTwinsResource(msrest.serialization.Model): :param tags: A set of tags. The resource tags. :type tags: dict[str, str] :param identity: The managed identity for the DigitalTwinsInstance. - :type identity: ~azure.mgmt.digitaltwins.models.DigitalTwinsIdentity + :type identity: ~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsIdentity """ _validation = { @@ -300,7 +303,7 @@ class DigitalTwinsDescription(DigitalTwinsResource): :param tags: A set of tags. The resource tags. :type tags: dict[str, str] :param identity: The managed identity for the DigitalTwinsInstance. - :type identity: ~azure.mgmt.digitaltwins.models.DigitalTwinsIdentity + :type identity: ~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsIdentity :ivar created_time: Time when DigitalTwinsInstance was created. :vartype created_time: ~datetime.datetime :ivar last_updated_time: Time when DigitalTwinsInstance was updated. @@ -308,15 +311,17 @@ class DigitalTwinsDescription(DigitalTwinsResource): :ivar provisioning_state: The provisioning state. Possible values include: "Provisioning", "Deleting", "Updating", "Succeeded", "Failed", "Canceled", "Deleted", "Warning", "Suspending", "Restoring", "Moving". - :vartype provisioning_state: str or ~azure.mgmt.digitaltwins.models.ProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.digitaltwins.v2020_12_01.models.ProvisioningState :ivar host_name: Api endpoint to work with DigitalTwinsInstance. :vartype host_name: str :param private_endpoint_connections: :type private_endpoint_connections: - list[~azure.mgmt.digitaltwins.models.PrivateEndpointConnection] + list[~azure.mgmt.digitaltwins.v2020_12_01.models.PrivateEndpointConnection] :param public_network_access: Public network access for the DigitalTwinsInstance. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or ~azure.mgmt.digitaltwins.models.PublicNetworkAccess + :type public_network_access: str or + ~azure.mgmt.digitaltwins.v2020_12_01.models.PublicNetworkAccess """ _validation = { @@ -364,7 +369,7 @@ class DigitalTwinsDescriptionListResult(msrest.serialization.Model): :param next_link: The link used to get the next page of DigitalTwins description objects. :type next_link: str :param value: A list of DigitalTwins description objects. - :type value: list[~azure.mgmt.digitaltwins.models.DigitalTwinsDescription] + :type value: list[~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsDescription] """ _attribute_map = { @@ -430,7 +435,8 @@ class DigitalTwinsEndpointResource(ExternalResource): :ivar type: The resource type. :vartype type: str :param properties: Required. DigitalTwinsInstance endpoint resource properties. - :type properties: ~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResourceProperties + :type properties: + ~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsEndpointResourceProperties """ _validation = { @@ -461,7 +467,7 @@ class DigitalTwinsEndpointResourceListResult(msrest.serialization.Model): :param next_link: The link used to get the next page of DigitalTwinsInstance Endpoints. :type next_link: str :param value: A list of DigitalTwinsInstance Endpoints. - :type value: list[~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResource] + :type value: list[~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsEndpointResource] """ _attribute_map = { @@ -490,16 +496,18 @@ class DigitalTwinsEndpointResourceProperties(msrest.serialization.Model): :param endpoint_type: Required. The type of Digital Twins endpoint.Constant filled by server. Possible values include: "EventHub", "EventGrid", "ServiceBus". - :type endpoint_type: str or ~azure.mgmt.digitaltwins.models.EndpointType + :type endpoint_type: str or ~azure.mgmt.digitaltwins.v2020_12_01.models.EndpointType :ivar provisioning_state: The provisioning state. Possible values include: "Provisioning", "Deleting", "Succeeded", "Failed", "Canceled", "Deleted", "Warning", "Suspending", "Restoring", "Moving", "Disabled". - :vartype provisioning_state: str or ~azure.mgmt.digitaltwins.models.EndpointProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.digitaltwins.v2020_12_01.models.EndpointProvisioningState :ivar created_time: Time when the Endpoint was added to DigitalTwinsInstance. :vartype created_time: ~datetime.datetime :param authentication_type: Specifies the authentication type being used for connecting to the endpoint. Possible values include: "KeyBased", "IdentityBased". - :type authentication_type: str or ~azure.mgmt.digitaltwins.models.AuthenticationType + :type authentication_type: str or + ~azure.mgmt.digitaltwins.v2020_12_01.models.AuthenticationType :param dead_letter_secret: Dead letter storage secret for key-based authentication. Will be obfuscated during read. :type dead_letter_secret: str @@ -546,7 +554,7 @@ class DigitalTwinsIdentity(msrest.serialization.Model): :param type: The type of Managed Identity used by the DigitalTwinsInstance. Only SystemAssigned is supported. Possible values include: "None", "SystemAssigned". - :type type: str or ~azure.mgmt.digitaltwins.models.DigitalTwinsIdentityType + :type type: str or ~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsIdentityType :ivar principal_id: The object id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-identity-principal-id header in the PUT request if the resource has a systemAssigned(implicit) identity. @@ -584,9 +592,9 @@ class DigitalTwinsPatchDescription(msrest.serialization.Model): :param tags: A set of tags. Instance patch properties. :type tags: dict[str, str] :param identity: The managed identity for the DigitalTwinsInstance. - :type identity: ~azure.mgmt.digitaltwins.models.DigitalTwinsIdentity + :type identity: ~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsIdentity :param properties: Properties for the DigitalTwinsInstance. - :type properties: ~azure.mgmt.digitaltwins.models.DigitalTwinsPatchProperties + :type properties: ~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsPatchProperties """ _attribute_map = { @@ -610,7 +618,8 @@ class DigitalTwinsPatchProperties(msrest.serialization.Model): :param public_network_access: Public network access for the DigitalTwinsInstance. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or ~azure.mgmt.digitaltwins.models.PublicNetworkAccess + :type public_network_access: str or + ~azure.mgmt.digitaltwins.v2020_12_01.models.PublicNetworkAccess """ _attribute_map = { @@ -635,7 +644,7 @@ class ErrorDefinition(msrest.serialization.Model): :ivar message: Description of the error. :vartype message: str :ivar details: Internal error details. - :vartype details: list[~azure.mgmt.digitaltwins.models.ErrorDefinition] + :vartype details: list[~azure.mgmt.digitaltwins.v2020_12_01.models.ErrorDefinition] """ _validation = { @@ -664,7 +673,7 @@ class ErrorResponse(msrest.serialization.Model): """Error response. :param error: Error description. - :type error: ~azure.mgmt.digitaltwins.models.ErrorDefinition + :type error: ~azure.mgmt.digitaltwins.v2020_12_01.models.ErrorDefinition """ _attribute_map = { @@ -688,16 +697,18 @@ class EventGrid(DigitalTwinsEndpointResourceProperties): :param endpoint_type: Required. The type of Digital Twins endpoint.Constant filled by server. Possible values include: "EventHub", "EventGrid", "ServiceBus". - :type endpoint_type: str or ~azure.mgmt.digitaltwins.models.EndpointType + :type endpoint_type: str or ~azure.mgmt.digitaltwins.v2020_12_01.models.EndpointType :ivar provisioning_state: The provisioning state. Possible values include: "Provisioning", "Deleting", "Succeeded", "Failed", "Canceled", "Deleted", "Warning", "Suspending", "Restoring", "Moving", "Disabled". - :vartype provisioning_state: str or ~azure.mgmt.digitaltwins.models.EndpointProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.digitaltwins.v2020_12_01.models.EndpointProvisioningState :ivar created_time: Time when the Endpoint was added to DigitalTwinsInstance. :vartype created_time: ~datetime.datetime :param authentication_type: Specifies the authentication type being used for connecting to the endpoint. Possible values include: "KeyBased", "IdentityBased". - :type authentication_type: str or ~azure.mgmt.digitaltwins.models.AuthenticationType + :type authentication_type: str or + ~azure.mgmt.digitaltwins.v2020_12_01.models.AuthenticationType :param dead_letter_secret: Dead letter storage secret for key-based authentication. Will be obfuscated during read. :type dead_letter_secret: str @@ -751,16 +762,18 @@ class EventHub(DigitalTwinsEndpointResourceProperties): :param endpoint_type: Required. The type of Digital Twins endpoint.Constant filled by server. Possible values include: "EventHub", "EventGrid", "ServiceBus". - :type endpoint_type: str or ~azure.mgmt.digitaltwins.models.EndpointType + :type endpoint_type: str or ~azure.mgmt.digitaltwins.v2020_12_01.models.EndpointType :ivar provisioning_state: The provisioning state. Possible values include: "Provisioning", "Deleting", "Succeeded", "Failed", "Canceled", "Deleted", "Warning", "Suspending", "Restoring", "Moving", "Disabled". - :vartype provisioning_state: str or ~azure.mgmt.digitaltwins.models.EndpointProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.digitaltwins.v2020_12_01.models.EndpointProvisioningState :ivar created_time: Time when the Endpoint was added to DigitalTwinsInstance. :vartype created_time: ~datetime.datetime :param authentication_type: Specifies the authentication type being used for connecting to the endpoint. Possible values include: "KeyBased", "IdentityBased". - :type authentication_type: str or ~azure.mgmt.digitaltwins.models.AuthenticationType + :type authentication_type: str or + ~azure.mgmt.digitaltwins.v2020_12_01.models.AuthenticationType :param dead_letter_secret: Dead letter storage secret for key-based authentication. Will be obfuscated during read. :type dead_letter_secret: str @@ -818,8 +831,9 @@ class GroupIdInformation(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param properties: Required. The properties for a group information object. - :type properties: ~azure.mgmt.digitaltwins.models.GroupIdInformationProperties + :param properties: Required. + :type properties: + ~azure.mgmt.digitaltwins.v2020_12_01.models.GroupIdInformationPropertiesAutoGenerated :param id: The resource identifier. :type id: str :ivar name: The resource name. @@ -835,7 +849,7 @@ class GroupIdInformation(msrest.serialization.Model): } _attribute_map = { - 'properties': {'key': 'properties', 'type': 'GroupIdInformationProperties'}, + 'properties': {'key': 'properties', 'type': 'GroupIdInformationPropertiesAutoGenerated'}, 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, @@ -907,7 +921,7 @@ class GroupIdInformationResponse(msrest.serialization.Model): """The available private link resources for a Digital Twin. :param value: The list of available private link resources for a Digital Twin. - :type value: list[~azure.mgmt.digitaltwins.models.GroupIdInformation] + :type value: list[~azure.mgmt.digitaltwins.v2020_12_01.models.GroupIdInformation] """ _attribute_map = { @@ -930,7 +944,7 @@ class Operation(msrest.serialization.Model): :ivar name: Operation name: {provider}/{resource}/{read | write | action | delete}. :vartype name: str :param display: Operation properties display. - :type display: ~azure.mgmt.digitaltwins.models.OperationDisplay + :type display: ~azure.mgmt.digitaltwins.v2020_12_01.models.OperationDisplay :ivar origin: The intended executor of the operation. :vartype origin: str :ivar is_data_action: If the operation is a data action (for data plane rbac). @@ -1010,7 +1024,7 @@ class OperationListResult(msrest.serialization.Model): :type next_link: str :ivar value: A list of DigitalTwins operations supported by the Microsoft.DigitalTwins resource provider. - :vartype value: list[~azure.mgmt.digitaltwins.models.Operation] + :vartype value: list[~azure.mgmt.digitaltwins.v2020_12_01.models.Operation] """ _validation = { @@ -1044,8 +1058,9 @@ class PrivateEndpointConnection(msrest.serialization.Model): :vartype name: str :ivar type: The resource type. :vartype type: str - :param properties: Required. The properties of a private endpoint connection. - :type properties: ~azure.mgmt.digitaltwins.models.ConnectionProperties + :param properties: Required. + :type properties: + ~azure.mgmt.digitaltwins.v2020_12_01.models.PrivateEndpointConnectionProperties """ _validation = { @@ -1059,7 +1074,7 @@ class PrivateEndpointConnection(msrest.serialization.Model): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'ConnectionProperties'}, + 'properties': {'key': 'properties', 'type': 'PrivateEndpointConnectionProperties'}, } def __init__( @@ -1081,14 +1096,15 @@ class PrivateEndpointConnectionProperties(ConnectionProperties): :ivar provisioning_state: The provisioning state. Possible values include: "Pending", "Approved", "Rejected", "Disconnected". :vartype provisioning_state: str or - ~azure.mgmt.digitaltwins.models.ConnectionPropertiesProvisioningState - :param private_endpoint: The private endpoint property of a private endpoint connection. - :type private_endpoint: ~azure.mgmt.digitaltwins.models.PrivateEndpoint + ~azure.mgmt.digitaltwins.v2020_12_01.models.ConnectionPropertiesProvisioningState + :param private_endpoint: + :type private_endpoint: + ~azure.mgmt.digitaltwins.v2020_12_01.models.ConnectionPropertiesPrivateEndpoint :param group_ids: The list of group ids for the private endpoint connection. :type group_ids: list[str] - :param private_link_service_connection_state: The current state of a private endpoint - connection. - :type private_link_service_connection_state: ~azure.mgmt.digitaltwins.models.ConnectionState + :param private_link_service_connection_state: + :type private_link_service_connection_state: + ~azure.mgmt.digitaltwins.v2020_12_01.models.ConnectionPropertiesPrivateLinkServiceConnectionState """ _validation = { @@ -1097,9 +1113,9 @@ class PrivateEndpointConnectionProperties(ConnectionProperties): _attribute_map = { 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'private_endpoint': {'key': 'privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_endpoint': {'key': 'privateEndpoint', 'type': 'ConnectionPropertiesPrivateEndpoint'}, 'group_ids': {'key': 'groupIds', 'type': '[str]'}, - 'private_link_service_connection_state': {'key': 'privateLinkServiceConnectionState', 'type': 'ConnectionState'}, + 'private_link_service_connection_state': {'key': 'privateLinkServiceConnectionState', 'type': 'ConnectionPropertiesPrivateLinkServiceConnectionState'}, } def __init__( @@ -1113,7 +1129,7 @@ class PrivateEndpointConnectionsResponse(msrest.serialization.Model): """The available private link connections for a Digital Twin. :param value: The list of available private link connections for a Digital Twin. - :type value: list[~azure.mgmt.digitaltwins.models.PrivateEndpointConnection] + :type value: list[~azure.mgmt.digitaltwins.v2020_12_01.models.PrivateEndpointConnection] """ _attribute_map = { @@ -1137,16 +1153,18 @@ class ServiceBus(DigitalTwinsEndpointResourceProperties): :param endpoint_type: Required. The type of Digital Twins endpoint.Constant filled by server. Possible values include: "EventHub", "EventGrid", "ServiceBus". - :type endpoint_type: str or ~azure.mgmt.digitaltwins.models.EndpointType + :type endpoint_type: str or ~azure.mgmt.digitaltwins.v2020_12_01.models.EndpointType :ivar provisioning_state: The provisioning state. Possible values include: "Provisioning", "Deleting", "Succeeded", "Failed", "Canceled", "Deleted", "Warning", "Suspending", "Restoring", "Moving", "Disabled". - :vartype provisioning_state: str or ~azure.mgmt.digitaltwins.models.EndpointProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.digitaltwins.v2020_12_01.models.EndpointProvisioningState :ivar created_time: Time when the Endpoint was added to DigitalTwinsInstance. :vartype created_time: ~datetime.datetime :param authentication_type: Specifies the authentication type being used for connecting to the endpoint. Possible values include: "KeyBased", "IdentityBased". - :type authentication_type: str or ~azure.mgmt.digitaltwins.models.AuthenticationType + :type authentication_type: str or + ~azure.mgmt.digitaltwins.v2020_12_01.models.AuthenticationType :param dead_letter_secret: Dead letter storage secret for key-based authentication. Will be obfuscated during read. :type dead_letter_secret: str diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/models/_models_py3.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/models/_models_py3.py index 1ea24bea1837..bdd16e865730 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/models/_models_py3.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/models/_models_py3.py @@ -61,7 +61,7 @@ class CheckNameResult(msrest.serialization.Model): :type message: str :param reason: Message providing the reason why the given name is invalid. Possible values include: "Invalid", "AlreadyExists". - :type reason: str or ~azure.mgmt.digitaltwins.models.Reason + :type reason: str or ~azure.mgmt.digitaltwins.v2020_12_01.models.Reason """ _attribute_map = { @@ -92,14 +92,15 @@ class ConnectionProperties(msrest.serialization.Model): :ivar provisioning_state: The provisioning state. Possible values include: "Pending", "Approved", "Rejected", "Disconnected". :vartype provisioning_state: str or - ~azure.mgmt.digitaltwins.models.ConnectionPropertiesProvisioningState - :param private_endpoint: The private endpoint property of a private endpoint connection. - :type private_endpoint: ~azure.mgmt.digitaltwins.models.PrivateEndpoint + ~azure.mgmt.digitaltwins.v2020_12_01.models.ConnectionPropertiesProvisioningState + :param private_endpoint: + :type private_endpoint: + ~azure.mgmt.digitaltwins.v2020_12_01.models.ConnectionPropertiesPrivateEndpoint :param group_ids: The list of group ids for the private endpoint connection. :type group_ids: list[str] - :param private_link_service_connection_state: The current state of a private endpoint - connection. - :type private_link_service_connection_state: ~azure.mgmt.digitaltwins.models.ConnectionState + :param private_link_service_connection_state: + :type private_link_service_connection_state: + ~azure.mgmt.digitaltwins.v2020_12_01.models.ConnectionPropertiesPrivateLinkServiceConnectionState """ _validation = { @@ -108,17 +109,17 @@ class ConnectionProperties(msrest.serialization.Model): _attribute_map = { 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'private_endpoint': {'key': 'privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_endpoint': {'key': 'privateEndpoint', 'type': 'ConnectionPropertiesPrivateEndpoint'}, 'group_ids': {'key': 'groupIds', 'type': '[str]'}, - 'private_link_service_connection_state': {'key': 'privateLinkServiceConnectionState', 'type': 'ConnectionState'}, + 'private_link_service_connection_state': {'key': 'privateLinkServiceConnectionState', 'type': 'ConnectionPropertiesPrivateLinkServiceConnectionState'}, } def __init__( self, *, - private_endpoint: Optional["PrivateEndpoint"] = None, + private_endpoint: Optional["ConnectionPropertiesPrivateEndpoint"] = None, group_ids: Optional[List[str]] = None, - private_link_service_connection_state: Optional["ConnectionState"] = None, + private_link_service_connection_state: Optional["ConnectionPropertiesPrivateLinkServiceConnectionState"] = None, **kwargs ): super(ConnectionProperties, self).__init__(**kwargs) @@ -184,7 +185,8 @@ class ConnectionState(msrest.serialization.Model): :param status: Required. The status of a private endpoint connection. Possible values include: "Pending", "Approved", "Rejected", "Disconnected". - :type status: str or ~azure.mgmt.digitaltwins.models.PrivateLinkServiceConnectionStatus + :type status: str or + ~azure.mgmt.digitaltwins.v2020_12_01.models.PrivateLinkServiceConnectionStatus :param description: Required. The description for the current state of a private endpoint connection. :type description: str @@ -224,7 +226,8 @@ class ConnectionPropertiesPrivateLinkServiceConnectionState(ConnectionState): :param status: Required. The status of a private endpoint connection. Possible values include: "Pending", "Approved", "Rejected", "Disconnected". - :type status: str or ~azure.mgmt.digitaltwins.models.PrivateLinkServiceConnectionStatus + :type status: str or + ~azure.mgmt.digitaltwins.v2020_12_01.models.PrivateLinkServiceConnectionStatus :param description: Required. The description for the current state of a private endpoint connection. :type description: str @@ -272,7 +275,7 @@ class DigitalTwinsResource(msrest.serialization.Model): :param tags: A set of tags. The resource tags. :type tags: dict[str, str] :param identity: The managed identity for the DigitalTwinsInstance. - :type identity: ~azure.mgmt.digitaltwins.models.DigitalTwinsIdentity + :type identity: ~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsIdentity """ _validation = { @@ -326,7 +329,7 @@ class DigitalTwinsDescription(DigitalTwinsResource): :param tags: A set of tags. The resource tags. :type tags: dict[str, str] :param identity: The managed identity for the DigitalTwinsInstance. - :type identity: ~azure.mgmt.digitaltwins.models.DigitalTwinsIdentity + :type identity: ~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsIdentity :ivar created_time: Time when DigitalTwinsInstance was created. :vartype created_time: ~datetime.datetime :ivar last_updated_time: Time when DigitalTwinsInstance was updated. @@ -334,15 +337,17 @@ class DigitalTwinsDescription(DigitalTwinsResource): :ivar provisioning_state: The provisioning state. Possible values include: "Provisioning", "Deleting", "Updating", "Succeeded", "Failed", "Canceled", "Deleted", "Warning", "Suspending", "Restoring", "Moving". - :vartype provisioning_state: str or ~azure.mgmt.digitaltwins.models.ProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.digitaltwins.v2020_12_01.models.ProvisioningState :ivar host_name: Api endpoint to work with DigitalTwinsInstance. :vartype host_name: str :param private_endpoint_connections: :type private_endpoint_connections: - list[~azure.mgmt.digitaltwins.models.PrivateEndpointConnection] + list[~azure.mgmt.digitaltwins.v2020_12_01.models.PrivateEndpointConnection] :param public_network_access: Public network access for the DigitalTwinsInstance. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or ~azure.mgmt.digitaltwins.models.PublicNetworkAccess + :type public_network_access: str or + ~azure.mgmt.digitaltwins.v2020_12_01.models.PublicNetworkAccess """ _validation = { @@ -396,7 +401,7 @@ class DigitalTwinsDescriptionListResult(msrest.serialization.Model): :param next_link: The link used to get the next page of DigitalTwins description objects. :type next_link: str :param value: A list of DigitalTwins description objects. - :type value: list[~azure.mgmt.digitaltwins.models.DigitalTwinsDescription] + :type value: list[~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsDescription] """ _attribute_map = { @@ -465,7 +470,8 @@ class DigitalTwinsEndpointResource(ExternalResource): :ivar type: The resource type. :vartype type: str :param properties: Required. DigitalTwinsInstance endpoint resource properties. - :type properties: ~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResourceProperties + :type properties: + ~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsEndpointResourceProperties """ _validation = { @@ -498,7 +504,7 @@ class DigitalTwinsEndpointResourceListResult(msrest.serialization.Model): :param next_link: The link used to get the next page of DigitalTwinsInstance Endpoints. :type next_link: str :param value: A list of DigitalTwinsInstance Endpoints. - :type value: list[~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResource] + :type value: list[~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsEndpointResource] """ _attribute_map = { @@ -530,16 +536,18 @@ class DigitalTwinsEndpointResourceProperties(msrest.serialization.Model): :param endpoint_type: Required. The type of Digital Twins endpoint.Constant filled by server. Possible values include: "EventHub", "EventGrid", "ServiceBus". - :type endpoint_type: str or ~azure.mgmt.digitaltwins.models.EndpointType + :type endpoint_type: str or ~azure.mgmt.digitaltwins.v2020_12_01.models.EndpointType :ivar provisioning_state: The provisioning state. Possible values include: "Provisioning", "Deleting", "Succeeded", "Failed", "Canceled", "Deleted", "Warning", "Suspending", "Restoring", "Moving", "Disabled". - :vartype provisioning_state: str or ~azure.mgmt.digitaltwins.models.EndpointProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.digitaltwins.v2020_12_01.models.EndpointProvisioningState :ivar created_time: Time when the Endpoint was added to DigitalTwinsInstance. :vartype created_time: ~datetime.datetime :param authentication_type: Specifies the authentication type being used for connecting to the endpoint. Possible values include: "KeyBased", "IdentityBased". - :type authentication_type: str or ~azure.mgmt.digitaltwins.models.AuthenticationType + :type authentication_type: str or + ~azure.mgmt.digitaltwins.v2020_12_01.models.AuthenticationType :param dead_letter_secret: Dead letter storage secret for key-based authentication. Will be obfuscated during read. :type dead_letter_secret: str @@ -590,7 +598,7 @@ class DigitalTwinsIdentity(msrest.serialization.Model): :param type: The type of Managed Identity used by the DigitalTwinsInstance. Only SystemAssigned is supported. Possible values include: "None", "SystemAssigned". - :type type: str or ~azure.mgmt.digitaltwins.models.DigitalTwinsIdentityType + :type type: str or ~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsIdentityType :ivar principal_id: The object id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-identity-principal-id header in the PUT request if the resource has a systemAssigned(implicit) identity. @@ -630,9 +638,9 @@ class DigitalTwinsPatchDescription(msrest.serialization.Model): :param tags: A set of tags. Instance patch properties. :type tags: dict[str, str] :param identity: The managed identity for the DigitalTwinsInstance. - :type identity: ~azure.mgmt.digitaltwins.models.DigitalTwinsIdentity + :type identity: ~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsIdentity :param properties: Properties for the DigitalTwinsInstance. - :type properties: ~azure.mgmt.digitaltwins.models.DigitalTwinsPatchProperties + :type properties: ~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsPatchProperties """ _attribute_map = { @@ -660,7 +668,8 @@ class DigitalTwinsPatchProperties(msrest.serialization.Model): :param public_network_access: Public network access for the DigitalTwinsInstance. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or ~azure.mgmt.digitaltwins.models.PublicNetworkAccess + :type public_network_access: str or + ~azure.mgmt.digitaltwins.v2020_12_01.models.PublicNetworkAccess """ _attribute_map = { @@ -687,7 +696,7 @@ class ErrorDefinition(msrest.serialization.Model): :ivar message: Description of the error. :vartype message: str :ivar details: Internal error details. - :vartype details: list[~azure.mgmt.digitaltwins.models.ErrorDefinition] + :vartype details: list[~azure.mgmt.digitaltwins.v2020_12_01.models.ErrorDefinition] """ _validation = { @@ -716,7 +725,7 @@ class ErrorResponse(msrest.serialization.Model): """Error response. :param error: Error description. - :type error: ~azure.mgmt.digitaltwins.models.ErrorDefinition + :type error: ~azure.mgmt.digitaltwins.v2020_12_01.models.ErrorDefinition """ _attribute_map = { @@ -742,16 +751,18 @@ class EventGrid(DigitalTwinsEndpointResourceProperties): :param endpoint_type: Required. The type of Digital Twins endpoint.Constant filled by server. Possible values include: "EventHub", "EventGrid", "ServiceBus". - :type endpoint_type: str or ~azure.mgmt.digitaltwins.models.EndpointType + :type endpoint_type: str or ~azure.mgmt.digitaltwins.v2020_12_01.models.EndpointType :ivar provisioning_state: The provisioning state. Possible values include: "Provisioning", "Deleting", "Succeeded", "Failed", "Canceled", "Deleted", "Warning", "Suspending", "Restoring", "Moving", "Disabled". - :vartype provisioning_state: str or ~azure.mgmt.digitaltwins.models.EndpointProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.digitaltwins.v2020_12_01.models.EndpointProvisioningState :ivar created_time: Time when the Endpoint was added to DigitalTwinsInstance. :vartype created_time: ~datetime.datetime :param authentication_type: Specifies the authentication type being used for connecting to the endpoint. Possible values include: "KeyBased", "IdentityBased". - :type authentication_type: str or ~azure.mgmt.digitaltwins.models.AuthenticationType + :type authentication_type: str or + ~azure.mgmt.digitaltwins.v2020_12_01.models.AuthenticationType :param dead_letter_secret: Dead letter storage secret for key-based authentication. Will be obfuscated during read. :type dead_letter_secret: str @@ -812,16 +823,18 @@ class EventHub(DigitalTwinsEndpointResourceProperties): :param endpoint_type: Required. The type of Digital Twins endpoint.Constant filled by server. Possible values include: "EventHub", "EventGrid", "ServiceBus". - :type endpoint_type: str or ~azure.mgmt.digitaltwins.models.EndpointType + :type endpoint_type: str or ~azure.mgmt.digitaltwins.v2020_12_01.models.EndpointType :ivar provisioning_state: The provisioning state. Possible values include: "Provisioning", "Deleting", "Succeeded", "Failed", "Canceled", "Deleted", "Warning", "Suspending", "Restoring", "Moving", "Disabled". - :vartype provisioning_state: str or ~azure.mgmt.digitaltwins.models.EndpointProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.digitaltwins.v2020_12_01.models.EndpointProvisioningState :ivar created_time: Time when the Endpoint was added to DigitalTwinsInstance. :vartype created_time: ~datetime.datetime :param authentication_type: Specifies the authentication type being used for connecting to the endpoint. Possible values include: "KeyBased", "IdentityBased". - :type authentication_type: str or ~azure.mgmt.digitaltwins.models.AuthenticationType + :type authentication_type: str or + ~azure.mgmt.digitaltwins.v2020_12_01.models.AuthenticationType :param dead_letter_secret: Dead letter storage secret for key-based authentication. Will be obfuscated during read. :type dead_letter_secret: str @@ -887,8 +900,9 @@ class GroupIdInformation(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param properties: Required. The properties for a group information object. - :type properties: ~azure.mgmt.digitaltwins.models.GroupIdInformationProperties + :param properties: Required. + :type properties: + ~azure.mgmt.digitaltwins.v2020_12_01.models.GroupIdInformationPropertiesAutoGenerated :param id: The resource identifier. :type id: str :ivar name: The resource name. @@ -904,7 +918,7 @@ class GroupIdInformation(msrest.serialization.Model): } _attribute_map = { - 'properties': {'key': 'properties', 'type': 'GroupIdInformationProperties'}, + 'properties': {'key': 'properties', 'type': 'GroupIdInformationPropertiesAutoGenerated'}, 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, @@ -913,7 +927,7 @@ class GroupIdInformation(msrest.serialization.Model): def __init__( self, *, - properties: "GroupIdInformationProperties", + properties: "GroupIdInformationPropertiesAutoGenerated", id: Optional[str] = None, **kwargs ): @@ -987,7 +1001,7 @@ class GroupIdInformationResponse(msrest.serialization.Model): """The available private link resources for a Digital Twin. :param value: The list of available private link resources for a Digital Twin. - :type value: list[~azure.mgmt.digitaltwins.models.GroupIdInformation] + :type value: list[~azure.mgmt.digitaltwins.v2020_12_01.models.GroupIdInformation] """ _attribute_map = { @@ -1012,7 +1026,7 @@ class Operation(msrest.serialization.Model): :ivar name: Operation name: {provider}/{resource}/{read | write | action | delete}. :vartype name: str :param display: Operation properties display. - :type display: ~azure.mgmt.digitaltwins.models.OperationDisplay + :type display: ~azure.mgmt.digitaltwins.v2020_12_01.models.OperationDisplay :ivar origin: The intended executor of the operation. :vartype origin: str :ivar is_data_action: If the operation is a data action (for data plane rbac). @@ -1094,7 +1108,7 @@ class OperationListResult(msrest.serialization.Model): :type next_link: str :ivar value: A list of DigitalTwins operations supported by the Microsoft.DigitalTwins resource provider. - :vartype value: list[~azure.mgmt.digitaltwins.models.Operation] + :vartype value: list[~azure.mgmt.digitaltwins.v2020_12_01.models.Operation] """ _validation = { @@ -1130,8 +1144,9 @@ class PrivateEndpointConnection(msrest.serialization.Model): :vartype name: str :ivar type: The resource type. :vartype type: str - :param properties: Required. The properties of a private endpoint connection. - :type properties: ~azure.mgmt.digitaltwins.models.ConnectionProperties + :param properties: Required. + :type properties: + ~azure.mgmt.digitaltwins.v2020_12_01.models.PrivateEndpointConnectionProperties """ _validation = { @@ -1145,13 +1160,13 @@ class PrivateEndpointConnection(msrest.serialization.Model): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'ConnectionProperties'}, + 'properties': {'key': 'properties', 'type': 'PrivateEndpointConnectionProperties'}, } def __init__( self, *, - properties: "ConnectionProperties", + properties: "PrivateEndpointConnectionProperties", **kwargs ): super(PrivateEndpointConnection, self).__init__(**kwargs) @@ -1169,14 +1184,15 @@ class PrivateEndpointConnectionProperties(ConnectionProperties): :ivar provisioning_state: The provisioning state. Possible values include: "Pending", "Approved", "Rejected", "Disconnected". :vartype provisioning_state: str or - ~azure.mgmt.digitaltwins.models.ConnectionPropertiesProvisioningState - :param private_endpoint: The private endpoint property of a private endpoint connection. - :type private_endpoint: ~azure.mgmt.digitaltwins.models.PrivateEndpoint + ~azure.mgmt.digitaltwins.v2020_12_01.models.ConnectionPropertiesProvisioningState + :param private_endpoint: + :type private_endpoint: + ~azure.mgmt.digitaltwins.v2020_12_01.models.ConnectionPropertiesPrivateEndpoint :param group_ids: The list of group ids for the private endpoint connection. :type group_ids: list[str] - :param private_link_service_connection_state: The current state of a private endpoint - connection. - :type private_link_service_connection_state: ~azure.mgmt.digitaltwins.models.ConnectionState + :param private_link_service_connection_state: + :type private_link_service_connection_state: + ~azure.mgmt.digitaltwins.v2020_12_01.models.ConnectionPropertiesPrivateLinkServiceConnectionState """ _validation = { @@ -1185,17 +1201,17 @@ class PrivateEndpointConnectionProperties(ConnectionProperties): _attribute_map = { 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'private_endpoint': {'key': 'privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_endpoint': {'key': 'privateEndpoint', 'type': 'ConnectionPropertiesPrivateEndpoint'}, 'group_ids': {'key': 'groupIds', 'type': '[str]'}, - 'private_link_service_connection_state': {'key': 'privateLinkServiceConnectionState', 'type': 'ConnectionState'}, + 'private_link_service_connection_state': {'key': 'privateLinkServiceConnectionState', 'type': 'ConnectionPropertiesPrivateLinkServiceConnectionState'}, } def __init__( self, *, - private_endpoint: Optional["PrivateEndpoint"] = None, + private_endpoint: Optional["ConnectionPropertiesPrivateEndpoint"] = None, group_ids: Optional[List[str]] = None, - private_link_service_connection_state: Optional["ConnectionState"] = None, + private_link_service_connection_state: Optional["ConnectionPropertiesPrivateLinkServiceConnectionState"] = None, **kwargs ): super(PrivateEndpointConnectionProperties, self).__init__(private_endpoint=private_endpoint, group_ids=group_ids, private_link_service_connection_state=private_link_service_connection_state, **kwargs) @@ -1205,7 +1221,7 @@ class PrivateEndpointConnectionsResponse(msrest.serialization.Model): """The available private link connections for a Digital Twin. :param value: The list of available private link connections for a Digital Twin. - :type value: list[~azure.mgmt.digitaltwins.models.PrivateEndpointConnection] + :type value: list[~azure.mgmt.digitaltwins.v2020_12_01.models.PrivateEndpointConnection] """ _attribute_map = { @@ -1231,16 +1247,18 @@ class ServiceBus(DigitalTwinsEndpointResourceProperties): :param endpoint_type: Required. The type of Digital Twins endpoint.Constant filled by server. Possible values include: "EventHub", "EventGrid", "ServiceBus". - :type endpoint_type: str or ~azure.mgmt.digitaltwins.models.EndpointType + :type endpoint_type: str or ~azure.mgmt.digitaltwins.v2020_12_01.models.EndpointType :ivar provisioning_state: The provisioning state. Possible values include: "Provisioning", "Deleting", "Succeeded", "Failed", "Canceled", "Deleted", "Warning", "Suspending", "Restoring", "Moving", "Disabled". - :vartype provisioning_state: str or ~azure.mgmt.digitaltwins.models.EndpointProvisioningState + :vartype provisioning_state: str or + ~azure.mgmt.digitaltwins.v2020_12_01.models.EndpointProvisioningState :ivar created_time: Time when the Endpoint was added to DigitalTwinsInstance. :vartype created_time: ~datetime.datetime :param authentication_type: Specifies the authentication type being used for connecting to the endpoint. Possible values include: "KeyBased", "IdentityBased". - :type authentication_type: str or ~azure.mgmt.digitaltwins.models.AuthenticationType + :type authentication_type: str or + ~azure.mgmt.digitaltwins.v2020_12_01.models.AuthenticationType :param dead_letter_secret: Dead letter storage secret for key-based authentication. Will be obfuscated during read. :type dead_letter_secret: str diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/operations/_digital_twins_endpoint_operations.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/operations/_digital_twins_endpoint_operations.py index 840470574fa5..8fef1804a4e4 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/operations/_digital_twins_endpoint_operations.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/operations/_digital_twins_endpoint_operations.py @@ -32,7 +32,7 @@ class DigitalTwinsEndpointOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.digitaltwins.models + :type models: ~azure.mgmt.digitaltwins.v2020_12_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -63,7 +63,7 @@ def list( :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DigitalTwinsEndpointResourceListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResourceListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsEndpointResourceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DigitalTwinsEndpointResourceListResult"] @@ -113,7 +113,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) @@ -143,7 +143,7 @@ def get( :type endpoint_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DigitalTwinsEndpointResource, or the result of cls(response) - :rtype: ~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResource + :rtype: ~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsEndpointResource :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DigitalTwinsEndpointResource"] @@ -178,7 +178,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('DigitalTwinsEndpointResource', pipeline_response) @@ -235,7 +235,7 @@ def _create_or_update_initial( 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: @@ -269,15 +269,15 @@ def begin_create_or_update( :param endpoint_name: Name of Endpoint Resource. :type endpoint_name: str :param endpoint_description: The DigitalTwinsInstance endpoint metadata and security metadata. - :type endpoint_description: ~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResource + :type endpoint_description: ~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsEndpointResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either DigitalTwinsEndpointResource or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResource] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsEndpointResource] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -368,7 +368,7 @@ def _delete_initial( if response.status_code not in [200, 202, 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) deserialized = None @@ -403,12 +403,12 @@ def begin_delete( :type endpoint_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either DigitalTwinsEndpointResource or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.digitaltwins.models.DigitalTwinsEndpointResource] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsEndpointResource] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/operations/_digital_twins_operations.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/operations/_digital_twins_operations.py index 99a65cc94d6c..407460e730c6 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/operations/_digital_twins_operations.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/operations/_digital_twins_operations.py @@ -32,7 +32,7 @@ class DigitalTwinsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.digitaltwins.models + :type models: ~azure.mgmt.digitaltwins.v2020_12_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -63,7 +63,7 @@ def get( :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DigitalTwinsDescription, or the result of cls(response) - :rtype: ~azure.mgmt.digitaltwins.models.DigitalTwinsDescription + :rtype: ~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsDescription :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DigitalTwinsDescription"] @@ -97,7 +97,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('DigitalTwinsDescription', pipeline_response) @@ -152,7 +152,7 @@ def _create_or_update_initial( 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: @@ -185,15 +185,15 @@ def begin_create_or_update( :param resource_name: The name of the DigitalTwinsInstance. :type resource_name: str :param digital_twins_create: The DigitalTwinsInstance and security metadata. - :type digital_twins_create: ~azure.mgmt.digitaltwins.models.DigitalTwinsDescription + :type digital_twins_create: ~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsDescription :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either DigitalTwinsDescription or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.digitaltwins.models.DigitalTwinsDescription] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsDescription] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -286,7 +286,7 @@ def _update_initial( if response.status_code not in [200, 202]: 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: @@ -317,15 +317,15 @@ def begin_update( :param resource_name: The name of the DigitalTwinsInstance. :type resource_name: str :param digital_twins_patch_description: The DigitalTwinsInstance and security metadata. - :type digital_twins_patch_description: ~azure.mgmt.digitaltwins.models.DigitalTwinsPatchDescription + :type digital_twins_patch_description: ~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsPatchDescription :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either DigitalTwinsDescription or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.digitaltwins.models.DigitalTwinsDescription] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsDescription] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -412,7 +412,7 @@ def _delete_initial( if response.status_code not in [200, 202, 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) deserialized = None @@ -444,12 +444,12 @@ def begin_delete( :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either DigitalTwinsDescription or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.digitaltwins.models.DigitalTwinsDescription] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsDescription] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -506,7 +506,7 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DigitalTwinsDescriptionListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.digitaltwins.models.DigitalTwinsDescriptionListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsDescriptionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DigitalTwinsDescriptionListResult"] @@ -554,7 +554,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) @@ -578,7 +578,7 @@ def list_by_resource_group( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DigitalTwinsDescriptionListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.digitaltwins.models.DigitalTwinsDescriptionListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.digitaltwins.v2020_12_01.models.DigitalTwinsDescriptionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DigitalTwinsDescriptionListResult"] @@ -627,7 +627,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) @@ -651,10 +651,10 @@ def check_name_availability( :type location: str :param digital_twins_instance_check_name: Set the name parameter in the DigitalTwinsInstanceCheckName structure to the name of the DigitalTwinsInstance to check. - :type digital_twins_instance_check_name: ~azure.mgmt.digitaltwins.models.CheckNameRequest + :type digital_twins_instance_check_name: ~azure.mgmt.digitaltwins.v2020_12_01.models.CheckNameRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: CheckNameResult, or the result of cls(response) - :rtype: ~azure.mgmt.digitaltwins.models.CheckNameResult + :rtype: ~azure.mgmt.digitaltwins.v2020_12_01.models.CheckNameResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameResult"] @@ -692,7 +692,7 @@ def check_name_availability( 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('CheckNameResult', pipeline_response) diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/operations/_operations.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/operations/_operations.py index f2349ff4ebe5..520b586f9002 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/operations/_operations.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/operations/_operations.py @@ -30,7 +30,7 @@ class Operations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.digitaltwins.models + :type models: ~azure.mgmt.digitaltwins.v2020_12_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -54,7 +54,7 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OperationListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.digitaltwins.models.OperationListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.digitaltwins.v2020_12_01.models.OperationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] @@ -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/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/operations/_private_endpoint_connections_operations.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/operations/_private_endpoint_connections_operations.py index f1974fc0106a..10302c76f596 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/operations/_private_endpoint_connections_operations.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/operations/_private_endpoint_connections_operations.py @@ -31,7 +31,7 @@ class PrivateEndpointConnectionsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.digitaltwins.models + :type models: ~azure.mgmt.digitaltwins.v2020_12_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -62,7 +62,7 @@ def list( :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PrivateEndpointConnectionsResponse, or the result of cls(response) - :rtype: ~azure.mgmt.digitaltwins.models.PrivateEndpointConnectionsResponse + :rtype: ~azure.mgmt.digitaltwins.v2020_12_01.models.PrivateEndpointConnectionsResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionsResponse"] @@ -96,7 +96,7 @@ def list( 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('PrivateEndpointConnectionsResponse', pipeline_response) @@ -126,7 +126,7 @@ def get( :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PrivateEndpointConnection, or the result of cls(response) - :rtype: ~azure.mgmt.digitaltwins.models.PrivateEndpointConnection + :rtype: ~azure.mgmt.digitaltwins.v2020_12_01.models.PrivateEndpointConnection :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] @@ -161,7 +161,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('PrivateEndpointConnection', pipeline_response) @@ -212,7 +212,7 @@ def _delete_initial( if response.status_code not in [200, 202, 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: @@ -239,8 +239,8 @@ def begin_delete( :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -337,7 +337,7 @@ def _create_or_update_initial( if response.status_code not in [200, 202]: 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: @@ -371,15 +371,15 @@ def begin_create_or_update( :param private_endpoint_connection_name: The name of the private endpoint connection. :type private_endpoint_connection_name: str :param private_endpoint_connection: The private endpoint connection with updated properties. - :type private_endpoint_connection: ~azure.mgmt.digitaltwins.models.PrivateEndpointConnection + :type private_endpoint_connection: ~azure.mgmt.digitaltwins.v2020_12_01.models.PrivateEndpointConnection :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.digitaltwins.models.PrivateEndpointConnection] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.digitaltwins.v2020_12_01.models.PrivateEndpointConnection] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/operations/_private_link_resources_operations.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/operations/_private_link_resources_operations.py index 2e7f490dc0ba..6d96a2c1cc33 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/operations/_private_link_resources_operations.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_12_01/operations/_private_link_resources_operations.py @@ -29,7 +29,7 @@ class PrivateLinkResourcesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.digitaltwins.models + :type models: ~azure.mgmt.digitaltwins.v2020_12_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -60,7 +60,7 @@ def list( :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: GroupIdInformationResponse, or the result of cls(response) - :rtype: ~azure.mgmt.digitaltwins.models.GroupIdInformationResponse + :rtype: ~azure.mgmt.digitaltwins.v2020_12_01.models.GroupIdInformationResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.GroupIdInformationResponse"] @@ -94,7 +94,7 @@ def list( 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('GroupIdInformationResponse', pipeline_response) @@ -124,7 +124,7 @@ def get( :type resource_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: GroupIdInformation, or the result of cls(response) - :rtype: ~azure.mgmt.digitaltwins.models.GroupIdInformation + :rtype: ~azure.mgmt.digitaltwins.v2020_12_01.models.GroupIdInformation :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.GroupIdInformation"] @@ -159,7 +159,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('GroupIdInformation', pipeline_response) diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/setup.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/setup.py index 9efd07846177..61426cf3f719 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/setup.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/setup.py @@ -80,7 +80,7 @@ 'azure.mgmt', ]), install_requires=[ - 'msrest>=0.5.0', + 'msrest>=0.6.21', 'azure-mgmt-core>=1.2.0,<2.0.0', 'azure-common~=1.1', ], diff --git a/shared_requirements.txt b/shared_requirements.txt index fb233b94cd7f..b6fe23282a92 100644 --- a/shared_requirements.txt +++ b/shared_requirements.txt @@ -271,6 +271,8 @@ opentelemetry-sdk<2.0.0,>=1.0.0 #override azure-mgmt-elastic msrest>=0.6.21 #override azure-mgmt-confidentialledger msrest>=0.6.21 #override azure-mgmt-mixedreality msrest>=0.6.21 +#override azure-mgmt-extendedlocation msrest>=0.6.21 +#override azure-mgmt-digitaltwins msrest>=0.6.21 #override azure-mgmt-trafficmanager msrest>=0.6.21 #override azure-mgmt-storagecache msrest>=0.6.21 #override azure-mgmt-videoanalyzer msrest>=0.6.21