Skip to content

Commit 84877bb

Browse files
author
SDKAuto
committed
CodeGen from PR 23391 in Azure/azure-rest-api-specs
Merge dbb52b20c90aff2c8f8eba223c2e03bdd1dda832 into 5c021b26d815babdb06989b25fbb834cbbe7ba6b
1 parent 8ca5b34 commit 84877bb

File tree

132 files changed

+6059
-955
lines changed

Some content is hidden

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

132 files changed

+6059
-955
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "96c583e9d5d09c51fe8a21843180c51b98b4a7db",
2+
"commit": "29ba8a9ed2c638bb209f4b12a791a41d1fe74408",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.9.2",
55
"use": [
6-
"@autorest/python@6.4.0",
6+
"@autorest/python@6.4.8",
77
"@autorest/modelerfour@4.24.3"
88
],
9-
"autorest_command": "autorest specification/dataprotection/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.0 --use=@autorest/modelerfour@4.24.3 --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/python@6.4.8 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
1010
"readme": "specification/dataprotection/resource-manager/readme.md"
1111
}

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

Lines changed: 3 additions & 9 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
@@ -35,14 +29,14 @@ class DataProtectionMgmtClientConfiguration(Configuration): # pylint: disable=t
3529
:type credential: ~azure.core.credentials.TokenCredential
3630
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
3731
:type subscription_id: str
38-
:keyword api_version: Api Version. Default value is "2023-01-01". Note that overriding this
39-
default value may result in unsupported behavior.
32+
:keyword api_version: Api Version. Default value is "2023-04-01-preview". Note that overriding
33+
this default value may result in unsupported behavior.
4034
:paramtype api_version: str
4135
"""
4236

4337
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
4438
super(DataProtectionMgmtClientConfiguration, self).__init__(**kwargs)
45-
api_version: Literal["2023-01-01"] = kwargs.pop("api_version", "2023-01-01")
39+
api_version: str = kwargs.pop("api_version", "2023-04-01-preview")
4640

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

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

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,17 @@
1616
from ._configuration import DataProtectionMgmtClientConfiguration
1717
from ._serialization import Deserializer, Serializer
1818
from .operations import (
19+
BackupInstancesExtensionRoutingOperations,
1920
BackupInstancesOperations,
2021
BackupPoliciesOperations,
2122
BackupVaultOperationResultsOperations,
2223
BackupVaultsOperations,
24+
CrossRegionRestoreJobOperations,
25+
CrossRegionRestoreJobsOperations,
2326
DataProtectionOperations,
2427
DataProtectionOperationsOperations,
2528
DeletedBackupInstancesOperations,
29+
DppResourceGuardProxyOperations,
2630
ExportJobsOperationResultOperations,
2731
ExportJobsOperations,
2832
JobsOperations,
@@ -33,6 +37,7 @@
3337
RecoveryPointsOperations,
3438
ResourceGuardsOperations,
3539
RestorableTimeRangesOperations,
40+
SecondaryRPsOperations,
3641
)
3742

3843
if TYPE_CHECKING:
@@ -71,6 +76,17 @@ class DataProtectionMgmtClient: # pylint: disable=client-accepts-api-version-ke
7176
:vartype backup_instances: azure.mgmt.dataprotection.operations.BackupInstancesOperations
7277
:ivar recovery_points: RecoveryPointsOperations operations
7378
:vartype recovery_points: azure.mgmt.dataprotection.operations.RecoveryPointsOperations
79+
:ivar secondary_rps: SecondaryRPsOperations operations
80+
:vartype secondary_rps: azure.mgmt.dataprotection.operations.SecondaryRPsOperations
81+
:ivar cross_region_restore_job: CrossRegionRestoreJobOperations operations
82+
:vartype cross_region_restore_job:
83+
azure.mgmt.dataprotection.operations.CrossRegionRestoreJobOperations
84+
:ivar cross_region_restore_jobs: CrossRegionRestoreJobsOperations operations
85+
:vartype cross_region_restore_jobs:
86+
azure.mgmt.dataprotection.operations.CrossRegionRestoreJobsOperations
87+
:ivar backup_instances_extension_routing: BackupInstancesExtensionRoutingOperations operations
88+
:vartype backup_instances_extension_routing:
89+
azure.mgmt.dataprotection.operations.BackupInstancesExtensionRoutingOperations
7490
:ivar jobs: JobsOperations operations
7591
:vartype jobs: azure.mgmt.dataprotection.operations.JobsOperations
7692
:ivar restorable_time_ranges: RestorableTimeRangesOperations operations
@@ -86,14 +102,17 @@ class DataProtectionMgmtClient: # pylint: disable=client-accepts-api-version-ke
86102
azure.mgmt.dataprotection.operations.DeletedBackupInstancesOperations
87103
:ivar resource_guards: ResourceGuardsOperations operations
88104
:vartype resource_guards: azure.mgmt.dataprotection.operations.ResourceGuardsOperations
105+
:ivar dpp_resource_guard_proxy: DppResourceGuardProxyOperations operations
106+
:vartype dpp_resource_guard_proxy:
107+
azure.mgmt.dataprotection.operations.DppResourceGuardProxyOperations
89108
:param credential: Credential needed for the client to connect to Azure. Required.
90109
:type credential: ~azure.core.credentials.TokenCredential
91110
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
92111
:type subscription_id: str
93112
:param base_url: Service URL. Default value is "https://management.azure.com".
94113
:type base_url: str
95-
:keyword api_version: Api Version. Default value is "2023-01-01". Note that overriding this
96-
default value may result in unsupported behavior.
114+
:keyword api_version: Api Version. Default value is "2023-04-01-preview". Note that overriding
115+
this default value may result in unsupported behavior.
97116
:paramtype api_version: str
98117
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
99118
Retry-After header is present.
@@ -109,7 +128,7 @@ def __init__(
109128
self._config = DataProtectionMgmtClientConfiguration(
110129
credential=credential, subscription_id=subscription_id, **kwargs
111130
)
112-
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
131+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
113132

114133
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
115134
self._serialize = Serializer(client_models)
@@ -140,6 +159,16 @@ def __init__(
140159
self._client, self._config, self._serialize, self._deserialize
141160
)
142161
self.recovery_points = RecoveryPointsOperations(self._client, self._config, self._serialize, self._deserialize)
162+
self.secondary_rps = SecondaryRPsOperations(self._client, self._config, self._serialize, self._deserialize)
163+
self.cross_region_restore_job = CrossRegionRestoreJobOperations(
164+
self._client, self._config, self._serialize, self._deserialize
165+
)
166+
self.cross_region_restore_jobs = CrossRegionRestoreJobsOperations(
167+
self._client, self._config, self._serialize, self._deserialize
168+
)
169+
self.backup_instances_extension_routing = BackupInstancesExtensionRoutingOperations(
170+
self._client, self._config, self._serialize, self._deserialize
171+
)
143172
self.jobs = JobsOperations(self._client, self._config, self._serialize, self._deserialize)
144173
self.restorable_time_ranges = RestorableTimeRangesOperations(
145174
self._client, self._config, self._serialize, self._deserialize
@@ -152,6 +181,9 @@ def __init__(
152181
self._client, self._config, self._serialize, self._deserialize
153182
)
154183
self.resource_guards = ResourceGuardsOperations(self._client, self._config, self._serialize, self._deserialize)
184+
self.dpp_resource_guard_proxy = DppResourceGuardProxyOperations(
185+
self._client, self._config, self._serialize, self._deserialize
186+
)
155187

156188
def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
157189
"""Runs the network request through the client's chained policies.

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ def _serialize(self, target_obj, data_type=None, **kwargs):
629629
if xml_desc.get("attr", False):
630630
if xml_ns:
631631
ET.register_namespace(xml_prefix, xml_ns)
632-
xml_name = "{}{}".format(xml_ns, xml_name)
632+
xml_name = "{{{}}}{}".format(xml_ns, xml_name)
633633
serialized.set(xml_name, new_attr) # type: ignore
634634
continue
635635
if xml_desc.get("text", False):
@@ -1271,7 +1271,7 @@ def _extract_name_from_internal_type(internal_type):
12711271
xml_name = internal_type_xml_map.get("name", internal_type.__name__)
12721272
xml_ns = internal_type_xml_map.get("ns", None)
12731273
if xml_ns:
1274-
xml_name = "{}{}".format(xml_ns, xml_name)
1274+
xml_name = "{{{}}}{}".format(xml_ns, xml_name)
12751275
return xml_name
12761276

12771277

@@ -1295,7 +1295,7 @@ def xml_key_extractor(attr, attr_desc, data):
12951295
# Integrate namespace if necessary
12961296
xml_ns = xml_desc.get("ns", internal_type_xml_map.get("ns", None))
12971297
if xml_ns:
1298-
xml_name = "{}{}".format(xml_ns, xml_name)
1298+
xml_name = "{{{}}}{}".format(xml_ns, xml_name)
12991299

13001300
# If it's an attribute, that's simple
13011301
if xml_desc.get("attr", False):

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

Lines changed: 1 addition & 1 deletion
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.0"
9+
VERSION = "1.0.0b1"

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

Lines changed: 3 additions & 9 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_async import AsyncTokenCredential
@@ -35,14 +29,14 @@ class DataProtectionMgmtClientConfiguration(Configuration): # pylint: disable=t
3529
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
3630
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
3731
:type subscription_id: str
38-
:keyword api_version: Api Version. Default value is "2023-01-01". Note that overriding this
39-
default value may result in unsupported behavior.
32+
:keyword api_version: Api Version. Default value is "2023-04-01-preview". Note that overriding
33+
this default value may result in unsupported behavior.
4034
:paramtype api_version: str
4135
"""
4236

4337
def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
4438
super(DataProtectionMgmtClientConfiguration, self).__init__(**kwargs)
45-
api_version: Literal["2023-01-01"] = kwargs.pop("api_version", "2023-01-01")
39+
api_version: str = kwargs.pop("api_version", "2023-04-01-preview")
4640

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

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

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,17 @@
1616
from .._serialization import Deserializer, Serializer
1717
from ._configuration import DataProtectionMgmtClientConfiguration
1818
from .operations import (
19+
BackupInstancesExtensionRoutingOperations,
1920
BackupInstancesOperations,
2021
BackupPoliciesOperations,
2122
BackupVaultOperationResultsOperations,
2223
BackupVaultsOperations,
24+
CrossRegionRestoreJobOperations,
25+
CrossRegionRestoreJobsOperations,
2326
DataProtectionOperations,
2427
DataProtectionOperationsOperations,
2528
DeletedBackupInstancesOperations,
29+
DppResourceGuardProxyOperations,
2630
ExportJobsOperationResultOperations,
2731
ExportJobsOperations,
2832
JobsOperations,
@@ -33,6 +37,7 @@
3337
RecoveryPointsOperations,
3438
ResourceGuardsOperations,
3539
RestorableTimeRangesOperations,
40+
SecondaryRPsOperations,
3641
)
3742

3843
if TYPE_CHECKING:
@@ -71,6 +76,17 @@ class DataProtectionMgmtClient: # pylint: disable=client-accepts-api-version-ke
7176
:vartype backup_instances: azure.mgmt.dataprotection.aio.operations.BackupInstancesOperations
7277
:ivar recovery_points: RecoveryPointsOperations operations
7378
:vartype recovery_points: azure.mgmt.dataprotection.aio.operations.RecoveryPointsOperations
79+
:ivar secondary_rps: SecondaryRPsOperations operations
80+
:vartype secondary_rps: azure.mgmt.dataprotection.aio.operations.SecondaryRPsOperations
81+
:ivar cross_region_restore_job: CrossRegionRestoreJobOperations operations
82+
:vartype cross_region_restore_job:
83+
azure.mgmt.dataprotection.aio.operations.CrossRegionRestoreJobOperations
84+
:ivar cross_region_restore_jobs: CrossRegionRestoreJobsOperations operations
85+
:vartype cross_region_restore_jobs:
86+
azure.mgmt.dataprotection.aio.operations.CrossRegionRestoreJobsOperations
87+
:ivar backup_instances_extension_routing: BackupInstancesExtensionRoutingOperations operations
88+
:vartype backup_instances_extension_routing:
89+
azure.mgmt.dataprotection.aio.operations.BackupInstancesExtensionRoutingOperations
7490
:ivar jobs: JobsOperations operations
7591
:vartype jobs: azure.mgmt.dataprotection.aio.operations.JobsOperations
7692
:ivar restorable_time_ranges: RestorableTimeRangesOperations operations
@@ -86,14 +102,17 @@ class DataProtectionMgmtClient: # pylint: disable=client-accepts-api-version-ke
86102
azure.mgmt.dataprotection.aio.operations.DeletedBackupInstancesOperations
87103
:ivar resource_guards: ResourceGuardsOperations operations
88104
:vartype resource_guards: azure.mgmt.dataprotection.aio.operations.ResourceGuardsOperations
105+
:ivar dpp_resource_guard_proxy: DppResourceGuardProxyOperations operations
106+
:vartype dpp_resource_guard_proxy:
107+
azure.mgmt.dataprotection.aio.operations.DppResourceGuardProxyOperations
89108
:param credential: Credential needed for the client to connect to Azure. Required.
90109
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
91110
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
92111
:type subscription_id: str
93112
:param base_url: Service URL. Default value is "https://management.azure.com".
94113
:type base_url: str
95-
:keyword api_version: Api Version. Default value is "2023-01-01". Note that overriding this
96-
default value may result in unsupported behavior.
114+
:keyword api_version: Api Version. Default value is "2023-04-01-preview". Note that overriding
115+
this default value may result in unsupported behavior.
97116
:paramtype api_version: str
98117
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
99118
Retry-After header is present.
@@ -109,7 +128,7 @@ def __init__(
109128
self._config = DataProtectionMgmtClientConfiguration(
110129
credential=credential, subscription_id=subscription_id, **kwargs
111130
)
112-
self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
131+
self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
113132

114133
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
115134
self._serialize = Serializer(client_models)
@@ -140,6 +159,16 @@ def __init__(
140159
self._client, self._config, self._serialize, self._deserialize
141160
)
142161
self.recovery_points = RecoveryPointsOperations(self._client, self._config, self._serialize, self._deserialize)
162+
self.secondary_rps = SecondaryRPsOperations(self._client, self._config, self._serialize, self._deserialize)
163+
self.cross_region_restore_job = CrossRegionRestoreJobOperations(
164+
self._client, self._config, self._serialize, self._deserialize
165+
)
166+
self.cross_region_restore_jobs = CrossRegionRestoreJobsOperations(
167+
self._client, self._config, self._serialize, self._deserialize
168+
)
169+
self.backup_instances_extension_routing = BackupInstancesExtensionRoutingOperations(
170+
self._client, self._config, self._serialize, self._deserialize
171+
)
143172
self.jobs = JobsOperations(self._client, self._config, self._serialize, self._deserialize)
144173
self.restorable_time_ranges = RestorableTimeRangesOperations(
145174
self._client, self._config, self._serialize, self._deserialize
@@ -152,6 +181,9 @@ def __init__(
152181
self._client, self._config, self._serialize, self._deserialize
153182
)
154183
self.resource_guards = ResourceGuardsOperations(self._client, self._config, self._serialize, self._deserialize)
184+
self.dpp_resource_guard_proxy = DppResourceGuardProxyOperations(
185+
self._client, self._config, self._serialize, self._deserialize
186+
)
155187

156188
def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]:
157189
"""Runs the network request through the client's chained policies.

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,17 @@
1717
from ._backup_policies_operations import BackupPoliciesOperations
1818
from ._backup_instances_operations import BackupInstancesOperations
1919
from ._recovery_points_operations import RecoveryPointsOperations
20+
from ._secondary_rps_operations import SecondaryRPsOperations
21+
from ._cross_region_restore_job_operations import CrossRegionRestoreJobOperations
22+
from ._cross_region_restore_jobs_operations import CrossRegionRestoreJobsOperations
23+
from ._backup_instances_extension_routing_operations import BackupInstancesExtensionRoutingOperations
2024
from ._jobs_operations import JobsOperations
2125
from ._restorable_time_ranges_operations import RestorableTimeRangesOperations
2226
from ._export_jobs_operations import ExportJobsOperations
2327
from ._export_jobs_operation_result_operations import ExportJobsOperationResultOperations
2428
from ._deleted_backup_instances_operations import DeletedBackupInstancesOperations
2529
from ._resource_guards_operations import ResourceGuardsOperations
30+
from ._dpp_resource_guard_proxy_operations import DppResourceGuardProxyOperations
2631

2732
from ._patch import __all__ as _patch_all
2833
from ._patch import * # pylint: disable=unused-wildcard-import
@@ -40,12 +45,17 @@
4045
"BackupPoliciesOperations",
4146
"BackupInstancesOperations",
4247
"RecoveryPointsOperations",
48+
"SecondaryRPsOperations",
49+
"CrossRegionRestoreJobOperations",
50+
"CrossRegionRestoreJobsOperations",
51+
"BackupInstancesExtensionRoutingOperations",
4352
"JobsOperations",
4453
"RestorableTimeRangesOperations",
4554
"ExportJobsOperations",
4655
"ExportJobsOperationResultOperations",
4756
"DeletedBackupInstancesOperations",
4857
"ResourceGuardsOperations",
58+
"DppResourceGuardProxyOperations",
4959
]
5060
__all__.extend([p for p in _patch_all if p not in __all__])
5161
_patch_sdk()

0 commit comments

Comments
 (0)