Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1826,7 +1826,7 @@ async def patch_metadata(self, body: Union[Dict[str, Dict[str, Any]], IO[bytes]]
@overload
async def search(
self,
body: Optional[_models.JobSearchParams] = None,
body: Optional[_models.SearchParams] = None,
*,
page: int = 1,
per_page: int = 100,
Expand All @@ -1840,7 +1840,7 @@ async def search(
**TODO: Add more docs**.

:param body: Default value is None.
:type body: ~_generated.models.JobSearchParams
:type body: ~_generated.models.SearchParams
:keyword page: Default value is 1.
:paramtype page: int
:keyword per_page: Default value is 100.
Expand Down Expand Up @@ -1886,7 +1886,7 @@ async def search(
@distributed_trace_async
async def search(
self,
body: Optional[Union[_models.JobSearchParams, IO[bytes]]] = None,
body: Optional[Union[_models.SearchParams, IO[bytes]]] = None,
*,
page: int = 1,
per_page: int = 100,
Expand All @@ -1898,8 +1898,8 @@ async def search(

**TODO: Add more docs**.

:param body: Is either a JobSearchParams type or a IO[bytes] type. Default value is None.
:type body: ~_generated.models.JobSearchParams or IO[bytes]
:param body: Is either a SearchParams type or a IO[bytes] type. Default value is None.
:type body: ~_generated.models.SearchParams or IO[bytes]
:keyword page: Default value is 1.
:paramtype page: int
:keyword per_page: Default value is 100.
Expand Down Expand Up @@ -1929,7 +1929,7 @@ async def search(
_content = body
else:
if body is not None:
_json = self._serialize.body(body, "JobSearchParams")
_json = self._serialize.body(body, "SearchParams")
else:
_json = None

Expand Down Expand Up @@ -1968,14 +1968,14 @@ async def search(

@overload
async def summary(
self, body: _models.JobSummaryParams, *, content_type: str = "application/json", **kwargs: Any
self, body: _models.SummaryParams, *, content_type: str = "application/json", **kwargs: Any
) -> Any:
"""Summary.

Show information suitable for plotting.

:param body: Required.
:type body: ~_generated.models.JobSummaryParams
:type body: ~_generated.models.SummaryParams
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
Expand All @@ -2001,13 +2001,13 @@ async def summary(self, body: IO[bytes], *, content_type: str = "application/jso
"""

@distributed_trace_async
async def summary(self, body: Union[_models.JobSummaryParams, IO[bytes]], **kwargs: Any) -> Any:
async def summary(self, body: Union[_models.SummaryParams, IO[bytes]], **kwargs: Any) -> Any:
"""Summary.

Show information suitable for plotting.

:param body: Is either a JobSummaryParams type or a IO[bytes] type. Required.
:type body: ~_generated.models.JobSummaryParams or IO[bytes]
:param body: Is either a SummaryParams type or a IO[bytes] type. Required.
:type body: ~_generated.models.SummaryParams or IO[bytes]
:return: any
:rtype: any
:raises ~azure.core.exceptions.HttpResponseError:
Expand All @@ -2032,7 +2032,7 @@ async def summary(self, body: Union[_models.JobSummaryParams, IO[bytes]], **kwar
if isinstance(body, (IOBase, bytes)):
_content = body
else:
_json = self._serialize.body(body, "JobSummaryParams")
_json = self._serialize.body(body, "SummaryParams")

_request = build_jobs_summary_request(
content_type=content_type,
Expand Down
16 changes: 8 additions & 8 deletions diracx-client/src/diracx/client/_generated/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@
InitiateDeviceFlowResponse,
InsertedJob,
JobCommand,
JobSearchParams,
JobSearchParamsSearchItem,
JobStatusUpdate,
JobSummaryParams,
JobSummaryParamsSearchItem,
Metadata,
OpenIDConfiguration,
SandboxDownloadResponse,
SandboxInfo,
SandboxUploadResponse,
ScalarSearchSpec,
ScalarSearchSpecValue,
SearchParams,
SearchParamsSearchItem,
SetJobStatusReturn,
SetJobStatusReturnSuccess,
SortSpec,
SummaryParams,
SummaryParamsSearchItem,
SupportInfo,
TokenResponse,
UserInfoResponse,
Expand Down Expand Up @@ -67,21 +67,21 @@
"InitiateDeviceFlowResponse",
"InsertedJob",
"JobCommand",
"JobSearchParams",
"JobSearchParamsSearchItem",
"JobStatusUpdate",
"JobSummaryParams",
"JobSummaryParamsSearchItem",
"Metadata",
"OpenIDConfiguration",
"SandboxDownloadResponse",
"SandboxInfo",
"SandboxUploadResponse",
"ScalarSearchSpec",
"ScalarSearchSpecValue",
"SearchParams",
"SearchParamsSearchItem",
"SetJobStatusReturn",
"SetJobStatusReturnSuccess",
"SortSpec",
"SummaryParams",
"SummaryParamsSearchItem",
"SupportInfo",
"TokenResponse",
"UserInfoResponse",
Expand Down
176 changes: 88 additions & 88 deletions diracx-client/src/diracx/client/_generated/models/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,56 +358,6 @@ def __init__(self, *, job_id: int, command: str, arguments: Optional[str] = None
self.arguments = arguments


class JobSearchParams(_serialization.Model):
"""JobSearchParams.

:ivar parameters: Parameters.
:vartype parameters: list[str]
:ivar search: Search.
:vartype search: list[~_generated.models.JobSearchParamsSearchItem]
:ivar sort: Sort.
:vartype sort: list[~_generated.models.SortSpec]
:ivar distinct: Distinct.
:vartype distinct: bool
"""

_attribute_map = {
"parameters": {"key": "parameters", "type": "[str]"},
"search": {"key": "search", "type": "[JobSearchParamsSearchItem]"},
"sort": {"key": "sort", "type": "[SortSpec]"},
"distinct": {"key": "distinct", "type": "bool"},
}

def __init__(
self,
*,
parameters: Optional[List[str]] = None,
search: List["_models.JobSearchParamsSearchItem"] = [],
sort: List["_models.SortSpec"] = [],
distinct: bool = False,
**kwargs: Any
) -> None:
"""
:keyword parameters: Parameters.
:paramtype parameters: list[str]
:keyword search: Search.
:paramtype search: list[~_generated.models.JobSearchParamsSearchItem]
:keyword sort: Sort.
:paramtype sort: list[~_generated.models.SortSpec]
:keyword distinct: Distinct.
:paramtype distinct: bool
"""
super().__init__(**kwargs)
self.parameters = parameters
self.search = search
self.sort = sort
self.distinct = distinct


class JobSearchParamsSearchItem(_serialization.Model):
"""JobSearchParamsSearchItem."""


class JobStatusUpdate(_serialization.Model):
"""JobStatusUpdate.

Expand Down Expand Up @@ -458,44 +408,6 @@ def __init__(
self.source = source


class JobSummaryParams(_serialization.Model):
"""JobSummaryParams.

All required parameters must be populated in order to send to server.

:ivar grouping: Grouping. Required.
:vartype grouping: list[str]
:ivar search: Search.
:vartype search: list[~_generated.models.JobSummaryParamsSearchItem]
"""

_validation = {
"grouping": {"required": True},
}

_attribute_map = {
"grouping": {"key": "grouping", "type": "[str]"},
"search": {"key": "search", "type": "[JobSummaryParamsSearchItem]"},
}

def __init__(
self, *, grouping: List[str], search: List["_models.JobSummaryParamsSearchItem"] = [], **kwargs: Any
) -> None:
"""
:keyword grouping: Grouping. Required.
:paramtype grouping: list[str]
:keyword search: Search.
:paramtype search: list[~_generated.models.JobSummaryParamsSearchItem]
"""
super().__init__(**kwargs)
self.grouping = grouping
self.search = search


class JobSummaryParamsSearchItem(_serialization.Model):
"""JobSummaryParamsSearchItem."""


class Metadata(_serialization.Model):
"""Metadata.

Expand Down Expand Up @@ -836,6 +748,56 @@ class ScalarSearchSpecValue(_serialization.Model):
"""Value."""


class SearchParams(_serialization.Model):
"""SearchParams.

:ivar parameters: Parameters.
:vartype parameters: list[str]
:ivar search: Search.
:vartype search: list[~_generated.models.SearchParamsSearchItem]
:ivar sort: Sort.
:vartype sort: list[~_generated.models.SortSpec]
:ivar distinct: Distinct.
:vartype distinct: bool
"""

_attribute_map = {
"parameters": {"key": "parameters", "type": "[str]"},
"search": {"key": "search", "type": "[SearchParamsSearchItem]"},
"sort": {"key": "sort", "type": "[SortSpec]"},
"distinct": {"key": "distinct", "type": "bool"},
}

def __init__(
self,
*,
parameters: Optional[List[str]] = None,
search: List["_models.SearchParamsSearchItem"] = [],
sort: List["_models.SortSpec"] = [],
distinct: bool = False,
**kwargs: Any
) -> None:
"""
:keyword parameters: Parameters.
:paramtype parameters: list[str]
:keyword search: Search.
:paramtype search: list[~_generated.models.SearchParamsSearchItem]
:keyword sort: Sort.
:paramtype sort: list[~_generated.models.SortSpec]
:keyword distinct: Distinct.
:paramtype distinct: bool
"""
super().__init__(**kwargs)
self.parameters = parameters
self.search = search
self.sort = sort
self.distinct = distinct


class SearchParamsSearchItem(_serialization.Model):
"""SearchParamsSearchItem."""


class SetJobStatusReturn(_serialization.Model):
"""SetJobStatusReturn.

Expand Down Expand Up @@ -979,6 +941,44 @@ def __init__(self, *, parameter: str, direction: Union[str, "_models.SortDirecti
self.direction = direction


class SummaryParams(_serialization.Model):
"""SummaryParams.

All required parameters must be populated in order to send to server.

:ivar grouping: Grouping. Required.
:vartype grouping: list[str]
:ivar search: Search.
:vartype search: list[~_generated.models.SummaryParamsSearchItem]
"""

_validation = {
"grouping": {"required": True},
}

_attribute_map = {
"grouping": {"key": "grouping", "type": "[str]"},
"search": {"key": "search", "type": "[SummaryParamsSearchItem]"},
}

def __init__(
self, *, grouping: List[str], search: List["_models.SummaryParamsSearchItem"] = [], **kwargs: Any
) -> None:
"""
:keyword grouping: Grouping. Required.
:paramtype grouping: list[str]
:keyword search: Search.
:paramtype search: list[~_generated.models.SummaryParamsSearchItem]
"""
super().__init__(**kwargs)
self.grouping = grouping
self.search = search


class SummaryParamsSearchItem(_serialization.Model):
"""SummaryParamsSearchItem."""


class SupportInfo(_serialization.Model):
"""SupportInfo.

Expand Down
Loading
Loading