# 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


class AuthTokenForDriverResponseResponseBody(UniversalBaseModel):
    """
    Response object for create driver auth token
    """

    expiration_time: typing_extensions.Annotated[
        int,
        FieldMetadata(alias="expirationTime"),
        pydantic.Field(
            alias="expirationTime",
            description="Expiration time of the token in Unix milliseconds since epoch. Clients must redeem the token before this timestamp.",
        ),
    ]
    token: str = pydantic.Field()
    """
    A one-time-use authentication token. Must be paired with the original code and driver identity in a separate request to exchange for a session.
    """

    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
