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

import typing

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


class RouteStopEstimatedArrivalDetailsObjectResponseBody(UniversalBaseModel):
    """
    Details specific to Route Stop Estimated Arrival
    """

    alert_before_arrival_milliseconds: typing_extensions.Annotated[
        int,
        FieldMetadata(alias="alertBeforeArrivalMilliseconds"),
        pydantic.Field(
            alias="alertBeforeArrivalMilliseconds",
            description="Time threshold for when to send an alert. Sends an alert when the ETA is less than the threshold.",
        ),
    ]
    has_live_share_link: typing_extensions.Annotated[
        typing.Optional[bool],
        FieldMetadata(alias="hasLiveShareLink"),
        pydantic.Field(
            alias="hasLiveShareLink",
            description="If true, will include a live sharing link in the alert. Defaults to false.",
        ),
    ] = None
    is_alert_on_route_stop_only: typing_extensions.Annotated[
        typing.Optional[bool],
        FieldMetadata(alias="isAlertOnRouteStopOnly"),
        pydantic.Field(
            alias="isAlertOnRouteStopOnly",
            description="If true, will only alert if the vehicle is en-route to the stop. Defaults to false.",
        ),
    ] = None
    location: LocationObjectResponseBody

    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
