{
	"type": "object",
	"description": "Route solving result payload that includes route geometry and directions.",
	"properties": {
		"routeGeometry": {
			"description": "The geometry of the route represented as an Esri polyline.",
			"$ref": "#/$defs/EsriPolyline"
		},
		"directions": {
			"description": "A list of step-by-step directions for navigating the route.",
			"type": "array",
			"items": {
				"$ref": "#/$defs/DirectionStep"
			},
			"minItems": 1
		},
		"duration": {
			"description": "The total time of the route.",
			"type": "number"
		},
		"durationUnits": {
			"description": "The units of measurement for the time. This tool derives it from the units of the Network Dataset property specified as the top-level\ndirectionsTimeAttribute property, not the travel mode units.",
			"type": "string"
		},
		"distance": {
			"description": "The total distance of the route.",
			"type": "number"
		},
		"distanceUnits": {
			"description": "The units of measurement for the distance. This tool derives it from the units of the Network Dataset property specified as the top-level\ndirectionsLengthUnits property, not the travel mode units.",
			"type": "string"
		}
	},
	"required": [
		"routeGeometry",
		"directions",
		"duration",
		"durationUnits",
		"distance",
		"distanceUnits"
	],
	"$defs": {
		"EsriPolyline": {
			"type": "object",
			"properties": {
				"type": {
					"description": "The geometry type, which is always esriGeometryPolyline for route geometries.",
					"type": "string",
					"const": "esriGeometryPolyline"
				},
				"spatialReference": {
					"description": "The spatial reference of the route geometry.",
					"type": "object",
					"properties": {
						"wkid": {
							"description": "The well-known ID (WKID) of the spatial reference.",
							"type": "integer"
						},
						"latestWkid": {
							"description": "The latest WKID of the spatial reference.",
							"type": "integer"
						}
					},
					"required": [
						"wkid"
					]
				},
				"paths": {
					"description": "The paths that make up the route geometry. Each path is an array of points, and each point is an array of coordinates (x, y),\n(x, y, z), or (x, y, z, m).",
					"type": "array",
					"items": {
						"type": "array",
						"items": {
							"type": "array",
							"items": {
								"type": "number"
							}
						}
					}
				}
			},
			"required": [
				"type",
				"spatialReference",
				"paths"
			]
		},
		"DirectionStep": {
			"type": "object",
			"properties": {
				"instruction": {
					"description": "A textual instruction of what the step involves.",
					"type": "string"
				},
				"duration": {
					"description": "The duration of the step in the route.",
					"type": "number"
				},
				"durationUnits": {
					"description": "The units of measurement for the duration. This tool derives it from the units of the Network Dataset property specified as the\ntop-level directionsTimeAttribute property, not the travel mode\nunits.",
					"type": "string"
				},
				"distance": {
					"description": "The distance of the step in the route.",
					"type": "number"
				},
				"distanceUnits": {
					"description": "The units of measurement for the distance. This tool derives it from the units of the Network Dataset property specified as the top-level\ndirectionsLengthUnits property, not the travel mode units.",
					"type": "string"
				}
			},
			"required": [
				"instruction",
				"duration",
				"durationUnits",
				"distance",
				"distanceUnits"
			]
		}
	}
}