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 DataFactoryManagementClientConfiguration
18+ from .operations import ActivityRunsOperations , DataFlowDebugSessionOperations , DataFlowsOperations , DatasetsOperations , ExposureControlOperations , FactoriesOperations , IntegrationRuntimeNodesOperations , IntegrationRuntimeObjectMetadataOperations , IntegrationRuntimesOperations , LinkedServicesOperations , ManagedPrivateEndpointsOperations , ManagedVirtualNetworksOperations , Operations , PipelineRunsOperations , PipelinesOperations , PrivateEndPointConnectionsOperations , PrivateEndpointConnectionOperations , PrivateLinkResourcesOperations , TriggerRunsOperations , TriggersOperations
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
19- from azure .core .pipeline .transport import HttpRequest , HttpResponse
20-
21- from ._configuration import DataFactoryManagementClientConfiguration
22- from .operations import Operations
23- from .operations import FactoriesOperations
24- from .operations import ExposureControlOperations
25- from .operations import IntegrationRuntimesOperations
26- from .operations import IntegrationRuntimeObjectMetadataOperations
27- from .operations import IntegrationRuntimeNodesOperations
28- from .operations import LinkedServicesOperations
29- from .operations import DatasetsOperations
30- from .operations import PipelinesOperations
31- from .operations import PipelineRunsOperations
32- from .operations import ActivityRunsOperations
33- from .operations import TriggersOperations
34- from .operations import TriggerRunsOperations
35- from .operations import DataFlowsOperations
36- from .operations import DataFlowDebugSessionOperations
37- from .operations import ManagedVirtualNetworksOperations
38- from .operations import ManagedPrivateEndpointsOperations
39- from .operations import PrivateEndPointConnectionsOperations
40- from .operations import PrivateEndpointConnectionOperations
41- from .operations import PrivateLinkResourcesOperations
42- from . import models
43-
4423
45- class DataFactoryManagementClient ( object ) :
24+ class DataFactoryManagementClient :
4625 """The Azure Data Factory V2 management API provides a RESTful set of web services that interact with Azure Data Factory V2 services.
4726
4827 :ivar operations: Operations operations
@@ -53,10 +32,13 @@ class DataFactoryManagementClient(object):
5332 :vartype exposure_control: azure.mgmt.datafactory.operations.ExposureControlOperations
5433 :ivar integration_runtimes: IntegrationRuntimesOperations operations
5534 :vartype integration_runtimes: azure.mgmt.datafactory.operations.IntegrationRuntimesOperations
56- :ivar integration_runtime_object_metadata: IntegrationRuntimeObjectMetadataOperations operations
57- :vartype integration_runtime_object_metadata: azure.mgmt.datafactory.operations.IntegrationRuntimeObjectMetadataOperations
35+ :ivar integration_runtime_object_metadata: IntegrationRuntimeObjectMetadataOperations
36+ operations
37+ :vartype integration_runtime_object_metadata:
38+ azure.mgmt.datafactory.operations.IntegrationRuntimeObjectMetadataOperations
5839 :ivar integration_runtime_nodes: IntegrationRuntimeNodesOperations operations
59- :vartype integration_runtime_nodes: azure.mgmt.datafactory.operations.IntegrationRuntimeNodesOperations
40+ :vartype integration_runtime_nodes:
41+ azure.mgmt.datafactory.operations.IntegrationRuntimeNodesOperations
6042 :ivar linked_services: LinkedServicesOperations operations
6143 :vartype linked_services: azure.mgmt.datafactory.operations.LinkedServicesOperations
6244 :ivar datasets: DatasetsOperations operations
@@ -74,101 +56,94 @@ class DataFactoryManagementClient(object):
7456 :ivar data_flows: DataFlowsOperations operations
7557 :vartype data_flows: azure.mgmt.datafactory.operations.DataFlowsOperations
7658 :ivar data_flow_debug_session: DataFlowDebugSessionOperations operations
77- :vartype data_flow_debug_session: azure.mgmt.datafactory.operations.DataFlowDebugSessionOperations
59+ :vartype data_flow_debug_session:
60+ azure.mgmt.datafactory.operations.DataFlowDebugSessionOperations
7861 :ivar managed_virtual_networks: ManagedVirtualNetworksOperations operations
79- :vartype managed_virtual_networks: azure.mgmt.datafactory.operations.ManagedVirtualNetworksOperations
62+ :vartype managed_virtual_networks:
63+ azure.mgmt.datafactory.operations.ManagedVirtualNetworksOperations
8064 :ivar managed_private_endpoints: ManagedPrivateEndpointsOperations operations
81- :vartype managed_private_endpoints: azure.mgmt.datafactory.operations.ManagedPrivateEndpointsOperations
65+ :vartype managed_private_endpoints:
66+ azure.mgmt.datafactory.operations.ManagedPrivateEndpointsOperations
8267 :ivar private_end_point_connections: PrivateEndPointConnectionsOperations operations
83- :vartype private_end_point_connections: azure.mgmt.datafactory.operations.PrivateEndPointConnectionsOperations
68+ :vartype private_end_point_connections:
69+ azure.mgmt.datafactory.operations.PrivateEndPointConnectionsOperations
8470 :ivar private_endpoint_connection: PrivateEndpointConnectionOperations operations
85- :vartype private_endpoint_connection: azure.mgmt.datafactory.operations.PrivateEndpointConnectionOperations
71+ :vartype private_endpoint_connection:
72+ azure.mgmt.datafactory.operations.PrivateEndpointConnectionOperations
8673 :ivar private_link_resources: PrivateLinkResourcesOperations operations
87- :vartype private_link_resources: azure.mgmt.datafactory.operations.PrivateLinkResourcesOperations
74+ :vartype private_link_resources:
75+ azure.mgmt.datafactory.operations.PrivateLinkResourcesOperations
8876 :param credential: Credential needed for the client to connect to Azure.
8977 :type credential: ~azure.core.credentials.TokenCredential
9078 :param subscription_id: The subscription identifier.
9179 :type subscription_id: str
92- :param str base_url: Service URL
93- :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
80+ :param base_url: Service URL. Default value is 'https://management.azure.com'.
81+ :type base_url: str
82+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
83+ Retry-After header is present.
9484 """
9585
9686 def __init__ (
9787 self ,
98- credential , # type: "TokenCredential"
99- subscription_id , # type: str
100- base_url = None , # type: Optional[str]
101- ** kwargs # type: Any
102- ):
103- # type: (...) -> None
104- if not base_url :
105- base_url = 'https://management.azure.com'
106- self ._config = DataFactoryManagementClientConfiguration (credential , subscription_id , ** kwargs )
88+ credential : "TokenCredential" ,
89+ subscription_id : str ,
90+ base_url : str = "https://management.azure.com" ,
91+ ** kwargs : Any
92+ ) -> None :
93+ self ._config = DataFactoryManagementClientConfiguration (credential = credential , subscription_id = subscription_id , ** kwargs )
10794 self ._client = ARMPipelineClient (base_url = base_url , config = self ._config , ** kwargs )
10895
10996 client_models = {k : v for k , v in models .__dict__ .items () if isinstance (v , type )}
11097 self ._serialize = Serializer (client_models )
111- self ._serialize .client_side_validation = False
11298 self ._deserialize = Deserializer (client_models )
113-
114- self .operations = Operations (
115- self ._client , self ._config , self ._serialize , self ._deserialize )
116- self .factories = FactoriesOperations (
117- self ._client , self ._config , self ._serialize , self ._deserialize )
118- self .exposure_control = ExposureControlOperations (
119- self ._client , self ._config , self ._serialize , self ._deserialize )
120- self .integration_runtimes = IntegrationRuntimesOperations (
121- self ._client , self ._config , self ._serialize , self ._deserialize )
122- self .integration_runtime_object_metadata = IntegrationRuntimeObjectMetadataOperations (
123- self ._client , self ._config , self ._serialize , self ._deserialize )
124- self .integration_runtime_nodes = IntegrationRuntimeNodesOperations (
125- self ._client , self ._config , self ._serialize , self ._deserialize )
126- self .linked_services = LinkedServicesOperations (
127- self ._client , self ._config , self ._serialize , self ._deserialize )
128- self .datasets = DatasetsOperations (
129- self ._client , self ._config , self ._serialize , self ._deserialize )
130- self .pipelines = PipelinesOperations (
131- self ._client , self ._config , self ._serialize , self ._deserialize )
132- self .pipeline_runs = PipelineRunsOperations (
133- self ._client , self ._config , self ._serialize , self ._deserialize )
134- self .activity_runs = ActivityRunsOperations (
135- self ._client , self ._config , self ._serialize , self ._deserialize )
136- self .triggers = TriggersOperations (
137- self ._client , self ._config , self ._serialize , self ._deserialize )
138- self .trigger_runs = TriggerRunsOperations (
139- self ._client , self ._config , self ._serialize , self ._deserialize )
140- self .data_flows = DataFlowsOperations (
141- self ._client , self ._config , self ._serialize , self ._deserialize )
142- self .data_flow_debug_session = DataFlowDebugSessionOperations (
143- self ._client , self ._config , self ._serialize , self ._deserialize )
144- self .managed_virtual_networks = ManagedVirtualNetworksOperations (
145- self ._client , self ._config , self ._serialize , self ._deserialize )
146- self .managed_private_endpoints = ManagedPrivateEndpointsOperations (
147- self ._client , self ._config , self ._serialize , self ._deserialize )
148- self .private_end_point_connections = PrivateEndPointConnectionsOperations (
149- self ._client , self ._config , self ._serialize , self ._deserialize )
150- self .private_endpoint_connection = PrivateEndpointConnectionOperations (
151- self ._client , self ._config , self ._serialize , self ._deserialize )
152- self .private_link_resources = PrivateLinkResourcesOperations (
153- self ._client , self ._config , self ._serialize , self ._deserialize )
154-
155- def _send_request (self , http_request , ** kwargs ):
156- # type: (HttpRequest, Any) -> HttpResponse
99+ self ._serialize .client_side_validation = False
100+ self .operations = Operations (self ._client , self ._config , self ._serialize , self ._deserialize )
101+ self .factories = FactoriesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
102+ self .exposure_control = ExposureControlOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
103+ self .integration_runtimes = IntegrationRuntimesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
104+ self .integration_runtime_object_metadata = IntegrationRuntimeObjectMetadataOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
105+ self .integration_runtime_nodes = IntegrationRuntimeNodesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
106+ self .linked_services = LinkedServicesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
107+ self .datasets = DatasetsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
108+ self .pipelines = PipelinesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
109+ self .pipeline_runs = PipelineRunsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
110+ self .activity_runs = ActivityRunsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
111+ self .triggers = TriggersOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
112+ self .trigger_runs = TriggerRunsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
113+ self .data_flows = DataFlowsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
114+ self .data_flow_debug_session = DataFlowDebugSessionOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
115+ self .managed_virtual_networks = ManagedVirtualNetworksOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
116+ self .managed_private_endpoints = ManagedPrivateEndpointsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
117+ self .private_end_point_connections = PrivateEndPointConnectionsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
118+ self .private_endpoint_connection = PrivateEndpointConnectionOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
119+ self .private_link_resources = PrivateLinkResourcesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
120+
121+
122+ def _send_request (
123+ self ,
124+ request , # type: HttpRequest
125+ ** kwargs : Any
126+ ) -> HttpResponse :
157127 """Runs the network request through the client's chained policies.
158128
159- :param http_request: The network request you want to make. Required.
160- :type http_request: ~azure.core.pipeline.transport.HttpRequest
161- :keyword bool stream: Whether the response payload will be streamed. Defaults to True.
129+ >>> from azure.core.rest import HttpRequest
130+ >>> request = HttpRequest("GET", "https://www.example.org/")
131+ <HttpRequest [GET], url: 'https://www.example.org/'>
132+ >>> response = client._send_request(request)
133+ <HttpResponse: 200 OK>
134+
135+ For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart
136+
137+ :param request: The network request you want to make. Required.
138+ :type request: ~azure.core.rest.HttpRequest
139+ :keyword bool stream: Whether the response payload will be streamed. Defaults to False.
162140 :return: The response of your network call. Does not do error handling on your response.
163- :rtype: ~azure.core.pipeline.transport .HttpResponse
141+ :rtype: ~azure.core.rest .HttpResponse
164142 """
165- path_format_arguments = {
166- 'subscriptionId' : self ._serialize .url ("self._config.subscription_id" , self ._config .subscription_id , 'str' ),
167- }
168- http_request .url = self ._client .format_url (http_request .url , ** path_format_arguments )
169- stream = kwargs .pop ("stream" , True )
170- pipeline_response = self ._client ._pipeline .run (http_request , stream = stream , ** kwargs )
171- return pipeline_response .http_response
143+
144+ request_copy = deepcopy (request )
145+ request_copy .url = self ._client .format_url (request_copy .url )
146+ return self ._client .send_request (request_copy , ** kwargs )
172147
173148 def close (self ):
174149 # type: () -> None
0 commit comments