diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/_meta.json b/sdk/connectedcache/azure-mgmt-connectedcache/_meta.json index b4a21ddfeacf..3bf4bce485a4 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/_meta.json +++ b/sdk/connectedcache/azure-mgmt-connectedcache/_meta.json @@ -1,6 +1,6 @@ { - "commit": "14f4f6b25fe74f90f4ee74fdac5cd7e05d419245", + "commit": "8f6744026f8f69f599f4713dadf1109f04e23a31", "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.39.1" } \ 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..a49849b176ab --- /dev/null +++ b/sdk/connectedcache/azure-mgmt-connectedcache/apiview-properties.json @@ -0,0 +1,83 @@ +{ + "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.ConnectedCacheMgmtClient.operations.list": "Azure.ResourceManager.Operations.list", + "azure.mgmt.connectedcache.ConnectedCacheMgmtClient.enterprise_customer_operations.get": "Microsoft.ConnectedCache.EnterpriseCustomerOperations.get", + "azure.mgmt.connectedcache.ConnectedCacheMgmtClient.enterprise_customer_operations.begin_create_or_update": "Microsoft.ConnectedCache.EnterpriseCustomerOperations.createOrUpdate", + "azure.mgmt.connectedcache.ConnectedCacheMgmtClient.enterprise_customer_operations.update": "Microsoft.ConnectedCache.EnterpriseCustomerOperations.update", + "azure.mgmt.connectedcache.ConnectedCacheMgmtClient.enterprise_customer_operations.delete": "Microsoft.ConnectedCache.EnterpriseCustomerOperations.delete", + "azure.mgmt.connectedcache.ConnectedCacheMgmtClient.enterprise_customer_operations.list_by_resource_group": "Microsoft.ConnectedCache.EnterpriseCustomerOperations.listByResourceGroup", + "azure.mgmt.connectedcache.ConnectedCacheMgmtClient.enterprise_customer_operations.list_by_subscription": "Microsoft.ConnectedCache.EnterpriseCustomerOperations.listBySubscription", + "azure.mgmt.connectedcache.ConnectedCacheMgmtClient.cache_nodes_operations.get": "Microsoft.ConnectedCache.CacheNodesOperations.get", + "azure.mgmt.connectedcache.ConnectedCacheMgmtClient.cache_nodes_operations.begin_createor_update": "Microsoft.ConnectedCache.CacheNodesOperations.createorUpdate", + "azure.mgmt.connectedcache.ConnectedCacheMgmtClient.cache_nodes_operations.delete": "Microsoft.ConnectedCache.CacheNodesOperations.delete", + "azure.mgmt.connectedcache.ConnectedCacheMgmtClient.cache_nodes_operations.update": "Microsoft.ConnectedCache.CacheNodesOperations.update", + "azure.mgmt.connectedcache.ConnectedCacheMgmtClient.cache_nodes_operations.list_by_resource_group": "Microsoft.ConnectedCache.CacheNodesOperations.listByResourceGroup", + "azure.mgmt.connectedcache.ConnectedCacheMgmtClient.cache_nodes_operations.list_by_subscription": "Microsoft.ConnectedCache.CacheNodesOperations.listBySubscription", + "azure.mgmt.connectedcache.ConnectedCacheMgmtClient.isp_customers.get": "Microsoft.ConnectedCache.IspCustomers.get", + "azure.mgmt.connectedcache.ConnectedCacheMgmtClient.isp_customers.begin_create_or_update": "Microsoft.ConnectedCache.IspCustomers.createOrUpdate", + "azure.mgmt.connectedcache.ConnectedCacheMgmtClient.isp_customers.update": "Microsoft.ConnectedCache.IspCustomers.update", + "azure.mgmt.connectedcache.ConnectedCacheMgmtClient.isp_customers.begin_delete": "Microsoft.ConnectedCache.IspCustomers.delete", + "azure.mgmt.connectedcache.ConnectedCacheMgmtClient.isp_customers.list_by_resource_group": "Microsoft.ConnectedCache.IspCustomers.listByResourceGroup", + "azure.mgmt.connectedcache.ConnectedCacheMgmtClient.isp_customers.list_by_subscription": "Microsoft.ConnectedCache.IspCustomers.listBySubscription", + "azure.mgmt.connectedcache.ConnectedCacheMgmtClient.isp_cache_nodes_operations.get": "Microsoft.ConnectedCache.IspCacheNodesOperations.get", + "azure.mgmt.connectedcache.ConnectedCacheMgmtClient.isp_cache_nodes_operations.begin_create_or_update": "Microsoft.ConnectedCache.IspCacheNodesOperations.createOrUpdate", + "azure.mgmt.connectedcache.ConnectedCacheMgmtClient.isp_cache_nodes_operations.update": "Microsoft.ConnectedCache.IspCacheNodesOperations.update", + "azure.mgmt.connectedcache.ConnectedCacheMgmtClient.isp_cache_nodes_operations.begin_delete": "Microsoft.ConnectedCache.IspCacheNodesOperations.delete", + "azure.mgmt.connectedcache.ConnectedCacheMgmtClient.isp_cache_nodes_operations.list_by_isp_customer_resource": "Microsoft.ConnectedCache.IspCacheNodesOperations.listByIspCustomerResource", + "azure.mgmt.connectedcache.ConnectedCacheMgmtClient.isp_cache_nodes_operations.get_bgp_cidrs": "Microsoft.ConnectedCache.IspCacheNodesOperations.getBgpCidrs", + "azure.mgmt.connectedcache.ConnectedCacheMgmtClient.isp_cache_nodes_operations.get_cache_node_install_details": "Microsoft.ConnectedCache.IspCacheNodesOperations.getCacheNodeInstallDetails", + "azure.mgmt.connectedcache.ConnectedCacheMgmtClient.enterprise_mcc_customers.get": "Microsoft.ConnectedCache.EnterpriseMccCustomers.get", + "azure.mgmt.connectedcache.ConnectedCacheMgmtClient.enterprise_mcc_customers.begin_create_or_update": "Microsoft.ConnectedCache.EnterpriseMccCustomers.createOrUpdate", + "azure.mgmt.connectedcache.ConnectedCacheMgmtClient.enterprise_mcc_customers.update": "Microsoft.ConnectedCache.EnterpriseMccCustomers.update", + "azure.mgmt.connectedcache.ConnectedCacheMgmtClient.enterprise_mcc_customers.begin_delete": "Microsoft.ConnectedCache.EnterpriseMccCustomers.delete", + "azure.mgmt.connectedcache.ConnectedCacheMgmtClient.enterprise_mcc_customers.list_by_resource_group": "Microsoft.ConnectedCache.EnterpriseMccCustomers.listByResourceGroup", + "azure.mgmt.connectedcache.ConnectedCacheMgmtClient.enterprise_mcc_customers.list_by_subscription": "Microsoft.ConnectedCache.EnterpriseMccCustomers.listBySubscription", + "azure.mgmt.connectedcache.ConnectedCacheMgmtClient.enterprise_mcc_cache_nodes_operations.get": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.get", + "azure.mgmt.connectedcache.ConnectedCacheMgmtClient.enterprise_mcc_cache_nodes_operations.begin_create_or_update": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.createOrUpdate", + "azure.mgmt.connectedcache.ConnectedCacheMgmtClient.enterprise_mcc_cache_nodes_operations.update": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.update", + "azure.mgmt.connectedcache.ConnectedCacheMgmtClient.enterprise_mcc_cache_nodes_operations.begin_delete": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.delete", + "azure.mgmt.connectedcache.ConnectedCacheMgmtClient.enterprise_mcc_cache_nodes_operations.list_by_enterprise_mcc_customer_resource": "Microsoft.ConnectedCache.EnterpriseMccCacheNodesOperations.listByEnterpriseMccCustomerResource", + "azure.mgmt.connectedcache.ConnectedCacheMgmtClient.enterprise_mcc_cache_nodes_operations.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/_model_base.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_model_base.py index e6a2730f9276..3072ee252ed9 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_model_base.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_model_base.py @@ -373,15 +373,34 @@ 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: @@ -397,17 +416,38 @@ def pop(self, key: str, default: _T) -> _T: ... def pop(self, key: str, default: typing.Any) -> typing.Any: ... 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: + """ + 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 @@ -417,6 +457,13 @@ def setdefault(self, key: str, default: None = None) -> None: ... def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... 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) @@ -754,7 +801,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 +941,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/_serialization.py index ce17d1798ce7..7a0232de5ddc 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_serialization.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_serialization.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. @@ -48,9 +48,7 @@ IO, Mapping, Callable, - TypeVar, MutableMapping, - Type, List, ) @@ -61,13 +59,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 +183,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 +411,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 +495,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 +558,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 +668,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 +713,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 +737,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 +767,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 +787,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 +1124,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 +1150,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 +1183,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 +1361,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 +1373,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 +1420,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 +1434,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 +1615,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 +1649,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 +1731,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 +1777,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 +1868,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 +1881,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 +1896,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 +1914,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 +1927,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 +1945,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 +1961,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 +1976,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 +1999,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 +2037,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/aio/operations/_operations.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/operations/_operations.py index 72e9eddb43eb..d1cc7c240aa5 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 @@ -12,6 +12,7 @@ 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 ..._model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize +from ..._serialization import Deserializer, Serializer from ...operations._operations import ( build_cache_nodes_operations_createor_update_request, build_cache_nodes_operations_delete_request, @@ -74,6 +76,7 @@ build_isp_customers_update_request, build_operations_list_request, ) +from .._configuration import ConnectedCacheMgmtClientConfiguration if sys.version_info >= (3, 9): from collections.abc import MutableMapping @@ -96,10 +99,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"]: @@ -177,7 +180,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 +200,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 +261,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 +330,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 +669,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 +730,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: @@ -817,7 +820,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 @@ -902,7 +905,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 +925,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 +986,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 +1055,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 +1283,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 +1447,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: @@ -1541,7 +1544,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 @@ -1626,7 +1629,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 +1649,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 +1709,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 +1778,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 +2112,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 +2167,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 = {} @@ -2323,7 +2326,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 @@ -2408,7 +2411,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 +2431,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 +2494,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 +2565,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 +2925,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 +2981,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 = {} @@ -3143,7 +3146,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 +3212,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 +3284,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 +3310,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 +3371,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 +3440,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 +3779,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 +3834,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 = {} @@ -3990,7 +3993,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 @@ -4076,7 +4079,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 +4099,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 +4163,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 +4234,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 +4599,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 +4655,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 = {} @@ -4817,7 +4820,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 +4886,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/models/_models.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/models/_models.py index 580a2ab7dd89..950a14af74cb 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. @@ -21,8 +21,6 @@ class AdditionalCacheNodeProperties(_model_base.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 +96,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 +116,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 +178,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 @@ -211,8 +235,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class AdditionalCustomerProperties(_model_base.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 +364,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 @@ -411,8 +457,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class BgpCidrsConfiguration(_model_base.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] """ @@ -428,7 +472,9 @@ class BgpConfiguration(_model_base.Model): :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 @@ -462,13 +508,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 @@ -495,8 +547,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class CacheNodeEntity(_model_base.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 +665,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 +731,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 +764,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 +802,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 @@ -778,8 +862,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class CacheNodeInstallProperties(_model_base.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 +874,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.""" @@ -825,8 +911,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class CacheNodeOldResponse(_model_base.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 +932,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 @@ -883,10 +973,8 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: 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. - :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 +988,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"]) @@ -914,11 +1002,8 @@ 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. - - :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 +1019,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 +1047,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 @@ -1010,8 +1092,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class CacheNodeProperty(_model_base.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 +1117,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 @@ -1108,8 +1196,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class CustomerEntity(_model_base.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 +1235,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 +1279,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.""" @@ -1221,8 +1331,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class CustomerProperty(_model_base.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 +1356,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 +1397,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 +1442,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 +1488,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 @@ -1432,8 +1533,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class ErrorAdditionalInfo(_model_base.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. @@ -1449,8 +1548,6 @@ class ErrorAdditionalInfo(_model_base.Model): class ErrorDetail(_model_base.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. @@ -1485,7 +1582,7 @@ class ErrorResponse(_model_base.Model): :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 +1606,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 +1651,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 +1696,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 +1715,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 +1743,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 +1762,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 @@ -1701,8 +1790,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: 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. - :ivar name: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". :vartype name: str @@ -1727,13 +1814,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 +1830,7 @@ class Operation(_model_base.Model): def __init__( self, *, - action_type: Optional[Union[str, "_models.ActionType"]] = None, + display: Optional["_models.OperationDisplay"] = None, ) -> None: ... @overload @@ -1758,8 +1847,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class OperationDisplay(_model_base.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 @@ -1792,13 +1879,14 @@ class ProxyUrlConfiguration(_model_base.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__( @@ -1837,19 +1925,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/operations/_operations.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/operations/_operations.py index bcf520f14919..fff69cdd857c 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. @@ -12,6 +12,7 @@ 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,8 +33,9 @@ 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 .._model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize +from .._serialization import Deserializer, Serializer if sys.version_info >= (3, 9): from collections.abc import MutableMapping @@ -76,7 +78,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 +107,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 +138,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 +168,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 +196,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 +249,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 +278,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 +308,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 +337,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 +420,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 +449,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 +480,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 +510,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 +538,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 +595,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 +629,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 +665,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 +700,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 +729,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 +761,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 +794,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 +823,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 +852,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 +883,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 +913,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 +941,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 +998,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 +1032,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 +1068,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 +1103,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 +1132,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 +1164,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"), @@ -1193,10 +1195,10 @@ class Operations: def __init__(self, *args, **kwargs): 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"]: @@ -1274,7 +1276,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 @@ -1294,10 +1296,10 @@ class EnterpriseCustomerOperationsOperations: def __init__(self, *args, **kwargs): 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 +1357,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 +1426,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 +1765,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 +1828,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: @@ -1916,7 +1918,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 @@ -2001,7 +2003,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 @@ -2021,10 +2023,10 @@ class CacheNodesOperationsOperations: def __init__(self, *args, **kwargs): 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 +2084,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 +2153,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 +2383,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 +2547,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: @@ -2642,7 +2644,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 @@ -2727,7 +2729,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 @@ -2747,10 +2749,10 @@ class IspCustomersOperations: def __init__(self, *args, **kwargs): 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 +2807,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 +2876,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 +3206,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 +3259,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 = {} @@ -3413,7 +3415,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 @@ -3497,7 +3499,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 @@ -3517,10 +3519,10 @@ class IspCacheNodesOperationsOperations: def __init__(self, *args, **kwargs): 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 +3582,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 +3653,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 +4009,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 +4065,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 = {} @@ -4227,7 +4229,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 +4295,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 +4367,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: @@ -4391,10 +4393,10 @@ class EnterpriseMccCustomersOperations: def __init__(self, *args, **kwargs): 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 +4454,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 +4523,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 +4862,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 +4915,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 = {} @@ -5070,7 +5072,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 @@ -5156,7 +5158,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 @@ -5176,10 +5178,10 @@ class EnterpriseMccCacheNodesOperationsOperations: # pylint: disable=name-too-l def __init__(self, *args, **kwargs): 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 +5242,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 +5313,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 +5678,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 +5734,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 = {} @@ -5897,7 +5899,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 +5965,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/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..a1d050bdabc0 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) diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/tsp-location.yaml b/sdk/connectedcache/azure-mgmt-connectedcache/tsp-location.yaml index 62929b944503..32d02056341c 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: 8f6744026f8f69f599f4713dadf1109f04e23a31 repo: Azure/azure-rest-api-specs additionalDirectories: