Skip to content

Commit

Permalink
Regenerated client
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuwd committed Feb 10, 2025
1 parent 46559f7 commit 7c260cc
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
build_jobs_get_job_sandboxes_request,
build_jobs_get_sandbox_file_request,
build_jobs_initiate_sandbox_upload_request,
build_jobs_patch_metadata_request,
build_jobs_remove_bulk_jobs_request,
build_jobs_reschedule_bulk_jobs_request,
build_jobs_search_request,
build_jobs_set_job_parameters_or_attributes_request,
build_jobs_set_job_statuses_request,
build_jobs_submit_bulk_jdl_jobs_request,
build_jobs_summary_request,
Expand Down Expand Up @@ -1683,57 +1683,57 @@ async def reschedule_bulk_jobs(
return deserialized # type: ignore

@overload
async def set_job_parameters_or_attributes(
async def patch_metadata(

Check warning on line 1686 in diracx-client/src/diracx/client/generated/aio/operations/_operations.py

View check run for this annotation

Codecov / codecov/patch

diracx-client/src/diracx/client/generated/aio/operations/_operations.py#L1685-L1686

Added lines #L1685 - L1686 were not covered by tests
self,
body: Dict[str, JSON],
*,
content_type: str = "application/json",
**kwargs: Any,
) -> Any:
"""Set Job Parameters Or Attributes.
) -> None:
"""Patch Metadata.
Set Job Parameters Or Attributes.
Patch Metadata.
:param body: Required.
:type body: dict[str, JSON]
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
:return: any
:rtype: any
:return: None
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""

@overload
async def set_job_parameters_or_attributes(
async def patch_metadata(

Check warning on line 1708 in diracx-client/src/diracx/client/generated/aio/operations/_operations.py

View check run for this annotation

Codecov / codecov/patch

diracx-client/src/diracx/client/generated/aio/operations/_operations.py#L1707-L1708

Added lines #L1707 - L1708 were not covered by tests
self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any
) -> Any:
"""Set Job Parameters Or Attributes.
) -> None:
"""Patch Metadata.
Set Job Parameters Or Attributes.
Patch Metadata.
:param body: Required.
:type body: IO[bytes]
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
Default value is "application/json".
:paramtype content_type: str
:return: any
:rtype: any
:return: None
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""

@distributed_trace_async
async def set_job_parameters_or_attributes(
async def patch_metadata(

Check warning on line 1726 in diracx-client/src/diracx/client/generated/aio/operations/_operations.py

View check run for this annotation

Codecov / codecov/patch

diracx-client/src/diracx/client/generated/aio/operations/_operations.py#L1725-L1726

Added lines #L1725 - L1726 were not covered by tests
self, body: Union[Dict[str, JSON], IO[bytes]], **kwargs: Any
) -> Any:
"""Set Job Parameters Or Attributes.
) -> None:
"""Patch Metadata.
Set Job Parameters Or Attributes.
Patch Metadata.
:param body: Is either a {str: JSON} type or a IO[bytes] type. Required.
:type body: dict[str, JSON] or IO[bytes]
:return: any
:rtype: any
:return: None
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map: MutableMapping = {

Check warning on line 1739 in diracx-client/src/diracx/client/generated/aio/operations/_operations.py

View check run for this annotation

Codecov / codecov/patch

diracx-client/src/diracx/client/generated/aio/operations/_operations.py#L1739

Added line #L1739 was not covered by tests
Expand All @@ -1750,7 +1750,7 @@ async def set_job_parameters_or_attributes(
content_type: Optional[str] = kwargs.pop(

Check warning on line 1750 in diracx-client/src/diracx/client/generated/aio/operations/_operations.py

View check run for this annotation

Codecov / codecov/patch

diracx-client/src/diracx/client/generated/aio/operations/_operations.py#L1750

Added line #L1750 was not covered by tests
"content_type", _headers.pop("Content-Type", None)
)
cls: ClsType[Any] = kwargs.pop("cls", None)
cls: ClsType[None] = kwargs.pop("cls", None)

Check warning on line 1753 in diracx-client/src/diracx/client/generated/aio/operations/_operations.py

View check run for this annotation

Codecov / codecov/patch

diracx-client/src/diracx/client/generated/aio/operations/_operations.py#L1753

Added line #L1753 was not covered by tests

content_type = content_type or "application/json"
_json = None
Expand All @@ -1760,7 +1760,7 @@ async def set_job_parameters_or_attributes(
else:
_json = self._serialize.body(body, "{object}")

Check warning on line 1761 in diracx-client/src/diracx/client/generated/aio/operations/_operations.py

View check run for this annotation

Codecov / codecov/patch

diracx-client/src/diracx/client/generated/aio/operations/_operations.py#L1761

Added line #L1761 was not covered by tests

_request = build_jobs_set_job_parameters_or_attributes_request(
_request = build_jobs_patch_metadata_request(

Check warning on line 1763 in diracx-client/src/diracx/client/generated/aio/operations/_operations.py

View check run for this annotation

Codecov / codecov/patch

diracx-client/src/diracx/client/generated/aio/operations/_operations.py#L1763

Added line #L1763 was not covered by tests
content_type=content_type,
json=_json,
content=_content,
Expand All @@ -1778,18 +1778,14 @@ async def set_job_parameters_or_attributes(

response = pipeline_response.http_response

Check warning on line 1779 in diracx-client/src/diracx/client/generated/aio/operations/_operations.py

View check run for this annotation

Codecov / codecov/patch

diracx-client/src/diracx/client/generated/aio/operations/_operations.py#L1779

Added line #L1779 was not covered by tests

if response.status_code not in [200]:
if response.status_code not in [204]:
map_error(

Check warning on line 1782 in diracx-client/src/diracx/client/generated/aio/operations/_operations.py

View check run for this annotation

Codecov / codecov/patch

diracx-client/src/diracx/client/generated/aio/operations/_operations.py#L1781-L1782

Added lines #L1781 - L1782 were not covered by tests
status_code=response.status_code, response=response, error_map=error_map
)
raise HttpResponseError(response=response)

Check warning on line 1785 in diracx-client/src/diracx/client/generated/aio/operations/_operations.py

View check run for this annotation

Codecov / codecov/patch

diracx-client/src/diracx/client/generated/aio/operations/_operations.py#L1785

Added line #L1785 was not covered by tests

deserialized = self._deserialize("object", pipeline_response.http_response)

if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore

return deserialized # type: ignore
return cls(pipeline_response, None, {}) # type: ignore

Check warning on line 1788 in diracx-client/src/diracx/client/generated/aio/operations/_operations.py

View check run for this annotation

Codecov / codecov/patch

diracx-client/src/diracx/client/generated/aio/operations/_operations.py#L1787-L1788

Added lines #L1787 - L1788 were not covered by tests

@overload
async def search(
Expand Down
55 changes: 23 additions & 32 deletions diracx-client/src/diracx/client/generated/operations/_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,16 +535,12 @@ def build_jobs_reschedule_bulk_jobs_request(
)


def build_jobs_set_job_parameters_or_attributes_request(
**kwargs: Any,
) -> HttpRequest: # pylint: disable=name-too-long
def build_jobs_patch_metadata_request(**kwargs: Any) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})

Check warning on line 539 in diracx-client/src/diracx/client/generated/operations/_operations.py

View check run for this annotation

Codecov / codecov/patch

diracx-client/src/diracx/client/generated/operations/_operations.py#L539

Added line #L539 was not covered by tests

content_type: Optional[str] = kwargs.pop(

Check warning on line 541 in diracx-client/src/diracx/client/generated/operations/_operations.py

View check run for this annotation

Codecov / codecov/patch

diracx-client/src/diracx/client/generated/operations/_operations.py#L541

Added line #L541 was not covered by tests
"content_type", _headers.pop("Content-Type", None)
)
accept = _headers.pop("Accept", "application/json")

# Construct URL
_url = "/api/jobs/metadata"

Check warning on line 545 in diracx-client/src/diracx/client/generated/operations/_operations.py

View check run for this annotation

Codecov / codecov/patch

diracx-client/src/diracx/client/generated/operations/_operations.py#L545

Added line #L545 was not covered by tests

Expand All @@ -553,7 +549,6 @@ def build_jobs_set_job_parameters_or_attributes_request(
_headers["Content-Type"] = _SERIALIZER.header(

Check warning on line 549 in diracx-client/src/diracx/client/generated/operations/_operations.py

View check run for this annotation

Codecov / codecov/patch

diracx-client/src/diracx/client/generated/operations/_operations.py#L548-L549

Added lines #L548 - L549 were not covered by tests
"content_type", content_type, "str"
)
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")

return HttpRequest(method="PATCH", url=_url, headers=_headers, **kwargs)

Check warning on line 553 in diracx-client/src/diracx/client/generated/operations/_operations.py

View check run for this annotation

Codecov / codecov/patch

diracx-client/src/diracx/client/generated/operations/_operations.py#L553

Added line #L553 was not covered by tests

Expand Down Expand Up @@ -2246,57 +2241,57 @@ def reschedule_bulk_jobs(
return deserialized # type: ignore

@overload
def set_job_parameters_or_attributes(
def patch_metadata(
self,
body: Dict[str, JSON],
*,
content_type: str = "application/json",
**kwargs: Any,
) -> Any:
"""Set Job Parameters Or Attributes.
) -> None:
"""Patch Metadata.
Set Job Parameters Or Attributes.
Patch Metadata.
:param body: Required.
:type body: dict[str, JSON]
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
:return: any
:rtype: any
:return: None
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""

@overload
def set_job_parameters_or_attributes(
def patch_metadata(
self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any
) -> Any:
"""Set Job Parameters Or Attributes.
) -> None:
"""Patch Metadata.
Set Job Parameters Or Attributes.
Patch Metadata.
:param body: Required.
:type body: IO[bytes]
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
Default value is "application/json".
:paramtype content_type: str
:return: any
:rtype: any
:return: None
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""

@distributed_trace
def set_job_parameters_or_attributes(
def patch_metadata( # pylint: disable=inconsistent-return-statements
self, body: Union[Dict[str, JSON], IO[bytes]], **kwargs: Any
) -> Any:
"""Set Job Parameters Or Attributes.
) -> None:
"""Patch Metadata.
Set Job Parameters Or Attributes.
Patch Metadata.
:param body: Is either a {str: JSON} type or a IO[bytes] type. Required.
:type body: dict[str, JSON] or IO[bytes]
:return: any
:rtype: any
:return: None
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map: MutableMapping = {

Check warning on line 2297 in diracx-client/src/diracx/client/generated/operations/_operations.py

View check run for this annotation

Codecov / codecov/patch

diracx-client/src/diracx/client/generated/operations/_operations.py#L2297

Added line #L2297 was not covered by tests
Expand All @@ -2313,7 +2308,7 @@ def set_job_parameters_or_attributes(
content_type: Optional[str] = kwargs.pop(

Check warning on line 2308 in diracx-client/src/diracx/client/generated/operations/_operations.py

View check run for this annotation

Codecov / codecov/patch

diracx-client/src/diracx/client/generated/operations/_operations.py#L2308

Added line #L2308 was not covered by tests
"content_type", _headers.pop("Content-Type", None)
)
cls: ClsType[Any] = kwargs.pop("cls", None)
cls: ClsType[None] = kwargs.pop("cls", None)

Check warning on line 2311 in diracx-client/src/diracx/client/generated/operations/_operations.py

View check run for this annotation

Codecov / codecov/patch

diracx-client/src/diracx/client/generated/operations/_operations.py#L2311

Added line #L2311 was not covered by tests

content_type = content_type or "application/json"
_json = None
Expand All @@ -2323,7 +2318,7 @@ def set_job_parameters_or_attributes(
else:
_json = self._serialize.body(body, "{object}")

Check warning on line 2319 in diracx-client/src/diracx/client/generated/operations/_operations.py

View check run for this annotation

Codecov / codecov/patch

diracx-client/src/diracx/client/generated/operations/_operations.py#L2319

Added line #L2319 was not covered by tests

_request = build_jobs_set_job_parameters_or_attributes_request(
_request = build_jobs_patch_metadata_request(

Check warning on line 2321 in diracx-client/src/diracx/client/generated/operations/_operations.py

View check run for this annotation

Codecov / codecov/patch

diracx-client/src/diracx/client/generated/operations/_operations.py#L2321

Added line #L2321 was not covered by tests
content_type=content_type,
json=_json,
content=_content,
Expand All @@ -2341,18 +2336,14 @@ def set_job_parameters_or_attributes(

response = pipeline_response.http_response

Check warning on line 2337 in diracx-client/src/diracx/client/generated/operations/_operations.py

View check run for this annotation

Codecov / codecov/patch

diracx-client/src/diracx/client/generated/operations/_operations.py#L2337

Added line #L2337 was not covered by tests

if response.status_code not in [200]:
if response.status_code not in [204]:
map_error(

Check warning on line 2340 in diracx-client/src/diracx/client/generated/operations/_operations.py

View check run for this annotation

Codecov / codecov/patch

diracx-client/src/diracx/client/generated/operations/_operations.py#L2339-L2340

Added lines #L2339 - L2340 were not covered by tests
status_code=response.status_code, response=response, error_map=error_map
)
raise HttpResponseError(response=response)

Check warning on line 2343 in diracx-client/src/diracx/client/generated/operations/_operations.py

View check run for this annotation

Codecov / codecov/patch

diracx-client/src/diracx/client/generated/operations/_operations.py#L2343

Added line #L2343 was not covered by tests

deserialized = self._deserialize("object", pipeline_response.http_response)

if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore

return deserialized # type: ignore
return cls(pipeline_response, None, {}) # type: ignore

Check warning on line 2346 in diracx-client/src/diracx/client/generated/operations/_operations.py

View check run for this annotation

Codecov / codecov/patch

diracx-client/src/diracx/client/generated/operations/_operations.py#L2345-L2346

Added lines #L2345 - L2346 were not covered by tests

@overload
def search(
Expand Down

0 comments on commit 7c260cc

Please sign in to comment.