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

from __future__ import annotations
from .chatcompletioncontentparttextparam import (
    ChatCompletionContentPartTextParam,
    ChatCompletionContentPartTextParamTypedDict,
)
from opperai.types import BaseModel
from opperai.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


ChatCompletionDeveloperMessageParamContentTypedDict = TypeAliasType(
    "ChatCompletionDeveloperMessageParamContentTypedDict",
    Union[str, List[ChatCompletionContentPartTextParamTypedDict]],
)


ChatCompletionDeveloperMessageParamContent = TypeAliasType(
    "ChatCompletionDeveloperMessageParamContent",
    Union[str, List[ChatCompletionContentPartTextParam]],
)


class ChatCompletionDeveloperMessageParamTypedDict(TypedDict):
    content: ChatCompletionDeveloperMessageParamContentTypedDict
    role: Literal["developer"]
    name: NotRequired[str]


class ChatCompletionDeveloperMessageParam(BaseModel):
    content: ChatCompletionDeveloperMessageParamContent

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

    name: Optional[str] = None
