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

from __future__ import annotations
from .editchoice import EditChoice, EditChoiceTypedDict
from .usage import Usage, UsageTypedDict
import pydantic
from pydantic.functional_validators import AfterValidator
from r9s.types import BaseModel
from r9s.utils import validate_const
from typing import List, Literal
from typing_extensions import Annotated, TypedDict


class EditResponseTypedDict(TypedDict):
    created: int
    choices: List[EditChoiceTypedDict]
    usage: UsageTypedDict
    object: Literal["edit"]


class EditResponse(BaseModel):
    created: int

    choices: List[EditChoice]

    usage: Usage

    OBJECT: Annotated[
        Annotated[Literal["edit"], AfterValidator(validate_const("edit"))],
        pydantic.Field(alias="object"),
    ] = "edit"
