# 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 .stop_eta_updated_event_details_response_body import StopEtaUpdatedEventDetailsResponseBody
from .stop_task_completed_event_details_response_body import StopTaskCompletedEventDetailsResponseBody
from .stop_task_skipped_event_details_response_body import StopTaskSkippedEventDetailsResponseBody


class RouteEventDetailsResponseBody(UniversalBaseModel):
    """
    Contains additional information specific to the event type.
    """

    stop_eta_updated: typing_extensions.Annotated[
        typing.Optional[StopEtaUpdatedEventDetailsResponseBody],
        FieldMetadata(alias="stopEtaUpdated"),
        pydantic.Field(alias="stopEtaUpdated"),
    ] = None
    stop_task_completed: typing_extensions.Annotated[
        typing.Optional[StopTaskCompletedEventDetailsResponseBody],
        FieldMetadata(alias="stopTaskCompleted"),
        pydantic.Field(alias="stopTaskCompleted"),
    ] = None
    stop_task_skipped: typing_extensions.Annotated[
        typing.Optional[StopTaskSkippedEventDetailsResponseBody],
        FieldMetadata(alias="stopTaskSkipped"),
        pydantic.Field(alias="stopTaskSkipped"),
    ] = None

    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
