# 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 DriverAppSettingsTrailerSelectionConfigTinyObjectRequestBody(UniversalBaseModel):
    """
    Trailer selection setting configuration for the Driver App.
    """

    driver_trailer_creation_enabled: typing_extensions.Annotated[
        typing.Optional[bool],
        FieldMetadata(alias="driverTrailerCreationEnabled"),
        pydantic.Field(
            alias="driverTrailerCreationEnabled",
            description="Allow drivers to create new trailers in the Samsara Driver app.",
        ),
    ] = None
    max_num_of_trailers_selected: typing_extensions.Annotated[
        typing.Optional[int],
        FieldMetadata(alias="maxNumOfTrailersSelected"),
        pydantic.Field(alias="maxNumOfTrailersSelected", description="Trailer selection limit."),
    ] = None
    org_trailer_search: typing_extensions.Annotated[
        typing.Optional[bool],
        FieldMetadata(alias="orgTrailerSearch"),
        pydantic.Field(
            alias="orgTrailerSearch",
            description="Allow drivers to search for trailers outside of their selection tag when connected to the internet",
        ),
    ] = 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
