|
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/[email protected]) |
|
40 | 40 | build_config_serve_config_request, |
41 | 41 | build_jobs_add_heartbeat_request, |
42 | 42 | build_jobs_assign_sandbox_to_job_request, |
| 43 | + build_jobs_get_input_data_request, |
| 44 | + build_jobs_get_job_heartbeat_info_request, |
| 45 | + build_jobs_get_job_jdl_request, |
| 46 | + build_jobs_get_job_parameters_request, |
43 | 47 | build_jobs_get_job_sandbox_request, |
44 | 48 | build_jobs_get_job_sandboxes_request, |
45 | 49 | build_jobs_get_sandbox_file_request, |
@@ -2260,6 +2264,232 @@ async def summary(self, body: Union[_models.SummaryParams, IO[bytes]], **kwargs: |
2260 | 2264 |
|
2261 | 2265 | return deserialized # type: ignore |
2262 | 2266 |
|
| 2267 | + @distributed_trace_async |
| 2268 | + async def get_input_data(self, job_id: int, **kwargs: Any) -> List[Dict[str, Any]]: |
| 2269 | + """Get Input Data. |
| 2270 | +
|
| 2271 | + Fetches a job's input data. |
| 2272 | +
|
| 2273 | + :param job_id: Required. |
| 2274 | + :type job_id: int |
| 2275 | + :return: list of dict mapping str to any |
| 2276 | + :rtype: list[dict[str, any]] |
| 2277 | + :raises ~azure.core.exceptions.HttpResponseError: |
| 2278 | + """ |
| 2279 | + error_map: MutableMapping = { |
| 2280 | + 401: ClientAuthenticationError, |
| 2281 | + 404: ResourceNotFoundError, |
| 2282 | + 409: ResourceExistsError, |
| 2283 | + 304: ResourceNotModifiedError, |
| 2284 | + } |
| 2285 | + error_map.update(kwargs.pop("error_map", {}) or {}) |
| 2286 | + |
| 2287 | + _headers = kwargs.pop("headers", {}) or {} |
| 2288 | + _params = kwargs.pop("params", {}) or {} |
| 2289 | + |
| 2290 | + cls: ClsType[List[Dict[str, Any]]] = kwargs.pop("cls", None) |
| 2291 | + |
| 2292 | + _request = build_jobs_get_input_data_request( |
| 2293 | + job_id=job_id, |
| 2294 | + headers=_headers, |
| 2295 | + params=_params, |
| 2296 | + ) |
| 2297 | + _request.url = self._client.format_url(_request.url) |
| 2298 | + |
| 2299 | + _stream = False |
| 2300 | + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access |
| 2301 | + _request, stream=_stream, **kwargs |
| 2302 | + ) |
| 2303 | + |
| 2304 | + response = pipeline_response.http_response |
| 2305 | + |
| 2306 | + if response.status_code not in [200]: |
| 2307 | + map_error(status_code=response.status_code, response=response, error_map=error_map) |
| 2308 | + raise HttpResponseError(response=response) |
| 2309 | + |
| 2310 | + deserialized = self._deserialize("[{object}]", pipeline_response.http_response) |
| 2311 | + |
| 2312 | + if cls: |
| 2313 | + return cls(pipeline_response, deserialized, {}) # type: ignore |
| 2314 | + |
| 2315 | + return deserialized # type: ignore |
| 2316 | + |
| 2317 | + @distributed_trace_async |
| 2318 | + async def get_job_parameters(self, job_id: int, **kwargs: Any) -> List[Dict[str, Any]]: |
| 2319 | + """Get Job Parameters. |
| 2320 | +
|
| 2321 | + Get job parameters. |
| 2322 | +
|
| 2323 | + :param job_id: Required. |
| 2324 | + :type job_id: int |
| 2325 | + :return: list of dict mapping str to any |
| 2326 | + :rtype: list[dict[str, any]] |
| 2327 | + :raises ~azure.core.exceptions.HttpResponseError: |
| 2328 | + """ |
| 2329 | + error_map: MutableMapping = { |
| 2330 | + 401: ClientAuthenticationError, |
| 2331 | + 404: ResourceNotFoundError, |
| 2332 | + 409: ResourceExistsError, |
| 2333 | + 304: ResourceNotModifiedError, |
| 2334 | + } |
| 2335 | + error_map.update(kwargs.pop("error_map", {}) or {}) |
| 2336 | + |
| 2337 | + _headers = kwargs.pop("headers", {}) or {} |
| 2338 | + _params = kwargs.pop("params", {}) or {} |
| 2339 | + |
| 2340 | + cls: ClsType[List[Dict[str, Any]]] = kwargs.pop("cls", None) |
| 2341 | + |
| 2342 | + _request = build_jobs_get_job_parameters_request( |
| 2343 | + job_id=job_id, |
| 2344 | + headers=_headers, |
| 2345 | + params=_params, |
| 2346 | + ) |
| 2347 | + _request.url = self._client.format_url(_request.url) |
| 2348 | + |
| 2349 | + _stream = False |
| 2350 | + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access |
| 2351 | + _request, stream=_stream, **kwargs |
| 2352 | + ) |
| 2353 | + |
| 2354 | + response = pipeline_response.http_response |
| 2355 | + |
| 2356 | + if response.status_code not in [200]: |
| 2357 | + map_error(status_code=response.status_code, response=response, error_map=error_map) |
| 2358 | + raise HttpResponseError(response=response) |
| 2359 | + |
| 2360 | + deserialized = self._deserialize("[{object}]", pipeline_response.http_response) |
| 2361 | + |
| 2362 | + if cls: |
| 2363 | + return cls(pipeline_response, deserialized, {}) # type: ignore |
| 2364 | + |
| 2365 | + return deserialized # type: ignore |
| 2366 | + |
| 2367 | + @distributed_trace_async |
| 2368 | + async def get_job_jdl( |
| 2369 | + self, job_id: int, **kwargs: Any |
| 2370 | + ) -> Dict[str, _models.PathsZ91EtjApiJobsJobIdJdlGetResponses200ContentApplicationJsonSchemaAdditionalproperties]: |
| 2371 | + """Get Job Jdl. |
| 2372 | +
|
| 2373 | + Get job JDLs. |
| 2374 | +
|
| 2375 | + :param job_id: Required. |
| 2376 | + :type job_id: int |
| 2377 | + :return: dict mapping str to |
| 2378 | + PathsZ91EtjApiJobsJobIdJdlGetResponses200ContentApplicationJsonSchemaAdditionalproperties |
| 2379 | + :rtype: dict[str, |
| 2380 | + ~_generated.models.PathsZ91EtjApiJobsJobIdJdlGetResponses200ContentApplicationJsonSchemaAdditionalproperties] |
| 2381 | + :raises ~azure.core.exceptions.HttpResponseError: |
| 2382 | + """ |
| 2383 | + error_map: MutableMapping = { |
| 2384 | + 401: ClientAuthenticationError, |
| 2385 | + 404: ResourceNotFoundError, |
| 2386 | + 409: ResourceExistsError, |
| 2387 | + 304: ResourceNotModifiedError, |
| 2388 | + } |
| 2389 | + error_map.update(kwargs.pop("error_map", {}) or {}) |
| 2390 | + |
| 2391 | + _headers = kwargs.pop("headers", {}) or {} |
| 2392 | + _params = kwargs.pop("params", {}) or {} |
| 2393 | + |
| 2394 | + cls: ClsType[ |
| 2395 | + Dict[str, _models.PathsZ91EtjApiJobsJobIdJdlGetResponses200ContentApplicationJsonSchemaAdditionalproperties] |
| 2396 | + ] = kwargs.pop("cls", None) |
| 2397 | + |
| 2398 | + _request = build_jobs_get_job_jdl_request( |
| 2399 | + job_id=job_id, |
| 2400 | + headers=_headers, |
| 2401 | + params=_params, |
| 2402 | + ) |
| 2403 | + _request.url = self._client.format_url(_request.url) |
| 2404 | + |
| 2405 | + _stream = False |
| 2406 | + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access |
| 2407 | + _request, stream=_stream, **kwargs |
| 2408 | + ) |
| 2409 | + |
| 2410 | + response = pipeline_response.http_response |
| 2411 | + |
| 2412 | + if response.status_code not in [200]: |
| 2413 | + map_error(status_code=response.status_code, response=response, error_map=error_map) |
| 2414 | + raise HttpResponseError(response=response) |
| 2415 | + |
| 2416 | + deserialized = self._deserialize( |
| 2417 | + "{PathsZ91EtjApiJobsJobIdJdlGetResponses200ContentApplicationJsonSchemaAdditionalproperties}", |
| 2418 | + pipeline_response.http_response, |
| 2419 | + ) |
| 2420 | + |
| 2421 | + if cls: |
| 2422 | + return cls(pipeline_response, deserialized, {}) # type: ignore |
| 2423 | + |
| 2424 | + return deserialized # type: ignore |
| 2425 | + |
| 2426 | + @distributed_trace_async |
| 2427 | + async def get_job_heartbeat_info(self, job_id: int, **kwargs: Any) -> List[ |
| 2428 | + Dict[ |
| 2429 | + str, |
| 2430 | + _models.PathsLs6HcyApiJobsJobIdHeartbeatGetResponses200ContentApplicationJsonSchemaItemsAdditionalproperties, |
| 2431 | + ] |
| 2432 | + ]: |
| 2433 | + """Get Job Heartbeat Info. |
| 2434 | +
|
| 2435 | + Get job heartbeat info. |
| 2436 | +
|
| 2437 | + :param job_id: Required. |
| 2438 | + :type job_id: int |
| 2439 | + :return: list of dict mapping str to |
| 2440 | + PathsLs6HcyApiJobsJobIdHeartbeatGetResponses200ContentApplicationJsonSchemaItemsAdditionalproperties |
| 2441 | + :rtype: list[dict[str, |
| 2442 | + ~_generated.models.PathsLs6HcyApiJobsJobIdHeartbeatGetResponses200ContentApplicationJsonSchemaItemsAdditionalproperties]] |
| 2443 | + :raises ~azure.core.exceptions.HttpResponseError: |
| 2444 | + """ |
| 2445 | + error_map: MutableMapping = { |
| 2446 | + 401: ClientAuthenticationError, |
| 2447 | + 404: ResourceNotFoundError, |
| 2448 | + 409: ResourceExistsError, |
| 2449 | + 304: ResourceNotModifiedError, |
| 2450 | + } |
| 2451 | + error_map.update(kwargs.pop("error_map", {}) or {}) |
| 2452 | + |
| 2453 | + _headers = kwargs.pop("headers", {}) or {} |
| 2454 | + _params = kwargs.pop("params", {}) or {} |
| 2455 | + |
| 2456 | + cls: ClsType[ |
| 2457 | + List[ |
| 2458 | + Dict[ |
| 2459 | + str, |
| 2460 | + _models.PathsLs6HcyApiJobsJobIdHeartbeatGetResponses200ContentApplicationJsonSchemaItemsAdditionalproperties, |
| 2461 | + ] |
| 2462 | + ] |
| 2463 | + ] = kwargs.pop("cls", None) |
| 2464 | + |
| 2465 | + _request = build_jobs_get_job_heartbeat_info_request( |
| 2466 | + job_id=job_id, |
| 2467 | + headers=_headers, |
| 2468 | + params=_params, |
| 2469 | + ) |
| 2470 | + _request.url = self._client.format_url(_request.url) |
| 2471 | + |
| 2472 | + _stream = False |
| 2473 | + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access |
| 2474 | + _request, stream=_stream, **kwargs |
| 2475 | + ) |
| 2476 | + |
| 2477 | + response = pipeline_response.http_response |
| 2478 | + |
| 2479 | + if response.status_code not in [200]: |
| 2480 | + map_error(status_code=response.status_code, response=response, error_map=error_map) |
| 2481 | + raise HttpResponseError(response=response) |
| 2482 | + |
| 2483 | + deserialized = self._deserialize( |
| 2484 | + "[{PathsLs6HcyApiJobsJobIdHeartbeatGetResponses200ContentApplicationJsonSchemaItemsAdditionalproperties}]", |
| 2485 | + pipeline_response.http_response, |
| 2486 | + ) |
| 2487 | + |
| 2488 | + if cls: |
| 2489 | + return cls(pipeline_response, deserialized, {}) # type: ignore |
| 2490 | + |
| 2491 | + return deserialized # type: ignore |
| 2492 | + |
2263 | 2493 | @overload |
2264 | 2494 | async def submit_jdl_jobs( |
2265 | 2495 | self, body: List[str], *, content_type: str = "application/json", **kwargs: Any |
|
0 commit comments