# 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_efficiency_data_object_response_body import DriverEfficiencyDataObjectResponseBody
from .driver_efficiency_difficulty_score_data_object_response_body import (
    DriverEfficiencyDifficultyScoreDataObjectResponseBody,
)
from .driver_efficiency_percentage_data_object_response_body import DriverEfficiencyPercentageDataObjectResponseBody
from .driver_efficiency_raw_data_object_response_body import DriverEfficiencyRawDataObjectResponseBody


class SingleDriverEfficiencyByDriverDataObjectResponseBody(UniversalBaseModel):
    """
    singleDriverEfficiencyByDriverDataObject
    """

    difficulty_score: typing_extensions.Annotated[
        typing.Optional[DriverEfficiencyDifficultyScoreDataObjectResponseBody],
        FieldMetadata(alias="difficultyScore"),
        pydantic.Field(alias="difficultyScore"),
    ] = None
    driver_id: typing_extensions.Annotated[
        str, FieldMetadata(alias="driverId"), pydantic.Field(alias="driverId", description="ID of the driver.")
    ]
    percentage_data: typing_extensions.Annotated[
        typing.Optional[DriverEfficiencyPercentageDataObjectResponseBody],
        FieldMetadata(alias="percentageData"),
        pydantic.Field(alias="percentageData"),
    ] = None
    raw_data: typing_extensions.Annotated[
        typing.Optional[DriverEfficiencyRawDataObjectResponseBody],
        FieldMetadata(alias="rawData"),
        pydantic.Field(alias="rawData"),
    ] = None
    score_data: typing_extensions.Annotated[
        typing.Optional[DriverEfficiencyDataObjectResponseBody],
        FieldMetadata(alias="scoreData"),
        pydantic.Field(alias="scoreData"),
    ] = 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
