{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "SpeedingItem",
    "type": "object",
    "additionalProperties": false,
    "description": "Information about the start and end gps prob items of speeding on the same road type, and with the same speed limit, and with the same speeding type.",
    "properties": {
        "speeding_start_prob_item": {
            "$ref": "/resources/schema/analytics/client/v4/type/ProbeListItemType.json",
            "description": "The first gps prob item which exceed the speed limit"
        },
        "speeding_end_prob_item": {
            "$ref": "/resources/schema/analytics/client/v4/type/ProbeListItemType.json",
            "description": "The last gps prob item which exceed the speed limit"
        },
        "max_speed_prob_item": {
            "$ref": "/resources/schema/analytics/client/v4/type/ProbeListItemType.json",
            "description": "The pgs prob item which record the max speed in this speeding item"
        },
        "road_type": {
            "$ref": "/resources/schema/analytics/client/v4/type/RoadType.json",
            "description": "Uniform road type for speeding ranges"
        },
        "speed_limit": {
            "type": "number",
            "description": "Uniform speed limit for speeding ranges"
        },
        "speeding_type": {
            "type": "string",
            "description": "Uniform speeding type for speeding ranges: e.g. LOW/MEDIUM/HIGH. For speed limit 65(mile), exceeding limit with 5 mile can be considered as LOW, while for speed limit 25(mile), exceeding limit with 5 mile could be considered MEDIUM",
            "enum": [
                "LOW",
                "MEDIUM",
                "HIGH"
            ]
        },
        "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"
        },
        "speed_details": {
            "type": "array",
            "items": {
                "type": "number"
            },
            "description": "list of all actual speed during this speeding item"
        }
    },
    "required": [
        "speeding_start_prob_item",
        "speeding_end_prob_item",
        "road_type",
        "speed_limit",
        "speeding_type",
        "speeding_duration",
        "speeding_distance",
        "average_speed"
    ]
}