# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .vehicle_stats_aux_input_time import VehicleStatsAuxInputTime
from .vehicle_stats_decorations import VehicleStatsDecorations
from .vehicle_stats_engine_immobilizer_with_decoration_state import VehicleStatsEngineImmobilizerWithDecorationState


class VehicleStatsEngineImmobilizerWithDecoration(UniversalBaseModel):
    """
    Data for the engine immobilizer
    """

    connected: bool = pydantic.Field()
    """
    Whether the engine immobilizer is connected or not
    """

    decorations: typing.Optional[VehicleStatsDecorations] = None
    state: VehicleStatsEngineImmobilizerWithDecorationState = pydantic.Field()
    """
    The state of the engine immobilizer. Valid values: `ignition_disabled`, `ignition_enabled`. This stat type will only return states of our first Engine Immobilizer Hardware (ACC-EI). Please use <a href="https://developers.samsara.com/reference/getengineimmobilizerstates" target="_blank">Get engine immobilizer states</a> to get states for both Engine Immobilizer Hardware versions (incl. HW-EI21).
    """

    time: VehicleStatsAuxInputTime

    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
