Skip to content

Commit 8155f79

Browse files
author
SDKAuto
committed
CodeGen from PR 21661 in Azure/azure-rest-api-specs
Merge 1e9d43e277cf411c4f30414d70b163d36724eb6f into d6b9d9d7ea3fa4e6c0c2122f7641b9b009ce482e
1 parent 898faaa commit 8155f79

File tree

117 files changed

+5937
-3482
lines changed

Some content is hidden

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

117 files changed

+5937
-3482
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2+
"commit": "692ab385680a72a987ad0aa4e98e64779185d1ce",
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.7",
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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@
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
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

Lines changed: 11 additions & 8 deletions
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
@@ -27,16 +33,16 @@ class DataProtectionClientConfiguration(Configuration): # pylint: disable=too-m
2733
2834
:param credential: Credential needed for the client to connect to Azure. Required.
2935
:type credential: ~azure.core.credentials.TokenCredential
30-
:param subscription_id: The subscription Id. Required.
36+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
3137
:type subscription_id: str
32-
:keyword api_version: Api Version. Default value is "2022-09-01-preview". Note that overriding
33-
this default value may result in unsupported behavior.
38+
:keyword api_version: Api Version. Default value is "2022-12-01". Note that overriding this
39+
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: Literal["2022-12-01"] = kwargs.pop("api_version", "2022-12-01")
4046

4147
if credential is None:
4248
raise ValueError("Parameter 'credential' must not be None.")
@@ -50,10 +56,7 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs
5056
kwargs.setdefault("sdk_moniker", "mgmt-dataprotection/{}".format(VERSION))
5157
self._configure(**kwargs)
5258

53-
def _configure(
54-
self, **kwargs # type: Any
55-
):
56-
# type: (...) -> None
59+
def _configure(self, **kwargs: Any) -> None:
5760
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
5861
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
5962
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)

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

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,17 @@
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 DataProtectionClientConfiguration
1717
from ._serialization import Deserializer, Serializer
1818
from .operations import (
19-
BackupInstancesExtensionRoutingOperations,
2019
BackupInstancesOperations,
2120
BackupPoliciesOperations,
2221
BackupVaultOperationResultsOperations,
2322
BackupVaultsOperations,
2423
DataProtectionOperations,
2524
DataProtectionOperationsOperations,
2625
DeletedBackupInstancesOperations,
27-
DppResourceGuardProxyOperations,
2826
ExportJobsOperationResultOperations,
2927
ExportJobsOperations,
3028
JobsOperations,
@@ -71,9 +69,6 @@ class DataProtectionClient: # pylint: disable=client-accepts-api-version-keywor
7169
:vartype backup_policies: azure.mgmt.dataprotection.operations.BackupPoliciesOperations
7270
:ivar backup_instances: BackupInstancesOperations operations
7371
:vartype backup_instances: azure.mgmt.dataprotection.operations.BackupInstancesOperations
74-
:ivar backup_instances_extension_routing: BackupInstancesExtensionRoutingOperations operations
75-
:vartype backup_instances_extension_routing:
76-
azure.mgmt.dataprotection.operations.BackupInstancesExtensionRoutingOperations
7772
:ivar recovery_points: RecoveryPointsOperations operations
7873
:vartype recovery_points: azure.mgmt.dataprotection.operations.RecoveryPointsOperations
7974
:ivar jobs: JobsOperations operations
@@ -91,17 +86,14 @@ class DataProtectionClient: # pylint: disable=client-accepts-api-version-keywor
9186
azure.mgmt.dataprotection.operations.DeletedBackupInstancesOperations
9287
:ivar resource_guards: ResourceGuardsOperations operations
9388
:vartype resource_guards: azure.mgmt.dataprotection.operations.ResourceGuardsOperations
94-
:ivar dpp_resource_guard_proxy: DppResourceGuardProxyOperations operations
95-
:vartype dpp_resource_guard_proxy:
96-
azure.mgmt.dataprotection.operations.DppResourceGuardProxyOperations
9789
:param credential: Credential needed for the client to connect to Azure. Required.
9890
:type credential: ~azure.core.credentials.TokenCredential
99-
:param subscription_id: The subscription Id. Required.
91+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
10092
:type subscription_id: str
10193
:param base_url: Service URL. Default value is "https://management.azure.com".
10294
:type base_url: str
103-
:keyword api_version: Api Version. Default value is "2022-09-01-preview". Note that overriding
104-
this default value may result in unsupported behavior.
95+
:keyword api_version: Api Version. Default value is "2022-12-01". Note that overriding this
96+
default value may result in unsupported behavior.
10597
:paramtype api_version: str
10698
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
10799
Retry-After header is present.
@@ -119,7 +111,7 @@ def __init__(
119111
)
120112
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
121113

122-
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
114+
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
123115
self._serialize = Serializer(client_models)
124116
self._deserialize = Deserializer(client_models)
125117
self._serialize.client_side_validation = False
@@ -147,9 +139,6 @@ def __init__(
147139
self.backup_instances = BackupInstancesOperations(
148140
self._client, self._config, self._serialize, self._deserialize
149141
)
150-
self.backup_instances_extension_routing = BackupInstancesExtensionRoutingOperations(
151-
self._client, self._config, self._serialize, self._deserialize
152-
)
153142
self.recovery_points = RecoveryPointsOperations(self._client, self._config, self._serialize, self._deserialize)
154143
self.jobs = JobsOperations(self._client, self._config, self._serialize, self._deserialize)
155144
self.restorable_time_ranges = RestorableTimeRangesOperations(
@@ -163,9 +152,6 @@ def __init__(
163152
self._client, self._config, self._serialize, self._deserialize
164153
)
165154
self.resource_guards = ResourceGuardsOperations(self._client, self._config, self._serialize, self._deserialize)
166-
self.dpp_resource_guard_proxy = DppResourceGuardProxyOperations(
167-
self._client, self._config, self._serialize, self._deserialize
168-
)
169155

170156
def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
171157
"""Runs the network request through the client's chained policies.
@@ -189,15 +175,12 @@ def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
189175
request_copy.url = self._client.format_url(request_copy.url)
190176
return self._client.send_request(request_copy, **kwargs)
191177

192-
def close(self):
193-
# type: () -> None
178+
def close(self) -> None:
194179
self._client.close()
195180

196-
def __enter__(self):
197-
# type: () -> DataProtectionClient
181+
def __enter__(self) -> "DataProtectionClient":
198182
self._client.__enter__()
199183
return self
200184

201-
def __exit__(self, *exc_details):
202-
# type: (Any) -> None
185+
def __exit__(self, *exc_details) -> None:
203186
self._client.__exit__(*exc_details)

0 commit comments

Comments
 (0)