# generated by datamodel-codegen:
#   filename:  common.yaml
#   timestamp: 2023-06-21T19:01:59+00:00

from __future__ import annotations

from typing import Dict, Optional, Union

from pydantic import BaseModel, Extra, Field


class KeyValueObject(BaseModel):
    class Config:
        extra = Extra.allow

    __root__: Optional[Dict[str, Union[float, str, bool]]] = None


class Page(BaseModel):
    __root__: int


class PageSize(BaseModel):
    __root__: int = Field(..., example=100)


class Sort(BaseModel):
    __root__: str
    """
    Must be supplied in the format [column_name] to denote asc sort by this column OR
    -[column_name] to denote desc sort by this column
    """


class StatusCounts(BaseModel):
    """
    Counts of the results by status
    """

    failure: float
    """
    The number of failed inferences in the request
    """
    success: float
    """
    The number of successful inferences in the request
    """
    total: float
    """
    The total number of inferences in the request
    """


class TotalCount(BaseModel):
    __root__: int = Field(..., example=2)
    """
    The total number of results the query returned
    """


class TotalPages(BaseModel):
    __root__: int = Field(..., example=1)
    """
    The number of result pages that this query generated, the ceiling of the total
    number of results divided by the page size
    """
