1212from azure .core .rest import HttpRequest , HttpResponse
1313from 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
1717from ._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
2025if 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