# 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 .ridership_passenger_identifier_object_response_body import RidershipPassengerIdentifierObjectResponseBody
from .ridership_passenger_special_instructions_object_response_body import (
    RidershipPassengerSpecialInstructionsObjectResponseBody,
)


class RidershipPassengerObjectResponseBody(UniversalBaseModel):
    """
    A ridership passenger entity.
    """

    account_id: typing_extensions.Annotated[
        str,
        FieldMetadata(alias="accountId"),
        pydantic.Field(alias="accountId", description="The Samsara UUID of the account this passenger belongs to."),
    ]
    classification: typing.Optional[str] = pydantic.Field(default=None)
    """
    Classification or grade level of the passenger.
    """

    created_at_time: typing_extensions.Annotated[
        str,
        FieldMetadata(alias="createdAtTime"),
        pydantic.Field(alias="createdAtTime", description="The time the passenger was created 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
    first_name: typing_extensions.Annotated[
        str,
        FieldMetadata(alias="firstName"),
        pydantic.Field(alias="firstName", description="First name of the passenger."),
    ]
    id: str = pydantic.Field()
    """
    The unique Samsara ID of the passenger.
    """

    identifiers: typing.Optional[typing.List[RidershipPassengerIdentifierObjectResponseBody]] = pydantic.Field(
        default=None
    )
    """
    List of identifiers associated with the passenger.
    """

    is_active: typing_extensions.Annotated[
        bool,
        FieldMetadata(alias="isActive"),
        pydantic.Field(alias="isActive", description="Whether the passenger is active."),
    ]
    last_name: typing_extensions.Annotated[
        str,
        FieldMetadata(alias="lastName"),
        pydantic.Field(alias="lastName", description="Last name of the passenger."),
    ]
    special_instructions: typing_extensions.Annotated[
        typing.Optional[RidershipPassengerSpecialInstructionsObjectResponseBody],
        FieldMetadata(alias="specialInstructions"),
        pydantic.Field(alias="specialInstructions"),
    ] = None
    updated_at_time: typing_extensions.Annotated[
        str,
        FieldMetadata(alias="updatedAtTime"),
        pydantic.Field(
            alias="updatedAtTime", description="The time the passenger was last updated in RFC 3339 format."
        ),
    ]

    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
