# 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
from .minimal_route_stop_audit_logs_response_body_state import MinimalRouteStopAuditLogsResponseBodyState


class MinimalRouteStopAuditLogsResponseBody(UniversalBaseModel):
    """
    A single route stop for a route.
    """

    actual_arrival_time: typing_extensions.Annotated[
        typing.Optional[dt.datetime],
        FieldMetadata(alias="actualArrivalTime"),
        pydantic.Field(
            alias="actualArrivalTime",
            description="Actual arrival time, if it exists, for the route stop in RFC 3339 format.",
        ),
    ] = None
    actual_departure_time: typing_extensions.Annotated[
        typing.Optional[dt.datetime],
        FieldMetadata(alias="actualDepartureTime"),
        pydantic.Field(
            alias="actualDepartureTime",
            description="Actual departure time, if it exists, for the route stop in RFC 3339 format.",
        ),
    ] = None
    en_route_time: typing_extensions.Annotated[
        typing.Optional[dt.datetime],
        FieldMetadata(alias="enRouteTime"),
        pydantic.Field(alias="enRouteTime", description="The time the stop became en-route, in RFC 3339 format."),
    ] = None
    eta: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    Estimated time of arrival, if this stop is currently en-route, in RFC 3339 format.
    """

    external_ids: typing_extensions.Annotated[
        typing.Optional[typing.Dict[str, str]],
        FieldMetadata(alias="externalIds"),
        pydantic.Field(alias="externalIds", description="A map of external ids"),
    ] = None
    id: str = pydantic.Field()
    """
    Unique identifier for the route stop.
    """

    live_sharing_url: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="liveSharingUrl"),
        pydantic.Field(alias="liveSharingUrl", description="The shareable url of the stop's current status."),
    ] = None
    scheduled_arrival_time: typing_extensions.Annotated[
        typing.Optional[dt.datetime],
        FieldMetadata(alias="scheduledArrivalTime"),
        pydantic.Field(
            alias="scheduledArrivalTime",
            description="Scheduled arrival time, if it exists, for the stop in RFC 3339 format. If it does not exist, and this field was changed in the update, it will be an empty string.",
        ),
    ] = None
    scheduled_departure_time: typing_extensions.Annotated[
        typing.Optional[dt.datetime],
        FieldMetadata(alias="scheduledDepartureTime"),
        pydantic.Field(
            alias="scheduledDepartureTime",
            description="Scheduled departure time, if it exists, for the stop in RFC 3339 format. If it does not exist, and this field was changed in the update, it will be an empty string.",
        ),
    ] = None
    skipped_time: typing_extensions.Annotated[
        typing.Optional[dt.datetime],
        FieldMetadata(alias="skippedTime"),
        pydantic.Field(
            alias="skippedTime", description="Skipped time, if it exists, for the route stop in RFC 3339 format."
        ),
    ] = None
    state: typing.Optional[MinimalRouteStopAuditLogsResponseBodyState] = pydantic.Field(default=None)
    """
    The current state of the route stop.  Valid values: `unassigned`, `scheduled`, `en route`, `skipped`, `arrived`, `departed`
    """

    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
