# 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 DriverEfficiencyPercentageDataObjectResponseBody(UniversalBaseModel):
    """
    Driver Efficiency percentage data. This object is returned when the “percentage” format is specified in “dataFormats”.
    """

    anticipation_percentage: typing_extensions.Annotated[
        typing.Optional[float],
        FieldMetadata(alias="anticipationPercentage"),
        pydantic.Field(
            alias="anticipationPercentage",
            description="Percentage of time a driver is in quickly breaking events vs total breaking events.",
        ),
    ] = None
    coasting_percentage: typing_extensions.Annotated[
        typing.Optional[float],
        FieldMetadata(alias="coastingPercentage"),
        pydantic.Field(alias="coastingPercentage", description="Percentage of time a driver is in coasting."),
    ] = None
    cruise_control_percentage: typing_extensions.Annotated[
        typing.Optional[float],
        FieldMetadata(alias="cruiseControlPercentage"),
        pydantic.Field(
            alias="cruiseControlPercentage", description="Percentage of time a vehicle is in cruise control."
        ),
    ] = None
    green_band_percentage: typing_extensions.Annotated[
        typing.Optional[float],
        FieldMetadata(alias="greenBandPercentage"),
        pydantic.Field(
            alias="greenBandPercentage", description="Percentage of time a driver is driving within the green band."
        ),
    ] = None
    high_grade_road_driving_percentage: typing_extensions.Annotated[
        typing.Optional[float],
        FieldMetadata(alias="highGradeRoadDrivingPercentage"),
        pydantic.Field(
            alias="highGradeRoadDrivingPercentage",
            description="Percentage of time a driver is driving on high-grade road.",
        ),
    ] = None
    high_torque_percentage: typing_extensions.Annotated[
        typing.Optional[float],
        FieldMetadata(alias="highTorquePercentage"),
        pydantic.Field(
            alias="highTorquePercentage", description="Percentage of time a driver is driving in high torque."
        ),
    ] = None
    idling_percentage: typing_extensions.Annotated[
        float,
        FieldMetadata(alias="idlingPercentage"),
        pydantic.Field(alias="idlingPercentage", description="Percentage of time a driver is idling."),
    ]
    over_speed_percentage: typing_extensions.Annotated[
        typing.Optional[float],
        FieldMetadata(alias="overSpeedPercentage"),
        pydantic.Field(alias="overSpeedPercentage", description="Percentage of time a driver is in over-speeding."),
    ] = None
    wear_free_brake_percentage: typing_extensions.Annotated[
        typing.Optional[float],
        FieldMetadata(alias="wearFreeBrakePercentage"),
        pydantic.Field(
            alias="wearFreeBrakePercentage", description="Percentage of time a driver is in wear-free breaking."
        ),
    ] = 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
