clearml-server/apiserver/apimodels/base.py
allegroai b97a6084ce Refactor configuration infrastructure
Remove untracked files left from previous commit
2021-01-05 18:25:18 +02:00

29 lines
725 B
Python

from jsonmodels import models, fields
from jsonmodels.validators import Length
from apiserver.apimodels import MongoengineFieldsDict, ListField
class UpdateResponse(models.Base):
updated = fields.IntField(required=True)
fields = MongoengineFieldsDict()
class PagedRequest(models.Base):
page = fields.IntField()
page_size = fields.IntField()
class IdResponse(models.Base):
id = fields.StringField(required=True)
class MakePublicRequest(models.Base):
ids = ListField(items_types=str, validators=[Length(minimum_value=1)])
class MoveRequest(models.Base):
ids = ListField([str], validators=Length(minimum_value=1))
project = fields.StringField()
project_name = fields.StringField()