Skip to content

Commit

Permalink
regenerate client
Browse files Browse the repository at this point in the history
  • Loading branch information
chaen committed Nov 30, 2023
1 parent ed99b7e commit 9dce245
Show file tree
Hide file tree
Showing 15 changed files with 458 additions and 21 deletions.
2 changes: 1 addition & 1 deletion diracx-client/src/diracx/client/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.1, generator: @autorest/[email protected])
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.0, generator: @autorest/[email protected])
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion diracx-client/src/diracx/client/_client.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.1, generator: @autorest/[email protected])
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.0, generator: @autorest/[email protected])
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion diracx-client/src/diracx/client/_configuration.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.1, generator: @autorest/[email protected])
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.0, generator: @autorest/[email protected])
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion diracx-client/src/diracx/client/_vendor.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.1, generator: @autorest/[email protected])
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.0, generator: @autorest/[email protected])
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion diracx-client/src/diracx/client/aio/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.1, generator: @autorest/[email protected])
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.0, generator: @autorest/[email protected])
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion diracx-client/src/diracx/client/aio/_client.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.1, generator: @autorest/[email protected])
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.0, generator: @autorest/[email protected])
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion diracx-client/src/diracx/client/aio/_configuration.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.1, generator: @autorest/[email protected])
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.0, generator: @autorest/[email protected])
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion diracx-client/src/diracx/client/aio/_vendor.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.1, generator: @autorest/[email protected])
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.0, generator: @autorest/[email protected])
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion diracx-client/src/diracx/client/aio/operations/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.1, generator: @autorest/[email protected])
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.0, generator: @autorest/[email protected])
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

Expand Down
183 changes: 182 additions & 1 deletion diracx-client/src/diracx/client/aio/operations/_operations.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.1, generator: @autorest/[email protected])
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.0, generator: @autorest/[email protected])
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from io import IOBase
Expand Down Expand Up @@ -34,8 +34,11 @@
build_auth_revoke_refresh_token_request,
build_auth_userinfo_request,
build_config_serve_config_request,
build_jobs_assign_sandbox_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,
build_jobs_get_job_status_history_bulk_request,
build_jobs_get_sandbox_file_request,
Expand Down Expand Up @@ -1072,6 +1075,184 @@ async def initiate_sandbox_upload(

return deserialized

@distributed_trace_async
async def get_job_sandboxes(
self, job_id: int, **kwargs: Any
) -> Dict[str, List[Any]]:
"""Get Job Sandboxes.
Get input and output sandboxes of given job id at the same time.
:param job_id: Required.
:type job_id: int
:return: dict mapping str to list of any
:rtype: dict[str, list[any]]
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
304: ResourceNotModifiedError,
}
error_map.update(kwargs.pop("error_map", {}) or {})

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

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

request = build_jobs_get_job_sandboxes_request(
job_id=job_id,
headers=_headers,
params=_params,
)
request.url = self._client.format_url(request.url)

_stream = False
pipeline_response: PipelineResponse = (
await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=_stream, **kwargs
)
)

response = pipeline_response.http_response

if response.status_code not in [200]:
map_error(
status_code=response.status_code, response=response, error_map=error_map
)
raise HttpResponseError(response=response)

deserialized = self._deserialize("{[object]}", pipeline_response)

if cls:
return cls(pipeline_response, deserialized, {})

return deserialized

@distributed_trace_async
async def get_job_sandbox(
self, job_id: int, sandbox_type: Union[str, _models.SandboxType], **kwargs: Any
) -> List[Any]:
"""Get Job Sandbox.
Get input or output sandbox from given job.
:param job_id: Required.
:type job_id: int
:param sandbox_type: Known values are: "input" and "output". Required.
:type sandbox_type: str or ~client.models.SandboxType
:return: list of any
:rtype: list[any]
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
304: ResourceNotModifiedError,
}
error_map.update(kwargs.pop("error_map", {}) or {})

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

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

request = build_jobs_get_job_sandbox_request(
job_id=job_id,
sandbox_type=sandbox_type,
headers=_headers,
params=_params,
)
request.url = self._client.format_url(request.url)

_stream = False
pipeline_response: PipelineResponse = (
await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=_stream, **kwargs
)
)

response = pipeline_response.http_response

if response.status_code not in [200]:
map_error(
status_code=response.status_code, response=response, error_map=error_map
)
raise HttpResponseError(response=response)

deserialized = self._deserialize("[object]", pipeline_response)

if cls:
return cls(pipeline_response, deserialized, {})

return deserialized

@distributed_trace_async
async def assign_sandbox(self, job_id: int, body: str, **kwargs: Any) -> Any:
"""Assign Sandbox.
Assign Sandbox.
:param job_id: Required.
:type job_id: int
:param body: Required.
:type body: str
:return: any
:rtype: any
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
304: ResourceNotModifiedError,
}
error_map.update(kwargs.pop("error_map", {}) or {})

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

content_type: str = kwargs.pop(
"content_type", _headers.pop("Content-Type", "application/json")
)
cls: ClsType[Any] = kwargs.pop("cls", None)

_content = self._serialize.body(body, "str")

request = build_jobs_assign_sandbox_request(
job_id=job_id,
content_type=content_type,
content=_content,
headers=_headers,
params=_params,
)
request.url = self._client.format_url(request.url)

_stream = False
pipeline_response: PipelineResponse = (
await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=_stream, **kwargs
)
)

response = pipeline_response.http_response

if response.status_code not in [200]:
map_error(
status_code=response.status_code, response=response, error_map=error_map
)
raise HttpResponseError(response=response)

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

if cls:
return cls(pipeline_response, deserialized, {})

return deserialized

@overload
async def submit_bulk_jobs(
self, body: List[str], *, content_type: str = "application/json", **kwargs: Any
Expand Down
8 changes: 5 additions & 3 deletions diracx-client/src/diracx/client/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.1, generator: @autorest/[email protected])
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.0, generator: @autorest/[email protected])
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

Expand Down Expand Up @@ -38,13 +38,14 @@
from ._enums import ChecksumAlgorithm
from ._enums import Enum0
from ._enums import Enum1
from ._enums import Enum10
from ._enums import Enum11
from ._enums import Enum12
from ._enums import Enum2
from ._enums import Enum3
from ._enums import Enum4
from ._enums import JobStatus
from ._enums import SandboxFormat
from ._enums import SandboxType
from ._enums import ScalarSearchOperator
from ._enums import VectorSearchOperator
from ._patch import __all__ as _patch_all
Expand Down Expand Up @@ -85,13 +86,14 @@
"ChecksumAlgorithm",
"Enum0",
"Enum1",
"Enum10",
"Enum11",
"Enum12",
"Enum2",
"Enum3",
"Enum4",
"JobStatus",
"SandboxFormat",
"SandboxType",
"ScalarSearchOperator",
"VectorSearchOperator",
]
Expand Down
17 changes: 12 additions & 5 deletions diracx-client/src/diracx/client/models/_enums.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.1, generator: @autorest/[email protected])
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.0, generator: @autorest/[email protected])
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

Expand Down Expand Up @@ -28,14 +28,14 @@ class Enum1(str, Enum, metaclass=CaseInsensitiveEnumMeta):
)


class Enum10(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Enum10."""
class Enum11(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Enum11."""

ASC = "asc"


class Enum11(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Enum11."""
class Enum12(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Enum12."""

DSC = "dsc"

Expand Down Expand Up @@ -84,6 +84,13 @@ class SandboxFormat(str, Enum, metaclass=CaseInsensitiveEnumMeta):
TAR_BZ2 = "tar.bz2"


class SandboxType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Sandbox Type."""

INPUT = "input"
OUTPUT = "output"


class ScalarSearchOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""An enumeration."""

Expand Down
2 changes: 1 addition & 1 deletion diracx-client/src/diracx/client/models/_models.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding=utf-8
# pylint: disable=too-many-lines
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.1, generator: @autorest/[email protected])
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.0, generator: @autorest/[email protected])
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion diracx-client/src/diracx/client/operations/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.1, generator: @autorest/[email protected])
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.0, generator: @autorest/[email protected])
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

Expand Down
Loading

0 comments on commit 9dce245

Please sign in to comment.