Skip to content

Commit aa704b3

Browse files
author
SDKAuto
committed
CodeGen from PR 20567 in Azure/azure-rest-api-specs
Merge 178749dd5b4b12ddd6085b816e563755dd82296d into fa581bd5f31cbc6f6882b254ce5b0f5c20d84648
1 parent 8fc4138 commit aa704b3

File tree

148 files changed

+24455
-14743
lines changed

Some content is hidden

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

148 files changed

+24455
-14743
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"autorest": "3.7.2",
2+
"autorest": "3.8.4",
33
"use": [
4-
"@autorest/python@5.16.0",
5-
"@autorest/modelerfour@4.19.3"
4+
"@autorest/python@6.1.6",
5+
"@autorest/modelerfour@4.23.5"
66
],
7-
"commit": "8c6f54ef868240d16aebb269abf56b9a1adf7ecc",
7+
"commit": "fdd17a82f9275040abe6fe4d6884cdc2c808e54e",
88
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9-
"autorest_command": "autorest specification/recoveryservicesbackup/resource-manager/readme.md --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --use=@autorest/python@5.16.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2",
9+
"autorest_command": "autorest specification/recoveryservicesbackup/resource-manager/readme.md --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.1.6 --use=@autorest/modelerfour@4.23.5 --version=3.8.4 --version-tolerant=False",
1010
"readme": "specification/recoveryservicesbackup/resource-manager/readme.md"
1111
}

sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
except ImportError:
1818
_patch_all = []
1919
from ._patch import patch_sdk as _patch_sdk
20-
__all__ = ['RecoveryServicesBackupClient']
20+
21+
__all__ = ["RecoveryServicesBackupClient"]
2122
__all__.extend([p for p in _patch_all if p not in __all__])
2223

2324
_patch_sdk()

sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/_configuration.py

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,18 @@ class RecoveryServicesBackupClientConfiguration(Configuration): # pylint: disab
2525
Note that all parameters used to create this instance are saved as instance
2626
attributes.
2727
28-
:param credential: Credential needed for the client to connect to Azure.
28+
:param credential: Credential needed for the client to connect to Azure. Required.
2929
:type credential: ~azure.core.credentials.TokenCredential
30-
:param subscription_id: The subscription Id.
30+
:param subscription_id: The subscription Id. Required.
3131
:type subscription_id: str
3232
:keyword api_version: Api Version. Default value is "2022-06-01-preview". Note that overriding
3333
this default value may result in unsupported behavior.
3434
:paramtype api_version: str
3535
"""
3636

37-
def __init__(
38-
self,
39-
credential: "TokenCredential",
40-
subscription_id: str,
41-
**kwargs: Any
42-
) -> None:
37+
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
4338
super(RecoveryServicesBackupClientConfiguration, self).__init__(**kwargs)
44-
api_version = kwargs.pop('api_version', "2022-06-01-preview") # type: str
39+
api_version = kwargs.pop("api_version", "2022-06-01-preview") # type: str
4540

4641
if credential is None:
4742
raise ValueError("Parameter 'credential' must not be None.")
@@ -51,23 +46,24 @@ def __init__(
5146
self.credential = credential
5247
self.subscription_id = subscription_id
5348
self.api_version = api_version
54-
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
55-
kwargs.setdefault('sdk_moniker', 'mgmt-recoveryservicesbackup/{}'.format(VERSION))
49+
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
50+
kwargs.setdefault("sdk_moniker", "mgmt-recoveryservicesbackup/{}".format(VERSION))
5651
self._configure(**kwargs)
5752

5853
def _configure(
59-
self,
60-
**kwargs # type: Any
54+
self, **kwargs # type: Any
6155
):
6256
# type: (...) -> None
63-
self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs)
64-
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
65-
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
66-
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
67-
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
68-
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs)
69-
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
70-
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
71-
self.authentication_policy = kwargs.get('authentication_policy')
57+
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
58+
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
59+
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
60+
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
61+
self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs)
62+
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
63+
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
64+
self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
65+
self.authentication_policy = kwargs.get("authentication_policy")
7266
if self.credential and not self.authentication_policy:
73-
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
67+
self.authentication_policy = ARMChallengeAuthenticationPolicy(
68+
self.credential, *self.credential_scopes, **kwargs
69+
)

sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/_recovery_services_backup_client.py

Lines changed: 77 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,72 @@
99
from copy import deepcopy
1010
from typing import Any, TYPE_CHECKING
1111

12-
from msrest import Deserializer, Serializer
13-
1412
from azure.core.rest import HttpRequest, HttpResponse
1513
from azure.mgmt.core import ARMPipelineClient
1614

1715
from . import models
1816
from ._configuration import RecoveryServicesBackupClientConfiguration
19-
from .operations import BMSPrepareDataMoveOperationResultOperations, BackupEnginesOperations, BackupJobsOperations, BackupOperationResultsOperations, BackupOperationStatusesOperations, BackupPoliciesOperations, BackupProtectableItemsOperations, BackupProtectedItemsOperations, BackupProtectionContainersOperations, BackupProtectionIntentOperations, BackupResourceEncryptionConfigsOperations, BackupResourceStorageConfigsNonCRROperations, BackupResourceVaultConfigsOperations, BackupStatusOperations, BackupUsageSummariesOperations, BackupWorkloadItemsOperations, BackupsOperations, ExportJobsOperationResultsOperations, FeatureSupportOperations, ItemLevelRecoveryConnectionsOperations, JobCancellationsOperations, JobDetailsOperations, JobOperationResultsOperations, JobsOperations, OperationOperations, Operations, PrivateEndpointConnectionOperations, PrivateEndpointOperations, ProtectableContainersOperations, ProtectedItemOperationResultsOperations, ProtectedItemOperationStatusesOperations, ProtectedItemsOperations, ProtectionContainerOperationResultsOperations, ProtectionContainerRefreshOperationResultsOperations, ProtectionContainersOperations, ProtectionIntentOperations, ProtectionPoliciesOperations, ProtectionPolicyOperationResultsOperations, ProtectionPolicyOperationStatusesOperations, RecoveryPointsOperations, RecoveryPointsRecommendedForMoveOperations, RecoveryServicesBackupClientOperationsMixin, ResourceGuardProxiesOperations, ResourceGuardProxyOperations, RestoresOperations, SecurityPINsOperations, ValidateOperationOperations, ValidateOperationResultsOperations, ValidateOperationStatusesOperations
17+
from ._serialization import Deserializer, Serializer
18+
from .operations import (
19+
BMSPrepareDataMoveOperationResultOperations,
20+
BackupEnginesOperations,
21+
BackupJobsOperations,
22+
BackupOperationResultsOperations,
23+
BackupOperationStatusesOperations,
24+
BackupPoliciesOperations,
25+
BackupProtectableItemsOperations,
26+
BackupProtectedItemsOperations,
27+
BackupProtectionContainersOperations,
28+
BackupProtectionIntentOperations,
29+
BackupResourceEncryptionConfigsOperations,
30+
BackupResourceStorageConfigsNonCRROperations,
31+
BackupResourceVaultConfigsOperations,
32+
BackupStatusOperations,
33+
BackupUsageSummariesOperations,
34+
BackupWorkloadItemsOperations,
35+
BackupsOperations,
36+
ExportJobsOperationResultsOperations,
37+
FeatureSupportOperations,
38+
ItemLevelRecoveryConnectionsOperations,
39+
JobCancellationsOperations,
40+
JobDetailsOperations,
41+
JobOperationResultsOperations,
42+
JobsOperations,
43+
OperationOperations,
44+
Operations,
45+
PrivateEndpointConnectionOperations,
46+
PrivateEndpointOperations,
47+
ProtectableContainersOperations,
48+
ProtectedItemOperationResultsOperations,
49+
ProtectedItemOperationStatusesOperations,
50+
ProtectedItemsOperations,
51+
ProtectionContainerOperationResultsOperations,
52+
ProtectionContainerRefreshOperationResultsOperations,
53+
ProtectionContainersOperations,
54+
ProtectionIntentOperations,
55+
ProtectionPoliciesOperations,
56+
ProtectionPolicyOperationResultsOperations,
57+
ProtectionPolicyOperationStatusesOperations,
58+
RecoveryPointsOperations,
59+
RecoveryPointsRecommendedForMoveOperations,
60+
RecoveryServicesBackupClientOperationsMixin,
61+
ResourceGuardProxiesOperations,
62+
ResourceGuardProxyOperations,
63+
RestoresOperations,
64+
SecurityPINsOperations,
65+
ValidateOperationOperations,
66+
ValidateOperationResultsOperations,
67+
ValidateOperationStatusesOperations,
68+
)
2069

2170
if TYPE_CHECKING:
2271
# pylint: disable=unused-import,ungrouped-imports
2372
from azure.core.credentials import TokenCredential
2473

25-
class RecoveryServicesBackupClient(RecoveryServicesBackupClientOperationsMixin): # pylint: disable=too-many-instance-attributes
74+
75+
class RecoveryServicesBackupClient(
76+
RecoveryServicesBackupClientOperationsMixin
77+
): # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
2678
"""Open API 2.0 Specs for Azure RecoveryServices Backup service.
2779
2880
:ivar backup_resource_storage_configs_non_crr: BackupResourceStorageConfigsNonCRROperations
@@ -172,9 +224,9 @@ class RecoveryServicesBackupClient(RecoveryServicesBackupClientOperationsMixin):
172224
:ivar resource_guard_proxy: ResourceGuardProxyOperations operations
173225
:vartype resource_guard_proxy:
174226
azure.mgmt.recoveryservicesbackup.activestamp.operations.ResourceGuardProxyOperations
175-
:param credential: Credential needed for the client to connect to Azure.
227+
:param credential: Credential needed for the client to connect to Azure. Required.
176228
:type credential: ~azure.core.credentials.TokenCredential
177-
:param subscription_id: The subscription Id.
229+
:param subscription_id: The subscription Id. Required.
178230
:type subscription_id: str
179231
:param base_url: Service URL. Default value is "https://management.azure.com".
180232
:type base_url: str
@@ -192,7 +244,9 @@ def __init__(
192244
base_url: str = "https://management.azure.com",
193245
**kwargs: Any
194246
) -> None:
195-
self._config = RecoveryServicesBackupClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs)
247+
self._config = RecoveryServicesBackupClientConfiguration(
248+
credential=credential, subscription_id=subscription_id, **kwargs
249+
)
196250
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
197251

198252
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
@@ -205,21 +259,15 @@ def __init__(
205259
self.protection_intent = ProtectionIntentOperations(
206260
self._client, self._config, self._serialize, self._deserialize
207261
)
208-
self.backup_status = BackupStatusOperations(
209-
self._client, self._config, self._serialize, self._deserialize
210-
)
211-
self.feature_support = FeatureSupportOperations(
212-
self._client, self._config, self._serialize, self._deserialize
213-
)
262+
self.backup_status = BackupStatusOperations(self._client, self._config, self._serialize, self._deserialize)
263+
self.feature_support = FeatureSupportOperations(self._client, self._config, self._serialize, self._deserialize)
214264
self.backup_protection_intent = BackupProtectionIntentOperations(
215265
self._client, self._config, self._serialize, self._deserialize
216266
)
217267
self.backup_usage_summaries = BackupUsageSummariesOperations(
218268
self._client, self._config, self._serialize, self._deserialize
219269
)
220-
self.operations = Operations(
221-
self._client, self._config, self._serialize, self._deserialize
222-
)
270+
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
223271
self.backup_resource_vault_configs = BackupResourceVaultConfigsOperations(
224272
self._client, self._config, self._serialize, self._deserialize
225273
)
@@ -235,33 +283,21 @@ def __init__(
235283
self.bms_prepare_data_move_operation_result = BMSPrepareDataMoveOperationResultOperations(
236284
self._client, self._config, self._serialize, self._deserialize
237285
)
238-
self.protected_items = ProtectedItemsOperations(
239-
self._client, self._config, self._serialize, self._deserialize
240-
)
286+
self.protected_items = ProtectedItemsOperations(self._client, self._config, self._serialize, self._deserialize)
241287
self.protected_item_operation_results = ProtectedItemOperationResultsOperations(
242288
self._client, self._config, self._serialize, self._deserialize
243289
)
244-
self.recovery_points = RecoveryPointsOperations(
245-
self._client, self._config, self._serialize, self._deserialize
246-
)
247-
self.restores = RestoresOperations(
248-
self._client, self._config, self._serialize, self._deserialize
249-
)
250-
self.backup_policies = BackupPoliciesOperations(
251-
self._client, self._config, self._serialize, self._deserialize
252-
)
290+
self.recovery_points = RecoveryPointsOperations(self._client, self._config, self._serialize, self._deserialize)
291+
self.restores = RestoresOperations(self._client, self._config, self._serialize, self._deserialize)
292+
self.backup_policies = BackupPoliciesOperations(self._client, self._config, self._serialize, self._deserialize)
253293
self.protection_policies = ProtectionPoliciesOperations(
254294
self._client, self._config, self._serialize, self._deserialize
255295
)
256296
self.protection_policy_operation_results = ProtectionPolicyOperationResultsOperations(
257297
self._client, self._config, self._serialize, self._deserialize
258298
)
259-
self.backup_jobs = BackupJobsOperations(
260-
self._client, self._config, self._serialize, self._deserialize
261-
)
262-
self.job_details = JobDetailsOperations(
263-
self._client, self._config, self._serialize, self._deserialize
264-
)
299+
self.backup_jobs = BackupJobsOperations(self._client, self._config, self._serialize, self._deserialize)
300+
self.job_details = JobDetailsOperations(self._client, self._config, self._serialize, self._deserialize)
265301
self.job_cancellations = JobCancellationsOperations(
266302
self._client, self._config, self._serialize, self._deserialize
267303
)
@@ -271,15 +307,11 @@ def __init__(
271307
self.export_jobs_operation_results = ExportJobsOperationResultsOperations(
272308
self._client, self._config, self._serialize, self._deserialize
273309
)
274-
self.jobs = JobsOperations(
275-
self._client, self._config, self._serialize, self._deserialize
276-
)
310+
self.jobs = JobsOperations(self._client, self._config, self._serialize, self._deserialize)
277311
self.backup_protected_items = BackupProtectedItemsOperations(
278312
self._client, self._config, self._serialize, self._deserialize
279313
)
280-
self.operation = OperationOperations(
281-
self._client, self._config, self._serialize, self._deserialize
282-
)
314+
self.operation = OperationOperations(self._client, self._config, self._serialize, self._deserialize)
283315
self.validate_operation = ValidateOperationOperations(
284316
self._client, self._config, self._serialize, self._deserialize
285317
)
@@ -289,9 +321,7 @@ def __init__(
289321
self.validate_operation_statuses = ValidateOperationStatusesOperations(
290322
self._client, self._config, self._serialize, self._deserialize
291323
)
292-
self.backup_engines = BackupEnginesOperations(
293-
self._client, self._config, self._serialize, self._deserialize
294-
)
324+
self.backup_engines = BackupEnginesOperations(self._client, self._config, self._serialize, self._deserialize)
295325
self.protection_container_refresh_operation_results = ProtectionContainerRefreshOperationResultsOperations(
296326
self._client, self._config, self._serialize, self._deserialize
297327
)
@@ -307,9 +337,7 @@ def __init__(
307337
self.protection_container_operation_results = ProtectionContainerOperationResultsOperations(
308338
self._client, self._config, self._serialize, self._deserialize
309339
)
310-
self.backups = BackupsOperations(
311-
self._client, self._config, self._serialize, self._deserialize
312-
)
340+
self.backups = BackupsOperations(self._client, self._config, self._serialize, self._deserialize)
313341
self.protected_item_operation_statuses = ProtectedItemOperationStatusesOperations(
314342
self._client, self._config, self._serialize, self._deserialize
315343
)
@@ -331,9 +359,7 @@ def __init__(
331359
self.backup_protection_containers = BackupProtectionContainersOperations(
332360
self._client, self._config, self._serialize, self._deserialize
333361
)
334-
self.security_pins = SecurityPINsOperations(
335-
self._client, self._config, self._serialize, self._deserialize
336-
)
362+
self.security_pins = SecurityPINsOperations(self._client, self._config, self._serialize, self._deserialize)
337363
self.recovery_points_recommended_for_move = RecoveryPointsRecommendedForMoveOperations(
338364
self._client, self._config, self._serialize, self._deserialize
339365
)
@@ -344,12 +370,7 @@ def __init__(
344370
self._client, self._config, self._serialize, self._deserialize
345371
)
346372

347-
348-
def _send_request(
349-
self,
350-
request: HttpRequest,
351-
**kwargs: Any
352-
) -> HttpResponse:
373+
def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
353374
"""Runs the network request through the client's chained policies.
354375
355376
>>> from azure.core.rest import HttpRequest
@@ -358,7 +379,7 @@ def _send_request(
358379
>>> response = client._send_request(request)
359380
<HttpResponse: 200 OK>
360381
361-
For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart
382+
For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request
362383
363384
:param request: The network request you want to make. Required.
364385
:type request: ~azure.core.rest.HttpRequest

0 commit comments

Comments
 (0)