mirror of
https://github.com/clearml/clearml-server
synced 2025-01-31 19:06:55 +00:00
26 lines
657 B
Python
26 lines
657 B
Python
from typing import Sequence
|
|
|
|
from jsonmodels.fields import StringField
|
|
from jsonmodels.models import Base
|
|
from jsonmodels.validators import Length
|
|
|
|
from apiserver.apimodels import ListField
|
|
from apiserver.apimodels.base import UpdateResponse
|
|
|
|
|
|
class BatchRequest(Base):
|
|
ids: Sequence[str] = ListField([str], validators=Length(minimum_value=1))
|
|
|
|
|
|
class BatchResponse(Base):
|
|
succeeded: Sequence[dict] = ListField([dict])
|
|
failed: Sequence[dict] = ListField([dict])
|
|
|
|
|
|
class UpdateBatchItem(UpdateResponse):
|
|
id: str = StringField()
|
|
|
|
|
|
class UpdateBatchResponse(BatchResponse):
|
|
succeeded: Sequence[UpdateBatchItem] = ListField(UpdateBatchItem)
|