{
	"$schema": "http://json-schema.org/draft-04/schema#",
	"title": "Routes",
	"type": "object",
	"additionalProperties": false,
	"description": "Analytics-v3 .. Routes object which contains all routes generated during a route request",
	"properties": {
		"log_context": {
			"$ref": "/resources/schema/analytics/client/v3/LogContext.json",
			"description": "Required Log Context Reference"
		},
		"event_name": {
			"type": "string",
			"enum": ["ROUTES"]
		},
		"schema_definition": {
			"type": "string",
			"enum": ["Routes"]
		},
		"request_id": {
			"type": "string",
			"description": "Unique identifier for the route request"
		},
		"origin_lat": {
			"type": "number",
			"description": "Latitude of origin"
		},
		"origin_lon": {
			"type": "number",
			"description": "Longitude of origin"
		},
		"trigger": {
			"$ref": "/resources/schema/analytics/client/v3/RouteTriggerType.json",
			"description": "Required .. The purpose of the Route calculation depending on what action triggered it. If a drive was paused and resumed later by clicking on Resume Route, trigger would be ResumeRoute. Calculation of route to original destination from Waypoint-ResumeFromWP. If user manually alters a step in the Navigation direction Listing by adding a detour, log as Detour"
		},
		"request_route_type": {
			"$ref": "/resources/schema/analytics/client/v3/RouteRecommendationType.json",
			"description": "The type of route requested like personalized, fastest, etc."
		},
		"caused_by": {
			"$ref": "/resources/schema/analytics/client/v3/DetourCauseType.json",
			"description": "If the trigger is detour, then the reason for detour."
		},
		"number_of_routes_requested": {
			"type": "integer",
			"description": "The number of routes requested"
		},
		"content_level": {
			"type": "string",
			"description": "The level of details required for the content",
			"enum": ["FULL", "OVERVIEW", "ETA"]

		},
		"destinations": {
			"type": "array",
			"items": {
				"$ref": "/resources/schema/analytics/client/v3/item/RouteDestinationItem.json"
			}
		},
		"route_list": {
			"type": "array",
			"items": {
				"$ref": "/resources/schema/analytics/client/v3/item/RouteListItem.json"
			},
			"minItems": 1,
			"uniqueItems": true,
			"description": "List of routes returned and their attributes like route_id, origin, destination and others"
		},
		"source": {
			"$ref": "/resources/schema/analytics/client/v3/ConnectionType.json",
			"description": "States the connection type whether it is onboard or cloud connection."
		},
		"response_time": {
			"type": "number",
			"description": "Required .. Response time to each request in milliseconds."
		},
		"edge_id": {
			"type": "string",
			"description": "Edge id at the point deviation occurred when trigger is deviation. Sent as part of route request in the format 'lower_(lower_value), upper_(upper_value)'. Example 'lower_20, upper_30'"
		},
		"request_avoid_edges": {
			"type": "array",
			"items":{
				"type": "string"
			},
			"minItems": 1,
			"uniqueItems": true,
			"description": "List of edges to be avoided. Each edge in format 'lower_(lower_value), upper_(upper_value)'"
		},
		"request_route_options": {
			"type": "array",
			"items": {
				"$ref": "/resources/schema/analytics/client/v3/type/RouteRequestOptions.json"
			},
			"description": "Log which route options were part of request"
		},
		"interaction_method": {
			"$ref": "/resources/schema/analytics/client/v3/InteractionMethodValues.json",
			"description": "for each user interaction log the interation method"
		},
		"heading": {
			"type": "integer",
			"description": "The vehicle heading angle w.r.t North. A degree value (0-360). The default is -1"
		},
		"speed": {
			"type": "number",
			"description": "Current speed of the vehicle in m/s"
		}
	},
	"required": [
		"log_context",
		"event_name",
		"schema_definition",
		"request_id",
		"origin_lat",
		"origin_lon",
		"destinations",
		"trigger",
		"number_of_routes_requested",
		"route_list",
		"response_time"
	]
}