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

from __future__ import annotations
from .openairesponsesrefusalcontent import (
    OpenAIResponsesRefusalContent,
    OpenAIResponsesRefusalContentTypedDict,
)
from .responseoutputtext import ResponseOutputText, ResponseOutputTextTypedDict
from openrouter.types import BaseModel
from typing import List, Literal, Optional, Union
from typing_extensions import NotRequired, TypeAliasType, TypedDict


ResponsesOutputMessageRole = Literal["assistant",]


ResponsesOutputMessageType = Literal["message",]


ResponsesOutputMessageStatusInProgress = Literal["in_progress",]


ResponsesOutputMessageStatusIncomplete = Literal["incomplete",]


ResponsesOutputMessageStatusCompleted = Literal["completed",]


ResponsesOutputMessageStatusUnionTypedDict = TypeAliasType(
    "ResponsesOutputMessageStatusUnionTypedDict",
    Union[
        ResponsesOutputMessageStatusCompleted,
        ResponsesOutputMessageStatusIncomplete,
        ResponsesOutputMessageStatusInProgress,
    ],
)


ResponsesOutputMessageStatusUnion = TypeAliasType(
    "ResponsesOutputMessageStatusUnion",
    Union[
        ResponsesOutputMessageStatusCompleted,
        ResponsesOutputMessageStatusIncomplete,
        ResponsesOutputMessageStatusInProgress,
    ],
)


ResponsesOutputMessageContentTypedDict = TypeAliasType(
    "ResponsesOutputMessageContentTypedDict",
    Union[OpenAIResponsesRefusalContentTypedDict, ResponseOutputTextTypedDict],
)


ResponsesOutputMessageContent = TypeAliasType(
    "ResponsesOutputMessageContent",
    Union[OpenAIResponsesRefusalContent, ResponseOutputText],
)


class ResponsesOutputMessageTypedDict(TypedDict):
    r"""An output message item"""

    id: str
    role: ResponsesOutputMessageRole
    type: ResponsesOutputMessageType
    content: List[ResponsesOutputMessageContentTypedDict]
    status: NotRequired[ResponsesOutputMessageStatusUnionTypedDict]


class ResponsesOutputMessage(BaseModel):
    r"""An output message item"""

    id: str

    role: ResponsesOutputMessageRole

    type: ResponsesOutputMessageType

    content: List[ResponsesOutputMessageContent]

    status: Optional[ResponsesOutputMessageStatusUnion] = None
