# 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 .harsh_accel_sensitivity_v_2_settings_object_response_body import HarshAccelSensitivityV2SettingsObjectResponseBody
from .harsh_brake_sensitivity_v_2_settings_object_response_body import HarshBrakeSensitivityV2SettingsObjectResponseBody
from .harsh_turn_sensitivity_v_2_settings_object_response_body import HarshTurnSensitivityV2SettingsObjectResponseBody


class HarshEventSensitivityV2SettingsObjectResponseBody(UniversalBaseModel):
    """
    The configurable sensitivity for Harsh Event Detection. Does not apply to CM11/12/22 devices.
    """

    harsh_accel_sensitivity: typing_extensions.Annotated[
        typing.Optional[HarshAccelSensitivityV2SettingsObjectResponseBody],
        FieldMetadata(alias="harshAccelSensitivity"),
        pydantic.Field(alias="harshAccelSensitivity"),
    ] = None
    harsh_brake_sensitivity: typing_extensions.Annotated[
        typing.Optional[HarshBrakeSensitivityV2SettingsObjectResponseBody],
        FieldMetadata(alias="harshBrakeSensitivity"),
        pydantic.Field(alias="harshBrakeSensitivity"),
    ] = None
    harsh_turn_sensitivity: typing_extensions.Annotated[
        typing.Optional[HarshTurnSensitivityV2SettingsObjectResponseBody],
        FieldMetadata(alias="harshTurnSensitivity"),
        pydantic.Field(alias="harshTurnSensitivity"),
    ] = 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
