Skip to content

Commit c52bf32

Browse files
author
SDKAuto
committed
CodeGen from PR 24072 in Azure/azure-rest-api-specs
Merge a7499240e1ca6d4cfa67ef5bb41ac3ffcef46010 into 3fd46fc6005b18b1dafc602795f1da99fc2326e4
1 parent a2519c2 commit c52bf32

60 files changed

Lines changed: 7966 additions & 3698 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "a2da92ad78961529a087f9d0e65394174ac50794",
2+
"commit": "2b1ed69d4774f5f72d71b2308d695a2045bdb495",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.9.2",
55
"use": [
6-
"@autorest/python@6.2.1",
6+
"@autorest/python@6.6.0",
77
"@autorest/modelerfour@4.24.3"
88
],
9-
"autorest_command": "autorest specification/notificationhubs/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/python@6.2.1 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/notificationhubs/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.6.0 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
1010
"readme": "specification/notificationhubs/resource-manager/readme.md"
1111
}

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

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

9-
from ._notification_hubs_management_client import NotificationHubsManagementClient
9+
from ._notification_hubs_rp_client import NotificationHubsRPClient
1010
from ._version import VERSION
1111

1212
__version__ = VERSION
1313

1414
try:
1515
from ._patch import __all__ as _patch_all
16-
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
16+
from ._patch import * # pylint: disable=unused-wildcard-import
1717
except ImportError:
1818
_patch_all = []
1919
from ._patch import patch_sdk as _patch_sdk
2020

2121
__all__ = [
22-
"NotificationHubsManagementClient",
22+
"NotificationHubsRPClient",
2323
]
2424
__all__.extend([p for p in _patch_all if p not in __all__])
2525

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

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

9-
import sys
109
from typing import Any, TYPE_CHECKING
1110

1211
from azure.core.configuration import Configuration
@@ -15,35 +14,29 @@
1514

1615
from ._version import VERSION
1716

18-
if sys.version_info >= (3, 8):
19-
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
20-
else:
21-
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
22-
2317
if TYPE_CHECKING:
2418
# pylint: disable=unused-import,ungrouped-imports
2519
from azure.core.credentials import TokenCredential
2620

2721

28-
class NotificationHubsManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
29-
"""Configuration for NotificationHubsManagementClient.
22+
class NotificationHubsRPClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
23+
"""Configuration for NotificationHubsRPClient.
3024
3125
Note that all parameters used to create this instance are saved as instance
3226
attributes.
3327
3428
:param credential: Credential needed for the client to connect to Azure. Required.
3529
:type credential: ~azure.core.credentials.TokenCredential
36-
:param subscription_id: Gets subscription credentials which uniquely identify Microsoft Azure
37-
subscription. The subscription ID forms part of the URI for every service call. Required.
30+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
3831
:type subscription_id: str
39-
:keyword api_version: Api Version. Default value is "2017-04-01". Note that overriding this
40-
default value may result in unsupported behavior.
32+
:keyword api_version: Api Version. Default value is "2023-01-01-preview". Note that overriding
33+
this default value may result in unsupported behavior.
4134
:paramtype api_version: str
4235
"""
4336

4437
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
45-
super(NotificationHubsManagementClientConfiguration, self).__init__(**kwargs)
46-
api_version = kwargs.pop("api_version", "2017-04-01") # type: Literal["2017-04-01"]
38+
super(NotificationHubsRPClientConfiguration, self).__init__(**kwargs)
39+
api_version: str = kwargs.pop("api_version", "2023-01-01-preview")
4740

4841
if credential is None:
4942
raise ValueError("Parameter 'credential' must not be None.")
@@ -57,10 +50,7 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs
5750
kwargs.setdefault("sdk_moniker", "mgmt-notificationhubs/{}".format(VERSION))
5851
self._configure(**kwargs)
5952

60-
def _configure(
61-
self, **kwargs # type: Any
62-
):
63-
# type: (...) -> None
53+
def _configure(self, **kwargs: Any) -> None:
6454
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
6555
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
6656
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)

sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/_notification_hubs_management_client.py renamed to sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/_notification_hubs_rp_client.py

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,34 +12,41 @@
1212
from azure.core.rest import HttpRequest, HttpResponse
1313
from azure.mgmt.core import ARMPipelineClient
1414

15-
from . import models
16-
from ._configuration import NotificationHubsManagementClientConfiguration
15+
from . import models as _models
16+
from ._configuration import NotificationHubsRPClientConfiguration
1717
from ._serialization import Deserializer, Serializer
18-
from .operations import NamespacesOperations, NotificationHubsOperations, Operations
18+
from .operations import (
19+
NamespacesOperations,
20+
NotificationHubsOperations,
21+
Operations,
22+
PrivateEndpointConnectionsOperations,
23+
)
1924

2025
if TYPE_CHECKING:
2126
# pylint: disable=unused-import,ungrouped-imports
2227
from azure.core.credentials import TokenCredential
2328

2429

25-
class NotificationHubsManagementClient: # pylint: disable=client-accepts-api-version-keyword
26-
"""Azure NotificationHub client.
30+
class NotificationHubsRPClient: # pylint: disable=client-accepts-api-version-keyword
31+
"""Microsoft Notification Hubs Resource Provider REST API.
2732
28-
:ivar operations: Operations operations
29-
:vartype operations: azure.mgmt.notificationhubs.operations.Operations
30-
:ivar namespaces: NamespacesOperations operations
31-
:vartype namespaces: azure.mgmt.notificationhubs.operations.NamespacesOperations
3233
:ivar notification_hubs: NotificationHubsOperations operations
3334
:vartype notification_hubs: azure.mgmt.notificationhubs.operations.NotificationHubsOperations
35+
:ivar namespaces: NamespacesOperations operations
36+
:vartype namespaces: azure.mgmt.notificationhubs.operations.NamespacesOperations
37+
:ivar operations: Operations operations
38+
:vartype operations: azure.mgmt.notificationhubs.operations.Operations
39+
:ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
40+
:vartype private_endpoint_connections:
41+
azure.mgmt.notificationhubs.operations.PrivateEndpointConnectionsOperations
3442
:param credential: Credential needed for the client to connect to Azure. Required.
3543
:type credential: ~azure.core.credentials.TokenCredential
36-
:param subscription_id: Gets subscription credentials which uniquely identify Microsoft Azure
37-
subscription. The subscription ID forms part of the URI for every service call. Required.
44+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
3845
:type subscription_id: str
3946
:param base_url: Service URL. Default value is "https://management.azure.com".
4047
:type base_url: str
41-
:keyword api_version: Api Version. Default value is "2017-04-01". Note that overriding this
42-
default value may result in unsupported behavior.
48+
:keyword api_version: Api Version. Default value is "2023-01-01-preview". Note that overriding
49+
this default value may result in unsupported behavior.
4350
:paramtype api_version: str
4451
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
4552
Retry-After header is present.
@@ -52,20 +59,23 @@ def __init__(
5259
base_url: str = "https://management.azure.com",
5360
**kwargs: Any
5461
) -> None:
55-
self._config = NotificationHubsManagementClientConfiguration(
62+
self._config = NotificationHubsRPClientConfiguration(
5663
credential=credential, subscription_id=subscription_id, **kwargs
5764
)
58-
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
65+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
5966

60-
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
67+
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
6168
self._serialize = Serializer(client_models)
6269
self._deserialize = Deserializer(client_models)
6370
self._serialize.client_side_validation = False
64-
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
65-
self.namespaces = NamespacesOperations(self._client, self._config, self._serialize, self._deserialize)
6671
self.notification_hubs = NotificationHubsOperations(
6772
self._client, self._config, self._serialize, self._deserialize
6873
)
74+
self.namespaces = NamespacesOperations(self._client, self._config, self._serialize, self._deserialize)
75+
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
76+
self.private_endpoint_connections = PrivateEndpointConnectionsOperations(
77+
self._client, self._config, self._serialize, self._deserialize
78+
)
6979

7080
def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
7181
"""Runs the network request through the client's chained policies.
@@ -89,15 +99,12 @@ def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
8999
request_copy.url = self._client.format_url(request_copy.url)
90100
return self._client.send_request(request_copy, **kwargs)
91101

92-
def close(self):
93-
# type: () -> None
102+
def close(self) -> None:
94103
self._client.close()
95104

96-
def __enter__(self):
97-
# type: () -> NotificationHubsManagementClient
105+
def __enter__(self) -> "NotificationHubsRPClient":
98106
self._client.__enter__()
99107
return self
100108

101-
def __exit__(self, *exc_details):
102-
# type: (Any) -> None
109+
def __exit__(self, *exc_details: Any) -> None:
103110
self._client.__exit__(*exc_details)

0 commit comments

Comments
 (0)