Skip to content

Commit f3fa6c4

Browse files
author
SDKAuto
committed
CodeGen from PR 19659 in Azure/azure-rest-api-specs
Merge 1a85d6809840149edad4f25ded5935961291f91c into 996166d183e3420b8e7e08fcbb700f34749c3daa
1 parent 07a647a commit f3fa6c4

File tree

76 files changed

+36422
-40738
lines changed

Some content is hidden

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

76 files changed

+36422
-40738
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"autorest": "3.4.5",
2+
"autorest": "3.7.2",
33
"use": [
4-
"@autorest/python@5.8.4",
5-
"@autorest/[email protected].2"
4+
"@autorest/python@5.16.0",
5+
"@autorest/[email protected].3"
66
],
7-
"commit": "4cec1770664631fced06a1d83d79ebc3d2ca74db",
7+
"commit": "8f97ded3562d55b165f96f8a5d5a614a49f9ef44",
88
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9-
"autorest_command": "autorest specification/recoveryservicessiterecovery/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/[email protected].2 --version=3.4.5",
9+
"autorest_command": "autorest specification/recoveryservicessiterecovery/resource-manager/readme.md --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --python3-only --use=@autorest/python@5.16.0 --use=@autorest/[email protected].3 --version=3.7.2",
1010
"readme": "specification/recoveryservicessiterecovery/resource-manager/readme.md"
1111
}

sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/__init__.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,14 @@
1010
from ._version import VERSION
1111

1212
__version__ = VERSION
13-
__all__ = ['SiteRecoveryManagementClient']
1413

1514
try:
16-
from ._patch import patch_sdk # type: ignore
17-
patch_sdk()
15+
from ._patch import __all__ as _patch_all
16+
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
1817
except ImportError:
19-
pass
18+
_patch_all = []
19+
from ._patch import patch_sdk as _patch_sdk
20+
__all__ = ['SiteRecoveryManagementClient']
21+
__all__.extend([p for p in _patch_all if p not in __all__])
22+
23+
_patch_sdk()

sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/_configuration.py

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

9-
from typing import TYPE_CHECKING
9+
from typing import Any, TYPE_CHECKING
1010

1111
from azure.core.configuration import Configuration
1212
from azure.core.pipeline import policies
13-
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
13+
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
1414

1515
from ._version import VERSION
1616

1717
if TYPE_CHECKING:
1818
# pylint: disable=unused-import,ungrouped-imports
19-
from typing import Any
20-
2119
from azure.core.credentials import TokenCredential
2220

2321

24-
class SiteRecoveryManagementClientConfiguration(Configuration):
22+
class SiteRecoveryManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
2523
"""Configuration for SiteRecoveryManagementClient.
2624
2725
Note that all parameters used to create this instance are saved as instance
@@ -31,21 +29,27 @@ class SiteRecoveryManagementClientConfiguration(Configuration):
3129
:type credential: ~azure.core.credentials.TokenCredential
3230
:param subscription_id: The subscription Id.
3331
:type subscription_id: str
34-
:param resource_group_name: The name of the resource group where the recovery services vault is present.
32+
:param resource_group_name: The name of the resource group where the recovery services vault is
33+
present.
3534
:type resource_group_name: str
3635
:param resource_name: The name of the recovery services vault.
3736
:type resource_name: str
37+
:keyword api_version: Api Version. Default value is "2022-05-01". Note that overriding this
38+
default value may result in unsupported behavior.
39+
:paramtype api_version: str
3840
"""
3941

4042
def __init__(
4143
self,
42-
credential, # type: "TokenCredential"
43-
subscription_id, # type: str
44-
resource_group_name, # type: str
45-
resource_name, # type: str
46-
**kwargs # type: Any
47-
):
48-
# type: (...) -> None
44+
credential: "TokenCredential",
45+
subscription_id: str,
46+
resource_group_name: str,
47+
resource_name: str,
48+
**kwargs: Any
49+
) -> None:
50+
super(SiteRecoveryManagementClientConfiguration, self).__init__(**kwargs)
51+
api_version = kwargs.pop('api_version', "2022-05-01") # type: str
52+
4953
if credential is None:
5054
raise ValueError("Parameter 'credential' must not be None.")
5155
if subscription_id is None:
@@ -54,13 +58,12 @@ def __init__(
5458
raise ValueError("Parameter 'resource_group_name' must not be None.")
5559
if resource_name is None:
5660
raise ValueError("Parameter 'resource_name' must not be None.")
57-
super(SiteRecoveryManagementClientConfiguration, self).__init__(**kwargs)
5861

5962
self.credential = credential
6063
self.subscription_id = subscription_id
6164
self.resource_group_name = resource_group_name
6265
self.resource_name = resource_name
63-
self.api_version = "2021-06-01"
66+
self.api_version = api_version
6467
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
6568
kwargs.setdefault('sdk_moniker', 'mgmt-recoveryservicessiterecovery/{}'.format(VERSION))
6669
self._configure(**kwargs)
@@ -80,4 +83,4 @@ def _configure(
8083
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
8184
self.authentication_policy = kwargs.get('authentication_policy')
8285
if self.credential and not self.authentication_policy:
83-
self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
86+
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)

sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/_metadata.json

Lines changed: 0 additions & 153 deletions
This file was deleted.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# ------------------------------------
2+
# Copyright (c) Microsoft Corporation.
3+
# Licensed under the MIT License.
4+
# ------------------------------------
5+
"""Customize generated code here.
6+
7+
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
8+
"""
9+
from typing import List
10+
11+
__all__: List[str] = [] # Add all objects you want publicly available to users at this package level
12+
13+
def patch_sdk():
14+
"""Do not remove from this file.
15+
16+
`patch_sdk` is a last resort escape hatch that allows you to do customizations
17+
you can't accomplish using the techniques described in
18+
https://aka.ms/azsdk/python/dpcodegen/python/customize
19+
"""

0 commit comments

Comments
 (0)