{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Speeding",
    "type": "object",
    "additionalProperties": false,
    "description": "Description a speeding event that contains all profile information, and details speeding ranges.",
    "properties": {
        "log_context": {
            "$ref": "/resources/schema/analytics/client/v4/LogContext.json",
            "description": "Required Log Context Reference"
        },
        "event_name": {
            "type": "string",
            "enum": [
                "SPEEDING"
            ]
        },
        "schema_definition": {
            "type": "string",
            "enum": [
                "Speeding"
            ]
        },
        "speeding_start_prob_item": {
            "$ref": "/resources/schema/analytics/client/v4/type/ProbeListItemType.json",
            "description": "The first GPS probe item which exceed the speed limit"
        },
        "speeding_end_prob_item": {
            "$ref": "/resources/schema/analytics/client/v4/type/ProbeListItemType.json",
            "description": "The last GPS probe item which exceed the speed limit"
        },
        "max_speed_prob_item": {
            "$ref": "/resources/schema/analytics/client/v4/type/ProbeListItemType.json",
            "description": "The GPS probe item which record the max speed during this speeding event"
        },
        "speeding_duration": {
            "type": "integer",
            "description": "Speeding duration in ms"
        },
        "speeding_distance": {
            "type": "number",
            "description": "Speeding distance in meters"
        },
        "average_speed": {
            "type": "number",
            "description": "Average speed of the device during this speeding item in meters per second"
        },
        "speeding_details": {
            "type": "array",
            "items": {
                "$ref": "/resources/schema/analytics/client/v4/type/SpeedingItem.json"
            },
            "description": "list of speeding items, it will describe different speeding phases. i.e. gps1 -> gps2 exceed speeding type LOW, gps3 -> gps4 exceed speeding type MEDIUM"
        }
    },
    "required": [
        "log_context",
        "event_name",
        "schema_definition",
        "speeding_start_prob_item",
        "speeding_end_prob_item",
        "speeding_duration",
        "speeding_distance",
        "speeding_details"
    ]
}