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

from __future__ import annotations
from openrouter.types import BaseModel, UnrecognizedStr
from openrouter.utils import validate_open_enum
from pydantic.functional_validators import PlainValidator
from typing import Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypedDict


OutputDatetimeItemType = Literal["openrouter:datetime",]


OutputDatetimeItemStatus = Union[
    Literal[
        "completed",
        "in_progress",
        "incomplete",
    ],
    UnrecognizedStr,
]


class OutputDatetimeItemTypedDict(TypedDict):
    r"""An openrouter:datetime server tool output item"""

    type: OutputDatetimeItemType
    status: OutputDatetimeItemStatus
    datetime: str
    r"""ISO 8601 datetime string"""
    timezone: str
    r"""IANA timezone name"""
    id: NotRequired[str]


class OutputDatetimeItem(BaseModel):
    r"""An openrouter:datetime server tool output item"""

    type: OutputDatetimeItemType

    status: Annotated[
        OutputDatetimeItemStatus, PlainValidator(validate_open_enum(False))
    ]

    datetime: str
    r"""ISO 8601 datetime string"""

    timezone: str
    r"""IANA timezone name"""

    id: Optional[str] = None
