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

from __future__ import annotations
from .chatmessagecontentitemtext import (
    ChatMessageContentItemText,
    ChatMessageContentItemTextTypedDict,
)
from openrouter.types import BaseModel
from openrouter.utils import validate_const
import pydantic
from pydantic.functional_validators import AfterValidator
from typing import List, Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict


DeveloperMessageContentTypedDict = TypeAliasType(
    "DeveloperMessageContentTypedDict",
    Union[str, List[ChatMessageContentItemTextTypedDict]],
)


DeveloperMessageContent = TypeAliasType(
    "DeveloperMessageContent", Union[str, List[ChatMessageContentItemText]]
)


class DeveloperMessageTypedDict(TypedDict):
    content: DeveloperMessageContentTypedDict
    role: Literal["developer"]
    name: NotRequired[str]


class DeveloperMessage(BaseModel):
    content: DeveloperMessageContent

    ROLE: Annotated[
        Annotated[Literal["developer"], AfterValidator(validate_const("developer"))],
        pydantic.Field(alias="role"),
    ] = "developer"

    name: Optional[str] = None
