From 3c2bf36f820926041c797486679ae3c55ed25587 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 23 Aug 2023 15:34:24 +0000 Subject: [PATCH] CodeGen from PR 24729 in Azure/azure-rest-api-specs Merge 14f64805a80f0e439945255e4034223305c5c901 into eaaa0d77e4033ebf60e7dd77eec56f4160b95cf4 --- sdk/redis/azure-mgmt-redis/_meta.json | 10 +- .../azure/mgmt/redis/_serialization.py | 26 +++-- .../azure/mgmt/redis/_vendor.py | 14 --- .../azure/mgmt/redis/_version.py | 2 +- .../azure/mgmt/redis/models/_models_py3.py | 105 +++++++++++------- .../models/_redis_management_client_enums.py | 6 +- .../_async_operation_status_operations.py | 4 +- .../operations/_firewall_rules_operations.py | 10 +- .../operations/_linked_server_operations.py | 10 +- .../operations/_patch_schedules_operations.py | 10 +- ...private_endpoint_connections_operations.py | 10 +- .../_private_link_resources_operations.py | 4 +- .../redis/operations/_redis_operations.py | 28 ++--- 13 files changed, 129 insertions(+), 110 deletions(-) diff --git a/sdk/redis/azure-mgmt-redis/_meta.json b/sdk/redis/azure-mgmt-redis/_meta.json index 5caa785f4e00..30f72c399cc4 100644 --- a/sdk/redis/azure-mgmt-redis/_meta.json +++ b/sdk/redis/azure-mgmt-redis/_meta.json @@ -1,11 +1,11 @@ { - "commit": "c183bb012de8e9e1d0d2e67a0994748df4747d2c", + "commit": "55d59a0742ed529a5a06b232cf319e643a081c9e", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest": "3.9.2", + "autorest": "3.9.7", "use": [ - "@autorest/python@6.4.12", - "@autorest/modelerfour@4.24.3" + "@autorest/python@6.7.1", + "@autorest/modelerfour@4.26.2" ], - "autorest_command": "autorest specification/redis/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.4.12 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False", + "autorest_command": "autorest specification/redis/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.7.1 --use=@autorest/modelerfour@4.26.2 --version=3.9.7 --version-tolerant=False", "readme": "specification/redis/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/_serialization.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/_serialization.py index 842ae727fbbc..4bae2292227b 100644 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/_serialization.py +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/_serialization.py @@ -662,8 +662,9 @@ def _serialize(self, target_obj, data_type=None, **kwargs): _serialized.update(_new_attr) # type: ignore _new_attr = _new_attr[k] # type: ignore _serialized = _serialized[k] - except ValueError: - continue + except ValueError as err: + if isinstance(err, SerializationError): + raise except (AttributeError, KeyError, TypeError) as err: msg = "Attribute {} in object {} cannot be serialized.\n{}".format(attr_name, class_name, str(target_obj)) @@ -741,6 +742,8 @@ def query(self, name, data, data_type, **kwargs): :param data: The data to be serialized. :param str data_type: The type to be serialized from. + :keyword bool skip_quote: Whether to skip quote the serialized result. + Defaults to False. :rtype: str :raises: TypeError if serialization fails. :raises: ValueError if data is None @@ -749,10 +752,8 @@ def query(self, name, data, data_type, **kwargs): # Treat the list aside, since we don't want to encode the div separator if data_type.startswith("["): internal_data_type = data_type[1:-1] - data = [self.serialize_data(d, internal_data_type, **kwargs) if d is not None else "" for d in data] - if not kwargs.get("skip_quote", False): - data = [quote(str(d), safe="") for d in data] - return str(self.serialize_iter(data, internal_data_type, **kwargs)) + do_quote = not kwargs.get("skip_quote", False) + return str(self.serialize_iter(data, internal_data_type, do_quote=do_quote, **kwargs)) # Not a list, regular serialization output = self.serialize_data(data, data_type, **kwargs) @@ -891,6 +892,8 @@ def serialize_iter(self, data, iter_type, div=None, **kwargs): not be None or empty. :param str div: If set, this str will be used to combine the elements in the iterable into a combined string. Default is 'None'. + :keyword bool do_quote: Whether to quote the serialized result of each iterable element. + Defaults to False. :rtype: list, str """ if isinstance(data, str): @@ -903,9 +906,14 @@ def serialize_iter(self, data, iter_type, div=None, **kwargs): for d in data: try: serialized.append(self.serialize_data(d, iter_type, **kwargs)) - except ValueError: + except ValueError as err: + if isinstance(err, SerializationError): + raise serialized.append(None) + if kwargs.get("do_quote", False): + serialized = ["" if s is None else quote(str(s), safe="") for s in serialized] + if div: serialized = ["" if s is None else str(s) for s in serialized] serialized = div.join(serialized) @@ -950,7 +958,9 @@ def serialize_dict(self, attr, dict_type, **kwargs): for key, value in attr.items(): try: serialized[self.serialize_unicode(key)] = self.serialize_data(value, dict_type, **kwargs) - except ValueError: + except ValueError as err: + if isinstance(err, SerializationError): + raise serialized[self.serialize_unicode(key)] = None if "xml" in serialization_ctxt: diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/_vendor.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/_vendor.py index bd0df84f5319..0dafe0e287ff 100644 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/_vendor.py +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/_vendor.py @@ -5,8 +5,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import List, cast - from azure.core.pipeline.transport import HttpRequest @@ -16,15 +14,3 @@ def _convert_request(request, files=None): if files: request.set_formdata_body(files) return request - - -def _format_url_section(template, **kwargs): - components = template.split("/") - while components: - try: - return template.format(**kwargs) - except KeyError as key: - # Need the cast, as for some reasons "split" is typed as list[str | Any] - formatted_components = cast(List[str], template.split("/")) - components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] - template = "/".join(components) diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/_version.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/_version.py index 9179afc8fe9f..dc6920075e88 100644 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/_version.py +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "14.2.0" +VERSION = "12.0.0b1" diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/_models_py3.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/_models_py3.py index 6b145d9757df..a3a7fc0a0e1f 100644 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/_models_py3.py +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/_models_py3.py @@ -1019,9 +1019,10 @@ class RedisCommonProperties(_serialization.Model): higher) to connect (e,g, '1.0', '1.1', '1.2'). Known values are: "1.0", "1.1", and "1.2". :vartype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion :ivar public_network_access: Whether or not public endpoint access is allowed for this cache. - Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private - endpoints are the exclusive access method. Default value is 'Enabled'. Known values are: - "Enabled" and "Disabled". + Value is optional, but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private + endpoints are the exclusive access method. Default value is 'Enabled'. Note: This setting is + important for caches with private endpoints. It has *no effect* on caches that are joined to, + or injected into, a virtual network subnet. Known values are: "Enabled" and "Disabled". :vartype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess """ @@ -1076,9 +1077,11 @@ def __init__( higher) to connect (e,g, '1.0', '1.1', '1.2'). Known values are: "1.0", "1.1", and "1.2". :paramtype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion :keyword public_network_access: Whether or not public endpoint access is allowed for this - cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', - private endpoints are the exclusive access method. Default value is 'Enabled'. Known values - are: "Enabled" and "Disabled". + cache. Value is optional, but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', + private endpoints are the exclusive access method. Default value is 'Enabled'. Note: This + setting is important for caches with private endpoints. It has *no effect* on caches that are + joined to, or injected into, a virtual network subnet. Known values are: "Enabled" and + "Disabled". :paramtype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess """ super().__init__(**kwargs) @@ -1294,9 +1297,10 @@ class RedisCreateParameters(_serialization.Model): # pylint: disable=too-many-i higher) to connect (e,g, '1.0', '1.1', '1.2'). Known values are: "1.0", "1.1", and "1.2". :vartype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion :ivar public_network_access: Whether or not public endpoint access is allowed for this cache. - Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private - endpoints are the exclusive access method. Default value is 'Enabled'. Known values are: - "Enabled" and "Disabled". + Value is optional, but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private + endpoints are the exclusive access method. Default value is 'Enabled'. Note: This setting is + important for caches with private endpoints. It has *no effect* on caches that are joined to, + or injected into, a virtual network subnet. Known values are: "Enabled" and "Disabled". :vartype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess :ivar sku: The SKU of the Redis cache to deploy. Required. :vartype sku: ~azure.mgmt.redis.models.Sku @@ -1394,9 +1398,11 @@ def __init__( higher) to connect (e,g, '1.0', '1.1', '1.2'). Known values are: "1.0", "1.1", and "1.2". :paramtype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion :keyword public_network_access: Whether or not public endpoint access is allowed for this - cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', - private endpoints are the exclusive access method. Default value is 'Enabled'. Known values - are: "Enabled" and "Disabled". + cache. Value is optional, but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', + private endpoints are the exclusive access method. Default value is 'Enabled'. Note: This + setting is important for caches with private endpoints. It has *no effect* on caches that are + joined to, or injected into, a virtual network subnet. Known values are: "Enabled" and + "Disabled". :paramtype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess :keyword sku: The SKU of the Redis cache to deploy. Required. :paramtype sku: ~azure.mgmt.redis.models.Sku @@ -1454,9 +1460,10 @@ class RedisCreateProperties(RedisCommonProperties): # pylint: disable=too-many- higher) to connect (e,g, '1.0', '1.1', '1.2'). Known values are: "1.0", "1.1", and "1.2". :vartype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion :ivar public_network_access: Whether or not public endpoint access is allowed for this cache. - Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private - endpoints are the exclusive access method. Default value is 'Enabled'. Known values are: - "Enabled" and "Disabled". + Value is optional, but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private + endpoints are the exclusive access method. Default value is 'Enabled'. Note: This setting is + important for caches with private endpoints. It has *no effect* on caches that are joined to, + or injected into, a virtual network subnet. Known values are: "Enabled" and "Disabled". :vartype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess :ivar sku: The SKU of the Redis cache to deploy. Required. :vartype sku: ~azure.mgmt.redis.models.Sku @@ -1534,9 +1541,11 @@ def __init__( higher) to connect (e,g, '1.0', '1.1', '1.2'). Known values are: "1.0", "1.1", and "1.2". :paramtype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion :keyword public_network_access: Whether or not public endpoint access is allowed for this - cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', - private endpoints are the exclusive access method. Default value is 'Enabled'. Known values - are: "Enabled" and "Disabled". + cache. Value is optional, but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', + private endpoints are the exclusive access method. Default value is 'Enabled'. Note: This + setting is important for caches with private endpoints. It has *no effect* on caches that are + joined to, or injected into, a virtual network subnet. Known values are: "Enabled" and + "Disabled". :paramtype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess :keyword sku: The SKU of the Redis cache to deploy. Required. :paramtype sku: ~azure.mgmt.redis.models.Sku @@ -2225,9 +2234,10 @@ class RedisProperties(RedisCreateProperties): # pylint: disable=too-many-instan higher) to connect (e,g, '1.0', '1.1', '1.2'). Known values are: "1.0", "1.1", and "1.2". :vartype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion :ivar public_network_access: Whether or not public endpoint access is allowed for this cache. - Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private - endpoints are the exclusive access method. Default value is 'Enabled'. Known values are: - "Enabled" and "Disabled". + Value is optional, but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private + endpoints are the exclusive access method. Default value is 'Enabled'. Note: This setting is + important for caches with private endpoints. It has *no effect* on caches that are joined to, + or injected into, a virtual network subnet. Known values are: "Enabled" and "Disabled". :vartype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess :ivar sku: The SKU of the Redis cache to deploy. Required. :vartype sku: ~azure.mgmt.redis.models.Sku @@ -2341,9 +2351,11 @@ def __init__( higher) to connect (e,g, '1.0', '1.1', '1.2'). Known values are: "1.0", "1.1", and "1.2". :paramtype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion :keyword public_network_access: Whether or not public endpoint access is allowed for this - cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', - private endpoints are the exclusive access method. Default value is 'Enabled'. Known values - are: "Enabled" and "Disabled". + cache. Value is optional, but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', + private endpoints are the exclusive access method. Default value is 'Enabled'. Note: This + setting is important for caches with private endpoints. It has *no effect* on caches that are + joined to, or injected into, a virtual network subnet. Known values are: "Enabled" and + "Disabled". :paramtype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess :keyword sku: The SKU of the Redis cache to deploy. Required. :paramtype sku: ~azure.mgmt.redis.models.Sku @@ -2545,9 +2557,10 @@ class RedisResource(TrackedResource): # pylint: disable=too-many-instance-attri higher) to connect (e,g, '1.0', '1.1', '1.2'). Known values are: "1.0", "1.1", and "1.2". :vartype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion :ivar public_network_access: Whether or not public endpoint access is allowed for this cache. - Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private - endpoints are the exclusive access method. Default value is 'Enabled'. Known values are: - "Enabled" and "Disabled". + Value is optional, but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private + endpoints are the exclusive access method. Default value is 'Enabled'. Note: This setting is + important for caches with private endpoints. It has *no effect* on caches that are joined to, + or injected into, a virtual network subnet. Known values are: "Enabled" and "Disabled". :vartype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess :ivar sku: The SKU of the Redis cache to deploy. Required. :vartype sku: ~azure.mgmt.redis.models.Sku @@ -2690,9 +2703,11 @@ def __init__( # pylint: disable=too-many-locals higher) to connect (e,g, '1.0', '1.1', '1.2'). Known values are: "1.0", "1.1", and "1.2". :paramtype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion :keyword public_network_access: Whether or not public endpoint access is allowed for this - cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', - private endpoints are the exclusive access method. Default value is 'Enabled'. Known values - are: "Enabled" and "Disabled". + cache. Value is optional, but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', + private endpoints are the exclusive access method. Default value is 'Enabled'. Note: This + setting is important for caches with private endpoints. It has *no effect* on caches that are + joined to, or injected into, a virtual network subnet. Known values are: "Enabled" and + "Disabled". :paramtype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess :keyword sku: The SKU of the Redis cache to deploy. Required. :paramtype sku: ~azure.mgmt.redis.models.Sku @@ -2758,9 +2773,10 @@ class RedisUpdateParameters(_serialization.Model): # pylint: disable=too-many-i higher) to connect (e,g, '1.0', '1.1', '1.2'). Known values are: "1.0", "1.1", and "1.2". :vartype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion :ivar public_network_access: Whether or not public endpoint access is allowed for this cache. - Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private - endpoints are the exclusive access method. Default value is 'Enabled'. Known values are: - "Enabled" and "Disabled". + Value is optional, but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private + endpoints are the exclusive access method. Default value is 'Enabled'. Note: This setting is + important for caches with private endpoints. It has *no effect* on caches that are joined to, + or injected into, a virtual network subnet. Known values are: "Enabled" and "Disabled". :vartype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess :ivar sku: The SKU of the Redis cache to deploy. :vartype sku: ~azure.mgmt.redis.models.Sku @@ -2830,9 +2846,11 @@ def __init__( higher) to connect (e,g, '1.0', '1.1', '1.2'). Known values are: "1.0", "1.1", and "1.2". :paramtype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion :keyword public_network_access: Whether or not public endpoint access is allowed for this - cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', - private endpoints are the exclusive access method. Default value is 'Enabled'. Known values - are: "Enabled" and "Disabled". + cache. Value is optional, but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', + private endpoints are the exclusive access method. Default value is 'Enabled'. Note: This + setting is important for caches with private endpoints. It has *no effect* on caches that are + joined to, or injected into, a virtual network subnet. Known values are: "Enabled" and + "Disabled". :paramtype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess :keyword sku: The SKU of the Redis cache to deploy. :paramtype sku: ~azure.mgmt.redis.models.Sku @@ -2877,9 +2895,10 @@ class RedisUpdateProperties(RedisCommonProperties): higher) to connect (e,g, '1.0', '1.1', '1.2'). Known values are: "1.0", "1.1", and "1.2". :vartype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion :ivar public_network_access: Whether or not public endpoint access is allowed for this cache. - Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private - endpoints are the exclusive access method. Default value is 'Enabled'. Known values are: - "Enabled" and "Disabled". + Value is optional, but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private + endpoints are the exclusive access method. Default value is 'Enabled'. Note: This setting is + important for caches with private endpoints. It has *no effect* on caches that are joined to, + or injected into, a virtual network subnet. Known values are: "Enabled" and "Disabled". :vartype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess :ivar sku: The SKU of the Redis cache to deploy. :vartype sku: ~azure.mgmt.redis.models.Sku @@ -2938,9 +2957,11 @@ def __init__( higher) to connect (e,g, '1.0', '1.1', '1.2'). Known values are: "1.0", "1.1", and "1.2". :paramtype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion :keyword public_network_access: Whether or not public endpoint access is allowed for this - cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', - private endpoints are the exclusive access method. Default value is 'Enabled'. Known values - are: "Enabled" and "Disabled". + cache. Value is optional, but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', + private endpoints are the exclusive access method. Default value is 'Enabled'. Note: This + setting is important for caches with private endpoints. It has *no effect* on caches that are + joined to, or injected into, a virtual network subnet. Known values are: "Enabled" and + "Disabled". :paramtype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess :keyword sku: The SKU of the Redis cache to deploy. :paramtype sku: ~azure.mgmt.redis.models.Sku diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/_redis_management_client_enums.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/_redis_management_client_enums.py index afd3f3c3fb3e..eeeb213456b0 100644 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/_redis_management_client_enums.py +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/_redis_management_client_enums.py @@ -76,9 +76,11 @@ class ProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): class PublicNetworkAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Whether or not public endpoint access is allowed for this cache. Value is optional but if + """Whether or not public endpoint access is allowed for this cache. Value is optional, but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive - access method. Default value is 'Enabled'. + access method. Default value is 'Enabled'. Note: This setting is important for caches with + private endpoints. It has *no effect* on caches that are joined to, or injected into, a virtual + network subnet. """ ENABLED = "Enabled" diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_async_operation_status_operations.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_async_operation_status_operations.py index 3321a49b748f..24758c5045cd 100644 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_async_operation_status_operations.py +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_async_operation_status_operations.py @@ -25,7 +25,7 @@ from .. import models as _models from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._vendor import _convert_request T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +52,7 @@ def build_get_request(location: str, operation_id: str, subscription_id: str, ** "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_firewall_rules_operations.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_firewall_rules_operations.py index d8838cb745be..8902554746e9 100644 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_firewall_rules_operations.py +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_firewall_rules_operations.py @@ -28,7 +28,7 @@ from .. import models as _models from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._vendor import _convert_request T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -55,7 +55,7 @@ def build_list_request(resource_group_name: str, cache_name: str, subscription_i "cacheName": _SERIALIZER.url("cache_name", cache_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -88,7 +88,7 @@ def build_create_or_update_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -122,7 +122,7 @@ def build_get_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -154,7 +154,7 @@ def build_delete_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_linked_server_operations.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_linked_server_operations.py index c511ff5c53ae..3939fe3a0ca7 100644 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_linked_server_operations.py +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_linked_server_operations.py @@ -30,7 +30,7 @@ from .. import models as _models from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._vendor import _convert_request T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -61,7 +61,7 @@ def build_create_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -95,7 +95,7 @@ def build_delete_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -127,7 +127,7 @@ def build_get_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -156,7 +156,7 @@ def build_list_request(resource_group_name: str, name: str, subscription_id: str "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_patch_schedules_operations.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_patch_schedules_operations.py index b54c13bbd69e..15f3528e5680 100644 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_patch_schedules_operations.py +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_patch_schedules_operations.py @@ -28,7 +28,7 @@ from .. import models as _models from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._vendor import _convert_request T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -57,7 +57,7 @@ def build_list_by_redis_resource_request( "cacheName": _SERIALIZER.url("cache_name", cache_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -90,7 +90,7 @@ def build_create_or_update_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -124,7 +124,7 @@ def build_delete_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -156,7 +156,7 @@ def build_get_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_private_endpoint_connections_operations.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_private_endpoint_connections_operations.py index 02d1c97c3592..99108e7cb30a 100644 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_private_endpoint_connections_operations.py +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_private_endpoint_connections_operations.py @@ -30,7 +30,7 @@ from .. import models as _models from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._vendor import _convert_request T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -57,7 +57,7 @@ def build_list_request(resource_group_name: str, cache_name: str, subscription_i "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -95,7 +95,7 @@ def build_get_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -134,7 +134,7 @@ def build_put_request( ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -174,7 +174,7 @@ def build_delete_request( ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_private_link_resources_operations.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_private_link_resources_operations.py index e3d2798250c5..df2ee70f44bf 100644 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_private_link_resources_operations.py +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_private_link_resources_operations.py @@ -27,7 +27,7 @@ from .. import models as _models from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._vendor import _convert_request T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -56,7 +56,7 @@ def build_list_by_redis_cache_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_redis_operations.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_redis_operations.py index d770432c4276..e955b84d898c 100644 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_redis_operations.py +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_redis_operations.py @@ -30,7 +30,7 @@ from .. import models as _models from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._vendor import _convert_request T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -53,7 +53,7 @@ def build_check_name_availability_request(subscription_id: str, **kwargs: Any) - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -86,7 +86,7 @@ def build_list_upgrade_notifications_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -117,7 +117,7 @@ def build_create_request(resource_group_name: str, name: str, subscription_id: s "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -149,7 +149,7 @@ def build_update_request(resource_group_name: str, name: str, subscription_id: s "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -180,7 +180,7 @@ def build_delete_request(resource_group_name: str, name: str, subscription_id: s "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -209,7 +209,7 @@ def build_get_request(resource_group_name: str, name: str, subscription_id: str, "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -237,7 +237,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -261,7 +261,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -290,7 +290,7 @@ def build_list_keys_request(resource_group_name: str, name: str, subscription_id "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -322,7 +322,7 @@ def build_regenerate_key_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -354,7 +354,7 @@ def build_force_reboot_request(resource_group_name: str, name: str, subscription "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -386,7 +386,7 @@ def build_import_data_request(resource_group_name: str, name: str, subscription_ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -418,7 +418,7 @@ def build_export_data_request(resource_group_name: str, name: str, subscription_ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")