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

from __future__ import annotations
from .chatcompletionallowedtoolsparam import (
    ChatCompletionAllowedToolsParam,
    ChatCompletionAllowedToolsParamTypedDict,
)
from opperai.types import BaseModel
from opperai.utils import validate_const
import pydantic
from pydantic.functional_validators import AfterValidator
from typing import Literal
from typing_extensions import Annotated, TypedDict


class ChatCompletionAllowedToolChoiceParamTypedDict(TypedDict):
    allowed_tools: ChatCompletionAllowedToolsParamTypedDict
    type: Literal["allowed_tools"]


class ChatCompletionAllowedToolChoiceParam(BaseModel):
    allowed_tools: ChatCompletionAllowedToolsParam

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