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

from __future__ import annotations
from .reasoningsummary import ReasoningSummary, ReasoningSummaryTypedDict
from .reasoningtext import ReasoningText, ReasoningTextTypedDict
from enum import Enum
import pydantic
from pydantic.functional_validators import AfterValidator
from ragie.types import BaseModel
from ragie.utils import validate_const
from typing import List, Literal, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class ReasoningOutputStatus(str, Enum):
    IN_PROGRESS = "in_progress"
    COMPLETED = "completed"
    INCOMPLETE = "incomplete"


class ReasoningOutputTypedDict(TypedDict):
    id: str
    r"""The unique ID of the reasoning output."""
    summary: List[ReasoningSummaryTypedDict]
    r"""The summary of the reasoning."""
    content: List[ReasoningTextTypedDict]
    r"""The content of the reasoning."""
    encrypted_content: str
    r"""The encrypted content of the reasoning output."""
    type: Literal["reasoning"]
    status: NotRequired[ReasoningOutputStatus]


class ReasoningOutput(BaseModel):
    id: str
    r"""The unique ID of the reasoning output."""

    summary: List[ReasoningSummary]
    r"""The summary of the reasoning."""

    content: List[ReasoningText]
    r"""The content of the reasoning."""

    encrypted_content: str
    r"""The encrypted content of the reasoning output."""

    TYPE: Annotated[
        Annotated[
            Optional[Literal["reasoning"]], AfterValidator(validate_const("reasoning"))
        ],
        pydantic.Field(alias="type"),
    ] = "reasoning"

    status: Optional[ReasoningOutputStatus] = ReasoningOutputStatus.COMPLETED
