99from copy import deepcopy
1010from typing import Any , TYPE_CHECKING
1111
12- from msrest import Deserializer , Serializer
13-
1412from azure .core import PipelineClient
1513from azure .core .rest import HttpRequest , HttpResponse
1614
1715from . import models
1816from ._configuration import ArtifactsClientConfiguration
19- from .operations import BigDataPoolsOperations , DataFlowDebugSessionOperations , DataFlowOperations , DatasetOperations , IntegrationRuntimesOperations , KqlScriptOperations , KqlScriptsOperations , LibraryOperations , LinkConnectionOperations , LinkedServiceOperations , MetastoreOperations , NotebookOperationResultOperations , NotebookOperations , PipelineOperations , PipelineRunOperations , SparkConfigurationOperations , SparkJobDefinitionOperations , SqlPoolsOperations , SqlScriptOperations , TriggerOperations , TriggerRunOperations , WorkspaceGitRepoManagementOperations , WorkspaceOperations
17+ from ._serialization import Deserializer , Serializer
18+ from .operations import (
19+ BigDataPoolsOperations ,
20+ DataFlowDebugSessionOperations ,
21+ DataFlowOperations ,
22+ DatasetOperations ,
23+ IntegrationRuntimesOperations ,
24+ KqlScriptOperations ,
25+ KqlScriptsOperations ,
26+ LibraryOperations ,
27+ LinkConnectionOperations ,
28+ LinkedServiceOperations ,
29+ MetastoreOperations ,
30+ NotebookOperationResultOperations ,
31+ NotebookOperations ,
32+ PipelineOperations ,
33+ PipelineRunOperations ,
34+ SparkConfigurationOperations ,
35+ SparkJobDefinitionOperations ,
36+ SqlPoolsOperations ,
37+ SqlScriptOperations ,
38+ TriggerOperations ,
39+ TriggerRunOperations ,
40+ WorkspaceGitRepoManagementOperations ,
41+ WorkspaceOperations ,
42+ )
2043
2144if TYPE_CHECKING :
2245 # pylint: disable=unused-import,ungrouped-imports
2346 from azure .core .credentials import TokenCredential
2447
25- class ArtifactsClient : # pylint: disable=too-many-instance-attributes
48+
49+ class ArtifactsClient : # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
2650 """ArtifactsClient.
2751
2852 :ivar link_connection: LinkConnectionOperations operations
@@ -74,105 +98,61 @@ class ArtifactsClient: # pylint: disable=too-many-instance-attributes
7498 :vartype trigger_run: azure.synapse.artifacts.operations.TriggerRunOperations
7599 :ivar workspace: WorkspaceOperations operations
76100 :vartype workspace: azure.synapse.artifacts.operations.WorkspaceOperations
77- :param credential: Credential needed for the client to connect to Azure.
101+ :param credential: Credential needed for the client to connect to Azure. Required.
78102 :type credential: ~azure.core.credentials.TokenCredential
79103 :param endpoint: The workspace development endpoint, for example
80- https://myworkspace.dev.azuresynapse.net.
104+ https://myworkspace.dev.azuresynapse.net. Required.
81105 :type endpoint: str
82106 :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
83107 Retry-After header is present.
84108 """
85109
86- def __init__ (
87- self ,
88- credential : "TokenCredential" ,
89- endpoint : str ,
90- ** kwargs : Any
91- ) -> None :
92- _base_url = '{endpoint}'
110+ def __init__ (self , credential : "TokenCredential" , endpoint : str , ** kwargs : Any ) -> None :
111+ _endpoint = "{endpoint}"
93112 self ._config = ArtifactsClientConfiguration (credential = credential , endpoint = endpoint , ** kwargs )
94- self ._client = PipelineClient (base_url = _base_url , config = self ._config , ** kwargs )
113+ self ._client = PipelineClient (base_url = _endpoint , config = self ._config , ** kwargs )
95114
96115 client_models = {k : v for k , v in models .__dict__ .items () if isinstance (v , type )}
97116 self ._serialize = Serializer (client_models )
98117 self ._deserialize = Deserializer (client_models )
99118 self ._serialize .client_side_validation = False
100- self .link_connection = LinkConnectionOperations (
101- self ._client , self ._config , self ._serialize , self ._deserialize
102- )
103- self .kql_scripts = KqlScriptsOperations (
104- self ._client , self ._config , self ._serialize , self ._deserialize
105- )
106- self .kql_script = KqlScriptOperations (
107- self ._client , self ._config , self ._serialize , self ._deserialize
108- )
109- self .metastore = MetastoreOperations (
110- self ._client , self ._config , self ._serialize , self ._deserialize
111- )
119+ self .link_connection = LinkConnectionOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
120+ self .kql_scripts = KqlScriptsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
121+ self .kql_script = KqlScriptOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
122+ self .metastore = MetastoreOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
112123 self .spark_configuration = SparkConfigurationOperations (
113124 self ._client , self ._config , self ._serialize , self ._deserialize
114125 )
115- self .big_data_pools = BigDataPoolsOperations (
116- self ._client , self ._config , self ._serialize , self ._deserialize
117- )
118- self .data_flow = DataFlowOperations (
119- self ._client , self ._config , self ._serialize , self ._deserialize
120- )
126+ self .big_data_pools = BigDataPoolsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
127+ self .data_flow = DataFlowOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
121128 self .data_flow_debug_session = DataFlowDebugSessionOperations (
122129 self ._client , self ._config , self ._serialize , self ._deserialize
123130 )
124- self .dataset = DatasetOperations (
125- self ._client , self ._config , self ._serialize , self ._deserialize
126- )
131+ self .dataset = DatasetOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
127132 self .workspace_git_repo_management = WorkspaceGitRepoManagementOperations (
128133 self ._client , self ._config , self ._serialize , self ._deserialize
129134 )
130135 self .integration_runtimes = IntegrationRuntimesOperations (
131136 self ._client , self ._config , self ._serialize , self ._deserialize
132137 )
133- self .library = LibraryOperations (
134- self ._client , self ._config , self ._serialize , self ._deserialize
135- )
136- self .linked_service = LinkedServiceOperations (
137- self ._client , self ._config , self ._serialize , self ._deserialize
138- )
139- self .notebook = NotebookOperations (
140- self ._client , self ._config , self ._serialize , self ._deserialize
141- )
138+ self .library = LibraryOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
139+ self .linked_service = LinkedServiceOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
140+ self .notebook = NotebookOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
142141 self .notebook_operation_result = NotebookOperationResultOperations (
143142 self ._client , self ._config , self ._serialize , self ._deserialize
144143 )
145- self .pipeline = PipelineOperations (
146- self ._client , self ._config , self ._serialize , self ._deserialize
147- )
148- self .pipeline_run = PipelineRunOperations (
149- self ._client , self ._config , self ._serialize , self ._deserialize
150- )
144+ self .pipeline = PipelineOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
145+ self .pipeline_run = PipelineRunOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
151146 self .spark_job_definition = SparkJobDefinitionOperations (
152147 self ._client , self ._config , self ._serialize , self ._deserialize
153148 )
154- self .sql_pools = SqlPoolsOperations (
155- self ._client , self ._config , self ._serialize , self ._deserialize
156- )
157- self .sql_script = SqlScriptOperations (
158- self ._client , self ._config , self ._serialize , self ._deserialize
159- )
160- self .trigger = TriggerOperations (
161- self ._client , self ._config , self ._serialize , self ._deserialize
162- )
163- self .trigger_run = TriggerRunOperations (
164- self ._client , self ._config , self ._serialize , self ._deserialize
165- )
166- self .workspace = WorkspaceOperations (
167- self ._client , self ._config , self ._serialize , self ._deserialize
168- )
169-
149+ self .sql_pools = SqlPoolsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
150+ self .sql_script = SqlScriptOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
151+ self .trigger = TriggerOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
152+ self .trigger_run = TriggerRunOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
153+ self .workspace = WorkspaceOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
170154
171- def _send_request (
172- self ,
173- request : HttpRequest ,
174- ** kwargs : Any
175- ) -> HttpResponse :
155+ def _send_request (self , request : HttpRequest , ** kwargs : Any ) -> HttpResponse :
176156 """Runs the network request through the client's chained policies.
177157
178158 >>> from azure.core.rest import HttpRequest
@@ -181,7 +161,7 @@ def _send_request(
181161 >>> response = client._send_request(request)
182162 <HttpResponse: 200 OK>
183163
184- For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart
164+ For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/ python/send_request
185165
186166 :param request: The network request you want to make. Required.
187167 :type request: ~azure.core.rest.HttpRequest
@@ -192,7 +172,7 @@ def _send_request(
192172
193173 request_copy = deepcopy (request )
194174 path_format_arguments = {
195- "endpoint" : self ._serialize .url ("self._config.endpoint" , self ._config .endpoint , ' str' , skip_quote = True ),
175+ "endpoint" : self ._serialize .url ("self._config.endpoint" , self ._config .endpoint , " str" , skip_quote = True ),
196176 }
197177
198178 request_copy .url = self ._client .format_url (request_copy .url , ** path_format_arguments )
0 commit comments