1
+ # pylint: disable=too-many-lines
1
2
# coding=utf-8
2
3
# --------------------------------------------------------------------------
3
4
# Copyright (c) Microsoft Corporation. All rights reserved.
4
5
# Licensed under the MIT License. See License.txt in the project root for license information.
5
6
# Code generated by Microsoft (R) AutoRest Code Generator.
6
7
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
8
# --------------------------------------------------------------------------
8
- import functools
9
- from typing import Any , AsyncIterable , Callable , Dict , Generic , Optional , TypeVar , Union
10
- import warnings
9
+ from typing import Any , AsyncIterable , Callable , Dict , Optional , TypeVar
11
10
12
11
from azure .core .async_paging import AsyncItemPaged , AsyncList
13
12
from azure .core .exceptions import ClientAuthenticationError , HttpResponseError , ResourceExistsError , ResourceNotFoundError , map_error
@@ -77,6 +76,8 @@ def list(
77
76
~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.BatchJobResourceArmPaginatedResult]
78
77
:raises: ~azure.core.exceptions.HttpResponseError
79
78
"""
79
+ api_version = kwargs .pop ('api_version' , "2020-09-01-dataplanepreview" ) # type: str
80
+
80
81
cls = kwargs .pop ('cls' , None ) # type: ClsType["_models.BatchJobResourceArmPaginatedResult"]
81
82
error_map = {
82
83
401 : ClientAuthenticationError , 404 : ResourceNotFoundError , 409 : ResourceExistsError
@@ -91,6 +92,7 @@ def prepare_request(next_link=None):
91
92
subscription_id = self ._config .subscription_id ,
92
93
resource_group_name = resource_group_name ,
93
94
workspace_name = workspace_name ,
95
+ api_version = api_version ,
94
96
skiptoken = skiptoken ,
95
97
template_url = self .list .metadata ['url' ],
96
98
)
@@ -105,6 +107,7 @@ def prepare_request(next_link=None):
105
107
subscription_id = self ._config .subscription_id ,
106
108
resource_group_name = resource_group_name ,
107
109
workspace_name = workspace_name ,
110
+ api_version = api_version ,
108
111
skiptoken = skiptoken ,
109
112
template_url = next_link ,
110
113
)
@@ -123,7 +126,11 @@ async def extract_data(pipeline_response):
123
126
async def get_next (next_link = None ):
124
127
request = prepare_request (next_link )
125
128
126
- pipeline_response = await self ._client ._pipeline .run (request , stream = False , ** kwargs )
129
+ pipeline_response = await self ._client ._pipeline .run ( # pylint: disable=protected-access
130
+ request ,
131
+ stream = False ,
132
+ ** kwargs
133
+ )
127
134
response = pipeline_response .http_response
128
135
129
136
if response .status_code not in [200 ]:
@@ -137,7 +144,7 @@ async def get_next(next_link=None):
137
144
return AsyncItemPaged (
138
145
get_next , extract_data
139
146
)
140
- list .metadata = {'url' : ' /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}/jobs' } # type: ignore
147
+ list .metadata = {'url' : " /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}/jobs" } # type: ignore
141
148
142
149
@distributed_trace_async
143
150
async def create (
@@ -174,6 +181,7 @@ async def create(
174
181
}
175
182
error_map .update (kwargs .pop ('error_map' , {}))
176
183
184
+ api_version = kwargs .pop ('api_version' , "2020-09-01-dataplanepreview" ) # type: str
177
185
content_type = kwargs .pop ('content_type' , "application/json" ) # type: Optional[str]
178
186
179
187
_json = self ._serialize .body (body , 'BatchJobResource' )
@@ -184,14 +192,19 @@ async def create(
184
192
subscription_id = self ._config .subscription_id ,
185
193
resource_group_name = resource_group_name ,
186
194
workspace_name = workspace_name ,
195
+ api_version = api_version ,
187
196
content_type = content_type ,
188
197
json = _json ,
189
198
template_url = self .create .metadata ['url' ],
190
199
)
191
200
request = _convert_request (request )
192
201
request .url = self ._client .format_url (request .url )
193
202
194
- pipeline_response = await self ._client ._pipeline .run (request , stream = False , ** kwargs )
203
+ pipeline_response = await self ._client ._pipeline .run ( # pylint: disable=protected-access
204
+ request ,
205
+ stream = False ,
206
+ ** kwargs
207
+ )
195
208
response = pipeline_response .http_response
196
209
197
210
if response .status_code not in [200 , 201 ]:
@@ -210,7 +223,7 @@ async def create(
210
223
211
224
return deserialized
212
225
213
- create .metadata = {'url' : ' /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}/jobs' } # type: ignore
226
+ create .metadata = {'url' : " /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}/jobs" } # type: ignore
214
227
215
228
216
229
@distributed_trace_async
@@ -248,6 +261,8 @@ async def get(
248
261
}
249
262
error_map .update (kwargs .pop ('error_map' , {}))
250
263
264
+ api_version = kwargs .pop ('api_version' , "2020-09-01-dataplanepreview" ) # type: str
265
+
251
266
252
267
request = build_get_request (
253
268
endpoint_name = endpoint_name ,
@@ -256,12 +271,17 @@ async def get(
256
271
subscription_id = self ._config .subscription_id ,
257
272
resource_group_name = resource_group_name ,
258
273
workspace_name = workspace_name ,
274
+ api_version = api_version ,
259
275
template_url = self .get .metadata ['url' ],
260
276
)
261
277
request = _convert_request (request )
262
278
request .url = self ._client .format_url (request .url )
263
279
264
- pipeline_response = await self ._client ._pipeline .run (request , stream = False , ** kwargs )
280
+ pipeline_response = await self ._client ._pipeline .run ( # pylint: disable=protected-access
281
+ request ,
282
+ stream = False ,
283
+ ** kwargs
284
+ )
265
285
response = pipeline_response .http_response
266
286
267
287
if response .status_code not in [200 ]:
@@ -276,5 +296,5 @@ async def get(
276
296
277
297
return deserialized
278
298
279
- get .metadata = {'url' : ' /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}/jobs/{id}' } # type: ignore
299
+ get .metadata = {'url' : " /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}/jobs/{id}" } # type: ignore
280
300
0 commit comments