Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"autorest": "3.4.5",
"autorest": "3.7.2",
"use": [
"@autorest/python@5.8.4",
"@autorest/modelerfour@4.19.2"
"@autorest/python@5.16.0",
"@autorest/modelerfour@4.19.3"
],
"commit": "4cec1770664631fced06a1d83d79ebc3d2ca74db",
"commit": "8f97ded3562d55b165f96f8a5d5a614a49f9ef44",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"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/modelerfour@4.19.2 --version=3.4.5",
"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/modelerfour@4.19.3 --version=3.7.2",
"readme": "specification/recoveryservicessiterecovery/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@
from ._version import VERSION

__version__ = VERSION
__all__ = ['SiteRecoveryManagementClient']

try:
from ._patch import patch_sdk # type: ignore
patch_sdk()
from ._patch import __all__ as _patch_all
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
except ImportError:
pass
_patch_all = []
from ._patch import patch_sdk as _patch_sdk
__all__ = ['SiteRecoveryManagementClient']
__all__.extend([p for p in _patch_all if p not in __all__])

_patch_sdk()
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,20 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from typing import TYPE_CHECKING
from typing import Any, TYPE_CHECKING

from azure.core.configuration import Configuration
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy

from ._version import VERSION

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from typing import Any

from azure.core.credentials import TokenCredential


class SiteRecoveryManagementClientConfiguration(Configuration):
class SiteRecoveryManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
"""Configuration for SiteRecoveryManagementClient.

Note that all parameters used to create this instance are saved as instance
Expand All @@ -31,21 +29,27 @@ class SiteRecoveryManagementClientConfiguration(Configuration):
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The subscription Id.
:type subscription_id: str
:param resource_group_name: The name of the resource group where the recovery services vault is present.
:param resource_group_name: The name of the resource group where the recovery services vault is
present.
:type resource_group_name: str
:param resource_name: The name of the recovery services vault.
:type resource_name: str
:keyword api_version: Api Version. Default value is "2022-05-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(
self,
credential, # type: "TokenCredential"
subscription_id, # type: str
resource_group_name, # type: str
resource_name, # type: str
**kwargs # type: Any
):
# type: (...) -> None
credential: "TokenCredential",
subscription_id: str,
resource_group_name: str,
resource_name: str,
**kwargs: Any
) -> None:
super(SiteRecoveryManagementClientConfiguration, self).__init__(**kwargs)
api_version = kwargs.pop('api_version', "2022-05-01") # type: str

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
Expand All @@ -54,13 +58,12 @@ def __init__(
raise ValueError("Parameter 'resource_group_name' must not be None.")
if resource_name is None:
raise ValueError("Parameter 'resource_name' must not be None.")
super(SiteRecoveryManagementClientConfiguration, self).__init__(**kwargs)

self.credential = credential
self.subscription_id = subscription_id
self.resource_group_name = resource_group_name
self.resource_name = resource_name
self.api_version = "2021-06-01"
self.api_version = api_version
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-recoveryservicessiterecovery/{}'.format(VERSION))
self._configure(**kwargs)
Expand All @@ -80,4 +83,4 @@ def _configure(
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
self.authentication_policy = kwargs.get('authentication_policy')
if self.credential and not self.authentication_policy:
self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
"""Customize generated code here.

Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
"""
from typing import List

__all__: List[str] = [] # Add all objects you want publicly available to users at this package level

def patch_sdk():
"""Do not remove from this file.

`patch_sdk` is a last resort escape hatch that allows you to do customizations
you can't accomplish using the techniques described in
https://aka.ms/azsdk/python/dpcodegen/python/customize
"""
Loading