# This file was auto-generated by Fern from our API Definition.

import datetime as dt
import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata


class SendTypingIndicatorResponse(UniversalBaseModel):
    """
    Response schema confirming the typing indicator was sent.
    """

    success: bool = pydantic.Field()
    """
    Indicates whether the typing indicator was successfully sent.
    """

    agent_id: typing_extensions.Annotated[str, FieldMetadata(alias="agentId")] = pydantic.Field()
    """
    The RCS agent that sent the typing indicator.
    """

    recipient: str = pydantic.Field()
    """
    The recipient's phone number that received the typing indicator.
    """

    started_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="startedAt")] = pydantic.Field()
    """
    Timestamp when the typing indicator was started (ISO 8601 format).
    """

    ended_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="endedAt")] = pydantic.Field()
    """
    Timestamp when the typing indicator will automatically expire (ISO 8601 format). <br>
    
    This is typically one minute after `startedAt` unless a message is sent first.
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
