Skip to content

Commit cb42e32

Browse files
author
SDKAuto
committed
CodeGen from PR 19956 in Azure/azure-rest-api-specs
Merge 183dbd42aef82973d3fc506db21bae8b44cdbbb7 into f70b7953f5d54889cc1825b37ad938342ca93a2e
1 parent 84a4306 commit cb42e32

34 files changed

+4107
-1485
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.2",
2+
"autorest": "3.8.4",
33
"use": [
4-
"@autorest/python@5.8.1",
5-
"@autorest/modelerfour@4.19.2"
4+
"@autorest/python@6.1.5",
5+
"@autorest/modelerfour@4.23.5"
66
],
7-
"commit": "8816b8568ee46dae94967bfadb97e19301604667",
7+
"commit": "491bdedb951c8df2ed1edf40df47697a5a079a6c",
88
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9-
"autorest_command": "autorest specification/resourcehealth/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.1 --use=@autorest/modelerfour@4.19.2 --version=3.4.2",
9+
"autorest_command": "autorest specification/resourcehealth/resource-manager/readme.md --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.1.5 --use=@autorest/modelerfour@4.23.5 --version=3.8.4 --version-tolerant=False",
1010
"readme": "specification/resourcehealth/resource-manager/readme.md"
1111
}

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,7 @@
1414
patch_sdk()
1515
except ImportError:
1616
pass
17+
18+
from ._version import VERSION
19+
20+
__version__ = VERSION

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

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,16 @@
88
# Changes may cause incorrect behavior and will be lost if the code is
99
# regenerated.
1010
# --------------------------------------------------------------------------
11-
from typing import TYPE_CHECKING
11+
from typing import Any, TYPE_CHECKING
1212

1313
from azure.core.configuration import Configuration
1414
from azure.core.pipeline import policies
15-
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
15+
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
1616

1717
from ._version import VERSION
1818

1919
if TYPE_CHECKING:
2020
# pylint: disable=unused-import,ungrouped-imports
21-
from typing import Any
22-
2321
from azure.core.credentials import TokenCredential
2422

2523
class MicrosoftResourceHealthConfiguration(Configuration):
@@ -28,16 +26,16 @@ class MicrosoftResourceHealthConfiguration(Configuration):
2826
Note that all parameters used to create this instance are saved as instance
2927
attributes.
3028
31-
:param credential: Credential needed for the client to connect to Azure.
29+
:param credential: Credential needed for the client to connect to Azure. Required.
3230
:type credential: ~azure.core.credentials.TokenCredential
33-
:param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
31+
:param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.
3432
:type subscription_id: str
3533
"""
3634

3735
def __init__(
3836
self,
39-
credential, # type: "TokenCredential"
40-
subscription_id, # type: str
37+
credential: "TokenCredential",
38+
subscription_id: str,
4139
**kwargs # type: Any
4240
):
4341
# type: (...) -> None
@@ -68,4 +66,4 @@ def _configure(
6866
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
6967
self.authentication_policy = kwargs.get('authentication_policy')
7068
if self.credential and not self.authentication_policy:
71-
self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
69+
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)

sdk/resourcehealth/azure-mgmt-resourcehealth/azure/mgmt/resourcehealth/_microsoft_resource_health.py

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,18 @@
99
# regenerated.
1010
# --------------------------------------------------------------------------
1111

12-
from typing import TYPE_CHECKING
12+
from typing import Any, Optional, TYPE_CHECKING
1313

1414
from azure.mgmt.core import ARMPipelineClient
1515
from azure.profiles import KnownProfiles, ProfileDefinition
1616
from azure.profiles.multiapiclient import MultiApiClientMixin
17-
from msrest import Deserializer, Serializer
1817

1918
from ._configuration import MicrosoftResourceHealthConfiguration
19+
from ._serialization import Deserializer, Serializer
2020

2121
if TYPE_CHECKING:
2222
# pylint: disable=unused-import,ungrouped-imports
23-
from typing import Any, Optional
24-
2523
from azure.core.credentials import TokenCredential
26-
from azure.core.pipeline.transport import HttpRequest, HttpResponse
2724

2825
class _SDKClient(object):
2926
def __init__(self, *args, **kwargs):
@@ -43,9 +40,9 @@ class MicrosoftResourceHealth(MultiApiClientMixin, _SDKClient):
4340
The api-version parameter sets the default API version if the operation
4441
group is not described in the profile.
4542
46-
:param credential: Credential needed for the client to connect to Azure.
43+
:param credential: Credential needed for the client to connect to Azure. Required.
4744
:type credential: ~azure.core.credentials.TokenCredential
48-
:param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
45+
:param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.
4946
:type subscription_id: str
5047
:param api_version: API version to use if no profile is provided, or if missing in profile.
5148
:type api_version: str
@@ -66,15 +63,13 @@ class MicrosoftResourceHealth(MultiApiClientMixin, _SDKClient):
6663

6764
def __init__(
6865
self,
69-
credential, # type: "TokenCredential"
70-
subscription_id, # type: str
66+
credential: "TokenCredential",
67+
subscription_id: str,
7168
api_version=None, # type: Optional[str]
72-
base_url=None, # type: Optional[str]
69+
base_url: str = "https://management.azure.com",
7370
profile=KnownProfiles.default, # type: KnownProfiles
7471
**kwargs # type: Any
7572
):
76-
if not base_url:
77-
base_url = 'https://management.azure.com'
7873
self._config = MicrosoftResourceHealthConfiguration(credential, subscription_id, **kwargs)
7974
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
8075
super(MicrosoftResourceHealth, self).__init__(

0 commit comments

Comments
 (0)