# 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 .trigger_params_object_response_body import TriggerParamsObjectResponseBody


class WorkflowTriggerObjectResponseBody(UniversalBaseModel):
    """
    The trigger of an alert.
    """

    trigger_params: typing_extensions.Annotated[
        typing.Optional[TriggerParamsObjectResponseBody],
        FieldMetadata(alias="triggerParams"),
        pydantic.Field(alias="triggerParams"),
    ] = None
    trigger_type_id: typing_extensions.Annotated[
        int,
        FieldMetadata(alias="triggerTypeId"),
        pydantic.Field(
            alias="triggerTypeId",
            description="The id of the trigger type. Reference the following list for the ids:\n\nAmbient Temperature = 1003\nAsset Reading = 1062\nDVIR Submitted for Asset = 5005\nDriver Recorded = 5027\nSudden Fuel Level Rise = 5034\nSudden Fuel Level Drop = 5035\nTraining Assignment Due Soon = 8003\nTraining Assignment Past Due = 8004\nVehicle Speed = 1000\nFuel Level (Percentage) = 1005\nVehicle DEF Level (Percentage) = 1006\nVehicle Battery = 1007\nGateway Unplugged = 1009\nDashcam Disconnected = 1012\nCamera Connector Disconnected = 1046\nAsset starts moving = 1013\nInside Geofence = 1014\nOutside Geofence = 1020\nUnassigned Driving = 1016\nDriver HOS Violation = 1018\nVehicle Engine Idle = 1019\nAsset Engine On = 1021\nAsset Engine Off = 1022\nScheduled Maintenance = 1024\nScheduled Maintenance by Odometer = 1025\nScheduled Maintenance by Engine Hours = 1026\nOut of Route = 1027\nGPS Signal Loss = 1032\nCell Signal Loss = 1033\nFault Code = 1029\nTire Faults = 1043\nGateway Disconnected = 1030\nPanic Button = 1034\nTampering Detected = 1045\nIf vehicle is severely speeding (as defined by your organization) = 5022\nDriver Document Submitted = 5009\nDriver App Sign In = 5012\nDriver App Sign Out = 5013\nGeofence Entry = 5016\nGeofence Exit = 5017\nRoute Stop ETA Alert = 5018\nA safety event occurred with a driver assigned = 5033\nA safety event occurred = 5039\nScheduled Date And Time = 8001\n\nThe following trigger types are Deprecated:\nHarsh Event = 1023",
        ),
    ]

    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
