66# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77# --------------------------------------------------------------------------
88
9- from typing import TYPE_CHECKING
9+ from copy import deepcopy
10+ from typing import Any , Optional , TYPE_CHECKING
1011
12+ from azure .core .rest import HttpRequest , HttpResponse
1113from azure .mgmt .core import ARMPipelineClient
1214from msrest import Deserializer , Serializer
1315
16+ from . import models
17+ from ._configuration import RedisEnterpriseManagementClientConfiguration
18+ from .operations import DatabasesOperations , Operations , OperationsStatusOperations , PrivateEndpointConnectionsOperations , PrivateLinkResourcesOperations , RedisEnterpriseOperations
19+
1420if TYPE_CHECKING :
1521 # pylint: disable=unused-import,ungrouped-imports
16- from typing import Any , Optional
17-
1822 from azure .core .credentials import TokenCredential
1923
20- from ._configuration import RedisEnterpriseManagementClientConfiguration
21- from .operations import Operations
22- from .operations import OperationsStatusOperations
23- from .operations import RedisEnterpriseOperations
24- from .operations import DatabasesOperations
25- from .operations import PrivateEndpointConnectionsOperations
26- from .operations import PrivateLinkResourcesOperations
27- from . import models
28-
29-
30- class RedisEnterpriseManagementClient (object ):
24+ class RedisEnterpriseManagementClient :
3125 """REST API for managing Redis Enterprise resources in Azure.
3226
3327 :ivar operations: Operations operations
@@ -39,46 +33,68 @@ class RedisEnterpriseManagementClient(object):
3933 :ivar databases: DatabasesOperations operations
4034 :vartype databases: azure.mgmt.redisenterprise.operations.DatabasesOperations
4135 :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
42- :vartype private_endpoint_connections: azure.mgmt.redisenterprise.operations.PrivateEndpointConnectionsOperations
36+ :vartype private_endpoint_connections:
37+ azure.mgmt.redisenterprise.operations.PrivateEndpointConnectionsOperations
4338 :ivar private_link_resources: PrivateLinkResourcesOperations operations
44- :vartype private_link_resources: azure.mgmt.redisenterprise.operations.PrivateLinkResourcesOperations
39+ :vartype private_link_resources:
40+ azure.mgmt.redisenterprise.operations.PrivateLinkResourcesOperations
4541 :param credential: Credential needed for the client to connect to Azure.
4642 :type credential: ~azure.core.credentials.TokenCredential
4743 :param subscription_id: The ID of the target subscription.
4844 :type subscription_id: str
49- :param str base_url: Service URL
50- :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
45+ :param base_url: Service URL. Default value is 'https://management.azure.com'.
46+ :type base_url: str
47+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
48+ Retry-After header is present.
5149 """
5250
5351 def __init__ (
5452 self ,
55- credential , # type: "TokenCredential"
56- subscription_id , # type: str
57- base_url = None , # type: Optional[str]
58- ** kwargs # type: Any
59- ):
60- # type: (...) -> None
61- if not base_url :
62- base_url = 'https://management.azure.com'
63- self ._config = RedisEnterpriseManagementClientConfiguration (credential , subscription_id , ** kwargs )
53+ credential : "TokenCredential" ,
54+ subscription_id : str ,
55+ base_url : str = "https://management.azure.com" ,
56+ ** kwargs : Any
57+ ) -> None :
58+ self ._config = RedisEnterpriseManagementClientConfiguration (credential = credential , subscription_id = subscription_id , ** kwargs )
6459 self ._client = ARMPipelineClient (base_url = base_url , config = self ._config , ** kwargs )
6560
6661 client_models = {k : v for k , v in models .__dict__ .items () if isinstance (v , type )}
6762 self ._serialize = Serializer (client_models )
6863 self ._deserialize = Deserializer (client_models )
64+ self ._serialize .client_side_validation = False
65+ self .operations = Operations (self ._client , self ._config , self ._serialize , self ._deserialize )
66+ self .operations_status = OperationsStatusOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
67+ self .redis_enterprise = RedisEnterpriseOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
68+ self .databases = DatabasesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
69+ self .private_endpoint_connections = PrivateEndpointConnectionsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
70+ self .private_link_resources = PrivateLinkResourcesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
71+
72+
73+ def _send_request (
74+ self ,
75+ request , # type: HttpRequest
76+ ** kwargs : Any
77+ ) -> HttpResponse :
78+ """Runs the network request through the client's chained policies.
79+
80+ >>> from azure.core.rest import HttpRequest
81+ >>> request = HttpRequest("GET", "https://www.example.org/")
82+ <HttpRequest [GET], url: 'https://www.example.org/'>
83+ >>> response = client._send_request(request)
84+ <HttpResponse: 200 OK>
85+
86+ For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart
87+
88+ :param request: The network request you want to make. Required.
89+ :type request: ~azure.core.rest.HttpRequest
90+ :keyword bool stream: Whether the response payload will be streamed. Defaults to False.
91+ :return: The response of your network call. Does not do error handling on your response.
92+ :rtype: ~azure.core.rest.HttpResponse
93+ """
6994
70- self .operations = Operations (
71- self ._client , self ._config , self ._serialize , self ._deserialize )
72- self .operations_status = OperationsStatusOperations (
73- self ._client , self ._config , self ._serialize , self ._deserialize )
74- self .redis_enterprise = RedisEnterpriseOperations (
75- self ._client , self ._config , self ._serialize , self ._deserialize )
76- self .databases = DatabasesOperations (
77- self ._client , self ._config , self ._serialize , self ._deserialize )
78- self .private_endpoint_connections = PrivateEndpointConnectionsOperations (
79- self ._client , self ._config , self ._serialize , self ._deserialize )
80- self .private_link_resources = PrivateLinkResourcesOperations (
81- self ._client , self ._config , self ._serialize , self ._deserialize )
95+ request_copy = deepcopy (request )
96+ request_copy .url = self ._client .format_url (request_copy .url )
97+ return self ._client .send_request (request_copy , ** kwargs )
8298
8399 def close (self ):
84100 # type: () -> None
0 commit comments