diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/CHANGELOG.md b/sdk/connectedcache/azure-mgmt-connectedcache/CHANGELOG.md index 37753eb037f7..bc0fec9cf0a1 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/CHANGELOG.md +++ b/sdk/connectedcache/azure-mgmt-connectedcache/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 1.0.0b2 (2025-05-13) + +### Features Added + + - Method `Operation.__init__` has a new overload `def __init__(self: None, display: Optional[_models.OperationDisplay])` + ## 1.0.0b1 (2024-11-21) ### Other Changes diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/README.md b/sdk/connectedcache/azure-mgmt-connectedcache/README.md index 79307778f62a..f90866e50802 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/README.md +++ b/sdk/connectedcache/azure-mgmt-connectedcache/README.md @@ -1,7 +1,7 @@ # Microsoft Azure SDK for Python This is the Microsoft Azure Connectedcache Management Client Library. -This package has been tested with Python 3.8+. +This package has been tested with Python 3.9+. For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). ## _Disclaimer_ @@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For ### Prerequisites -- Python 3.8+ is required to use this package. +- Python 3.9+ is required to use this package. - [Azure subscription](https://azure.microsoft.com/free/) ### Install the package @@ -24,7 +24,7 @@ pip install azure-identity ### Authentication -By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables. +By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/_meta.json b/sdk/connectedcache/azure-mgmt-connectedcache/_meta.json index b4a21ddfeacf..582ad321babf 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/_meta.json +++ b/sdk/connectedcache/azure-mgmt-connectedcache/_meta.json @@ -1,6 +1,6 @@ { - "commit": "14f4f6b25fe74f90f4ee74fdac5cd7e05d419245", + "commit": "b9a8c9e8eb8998a222f126a005d1ab633f1daad9", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "typespec_src": "specification/connectedcache/ConnectedCache.Management", - "@azure-tools/typespec-python": "0.36.4" + "@azure-tools/typespec-python": "0.44.2" } \ No newline at end of file diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/apiview-properties.json b/sdk/connectedcache/azure-mgmt-connectedcache/apiview-properties.json new file mode 100644 index 000000000000..ec96e6a8b0a8 --- /dev/null +++ b/sdk/connectedcache/azure-mgmt-connectedcache/apiview-properties.json @@ -0,0 +1,121 @@ +{ + "CrossLanguagePackageId": "Microsoft.ConnectedCache", + "CrossLanguageDefinitionId": { + "azure.mgmt.connectedcache.models.AdditionalCacheNodeProperties": "Microsoft.ConnectedCache.AdditionalCacheNodeProperties", + "azure.mgmt.connectedcache.models.AdditionalCustomerProperties": "Microsoft.ConnectedCache.AdditionalCustomerProperties", + "azure.mgmt.connectedcache.models.BgpCidrsConfiguration": "Microsoft.ConnectedCache.BgpCidrsConfiguration", + "azure.mgmt.connectedcache.models.BgpConfiguration": "Microsoft.ConnectedCache.BgpConfiguration", + "azure.mgmt.connectedcache.models.CacheNodeDriveConfiguration": "Microsoft.ConnectedCache.CacheNodeDriveConfiguration", + "azure.mgmt.connectedcache.models.CacheNodeEntity": "Microsoft.ConnectedCache.CacheNodeEntity", + "azure.mgmt.connectedcache.models.CacheNodeInstallProperties": "Microsoft.ConnectedCache.CacheNodeInstallProperties", + "azure.mgmt.connectedcache.models.CacheNodeOldResponse": "Microsoft.ConnectedCache.CacheNodeOldResponse", + "azure.mgmt.connectedcache.models.Resource": "Azure.ResourceManager.CommonTypes.Resource", + "azure.mgmt.connectedcache.models.TrackedResource": "Azure.ResourceManager.CommonTypes.TrackedResource", + "azure.mgmt.connectedcache.models.CacheNodePreviewResource": "Microsoft.ConnectedCache.CacheNodePreviewResource", + "azure.mgmt.connectedcache.models.CacheNodeProperty": "Microsoft.ConnectedCache.CacheNodeProperty", + "azure.mgmt.connectedcache.models.ConnectedCachePatchResource": "Microsoft.ConnectedCache.ConnectedCachePatchResource", + "azure.mgmt.connectedcache.models.CustomerEntity": "Microsoft.ConnectedCache.CustomerEntity", + "azure.mgmt.connectedcache.models.CustomerProperty": "Microsoft.ConnectedCache.CustomerProperty", + "azure.mgmt.connectedcache.models.EnterpriseMccCacheNodeResource": "Microsoft.ConnectedCache.EnterpriseMccCacheNodeResource", + "azure.mgmt.connectedcache.models.EnterpriseMccCustomerResource": "Microsoft.ConnectedCache.EnterpriseMccCustomerResource", + "azure.mgmt.connectedcache.models.EnterprisePreviewResource": "Microsoft.ConnectedCache.EnterprisePreviewResource", + "azure.mgmt.connectedcache.models.ErrorAdditionalInfo": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "azure.mgmt.connectedcache.models.ErrorDetail": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "azure.mgmt.connectedcache.models.ErrorResponse": "Azure.ResourceManager.CommonTypes.ErrorResponse", + "azure.mgmt.connectedcache.models.IspCacheNodeResource": "Microsoft.ConnectedCache.IspCacheNodeResource", + "azure.mgmt.connectedcache.models.IspCustomerResource": "Microsoft.ConnectedCache.IspCustomerResource", + "azure.mgmt.connectedcache.models.MccCacheNodeBgpCidrDetails": "Microsoft.ConnectedCache.MccCacheNodeBgpCidrDetails", + "azure.mgmt.connectedcache.models.MccCacheNodeInstallDetails": "Microsoft.ConnectedCache.MccCacheNodeInstallDetails", + "azure.mgmt.connectedcache.models.Operation": "Azure.ResourceManager.CommonTypes.Operation", + "azure.mgmt.connectedcache.models.OperationDisplay": "Azure.ResourceManager.CommonTypes.OperationDisplay", + "azure.mgmt.connectedcache.models.ProxyUrlConfiguration": "Microsoft.ConnectedCache.ProxyUrlConfiguration", + "azure.mgmt.connectedcache.models.SystemData": "Azure.ResourceManager.CommonTypes.SystemData", + "azure.mgmt.connectedcache.models.Origin": "Azure.ResourceManager.CommonTypes.Origin", + "azure.mgmt.connectedcache.models.ActionType": "Azure.ResourceManager.CommonTypes.ActionType", + "azure.mgmt.connectedcache.models.CreatedByType": "Azure.ResourceManager.CommonTypes.createdByType", + "azure.mgmt.connectedcache.models.ProvisioningState": "Microsoft.ConnectedCache.ProvisioningState", + "azure.mgmt.connectedcache.models.CustomerTransitState": "Microsoft.ConnectedCache.CustomerTransitState", + "azure.mgmt.connectedcache.models.BgpReviewStateEnum": "Microsoft.ConnectedCache.BgpReviewStateEnum", + "azure.mgmt.connectedcache.models.ConfigurationState": "Microsoft.ConnectedCache.ConfigurationState", + "azure.mgmt.connectedcache.models.AutoUpdateRingType": "Microsoft.ConnectedCache.autoUpdateRingType", + "azure.mgmt.connectedcache.models.ProxyRequired": "Microsoft.ConnectedCache.ProxyRequired", + "azure.mgmt.connectedcache.models.OsType": "Microsoft.ConnectedCache.OsType", + "azure.mgmt.connectedcache.models.CycleType": "Microsoft.ConnectedCache.CycleType", + "azure.mgmt.connectedcache.operations.Operations.list": "Azure.ResourceManager.Operations.list", + "azure.mgmt.connectedcache.aio.operations.Operations.list": "Azure.ResourceManager.Operations.list", + "azure.mgmt.connectedcache.operations.EnterpriseCustomerOperationsOperations.get": "Microsoft.ConnectedCache.EnterpriseCustomerOperations.get", + "azure.mgmt.connectedcache.aio.operations.EnterpriseCustomerOperationsOperations.get": "Microsoft.ConnectedCache.EnterpriseCustomerOperations.get", + "azure.mgmt.connectedcache.operations.EnterpriseCustomerOperationsOperations.begin_create_or_update": "Microsoft.ConnectedCache.EnterpriseCustomerOperations.createOrUpdate", + "azure.mgmt.connectedcache.aio.operations.EnterpriseCustomerOperationsOperations.begin_create_or_update": "Microsoft.ConnectedCache.EnterpriseCustomerOperations.createOrUpdate", + "azure.mgmt.connectedcache.operations.EnterpriseCustomerOperationsOperations.update": "Microsoft.ConnectedCache.EnterpriseCustomerOperations.update", + "azure.mgmt.connectedcache.aio.operations.EnterpriseCustomerOperationsOperations.update": "Microsoft.ConnectedCache.EnterpriseCustomerOperations.update", + "azure.mgmt.connectedcache.operations.EnterpriseCustomerOperationsOperations.delete": "Microsoft.ConnectedCache.EnterpriseCustomerOperations.delete", + "azure.mgmt.connectedcache.aio.operations.EnterpriseCustomerOperationsOperations.delete": "Microsoft.ConnectedCache.EnterpriseCustomerOperations.delete", + "azure.mgmt.connectedcache.operations.EnterpriseCustomerOperationsOperations.list_by_resource_group": "Microsoft.ConnectedCache.EnterpriseCustomerOperations.listByResourceGroup", + "azure.mgmt.connectedcache.aio.operations.EnterpriseCustomerOperationsOperations.list_by_resource_group": "Microsoft.ConnectedCache.EnterpriseCustomerOperations.listByResourceGroup", + "azure.mgmt.connectedcache.operations.EnterpriseCustomerOperationsOperations.list_by_subscription": "Microsoft.ConnectedCache.EnterpriseCustomerOperations.listBySubscription", + "azure.mgmt.connectedcache.aio.operations.EnterpriseCustomerOperationsOperations.list_by_subscription": "Microsoft.ConnectedCache.EnterpriseCustomerOperations.listBySubscription", + "azure.mgmt.connectedcache.operations.CacheNodesOperationsOperations.get": "Microsoft.ConnectedCache.CacheNodesOperations.get", + "azure.mgmt.connectedcache.aio.operations.CacheNodesOperationsOperations.get": "Microsoft.ConnectedCache.CacheNodesOperations.get", + "azure.mgmt.connectedcache.operations.CacheNodesOperationsOperations.begin_createor_update": "Microsoft.ConnectedCache.CacheNodesOperations.createorUpdate", + "azure.mgmt.connectedcache.aio.operations.CacheNodesOperationsOperations.begin_createor_update": "Microsoft.ConnectedCache.CacheNodesOperations.createorUpdate", + "azure.mgmt.connectedcache.operations.CacheNodesOperationsOperations.delete": "Microsoft.ConnectedCache.CacheNodesOperations.delete", + "azure.mgmt.connectedcache.aio.operations.CacheNodesOperationsOperations.delete": "Microsoft.ConnectedCache.CacheNodesOperations.delete", + "azure.mgmt.connectedcache.operations.CacheNodesOperationsOperations.update": "Microsoft.ConnectedCache.CacheNodesOperations.update", + "azure.mgmt.connectedcache.aio.operations.CacheNodesOperationsOperations.update": "Microsoft.ConnectedCache.CacheNodesOperations.update", + "azure.mgmt.connectedcache.operations.CacheNodesOperationsOperations.list_by_resource_group": "Microsoft.ConnectedCache.CacheNodesOperations.listByResourceGroup", + "azure.mgmt.connectedcache.aio.operations.CacheNodesOperationsOperations.list_by_resource_group": "Microsoft.ConnectedCache.CacheNodesOperations.listByResourceGroup", + "azure.mgmt.connectedcache.operations.CacheNodesOperationsOperations.list_by_subscription": "Microsoft.ConnectedCache.CacheNodesOperations.listBySubscription", + "azure.mgmt.connectedcache.aio.operations.CacheNodesOperationsOperations.list_by_subscription": "Microsoft.ConnectedCache.CacheNodesOperations.listBySubscription", + "azure.mgmt.connectedcache.operations.IspCustomersOperations.get": "Microsoft.ConnectedCache.IspCustomers.get", + "azure.mgmt.connectedcache.aio.operations.IspCustomersOperations.get": "Microsoft.ConnectedCache.IspCustomers.get", + "azure.mgmt.connectedcache.operations.IspCustomersOperations.begin_create_or_update": "Microsoft.ConnectedCache.IspCustomers.createOrUpdate", + "azure.mgmt.connectedcache.aio.operations.IspCustomersOperations.begin_create_or_update": "Microsoft.ConnectedCache.IspCustomers.createOrUpdate", + "azure.mgmt.connectedcache.operations.IspCustomersOperations.update": "Microsoft.ConnectedCache.IspCustomers.update", + "azure.mgmt.connectedcache.aio.operations.IspCustomersOperations.update": "Microsoft.ConnectedCache.IspCustomers.update", + "azure.mgmt.connectedcache.operations.IspCustomersOperations.begin_delete": "Microsoft.ConnectedCache.IspCustomers.delete", + "azure.mgmt.connectedcache.aio.operations.IspCustomersOperations.begin_delete": "Microsoft.ConnectedCache.IspCustomers.delete", + "azure.mgmt.connectedcache.operations.IspCustomersOperations.list_by_resource_group": "Microsoft.ConnectedCache.IspCustomers.listByResourceGroup", + "azure.mgmt.connectedcache.aio.operations.IspCustomersOperations.list_by_resource_group": "Microsoft.ConnectedCache.IspCustomers.listByResourceGroup", + "azure.mgmt.connectedcache.operations.IspCustomersOperations.list_by_subscription": "Microsoft.ConnectedCache.IspCustomers.listBySubscription", + "azure.mgmt.connectedcache.aio.operations.IspCustomersOperations.list_by_subscription": "Microsoft.ConnectedCache.IspCustomers.listBySubscription", + "azure.mgmt.connectedcache.operations.IspCacheNodesOperationsOperations.get": "Microsoft.ConnectedCache.IspCacheNodesOperations.get", + "azure.mgmt.connectedcache.aio.operations.IspCacheNodesOperationsOperations.get": "Microsoft.ConnectedCache.IspCacheNodesOperations.get", + "azure.mgmt.connectedcache.operations.IspCacheNodesOperationsOperations.begin_create_or_update": "Microsoft.ConnectedCache.IspCacheNodesOperations.createOrUpdate", + "azure.mgmt.connectedcache.aio.operations.IspCacheNodesOperationsOperations.begin_create_or_update": "Microsoft.ConnectedCache.IspCacheNodesOperations.createOrUpdate", + "azure.mgmt.connectedcache.operations.IspCacheNodesOperationsOperations.update": "Microsoft.ConnectedCache.IspCacheNodesOperations.update", + "azure.mgmt.connectedcache.aio.operations.IspCacheNodesOperationsOperations.update": "Microsoft.ConnectedCache.IspCacheNodesOperations.update", + "azure.mgmt.connectedcache.operations.IspCacheNodesOperationsOperations.begin_delete": "Microsoft.ConnectedCache.IspCacheNodesOperations.delete", + "azure.mgmt.connectedcache.aio.operations.IspCacheNodesOperationsOperations.begin_delete": "Microsoft.ConnectedCache.IspCacheNodesOperations.delete", + "azure.mgmt.connectedcache.operations.IspCacheNodesOperationsOperations.list_by_isp_customer_resource": "Microsoft.ConnectedCache.IspCacheNodesOperations.listByIspCustomerResource", + "azure.mgmt.connectedcache.aio.operations.IspCacheNodesOperationsOperations.list_by_isp_customer_resource": "Microsoft.ConnectedCache.IspCacheNodesOperations.listByIspCustomerResource", + "azure.mgmt.connectedcache.operations.IspCacheNodesOperationsOperations.get_bgp_cidrs": "Microsoft.ConnectedCache.IspCacheNodesOperations.getBgpCidrs", + "azure.mgmt.connectedcache.aio.operations.IspCacheNodesOperationsOperations.get_bgp_cidrs": "Microsoft.ConnectedCache.IspCacheNodesOperations.getBgpCidrs", + "azure.mgmt.connectedcache.operations.IspCacheNodesOperationsOperations.get_cache_node_install_details": "Microsoft.ConnectedCache.IspCacheNodesOperations.getCacheNodeInstallDetails", + "azure.mgmt.connectedcache.aio.operations.IspCacheNodesOperationsOperations.get_cache_node_install_details": "Microsoft.ConnectedCache.IspCacheNodesOperations.getCacheNodeInstallDetails", + "azure.mgmt.connectedcache.operations.EnterpriseMccCustomersOperations.get": "Microsoft.ConnectedCache.EnterpriseMccCustomers.get", + "azure.mgmt.connectedcache.aio.operations.EnterpriseMccCustomersOperations.get": "Microsoft.ConnectedCache.EnterpriseMccCustomers.get", + "azure.mgmt.connectedcache.operations.EnterpriseMccCustomersOperations.begin_create_or_update": "Microsoft.ConnectedCache.EnterpriseMccCustomers.createOrUpdate", + "azure.mgmt.connectedcache.aio.operations.EnterpriseMccCustomersOperations.begin_create_or_update": "Microsoft.ConnectedCache.EnterpriseMccCustomers.createOrUpdate", + "azure.mgmt.connectedcache.operations.EnterpriseMccCustomersOperations.update": "Microsoft.ConnectedCache.EnterpriseMccCustomers.update", + "azure.mgmt.connectedcache.aio.operations.EnterpriseMccCustomersOperations.update": "Microsoft.ConnectedCache.EnterpriseMccCustomers.update", + "azure.mgmt.connectedcache.operations.EnterpriseMccCustomersOperations.begin_delete": "Microsoft.ConnectedCache.EnterpriseMccCustomers.delete", + "azure.mgmt.connectedcache.aio.operations.EnterpriseMccCustomersOperations.begin_delete": "Microsoft.ConnectedCache.EnterpriseMccCustomers.delete", + "azure.mgmt.connectedcache.operations.EnterpriseMccCustomersOperations.list_by_resource_group": "Microsoft.ConnectedCache.EnterpriseMccCustomers.listByResourceGroup", + "azure.mgmt.connectedcache.aio.operations.EnterpriseMccCustomersOperations.list_by_resource_group": "Microsoft.ConnectedCache.EnterpriseMccCustomers.listByResourceGroup", + "azure.mgmt.connectedcache.operations.EnterpriseMccCustomersOperations.list_by_subscription": "Microsoft.ConnectedCache.EnterpriseMccCustomers.listBySubscription", + "azure.mgmt.connectedcache.aio.operations.EnterpriseMccCustomersOperations.list_by_subscription": "Microsoft.ConnectedCache.EnterpriseMccCustomers.listBySubscription", + "azure.mgmt.connectedcache.operations.EnterpriseMccCacheNodesOperationsOperations.get": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.get", + "azure.mgmt.connectedcache.aio.operations.EnterpriseMccCacheNodesOperationsOperations.get": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.get", + "azure.mgmt.connectedcache.operations.EnterpriseMccCacheNodesOperationsOperations.begin_create_or_update": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.createOrUpdate", + "azure.mgmt.connectedcache.aio.operations.EnterpriseMccCacheNodesOperationsOperations.begin_create_or_update": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.createOrUpdate", + "azure.mgmt.connectedcache.operations.EnterpriseMccCacheNodesOperationsOperations.update": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.update", + "azure.mgmt.connectedcache.aio.operations.EnterpriseMccCacheNodesOperationsOperations.update": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.update", + "azure.mgmt.connectedcache.operations.EnterpriseMccCacheNodesOperationsOperations.begin_delete": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.delete", + "azure.mgmt.connectedcache.aio.operations.EnterpriseMccCacheNodesOperationsOperations.begin_delete": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.delete", + "azure.mgmt.connectedcache.operations.EnterpriseMccCacheNodesOperationsOperations.list_by_enterprise_mcc_customer_resource": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.listByEnterpriseMccCustomerResource", + "azure.mgmt.connectedcache.aio.operations.EnterpriseMccCacheNodesOperationsOperations.list_by_enterprise_mcc_customer_resource": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.listByEnterpriseMccCustomerResource", + "azure.mgmt.connectedcache.operations.EnterpriseMccCacheNodesOperationsOperations.get_cache_node_install_details": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.getCacheNodeInstallDetails", + "azure.mgmt.connectedcache.aio.operations.EnterpriseMccCacheNodesOperationsOperations.get_cache_node_install_details": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.getCacheNodeInstallDetails" + } +} \ No newline at end of file diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_client.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_client.py index 9b387fe4e557..434037eee8a9 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_client.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_client.py @@ -7,16 +7,18 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING, cast from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import HttpRequest, HttpResponse +from azure.core.settings import settings from azure.mgmt.core import ARMPipelineClient from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints from ._configuration import ConnectedCacheMgmtClientConfiguration -from ._serialization import Deserializer, Serializer +from ._utils.serialization import Deserializer, Serializer from .operations import ( CacheNodesOperationsOperations, EnterpriseCustomerOperationsOperations, @@ -58,7 +60,7 @@ class ConnectedCacheMgmtClient: # pylint: disable=too-many-instance-attributes :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :param base_url: Service host. Default value is "https://management.azure.com". + :param base_url: Service host. Default value is None. :type base_url: str :keyword api_version: The API version to use for this operation. Default value is "2023-05-01-preview". Note that overriding this default value may result in unsupported @@ -69,16 +71,22 @@ class ConnectedCacheMgmtClient: # pylint: disable=too-many-instance-attributes """ def __init__( - self, - credential: "TokenCredential", - subscription_id: str, - base_url: str = "https://management.azure.com", - **kwargs: Any + self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any ) -> None: _endpoint = "{endpoint}" + _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = ConnectedCacheMgmtClientConfiguration( - credential=credential, subscription_id=subscription_id, base_url=base_url, **kwargs + credential=credential, + subscription_id=subscription_id, + base_url=cast(str, base_url), + credential_scopes=credential_scopes, + **kwargs ) + _policies = kwargs.pop("policies", None) if _policies is None: _policies = [ @@ -97,7 +105,7 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: ARMPipelineClient = ARMPipelineClient(base_url=_endpoint, policies=_policies, **kwargs) + self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, _endpoint), policies=_policies, **kwargs) self._serialize = Serializer() self._deserialize = Deserializer() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_patch.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_patch.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# 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. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_utils/__init__.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_utils/__init__.py new file mode 100644 index 000000000000..8026245c2abc --- /dev/null +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_utils/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_model_base.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_utils/model_base.py similarity index 92% rename from sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_model_base.py rename to sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_utils/model_base.py index e6a2730f9276..49d5c7259389 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_model_base.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_utils/model_base.py @@ -2,8 +2,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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=protected-access, broad-except @@ -21,6 +22,7 @@ from datetime import datetime, date, time, timedelta, timezone from json import JSONEncoder import xml.etree.ElementTree as ET +from collections.abc import MutableMapping from typing_extensions import Self import isodate from azure.core.exceptions import DeserializationError @@ -28,11 +30,6 @@ from azure.core.pipeline import PipelineResponse from azure.core.serialization import _Null -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping - _LOGGER = logging.getLogger(__name__) __all__ = ["SdkJSONEncoder", "Model", "rest_field", "rest_discriminator"] @@ -347,7 +344,7 @@ def _get_model(module_name: str, model_name: str): _UNSET = object() -class _MyMutableMapping(MutableMapping[str, typing.Any]): # pylint: disable=unsubscriptable-object +class _MyMutableMapping(MutableMapping[str, typing.Any]): def __init__(self, data: typing.Dict[str, typing.Any]) -> None: self._data = data @@ -373,50 +370,97 @@ def __ne__(self, other: typing.Any) -> bool: return not self.__eq__(other) def keys(self) -> typing.KeysView[str]: + """ + :returns: a set-like object providing a view on D's keys + :rtype: ~typing.KeysView + """ return self._data.keys() def values(self) -> typing.ValuesView[typing.Any]: + """ + :returns: an object providing a view on D's values + :rtype: ~typing.ValuesView + """ return self._data.values() def items(self) -> typing.ItemsView[str, typing.Any]: + """ + :returns: set-like object providing a view on D's items + :rtype: ~typing.ItemsView + """ return self._data.items() def get(self, key: str, default: typing.Any = None) -> typing.Any: + """ + Get the value for key if key is in the dictionary, else default. + :param str key: The key to look up. + :param any default: The value to return if key is not in the dictionary. Defaults to None + :returns: D[k] if k in D, else d. + :rtype: any + """ try: return self[key] except KeyError: return default @typing.overload - def pop(self, key: str) -> typing.Any: ... + def pop(self, key: str) -> typing.Any: ... # pylint: disable=arguments-differ @typing.overload - def pop(self, key: str, default: _T) -> _T: ... + def pop(self, key: str, default: _T) -> _T: ... # pylint: disable=signature-differs @typing.overload - def pop(self, key: str, default: typing.Any) -> typing.Any: ... + def pop(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any: + """ + Removes specified key and return the corresponding value. + :param str key: The key to pop. + :param any default: The value to return if key is not in the dictionary + :returns: The value corresponding to the key. + :rtype: any + :raises KeyError: If key is not found and default is not given. + """ if default is _UNSET: return self._data.pop(key) return self._data.pop(key, default) def popitem(self) -> typing.Tuple[str, typing.Any]: + """ + Removes and returns some (key, value) pair + :returns: The (key, value) pair. + :rtype: tuple + :raises KeyError: if D is empty. + """ return self._data.popitem() def clear(self) -> None: + """ + Remove all items from D. + """ self._data.clear() - def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: + def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: # pylint: disable=arguments-differ + """ + Updates D from mapping/iterable E and F. + :param any args: Either a mapping object or an iterable of key-value pairs. + """ self._data.update(*args, **kwargs) @typing.overload def setdefault(self, key: str, default: None = None) -> None: ... @typing.overload - def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... + def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any: + """ + Same as calling D.get(k, d), and setting D[k]=d if k not found + :param str key: The key to look up. + :param any default: The value to set if key is not in the dictionary + :returns: D[k] if k in D, else d. + :rtype: any + """ if default is _UNSET: return self._data.setdefault(key) return self._data.setdefault(key, default) @@ -597,7 +641,7 @@ def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: cls._attr_to_rest_field: typing.Dict[str, _RestField] = dict(attr_to_rest_field.items()) cls._calculated.add(f"{cls.__module__}.{cls.__qualname__}") - return super().__new__(cls) # pylint: disable=no-value-for-parameter + return super().__new__(cls) def __init_subclass__(cls, discriminator: typing.Optional[str] = None) -> None: for base in cls.__bases__: @@ -633,7 +677,7 @@ def _deserialize(cls, data, exist_discriminators): discriminator_value = data.find(xml_name).text # pyright: ignore else: discriminator_value = data.get(discriminator._rest_name) - mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore + mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore # pylint: disable=no-member return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: @@ -754,7 +798,7 @@ def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-retur except AttributeError: model_name = annotation if module is not None: - annotation = _get_model(module, model_name) + annotation = _get_model(module, model_name) # type: ignore try: if module and _is_model(annotation): @@ -894,6 +938,35 @@ def _deserialize( return _deserialize_with_callable(deserializer, value) +def _failsafe_deserialize( + deserializer: typing.Any, + value: typing.Any, + module: typing.Optional[str] = None, + rf: typing.Optional["_RestField"] = None, + format: typing.Optional[str] = None, +) -> typing.Any: + try: + return _deserialize(deserializer, value, module, rf, format) + except DeserializationError: + _LOGGER.warning( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + +def _failsafe_deserialize_xml( + deserializer: typing.Any, + value: typing.Any, +) -> typing.Any: + try: + return _deserialize_xml(deserializer, value) + except DeserializationError: + _LOGGER.warning( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + class _RestField: def __init__( self, diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_serialization.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_utils/serialization.py similarity index 93% rename from sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_serialization.py rename to sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_utils/serialization.py index ce17d1798ce7..eb86ea23c965 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_serialization.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_utils/serialization.py @@ -1,28 +1,10 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# coding=utf-8 # -------------------------------------------------------------------------- -# # Copyright (c) Microsoft Corporation. All rights reserved. -# -# The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the ""Software""), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pyright: reportUnnecessaryTypeIgnoreComment=false @@ -48,9 +30,7 @@ IO, Mapping, Callable, - TypeVar, MutableMapping, - Type, List, ) @@ -61,13 +41,13 @@ import xml.etree.ElementTree as ET import isodate # type: ignore +from typing_extensions import Self from azure.core.exceptions import DeserializationError, SerializationError from azure.core.serialization import NULL as CoreNull _BOM = codecs.BOM_UTF8.decode(encoding="utf-8") -ModelType = TypeVar("ModelType", bound="Model") JSON = MutableMapping[str, Any] @@ -185,73 +165,7 @@ def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]], except NameError: _long_type = int - -class UTC(datetime.tzinfo): - """Time Zone info for handling UTC""" - - def utcoffset(self, dt): - """UTF offset for UTC is 0. - - :param datetime.datetime dt: The datetime - :returns: The offset - :rtype: datetime.timedelta - """ - return datetime.timedelta(0) - - def tzname(self, dt): - """Timestamp representation. - - :param datetime.datetime dt: The datetime - :returns: The timestamp representation - :rtype: str - """ - return "Z" - - def dst(self, dt): - """No daylight saving for UTC. - - :param datetime.datetime dt: The datetime - :returns: The daylight saving time - :rtype: datetime.timedelta - """ - return datetime.timedelta(hours=1) - - -try: - from datetime import timezone as _FixedOffset # type: ignore -except ImportError: # Python 2.7 - - class _FixedOffset(datetime.tzinfo): # type: ignore - """Fixed offset in minutes east from UTC. - Copy/pasted from Python doc - :param datetime.timedelta offset: offset in timedelta format - """ - - def __init__(self, offset) -> None: - self.__offset = offset - - def utcoffset(self, dt): - return self.__offset - - def tzname(self, dt): - return str(self.__offset.total_seconds() / 3600) - - def __repr__(self): - return "".format(self.tzname(None)) - - def dst(self, dt): - return datetime.timedelta(0) - - def __getinitargs__(self): - return (self.__offset,) - - -try: - from datetime import timezone - - TZ_UTC = timezone.utc -except ImportError: - TZ_UTC = UTC() # type: ignore +TZ_UTC = datetime.timezone.utc _FLATTEN = re.compile(r"(? ModelType: + def deserialize(cls, data: Any, content_type: Optional[str] = None) -> Self: """Parse a str using the RestAPI syntax and return a model. :param str data: A str using RestAPI structure. JSON by default. :param str content_type: JSON by default, set application/xml if XML. :returns: An instance of this model - :raises: DeserializationError if something went wrong - :rtype: ModelType + :raises DeserializationError: if something went wrong + :rtype: Self """ deserializer = Deserializer(cls._infer_class_models()) return deserializer(cls.__name__, data, content_type=content_type) # type: ignore @classmethod def from_dict( - cls: Type[ModelType], + cls, data: Any, key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None, content_type: Optional[str] = None, - ) -> ModelType: + ) -> Self: """Parse a dict using given key extractor return a model. By default consider key @@ -479,8 +393,8 @@ def from_dict( :param function key_extractors: A key extractor function. :param str content_type: JSON by default, set application/xml if XML. :returns: An instance of this model - :raises: DeserializationError if something went wrong - :rtype: ModelType + :raises DeserializationError: if something went wrong + :rtype: Self """ deserializer = Deserializer(cls._infer_class_models()) deserializer.key_extractors = ( # type: ignore @@ -563,7 +477,7 @@ def _decode_attribute_map_key(key): return key.replace("\\.", ".") -class Serializer(object): # pylint: disable=too-many-public-methods +class Serializer: # pylint: disable=too-many-public-methods """Request object model serializer.""" basic_types = {str: "str", int: "int", bool: "bool", float: "float"} @@ -626,7 +540,7 @@ def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, to :param object target_obj: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str, dict - :raises: SerializationError if serialization fails. + :raises SerializationError: if serialization fails. :returns: The serialized data. """ key_transformer = kwargs.get("key_transformer", self.key_transformer) @@ -736,8 +650,8 @@ def body(self, data, data_type, **kwargs): :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: dict - :raises: SerializationError if serialization fails. - :raises: ValueError if data is None + :raises SerializationError: if serialization fails. + :raises ValueError: if data is None :returns: The serialized request body """ @@ -781,8 +695,8 @@ def url(self, name, data, data_type, **kwargs): :param str data_type: The type to be serialized from. :rtype: str :returns: The serialized URL path - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :raises TypeError: if serialization fails. + :raises ValueError: if data is None """ try: output = self.serialize_data(data, data_type, **kwargs) @@ -805,8 +719,8 @@ def query(self, name, data, data_type, **kwargs): :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str, list - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :raises TypeError: if serialization fails. + :raises ValueError: if data is None :returns: The serialized query parameter """ try: @@ -835,8 +749,8 @@ def header(self, name, data, data_type, **kwargs): :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :raises TypeError: if serialization fails. + :raises ValueError: if data is None :returns: The serialized header """ try: @@ -855,9 +769,9 @@ def serialize_data(self, data, data_type, **kwargs): :param object data: The data to be serialized. :param str data_type: The type to be serialized from. - :raises: AttributeError if required data is None. - :raises: ValueError if data is None - :raises: SerializationError if serialization fails. + :raises AttributeError: if required data is None. + :raises ValueError: if data is None + :raises SerializationError: if serialization fails. :returns: The serialized data. :rtype: str, int, float, bool, dict, list """ @@ -1192,7 +1106,7 @@ def serialize_rfc(attr, **kwargs): # pylint: disable=unused-argument :param Datetime attr: Object to be serialized. :rtype: str - :raises: TypeError if format invalid. + :raises TypeError: if format invalid. :return: serialized rfc """ try: @@ -1218,7 +1132,7 @@ def serialize_iso(attr, **kwargs): # pylint: disable=unused-argument :param Datetime attr: Object to be serialized. :rtype: str - :raises: SerializationError if format invalid. + :raises SerializationError: if format invalid. :return: serialized iso """ if isinstance(attr, str): @@ -1251,7 +1165,7 @@ def serialize_unix(attr, **kwargs): # pylint: disable=unused-argument :param Datetime attr: Object to be serialized. :rtype: int - :raises: SerializationError if format invalid + :raises SerializationError: if format invalid :return: serialied unix """ if isinstance(attr, int): @@ -1429,7 +1343,7 @@ def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument # Iter and wrapped, should have found one node only (the wrap one) if len(children) != 1: raise DeserializationError( - "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( # pylint: disable=line-too-long + "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( xml_name ) ) @@ -1441,7 +1355,7 @@ def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument return children[0] -class Deserializer(object): +class Deserializer: """Response object model deserializer. :param dict classes: Class type dictionary for deserializing complex types. @@ -1488,7 +1402,7 @@ def __call__(self, target_obj, response_data, content_type=None): :param str target_obj: Target data type to deserialize to. :param requests.Response response_data: REST response object. :param str content_type: Swagger "produces" if available. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. :rtype: object """ @@ -1502,7 +1416,7 @@ def _deserialize(self, target_obj, data): # pylint: disable=inconsistent-return :param str target_obj: Target data type to deserialize to. :param object data: Object to deserialize. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. :rtype: object """ @@ -1683,17 +1597,21 @@ def _instantiate_model(self, response, attrs, additional_properties=None): subtype = getattr(response, "_subtype_map", {}) try: readonly = [ - k for k, v in response._validation.items() if v.get("readonly") # pylint: disable=protected-access + k + for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore + if v.get("readonly") ] const = [ - k for k, v in response._validation.items() if v.get("constant") # pylint: disable=protected-access + k + for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore + if v.get("constant") ] kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const} response_obj = response(**kwargs) for attr in readonly: setattr(response_obj, attr, attrs.get(attr)) if additional_properties: - response_obj.additional_properties = additional_properties + response_obj.additional_properties = additional_properties # type: ignore return response_obj except TypeError as err: msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore @@ -1713,7 +1631,7 @@ def deserialize_data(self, data, data_type): # pylint: disable=too-many-return- :param str data: The response string to be deserialized. :param str data_type: The type to deserialize to. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. :rtype: object """ @@ -1795,7 +1713,7 @@ def deserialize_object(self, attr, **kwargs): # pylint: disable=too-many-return :param dict attr: Dictionary to be deserialized. :return: Deserialized object. :rtype: dict - :raises: TypeError if non-builtin datatype encountered. + :raises TypeError: if non-builtin datatype encountered. """ if attr is None: return None @@ -1841,7 +1759,7 @@ def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return :param str data_type: deserialization data type. :return: Deserialized basic type. :rtype: str, int, float or bool - :raises: TypeError if string format is not valid. + :raises TypeError: if string format is not valid. """ # If we're here, data is supposed to be a basic type. # If it's still an XML node, take the text @@ -1932,7 +1850,7 @@ def deserialize_bytearray(attr): :param str attr: response string to be deserialized. :return: Deserialized bytearray :rtype: bytearray - :raises: TypeError if string format invalid. + :raises TypeError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1945,7 +1863,7 @@ def deserialize_base64(attr): :param str attr: response string to be deserialized. :return: Deserialized base64 string :rtype: bytearray - :raises: TypeError if string format invalid. + :raises TypeError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1960,7 +1878,7 @@ def deserialize_decimal(attr): :param str attr: response string to be deserialized. :return: Deserialized decimal - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. :rtype: decimal """ if isinstance(attr, ET.Element): @@ -1978,7 +1896,7 @@ def deserialize_long(attr): :param str attr: response string to be deserialized. :return: Deserialized int :rtype: long or int - :raises: ValueError if string format invalid. + :raises ValueError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1991,7 +1909,7 @@ def deserialize_duration(attr): :param str attr: response string to be deserialized. :return: Deserialized duration :rtype: TimeDelta - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -2009,7 +1927,7 @@ def deserialize_date(attr): :param str attr: response string to be deserialized. :return: Deserialized date :rtype: Date - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -2025,7 +1943,7 @@ def deserialize_time(attr): :param str attr: response string to be deserialized. :return: Deserialized time :rtype: datetime.time - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -2040,14 +1958,14 @@ def deserialize_rfc(attr): :param str attr: response string to be deserialized. :return: Deserialized RFC datetime :rtype: Datetime - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text try: parsed_date = email.utils.parsedate_tz(attr) # type: ignore date_obj = datetime.datetime( - *parsed_date[:6], tzinfo=_FixedOffset(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) + *parsed_date[:6], tzinfo=datetime.timezone(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) ) if not date_obj.tzinfo: date_obj = date_obj.astimezone(tz=TZ_UTC) @@ -2063,7 +1981,7 @@ def deserialize_iso(attr): :param str attr: response string to be deserialized. :return: Deserialized ISO datetime :rtype: Datetime - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -2101,7 +2019,7 @@ def deserialize_unix(attr): :param int attr: Object to be serialized. :return: Deserialized datetime :rtype: Datetime - :raises: DeserializationError if format invalid + :raises DeserializationError: if format invalid """ if isinstance(attr, ET.Element): attr = int(attr.text) # type: ignore diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_version.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_version.py index be71c81bd282..bbcd28b4aa67 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_version.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0b1" +VERSION = "1.0.0b2" diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/_client.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/_client.py index 7d6cf5a14102..90d778731f70 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/_client.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/_client.py @@ -7,15 +7,17 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Awaitable, TYPE_CHECKING +from typing import Any, Awaitable, Optional, TYPE_CHECKING, cast from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.core.settings import settings from azure.mgmt.core import AsyncARMPipelineClient from azure.mgmt.core.policies import AsyncARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints -from .._serialization import Deserializer, Serializer +from .._utils.serialization import Deserializer, Serializer from ._configuration import ConnectedCacheMgmtClientConfiguration from .operations import ( CacheNodesOperationsOperations, @@ -58,7 +60,7 @@ class ConnectedCacheMgmtClient: # pylint: disable=too-many-instance-attributes :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :param base_url: Service host. Default value is "https://management.azure.com". + :param base_url: Service host. Default value is None. :type base_url: str :keyword api_version: The API version to use for this operation. Default value is "2023-05-01-preview". Note that overriding this default value may result in unsupported @@ -69,16 +71,22 @@ class ConnectedCacheMgmtClient: # pylint: disable=too-many-instance-attributes """ def __init__( - self, - credential: "AsyncTokenCredential", - subscription_id: str, - base_url: str = "https://management.azure.com", - **kwargs: Any + self, credential: "AsyncTokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any ) -> None: _endpoint = "{endpoint}" + _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = ConnectedCacheMgmtClientConfiguration( - credential=credential, subscription_id=subscription_id, base_url=base_url, **kwargs + credential=credential, + subscription_id=subscription_id, + base_url=cast(str, base_url), + credential_scopes=credential_scopes, + **kwargs ) + _policies = kwargs.pop("policies", None) if _policies is None: _policies = [ @@ -97,7 +105,9 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=_endpoint, policies=_policies, **kwargs) + self._client: AsyncARMPipelineClient = AsyncARMPipelineClient( + base_url=cast(str, _endpoint), policies=_policies, **kwargs + ) self._serialize = Serializer() self._deserialize = Deserializer() diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/_patch.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/_patch.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# 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. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/operations/_operations.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/operations/_operations.py index 72e9eddb43eb..68e2e66eb2ff 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/operations/_operations.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/operations/_operations.py @@ -6,12 +6,13 @@ # Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase import json -import sys from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -33,7 +34,8 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._model_base import SdkJSONEncoder, _deserialize +from ..._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize +from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( build_cache_nodes_operations_createor_update_request, build_cache_nodes_operations_delete_request, @@ -74,14 +76,11 @@ build_isp_customers_update_request, build_operations_list_request, ) +from .._configuration import ConnectedCacheMgmtClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object +JSON = MutableMapping[str, Any] class Operations: @@ -96,10 +95,10 @@ class Operations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ConnectedCacheMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: @@ -161,7 +160,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.Operation], deserialized["value"]) + list_of_elem = _deserialize(List[_models.Operation], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -177,7 +176,7 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -197,10 +196,10 @@ class EnterpriseCustomerOperationsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ConnectedCacheMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get( @@ -258,7 +257,7 @@ async def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -327,7 +326,7 @@ async def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -666,7 +665,7 @@ async def update( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -727,7 +726,7 @@ async def delete(self, resource_group_name: str, customer_resource_name: str, ** if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -801,7 +800,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.EnterprisePreviewResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.EnterprisePreviewResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -817,7 +816,7 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -886,7 +885,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.EnterprisePreviewResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.EnterprisePreviewResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -902,7 +901,7 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -922,10 +921,10 @@ class CacheNodesOperationsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ConnectedCacheMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get( @@ -983,7 +982,7 @@ async def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -1052,7 +1051,7 @@ async def _createor_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1280,7 +1279,7 @@ async def delete(self, resource_group_name: str, customer_resource_name: str, ** if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1444,7 +1443,7 @@ async def update( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -1525,7 +1524,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.CacheNodePreviewResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.CacheNodePreviewResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -1541,7 +1540,7 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1610,7 +1609,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.CacheNodePreviewResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.CacheNodePreviewResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -1626,7 +1625,7 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1646,10 +1645,10 @@ class IspCustomersOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ConnectedCacheMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get( @@ -1706,7 +1705,7 @@ async def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -1775,7 +1774,7 @@ async def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -2109,7 +2108,7 @@ async def update( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -2164,7 +2163,7 @@ async def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -2307,7 +2306,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.IspCustomerResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.IspCustomerResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -2323,7 +2322,7 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -2392,7 +2391,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.IspCustomerResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.IspCustomerResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -2408,7 +2407,7 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -2428,10 +2427,10 @@ class IspCacheNodesOperationsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ConnectedCacheMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get( @@ -2491,7 +2490,7 @@ async def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -2562,7 +2561,7 @@ async def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -2922,7 +2921,7 @@ async def update( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -2978,7 +2977,7 @@ async def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -3127,7 +3126,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.IspCacheNodeResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.IspCacheNodeResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -3143,7 +3142,7 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -3209,7 +3208,7 @@ async def get_bgp_cidrs( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -3281,7 +3280,7 @@ async def get_cache_node_install_details( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -3307,10 +3306,10 @@ class EnterpriseMccCustomersOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ConnectedCacheMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get( @@ -3368,7 +3367,7 @@ async def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -3437,7 +3436,7 @@ async def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -3776,7 +3775,7 @@ async def update( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -3831,7 +3830,7 @@ async def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -3974,7 +3973,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.EnterpriseMccCustomerResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.EnterpriseMccCustomerResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -3990,7 +3989,7 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -4060,7 +4059,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.EnterpriseMccCustomerResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.EnterpriseMccCustomerResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -4076,7 +4075,7 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -4096,10 +4095,10 @@ class EnterpriseMccCacheNodesOperationsOperations: # pylint: disable=name-too-l def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ConnectedCacheMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get( @@ -4160,7 +4159,7 @@ async def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -4231,7 +4230,7 @@ async def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -4596,7 +4595,7 @@ async def update( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -4652,7 +4651,7 @@ async def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -4801,7 +4800,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.EnterpriseMccCacheNodeResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.EnterpriseMccCacheNodeResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -4817,7 +4816,7 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -4883,7 +4882,7 @@ async def get_cache_node_install_details( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/operations/_patch.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/operations/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/operations/_patch.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/operations/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# 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. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/models/_models.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/models/_models.py index 580a2ab7dd89..a354ced11f55 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/models/_models.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/models/_models.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -11,18 +11,15 @@ import datetime from typing import Any, Dict, List, Mapping, Optional, TYPE_CHECKING, Union, overload -from .. import _model_base -from .._model_base import rest_field +from .._utils.model_base import Model as _Model, rest_field if TYPE_CHECKING: from .. import models as _models -class AdditionalCacheNodeProperties(_model_base.Model): +class AdditionalCacheNodeProperties(_Model): """Model representing cache node for connected cache resource. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar cache_node_properties_details_issues_list: issues list to return the issues as part of the additional cache node properties. :vartype cache_node_properties_details_issues_list: list[str] @@ -98,7 +95,7 @@ class AdditionalCacheNodeProperties(_model_base.Model): """ cache_node_properties_details_issues_list: Optional[List[str]] = rest_field( - name="cacheNodePropertiesDetailsIssuesList" + name="cacheNodePropertiesDetailsIssuesList", visibility=["read", "create", "update", "delete", "query"] ) """issues list to return the issues as part of the additional cache node properties.""" aggregated_status_details: Optional[str] = rest_field(name="aggregatedStatusDetails", visibility=["read"]) @@ -118,26 +115,42 @@ class AdditionalCacheNodeProperties(_model_base.Model): """Cache node resource short state text.""" cache_node_state: Optional[int] = rest_field(name="cacheNodeState", visibility=["read"]) """Cache node resource state as integer.""" - drive_configuration: Optional[List["_models.CacheNodeDriveConfiguration"]] = rest_field(name="driveConfiguration") + drive_configuration: Optional[List["_models.CacheNodeDriveConfiguration"]] = rest_field( + name="driveConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) """Cache node resource drive configurations.""" - bgp_configuration: Optional["_models.BgpConfiguration"] = rest_field(name="bgpConfiguration") + bgp_configuration: Optional["_models.BgpConfiguration"] = rest_field( + name="bgpConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) """Cache node resource Bgp configuration.""" - proxy_url_configuration: Optional["_models.ProxyUrlConfiguration"] = rest_field(name="proxyUrlConfiguration") + proxy_url_configuration: Optional["_models.ProxyUrlConfiguration"] = rest_field( + name="proxyUrlConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) """proxyUrl configuration of the cache node.""" - proxy_url: Optional[str] = rest_field(name="proxyUrl") + proxy_url: Optional[str] = rest_field(name="proxyUrl", visibility=["read", "create", "update", "delete", "query"]) """Cache node resource Mcc proxy Url.""" - is_proxy_required: Optional[Union[str, "_models.ProxyRequired"]] = rest_field(name="isProxyRequired") + is_proxy_required: Optional[Union[str, "_models.ProxyRequired"]] = rest_field( + name="isProxyRequired", visibility=["read", "create", "update", "delete", "query"] + ) """Cache node resource requires a proxy. Known values are: \"None\" and \"Required\".""" - os_type: Optional[Union[str, "_models.OsType"]] = rest_field(name="osType") + os_type: Optional[Union[str, "_models.OsType"]] = rest_field( + name="osType", visibility=["read", "create", "update", "delete", "query"] + ) """Operating system of the cache node. Known values are: \"Windows\", \"Linux\", and \"Eflow\".""" - update_cycle_type: Optional[Union[str, "_models.CycleType"]] = rest_field(name="updateCycleType") + update_cycle_type: Optional[Union[str, "_models.CycleType"]] = rest_field( + name="updateCycleType", visibility=["read", "create", "update", "delete", "query"] + ) """Update Cycle Type. Known values are: \"Preview\", \"Slow\", and \"Fast\".""" - auto_update_version: Optional[str] = rest_field(name="autoUpdateVersion") + auto_update_version: Optional[str] = rest_field( + name="autoUpdateVersion", visibility=["read", "create", "update", "delete", "query"] + ) """Auto update or fast update version.""" - update_info_details: Optional[str] = rest_field(name="updateInfoDetails") + update_info_details: Optional[str] = rest_field( + name="updateInfoDetails", visibility=["read", "create", "update", "delete", "query"] + ) """Update related information details.""" update_requested_date_time: Optional[datetime.datetime] = rest_field( - name="updateRequestedDateTime", format="rfc3339" + name="updateRequestedDateTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" ) """customer requested date time for mcc install of update cycle.""" auto_update_next_available_version: Optional[str] = rest_field( @@ -164,15 +177,25 @@ class AdditionalCacheNodeProperties(_model_base.Model): name="autoUpdateLastTriggeredDateTime", visibility=["read"], format="rfc3339" ) """Auto update last triggered date time of mcc install.""" - optional_property1: Optional[str] = rest_field(name="optionalProperty1") + optional_property1: Optional[str] = rest_field( + name="optionalProperty1", visibility=["read", "create", "update", "delete", "query"] + ) """Optional property #1 of Mcc response object.""" - optional_property2: Optional[str] = rest_field(name="optionalProperty2") + optional_property2: Optional[str] = rest_field( + name="optionalProperty2", visibility=["read", "create", "update", "delete", "query"] + ) """Optional property #2 of Mcc response object.""" - optional_property3: Optional[str] = rest_field(name="optionalProperty3") + optional_property3: Optional[str] = rest_field( + name="optionalProperty3", visibility=["read", "create", "update", "delete", "query"] + ) """Optional property #3 of Mcc response object.""" - optional_property4: Optional[str] = rest_field(name="optionalProperty4") + optional_property4: Optional[str] = rest_field( + name="optionalProperty4", visibility=["read", "create", "update", "delete", "query"] + ) """Optional property #4 of Mcc response object.""" - optional_property5: Optional[str] = rest_field(name="optionalProperty5") + optional_property5: Optional[str] = rest_field( + name="optionalProperty5", visibility=["read", "create", "update", "delete", "query"] + ) """Optional property #5 of Mcc response object.""" @overload @@ -208,11 +231,9 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class AdditionalCustomerProperties(_model_base.Model): +class AdditionalCustomerProperties(_Model): """Model representing customer for connected cache resource. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar peering_db_last_update_time: Customer resource last PeeringDB update timestamp. :vartype peering_db_last_update_time: ~datetime.datetime :ivar customer_properties_overview_cache_efficiency: Customer resource cache efficiency. @@ -342,40 +363,64 @@ class AdditionalCustomerProperties(_model_base.Model): """Customer resource last PeeringDB update timestamp.""" customer_org_name: Optional[str] = rest_field(name="customerOrgName", visibility=["read"]) """Customer resource owner organization name.""" - customer_email: Optional[str] = rest_field(name="customerEmail") + customer_email: Optional[str] = rest_field( + name="customerEmail", visibility=["read", "create", "update", "delete", "query"] + ) """Customer resource contact email.""" - customer_transit_asn: Optional[str] = rest_field(name="customerTransitAsn") + customer_transit_asn: Optional[str] = rest_field( + name="customerTransitAsn", visibility=["read", "create", "update", "delete", "query"] + ) """Customer resource transit Asn (autonomous system number).""" customer_transit_state: Optional[Union[str, "_models.CustomerTransitState"]] = rest_field( - name="customerTransitState" + name="customerTransitState", visibility=["read", "create", "update", "delete", "query"] ) """Customer resource transit state. Known values are: \"NoTransit\", \"CombinedTransit\", and \"TransitOnly\".""" - customer_asn: Optional[str] = rest_field(name="customerAsn") + customer_asn: Optional[str] = rest_field( + name="customerAsn", visibility=["read", "create", "update", "delete", "query"] + ) """Customer resource Asn (autonomous system number).""" customer_asn_estimated_egress_peek_gbps: Optional[float] = rest_field( name="customerAsnEstimatedEgressPeekGbps", visibility=["read"] ) """Customer resource estimated Asn peering peak in Gbps.""" - customer_entitlement_sku_id: Optional[str] = rest_field(name="customerEntitlementSkuId") + customer_entitlement_sku_id: Optional[str] = rest_field( + name="customerEntitlementSkuId", visibility=["read", "create", "update", "delete", "query"] + ) """Customer resource entitlement Sku Id.""" - customer_entitlement_sku_guid: Optional[str] = rest_field(name="customerEntitlementSkuGuid") + customer_entitlement_sku_guid: Optional[str] = rest_field( + name="customerEntitlementSkuGuid", visibility=["read", "create", "update", "delete", "query"] + ) """Customer resource entitlement Sku Guid.""" - customer_entitlement_sku_name: Optional[str] = rest_field(name="customerEntitlementSkuName") + customer_entitlement_sku_name: Optional[str] = rest_field( + name="customerEntitlementSkuName", visibility=["read", "create", "update", "delete", "query"] + ) """Customer resource entitlement Sku name.""" customer_entitlement_expiration: Optional[datetime.datetime] = rest_field( - name="customerEntitlementExpiration", format="rfc3339" + name="customerEntitlementExpiration", + visibility=["read", "create", "update", "delete", "query"], + format="rfc3339", ) """Customer resource entitlement expiration date string.""" - optional_property1: Optional[str] = rest_field(name="optionalProperty1") + optional_property1: Optional[str] = rest_field( + name="optionalProperty1", visibility=["read", "create", "update", "delete", "query"] + ) """Optional property #1 of Mcc response object.""" - optional_property2: Optional[str] = rest_field(name="optionalProperty2") + optional_property2: Optional[str] = rest_field( + name="optionalProperty2", visibility=["read", "create", "update", "delete", "query"] + ) """Optional property #2 of Mcc response object.""" - optional_property3: Optional[str] = rest_field(name="optionalProperty3") + optional_property3: Optional[str] = rest_field( + name="optionalProperty3", visibility=["read", "create", "update", "delete", "query"] + ) """Optional property #3 of Mcc response object.""" - optional_property4: Optional[str] = rest_field(name="optionalProperty4") + optional_property4: Optional[str] = rest_field( + name="optionalProperty4", visibility=["read", "create", "update", "delete", "query"] + ) """Optional property #4 of Mcc response object.""" - optional_property5: Optional[str] = rest_field(name="optionalProperty5") + optional_property5: Optional[str] = rest_field( + name="optionalProperty5", visibility=["read", "create", "update", "delete", "query"] + ) """Optional property #5 of Mcc response object.""" @overload @@ -408,11 +453,9 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class BgpCidrsConfiguration(_model_base.Model): +class BgpCidrsConfiguration(_Model): """Mcc cache node Bgp Cidr details. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar bgp_cidrs: Mcc cache node Bgp Cidr details. :vartype bgp_cidrs: list[str] """ @@ -421,14 +464,16 @@ class BgpCidrsConfiguration(_model_base.Model): """Mcc cache node Bgp Cidr details.""" -class BgpConfiguration(_model_base.Model): +class BgpConfiguration(_Model): """Bgp configuration of cache node. :ivar asn_to_ip_address_mapping: Asn to ip address mapping. :vartype asn_to_ip_address_mapping: str """ - asn_to_ip_address_mapping: Optional[str] = rest_field(name="asnToIpAddressMapping") + asn_to_ip_address_mapping: Optional[str] = rest_field( + name="asnToIpAddressMapping", visibility=["read", "create", "update", "delete", "query"] + ) """Asn to ip address mapping.""" @overload @@ -449,7 +494,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class CacheNodeDriveConfiguration(_model_base.Model): +class CacheNodeDriveConfiguration(_Model): """Drive configuration for cache node. :ivar physical_path: physical path location of the folder used for caching content. @@ -462,13 +507,19 @@ class CacheNodeDriveConfiguration(_model_base.Model): :vartype nginx_mapping: str """ - physical_path: Optional[str] = rest_field(name="physicalPath") + physical_path: Optional[str] = rest_field( + name="physicalPath", visibility=["read", "create", "update", "delete", "query"] + ) """physical path location of the folder used for caching content.""" - size_in_gb: Optional[int] = rest_field(name="sizeInGb") + size_in_gb: Optional[int] = rest_field(name="sizeInGb", visibility=["read", "create", "update", "delete", "query"]) """physical size of the drive used for caching content.""" - cache_number: Optional[int] = rest_field(name="cacheNumber") + cache_number: Optional[int] = rest_field( + name="cacheNumber", visibility=["read", "create", "update", "delete", "query"] + ) """corresponding nginx cache number. Valid cache numbers are 1 - 20.""" - nginx_mapping: Optional[str] = rest_field(name="nginxMapping") + nginx_mapping: Optional[str] = rest_field( + name="nginxMapping", visibility=["read", "create", "update", "delete", "query"] + ) """full binding for corresponding nginx cache drive.""" @overload @@ -492,11 +543,9 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class CacheNodeEntity(_model_base.Model): +class CacheNodeEntity(_Model): """Model representing Cache Node for ConnectedCache resource. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar fully_qualified_resource_id: Cache node resource Azure fully qualified resource Id. :vartype fully_qualified_resource_id: str :ivar customer_id: Cache node resource customer resource GUID Id. @@ -615,31 +664,49 @@ class CacheNodeEntity(_model_base.Model): :vartype auto_update_requested_time: str """ - fully_qualified_resource_id: Optional[str] = rest_field(name="fullyQualifiedResourceId") + fully_qualified_resource_id: Optional[str] = rest_field( + name="fullyQualifiedResourceId", visibility=["read", "create", "update", "delete", "query"] + ) """Cache node resource Azure fully qualified resource Id.""" customer_id: Optional[str] = rest_field(name="customerId", visibility=["read"]) """Cache node resource customer resource GUID Id.""" - customer_name: Optional[str] = rest_field(name="customerName") + customer_name: Optional[str] = rest_field( + name="customerName", visibility=["read", "create", "update", "delete", "query"] + ) """Cache node resource customer resource name.""" - ip_address: Optional[str] = rest_field(name="ipAddress") + ip_address: Optional[str] = rest_field(name="ipAddress", visibility=["read", "create", "update", "delete", "query"]) """Cache node resource Ip address.""" - customer_index: Optional[str] = rest_field(name="customerIndex") + customer_index: Optional[str] = rest_field( + name="customerIndex", visibility=["read", "create", "update", "delete", "query"] + ) """Cache node resource customer index as string.""" - cache_node_id: Optional[str] = rest_field(name="cacheNodeId") + cache_node_id: Optional[str] = rest_field( + name="cacheNodeId", visibility=["read", "create", "update", "delete", "query"] + ) """Cache node resource identifier of the cache node.""" - cache_node_name: Optional[str] = rest_field(name="cacheNodeName") + cache_node_name: Optional[str] = rest_field( + name="cacheNodeName", visibility=["read", "create", "update", "delete", "query"] + ) """Cache node resource name.""" - customer_asn: Optional[int] = rest_field(name="customerAsn") + customer_asn: Optional[int] = rest_field( + name="customerAsn", visibility=["read", "create", "update", "delete", "query"] + ) """Cache node resource customer resource Asn (autonomous system number).""" - is_enabled: Optional[bool] = rest_field(name="isEnabled") + is_enabled: Optional[bool] = rest_field( + name="isEnabled", visibility=["read", "create", "update", "delete", "query"] + ) """Cache node resource flag for indicating if cache node is enabled.""" - max_allowable_egress_in_mbps: Optional[int] = rest_field(name="maxAllowableEgressInMbps") + max_allowable_egress_in_mbps: Optional[int] = rest_field( + name="maxAllowableEgressInMbps", visibility=["read", "create", "update", "delete", "query"] + ) """Cache node resource maximum allowed egress in Mbps.""" max_allowable_probability: Optional[float] = rest_field(name="maxAllowableProbability", visibility=["read"]) """Cache node resource maximum allowed probability of egress.""" x_cid: Optional[str] = rest_field(name="xCid", visibility=["read"]) """Cache node resource Azure XCid.""" - is_enterprise_managed: Optional[bool] = rest_field(name="isEnterpriseManaged") + is_enterprise_managed: Optional[bool] = rest_field( + name="isEnterpriseManaged", visibility=["read", "create", "update", "delete", "query"] + ) """Cache node resource flag for determining if managed by enterprise as boolean.""" create_async_operation_id: Optional[str] = rest_field(name="createAsyncOperationId", visibility=["read"]) """Cache node resource create async operation Id.""" @@ -663,7 +730,9 @@ class CacheNodeEntity(_model_base.Model): """Cache node resource attempts to sync with Azure.""" container_configurations: Optional[str] = rest_field(name="containerConfigurations", visibility=["read"]) """Cache node resource container configuration details.""" - cidr_csv: Optional[List[str]] = rest_field(name="cidrCsv") + cidr_csv: Optional[List[str]] = rest_field( + name="cidrCsv", visibility=["read", "create", "update", "delete", "query"] + ) """Cache node resource comma separated values of Cidrs.""" cidr_csv_last_update_time: Optional[datetime.datetime] = rest_field( name="cidrCsvLastUpdateTime", visibility=["read"], format="rfc3339" @@ -694,11 +763,15 @@ class CacheNodeEntity(_model_base.Model): """Cache node resource Bgp block count.""" bgp_address_space: Optional[int] = rest_field(name="bgpAddressSpace", visibility=["read"]) """Cache node resource total addressable space defined by Bgp and Cidr Csv blocks.""" - should_migrate: Optional[bool] = rest_field(name="shouldMigrate") + should_migrate: Optional[bool] = rest_field( + name="shouldMigrate", visibility=["read", "create", "update", "delete", "query"] + ) """Cache node resource flag for determining if customer will be migrated.""" bgp_file_bytes_truncated: Optional[int] = rest_field(name="bgpFileBytesTruncated", visibility=["read"]) """Cache node resource bytes truncated from Bgp output file.""" - cidr_selection_type: Optional[int] = rest_field(name="cidrSelectionType") + cidr_selection_type: Optional[int] = rest_field( + name="cidrSelectionType", visibility=["read", "create", "update", "delete", "query"] + ) """Cache node resource current Cidr range precedence selection type.""" is_frozen: Optional[bool] = rest_field(name="isFrozen", visibility=["read"]) """Cache node resource flag for indicating the cache node resource is frozen (not selectable, not @@ -728,16 +801,26 @@ class CacheNodeEntity(_model_base.Model): """Cache node resource Mcc container configuration details re-sync trigger.""" image_uri: Optional[str] = rest_field(name="imageUri", visibility=["read"]) """Cache node resource Mcc Container Id Uri.""" - fully_qualified_domain_name: Optional[str] = rest_field(name="fullyQualifiedDomainName") + fully_qualified_domain_name: Optional[str] = rest_field( + name="fullyQualifiedDomainName", visibility=["read", "create", "update", "delete", "query"] + ) """FQDN(fully qualified domain name) value of the mcc cache node.""" - auto_update_ring_type: Optional[Union[str, "_models.AutoUpdateRingType"]] = rest_field(name="autoUpdateRingType") + auto_update_ring_type: Optional[Union[str, "_models.AutoUpdateRingType"]] = rest_field( + name="autoUpdateRingType", visibility=["read", "create", "update", "delete", "query"] + ) """Auto Update Ring Type which is slow or fast etc. Known values are: \"Preview\", \"Slow\", and \"Fast\".""" - auto_update_requested_week: Optional[int] = rest_field(name="autoUpdateRequestedWeek") + auto_update_requested_week: Optional[int] = rest_field( + name="autoUpdateRequestedWeek", visibility=["read", "create", "update", "delete", "query"] + ) """Customer requested week of month for mcc install of auto update cycle.""" - auto_update_requested_day: Optional[int] = rest_field(name="autoUpdateRequestedDay") + auto_update_requested_day: Optional[int] = rest_field( + name="autoUpdateRequestedDay", visibility=["read", "create", "update", "delete", "query"] + ) """Customer requested day of week for mcc install of auto update cycle.""" - auto_update_requested_time: Optional[str] = rest_field(name="autoUpdateRequestedTime") + auto_update_requested_time: Optional[str] = rest_field( + name="autoUpdateRequestedTime", visibility=["read", "create", "update", "delete", "query"] + ) """Customer requested time of the day for mcc install of auto update cycle, should be hh:mm.""" @overload @@ -775,11 +858,9 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class CacheNodeInstallProperties(_model_base.Model): +class CacheNodeInstallProperties(_Model): """Mcc cache node resource install script properties. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar customer_id: Mcc customer resource Id. :vartype customer_id: str :ivar cache_node_id: Mcc cache node resource Id. @@ -792,9 +873,13 @@ class CacheNodeInstallProperties(_model_base.Model): :vartype registration_key: str """ - customer_id: Optional[str] = rest_field(name="customerId") + customer_id: Optional[str] = rest_field( + name="customerId", visibility=["read", "create", "update", "delete", "query"] + ) """Mcc customer resource Id.""" - cache_node_id: Optional[str] = rest_field(name="cacheNodeId") + cache_node_id: Optional[str] = rest_field( + name="cacheNodeId", visibility=["read", "create", "update", "delete", "query"] + ) """Mcc cache node resource Id.""" primary_account_key: Optional[str] = rest_field(name="primaryAccountKey", visibility=["read"]) """Mcc primary account key. Internal to Mcc.""" @@ -822,11 +907,9 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class CacheNodeOldResponse(_model_base.Model): +class CacheNodeOldResponse(_Model): """Model representing Cache Node for ConnectedCache resource. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar provisioning_state: The provisioned state of the resource. Known values are: "Succeeded", "Failed", "Canceled", "Unknown", "Accepted", "Upgrading", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.connectedcache.models.ProvisioningState @@ -848,15 +931,21 @@ class CacheNodeOldResponse(_model_base.Model): ) """The provisioned state of the resource. Known values are: \"Succeeded\", \"Failed\", \"Canceled\", \"Unknown\", \"Accepted\", \"Upgrading\", and \"Deleting\".""" - status_code: Optional[str] = rest_field(name="statusCode") + status_code: Optional[str] = rest_field( + name="statusCode", visibility=["read", "create", "update", "delete", "query"] + ) """statusCode used to get code details of Mcc response object.""" - status_text: Optional[str] = rest_field(name="statusText") + status_text: Optional[str] = rest_field( + name="statusText", visibility=["read", "create", "update", "delete", "query"] + ) """statusText used to get status details in string format of Mcc response object.""" - status_details: Optional[str] = rest_field(name="statusDetails") + status_details: Optional[str] = rest_field( + name="statusDetails", visibility=["read", "create", "update", "delete", "query"] + ) """statusDetails used to get inner details of Mcc response object.""" status: Optional[str] = rest_field(visibility=["read"]) """status of the HTTP error code.""" - error: Optional["_models.ErrorDetail"] = rest_field() + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The error details.""" @overload @@ -880,13 +969,11 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class Resource(_model_base.Model): - """Common fields that are returned in the response for all Azure Resource Manager resources. - - Readonly variables are only populated by the server, and will be ignored when sending a request. +class Resource(_Model): + """Resource. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -900,7 +987,7 @@ class Resource(_model_base.Model): id: Optional[str] = rest_field(visibility=["read"]) """Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long""" + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.""" name: Optional[str] = rest_field(visibility=["read"]) """The name of the resource.""" type: Optional[str] = rest_field(visibility=["read"]) @@ -911,14 +998,10 @@ class Resource(_model_base.Model): class TrackedResource(Resource): - """The resource model definition for an Azure Resource Manager tracked top level resource which - has 'tags' and a 'location'. - - Readonly variables are only populated by the server, and will be ignored when sending a request. - + """Tracked Resource. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -934,7 +1017,7 @@ class TrackedResource(Resource): :vartype location: str """ - tags: Optional[Dict[str, str]] = rest_field() + tags: Optional[Dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Resource tags.""" location: str = rest_field(visibility=["read", "create"]) """The geo-location where the resource lives. Required.""" @@ -962,11 +1045,8 @@ class CacheNodePreviewResource(TrackedResource): """Concrete tracked resource types can be created by aliasing this type using a specific property type. - Readonly variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -1007,11 +1087,9 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class CacheNodeProperty(_model_base.Model): +class CacheNodeProperty(_Model): """Model representing an Mcc cache node connectedCache resource. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar provisioning_state: The provisioned state of the resource. Known values are: "Succeeded", "Failed", "Canceled", "Unknown", "Accepted", "Upgrading", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.connectedcache.models.ProvisioningState @@ -1037,21 +1115,29 @@ class CacheNodeProperty(_model_base.Model): ) """The provisioned state of the resource. Known values are: \"Succeeded\", \"Failed\", \"Canceled\", \"Unknown\", \"Accepted\", \"Upgrading\", and \"Deleting\".""" - cache_node: Optional["_models.CacheNodeEntity"] = rest_field(name="cacheNode") + cache_node: Optional["_models.CacheNodeEntity"] = rest_field( + name="cacheNode", visibility=["read", "create", "update", "delete", "query"] + ) """Mcc cache node resource (cache node entity).""" additional_cache_node_properties: Optional["_models.AdditionalCacheNodeProperties"] = rest_field( - name="additionalCacheNodeProperties" + name="additionalCacheNodeProperties", visibility=["read", "create", "update", "delete", "query"] ) """Mcc cache node resource additional properties.""" - status_code: Optional[str] = rest_field(name="statusCode") + status_code: Optional[str] = rest_field( + name="statusCode", visibility=["read", "create", "update", "delete", "query"] + ) """Mcc response status code.""" - status_text: Optional[str] = rest_field(name="statusText") + status_text: Optional[str] = rest_field( + name="statusText", visibility=["read", "create", "update", "delete", "query"] + ) """Mcc response status text as string for retrieving status details.""" - status_details: Optional[str] = rest_field(name="statusDetails") + status_details: Optional[str] = rest_field( + name="statusDetails", visibility=["read", "create", "update", "delete", "query"] + ) """Mcc response status details for retrieving response inner details.""" status: Optional[str] = rest_field(visibility=["read"]) """HTTP error status code.""" - error: Optional["_models.ErrorDetail"] = rest_field() + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Mcc response error details.""" @overload @@ -1077,7 +1163,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ConnectedCachePatchResource(_model_base.Model): +class ConnectedCachePatchResource(_Model): """Mcc PATCH operation properties. :ivar tags: Resource tags. @@ -1105,11 +1191,9 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class CustomerEntity(_model_base.Model): +class CustomerEntity(_Model): """Model representing Customer resource for ConnectedCache resource. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar fully_qualified_resource_id: Customer resource Azure fully qualified resource Id. :vartype fully_qualified_resource_id: str :ivar customer_id: Customer resource Guid Id. @@ -1149,27 +1233,43 @@ class CustomerEntity(_model_base.Model): :vartype verify_signup_phrase: str """ - fully_qualified_resource_id: Optional[str] = rest_field(name="fullyQualifiedResourceId") + fully_qualified_resource_id: Optional[str] = rest_field( + name="fullyQualifiedResourceId", visibility=["read", "create", "update", "delete", "query"] + ) """Customer resource Azure fully qualified resource Id.""" customer_id: Optional[str] = rest_field(name="customerId", visibility=["read"]) """Customer resource Guid Id.""" - customer_name: Optional[str] = rest_field(name="customerName") + customer_name: Optional[str] = rest_field( + name="customerName", visibility=["read", "create", "update", "delete", "query"] + ) """Customer resource name.""" - contact_email: Optional[str] = rest_field(name="contactEmail") + contact_email: Optional[str] = rest_field( + name="contactEmail", visibility=["read", "create", "update", "delete", "query"] + ) """Customer resource contact email.""" - contact_phone: Optional[str] = rest_field(name="contactPhone") + contact_phone: Optional[str] = rest_field( + name="contactPhone", visibility=["read", "create", "update", "delete", "query"] + ) """Customer resource contact phone.""" - contact_name: Optional[str] = rest_field(name="contactName") + contact_name: Optional[str] = rest_field( + name="contactName", visibility=["read", "create", "update", "delete", "query"] + ) """Customer resource contact full name.""" - is_entitled: Optional[bool] = rest_field(name="isEntitled") + is_entitled: Optional[bool] = rest_field( + name="isEntitled", visibility=["read", "create", "update", "delete", "query"] + ) """Customer resource entitlement flag as boolean.""" - release_version: Optional[int] = rest_field(name="releaseVersion") + release_version: Optional[int] = rest_field( + name="releaseVersion", visibility=["read", "create", "update", "delete", "query"] + ) """Customer resource Mcc release version.""" create_async_operation_id: Optional[str] = rest_field(name="createAsyncOperationId", visibility=["read"]) """Customer resource create async operation Id.""" delete_async_operation_id: Optional[str] = rest_field(name="deleteAsyncOperationId", visibility=["read"]) """Customer resource deletion async operation Id.""" - client_tenant_id: Optional[str] = rest_field(name="clientTenantId") + client_tenant_id: Optional[str] = rest_field( + name="clientTenantId", visibility=["read", "create", "update", "delete", "query"] + ) """Customer resource client tenant Id of subscription.""" synch_with_azure_attempts_count: Optional[int] = rest_field(name="synchWithAzureAttemptsCount", visibility=["read"]) """Customer resource sync attempts.""" @@ -1177,13 +1277,21 @@ class CustomerEntity(_model_base.Model): name="lastSyncWithAzureTimestamp", visibility=["read"], format="rfc3339" ) """Customer resource last Azure sync timestamp.""" - is_enterprise_managed: Optional[bool] = rest_field(name="isEnterpriseManaged") + is_enterprise_managed: Optional[bool] = rest_field( + name="isEnterpriseManaged", visibility=["read", "create", "update", "delete", "query"] + ) """Customer resource flag for enterprise management as boolean.""" - should_migrate: Optional[bool] = rest_field(name="shouldMigrate") + should_migrate: Optional[bool] = rest_field( + name="shouldMigrate", visibility=["read", "create", "update", "delete", "query"] + ) """Customer resource flag for migration.""" - resend_signup_code: Optional[bool] = rest_field(name="resendSignupCode") + resend_signup_code: Optional[bool] = rest_field( + name="resendSignupCode", visibility=["read", "create", "update", "delete", "query"] + ) """Customer resource flag for resending signup code as boolean.""" - verify_signup_code: Optional[bool] = rest_field(name="verifySignupCode") + verify_signup_code: Optional[bool] = rest_field( + name="verifySignupCode", visibility=["read", "create", "update", "delete", "query"] + ) """Customer resource flag for requiring verification of signup code as boolean.""" verify_signup_phrase: Optional[str] = rest_field(name="verifySignupPhrase", visibility=["create", "update"]) """Customer resource phrase for verifying signup.""" @@ -1218,11 +1326,9 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class CustomerProperty(_model_base.Model): +class CustomerProperty(_Model): """Model representing customer for connectedCache resource. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar provisioning_state: The provisioned state of the resource. Known values are: "Succeeded", "Failed", "Canceled", "Unknown", "Accepted", "Upgrading", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.connectedcache.models.ProvisioningState @@ -1248,10 +1354,12 @@ class CustomerProperty(_model_base.Model): ) """The provisioned state of the resource. Known values are: \"Succeeded\", \"Failed\", \"Canceled\", \"Unknown\", \"Accepted\", \"Upgrading\", and \"Deleting\".""" - customer: Optional["_models.CustomerEntity"] = rest_field() + customer: Optional["_models.CustomerEntity"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """Mcc customer resource (customer entity).""" additional_customer_properties: Optional["_models.AdditionalCustomerProperties"] = rest_field( - name="additionalCustomerProperties" + name="additionalCustomerProperties", visibility=["read", "create", "update", "delete", "query"] ) """Mcc customer resource additional properties.""" status_code: Optional[str] = rest_field(name="statusCode", visibility=["read"]) @@ -1287,11 +1395,8 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class EnterpriseMccCacheNodeResource(TrackedResource): """Represents the high level Nodes needed to provision cache node resources. - Readonly variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -1335,11 +1440,8 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class EnterpriseMccCustomerResource(TrackedResource): """Represents the high level Nodes needed to provision customer resources. - Readonly variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -1384,11 +1486,8 @@ class EnterprisePreviewResource(TrackedResource): """ConnectedCache Resource. Represents the high level Nodes needed to provision CacheNode and customer resources used in private preview. - Readonly variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -1429,11 +1528,9 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ErrorAdditionalInfo(_model_base.Model): +class ErrorAdditionalInfo(_Model): """The resource management error additional info. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar type: The additional info type. :vartype type: str :ivar info: The additional info. @@ -1446,11 +1543,9 @@ class ErrorAdditionalInfo(_model_base.Model): """The additional info.""" -class ErrorDetail(_model_base.Model): +class ErrorDetail(_Model): """The error detail. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar code: The error code. :vartype code: str :ivar message: The error message. @@ -1477,15 +1572,14 @@ class ErrorDetail(_model_base.Model): """The error additional info.""" -class ErrorResponse(_model_base.Model): - """Common error response for all Azure Resource Manager APIs to return error details for failed - operations. +class ErrorResponse(_Model): + """Error response. :ivar error: The error object. :vartype error: ~azure.mgmt.connectedcache.models.ErrorDetail """ - error: Optional["_models.ErrorDetail"] = rest_field() + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The error object.""" @overload @@ -1509,11 +1603,8 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class IspCacheNodeResource(TrackedResource): """Represents the high level Nodes needed to provision cache node resources. - Readonly variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -1557,11 +1648,8 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class IspCustomerResource(TrackedResource): """Represents the high level Nodes needed to provision isp customer resources. - Readonly variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -1605,11 +1693,8 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class MccCacheNodeBgpCidrDetails(TrackedResource): """Represents all Cidr details of the Bgp request for a specific cache node resource. - Readonly variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -1627,7 +1712,9 @@ class MccCacheNodeBgpCidrDetails(TrackedResource): :vartype properties: ~azure.mgmt.connectedcache.models.BgpCidrsConfiguration """ - properties: Optional["_models.BgpCidrsConfiguration"] = rest_field() + properties: Optional["_models.BgpCidrsConfiguration"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """Mcc cache node resource Bgp Cidr properties.""" @overload @@ -1653,11 +1740,8 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class MccCacheNodeInstallDetails(TrackedResource): """Mcc cache node resource all install details. - Readonly variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -1675,7 +1759,9 @@ class MccCacheNodeInstallDetails(TrackedResource): :vartype properties: ~azure.mgmt.connectedcache.models.CacheNodeInstallProperties """ - properties: Optional["_models.CacheNodeInstallProperties"] = rest_field() + properties: Optional["_models.CacheNodeInstallProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """Mcc cache node resource install script details.""" @overload @@ -1698,10 +1784,8 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class Operation(_model_base.Model): - """Details of a REST API operation, returned from the Resource Provider Operations API. - - Readonly variables are only populated by the server, and will be ignored when sending a request. +class Operation(_Model): + """REST API Operation. :ivar name: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". @@ -1727,13 +1811,15 @@ class Operation(_model_base.Model): is_data_action: Optional[bool] = rest_field(name="isDataAction", visibility=["read"]) """Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for Azure Resource Manager/control-plane operations.""" - display: Optional["_models.OperationDisplay"] = rest_field(visibility=["read"]) + display: Optional["_models.OperationDisplay"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """Localized display information for this particular operation.""" origin: Optional[Union[str, "_models.Origin"]] = rest_field(visibility=["read"]) """The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\". Known values are: \"user\", \"system\", and \"user,system\".""" - action_type: Optional[Union[str, "_models.ActionType"]] = rest_field(name="actionType") + action_type: Optional[Union[str, "_models.ActionType"]] = rest_field(name="actionType", visibility=["read"]) """Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs. \"Internal\"""" @@ -1741,7 +1827,7 @@ class Operation(_model_base.Model): def __init__( self, *, - action_type: Optional[Union[str, "_models.ActionType"]] = None, + display: Optional["_models.OperationDisplay"] = None, ) -> None: ... @overload @@ -1755,11 +1841,9 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class OperationDisplay(_model_base.Model): +class OperationDisplay(_Model): """Localized display information for and operation. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar provider: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". :vartype provider: str @@ -1788,17 +1872,18 @@ class OperationDisplay(_model_base.Model): views.""" -class ProxyUrlConfiguration(_model_base.Model): +class ProxyUrlConfiguration(_Model): """ProxyUrl configuration of cache node. :ivar proxy_url: Host Proxy Address configuration along with port number. This can be a proxy - or ip address. ex: xx.xx.xx.xxxx:80 or host name http://exampleproxy.com:80. + or ip address. ex: xx.xx.xx.xxxx:80 or host name `http://exampleproxy.com:80 + `_. :vartype proxy_url: str """ - proxy_url: Optional[str] = rest_field(name="proxyUrl") + proxy_url: Optional[str] = rest_field(name="proxyUrl", visibility=["read", "create", "update", "delete", "query"]) """Host Proxy Address configuration along with port number. This can be a proxy or ip address. ex: - xx.xx.xx.xxxx:80 or host name http://exampleproxy.com:80.""" + xx.xx.xx.xxxx:80 or host name `http://exampleproxy.com:80 `_.""" @overload def __init__( @@ -1818,7 +1903,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class SystemData(_model_base.Model): +class SystemData(_Model): """Metadata pertaining to creation and last modification of the resource. :ivar created_by: The identity that created the resource. @@ -1837,19 +1922,29 @@ class SystemData(_model_base.Model): :vartype last_modified_at: ~datetime.datetime """ - created_by: Optional[str] = rest_field(name="createdBy") + created_by: Optional[str] = rest_field(name="createdBy", visibility=["read", "create", "update", "delete", "query"]) """The identity that created the resource.""" - created_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field(name="createdByType") + created_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field( + name="createdByType", visibility=["read", "create", "update", "delete", "query"] + ) """The type of identity that created the resource. Known values are: \"User\", \"Application\", \"ManagedIdentity\", and \"Key\".""" - created_at: Optional[datetime.datetime] = rest_field(name="createdAt", format="rfc3339") + created_at: Optional[datetime.datetime] = rest_field( + name="createdAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) """The timestamp of resource creation (UTC).""" - last_modified_by: Optional[str] = rest_field(name="lastModifiedBy") + last_modified_by: Optional[str] = rest_field( + name="lastModifiedBy", visibility=["read", "create", "update", "delete", "query"] + ) """The identity that last modified the resource.""" - last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field(name="lastModifiedByType") + last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field( + name="lastModifiedByType", visibility=["read", "create", "update", "delete", "query"] + ) """The type of identity that last modified the resource. Known values are: \"User\", \"Application\", \"ManagedIdentity\", and \"Key\".""" - last_modified_at: Optional[datetime.datetime] = rest_field(name="lastModifiedAt", format="rfc3339") + last_modified_at: Optional[datetime.datetime] = rest_field( + name="lastModifiedAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) """The timestamp of resource last modification (UTC).""" @overload diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/models/_patch.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/models/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/models/_patch.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/models/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# 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. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/operations/_operations.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/operations/_operations.py index bcf520f14919..1a48bb6c34bd 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/operations/_operations.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,12 +6,13 @@ # Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase import json -import sys from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -32,16 +33,13 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._model_base import SdkJSONEncoder, _deserialize -from .._serialization import Serializer +from .._configuration import ConnectedCacheMgmtClientConfiguration +from .._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object +JSON = MutableMapping[str, Any] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -76,7 +74,7 @@ def build_enterprise_customer_operations_get_request( # pylint: disable=name-to accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseCustomers/{customerResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseCustomers/{customerResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -105,7 +103,7 @@ def build_enterprise_customer_operations_create_or_update_request( # pylint: di accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseCustomers/{customerResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseCustomers/{customerResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -136,7 +134,7 @@ def build_enterprise_customer_operations_update_request( # pylint: disable=name accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseCustomers/{customerResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseCustomers/{customerResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -166,7 +164,7 @@ def build_enterprise_customer_operations_delete_request( # pylint: disable=name accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseCustomers/{customerResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseCustomers/{customerResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -194,7 +192,7 @@ def build_enterprise_customer_operations_list_by_resource_group_request( # pyli accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseCustomers" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseCustomers" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -247,7 +245,7 @@ def build_cache_nodes_operations_get_request( accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/cacheNodes/{customerResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/cacheNodes/{customerResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -276,7 +274,7 @@ def build_cache_nodes_operations_createor_update_request( # pylint: disable=nam accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/cacheNodes/{customerResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/cacheNodes/{customerResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -306,7 +304,7 @@ def build_cache_nodes_operations_delete_request( # pylint: disable=name-too-lon accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/cacheNodes/{customerResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/cacheNodes/{customerResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -335,7 +333,7 @@ def build_cache_nodes_operations_update_request( # pylint: disable=name-too-lon accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/cacheNodes/{customerResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/cacheNodes/{customerResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -418,7 +416,7 @@ def build_isp_customers_get_request( accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -447,7 +445,7 @@ def build_isp_customers_create_or_update_request( # pylint: disable=name-too-lo accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -478,7 +476,7 @@ def build_isp_customers_update_request( accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -508,7 +506,7 @@ def build_isp_customers_delete_request( accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -536,7 +534,7 @@ def build_isp_customers_list_by_resource_group_request( # pylint: disable=name- accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -593,7 +591,7 @@ def build_isp_cache_nodes_operations_get_request( # pylint: disable=name-too-lo accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -627,7 +625,7 @@ def build_isp_cache_nodes_operations_create_or_update_request( # pylint: disabl accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -663,7 +661,7 @@ def build_isp_cache_nodes_operations_update_request( # pylint: disable=name-too accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -698,7 +696,7 @@ def build_isp_cache_nodes_operations_delete_request( # pylint: disable=name-too accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -727,7 +725,7 @@ def build_isp_cache_nodes_operations_list_by_isp_customer_resource_request( # p accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -759,7 +757,7 @@ def build_isp_cache_nodes_operations_get_bgp_cidrs_request( # pylint: disable=n accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}/getBgpCidrs" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}/getBgpCidrs" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -792,7 +790,7 @@ def build_isp_cache_nodes_operations_get_cache_node_install_details_request( # accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}/getCacheNodeInstallDetails" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/ispCustomers/{customerResourceName}/ispCacheNodes/{cacheNodeResourceName}/getCacheNodeInstallDetails" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -821,7 +819,7 @@ def build_enterprise_mcc_customers_get_request( # pylint: disable=name-too-long accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -850,7 +848,7 @@ def build_enterprise_mcc_customers_create_or_update_request( # pylint: disable= accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -881,7 +879,7 @@ def build_enterprise_mcc_customers_update_request( # pylint: disable=name-too-l accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -911,7 +909,7 @@ def build_enterprise_mcc_customers_delete_request( # pylint: disable=name-too-l accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -939,7 +937,7 @@ def build_enterprise_mcc_customers_list_by_resource_group_request( # pylint: di accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -996,7 +994,7 @@ def build_enterprise_mcc_cache_nodes_operations_get_request( # pylint: disable= accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -1030,7 +1028,7 @@ def build_enterprise_mcc_cache_nodes_operations_create_or_update_request( # pyl accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -1066,7 +1064,7 @@ def build_enterprise_mcc_cache_nodes_operations_update_request( # pylint: disab accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -1101,7 +1099,7 @@ def build_enterprise_mcc_cache_nodes_operations_delete_request( # pylint: disab accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -1130,7 +1128,7 @@ def build_enterprise_mcc_cache_nodes_operations_list_by_enterprise_mcc_customer_ accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -1162,7 +1160,7 @@ def build_enterprise_mcc_cache_nodes_operations_get_cache_node_install_details_r accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}/getCacheNodeInstallDetails" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedCache/enterpriseMccCustomers/{customerResourceName}/enterpriseMccCacheNodes/{cacheNodeResourceName}/getCacheNodeInstallDetails" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -1191,12 +1189,12 @@ class Operations: :attr:`operations` attribute. """ - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ConnectedCacheMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: @@ -1258,7 +1256,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.Operation], deserialized["value"]) + list_of_elem = _deserialize(List[_models.Operation], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -1274,7 +1272,7 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1292,12 +1290,12 @@ class EnterpriseCustomerOperationsOperations: :attr:`enterprise_customer_operations` attribute. """ - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ConnectedCacheMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get( @@ -1355,7 +1353,7 @@ def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -1424,7 +1422,7 @@ def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1763,7 +1761,7 @@ def update( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -1826,7 +1824,7 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1900,7 +1898,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.EnterprisePreviewResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.EnterprisePreviewResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -1916,7 +1914,7 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1985,7 +1983,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.EnterprisePreviewResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.EnterprisePreviewResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -2001,7 +1999,7 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -2019,12 +2017,12 @@ class CacheNodesOperationsOperations: :attr:`cache_nodes_operations` attribute. """ - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ConnectedCacheMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get( @@ -2082,7 +2080,7 @@ def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -2151,7 +2149,7 @@ def _createor_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -2381,7 +2379,7 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -2545,7 +2543,7 @@ def update( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -2626,7 +2624,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.CacheNodePreviewResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.CacheNodePreviewResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -2642,7 +2640,7 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -2711,7 +2709,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.CacheNodePreviewResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.CacheNodePreviewResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -2727,7 +2725,7 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -2745,12 +2743,12 @@ class IspCustomersOperations: :attr:`isp_customers` attribute. """ - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ConnectedCacheMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get(self, resource_group_name: str, customer_resource_name: str, **kwargs: Any) -> _models.IspCustomerResource: @@ -2805,7 +2803,7 @@ def get(self, resource_group_name: str, customer_resource_name: str, **kwargs: A except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -2874,7 +2872,7 @@ def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -3204,7 +3202,7 @@ def update( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -3257,7 +3255,7 @@ def _delete_initial(self, resource_group_name: str, customer_resource_name: str, except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -3397,7 +3395,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.IspCustomerResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.IspCustomerResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -3413,7 +3411,7 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -3481,7 +3479,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.IspCustomerResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.IspCustomerResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -3497,7 +3495,7 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -3515,12 +3513,12 @@ class IspCacheNodesOperationsOperations: :attr:`isp_cache_nodes_operations` attribute. """ - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ConnectedCacheMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get( @@ -3580,7 +3578,7 @@ def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -3651,7 +3649,7 @@ def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -4007,7 +4005,7 @@ def update( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -4063,7 +4061,7 @@ def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -4211,7 +4209,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.IspCacheNodeResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.IspCacheNodeResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -4227,7 +4225,7 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -4293,7 +4291,7 @@ def get_bgp_cidrs( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -4365,7 +4363,7 @@ def get_cache_node_install_details( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -4389,12 +4387,12 @@ class EnterpriseMccCustomersOperations: :attr:`enterprise_mcc_customers` attribute. """ - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ConnectedCacheMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get( @@ -4452,7 +4450,7 @@ def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -4521,7 +4519,7 @@ def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -4860,7 +4858,7 @@ def update( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -4913,7 +4911,7 @@ def _delete_initial(self, resource_group_name: str, customer_resource_name: str, except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -5054,7 +5052,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.EnterpriseMccCustomerResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.EnterpriseMccCustomerResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -5070,7 +5068,7 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -5140,7 +5138,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.EnterpriseMccCustomerResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.EnterpriseMccCustomerResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -5156,7 +5154,7 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -5174,12 +5172,12 @@ class EnterpriseMccCacheNodesOperationsOperations: # pylint: disable=name-too-l :attr:`enterprise_mcc_cache_nodes_operations` attribute. """ - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ConnectedCacheMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get( @@ -5240,7 +5238,7 @@ def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -5311,7 +5309,7 @@ def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -5676,7 +5674,7 @@ def update( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -5732,7 +5730,7 @@ def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -5881,7 +5879,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.EnterpriseMccCacheNodeResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.EnterpriseMccCacheNodeResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -5897,7 +5895,7 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -5963,7 +5961,7 @@ def get_cache_node_install_details( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/operations/_patch.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/operations/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/operations/_patch.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/operations/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# 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. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_create_or_update_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_create_or_update_maximum_set_gen.py index 394dc09d0306..84cd77bdb4c6 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_create_or_update_maximum_set_gen.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_create_or_update_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_get_cache_node_install_details_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_get_cache_node_install_details_maximum_set_gen.py index b04514f97249..b6c93134096c 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_get_cache_node_install_details_maximum_set_gen.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_get_cache_node_install_details_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_list_by_enterprise_mcc_customer_resource_maximum_set_gen.py b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_list_by_enterprise_mcc_customer_resource_maximum_set_gen.py index 09ed1d907f3d..c8c23f965967 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_list_by_enterprise_mcc_customer_resource_maximum_set_gen.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/generated_samples/enterprise_mcc_cache_nodes_operations_list_by_enterprise_mcc_customer_resource_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/setup.py b/sdk/connectedcache/azure-mgmt-connectedcache/setup.py index decc6c477e86..f399099bcc1c 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/setup.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/setup.py @@ -22,11 +22,9 @@ # Version extraction inspired from 'requests' with open( - ( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py") - ), + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py"), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) @@ -55,7 +53,6 @@ "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", @@ -79,7 +76,7 @@ "isodate>=0.6.1", "typing-extensions>=4.6.0", "azure-common>=1.1", - "azure-mgmt-core>=1.3.2", + "azure-mgmt-core>=1.5.0", ], - python_requires=">=3.8", + python_requires=">=3.9", ) diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/tsp-location.yaml b/sdk/connectedcache/azure-mgmt-connectedcache/tsp-location.yaml index 62929b944503..b9e6e911a033 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/tsp-location.yaml +++ b/sdk/connectedcache/azure-mgmt-connectedcache/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/connectedcache/ConnectedCache.Management -commit: 14f4f6b25fe74f90f4ee74fdac5cd7e05d419245 +commit: b9a8c9e8eb8998a222f126a005d1ab633f1daad9 repo: Azure/azure-rest-api-specs additionalDirectories: