# 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 .voice_coaching_settings_object_response_body_events_to_coach_item import (
    VoiceCoachingSettingsObjectResponseBodyEventsToCoachItem,
)
from .voice_coaching_settings_object_response_body_language import VoiceCoachingSettingsObjectResponseBodyLanguage


class VoiceCoachingSettingsObjectResponseBody(UniversalBaseModel):
    """
    Enabling voice coaching will play messages for harsh events, speeding, and unbuckled seat belts.
    """

    events_to_coach: typing_extensions.Annotated[
        typing.Optional[typing.List[VoiceCoachingSettingsObjectResponseBodyEventsToCoachItem]],
        FieldMetadata(alias="eventsToCoach"),
        pydantic.Field(
            alias="eventsToCoach",
            description="Selected driving events will be enabled for voice coaching. Harsh driving events include harsh acceleration and harsh brake.",
        ),
    ] = None
    is_enabled: typing_extensions.Annotated[
        typing.Optional[bool],
        FieldMetadata(alias="isEnabled"),
        pydantic.Field(alias="isEnabled", description="Indicates whether voice coaching is turned on."),
    ] = None
    language: typing.Optional[VoiceCoachingSettingsObjectResponseBodyLanguage] = pydantic.Field(default=None)
    """
    The coaching language. The default language is English.  Valid values: `english`, `spanish`, `dutch`, `englishUk`, `italian`, `french`, `german`
    """

    speeding_threshold_mph: typing_extensions.Annotated[
        typing.Optional[float],
        FieldMetadata(alias="speedingThresholdMph"),
        pydantic.Field(alias="speedingThresholdMph", description="Alert when speed is over this many miles per hour."),
    ] = 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
