# 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 .ambient_temperature_details_object_response_body import AmbientTemperatureDetailsObjectResponseBody
from .cell_signal_loss_details_object_response_body import CellSignalLossDetailsObjectResponseBody
from .def_level_trigger_details_object_response_body import DefLevelTriggerDetailsObjectResponseBody
from .device_movement_trigger_details_object_response_body import DeviceMovementTriggerDetailsObjectResponseBody
from .driver_document_submitted_details_object_response_body import DriverDocumentSubmittedDetailsObjectResponseBody
from .dvir_submitted_device_trigger_details_object_response_body import (
    DvirSubmittedDeviceTriggerDetailsObjectResponseBody,
)
from .engine_idle_trigger_details_object_response_body import EngineIdleTriggerDetailsObjectResponseBody
from .engine_off_details_object_response_body import EngineOffDetailsObjectResponseBody
from .engine_on_details_object_response_body import EngineOnDetailsObjectResponseBody
from .fuel_level_trigger_details_object_response_body import FuelLevelTriggerDetailsObjectResponseBody
from .gateway_disconnected_details_object_response_body import GatewayDisconnectedDetailsObjectResponseBody
from .gateway_unplugged_trigger_details_object_response_body import GatewayUnpluggedTriggerDetailsObjectResponseBody
from .geofence_entry_trigger_details_object_response_body import GeofenceEntryTriggerDetailsObjectResponseBody
from .geofence_exit_trigger_details_object_response_body import GeofenceExitTriggerDetailsObjectResponseBody
from .gps_signal_loss_details_object_response_body import GpsSignalLossDetailsObjectResponseBody
from .harsh_event_trigger_details_object_response_body import HarshEventTriggerDetailsObjectResponseBody
from .hos_violation_trigger_details_object_response_body import HosViolationTriggerDetailsObjectResponseBody
from .inside_geofence_trigger_details_object_response_body import InsideGeofenceTriggerDetailsObjectResponseBody
from .out_of_route_details_object_response_body import OutOfRouteDetailsObjectResponseBody
from .outside_geofence_trigger_details_object_response_body import OutsideGeofenceTriggerDetailsObjectResponseBody
from .panic_button_details_object_response_body import PanicButtonDetailsObjectResponseBody
from .reading_trigger_details_object_response_body import ReadingTriggerDetailsObjectResponseBody
from .route_stop_estimated_arrival_details_object_response_body import (
    RouteStopEstimatedArrivalDetailsObjectResponseBody,
)
from .safety_behavior_trigger_details_object_response_body import SafetyBehaviorTriggerDetailsObjectResponseBody
from .scheduled_maintenance_by_engine_hours_details_object_response_body import (
    ScheduledMaintenanceByEngineHoursDetailsObjectResponseBody,
)
from .scheduled_maintenance_odometer_trigger_details_object_response_body import (
    ScheduledMaintenanceOdometerTriggerDetailsObjectResponseBody,
)
from .scheduled_maintenance_trigger_details_object_response_body import (
    ScheduledMaintenanceTriggerDetailsObjectResponseBody,
)
from .speed_trigger_details_object_response_body import SpeedTriggerDetailsObjectResponseBody
from .sudden_fuel_level_drop_trigger_details_object_response_body import (
    SuddenFuelLevelDropTriggerDetailsObjectResponseBody,
)
from .sudden_fuel_level_rise_trigger_details_object_response_body import (
    SuddenFuelLevelRiseTriggerDetailsObjectResponseBody,
)
from .tire_fault_code_details_object_response_body import TireFaultCodeDetailsObjectResponseBody
from .training_assignment_near_due_date_trigger_details_object_response_body import (
    TrainingAssignmentNearDueDateTriggerDetailsObjectResponseBody,
)
from .unassigned_driving_trigger_details_object_response_body import UnassignedDrivingTriggerDetailsObjectResponseBody
from .vehicle_batter_voltage_details_object_response_body import VehicleBatterVoltageDetailsObjectResponseBody
from .vehicle_fault_code_details_object_response_body import VehicleFaultCodeDetailsObjectResponseBody


class TriggerParamsObjectResponseBody(UniversalBaseModel):
    """
    The trigger type specific details. Only the field that corresponds to the trigger type is filled in.
    """

    ambient_temperature: typing_extensions.Annotated[
        typing.Optional[AmbientTemperatureDetailsObjectResponseBody],
        FieldMetadata(alias="ambientTemperature"),
        pydantic.Field(alias="ambientTemperature"),
    ] = None
    cell_signal_loss: typing_extensions.Annotated[
        typing.Optional[CellSignalLossDetailsObjectResponseBody],
        FieldMetadata(alias="cellSignalLoss"),
        pydantic.Field(alias="cellSignalLoss"),
    ] = None
    def_level: typing_extensions.Annotated[
        typing.Optional[DefLevelTriggerDetailsObjectResponseBody],
        FieldMetadata(alias="defLevel"),
        pydantic.Field(alias="defLevel"),
    ] = None
    device_movement: typing_extensions.Annotated[
        typing.Optional[DeviceMovementTriggerDetailsObjectResponseBody],
        FieldMetadata(alias="deviceMovement"),
        pydantic.Field(alias="deviceMovement"),
    ] = None
    document_submitted: typing_extensions.Annotated[
        typing.Optional[DriverDocumentSubmittedDetailsObjectResponseBody],
        FieldMetadata(alias="documentSubmitted"),
        pydantic.Field(alias="documentSubmitted"),
    ] = None
    dvir_submitted_device: typing_extensions.Annotated[
        typing.Optional[DvirSubmittedDeviceTriggerDetailsObjectResponseBody],
        FieldMetadata(alias="dvirSubmittedDevice"),
        pydantic.Field(alias="dvirSubmittedDevice"),
    ] = None
    engine_idle: typing_extensions.Annotated[
        typing.Optional[EngineIdleTriggerDetailsObjectResponseBody],
        FieldMetadata(alias="engineIdle"),
        pydantic.Field(alias="engineIdle"),
    ] = None
    engine_off: typing_extensions.Annotated[
        typing.Optional[EngineOffDetailsObjectResponseBody],
        FieldMetadata(alias="engineOff"),
        pydantic.Field(alias="engineOff"),
    ] = None
    engine_on: typing_extensions.Annotated[
        typing.Optional[EngineOnDetailsObjectResponseBody],
        FieldMetadata(alias="engineOn"),
        pydantic.Field(alias="engineOn"),
    ] = None
    fuel_level: typing_extensions.Annotated[
        typing.Optional[FuelLevelTriggerDetailsObjectResponseBody],
        FieldMetadata(alias="fuelLevel"),
        pydantic.Field(alias="fuelLevel"),
    ] = None
    gateway_disconnected: typing_extensions.Annotated[
        typing.Optional[GatewayDisconnectedDetailsObjectResponseBody],
        FieldMetadata(alias="gatewayDisconnected"),
        pydantic.Field(alias="gatewayDisconnected"),
    ] = None
    gateway_unplugged: typing_extensions.Annotated[
        typing.Optional[GatewayUnpluggedTriggerDetailsObjectResponseBody],
        FieldMetadata(alias="gatewayUnplugged"),
        pydantic.Field(alias="gatewayUnplugged"),
    ] = None
    geofence_entry: typing_extensions.Annotated[
        typing.Optional[GeofenceEntryTriggerDetailsObjectResponseBody],
        FieldMetadata(alias="geofenceEntry"),
        pydantic.Field(alias="geofenceEntry"),
    ] = None
    geofence_exit: typing_extensions.Annotated[
        typing.Optional[GeofenceExitTriggerDetailsObjectResponseBody],
        FieldMetadata(alias="geofenceExit"),
        pydantic.Field(alias="geofenceExit"),
    ] = None
    gps_signal_loss: typing_extensions.Annotated[
        typing.Optional[GpsSignalLossDetailsObjectResponseBody],
        FieldMetadata(alias="gpsSignalLoss"),
        pydantic.Field(alias="gpsSignalLoss"),
    ] = None
    harsh_event: typing_extensions.Annotated[
        typing.Optional[HarshEventTriggerDetailsObjectResponseBody],
        FieldMetadata(alias="harshEvent"),
        pydantic.Field(alias="harshEvent"),
    ] = None
    hos_violation: typing_extensions.Annotated[
        typing.Optional[HosViolationTriggerDetailsObjectResponseBody],
        FieldMetadata(alias="hosViolation"),
        pydantic.Field(alias="hosViolation"),
    ] = None
    inside_geofence: typing_extensions.Annotated[
        typing.Optional[InsideGeofenceTriggerDetailsObjectResponseBody],
        FieldMetadata(alias="insideGeofence"),
        pydantic.Field(alias="insideGeofence"),
    ] = None
    out_of_route: typing_extensions.Annotated[
        typing.Optional[OutOfRouteDetailsObjectResponseBody],
        FieldMetadata(alias="outOfRoute"),
        pydantic.Field(alias="outOfRoute"),
    ] = None
    outside_geofence: typing_extensions.Annotated[
        typing.Optional[OutsideGeofenceTriggerDetailsObjectResponseBody],
        FieldMetadata(alias="outsideGeofence"),
        pydantic.Field(alias="outsideGeofence"),
    ] = None
    panic_button: typing_extensions.Annotated[
        typing.Optional[PanicButtonDetailsObjectResponseBody],
        FieldMetadata(alias="panicButton"),
        pydantic.Field(alias="panicButton"),
    ] = None
    reading: typing.Optional[ReadingTriggerDetailsObjectResponseBody] = None
    route_stop_estimated_arrival: typing_extensions.Annotated[
        typing.Optional[RouteStopEstimatedArrivalDetailsObjectResponseBody],
        FieldMetadata(alias="routeStopEstimatedArrival"),
        pydantic.Field(alias="routeStopEstimatedArrival"),
    ] = None
    safety_behavior: typing_extensions.Annotated[
        typing.Optional[SafetyBehaviorTriggerDetailsObjectResponseBody],
        FieldMetadata(alias="safetyBehavior"),
        pydantic.Field(alias="safetyBehavior"),
    ] = None
    scheduled_maintenance: typing_extensions.Annotated[
        typing.Optional[ScheduledMaintenanceTriggerDetailsObjectResponseBody],
        FieldMetadata(alias="scheduledMaintenance"),
        pydantic.Field(alias="scheduledMaintenance"),
    ] = None
    scheduled_maintenance_by_engine_hours: typing_extensions.Annotated[
        typing.Optional[ScheduledMaintenanceByEngineHoursDetailsObjectResponseBody],
        FieldMetadata(alias="scheduledMaintenanceByEngineHours"),
        pydantic.Field(alias="scheduledMaintenanceByEngineHours"),
    ] = None
    scheduled_maintenance_odometer: typing_extensions.Annotated[
        typing.Optional[ScheduledMaintenanceOdometerTriggerDetailsObjectResponseBody],
        FieldMetadata(alias="scheduledMaintenanceOdometer"),
        pydantic.Field(alias="scheduledMaintenanceOdometer"),
    ] = None
    speed: typing.Optional[SpeedTriggerDetailsObjectResponseBody] = None
    sudden_fuel_level_drop: typing_extensions.Annotated[
        typing.Optional[SuddenFuelLevelDropTriggerDetailsObjectResponseBody],
        FieldMetadata(alias="suddenFuelLevelDrop"),
        pydantic.Field(alias="suddenFuelLevelDrop"),
    ] = None
    sudden_fuel_level_rise: typing_extensions.Annotated[
        typing.Optional[SuddenFuelLevelRiseTriggerDetailsObjectResponseBody],
        FieldMetadata(alias="suddenFuelLevelRise"),
        pydantic.Field(alias="suddenFuelLevelRise"),
    ] = None
    tire_fault_code: typing_extensions.Annotated[
        typing.Optional[TireFaultCodeDetailsObjectResponseBody],
        FieldMetadata(alias="tireFaultCode"),
        pydantic.Field(alias="tireFaultCode"),
    ] = None
    training_assignment_near_due_date: typing_extensions.Annotated[
        typing.Optional[TrainingAssignmentNearDueDateTriggerDetailsObjectResponseBody],
        FieldMetadata(alias="trainingAssignmentNearDueDate"),
        pydantic.Field(alias="trainingAssignmentNearDueDate"),
    ] = None
    unassigned_driving: typing_extensions.Annotated[
        typing.Optional[UnassignedDrivingTriggerDetailsObjectResponseBody],
        FieldMetadata(alias="unassignedDriving"),
        pydantic.Field(alias="unassignedDriving"),
    ] = None
    vehicle_battery_voltage: typing_extensions.Annotated[
        typing.Optional[VehicleBatterVoltageDetailsObjectResponseBody],
        FieldMetadata(alias="vehicleBatteryVoltage"),
        pydantic.Field(alias="vehicleBatteryVoltage"),
    ] = None
    vehicle_fault_code: typing_extensions.Annotated[
        typing.Optional[VehicleFaultCodeDetailsObjectResponseBody],
        FieldMetadata(alias="vehicleFaultCode"),
        pydantic.Field(alias="vehicleFaultCode"),
    ] = 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
