# 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_request_body import AmbientTemperatureDetailsObjectRequestBody
from .cell_signal_loss_details_object_request_body import CellSignalLossDetailsObjectRequestBody
from .def_level_trigger_details_object_request_body import DefLevelTriggerDetailsObjectRequestBody
from .device_movement_trigger_details_object_request_body import DeviceMovementTriggerDetailsObjectRequestBody
from .driver_document_submitted_details_object_request_body import DriverDocumentSubmittedDetailsObjectRequestBody
from .dvir_submitted_device_trigger_details_object_request_body import (
    DvirSubmittedDeviceTriggerDetailsObjectRequestBody,
)
from .engine_idle_trigger_details_object_request_body import EngineIdleTriggerDetailsObjectRequestBody
from .engine_off_details_object_request_body import EngineOffDetailsObjectRequestBody
from .engine_on_details_object_request_body import EngineOnDetailsObjectRequestBody
from .fuel_level_trigger_details_object_request_body import FuelLevelTriggerDetailsObjectRequestBody
from .gateway_disconnected_details_object_request_body import GatewayDisconnectedDetailsObjectRequestBody
from .gateway_unplugged_trigger_details_object_request_body import GatewayUnpluggedTriggerDetailsObjectRequestBody
from .geofence_entry_trigger_details_object_request_body import GeofenceEntryTriggerDetailsObjectRequestBody
from .geofence_exit_trigger_details_object_request_body import GeofenceExitTriggerDetailsObjectRequestBody
from .gps_signal_loss_details_object_request_body import GpsSignalLossDetailsObjectRequestBody
from .harsh_event_trigger_details_object_request_body import HarshEventTriggerDetailsObjectRequestBody
from .hos_violation_trigger_details_object_request_body import HosViolationTriggerDetailsObjectRequestBody
from .inside_geofence_trigger_details_object_request_body import InsideGeofenceTriggerDetailsObjectRequestBody
from .out_of_route_details_object_request_body import OutOfRouteDetailsObjectRequestBody
from .outside_geofence_trigger_details_object_request_body import OutsideGeofenceTriggerDetailsObjectRequestBody
from .panic_button_details_object_request_body import PanicButtonDetailsObjectRequestBody
from .reading_trigger_details_object_request_body import ReadingTriggerDetailsObjectRequestBody
from .route_stop_estimated_arrival_details_object_request_body import RouteStopEstimatedArrivalDetailsObjectRequestBody
from .safety_behavior_trigger_details_object_request_body import SafetyBehaviorTriggerDetailsObjectRequestBody
from .scheduled_maintenance_by_engine_hours_details_object_request_body import (
    ScheduledMaintenanceByEngineHoursDetailsObjectRequestBody,
)
from .scheduled_maintenance_odometer_trigger_details_object_request_body import (
    ScheduledMaintenanceOdometerTriggerDetailsObjectRequestBody,
)
from .scheduled_maintenance_trigger_details_object_request_body import (
    ScheduledMaintenanceTriggerDetailsObjectRequestBody,
)
from .speed_trigger_details_object_request_body import SpeedTriggerDetailsObjectRequestBody
from .sudden_fuel_level_drop_trigger_details_object_request_body import (
    SuddenFuelLevelDropTriggerDetailsObjectRequestBody,
)
from .sudden_fuel_level_rise_trigger_details_object_request_body import (
    SuddenFuelLevelRiseTriggerDetailsObjectRequestBody,
)
from .tire_fault_code_details_object_request_body import TireFaultCodeDetailsObjectRequestBody
from .training_assignment_near_due_date_trigger_details_object_request_body import (
    TrainingAssignmentNearDueDateTriggerDetailsObjectRequestBody,
)
from .unassigned_driving_trigger_details_object_request_body import UnassignedDrivingTriggerDetailsObjectRequestBody
from .vehicle_batter_voltage_details_object_request_body import VehicleBatterVoltageDetailsObjectRequestBody
from .vehicle_fault_code_details_object_request_body import VehicleFaultCodeDetailsObjectRequestBody


class TriggerParamsObjectRequestBody(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[AmbientTemperatureDetailsObjectRequestBody],
        FieldMetadata(alias="ambientTemperature"),
        pydantic.Field(alias="ambientTemperature"),
    ] = None
    cell_signal_loss: typing_extensions.Annotated[
        typing.Optional[CellSignalLossDetailsObjectRequestBody],
        FieldMetadata(alias="cellSignalLoss"),
        pydantic.Field(alias="cellSignalLoss"),
    ] = None
    def_level: typing_extensions.Annotated[
        typing.Optional[DefLevelTriggerDetailsObjectRequestBody],
        FieldMetadata(alias="defLevel"),
        pydantic.Field(alias="defLevel"),
    ] = None
    device_movement: typing_extensions.Annotated[
        typing.Optional[DeviceMovementTriggerDetailsObjectRequestBody],
        FieldMetadata(alias="deviceMovement"),
        pydantic.Field(alias="deviceMovement"),
    ] = None
    document_submitted: typing_extensions.Annotated[
        typing.Optional[DriverDocumentSubmittedDetailsObjectRequestBody],
        FieldMetadata(alias="documentSubmitted"),
        pydantic.Field(alias="documentSubmitted"),
    ] = None
    dvir_submitted_device: typing_extensions.Annotated[
        typing.Optional[DvirSubmittedDeviceTriggerDetailsObjectRequestBody],
        FieldMetadata(alias="dvirSubmittedDevice"),
        pydantic.Field(alias="dvirSubmittedDevice"),
    ] = None
    engine_idle: typing_extensions.Annotated[
        typing.Optional[EngineIdleTriggerDetailsObjectRequestBody],
        FieldMetadata(alias="engineIdle"),
        pydantic.Field(alias="engineIdle"),
    ] = None
    engine_off: typing_extensions.Annotated[
        typing.Optional[EngineOffDetailsObjectRequestBody],
        FieldMetadata(alias="engineOff"),
        pydantic.Field(alias="engineOff"),
    ] = None
    engine_on: typing_extensions.Annotated[
        typing.Optional[EngineOnDetailsObjectRequestBody],
        FieldMetadata(alias="engineOn"),
        pydantic.Field(alias="engineOn"),
    ] = None
    fuel_level: typing_extensions.Annotated[
        typing.Optional[FuelLevelTriggerDetailsObjectRequestBody],
        FieldMetadata(alias="fuelLevel"),
        pydantic.Field(alias="fuelLevel"),
    ] = None
    gateway_disconnected: typing_extensions.Annotated[
        typing.Optional[GatewayDisconnectedDetailsObjectRequestBody],
        FieldMetadata(alias="gatewayDisconnected"),
        pydantic.Field(alias="gatewayDisconnected"),
    ] = None
    gateway_unplugged: typing_extensions.Annotated[
        typing.Optional[GatewayUnpluggedTriggerDetailsObjectRequestBody],
        FieldMetadata(alias="gatewayUnplugged"),
        pydantic.Field(alias="gatewayUnplugged"),
    ] = None
    geofence_entry: typing_extensions.Annotated[
        typing.Optional[GeofenceEntryTriggerDetailsObjectRequestBody],
        FieldMetadata(alias="geofenceEntry"),
        pydantic.Field(alias="geofenceEntry"),
    ] = None
    geofence_exit: typing_extensions.Annotated[
        typing.Optional[GeofenceExitTriggerDetailsObjectRequestBody],
        FieldMetadata(alias="geofenceExit"),
        pydantic.Field(alias="geofenceExit"),
    ] = None
    gps_signal_loss: typing_extensions.Annotated[
        typing.Optional[GpsSignalLossDetailsObjectRequestBody],
        FieldMetadata(alias="gpsSignalLoss"),
        pydantic.Field(alias="gpsSignalLoss"),
    ] = None
    harsh_event: typing_extensions.Annotated[
        typing.Optional[HarshEventTriggerDetailsObjectRequestBody],
        FieldMetadata(alias="harshEvent"),
        pydantic.Field(alias="harshEvent"),
    ] = None
    hos_violation: typing_extensions.Annotated[
        typing.Optional[HosViolationTriggerDetailsObjectRequestBody],
        FieldMetadata(alias="hosViolation"),
        pydantic.Field(alias="hosViolation"),
    ] = None
    inside_geofence: typing_extensions.Annotated[
        typing.Optional[InsideGeofenceTriggerDetailsObjectRequestBody],
        FieldMetadata(alias="insideGeofence"),
        pydantic.Field(alias="insideGeofence"),
    ] = None
    out_of_route: typing_extensions.Annotated[
        typing.Optional[OutOfRouteDetailsObjectRequestBody],
        FieldMetadata(alias="outOfRoute"),
        pydantic.Field(alias="outOfRoute"),
    ] = None
    outside_geofence: typing_extensions.Annotated[
        typing.Optional[OutsideGeofenceTriggerDetailsObjectRequestBody],
        FieldMetadata(alias="outsideGeofence"),
        pydantic.Field(alias="outsideGeofence"),
    ] = None
    panic_button: typing_extensions.Annotated[
        typing.Optional[PanicButtonDetailsObjectRequestBody],
        FieldMetadata(alias="panicButton"),
        pydantic.Field(alias="panicButton"),
    ] = None
    reading: typing.Optional[ReadingTriggerDetailsObjectRequestBody] = None
    route_stop_estimated_arrival: typing_extensions.Annotated[
        typing.Optional[RouteStopEstimatedArrivalDetailsObjectRequestBody],
        FieldMetadata(alias="routeStopEstimatedArrival"),
        pydantic.Field(alias="routeStopEstimatedArrival"),
    ] = None
    safety_behavior: typing_extensions.Annotated[
        typing.Optional[SafetyBehaviorTriggerDetailsObjectRequestBody],
        FieldMetadata(alias="safetyBehavior"),
        pydantic.Field(alias="safetyBehavior"),
    ] = None
    scheduled_maintenance: typing_extensions.Annotated[
        typing.Optional[ScheduledMaintenanceTriggerDetailsObjectRequestBody],
        FieldMetadata(alias="scheduledMaintenance"),
        pydantic.Field(alias="scheduledMaintenance"),
    ] = None
    scheduled_maintenance_by_engine_hours: typing_extensions.Annotated[
        typing.Optional[ScheduledMaintenanceByEngineHoursDetailsObjectRequestBody],
        FieldMetadata(alias="scheduledMaintenanceByEngineHours"),
        pydantic.Field(alias="scheduledMaintenanceByEngineHours"),
    ] = None
    scheduled_maintenance_odometer: typing_extensions.Annotated[
        typing.Optional[ScheduledMaintenanceOdometerTriggerDetailsObjectRequestBody],
        FieldMetadata(alias="scheduledMaintenanceOdometer"),
        pydantic.Field(alias="scheduledMaintenanceOdometer"),
    ] = None
    speed: typing.Optional[SpeedTriggerDetailsObjectRequestBody] = None
    sudden_fuel_level_drop: typing_extensions.Annotated[
        typing.Optional[SuddenFuelLevelDropTriggerDetailsObjectRequestBody],
        FieldMetadata(alias="suddenFuelLevelDrop"),
        pydantic.Field(alias="suddenFuelLevelDrop"),
    ] = None
    sudden_fuel_level_rise: typing_extensions.Annotated[
        typing.Optional[SuddenFuelLevelRiseTriggerDetailsObjectRequestBody],
        FieldMetadata(alias="suddenFuelLevelRise"),
        pydantic.Field(alias="suddenFuelLevelRise"),
    ] = None
    tire_fault_code: typing_extensions.Annotated[
        typing.Optional[TireFaultCodeDetailsObjectRequestBody],
        FieldMetadata(alias="tireFaultCode"),
        pydantic.Field(alias="tireFaultCode"),
    ] = None
    training_assignment_near_due_date: typing_extensions.Annotated[
        typing.Optional[TrainingAssignmentNearDueDateTriggerDetailsObjectRequestBody],
        FieldMetadata(alias="trainingAssignmentNearDueDate"),
        pydantic.Field(alias="trainingAssignmentNearDueDate"),
    ] = None
    unassigned_driving: typing_extensions.Annotated[
        typing.Optional[UnassignedDrivingTriggerDetailsObjectRequestBody],
        FieldMetadata(alias="unassignedDriving"),
        pydantic.Field(alias="unassignedDriving"),
    ] = None
    vehicle_battery_voltage: typing_extensions.Annotated[
        typing.Optional[VehicleBatterVoltageDetailsObjectRequestBody],
        FieldMetadata(alias="vehicleBatteryVoltage"),
        pydantic.Field(alias="vehicleBatteryVoltage"),
    ] = None
    vehicle_fault_code: typing_extensions.Annotated[
        typing.Optional[VehicleFaultCodeDetailsObjectRequestBody],
        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
