{
    "$schema" : "http://json-schema.org/draft-04/schema#",
    "title" : "RouteListItem",
    "type" : "object",
    "additionalProperties" : false,
    "description" : "TAnalytics-v3 .. List Item for route_list in Routes object",
    "properties" : {
        "route_id" : {
            "type" : "string",
            "description" : "The unique id of a route. A route request can return multiple routes and each route will have a unique id."
        },
        "distance": {
            "type": "number",
            "description": "Calculated distance to destination for the specific route in meters"
        },
        "duration": {
            "type": "number",
            "description": "Estimated time in seconds to arrive at the specific route destination considering traffic if available"
        },
        "duration_without_traffic": {
            "type": "number",
            "description": "Estimated time in seconds to arrive at the route destination without traffic"
        },
        "number_of_traffic_lights": {    
            "type": "integer",
            "description": "The number of traffic lights on the route"
        },
        "route_type": {
            "$ref": "/resources/schema/analytics/client/v3/RouteRecommendationType.json",
            "description": "May change for commute route compared to route request"
        },
        "route_position": {
            "type": "integer",
            "description": "Position of route among the alternate route options in the response"
        },
        "legs": {
            "type": "array",
            "items": {
                "$ref": "/resources/schema/analytics/client/v3/item/LegListItem.json"
            },
            "minItems": 1,
            "uniqueItems": true,
            "description": "List of legs returned when available. Depending on content_level contains attributes of each leg of route including to final destination."
        },
        "bluezone_details": {
            "type": "object",
            "additionalProperties": true,
            "minProperties": 1,
            "maxProperties": 50,
            "description": "Log bluezone related attributes",
            "properties": {
                "bz_route_type": {
                    "type": "string",
                    "enum": ["DEFAULT", "MORE_BZ", "OTHER"]
                },
                "bz_percentage": {
                    "type": "number",
                    "description": "% of selected route that has bluezone"
                },
                "bz_length": {
                    "type": "number",
                    "description": "Length of road in miles which has bluezone"
                }
            }
        }
    },
    "required" : [
        "route_id",
        "distance",
        "duration_without_traffic",
        "duration",
        "route_position"
    ]
}