"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from .jobout import JobOut, JobOutTypedDict
from mistralai.types import BaseModel
from mistralai.utils import validate_const
import pydantic
from pydantic.functional_validators import AfterValidator
from typing import List, Literal, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


JobsOutObject = Literal["list"]


class JobsOutTypedDict(TypedDict):
    total: int
    data: NotRequired[List[JobOutTypedDict]]
    object: JobsOutObject


class JobsOut(BaseModel):
    total: int

    data: Optional[List[JobOut]] = None

    OBJECT: Annotated[
        Annotated[Optional[JobsOutObject], AfterValidator(validate_const("list"))],
        pydantic.Field(alias="object"),
    ] = "list"
