|
1 | | -# pylint: disable=too-many-lines |
| 1 | +# pylint: disable=line-too-long,useless-suppression,too-many-lines |
2 | 2 | # coding=utf-8 |
3 | 3 | # -------------------------------------------------------------------------- |
4 | 4 | # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.4, generator: @autorest/python@6.34.2) |
|
39 | 39 | build_config_serve_config_request, |
40 | 40 | build_jobs_add_heartbeat_request, |
41 | 41 | build_jobs_assign_sandbox_to_job_request, |
| 42 | + build_jobs_get_input_data_request, |
| 43 | + build_jobs_get_job_heartbeat_info_request, |
| 44 | + build_jobs_get_job_jdl_request, |
| 45 | + build_jobs_get_job_parameters_request, |
42 | 46 | build_jobs_get_job_sandbox_request, |
43 | 47 | build_jobs_get_job_sandboxes_request, |
44 | 48 | build_jobs_get_sandbox_file_request, |
@@ -2207,6 +2211,232 @@ async def summary(self, body: Union[_models.SummaryParams, IO[bytes]], **kwargs: |
2207 | 2211 |
|
2208 | 2212 | return deserialized # type: ignore |
2209 | 2213 |
|
| 2214 | + @distributed_trace_async |
| 2215 | + async def get_input_data(self, job_id: int, **kwargs: Any) -> List[Dict[str, Any]]: |
| 2216 | + """Get Input Data. |
| 2217 | +
|
| 2218 | + Fetches a job's input data. |
| 2219 | +
|
| 2220 | + :param job_id: Required. |
| 2221 | + :type job_id: int |
| 2222 | + :return: list of dict mapping str to any |
| 2223 | + :rtype: list[dict[str, any]] |
| 2224 | + :raises ~azure.core.exceptions.HttpResponseError: |
| 2225 | + """ |
| 2226 | + error_map: MutableMapping = { |
| 2227 | + 401: ClientAuthenticationError, |
| 2228 | + 404: ResourceNotFoundError, |
| 2229 | + 409: ResourceExistsError, |
| 2230 | + 304: ResourceNotModifiedError, |
| 2231 | + } |
| 2232 | + error_map.update(kwargs.pop("error_map", {}) or {}) |
| 2233 | + |
| 2234 | + _headers = kwargs.pop("headers", {}) or {} |
| 2235 | + _params = kwargs.pop("params", {}) or {} |
| 2236 | + |
| 2237 | + cls: ClsType[List[Dict[str, Any]]] = kwargs.pop("cls", None) |
| 2238 | + |
| 2239 | + _request = build_jobs_get_input_data_request( |
| 2240 | + job_id=job_id, |
| 2241 | + headers=_headers, |
| 2242 | + params=_params, |
| 2243 | + ) |
| 2244 | + _request.url = self._client.format_url(_request.url) |
| 2245 | + |
| 2246 | + _stream = False |
| 2247 | + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access |
| 2248 | + _request, stream=_stream, **kwargs |
| 2249 | + ) |
| 2250 | + |
| 2251 | + response = pipeline_response.http_response |
| 2252 | + |
| 2253 | + if response.status_code not in [200]: |
| 2254 | + map_error(status_code=response.status_code, response=response, error_map=error_map) |
| 2255 | + raise HttpResponseError(response=response) |
| 2256 | + |
| 2257 | + deserialized = self._deserialize("[{object}]", pipeline_response.http_response) |
| 2258 | + |
| 2259 | + if cls: |
| 2260 | + return cls(pipeline_response, deserialized, {}) # type: ignore |
| 2261 | + |
| 2262 | + return deserialized # type: ignore |
| 2263 | + |
| 2264 | + @distributed_trace_async |
| 2265 | + async def get_job_parameters(self, job_id: int, **kwargs: Any) -> List[Dict[str, Any]]: |
| 2266 | + """Get Job Parameters. |
| 2267 | +
|
| 2268 | + Get job parameters. |
| 2269 | +
|
| 2270 | + :param job_id: Required. |
| 2271 | + :type job_id: int |
| 2272 | + :return: list of dict mapping str to any |
| 2273 | + :rtype: list[dict[str, any]] |
| 2274 | + :raises ~azure.core.exceptions.HttpResponseError: |
| 2275 | + """ |
| 2276 | + error_map: MutableMapping = { |
| 2277 | + 401: ClientAuthenticationError, |
| 2278 | + 404: ResourceNotFoundError, |
| 2279 | + 409: ResourceExistsError, |
| 2280 | + 304: ResourceNotModifiedError, |
| 2281 | + } |
| 2282 | + error_map.update(kwargs.pop("error_map", {}) or {}) |
| 2283 | + |
| 2284 | + _headers = kwargs.pop("headers", {}) or {} |
| 2285 | + _params = kwargs.pop("params", {}) or {} |
| 2286 | + |
| 2287 | + cls: ClsType[List[Dict[str, Any]]] = kwargs.pop("cls", None) |
| 2288 | + |
| 2289 | + _request = build_jobs_get_job_parameters_request( |
| 2290 | + job_id=job_id, |
| 2291 | + headers=_headers, |
| 2292 | + params=_params, |
| 2293 | + ) |
| 2294 | + _request.url = self._client.format_url(_request.url) |
| 2295 | + |
| 2296 | + _stream = False |
| 2297 | + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access |
| 2298 | + _request, stream=_stream, **kwargs |
| 2299 | + ) |
| 2300 | + |
| 2301 | + response = pipeline_response.http_response |
| 2302 | + |
| 2303 | + if response.status_code not in [200]: |
| 2304 | + map_error(status_code=response.status_code, response=response, error_map=error_map) |
| 2305 | + raise HttpResponseError(response=response) |
| 2306 | + |
| 2307 | + deserialized = self._deserialize("[{object}]", pipeline_response.http_response) |
| 2308 | + |
| 2309 | + if cls: |
| 2310 | + return cls(pipeline_response, deserialized, {}) # type: ignore |
| 2311 | + |
| 2312 | + return deserialized # type: ignore |
| 2313 | + |
| 2314 | + @distributed_trace_async |
| 2315 | + async def get_job_jdl( |
| 2316 | + self, job_id: int, **kwargs: Any |
| 2317 | + ) -> Dict[str, _models.PathsZ91EtjApiJobsJobIdJdlGetResponses200ContentApplicationJsonSchemaAdditionalproperties]: |
| 2318 | + """Get Job Jdl. |
| 2319 | +
|
| 2320 | + Get job JDLs. |
| 2321 | +
|
| 2322 | + :param job_id: Required. |
| 2323 | + :type job_id: int |
| 2324 | + :return: dict mapping str to |
| 2325 | + PathsZ91EtjApiJobsJobIdJdlGetResponses200ContentApplicationJsonSchemaAdditionalproperties |
| 2326 | + :rtype: dict[str, |
| 2327 | + ~_generated.models.PathsZ91EtjApiJobsJobIdJdlGetResponses200ContentApplicationJsonSchemaAdditionalproperties] |
| 2328 | + :raises ~azure.core.exceptions.HttpResponseError: |
| 2329 | + """ |
| 2330 | + error_map: MutableMapping = { |
| 2331 | + 401: ClientAuthenticationError, |
| 2332 | + 404: ResourceNotFoundError, |
| 2333 | + 409: ResourceExistsError, |
| 2334 | + 304: ResourceNotModifiedError, |
| 2335 | + } |
| 2336 | + error_map.update(kwargs.pop("error_map", {}) or {}) |
| 2337 | + |
| 2338 | + _headers = kwargs.pop("headers", {}) or {} |
| 2339 | + _params = kwargs.pop("params", {}) or {} |
| 2340 | + |
| 2341 | + cls: ClsType[ |
| 2342 | + Dict[str, _models.PathsZ91EtjApiJobsJobIdJdlGetResponses200ContentApplicationJsonSchemaAdditionalproperties] |
| 2343 | + ] = kwargs.pop("cls", None) |
| 2344 | + |
| 2345 | + _request = build_jobs_get_job_jdl_request( |
| 2346 | + job_id=job_id, |
| 2347 | + headers=_headers, |
| 2348 | + params=_params, |
| 2349 | + ) |
| 2350 | + _request.url = self._client.format_url(_request.url) |
| 2351 | + |
| 2352 | + _stream = False |
| 2353 | + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access |
| 2354 | + _request, stream=_stream, **kwargs |
| 2355 | + ) |
| 2356 | + |
| 2357 | + response = pipeline_response.http_response |
| 2358 | + |
| 2359 | + if response.status_code not in [200]: |
| 2360 | + map_error(status_code=response.status_code, response=response, error_map=error_map) |
| 2361 | + raise HttpResponseError(response=response) |
| 2362 | + |
| 2363 | + deserialized = self._deserialize( |
| 2364 | + "{PathsZ91EtjApiJobsJobIdJdlGetResponses200ContentApplicationJsonSchemaAdditionalproperties}", |
| 2365 | + pipeline_response.http_response, |
| 2366 | + ) |
| 2367 | + |
| 2368 | + if cls: |
| 2369 | + return cls(pipeline_response, deserialized, {}) # type: ignore |
| 2370 | + |
| 2371 | + return deserialized # type: ignore |
| 2372 | + |
| 2373 | + @distributed_trace_async |
| 2374 | + async def get_job_heartbeat_info(self, job_id: int, **kwargs: Any) -> List[ |
| 2375 | + Dict[ |
| 2376 | + str, |
| 2377 | + _models.PathsLs6HcyApiJobsJobIdHeartbeatGetResponses200ContentApplicationJsonSchemaItemsAdditionalproperties, |
| 2378 | + ] |
| 2379 | + ]: |
| 2380 | + """Get Job Heartbeat Info. |
| 2381 | +
|
| 2382 | + Get job heartbeat info. |
| 2383 | +
|
| 2384 | + :param job_id: Required. |
| 2385 | + :type job_id: int |
| 2386 | + :return: list of dict mapping str to |
| 2387 | + PathsLs6HcyApiJobsJobIdHeartbeatGetResponses200ContentApplicationJsonSchemaItemsAdditionalproperties |
| 2388 | + :rtype: list[dict[str, |
| 2389 | + ~_generated.models.PathsLs6HcyApiJobsJobIdHeartbeatGetResponses200ContentApplicationJsonSchemaItemsAdditionalproperties]] |
| 2390 | + :raises ~azure.core.exceptions.HttpResponseError: |
| 2391 | + """ |
| 2392 | + error_map: MutableMapping = { |
| 2393 | + 401: ClientAuthenticationError, |
| 2394 | + 404: ResourceNotFoundError, |
| 2395 | + 409: ResourceExistsError, |
| 2396 | + 304: ResourceNotModifiedError, |
| 2397 | + } |
| 2398 | + error_map.update(kwargs.pop("error_map", {}) or {}) |
| 2399 | + |
| 2400 | + _headers = kwargs.pop("headers", {}) or {} |
| 2401 | + _params = kwargs.pop("params", {}) or {} |
| 2402 | + |
| 2403 | + cls: ClsType[ |
| 2404 | + List[ |
| 2405 | + Dict[ |
| 2406 | + str, |
| 2407 | + _models.PathsLs6HcyApiJobsJobIdHeartbeatGetResponses200ContentApplicationJsonSchemaItemsAdditionalproperties, |
| 2408 | + ] |
| 2409 | + ] |
| 2410 | + ] = kwargs.pop("cls", None) |
| 2411 | + |
| 2412 | + _request = build_jobs_get_job_heartbeat_info_request( |
| 2413 | + job_id=job_id, |
| 2414 | + headers=_headers, |
| 2415 | + params=_params, |
| 2416 | + ) |
| 2417 | + _request.url = self._client.format_url(_request.url) |
| 2418 | + |
| 2419 | + _stream = False |
| 2420 | + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access |
| 2421 | + _request, stream=_stream, **kwargs |
| 2422 | + ) |
| 2423 | + |
| 2424 | + response = pipeline_response.http_response |
| 2425 | + |
| 2426 | + if response.status_code not in [200]: |
| 2427 | + map_error(status_code=response.status_code, response=response, error_map=error_map) |
| 2428 | + raise HttpResponseError(response=response) |
| 2429 | + |
| 2430 | + deserialized = self._deserialize( |
| 2431 | + "[{PathsLs6HcyApiJobsJobIdHeartbeatGetResponses200ContentApplicationJsonSchemaItemsAdditionalproperties}]", |
| 2432 | + pipeline_response.http_response, |
| 2433 | + ) |
| 2434 | + |
| 2435 | + if cls: |
| 2436 | + return cls(pipeline_response, deserialized, {}) # type: ignore |
| 2437 | + |
| 2438 | + return deserialized # type: ignore |
| 2439 | + |
2210 | 2440 | @overload |
2211 | 2441 | async def submit_jdl_jobs( |
2212 | 2442 | self, body: List[str], *, content_type: str = "application/json", **kwargs: Any |
|
0 commit comments