# 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 .driver_app_settings_gamification_config_tiny_object_response_body import (
    DriverAppSettingsGamificationConfigTinyObjectResponseBody,
)
from .driver_app_settings_trailer_selection_config_tiny_object_response_body import (
    DriverAppSettingsTrailerSelectionConfigTinyObjectResponseBody,
)


class DriverAppSettingsResponseObjectResponseBody(UniversalBaseModel):
    """
    The configuration settings for the Samsara Driver App. Can be set or updated through the Samsara Settings page or the API at any time.
    """

    driver_fleet_id: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="driverFleetId"),
        pydantic.Field(alias="driverFleetId", description="Login user name for the fleet driver app"),
    ] = None
    gamification: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Driver gamification feature. Enabling this will turn on the feature for all drivers using the mobile app. Drivers can be configured into peer groups within the Drivers Page. Unconfigured drivers will be grouped on an organization level.
    """

    gamification_config: typing_extensions.Annotated[
        typing.Optional[DriverAppSettingsGamificationConfigTinyObjectResponseBody],
        FieldMetadata(alias="gamificationConfig"),
        pydantic.Field(alias="gamificationConfig"),
    ] = None
    org_vehicle_search: typing_extensions.Annotated[
        typing.Optional[bool],
        FieldMetadata(alias="orgVehicleSearch"),
        pydantic.Field(
            alias="orgVehicleSearch",
            description="Allow drivers to search for vehicles outside of their selection tag when connected to the internet.",
        ),
    ] = None
    trailer_selection: typing_extensions.Annotated[
        typing.Optional[bool],
        FieldMetadata(alias="trailerSelection"),
        pydantic.Field(
            alias="trailerSelection", description="Allow drivers to see and select trailers in the Samsara Driver app. "
        ),
    ] = None
    trailer_selection_config: typing_extensions.Annotated[
        typing.Optional[DriverAppSettingsTrailerSelectionConfigTinyObjectResponseBody],
        FieldMetadata(alias="trailerSelectionConfig"),
        pydantic.Field(alias="trailerSelectionConfig"),
    ] = 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
