Skip to content

Commit 841a0bb

Browse files
author
SDKAuto
committed
CodeGen from PR 33035 in Azure/azure-rest-api-specs
Merge 1930022e9e8cc3e783fd486fefdd21a940096079 into e05316922122e792161f4e8c70f66ff8e791419c
1 parent a2ceed3 commit 841a0bb

File tree

155 files changed

+28832
-23628
lines changed

Some content is hidden

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

155 files changed

+28832
-23628
lines changed

sdk/recoveryservicesdatareplication/azure-mgmt-recoveryservicesdatareplication/README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Microsoft Azure SDK for Python
22

33
This is the Microsoft Azure Recoveryservicesdatareplication Management Client Library.
4-
This package has been tested with Python 3.7+.
4+
This package has been tested with Python 3.8+.
55
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).
66

77
## _Disclaimer_
@@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For
1212

1313
### Prerequisites
1414

15-
- Python 3.7+ is required to use this package.
15+
- Python 3.8+ is required to use this package.
1616
- [Azure subscription](https://azure.microsoft.com/free/)
1717

1818
### Install the package
@@ -59,6 +59,3 @@ Code samples for this package can be found at:
5959
If you encounter any bugs or have suggestions, please file an issue in the
6060
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
6161
section of the project.
62-
63-
64-
Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
{
2-
"commit": "82e7e30a6d46c095e0c3211f3ff7bafe82a362f1",
2+
"commit": "b3dd6ce1a64765c937d0cb9284c9446d33a103a9",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4-
"autorest": "3.9.7",
5-
"use": [
6-
"@autorest/[email protected]",
7-
"@autorest/[email protected]"
8-
],
9-
"autorest_command": "autorest specification/recoveryservicesdatareplication/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/[email protected] --use=@autorest/[email protected] --version=3.9.7 --version-tolerant=False",
10-
"readme": "specification/recoveryservicesdatareplication/resource-manager/readme.md"
4+
"typespec_src": "specification/recoveryservicesdatareplication/DataReplication.Management",
5+
"@azure-tools/typespec-python": "0.39.1"
116
}

sdk/recoveryservicesdatareplication/azure-mgmt-recoveryservicesdatareplication/apiview-properties.json

Lines changed: 188 additions & 0 deletions
Large diffs are not rendered by default.

sdk/recoveryservicesdatareplication/azure-mgmt-recoveryservicesdatareplication/azure/mgmt/recoveryservicesdatareplication/__init__.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,31 @@
22
# --------------------------------------------------------------------------
33
# Copyright (c) Microsoft Corporation. All rights reserved.
44
# Licensed under the MIT License. See License.txt in the project root for license information.
5-
# Code generated by Microsoft (R) AutoRest Code Generator.
5+
# Code generated by Microsoft (R) Python Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
8+
# pylint: disable=wrong-import-position
89

9-
from ._recovery_services_data_replication_mgmt_client import RecoveryServicesDataReplicationMgmtClient
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._client import DataReplicationClient # type: ignore
1016
from ._version import VERSION
1117

1218
__version__ = VERSION
1319

1420
try:
1521
from ._patch import __all__ as _patch_all
16-
from ._patch import * # pylint: disable=unused-wildcard-import
22+
from ._patch import *
1723
except ImportError:
1824
_patch_all = []
1925
from ._patch import patch_sdk as _patch_sdk
2026

2127
__all__ = [
22-
"RecoveryServicesDataReplicationMgmtClient",
28+
"DataReplicationClient",
2329
]
24-
__all__.extend([p for p in _patch_all if p not in __all__])
30+
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
2531

2632
_patch_sdk()
Lines changed: 104 additions & 83 deletions
Large diffs are not rendered by default.

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

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,46 @@
22
# --------------------------------------------------------------------------
33
# Copyright (c) Microsoft Corporation. All rights reserved.
44
# Licensed under the MIT License. See License.txt in the project root for license information.
5-
# Code generated by Microsoft (R) AutoRest Code Generator.
5+
# Code generated by Microsoft (R) Python Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

99
from typing import Any, TYPE_CHECKING
1010

11-
from azure.core.configuration import Configuration
1211
from azure.core.pipeline import policies
1312
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
1413

1514
from ._version import VERSION
1615

1716
if TYPE_CHECKING:
18-
# pylint: disable=unused-import,ungrouped-imports
1917
from azure.core.credentials import TokenCredential
2018

2119

22-
class RecoveryServicesDataReplicationMgmtClientConfiguration(
23-
Configuration
24-
): # pylint: disable=too-many-instance-attributes
25-
"""Configuration for RecoveryServicesDataReplicationMgmtClient.
20+
class DataReplicationClientConfiguration: # pylint: disable=too-many-instance-attributes
21+
"""Configuration for DataReplicationClient.
2622
2723
Note that all parameters used to create this instance are saved as instance
2824
attributes.
2925
30-
:param credential: Credential needed for the client to connect to Azure. Required.
26+
:param credential: Credential used to authenticate requests to the service. Required.
3127
:type credential: ~azure.core.credentials.TokenCredential
3228
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
3329
:type subscription_id: str
34-
:keyword api_version: Api Version. Default value is "2021-02-16-preview". Note that overriding
35-
this default value may result in unsupported behavior.
30+
:param base_url: Service host. Default value is "https://management.azure.com".
31+
:type base_url: str
32+
:keyword api_version: The API version to use for this operation. Default value is "2024-09-01".
33+
Note that overriding this default value may result in unsupported behavior.
3634
:paramtype api_version: str
3735
"""
3836

39-
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
40-
super(RecoveryServicesDataReplicationMgmtClientConfiguration, self).__init__(**kwargs)
41-
api_version: str = kwargs.pop("api_version", "2021-02-16-preview")
37+
def __init__(
38+
self,
39+
credential: "TokenCredential",
40+
subscription_id: str,
41+
base_url: str = "https://management.azure.com",
42+
**kwargs: Any
43+
) -> None:
44+
api_version: str = kwargs.pop("api_version", "2024-09-01")
4245

4346
if credential is None:
4447
raise ValueError("Parameter 'credential' must not be None.")
@@ -47,9 +50,11 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs
4750

4851
self.credential = credential
4952
self.subscription_id = subscription_id
53+
self.base_url = base_url
5054
self.api_version = api_version
5155
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
5256
kwargs.setdefault("sdk_moniker", "mgmt-recoveryservicesdatareplication/{}".format(VERSION))
57+
self.polling_interval = kwargs.get("polling_interval", 30)
5358
self._configure(**kwargs)
5459

5560
def _configure(self, **kwargs: Any) -> None:
@@ -58,9 +63,9 @@ def _configure(self, **kwargs: Any) -> None:
5863
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
5964
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
6065
self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs)
61-
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
6266
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
6367
self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
68+
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
6469
self.authentication_policy = kwargs.get("authentication_policy")
6570
if self.credential and not self.authentication_policy:
6671
self.authentication_policy = ARMChallengeAuthenticationPolicy(

0 commit comments

Comments
 (0)