# 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 PatchDriverTrailerAssignmentsResponseBodyResponseBody(UniversalBaseModel):
    """
    Response after successfully updating a Driver Trailer Assignment
    """

    created_at_time: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="createdAtTime"),
        pydantic.Field(
            alias="createdAtTime", description="Time when the driver trailer assignment was created, in RFC 3339 format"
        ),
    ] = None
    driver_id: typing_extensions.Annotated[
        str,
        FieldMetadata(alias="driverId"),
        pydantic.Field(alias="driverId", description="Samsara ID for the driver that this assignment is for."),
    ]
    end_time: typing_extensions.Annotated[
        str,
        FieldMetadata(alias="endTime"),
        pydantic.Field(alias="endTime", description="Time when the driver trailer assignment ends, in RFC 3339 format"),
    ]
    id: str = pydantic.Field()
    """
    Samsara ID for the assignment.
    """

    start_time: typing_extensions.Annotated[
        str,
        FieldMetadata(alias="startTime"),
        pydantic.Field(
            alias="startTime", description="Time when the driver trailer assignment starts, in RFC 3339 format"
        ),
    ]
    trailer_id: typing_extensions.Annotated[
        str,
        FieldMetadata(alias="trailerId"),
        pydantic.Field(alias="trailerId", description="Samsara ID of the trailer"),
    ]
    updated_at_time: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="updatedAtTime"),
        pydantic.Field(
            alias="updatedAtTime",
            description="Time when the driver trailer assignment was last updated, in RFC 3339 format",
        ),
    ] = 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
