{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "TripDetectionStatus",
    "type": "object",
    "additionalProperties": false,
    "description": "Trip Detection Status Event Schema",
    "properties": {
        "log_context": {
            "$ref": "/resources/schema/analytics/client/v4/LogContext.json",
            "description": "Required Log Context Reference"
        },
        "event_name": {
            "type": "string",
            "enum": [
                "TRIP_DETECTION_STATUS"
            ]
        },
        "schema_definition": {
            "type": "string",
            "enum": [
                "TripDetectionStatus"
            ]
        },
        "detection_status": {
            "type": "string",
            "enum": [
                "START_PENDING",
                "START_DETECTED",
                "START_FAILED",
                "END_PENDING",
                "END_DETECTED", 
                "END_FAILED"
            ],
            "description": "This indicates the status of trip detection status."
        },
        "detection_status_message": {
            "type": "string",
            "description": "Detail explain how this status changes."
        },
        "detection_trigger": {
            "type": "string",
            "enum": [
                "GEOFENCE",
                "MOTION",
                "NETWORK",
                "PERIPHERAL",
                "LOCATION"
            ],
            "description": "This indicates the trigger events of trip detection. Values are restricted as enum values."
        }
    },
    "required": [
        "log_context",
        "event_name",
        "schema_definition",
        "detection_status"
    ]
}
