Skip to content

Commit 956abd1

Browse files
author
SDKAuto
committed
CodeGen from PR 14749 in Azure/azure-rest-api-specs
Merge 6a5f970e9f7e2ed91bf0c11289daa8743f28e131 into 682c9680fd6ac7746d701bcf0c69948a3199671a
1 parent 05008ae commit 956abd1

File tree

142 files changed

+49883
-682
lines changed

Some content is hidden

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

142 files changed

+49883
-682
lines changed

sdk/servicebus/azure-mgmt-servicebus/MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
include _meta.json
12
recursive-include tests *.py *.yaml
23
include *.md
34
include azure/__init__.py
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"autorest": "3.4.5",
3+
"use": [
4+
"@autorest/[email protected]",
5+
"@autorest/[email protected]"
6+
],
7+
"commit": "74244c59db8f94a3993677ce0f83e9d68455d784",
8+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9+
"autorest_command": "autorest specification/servicebus/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/[email protected] --use=@autorest/[email protected] --version=3.4.5",
10+
"readme": "specification/servicebus/resource-manager/readme.md"
11+
}

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
# --------------------------------------------------------------------------
88

99
from ._service_bus_management_client import ServiceBusManagementClient
10-
from ._version import VERSION
11-
12-
__version__ = VERSION
1310
__all__ = ['ServiceBusManagementClient']
1411

1512
try:

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# coding=utf-8
22
# --------------------------------------------------------------------------
33
# Copyright (c) Microsoft Corporation. All rights reserved.
4-
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
57
# Code generated by Microsoft (R) AutoRest Code Generator.
6-
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
710
# --------------------------------------------------------------------------
8-
911
from typing import TYPE_CHECKING
1012

1113
from azure.core.configuration import Configuration
@@ -20,7 +22,6 @@
2022

2123
from azure.core.credentials import TokenCredential
2224

23-
2425
class ServiceBusManagementClientConfiguration(Configuration):
2526
"""Configuration for ServiceBusManagementClient.
2627
@@ -49,7 +50,7 @@ def __init__(
4950
self.credential = credential
5051
self.subscription_id = subscription_id
5152
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
52-
kwargs.setdefault('sdk_moniker', 'mgmt-servicebus/{}'.format(VERSION))
53+
kwargs.setdefault('sdk_moniker', 'azure-mgmt-servicebus/{}'.format(VERSION))
5354
self._configure(**kwargs)
5455

5556
def _configure(

sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/_service_bus_management_client.py

Lines changed: 322 additions & 86 deletions
Large diffs are not rendered by default.

sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/aio/_configuration.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# coding=utf-8
22
# --------------------------------------------------------------------------
33
# Copyright (c) Microsoft Corporation. All rights reserved.
4-
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
57
# Code generated by Microsoft (R) AutoRest Code Generator.
6-
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
710
# --------------------------------------------------------------------------
8-
911
from typing import Any, TYPE_CHECKING
1012

1113
from azure.core.configuration import Configuration
@@ -18,7 +20,6 @@
1820
# pylint: disable=unused-import,ungrouped-imports
1921
from azure.core.credentials_async import AsyncTokenCredential
2022

21-
2223
class ServiceBusManagementClientConfiguration(Configuration):
2324
"""Configuration for ServiceBusManagementClient.
2425
@@ -35,7 +36,7 @@ def __init__(
3536
self,
3637
credential: "AsyncTokenCredential",
3738
subscription_id: str,
38-
**kwargs: Any
39+
**kwargs # type: Any
3940
) -> None:
4041
if credential is None:
4142
raise ValueError("Parameter 'credential' must not be None.")
@@ -46,7 +47,7 @@ def __init__(
4647
self.credential = credential
4748
self.subscription_id = subscription_id
4849
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
49-
kwargs.setdefault('sdk_moniker', 'mgmt-servicebus/{}'.format(VERSION))
50+
kwargs.setdefault('sdk_moniker', 'azure-mgmt-servicebus/{}'.format(VERSION))
5051
self._configure(**kwargs)
5152

5253
def _configure(

sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/aio/_service_bus_management_client.py

Lines changed: 327 additions & 87 deletions
Large diffs are not rendered by default.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
# --------------------------------------------------------------------------
7+
from .v2017_04_01.models import *
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# Code generated by Microsoft (R) AutoRest Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
9+
from ._service_bus_management_client import ServiceBusManagementClient
10+
__all__ = ['ServiceBusManagementClient']
11+
12+
try:
13+
from ._patch import patch_sdk # type: ignore
14+
patch_sdk()
15+
except ImportError:
16+
pass
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# Code generated by Microsoft (R) AutoRest Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
9+
from typing import TYPE_CHECKING
10+
11+
from azure.core.configuration import Configuration
12+
from azure.core.pipeline import policies
13+
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
14+
15+
if TYPE_CHECKING:
16+
# pylint: disable=unused-import,ungrouped-imports
17+
from typing import Any
18+
19+
from azure.core.credentials import TokenCredential
20+
21+
VERSION = "unknown"
22+
23+
class ServiceBusManagementClientConfiguration(Configuration):
24+
"""Configuration for ServiceBusManagementClient.
25+
26+
Note that all parameters used to create this instance are saved as instance
27+
attributes.
28+
29+
:param credential: Credential needed for the client to connect to Azure.
30+
:type credential: ~azure.core.credentials.TokenCredential
31+
:param subscription_id: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
32+
:type subscription_id: str
33+
"""
34+
35+
def __init__(
36+
self,
37+
credential, # type: "TokenCredential"
38+
subscription_id, # type: str
39+
**kwargs # type: Any
40+
):
41+
# type: (...) -> None
42+
if credential is None:
43+
raise ValueError("Parameter 'credential' must not be None.")
44+
if subscription_id is None:
45+
raise ValueError("Parameter 'subscription_id' must not be None.")
46+
super(ServiceBusManagementClientConfiguration, self).__init__(**kwargs)
47+
48+
self.credential = credential
49+
self.subscription_id = subscription_id
50+
self.api_version = "2015-08-01"
51+
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
52+
kwargs.setdefault('sdk_moniker', 'mgmt-servicebus/{}'.format(VERSION))
53+
self._configure(**kwargs)
54+
55+
def _configure(
56+
self,
57+
**kwargs # type: Any
58+
):
59+
# type: (...) -> None
60+
self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs)
61+
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
62+
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
63+
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
64+
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
65+
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs)
66+
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
67+
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
68+
self.authentication_policy = kwargs.get('authentication_policy')
69+
if self.credential and not self.authentication_policy:
70+
self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)

0 commit comments

Comments
 (0)