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

from __future__ import annotations
from openrouter.types import BaseModel
from typing import Literal, Optional, Union
from typing_extensions import NotRequired, TypeAliasType, TypedDict


OutputFunctionCallItemStatusInProgress = Literal["in_progress",]


OutputFunctionCallItemStatusIncomplete = Literal["incomplete",]


OutputFunctionCallItemStatusCompleted = Literal["completed",]


OutputFunctionCallItemStatusUnionTypedDict = TypeAliasType(
    "OutputFunctionCallItemStatusUnionTypedDict",
    Union[
        OutputFunctionCallItemStatusCompleted,
        OutputFunctionCallItemStatusIncomplete,
        OutputFunctionCallItemStatusInProgress,
    ],
)


OutputFunctionCallItemStatusUnion = TypeAliasType(
    "OutputFunctionCallItemStatusUnion",
    Union[
        OutputFunctionCallItemStatusCompleted,
        OutputFunctionCallItemStatusIncomplete,
        OutputFunctionCallItemStatusInProgress,
    ],
)


OutputFunctionCallItemType = Literal["function_call",]


class OutputFunctionCallItemTypedDict(TypedDict):
    arguments: str
    call_id: str
    name: str
    type: OutputFunctionCallItemType
    id: NotRequired[str]
    namespace: NotRequired[str]
    r"""Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)"""
    status: NotRequired[OutputFunctionCallItemStatusUnionTypedDict]


class OutputFunctionCallItem(BaseModel):
    arguments: str

    call_id: str

    name: str

    type: OutputFunctionCallItemType

    id: Optional[str] = None

    namespace: Optional[str] = None
    r"""Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)"""

    status: Optional[OutputFunctionCallItemStatusUnion] = None
