Skip to content

Commit

Permalink
Update doc for remove bulk
Browse files Browse the repository at this point in the history
Regenerated REST client with autorest
  • Loading branch information
ryuwd committed Dec 16, 2024
1 parent 3f8f8fe commit f959cdc
Show file tree
Hide file tree
Showing 4 changed files with 215 additions and 211 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
build_auth_userinfo_request,
build_config_serve_config_request,
build_jobs_assign_sandbox_to_job_request,
build_jobs_delete_bulk_jobs_request,
build_jobs_delete_single_job_request,
build_jobs_get_job_sandbox_request,
build_jobs_get_job_sandboxes_request,
build_jobs_get_job_status_bulk_request,
Expand All @@ -47,8 +45,6 @@
build_jobs_get_single_job_status_history_request,
build_jobs_get_single_job_status_request,
build_jobs_initiate_sandbox_upload_request,
build_jobs_kill_bulk_jobs_request,
build_jobs_kill_single_job_request,
build_jobs_remove_bulk_jobs_request,
build_jobs_remove_single_job_request,
build_jobs_reschedule_bulk_jobs_request,
Expand Down Expand Up @@ -1529,16 +1525,31 @@ async def submit_bulk_jdl_jobs(

return deserialized # type: ignore

@distributed_trace_async
async def delete_bulk_jobs(self, *, job_ids: List[int], **kwargs: Any) -> Any:
"""Delete Bulk Jobs.
@overload
async def set_single_job_status(
self,
job_id: int,
body: Dict[str, _models.JobStatusUpdate],
*,
force: bool = False,
content_type: str = "application/json",
**kwargs: Any,
) -> Dict[str, _models.SetJobStatusReturn]:
"""Set Single Job Status.
Delete Bulk Jobs.
Set Single Job Status.
:keyword job_ids: Required.
:paramtype job_ids: list[int]
:return: any
:rtype: any
:param job_id: Required.
:type job_id: int
:param body: Required.
:type body: dict[str, ~client.models.JobStatusUpdate]
:keyword force: Default value is False.
:paramtype force: bool
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
:return: dict mapping str to SetJobStatusReturn
:rtype: dict[str, ~client.models.SetJobStatusReturn]
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map: MutableMapping = {
Expand All @@ -1549,13 +1560,28 @@ async def delete_bulk_jobs(self, *, job_ids: List[int], **kwargs: Any) -> Any:
}
error_map.update(kwargs.pop("error_map", {}) or {})

_headers = kwargs.pop("headers", {}) or {}
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = kwargs.pop("params", {}) or {}

cls: ClsType[Any] = kwargs.pop("cls", None)
content_type: Optional[str] = kwargs.pop(
"content_type", _headers.pop("Content-Type", None)
)
cls: ClsType[Dict[str, _models.SetJobStatusReturn]] = kwargs.pop("cls", None)

_request = build_jobs_delete_bulk_jobs_request(
job_ids=job_ids,
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(body, (IOBase, bytes)):
_content = body
else:
_json = self._serialize.body(body, "{JobStatusUpdate}")

_request = build_jobs_set_single_job_status_request(
job_id=job_id,
force=force,
content_type=content_type,
json=_json,
content=_content,
headers=_headers,
params=_params,
)
Expand Down Expand Up @@ -1699,12 +1725,12 @@ async def remove_bulk_jobs(self, *, job_ids: List[int], **kwargs: Any) -> Any:
async def get_job_status_bulk(
self, *, job_ids: List[int], **kwargs: Any
) -> Dict[str, _models.LimitedJobStatusReturn]:
"""Get Job Status Bulk.
"""Get Single Job Status.
Get Job Status Bulk.
Get Single Job Status.
:keyword job_ids: Required.
:paramtype job_ids: list[int]
:param job_id: Required.
:type job_id: int
:return: dict mapping str to LimitedJobStatusReturn
:rtype: dict[str, ~generated.models.LimitedJobStatusReturn]
:raises ~azure.core.exceptions.HttpResponseError:
Expand All @@ -1724,8 +1750,8 @@ async def get_job_status_bulk(
"cls", None
)

_request = build_jobs_get_job_status_bulk_request(
job_ids=job_ids,
_request = build_jobs_get_single_job_status_request(
job_id=job_id,
headers=_headers,
params=_params,
)
Expand Down Expand Up @@ -1884,12 +1910,12 @@ async def set_job_status_bulk(
return deserialized # type: ignore

@distributed_trace_async
async def get_job_status_history_bulk(
async def get_job_status_bulk(
self, *, job_ids: List[int], **kwargs: Any
) -> Dict[str, List[_models.JobStatusReturn]]:
"""Get Job Status History Bulk.
) -> Dict[str, _models.LimitedJobStatusReturn]:
"""Get Job Status Bulk.
Get Job Status History Bulk.
Get Job Status Bulk.
:keyword job_ids: Required.
:paramtype job_ids: list[int]
Expand All @@ -1908,9 +1934,11 @@ async def get_job_status_history_bulk(
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}

cls: ClsType[Dict[str, List[_models.JobStatusReturn]]] = kwargs.pop("cls", None)
cls: ClsType[Dict[str, _models.LimitedJobStatusReturn]] = kwargs.pop(
"cls", None
)

_request = build_jobs_get_job_status_history_bulk_request(
_request = build_jobs_get_job_status_bulk_request(
job_ids=job_ids,
headers=_headers,
params=_params,
Expand Down Expand Up @@ -2310,15 +2338,17 @@ async def summary(
return deserialized # type: ignore

@distributed_trace_async
async def get_single_job(self, job_id: int, **kwargs: Any) -> Any:
"""Get Single Job.
async def get_job_status_history_bulk(
self, *, job_ids: List[int], **kwargs: Any
) -> Dict[str, List[_models.JobStatusReturn]]:
"""Get Job Status History Bulk.
Get Single Job.
Get Job Status History Bulk.
:param job_id: Required.
:type job_id: int
:return: any
:rtype: any
:keyword job_ids: Required.
:paramtype job_ids: list[int]
:return: dict mapping str to list of JobStatusReturn
:rtype: dict[str, list[~client.models.JobStatusReturn]]
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map: MutableMapping = {
Expand All @@ -2332,10 +2362,10 @@ async def get_single_job(self, job_id: int, **kwargs: Any) -> Any:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}

cls: ClsType[Any] = kwargs.pop("cls", None)
cls: ClsType[Dict[str, List[_models.JobStatusReturn]]] = kwargs.pop("cls", None)

_request = build_jobs_get_single_job_request(
job_id=job_id,
_request = build_jobs_get_job_status_history_bulk_request(
job_ids=job_ids,
headers=_headers,
params=_params,
)
Expand Down
Loading

0 comments on commit f959cdc

Please sign in to comment.