Skip to content

Commit 8178e8d

Browse files
author
SDKAuto
committed
CodeGen from PR 23745 in Azure/azure-rest-api-specs
Merge d70671fe5dceb9c46dbd527e9e4fe09d7fab0ccd into 1c4b161f7e259669789340da018051084209e3fe
1 parent d31433d commit 8178e8d

File tree

64 files changed

+1237
-1200
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1237
-1200
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "21426cf85836ec17aaa4f20f58324a8666925e34",
2+
"commit": "1d1d84c307c53db67ddf4a312d2b57f2cf48ce5f",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.9.2",
55
"use": [
6-
"@autorest/python@6.2.1",
6+
"@autorest/python@6.4.8",
77
"@autorest/[email protected]"
88
],
9-
"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.2.1 --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
9+
"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.4.8 --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
1010
"readme": "specification/redis/resource-manager/readme.md"
1111
}

sdk/redis/azure-mgmt-redis/azure/mgmt/redis/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
try:
1515
from ._patch import __all__ as _patch_all
16-
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
16+
from ._patch import * # pylint: disable=unused-wildcard-import
1717
except ImportError:
1818
_patch_all = []
1919
from ._patch import patch_sdk as _patch_sdk

sdk/redis/azure-mgmt-redis/azure/mgmt/redis/_configuration.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
import sys
109
from typing import Any, TYPE_CHECKING
1110

1211
from azure.core.configuration import Configuration
@@ -15,11 +14,6 @@
1514

1615
from ._version import VERSION
1716

18-
if sys.version_info >= (3, 8):
19-
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
20-
else:
21-
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
22-
2317
if TYPE_CHECKING:
2418
# pylint: disable=unused-import,ungrouped-imports
2519
from azure.core.credentials import TokenCredential
@@ -36,14 +30,14 @@ class RedisManagementClientConfiguration(Configuration): # pylint: disable=too-
3630
:param subscription_id: Gets subscription credentials which uniquely identify the Microsoft
3731
Azure subscription. The subscription ID forms part of the URI for every service call. Required.
3832
:type subscription_id: str
39-
:keyword api_version: Api Version. Default value is "2022-06-01". Note that overriding this
33+
:keyword api_version: Api Version. Default value is "2023-04-01". Note that overriding this
4034
default value may result in unsupported behavior.
4135
:paramtype api_version: str
4236
"""
4337

4438
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
4539
super(RedisManagementClientConfiguration, self).__init__(**kwargs)
46-
api_version = kwargs.pop("api_version", "2022-06-01") # type: Literal["2022-06-01"]
40+
api_version: str = kwargs.pop("api_version", "2023-04-01")
4741

4842
if credential is None:
4943
raise ValueError("Parameter 'credential' must not be None.")
@@ -57,10 +51,7 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs
5751
kwargs.setdefault("sdk_moniker", "mgmt-redis/{}".format(VERSION))
5852
self._configure(**kwargs)
5953

60-
def _configure(
61-
self, **kwargs # type: Any
62-
):
63-
# type: (...) -> None
54+
def _configure(self, **kwargs: Any) -> None:
6455
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
6556
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
6657
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)

sdk/redis/azure-mgmt-redis/azure/mgmt/redis/_redis_management_client.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from azure.core.rest import HttpRequest, HttpResponse
1313
from azure.mgmt.core import ARMPipelineClient
1414

15-
from . import models
15+
from . import models as _models
1616
from ._configuration import RedisManagementClientConfiguration
1717
from ._serialization import Deserializer, Serializer
1818
from .operations import (
@@ -58,7 +58,7 @@ class RedisManagementClient: # pylint: disable=client-accepts-api-version-keywo
5858
:type subscription_id: str
5959
:param base_url: Service URL. Default value is "https://management.azure.com".
6060
:type base_url: str
61-
:keyword api_version: Api Version. Default value is "2022-06-01". Note that overriding this
61+
:keyword api_version: Api Version. Default value is "2023-04-01". Note that overriding this
6262
default value may result in unsupported behavior.
6363
:paramtype api_version: str
6464
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
@@ -75,9 +75,9 @@ def __init__(
7575
self._config = RedisManagementClientConfiguration(
7676
credential=credential, subscription_id=subscription_id, **kwargs
7777
)
78-
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
78+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
7979

80-
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
80+
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
8181
self._serialize = Serializer(client_models)
8282
self._deserialize = Deserializer(client_models)
8383
self._serialize.client_side_validation = False
@@ -118,15 +118,12 @@ def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
118118
request_copy.url = self._client.format_url(request_copy.url)
119119
return self._client.send_request(request_copy, **kwargs)
120120

121-
def close(self):
122-
# type: () -> None
121+
def close(self) -> None:
123122
self._client.close()
124123

125-
def __enter__(self):
126-
# type: () -> RedisManagementClient
124+
def __enter__(self) -> "RedisManagementClient":
127125
self._client.__enter__()
128126
return self
129127

130-
def __exit__(self, *exc_details):
131-
# type: (Any) -> None
128+
def __exit__(self, *exc_details: Any) -> None:
132129
self._client.__exit__(*exc_details)

0 commit comments

Comments
 (0)