Skip to content

Commit 62935c9

Browse files
author
SDKAuto
committed
CodeGen from PR 21452 in Azure/azure-rest-api-specs
Merge fe8518a30954942a6f94747f0a2ef7a9b9f58338 into 894645e485d2f01e83999480d440e1bace3fec9b
1 parent 442fb0e commit 62935c9

File tree

108 files changed

+4344
-381
lines changed

Some content is hidden

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

108 files changed

+4344
-381
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2+
"commit": "72edf7daefd4cec94ab77ee5b4329917e32c8cea",
3+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
24
"autorest": "3.9.2",
35
"use": [
4-
"@autorest/python@6.1.9",
6+
"@autorest/python@6.2.1",
57
"@autorest/[email protected]"
68
],
7-
"commit": "33d5054122e52490eef9925d6cbe801f28b88e18",
8-
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9-
"autorest_command": "autorest specification/dataprotection/resource-manager/readme.md --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/dataprotection/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/[email protected] --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
1010
"readme": "specification/dataprotection/resource-manager/readme.md"
1111
}

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

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
_patch_all = []
1919
from ._patch import patch_sdk as _patch_sdk
2020

21-
__all__ = ["DataProtectionClient"]
21+
__all__ = [
22+
"DataProtectionClient",
23+
]
2224
__all__.extend([p for p in _patch_all if p not in __all__])
2325

2426
_patch_sdk()

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

+8-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9+
import sys
910
from typing import Any, TYPE_CHECKING
1011

1112
from azure.core.configuration import Configuration
@@ -14,6 +15,11 @@
1415

1516
from ._version import VERSION
1617

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+
1723
if TYPE_CHECKING:
1824
# pylint: disable=unused-import,ungrouped-imports
1925
from azure.core.credentials import TokenCredential
@@ -29,14 +35,14 @@ class DataProtectionClientConfiguration(Configuration): # pylint: disable=too-m
2935
:type credential: ~azure.core.credentials.TokenCredential
3036
:param subscription_id: The subscription Id. Required.
3137
:type subscription_id: str
32-
:keyword api_version: Api Version. Default value is "2022-09-01-preview". Note that overriding
38+
:keyword api_version: Api Version. Default value is "2022-10-01-preview". Note that overriding
3339
this default value may result in unsupported behavior.
3440
:paramtype api_version: str
3541
"""
3642

3743
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
3844
super(DataProtectionClientConfiguration, self).__init__(**kwargs)
39-
api_version = kwargs.pop("api_version", "2022-09-01-preview") # type: str
45+
api_version = kwargs.pop("api_version", "2022-10-01-preview") # type: Literal["2022-10-01-preview"]
4046

4147
if credential is None:
4248
raise ValueError("Parameter 'credential' must not be None.")

sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/_data_protection_client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class DataProtectionClient: # pylint: disable=client-accepts-api-version-keywor
100100
:type subscription_id: str
101101
:param base_url: Service URL. Default value is "https://management.azure.com".
102102
:type base_url: str
103-
:keyword api_version: Api Version. Default value is "2022-09-01-preview". Note that overriding
103+
:keyword api_version: Api Version. Default value is "2022-10-01-preview". Note that overriding
104104
this default value may result in unsupported behavior.
105105
:paramtype api_version: str
106106
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no

sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "1.0.0b2"
9+
VERSION = "1.0.0b1"

sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/__init__.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
_patch_all = []
1616
from ._patch import patch_sdk as _patch_sdk
1717

18-
__all__ = ["DataProtectionClient"]
18+
__all__ = [
19+
"DataProtectionClient",
20+
]
1921
__all__.extend([p for p in _patch_all if p not in __all__])
2022

2123
_patch_sdk()

sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/_configuration.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9+
import sys
910
from typing import Any, TYPE_CHECKING
1011

1112
from azure.core.configuration import Configuration
@@ -14,6 +15,11 @@
1415

1516
from .._version import VERSION
1617

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+
1723
if TYPE_CHECKING:
1824
# pylint: disable=unused-import,ungrouped-imports
1925
from azure.core.credentials_async import AsyncTokenCredential
@@ -29,14 +35,14 @@ class DataProtectionClientConfiguration(Configuration): # pylint: disable=too-m
2935
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
3036
:param subscription_id: The subscription Id. Required.
3137
:type subscription_id: str
32-
:keyword api_version: Api Version. Default value is "2022-09-01-preview". Note that overriding
38+
:keyword api_version: Api Version. Default value is "2022-10-01-preview". Note that overriding
3339
this default value may result in unsupported behavior.
3440
:paramtype api_version: str
3541
"""
3642

3743
def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
3844
super(DataProtectionClientConfiguration, self).__init__(**kwargs)
39-
api_version = kwargs.pop("api_version", "2022-09-01-preview") # type: str
45+
api_version = kwargs.pop("api_version", "2022-10-01-preview") # type: Literal["2022-10-01-preview"]
4046

4147
if credential is None:
4248
raise ValueError("Parameter 'credential' must not be None.")

sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/_data_protection_client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class DataProtectionClient: # pylint: disable=client-accepts-api-version-keywor
100100
:type subscription_id: str
101101
:param base_url: Service URL. Default value is "https://management.azure.com".
102102
:type base_url: str
103-
:keyword api_version: Api Version. Default value is "2022-09-01-preview". Note that overriding
103+
:keyword api_version: Api Version. Default value is "2022-10-01-preview". Note that overriding
104104
this default value may result in unsupported behavior.
105105
:paramtype api_version: str
106106
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no

sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_backup_instances_extension_routing_operations.py

+19-5
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
# Code generated by Microsoft (R) AutoRest Code Generator.
77
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
88
# --------------------------------------------------------------------------
9+
import sys
910
from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar
10-
from urllib.parse import parse_qs, urljoin, urlparse
11+
import urllib.parse
1112

1213
from azure.core.async_paging import AsyncItemPaged, AsyncList
1314
from azure.core.exceptions import (
@@ -29,6 +30,10 @@
2930
from ..._vendor import _convert_request
3031
from ...operations._backup_instances_extension_routing_operations import build_list_request
3132

33+
if sys.version_info >= (3, 8):
34+
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
35+
else:
36+
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
3237
T = TypeVar("T")
3338
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
3439

@@ -69,7 +74,9 @@ def list(self, resource_id: str, **kwargs: Any) -> AsyncIterable["_models.Backup
6974
_headers = kwargs.pop("headers", {}) or {}
7075
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
7176

72-
api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str
77+
api_version = kwargs.pop(
78+
"api_version", _params.pop("api-version", self._config.api_version)
79+
) # type: Literal["2022-10-01-preview"]
7380
cls = kwargs.pop("cls", None) # type: ClsType[_models.BackupInstanceResourceList]
7481

7582
error_map = {
@@ -95,10 +102,17 @@ def prepare_request(next_link=None):
95102

96103
else:
97104
# make call to next link with the client's api-version
98-
_parsed_next_link = urlparse(next_link)
99-
_next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query))
105+
_parsed_next_link = urllib.parse.urlparse(next_link)
106+
_next_request_params = case_insensitive_dict(
107+
{
108+
key: [urllib.parse.quote(v) for v in value]
109+
for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
110+
}
111+
)
100112
_next_request_params["api-version"] = self._config.api_version
101-
request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params)
113+
request = HttpRequest(
114+
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
115+
)
102116
request = _convert_request(request)
103117
request.url = self._client.format_url(request.url) # type: ignore
104118
request.method = "GET"

0 commit comments

Comments
 (0)