diff --git a/specification/maps/data-plane/Route/preview/2023-10-01-preview/examples/PostRouteDirections.json b/specification/maps/data-plane/Route/preview/2023-10-01-preview/examples/PostRouteDirections.json new file mode 100644 index 000000000000..82c3da963f10 --- /dev/null +++ b/specification/maps/data-plane/Route/preview/2023-10-01-preview/examples/PostRouteDirections.json @@ -0,0 +1,485 @@ +{ + "parameters": { + "api-version": "2023-10-01-preview", + "routeDirectionsRequest": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "coordinates": [ + -122.201399, + 47.608678 + ], + "type": "Point" + }, + "properties": { + "pointIndex": 0, + "pointType": "waypoint" + } + }, + { + "type": "Feature", + "geometry": { + "coordinates": [ + -122.20687, + 47.612002 + ], + "type": "Point" + }, + "properties": { + "pointIndex": 1, + "pointType": "viaWaypoint" + } + }, + { + "type": "Feature", + "geometry": { + "coordinates": [ + -122.201669, + 47.615076 + ], + "type": "Point" + }, + "properties": { + "pointIndex": 2, + "pointType": "waypoint" + } + } + ], + "optimizeRoute": "fastestWithoutTraffic", + "routeOutputOptions": [ + "routePath" + ], + "maxRouteCount": 3, + "travelMode": "driving" + } + }, + "responses": { + "200": { + "body": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + -122.20147, + 47.608676 + ] + }, + "properties": { + "type": "Waypoint", + "routePathPoint": { + "legIndex": 0, + "pointIndex": 0 + }, + "order": { + "inputIndex": 0 + }, + "compassDirection": "north", + "instruction": { + "formattedText": "Head north on Bellevue Way SE toward SE 1st St", + "maneuverType": "DepartStart", + "text": "Head north on Bellevue Way SE toward SE 1st St" + }, + "sideOfStreet": "Unknown", + "towardsRoadName": "SE 1st St", + "distanceInMeters": 98.2, + "durationInSeconds": 19, + "steps": [ + { + "routePathRange": { + "legIndex": 0, + "range": [ + 0, + 1 + ] + }, + "maneuverType": "DepartStart", + "compassDegrees": 358, + "roadType": "Arterial", + "names": [ + "Bellevue Way SE" + ] + } + ], + "travelMode": "driving" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + -122.201495, + 47.610109 + ] + }, + "properties": { + "type": "ManeuverPoint", + "routePathPoint": { + "legIndex": 0, + "pointIndex": 1 + }, + "compassDirection": "north", + "instruction": { + "formattedText": "Turn left onto Main st", + "maneuverType": "TurnLeft", + "text": "Turn left onto Main st" + }, + "sideOfStreet": "Unknown", + "distanceInMeters": 253.5, + "durationInSeconds": 81, + "steps": [ + { + "routePathRange": { + "legIndex": 0, + "range": [ + 1, + 3 + ] + }, + "maneuverType": "TurnLeft", + "compassDegrees": 358, + "roadType": "Arterial", + "names": [ + "Main st" + ] + } + ], + "travelMode": "driving" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + -122.206817, + 47.610185 + ] + }, + "properties": { + "type": "ManeuverPoint", + "routePathPoint": { + "legIndex": 0, + "pointIndex": 3 + }, + "compassDirection": "north", + "instruction": { + "formattedText": "Turn right onto 100th Ave NE", + "maneuverType": "TurnRight", + "text": "Turn right onto 100th Ave NE" + }, + "sideOfStreet": "Unknown", + "distanceInMeters": 252.9, + "durationInSeconds": 49, + "steps": [ + { + "routePathRange": { + "legIndex": 0, + "range": [ + 3, + 5 + ] + }, + "maneuverType": "TurnRight", + "compassDegrees": 357, + "roadType": "Arterial", + "names": [ + "100th Ave NE" + ] + } + ], + "travelMode": "driving" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + -122.206971, + 47.61384 + ] + }, + "properties": { + "type": "ManeuverPoint", + "routePathPoint": { + "legIndex": 0, + "pointIndex": 6 + }, + "compassDirection": "east", + "instruction": { + "formattedText": "Turn right onto NE 4th St", + "maneuverType": "TurnRight", + "text": "Turn right onto NE 4th St" + }, + "sideOfStreet": "Unknown", + "distanceInMeters": 247.9, + "durationInSeconds": 77, + "steps": [ + { + "routePathRange": { + "legIndex": 0, + "range": [ + 6, + 9 + ] + }, + "maneuverType": "TurnRight", + "compassDegrees": 90, + "roadType": "Arterial", + "names": [ + "NE 4th St" + ] + } + ], + "travelMode": "driving" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + -122.201664, + 47.61386 + ] + }, + "properties": { + "type": "ManeuverPoint", + "routePathPoint": { + "legIndex": 0, + "pointIndex": 9 + }, + "compassDirection": "east", + "instruction": { + "formattedText": "Turn left onto Bellevue Way NE", + "maneuverType": "TurnLeft", + "text": "Turn left onto Bellevue Way NE" + }, + "sideOfStreet": "Unknown", + "distanceInMeters": 94.4, + "durationInSeconds": 38, + "steps": [ + { + "routePathRange": { + "legIndex": 0, + "range": [ + 9, + 11 + ] + }, + "maneuverType": "TurnLeft", + "compassDegrees": 91, + "roadType": "Arterial", + "names": [ + "Bellevue Way NE" + ] + } + ], + "travelMode": "driving" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + -122.201603, + 47.615137 + ] + }, + "properties": { + "type": "Waypoint", + "routePathPoint": { + "legIndex": 0, + "pointIndex": 11 + }, + "order": { + "inputIndex": 2 + }, + "compassDirection": "north", + "instruction": { + "formattedText": "Arrive at Bellevue Way NE", + "maneuverType": "ArriveFinish", + "text": "Arrive at Bellevue Way NE", + "hints": [ + { + "hintType": "PreviousIntersection", + "text": "The last intersection before your destination is NE 4th St" + } + ] + }, + "sideOfStreet": "Unknown", + "distanceInMeters": 0.0, + "durationInSeconds": 0, + "steps": [ + { + "routePathRange": { + "legIndex": 0, + "range": [ + 11, + 11 + ] + }, + "maneuverType": "ArriveFinish", + "compassDegrees": 357, + "roadType": "Arterial", + "names": [ + "Bellevue Way NE" + ] + } + ], + "travelMode": "driving" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ + -122.206894, + 47.612001 + ] + }, + "properties": { + "type": "ViaWaypoint", + "names": [ + "100th Ave NE" + ], + "routePathPoint": { + "pointIndex": 5, + "legIndex": 0 + }, + "order": { + "inputIndex": 1 + } + } + }, + { + "type": "Feature", + "geometry": { + "type": "MultiLineString", + "coordinates": [ + [ + [ + -122.20147, + 47.608675 + ], + [ + -122.201494, + 47.610108 + ], + [ + -122.201496, + 47.610196 + ], + [ + -122.206817, + 47.610185 + ], + [ + -122.206824, + 47.610369 + ], + [ + -122.206893, + 47.612001 + ], + [ + -122.20697, + 47.613839 + ], + [ + -122.206832, + 47.613839 + ], + [ + -122.204428, + 47.61379 + ], + [ + -122.201664, + 47.61386 + ], + [ + -122.201547, + 47.613857 + ], + [ + -122.201603, + 47.615137 + ] + ] + ] + }, + "bbox": [ + 47.608676, + -122.206971, + 47.615137, + -122.20147 + ], + "properties": { + "type": "RoutePath", + "resourceId": "v70,h-1241513931,i0,a0,cen-US,dAMA8xD0s2wg1,y1,s3,m1,o1,t4,wuOUjKenNR0CdnKG444xewA2~AISjUSdxkDoBAADgAdG_yz4A0~QmVsbGV2dWUgV2F5IFNF0~~~~~~~~v12,wFYvfFFbOR0CBIatbPY1ewA2~AISjUScpizoBAADgARBojT4A0~MTAwdGggQXZlIE5F0~~~1~~~~~v12,w-kZ0z7rOR0B95xcl6IxewA2~AISjUSchJDoBAADgAQAAgD8A0~QmVsbGV2dWUgV2F5IE5F0~~~~~~~~v12,k0,qatt:1", + "distanceInMeters": 947.0, + "durationInSeconds": 266, + "durationTrafficInSeconds": 295, + "trafficDataUsed": "None", + "trafficCongestion": "Mild", + "departureTime": "2023-08-28T18:00:00+00:00", + "arrivalTime": "2023-08-28T18:04:55+00:00", + "legs": [ + { + "description": "100th Ave NE, NE 4th St", + "routePathRange": { + "range": [ + 0, + 11 + ], + "legIndex": 0 + }, + "subLegs": [ + { + "routePathRange": { + "range": [ + 0, + 5 + ], + "legIndex": 0 + }, + "distanceInMeters": 477.8, + "durationInSeconds": 128, + "durationTrafficInSeconds": 138 + }, + { + "routePathRange": { + "range": [ + 5, + 11 + ], + "legIndex": 0 + }, + "distanceInMeters": 469.1, + "durationInSeconds": 137, + "durationTrafficInSeconds": 157 + } + ], + "distanceInMeters": 947.0, + "durationInSeconds": 266, + "durationTrafficInSeconds": 295, + "departureTime": "2023-08-28T18:00:00+00:00", + "arrivalTime": "2023-08-28T18:04:55+00:00" + } + ] + } + } + ] + } + } + } +} diff --git a/specification/maps/data-plane/Route/preview/2023-10-01-preview/examples/PostRouteDirectionsBatch.json b/specification/maps/data-plane/Route/preview/2023-10-01-preview/examples/PostRouteDirectionsBatch.json new file mode 100644 index 000000000000..87fe91d60e8d --- /dev/null +++ b/specification/maps/data-plane/Route/preview/2023-10-01-preview/examples/PostRouteDirectionsBatch.json @@ -0,0 +1,175 @@ +{ + "parameters": { + "api-version": "2023-10-01-preview", + "routeDirectionsBatchRequest": { + "batchItems": [ + { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "coordinates": [ + -122.3368, + 47.614988 + ], + "type": "Point" + }, + "properties": { + "pointIndex": 0, + "pointType": "waypoint" + } + }, + { + "type": "Feature", + "geometry": { + "coordinates": [ + -122.316067, + 47.606356 + ], + "type": "Point" + }, + "properties": { + "pointIndex": 1, + "pointType": "waypoint" + } + } + ], + "optimizeRoute": "fastestWithoutTraffic", + "routeOutputOptions": [ + "routeSummary" + ], + "maxRouteCount": 3, + "travelMode": "driving" + }, + { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "coordinates": [ + -122.3368, + 47.614988 + ], + "type": "Point" + }, + "properties": { + "pointIndex": 0, + "pointType": "waypoint" + } + }, + { + "type": "Feature", + "geometry": { + "coordinates": [ + -122.316067, + 47.606356 + ], + "type": "Point" + }, + "properties": { + "pointIndex": 1, + "pointType": "waypoint" + } + } + ], + "optimizeRoute": "fastestWithoutTraffic", + "routeOutputOptions": [ + "routeSummary" + ], + "maxRouteCount": 3, + "travelMode": "driving" + } + ] + } + }, + "responses": { + "200": { + "body": { + "summary": { + "successfulRequests": 2, + "totalRequests": 2 + }, + "batchItems": [ + { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "MultiLineString", + "coordinates": [] + }, + "properties": { + "type": "RoutePath", + "resourceId": "v70,h1207959581,i0,a0,cen-US,dAMA8xD0s2wg1,y1,s1,m1,o1,t0,wWrdB7bfOR0C9UpYhjpVewA2~AJEAEzSxZiQBAADgAYsYlD4B0~N3RoIEF2ZQ2~~~~~~~~v12,w393KEp3NR0ASFhVxOpRewA2~AJEAEzQ5viQBAADgAaehWT4B0~RSBKZWZmZXJzb24gU3Q1~~~~~~~~v12,k0,n2", + "distanceInMeters": 1432.9, + "durationInSeconds": 524, + "durationTrafficInSeconds": 554 + } + } + ], + "optionalId": "4C3681A6C8AA4AC3441412763A2A25C81444DC8B" + }, + { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "MultiLineString", + "coordinates": [] + }, + "properties": { + "type": "RoutePath", + "resourceId": "v70,h1207959581,i0,a0,cen-US,dAMA8xD0s2wg1,y1,s1,m1,o1,t0,wWrdB7bfOR0C9UpYhjpVewA2~AJEAEzSxZiQBAADgAYsYlD4B0~N3RoIEF2ZQ2~~~~~~~~v12,w393KEp3NR0ASFhVxOpRewA2~AJEAEzQ5viQBAADgAaehWT4B0~RSBKZWZmZXJzb24gU3Q1~~~~~~~~v12,k0,n2", + "distanceInMeters": 1432.9, + "durationInSeconds": 524, + "durationTrafficInSeconds": 554 + } + } + ], + "optionalId": "4C3681A6C8AA4AC3441412763A2A25C81444DC8B" + } + ] + } + }, + "207": { + "body": { + "summary": { + "successfulRequests": 1, + "totalRequests": 2 + }, + "batchItems": [ + { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "MultiLineString", + "coordinates": [] + }, + "properties": { + "type": "RoutePath", + "resourceId": "v70,h1207959581,i0,a0,cen-US,dAMA8xD0s2wg1,y1,s1,m1,o1,t0,wWrdB7bfOR0C9UpYhjpVewA2~AJEAEzSxZiQBAADgAYsYlD4B0~N3RoIEF2ZQ2~~~~~~~~v12,w393KEp3NR0ASFhVxOpRewA2~AJEAEzQ5viQBAADgAaehWT4B0~RSBKZWZmZXJzb24gU3Q1~~~~~~~~v12,k0,n2", + "distanceInMeters": 1432.9, + "durationInSeconds": 524, + "durationTrafficInSeconds": 554 + } + } + ], + "optionalId": "4C3681A6C8AA4AC3441412763A2A25C81444DC8B" + }, + { + "error": { + "code": "400 BadRequest", + "message": "Invalid request" + } + } + ] + } + } + } +} diff --git a/specification/maps/data-plane/Route/preview/2023-10-01-preview/route.json b/specification/maps/data-plane/Route/preview/2023-10-01-preview/route.json new file mode 100644 index 000000000000..52ef269a5834 --- /dev/null +++ b/specification/maps/data-plane/Route/preview/2023-10-01-preview/route.json @@ -0,0 +1,2007 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure Maps Route Service", + "version": "2023-10-01-preview", + "description": "Azure Maps Route REST APIs" + }, + "host": "atlas.microsoft.com", + "schemes": [ + "https" + ], + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "securityDefinitions": { + "AADToken": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "These are the [Azure Active Directory OAuth2](https://docs.microsoft.com/azure/active-directory/develop/v1-overview) Flows. When paired with [Azure role-based access](https://docs.microsoft.com/azure/role-based-access-control/overview) control it can be used to control access to Azure Maps REST APIs. Azure role-based access controls are used to designate access to one or more Azure Maps resource account or sub-resources. Any user, group, or service principal can be granted access via a built-in role or a custom role composed of one or more permissions to Azure Maps REST APIs.\n\nTo implement scenarios, we recommend viewing [authentication concepts](https://aka.ms/amauth). In summary, this security definition provides a solution for modeling application(s) via objects capable of access control on specific APIs and scopes.\n\n#### Notes\n* This security definition **requires** the use of the `x-ms-client-id` header to indicate which Azure Maps resource the application is requesting access to. This can be acquired from the [Maps management API](https://aka.ms/amauthdetails).\n* \nThe `Authorization URL` is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Azure Active directory configurations. \n* \nThe Azure role-based access control is configured from the [Azure management plane](https://aka.ms/amrbac) via Azure portal, PowerShell, CLI, Azure SDKs, or REST APIs.\n* \nUsage of the [Azure Maps Web SDK](https://aka.ms/amaadmc) allows for configuration based setup of an application for multiple use cases.\n* Currently, Azure Active Directory [v1.0 or v2.0](https://docs.microsoft.com/azure/active-directory/develop/azure-ad-endpoint-comparison) supports Work, School, and Guests but does not support Personal accounts.", + "scopes": { + "https://atlas.microsoft.com/.default": "https://atlas.microsoft.com/.default" + } + }, + "AzureKey": { + "type": "apiKey", + "description": "This is a shared key that is provisioned when creating an [Azure Maps resource](https://aka.ms/amauth) through the Azure management plane via Azure portal, PowerShell, CLI, Azure SDKs, or REST APIs.\n\n With this key, any application is authorized to access all REST APIs. In other words, these can currently be treated as master keys to the account which they are issued for.\n\n For publicly exposed applications, our recommendation is to use server-to-server access of Azure Maps REST APIs where this key can be securely stored.", + "name": "subscription-key", + "in": "header" + }, + "SasToken": { + "type": "apiKey", + "description": "This is a shared access signature token is created from the List SAS operation on the [Azure Maps resource](https://aka.ms/amauth) through the Azure management plane via Azure portal, PowerShell, CLI, Azure SDKs, or REST APIs.\n\n With this token, any application is authorized to access with Azure role-based access controls and fine-grain control to the expiration, rate, and region(s) of use for the particular token. In other words, the SAS Token can be used to allow applications to control access in a more secured way than the shared key.\n\n For publicly exposed applications, our recommendation is to configure a specific list of allowed origins on the [Map account resource](https://aka.ms/amauth) to limit rendering abuse and regularly renew the SAS Token.", + "name": "SAS Token", + "in": "header" + } + }, + "security": [ + { + "AADToken": [ + "https://atlas.microsoft.com/.default" + ] + }, + { + "AzureKey": [] + }, + { + "SasToken": [] + } + ], + "responses": {}, + "parameters": { + "ApiVersion": { + "name": "api-version", + "description": "Version number of Azure Maps API.", + "type": "string", + "in": "query", + "required": true, + "x-ms-parameter-location": "client" + }, + "Accept-Language": { + "name": "Accept-Language", + "in": "header", + "description": "Language in which routing results should be returned. \n\nRefer to [Supported Languages](https://learn.microsoft.com/en-us/azure/azure-maps/supported-languages#routing-v2-services-preview-supported-languages) for details.", + "required": false, + "type": "string", + "x-ms-parameter-location": "client" + } + }, + "paths": { + "/route/directions": { + "post": { + "description": "**Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\n\nRoute Directions V2 API returns the ideal route between an origin and a destination for automobile (driving), commercial trucks and walking routes, passing through a series of waypoints if they are specified. A waypoint is a specified geographical location defined by longitude and latitude that is used for navigational purposes. The route will consider factors such as current traffic and the typical road speeds on the requested day of the week and time of day.\n\nThe API returns the distance, estimated travel time, and a representation of the route geometry. Additional routing information such as an optimized waypoint order or turn by turn instructions is also available, depending on the parameters used.\n\nRoute Directions takes into account local laws, vehicle dimensions, cargo type, max speed, bridge and tunnel heights to calculate the truck specific route and avoid complex maneuvers and difficult roads. Not all trucks can travel the same routes as other vehicles due to certain restrictions based on the vehicle profile or cargo type. For example, highways often have separate speed limits for trucks, some roads do not allow trucks with flammable or hazardous materials, height and weight restriction on bridges.\n\nRoute Directions supports up to 25 waypoints and up to 10 viaWaypoints between any two waypoints for driving and walking route. Each set of waypoints creates a separate route Leg. ViaWaypoints define the route path and can be used for route construction through specific locations and do not create route Legs like waypoints. Truck route supports up to 150 waypoints and does not support viaWaypoints.\n\nRouting availability in countries/regions is summarized in the [Routing coverage documentation](https://learn.microsoft.com/azure/azure-maps/routing-coverage?pivots=route-v2).\n\n>[!Important]\n>By using this feature, you agree to the preview legal terms. See the [Preview Supplemental Terms](https://azure.microsoft.com/en-us/support/legal/preview-supplemental-terms/) for additional details.\n\n", + "operationId": "Route_PostDirections", + "consumes": [ + "application/geo+json" + ], + "produces": [ + "application/geo+json", + "application/json" + ], + "x-ms-client-name": "Route_PostRouteDirections", + "x-ms-examples": { + "Successfully retrieve a route between an origin and a destination with additional parameters in the body": { + "$ref": "./examples/PostRouteDirections.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ApiVersion" + }, + { + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" + }, + { + "$ref": "#/parameters/Accept-Language" + }, + { + "name": "routeDirectionsRequest", + "in": "body", + "description": "Request body of RouteDirections API in GeoJSON format.", + "required": true, + "schema": { + "$ref": "#/definitions/DirectionsRequest" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/RouteDirectionsResponse" + } + }, + "default": { + "description": "An unexpected error occurred.", + "schema": { + "$ref": "../../../Common/preview/1.0/common.json#/definitions/MapsErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "Error code of the error that occurred." + } + }, + "x-ms-error-response": true + } + } + } + }, + "/route/directions:batch": { + "post": { + "description": "**Directions Batch API**\n\n\n**Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\n\n\nThe Route Directions Batch API sends batches of queries to Route Directions API using just a single API call. The API allows caller to batch up to **100** queries.\n>[!Important]\n>By using this feature, you agree to the preview legal terms. See the [Preview Supplemental Terms](https://azure.microsoft.com/en-us/support/legal/preview-supplemental-terms/) for additional details.\n\n### Submit Synchronous Batch Request\nThe Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The number of batch items is limited to **100** for this API.\n```\nPOST https://atlas.microsoft.com/route/directions:batch?api-version=2023-10-01-preview\n```\n### POST Body for Batch Request\nTo send the _directions_ queries you will use a `POST` request where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to `application/json`. Here's a sample request body containing 2 _directions_ queries:\n\n\n```\n{\n \"batchItems\": [\n {\n \"optionalId\": \"bbc9c0f6-ab52-49d8-a788-a658fa654c94\",\n \"type\": \"FeatureCollection\",\n \"features\": [\n {\n \"type\": \"Feature\",\n \"geometry\": {\n \"coordinates\": [\n -122.3368,\n 47.614988\n ],\n \"type\": \"Point\"\n },\n \"properties\": {\n \"pointIndex\": 0,\n \"pointType\": \"waypoint\"\n }\n },\n {\n \"type\": \"Feature\",\n \"geometry\": {\n \"coordinates\": [\n -122.316067,\n 47.606356\n ],\n \"type\": \"Point\"\n },\n \"properties\": {\n \"pointIndex\": 1,\n \"pointType\": \"waypoint\"\n }\n }\n ],\n \"optimizeRoute\": \"fastestWithoutTraffic\",\n \"routeOutputOptions\": [\n \"routeSummary\"\n ],\n \"maxRouteCount\": 3,\n \"travelMode\": \"driving\"\n },\n {\n \"optionalId\": \"a191de3c-1268-4986-98f0-03f0a5d9302a\",\n \"type\": \"FeatureCollection\",\n \"features\": [\n {\n \"type\": \"Feature\",\n \"geometry\": {\n \"coordinates\": [\n -122.3368,\n 47.614988\n ],\n \"type\": \"Point\"\n },\n \"properties\": {\n \"pointIndex\": 0,\n \"pointType\": \"waypoint\"\n }\n },\n {\n \"type\": \"Feature\",\n \"geometry\": {\n \"coordinates\": [\n -122.316067,\n 47.606356\n ],\n \"type\": \"Point\"\n },\n \"properties\": {\n \"pointIndex\": 1,\n \"pointType\": \"waypoint\"\n }\n }\n ],\n \"optimizeRoute\": \"shortest\",\n \"routeOutputOptions\": [\n \"routeSummary\"\n ],\n \"maxRouteCount\": 2,\n \"travelMode\": \"driving\"\n }\n ]\n}\n ```\n\nA _directions_ batchItem object can accept any of the supported _directions_ [Request body](https://docs.microsoft.com/en-us/rest/api/maps/route-v2/post-directions#request-body) \n\n\nThe batch should contain at least **1** query.\n\n\n### Batch Response Model\nThe batch response contains a `summary` component that indicates the `totalRequests` that were part of the original batch request and `successfulRequests` i.e. queries which were executed successfully. The batch response also includes a `batchItems` array which contains a response for each and every query in the batch request. The `batchItems` will contain the results in the exact same order the original queries were sent in the batch request. Each item is of one of the following types:\n\n - [`DirectionsResponse`](https://docs.microsoft.com/en-us/rest/api/maps/route-v2/post-directions#response) - If the query completed successfully.\n\n - `Error` - If the query failed. The response will contain a `code` and a `message` in this case.\n\n\n", + "operationId": "Route_PostDirectionsBatch", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "x-ms-client-name": "Route_PostRouteDirectionsBatch", + "x-ms-examples": { + "A Route Directions Batch request containing 2 queries": { + "$ref": "./examples/PostRouteDirectionsBatch.json" + } + }, + "parameters": [ + { + "$ref": "../../../Common/preview/1.0/common.json#/parameters/ClientId" + }, + { + "$ref": "#/parameters/ApiVersion" + }, + { + "name": "routeDirectionsBatchRequest", + "in": "body", + "description": "The list of route directions queries/requests to process. The list can contain a max of 100 queries for sync version and must contain at least 1 query.", + "required": true, + "schema": { + "$ref": "#/definitions/DirectionsBatchRequestBody" + } + } + ], + "responses": { + "200": { + "description": "Batch request successfully processed. The response body contains all the batch results.", + "schema": { + "$ref": "#/definitions/DirectionsBatchResponse" + } + }, + "207": { + "description": "Multi-Status. One or more batch items could not be processed and return different status code.", + "schema": { + "$ref": "#/definitions/DirectionsBatchResponse" + } + }, + "default": { + "description": "An unexpected error occurred.", + "schema": { + "$ref": "../../../Common/preview/1.0/common.json#/definitions/MapsErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "Error code of the error that occurred." + } + }, + "x-ms-error-response": true + } + } + } + } + }, + "definitions": { + "DirectionsRequest": { + "description": "This object is the request body.", + "type": "object", + "required": [ + "type", + "features" + ], + "properties": { + "type": { + "$ref": "#/definitions/FeatureTypeEnum" + }, + "features": { + "type": "array", + "description": "Driving and walking routes are defined by a set of waypoints(stops) and viaWaypoints (intermediate locations that the route must pass through). You can have a maximum of 25 waypoints, and a maximum of 10 viaWaypoints between each set of waypoints. Truck route supports up to 150 waypoints and viaWaypoints are not supported.\n\nA route must have a minimum of 2 waypoints and the start and end points of the route cannot be viaWaypoints.\n\nBoth waypoint and viaWaypoint locations must be specified as a valid GeoJSON Point feature object along with pointIndex that specifies the order of the locations. Refer to [RFC 7946](https://www.rfc-editor.org/rfc/rfc7946) for details on the GeoJSON format.", + "minimum": 2, + "items": { + "$ref": "#/definitions/InputWaypointFeaturesItem" + } + }, + "travelMode": { + "description": "The mode of travel for the requested route. If not defined, the default value is \"driving\" that returns the route optimized for cars.\n\n`Note`: For truck travelMode, the requested truck route may not be available for the entire route. Where the truck route is not available for a particular section, the travelMode element of the response for that section will be \"other\".\n\nExample: \"travelMode\":\"driving\"", + "type": "string", + "default": "driving", + "enum": [ + "driving", + "truck", + "walking" + ], + "x-ms-enum": { + "name": "TravelMode", + "modelAsString": true, + "values": [ + { + "value": "driving", + "description": "The returned routes are optimized for cars." + }, + { + "value": "truck", + "description": "The returned routes are optimized for large size trucks based on the vehicle specification." + }, + { + "value": "walking", + "description": "The returned routes are optimized for pedestrians, including the use of sidewalks." + } + ] + } + }, + "departAt": { + "description": "The date and time of departure from the origin point formatted as a dateTime value defined by [RFC 3339, section 5.6](https://www.rfc-editor.org/rfc/rfc3339#section-5.6). When a time zone offset is not specified, UTC will be assumed.\n\nThe departAt value must be in the future in the date-time format or now value to set it to the current time.\n\nExamples:\n\n\"departAt\": \"2023-06-01T09:30:00.000-07:00\"", + "type": "string", + "format": "date-time" + }, + "arriveAt": { + "description": "The date and time of arrival at the destination point formatted as a dateTime value defined by [RFC 3339, section 5.6](https://www.rfc-editor.org/rfc/rfc3339#section-5.6). When a time zone offset is not specified, UTC will be assumed.\n\nThe arriveAt value must be in the future. The arriveAt parameter cannot be used in conjunction with departAt.\n\nExample: \"arriveAt\": \"2023-06-01T09:30:00.000-07:00\"", + "type": "string", + "format": "date-time" + }, + "optimizeRoute": { + "description": "Specifies the parameter to use to optimize the route. If not defined, the default is \"fastestWithoutTraffic\" which returns the route to minimize the travel time without using current traffic information.\n\nExample: \"optimizeRoute\":\"shortest\"", + "type": "string", + "default": "fastestWithoutTraffic", + "enum": [ + "shortest", + "fastestWithoutTraffic", + "fastestAvoidClosureWithoutTraffic", + "fastestWithTraffic" + ], + "x-ms-enum": { + "name": "OptimizeRoute", + "modelAsString": true, + "values": [ + { + "value": "shortest", + "name": "Shortest", + "description": "The route is calculated to minimize the distance. Traffic information is not used." + }, + { + "value": "fastestWithoutTraffic", + "name": "FastestWithoutTraffic", + "description": "Finds the fastest route, without factoring in traffic information." + }, + { + "value": "fastestAvoidClosureWithoutTraffic", + "name": "FastestAvoidClosureWithoutTraffic", + "description": "The route is calculated to minimize the time and avoid road closures. No traffic information except for road closures is used in the calculation. `Note`: Only supported for driving travelMode." + }, + { + "value": "fastestWithTraffic", + "name": "FastestWithTraffic", + "description": "The route is calculated to minimize the time using current traffic information. `Note`: Only supported for driving and truck travelMode." + } + ] + } + }, + "optimizeWaypointOrder": { + "description": "Re-order the route waypoints using a fast heuristic algorithm to reduce the route cost specified with the optimize parameter. The origin and destination are excluded from the optimized waypoint and their position is considered fixed. Acceptable values are true or false.\n\n`Note`: Only supported for truck travelMode.", + "type": "boolean", + "default": false + }, + "avoid": { + "description": "Specifies restrictions that the route calculation should honor when determining the route. Avoid supports multiple values in a request and is only supported for the driving and truck travelMode.\n\nExample: \"avoid\": [\"limitedAccessHighways\", \"tolls\"]", + "type": "array", + "items": { + "type": "string", + "enum": [ + "limitedAccessHighways", + "tollRoads", + "ferries", + "tunnels", + "borderCrossings", + "lowEmissionZones", + "unpavedRoads" + ], + "x-ms-enum": { + "name": "Avoid", + "modelAsString": true, + "values": [ + { + "value": "limitedAccessHighways", + "description": "Avoids the use of limited access highways in the route." + }, + { + "value": "tollRoads", + "description": "Avoids the use of toll roads in the route." + }, + { + "value": "ferries", + "description": "Avoids the use of ferries in the route." + }, + { + "value": "tunnels", + "description": "Avoids the use of tunnels in the route. `Note`: Only supported for truck travelMode." + }, + { + "value": "borderCrossings", + "description": "Avoids crossing country borders in the route." + }, + { + "value": "lowEmissionZones", + "description": "Avoids low-emission zones in the route. `Note`: Only supported for truck travelMode." + }, + { + "value": "unpavedRoads", + "description": "Avoids unpaved roads in the route. `Note`: Only supported for truck travelMode." + } + ] + } + } + }, + "routeOutputOptions": { + "description": "Include the desired route information from the response. By default, the itinerary is included in the response.\n\nSupports multiple values such as \"routeOutputOptions\": [\"routePath\", \"regionTravelSummary\"]", + "type": "array", + "default": [ + "itinerary" + ], + "items": { + "type": "string", + "enum": [ + "routeSummary", + "regionTravelSummary", + "routePath", + "itinerary" + ], + "x-ms-enum": { + "name": "RouteOutputOption", + "modelAsString": true, + "values": [ + { + "value": "routeSummary", + "description": "Include only travel time and distance for the route, and do not provide other information." + }, + { + "value": "regionTravelSummary", + "description": "Include travel summary of distance, time, and toll road distance by two entity types: country (e.g., US, Canada) and administrative division or subregion (e.g., \"state\" in US and \"province\" in Canada). `Note`: Only supported for driving and walking travelMode" + }, + { + "value": "routePath", + "description": "Include a GeoJSON MultiLineString [RFC 7946, section 3.1.5](https://www.rfc-editor.org/rfc/rfc7946#section-3.1.5) that describe the route's path in the response." + }, + { + "value": "itinerary", + "description": "Include detailed directions in the response. Detailed directions are provided as \"ManeuverPoints\" and contain details such as turn-by-turn instructions." + } + ] + } + } + }, + "maxRouteCount": { + "description": "The maximum number of routes to return. Available for the driving and truck travel modes.\n\nFor driving routes, this parameter supports routes with up to two waypoints in addition to the origin and destination and avoid parameter must not be set.\n\nDefault: \"maxRouteCount\":1\n\nMinimum: \"maxRouteCount\":1\n\nMaximum: \"maxRouteCount\":3", + "type": "integer", + "format": "int64", + "minimum": 1, + "maximum": 3 + }, + "heading": { + "description": "The initial directional heading of the vehicle in degrees starting at true North and continuing in clockwise direction. North is 0 degrees, east is 90 degrees, south is 180 degrees, west is 270 degrees. Possible values 0-359", + "type": "integer", + "format": "int64", + "minimum": 0, + "maximum": 359 + }, + "vehicleSpec": { + "description": "Specifies the vehicle attributes such as size, weight, max speed, type of cargo for truck routing only. This helps avoid low bridge clearances, road restrictions, difficult right turns to provide the optimized truck route based on the vehicle specifications.\n\n`Note`: Only supported for truck travelMode", + "$ref": "#/definitions/VehicleSpec" + } + } + }, + "RouteDirectionsResponse": { + "description": "This object is returned from a successful call.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/FeatureCollection" + }, + { + "type": "object", + "description": "Alternative route.", + "properties": { + "alternativeRoutes": { + "description": "Alternative route.", + "type": "array", + "items": { + "$ref": "#/definitions/FeatureCollection" + } + } + } + } + ] + }, + "FeatureCollection": { + "description": "`GeoJSON` FeatureCollection object that contains a list of Features. Refer to [RFC 7946, section 3.3](https://www.rfc-editor.org/rfc/rfc7946#section-3.3) for details.", + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/FeatureTypeEnum" + }, + "features": { + "$ref": "#/definitions/Features" + }, + "nextLink": { + "$ref": "#/definitions/NextLink" + } + } + }, + "RegionTravelSummary": { + "description": "Travel summary of distance, time, and toll road distance by two entity types: country (e.g. US, Canada) and administrative division or subregion (e.g. “state” in US and “province” in Canada).", + "type": "object", + "properties": { + "countryRegion": { + "description": "Country region name.", + "type": "string", + "readOnly": true + }, + "adminDistricts": { + "description": "adminDistrict array.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/AdminDistrict" + } + }, + "distanceInMeters": { + "description": "Length In Meters property", + "type": "number", + "readOnly": true + }, + "durationInSeconds": { + "description": "Estimated travel time in seconds property that includes the delay due to real-time traffic. Note that even when traffic=false travelTimeInSeconds still includes the delay due to traffic. If DepartAt is in the future, travel time is calculated using time-dependent historic traffic data.", + "format": "int64", + "type": "integer", + "readOnly": true + }, + "durationTrafficInSeconds": { + "description": "The time that it takes, in seconds, to travel a corresponding TravelDistance with current traffic conditions. This value is always provided for the complete route and does not depend on the availability of traffic information.", + "format": "int64", + "type": "integer", + "readOnly": true + } + } + }, + "FeatureTypeEnum": { + "type": "string", + "description": "Specifies the `GeoJSON` type. The only supported object type is FeatureCollection. Refer to [RFC 7946](https://www.rfc-editor.org/rfc/rfc7946) for details.", + "enum": [ + "FeatureCollection" + ], + "x-ms-enum": { + "name": "FeatureTypeEnum", + "modelAsString": true, + "values": [ + { + "value": "FeatureCollection", + "description": "Specifies the `GeoJSON` FeatureCollection object type." + } + ] + } + }, + "FeaturesItemTypeEnum": { + "type": "string", + "description": "Specifies the `GeoJSON` type. The only supported object type is Feature. Refer to [RFC 7946](https://www.rfc-editor.org/rfc/rfc7946) for details.", + "enum": [ + "Feature" + ], + "x-ms-enum": { + "name": "FeaturesItemTypeEnum", + "modelAsString": true, + "values": [ + { + "value": "Feature", + "description": "Specifies the `GeoJSON` Feature object type." + } + ] + } + }, + "Bbox": { + "description": "A rectangular area on the earth defined as a bounding box object. The sides of the rectangles are defined by latitude and longitude values. For more information, see [RFC 7946, Section 5](https://www.rfc-editor.org/rfc/rfc7946#section-5).\n\nExample: \"bbox\": [-10.0, -10.0, 10.0, 10.0]", + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "minItems": 4, + "maxItems": 4 + }, + "Features": { + "type": "array", + "description": "`GeoJSON` feature object that contains Geometry object and additional properties. Refer to [RFC 7946, Section 3.2](https://www.rfc-editor.org/rfc/rfc7946#section-3.2) for details.", + "items": { + "$ref": "#/definitions/FeaturesItem" + } + }, + "FeaturesItem": { + "type": "object", + "description": "GeoJSON feature object that contains Geometry object and additional properties of the route.", + "allOf": [ + { + "type": "object", + "description": "GeoJSON feature object that contains Geometry object and additional properties of the route.", + "properties": { + "type": { + "$ref": "#/definitions/FeaturesItemTypeEnum" + }, + "geometry": { + "$ref": "#/definitions/Geometry" + }, + "properties": { + "$ref": "#/definitions/FeatureProperties" + }, + "bbox": { + "$ref": "#/definitions/Bbox" + } + } + } + ] + }, + "Geometry": { + "type": "object", + "description": "A valid `GeoJSON` Geometry object. Please refer to [RFC 7946](https://www.rfc-editor.org/rfc/rfc7946) for details.", + "properties": { + "type": { + "description": "Specifies the geometry type for the 'GeoJSON` Geometry object. Refer to [RFC 7946](https://www.rfc-editor.org/rfc/rfc7946) for details.", + "type": "string" + } + }, + "discriminator": "type", + "required": [ + "type" + ] + }, + "PointGeometry": { + "type": "object", + "description": "Specifies the `GeoJSON` Point Geometry object. Refer to [RFC 7946](https://www.rfc-editor.org/rfc/rfc7946) for details.", + "x-ms-discriminator-value": "Point", + "allOf": [ + { + "$ref": "#/definitions/Geometry" + }, + { + "$ref": "../../../Common/preview/1.0/common.json#/definitions/GeoJsonPoint" + } + ] + }, + "MultiLineStringGeometry": { + "type": "object", + "description": "Specifies the `GeoJSON` MultiLineString Geometry object. Refer to [RFC 7946](https://www.rfc-editor.org/rfc/rfc7946) for details.", + "x-ms-discriminator-value": "MultiLineString", + "allOf": [ + { + "$ref": "#/definitions/Geometry" + }, + { + "$ref": "../../../Common/preview/1.0/common.json#/definitions/GeoJsonMultiLineString" + } + ] + }, + "InputWaypointFeaturesItem": { + "type": "object", + "description": "Specifies the input waypoint and viaWaypoint `GeoJSON` feature object and additional properties. Refer to [RFC 7946](https://www.rfc-editor.org/rfc/rfc7946) for details.", + "properties": { + "type": { + "$ref": "#/definitions/FeaturesItemTypeEnum" + }, + "geometry": { + "$ref": "../../../Common/preview/1.0/common.json#/definitions/GeoJsonPoint" + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/InputWaypointProperties" + } + }, + "required": [ + "type", + "geometry", + "properties" + ] + }, + "InputWaypointProperties": { + "type": "object", + "description": "Specifies the properties of a Waypoint which is a specific location or point along a route or trip that serves as a reference or stopping point.", + "properties": { + "pointIndex": { + "description": "Identify and order the sequence of waypoints in the route. The default value is the `index value` of a features array.", + "format": "int64", + "type": "integer" + }, + "pointType": { + "$ref": "#/definitions/InputWaypointTypeEnum" + } + } + }, + "WaypointProperties": { + "x-ms-discriminator-value": "Waypoint", + "type": "object", + "description": "Specifies the properties of a Waypoint which is a specific location or point along a route or trip that serves as a reference or stopping point.", + "allOf": [ + { + "$ref": "#/definitions/FeatureProperties" + }, + { + "$ref": "#/definitions/NavigationPointProperties" + } + ] + }, + "ManeuverPointProperties": { + "x-ms-discriminator-value": "ManeuverPoint", + "type": "object", + "description": "Specifies the driving instructions and additional properties for each maneuver point in the route Leg.", + "allOf": [ + { + "$ref": "#/definitions/FeatureProperties" + }, + { + "$ref": "#/definitions/NavigationPointProperties" + } + ] + }, + "NavigationPointProperties": { + "description": "Waypoint and ManeuverPoint properties.", + "type": "object", + "properties": { + "routePathPoint": { + "$ref": "#/definitions/RoutePathPoint" + }, + "order": { + "$ref": "#/definitions/Order" + }, + "compassDirection": { + "description": "The direction of travel associated with a maneuver on a route, such as south or southwest.", + "type": "string", + "readOnly": true + }, + "steps": { + "description": "Steps between two consecutive maneuver points.", + "type": "array", + "items": { + "$ref": "#/definitions/Step" + } + }, + "instruction": { + "$ref": "#/definitions/Instruction" + }, + "sideOfStreet": { + "$ref": "#/definitions/SideOfStreetEnum" + }, + "signs": { + "description": "Signage text for the route. There may be more than one sign value.", + "type": "array", + "readOnly": true, + "items": { + "type": "string" + } + }, + "towardsRoadName": { + "description": "The name of the street that the route goes towards in the first ManeuverPoint.", + "type": "string", + "readOnly": true + }, + "exitIdentifier": { + "description": "The name or number of the exit associated with this route step.", + "type": "string", + "readOnly": true + }, + "distanceInMeters": { + "description": "The physical distance in meters covered by this route step.", + "type": "number", + "readOnly": true + }, + "durationInSeconds": { + "description": "The time that it takes, in seconds, to travel a corresponding TravelDistance.", + "format": "int64", + "type": "integer", + "readOnly": true + }, + "travelMode": { + "$ref": "#/definitions/RouteTravelMode" + } + } + }, + "ViaWaypointProperties": { + "x-ms-discriminator-value": "ViaWaypoint", + "type": "object", + "description": "Specifies the properties of a ViaWaypoint which is a waypoint that must be passed through or visited along a route or trip.", + "allOf": [ + { + "$ref": "#/definitions/FeatureProperties" + }, + { + "description": "Specifies the properties of a ViaWaypoint which is a waypoint that must be passed through or visited along a route or trip.", + "type": "object", + "properties": { + "names": { + "description": "A street, highway or intersection where the maneuver occurs. If the maneuver is complex, there may be more than one name field in the details collection. The name field may also have no value. This can occur if the name is not known or if a street, highway or intersection does not have a name.", + "type": "array", + "readOnly": true, + "items": { + "type": "string" + } + }, + "routePathPoint": { + "$ref": "#/definitions/RoutePathPoint" + }, + "order": { + "$ref": "#/definitions/Order" + } + } + } + ] + }, + "RoutePathProperties": { + "x-ms-discriminator-value": "RoutePath", + "type": "object", + "description": "Specifies the properties that describe the route's path in the response.", + "allOf": [ + { + "$ref": "#/definitions/FeatureProperties" + }, + { + "type": "object", + "description": "Specifies the properties that describe the route's path in the response.", + "properties": { + "resourceId": { + "description": "A unique ID for the resource.", + "type": "string", + "readOnly": true + }, + "distanceInMeters": { + "description": "The physical distance in meters covered by the entire route.", + "type": "number", + "readOnly": true + }, + "durationInSeconds": { + "description": "The time that it takes, in seconds, to travel a corresponding TravelDistance.", + "format": "int64", + "type": "integer", + "readOnly": true + }, + "durationTrafficInSeconds": { + "description": "The time that it takes, in seconds, to travel a corresponding TravelDistance with current traffic conditions. This value is always provided for the complete route and does not depend on the availability of traffic information.", + "format": "int64", + "type": "integer", + "readOnly": true + }, + "trafficDataUsed": { + "$ref": "#/definitions/TrafficDataUsedEnum" + }, + "trafficCongestion": { + "$ref": "#/definitions/TrafficCongestionEnum" + }, + "departureTime": { + "description": "The estimated departure time for the leg, which takes into account the traffic conditions, is formatted as a dateTime value defined by [RFC 3339, section 5.6](https://www.rfc-editor.org/rfc/rfc3339#section-5.6). It will reference the timezone offset by either departAt or arrivalAt. If not, then the UTC time will be used.", + "format": "date-time", + "readOnly": true + }, + "arrivalTime": { + "description": "The estimated arrival time for the leg, which takes into account the traffic conditions, is formatted as a dateTime value defined by [RFC 3339, section 5.6](https://www.rfc-editor.org/rfc/rfc3339#section-5.6). It will reference the timezone offset by either departAt or arrivalAt. If not, then the UTC time will be used.", + "format": "date-time", + "readOnly": true + }, + "legs": { + "description": "An array of route Legs. Check route Leg object description for more information.", + "type": "array", + "items": { + "$ref": "#/definitions/Leg" + } + } + } + } + ] + }, + "FeatureProperties": { + "type": "object", + "description": "Specifies the feature properties of the route like itinerary, route Legs and geometry, travel summary.", + "properties": { + "type": { + "$ref": "#/definitions/FeaturePropertiesTypeEnum" + } + }, + "discriminator": "type", + "required": [ + "type" + ] + }, + "FeaturePropertiesTypeEnum": { + "description": "Output type.", + "type": "string", + "readOnly": true, + "enum": [ + "ManeuverPoint", + "Waypoint", + "ViaWaypoint", + "RoutePath" + ], + "x-ms-enum": { + "name": "PropertiesTypeEnum", + "modelAsString": true, + "values": [ + { + "value": "ManeuverPoint", + "description": "A maneuverPoint is a specific point on a route or trip where a change in direction or mode of transportation is required or recommended." + }, + { + "value": "Waypoint", + "description": "A waypoint is a specific location or point along a route or trip that serves as a reference or stopping point." + }, + { + "value": "ViaWaypoint", + "description": "A viaWaypoint is specific waypoint that must be passed through or visited along a route or trip." + }, + { + "value": "RoutePath", + "description": "A routePath is a line that represents the path of a route or trip." + } + ] + } + }, + "InputWaypointTypeEnum": { + "description": "Waypoint type on the route. It can be a stop or an intermediate location that the route must pass through.", + "type": "string", + "default": "waypoint", + "enum": [ + "waypoint", + "viaWaypoint" + ], + "x-ms-enum": { + "name": "InputWaypointTypeEnum", + "modelAsString": true, + "values": [ + { + "value": "waypoint", + "description": "A waypoint is a specific location or point along a route or trip that serves as a reference or stopping point." + }, + { + "value": "viaWaypoint", + "description": "A viaWaypoint is a specific waypoint that must be passed through or visited along a route or trip. `Note`: Only supported for driving travelMode." + } + ] + } + }, + "AdminDistrict": { + "description": "The subdivision name in the country or region for an address. This element is typically treated as the first order administrative subdivision, but in some cases it also contains the second, third, or fourth order subdivision in a country, dependency, or region.", + "type": "object", + "properties": { + "longName": { + "description": "The long name of an address, such as Washington.", + "type": "string", + "readOnly": true + }, + "distanceInMeters": { + "description": "The total distance traveled in meters within the administrative district.", + "type": "number", + "readOnly": true + }, + "durationInSeconds": { + "description": "Estimated travel time in seconds property that includes the delay due to real-time traffic. Note that even when traffic=false travelTimeInSeconds still includes the delay due to traffic. If DepartAt is in the future, travel time is calculated using time-dependent historic traffic data.", + "format": "int64", + "type": "integer", + "readOnly": true + }, + "durationTrafficInSeconds": { + "description": "The time that it takes, in seconds, to travel a corresponding TravelDistance with current traffic conditions. This value is always provided for the complete route and does not depend on the availability of traffic information.", + "format": "int64", + "type": "integer", + "readOnly": true + } + } + }, + "Leg": { + "x-ms-client-name": "RouteLeg", + "description": "Information about a section of a route between two waypoints. More information about the fields contained in a route Leg:", + "type": "object", + "properties": { + "description": { + "description": "A short description of the route.", + "type": "string", + "readOnly": true + }, + "routePathRange": { + "$ref": "#/definitions/RoutePathRange" + }, + "distanceInMeters": { + "description": "The physical distance in meters covered by a route Leg.", + "type": "number", + "readOnly": true + }, + "durationInSeconds": { + "description": "The time that it takes, in seconds, to travel a corresponding TravelDistance.", + "format": "int64", + "type": "integer", + "readOnly": true + }, + "durationTrafficInSeconds": { + "description": "The time that it takes, in seconds, to travel a corresponding TravelDistance with current traffic conditions. This value is always provided for the complete route and does not depend on the availability of traffic information.", + "format": "int64", + "type": "integer", + "readOnly": true + }, + "departureTime": { + "description": "The estimated departure time for the leg, which takes into account the traffic conditions, is formatted as a dateTime value defined by [RFC 3339, section 5.6](https://www.rfc-editor.org/rfc/rfc3339#section-5.6). It will reference the timezone offset by either departAt or arrivalAt. If not, then the UTC time will be used.", + "format": "date-time", + "readOnly": true + }, + "arrivalTime": { + "description": "The estimated arrival time for the leg, which takes into account the traffic conditions, is formatted as a dateTime value defined by [RFC 3339, section 5.6](https://www.rfc-editor.org/rfc/rfc3339#section-5.6). It will reference the timezone offset by either departAt or arrivalAt. If not, then the UTC time will be used.", + "format": "date-time", + "readOnly": true + }, + "subLegs": { + "description": "Information about a segments of the route Leg defined by the route Leg waypoints and any intermediate via-waypoints. For example, if the route Leg has two via-waypoints in addition to start and end waypoints, there would be three (3) route sub-legs.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/SubLeg" + } + }, + "regionTravelSummary": { + "description": "Include travel summary of distance, time, and toll road distance by two entity types: country (e.g. US, Canada) and administrative division or subregion (e.g. “state” in US and “province” in Canada).", + "$ref": "#/definitions/RegionTravelSummary" + } + } + }, + "SubLeg": { + "x-ms-client-name": "RouteSubLeg", + "description": "Information about a segments of the route Leg defined by the route Leg waypoints and any intermediate via-waypoints. For example, if the route Leg has two via-waypoints in addition to start and end waypoints, there would be three (3) route sub-legs.", + "type": "object", + "properties": { + "routePathRange": { + "$ref": "#/definitions/RoutePathRange" + }, + "distanceInMeters": { + "description": "The physical distance in meters covered by the sub-leg.", + "type": "number", + "readOnly": true + }, + "durationInSeconds": { + "description": "The time, in seconds, that it takes to travel the corresponding travelDistance by the sub-leg.", + "format": "int64", + "type": "integer", + "readOnly": true + }, + "durationTrafficInSeconds": { + "description": "The time that it takes, in seconds, to travel a corresponding TravelDistance with current traffic conditions. This value is always provided for the complete route and does not depend on the availability of traffic information.", + "format": "int64", + "type": "integer", + "readOnly": true + } + } + }, + "RoutePathRange": { + "description": "Refers to the range covered by a specific Leg of a route or path.", + "type": "object", + "properties": { + "range": { + "description": "Refers to the range covered by a specific Leg of a route or path.", + "type": "array", + "readOnly": true, + "maximum": 2, + "maxItems": 2, + "items": { + "format": "int64", + "type": "integer" + } + }, + "legIndex": { + "$ref": "#/definitions/LegIndex" + } + } + }, + "RoutePathPoint": { + "description": "Refers to the index of a point within a specific Leg of a route.", + "type": "object", + "properties": { + "legIndex": { + "$ref": "#/definitions/LegIndex" + }, + "pointIndex": { + "description": "Index of a point within a specific Leg.", + "format": "int64", + "type": "integer", + "readOnly": true + } + } + }, + "LegIndex": { + "description": "The route Leg index is a sequential number assigned to each Leg of the route to help identify and distinguish between different segments of the route.", + "readOnly": true, + "format": "int64", + "type": "integer" + }, + "Hint": { + "description": "Additional information that may be helpful in following a route. In addition to the hint text, this element has an attribute hintType that specifies what the hint refers to, such as “NextIntersection.” Hint is an optional element.", + "type": "object", + "properties": { + "hintType": { + "description": "hint type.", + "type": "string", + "readOnly": true + }, + "text": { + "description": "hint text.", + "type": "string", + "readOnly": true + } + } + }, + "Step": { + "x-ms-client-name": "RouteStep", + "description": "A route Leg contain turn-by-turn instructions. A step refers to a range of a route between two consecutive maneuverPoint.", + "type": "object", + "properties": { + "compassDegrees": { + "description": "The direction in degrees.", + "readOnly": true, + "type": "number" + }, + "maneuverType": { + "readOnly": true, + "$ref": "#/definitions/ManeuverTypeEnum" + }, + "names": { + "description": "A street, highway or intersection where the maneuver occurs. If the maneuver is complex, there may be more than one name field in the details collection. The name field may also have no value. This can occur if the name is not known or if a street, highway or intersection does not have a name.", + "type": "array", + "readOnly": true, + "items": { + "type": "string" + } + }, + "routePathRange": { + "$ref": "#/definitions/RoutePathRange" + }, + "roadType": { + "readOnly": true, + "$ref": "#/definitions/RoadTypeEnum" + } + } + }, + "ManeuverTypeEnum": { + "description": "The type of maneuver described by this detail collection. The ManeuverType in A detail collection can provide information for a portion of the maneuver described by the maneuverType attribute of the corresponding Instruction. For example the maneuverType attribute of an Instruction may specify TurnLeftThenTurnRight as the maneuver while the associated detail items may specify specifics about the TurnLeft and TurnRight maneuvers.", + "type": "string", + "readOnly": true, + "enum": [ + "ArriveFinish", + "ArriveIntermediate", + "BearLeft", + "BearLeftThenBearLeft", + "BearLeftThenBearRight", + "BearLeftThenTurnLeft", + "BearLeftThenTurnRight", + "BearRight", + "BearRightThenBearLeft", + "BearRightThenBearRight", + "BearRightThenTurnLeft", + "BearRightThenTurnRight", + "BearThenKeep", + "BearThenMerge", + "Continue", + "DepartIntermediateStop", + "DepartIntermediateStopReturning", + "DepartStart", + "EnterRoundabout", + "ExitRoundabout", + "EnterThenExitRoundabout", + "ExitRoundaboutRight", + "ExitRoundaboutLeft", + "Follow", + "GoAroundRoundabout", + "KeepLeft", + "KeepOnRampLeft", + "KeepOnRampRight", + "KeepOnRampStraight", + "KeepRight", + "KeepStraight", + "KeepToStayLeft", + "KeepToStayRight", + "KeepToStayStraight", + "MergeFreeway", + "MergeHighway", + "MergeMotorway", + "MotorwayExitLeft", + "MotorwayExitRight", + "None", + "RampThenHighwayLeft", + "RampThenHighwayRight", + "RampThenHighwayStraight", + "RoadNameChange", + "SwitchToParallelRoad", + "SwitchToMainRoad", + "Take", + "TakeFerry", + "TakeExit", + "TakeRamp", + "TakeRampLeft", + "TakeRampRight", + "TakeRampStraight", + "TurnBack", + "TurnLeft", + "TurnLeftSharp", + "TurnLeftThenBearLeft", + "TurnLeftThenBearRight", + "TurnLeftThenTurnLeft", + "TurnLeftThenTurnRight", + "TurnRight", + "TurnRightSharp", + "TurnRightThenBearLeft", + "TurnRightThenBearRight", + "TurnRightThenTurnLeft", + "TurnRightThenTurnRight", + "TurnThenMerge", + "TurnToStayLeft", + "TurnToStayRight", + "Unknown", + "UTurn", + "Wait", + "Walk" + ], + "x-ms-enum": { + "name": "ManeuverTypeEnum", + "modelAsString": true, + "values": [ + { + "value": "ArriveFinish", + "name": "ArriveFinish", + "description": "Arrive at the final destination." + }, + { + "value": "ArriveIntermediate", + "name": "ArriveIntermediate", + "description": "Arrive at an intermediate waypoint." + }, + { + "value": "BearLeft", + "name": "BearLeft", + "description": "Bear left." + }, + { + "value": "BearLeftThenBearLeft", + "name": "BearLeftThenBearLeft", + "description": "Bear left and then bear left again." + }, + { + "value": "BearLeftThenBearRight", + "name": "BearLeftThenBearRight", + "description": "Bear left and then bear right." + }, + { + "value": "BearLeftThenTurnLeft", + "name": "BearLeftThenTurnLeft", + "description": "Bear left and then turn left." + }, + { + "value": "BearLeftThenTurnRight", + "name": "BearLeftThenTurnRight", + "description": "Bear left and then turn right." + }, + { + "value": "BearRight", + "name": "BearRight", + "description": "Bear right." + }, + { + "value": "BearRightThenBearLeft", + "name": "BearRightThenBearLeft", + "description": "Bear right and then bear left." + }, + { + "value": "BearRightThenBearRight", + "name": "BearRightThenBearRight", + "description": "Bear right and then bear right again." + }, + { + "value": "BearRightThenTurnLeft", + "name": "BearRightThenTurnLeft", + "description": "Bear right and then turn left." + }, + { + "value": "BearRightThenTurnRight", + "name": "BearRightThenTurnRight", + "description": "Bear right and then turn right." + }, + { + "value": "BearThenKeep", + "name": "BearThenKeep", + "description": "Bear instruction and then a keep instruction" + }, + { + "value": "DepartStart", + "name": "DepartStart", + "description": "Leave the starting point." + }, + { + "value": "BearThenMerge", + "name": "BearThenMerge", + "description": "Bear instruction and then a merge instruction." + }, + { + "value": "Continue", + "name": "Continue", + "description": "Continue on the current road." + }, + { + "value": "DepartIntermediateStop", + "name": "DepartIntermediateStop", + "description": "Leave an intermediate waypoint in a different direction and road than you arrived on." + }, + { + "value": "DepartIntermediateStopReturning", + "name": "DepartIntermediateStopReturning", + "description": "Leave an intermediate waypoint in the same direction and on the same road that you arrived on." + }, + { + "value": "EnterRoundabout", + "name": "EnterRoundabout", + "description": "Enter a roundabout." + }, + { + "value": "ExitRoundabout", + "name": "ExitRoundabout", + "description": "Exit a roundabout." + }, + { + "value": "EnterThenExitRoundabout", + "name": "EnterThenExitRoundabout", + "description": "Enter and exit a roundabout." + }, + { + "value": "ExitRoundaboutRight", + "name": "ExitRoundaboutRight", + "description": "At the roundabout take the exit on the right." + }, + { + "value": "ExitRoundaboutLeft", + "name": "ExitRoundaboutLeft", + "description": "At the roundabout take the exit on the left." + }, + { + "value": "Follow", + "name": "Follow", + "description": "Follow." + }, + { + "value": "GoAroundRoundabout", + "name": "GoAroundRoundabout", + "description": "Go around the roundabout." + }, + { + "value": "KeepLeft", + "name": "KeepLeft", + "description": "Keep left onto a different road." + }, + { + "value": "KeepOnRampLeft", + "name": "KeepOnRampLeft", + "description": "Keep left and continue onto ramp." + }, + { + "value": "KeepOnRampRight", + "name": "KeepOnRampRight", + "description": "Keep right and continue onto ramp." + }, + { + "value": "KeepOnRampStraight", + "name": "KeepOnRampStraight", + "description": "Keep straight and continue onto ramp." + }, + { + "value": "KeepRight", + "name": "KeepRight", + "description": "Keep right onto a different road." + }, + { + "value": "KeepStraight", + "name": "KeepStraight", + "description": "Keep straight onto a different road." + }, + { + "value": "KeepToStayLeft", + "name": "KeepToStayLeft", + "description": "Keep left to stay on the same road." + }, + { + "value": "KeepToStayRight", + "name": "KeepToStayRight", + "description": "Keep right to stay on the same road." + }, + { + "value": "KeepToStayStraight", + "name": "KeepToStayStraight", + "description": "Keep straight to stay on the same road." + }, + { + "value": "MergeFreeway", + "name": "MergeFreeway", + "description": "Merge onto a freeway." + }, + { + "value": "MergeHighway", + "name": "MergeHighway", + "description": "Merge onto a highway." + }, + { + "value": "MergeMotorway", + "name": "MergeMotorway", + "description": "Merge onto a motorway." + }, + { + "value": "MotorwayExitLeft", + "name": "MotorwayExitLeft", + "description": "Take the left exit." + }, + { + "value": "MotorwayExitRight", + "name": "MotorwayExitRight", + "description": "Take the right exit." + }, + { + "value": "None", + "name": "None", + "description": "No instruction." + }, + { + "value": "RampThenHighwayLeft", + "name": "RampThenHighwayLeft", + "description": "Take left ramp onto highway. This is part of a combined instruction." + }, + { + "value": "RampThenHighwayRight", + "name": "RampThenHighwayRight", + "description": "Take right ramp onto highway. This is part of a combined instruction." + }, + { + "value": "RampThenHighwayStraight", + "name": "RampThenHighwayStraight", + "description": "Stay straight to take ramp onto highway. This is part of a combined instruction." + }, + { + "value": "RoadNameChange", + "name": "RoadNameChange", + "description": "Road name changes." + }, + { + "value": "SwitchToParallelRoad", + "name": "SwitchToParallelRoad", + "description": "Switch to the parallel road." + }, + { + "value": "SwitchToMainRoad", + "name": "SwitchToMainRoad", + "description": "Switch to the main road." + }, + { + "value": "Take", + "name": "Take", + "description": "Take the road. This instruction is used when you are entering or exiting a ferry." + }, + { + "value": "TakeFerry", + "name": "TakeFerry", + "description": "Take the ferry." + }, + { + "value": "TakeExit", + "name": "TakeExit", + "description": "Take the exit." + }, + { + "value": "TakeRamp", + "name": "TakeRamp", + "description": "Take ramp." + }, + { + "value": "TakeRampLeft", + "name": "TakeRampLeft", + "description": "Take ramp to the left." + }, + { + "value": "TakeRampRight", + "name": "TakeRampRight", + "description": "Take ramp to the right." + }, + { + "value": "TakeRampStraight", + "name": "TakeRampStraight", + "description": "Stay straight to take ramp." + }, + { + "value": "TurnBack", + "name": "TurnBack", + "description": "Turn back sharply." + }, + { + "value": "TurnLeft", + "name": "TurnLeft", + "description": "Turn left." + }, + { + "value": "TurnLeftSharp", + "name": "TurnLeftSharp", + "description": "Take a sharp left turn." + }, + { + "value": "TurnLeftThenBearLeft", + "name": "TurnLeftThenBearLeft", + "description": "Turn left and then bear left." + }, + { + "value": "TurnLeftThenBearRight", + "name": "TurnLeftThenBearRight", + "description": "Turn left and then bear right." + }, + { + "value": "TurnLeftThenTurnLeft", + "name": "TurnLeftThenTurnLeft", + "description": "Turn left and then turn left again." + }, + { + "value": "TurnLeftThenTurnRight", + "name": "TurnLeftThenTurnRight", + "description": "Turn left and then turn right." + }, + { + "value": "TurnRight", + "name": "TurnRight", + "description": "Turn right." + }, + { + "value": "TurnRightSharp", + "name": "TurnRightSharp", + "description": "Take a sharp right turn." + }, + { + "value": "TurnRightThenBearLeft", + "name": "TurnRightThenBearLeft", + "description": "Turn right and then bear left." + }, + { + "value": "TurnRightThenBearRight", + "name": "TurnRightThenBearRight", + "description": "Turn right and then bear right." + }, + { + "value": "TurnRightThenTurnLeft", + "name": "TurnRightThenTurnLeft", + "description": "Turn right and then turn left." + }, + { + "value": "TurnRightThenTurnRight", + "name": "TurnRightThenTurnRight", + "description": "Turn right and then turn right again" + }, + { + "value": "TurnThenMerge", + "name": "TurnThenMerge", + "description": "Turn instruction followed by a merge instruction." + }, + { + "value": "TurnToStayLeft", + "name": "TurnToStayLeft", + "description": "Turn left to stay on the same road." + }, + { + "value": "TurnToStayRight", + "name": "TurnToStayRight", + "description": "Turn right to stay on the same road." + }, + { + "value": "Unknown", + "name": "Unknown", + "description": "The instruction is unknown." + }, + { + "value": "UTurn", + "name": "UTurn", + "description": "Make a u-turn to go in the opposite direction." + }, + { + "value": "Wait", + "name": "Wait", + "description": "Wait" + }, + { + "value": "Walk", + "name": "Walk", + "description": "Walk" + } + ] + } + }, + "RoadTypeEnum": { + "description": "The type of road.", + "type": "string", + "enum": [ + "NotApplicable", + "LimitedAccessHighway", + "Highway", + "MajorRoad", + "Arterial", + "Street", + "Ramp", + "Ferry", + "WalkingPath" + ], + "x-ms-enum": { + "name": "RoadTypeEnum", + "modelAsString": true, + "values": [ + { + "value": "NotApplicable", + "name": "NotApplicable", + "description": "NotApplicable." + }, + { + "value": "LimitedAccessHighway", + "name": "LimitedAccessHighway", + "description": "LimitedAccessHighway." + }, + { + "value": "Highway", + "name": "Highway", + "description": "Highway." + }, + { + "value": "MajorRoad", + "name": "MajorRoad", + "description": "MajorRoad." + }, + { + "value": "Arterial", + "name": "Arterial", + "description": "Arterial." + }, + { + "value": "Street", + "name": "Street", + "description": "Street." + }, + { + "value": "Ramp", + "name": "Ramp", + "description": "Ramp." + }, + { + "value": "Ferry", + "name": "Ferry", + "description": "Ferry." + }, + { + "value": "WalkingPath", + "name": "WalkingPath", + "description": "WalkingPath." + } + ] + } + }, + "SideOfStreetEnum": { + "description": "The side of the street where the destination is found based on the arrival direction. This field applies to the last maneuverPoint only.", + "type": "string", + "readOnly": true, + "enum": [ + "Left", + "Right", + "Unknown" + ], + "x-ms-enum": { + "name": "SideOfStreetEnum", + "modelAsString": true, + "values": [ + { + "value": "Left", + "name": "Left", + "description": "Left." + }, + { + "value": "Right", + "name": "Right", + "description": "Right." + }, + { + "value": "Unknown", + "name": "Unknown", + "description": "Unknown." + } + ] + } + }, + "TrafficDataUsedEnum": { + "description": "The type of real-time traffic data used to generate the route.", + "type": "string", + "enum": [ + "None", + "Flow", + "Closure", + "FlowAndClosure" + ], + "x-ms-enum": { + "name": "TrafficDataUsedEnum", + "modelAsString": true, + "values": [ + { + "value": "None", + "name": "None", + "description": "None." + }, + { + "value": "Flow", + "name": "Flow", + "description": "Real-time traffic speeds used to calculate travel time." + }, + { + "value": "Closure", + "name": "Closure", + "description": "Real-time closure data used, if applicable." + }, + { + "value": "FlowAndClosure", + "name": "FlowAndClosure", + "description": "Flow and Closure." + } + ] + } + }, + "TrafficCongestionEnum": { + "description": "The level of traffic congestion along the route.", + "type": "string", + "enum": [ + "Unknown", + "None", + "Mild", + "Medium", + "Heavy" + ], + "x-ms-enum": { + "name": "TrafficCongestionEnum", + "modelAsString": true, + "values": [ + { + "value": "Unknown", + "name": "Unknown", + "description": "Unknown." + }, + { + "value": "None", + "name": "None", + "description": "None." + }, + { + "value": "Mild", + "name": "Mild", + "description": "Mild." + }, + { + "value": "Medium", + "name": "Medium", + "description": "Medium." + }, + { + "value": "Heavy", + "name": "Heavy", + "description": "Heavy." + } + ] + } + }, + "Instruction": { + "description": "A description of a maneuver in a set of directions.", + "type": "object", + "properties": { + "maneuverType": { + "$ref": "#/definitions/ManeuverTypeEnum" + }, + "text": { + "description": "The plain text description of the instruction.", + "type": "string", + "readOnly": true + }, + "formattedText": { + "description": "The formatted text description of the instruction.", + "type": "string", + "readOnly": true + }, + "hints": { + "description": "Additional information that may be helpful in following a route. In addition to the hint text, this element has an attribute hintType that specifies what the hint refers to, such as “NextIntersection.” Hint is an optional element and a route step can contain more than one hint.", + "type": "array", + "items": { + "$ref": "#/definitions/Hint" + } + } + } + }, + "VehicleSpec": { + "description": "Vehicle attributes are specified inside of a vehicleSpec. Different regions may have different definitions for the truck classification and types, e.g., light truck, medium truck, heavy truck, etc. To get the most accurate results of the route restrictions based on the truck specs, specify the vehicle attributes.\n\n `Note`: Only supported for truck travelMode.", + "type": "object", + "properties": { + "isVehicleCommercial": { + "description": "Whether the vehicle is used for commercial purposes. Commercial vehicles may not be allowed to drive on some roads.", + "type": "boolean", + "default": false + }, + "length": { + "x-ms-client-name": "lengthInMeters", + "description": "Length of the vehicle in meters. A value of 0 means that length restrictions are not considered.", + "type": "number", + "format": "double", + "maximum": 1000000, + "minimum": 0, + "default": 0 + }, + "width": { + "x-ms-client-name": "widthInMeters", + "description": "Width of the vehicle in meters. A value of 0 means that width restrictions are not considered.", + "type": "number", + "format": "double", + "maximum": 1000000, + "minimum": 0, + "default": 0 + }, + "height": { + "x-ms-client-name": "heightInMeters", + "description": "Height of the vehicle in meters. A value of 0 means that height restrictions are not considered.", + "type": "number", + "format": "double", + "maximum": 1000000, + "minimum": 0, + "default": 0 + }, + "weight": { + "x-ms-client-name": "weightInKilograms", + "description": "Weight of the vehicle in kilograms. A value of 0 means that weight restrictions are not considered.", + "format": "int64", + "type": "integer", + "maximum": 1000000, + "minimum": 0, + "default": 0 + }, + "maxSpeed": { + "x-ms-client-name": "maxSpeedInKilometersPerHour", + "description": "Maximum speed of the vehicle in km/hour. The max speed in the vehicle profile is used to check whether a vehicle is allowed on motorways.\n\nA value of 0 means that an appropriate value for the vehicle will be determined and applied during route planning.\n\nA non-zero value may be overridden during route planning. For example, the current traffic flow is 60 km/hour. If the vehicle maximum speed is set to 50 km/hour, the routing engine will consider 60 km/hour as this is the current situation. If the maximum speed of the vehicle is provided as 80 km/hour but the current traffic flow is 60 km/hour, then routing engine will again use 60 km/hour.", + "format": "int64", + "type": "integer", + "maximum": 250, + "minimum": 0, + "default": 0 + }, + "axleWeight": { + "x-ms-client-name": "axleWeightInKilograms", + "description": "Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per axle are not considered.", + "format": "int64", + "type": "integer", + "maximum": 1000000, + "minimum": 0, + "default": 0 + }, + "loadType": { + "description": "Types of cargo that may be classified as hazardous materials and restricted from some roads. Available vehicleLoadType values are US Hazmat classes 1 through 9, plus generic classifications for use in other countries. Values beginning with USHazmat are for US routing while otherHazmat should be used for all other countries. vehicleLoadType supports multiple values in a request.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "USHazmatClass1", + "USHazmatClass2", + "USHazmatClass3", + "USHazmatClass4", + "USHazmatClass5", + "USHazmatClass6", + "USHazmatClass7", + "USHazmatClass8", + "USHazmatClass9", + "otherHazmatExplosive", + "otherHazmatGeneral", + "otherHazmatHarmfulToWater" + ], + "x-ms-enum": { + "name": "VehicleLoadType", + "modelAsString": true, + "values": [ + { + "value": "USHazmatClass1", + "description": "Explosives" + }, + { + "value": "USHazmatClass2", + "description": "Compressed gas" + }, + { + "value": "USHazmatClass3", + "description": "Flammable liquids" + }, + { + "value": "USHazmatClass4", + "description": "Flammable solids" + }, + { + "value": "USHazmatClass5", + "description": "Oxidizers" + }, + { + "value": "USHazmatClass6", + "description": "Poisons" + }, + { + "value": "USHazmatClass7", + "description": "Radioactive" + }, + { + "value": "USHazmatClass8", + "description": "Corrosives" + }, + { + "value": "USHazmatClass9", + "description": "Miscellaneous" + }, + { + "value": "otherHazmatExplosive", + "description": "Explosives" + }, + { + "value": "otherHazmatGeneral", + "description": "Miscellaneous" + }, + { + "value": "otherHazmatHarmfulToWater", + "description": "Harmful to water" + } + ] + } + } + } + } + }, + "NextLink": { + "type": "string", + "description": "The is the link to the next page of the features returned. If it's the last page, the field will not exist." + }, + "OptionalId": { + "type": "object", + "description": "optional Id", + "properties": { + "optionalId": { + "description": "Id of the request which would show in corresponding batchItem.", + "type": "string" + } + } + }, + "RouteTravelMode": { + "description": "The mode of travel for the route path in the response.", + "type": "string", + "default": "driving", + "enum": [ + "driving", + "truck", + "walking", + "other" + ], + "x-ms-enum": { + "name": "RouteTravelMode", + "modelAsString": true, + "values": [ + { + "value": "driving", + "description": "Routes optimized for cars." + }, + { + "value": "truck", + "description": "Routes optimized for large size trucks based on the vehicle specification." + }, + { + "value": "walking", + "description": "Routes optimized for pedestrians." + }, + { + "value": "other", + "description": "RouteTravelMode is returned as \"other\" for the truck travelMode when the truck route is not available for a particular section of a route." + } + ] + } + }, + "Order": { + "description": "Sequence for visiting waypoints and viaWaypoints.", + "type": "object", + "properties": { + "inputIndex": { + "description": "User-provided index for waypoint and viaWaypoint inputs.", + "type": "integer", + "format": "int64" + }, + "optimizedIndex": { + "description": "System-optimized waypoint and viaWaypoint index.", + "type": "integer", + "format": "int64" + } + } + }, + "DirectionsBatchRequestItem": { + "description": "Batch Query object", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/OptionalId" + }, + { + "$ref": "#/definitions/DirectionsRequest" + } + ] + }, + "DirectionsBatchRequestBody": { + "description": "The list of directions queries/requests to process. The list can contain a max of 100 queries and must contain at least 1 query.", + "type": "object", + "properties": { + "batchItems": { + "description": "The list of queries to process.", + "type": "array", + "items": { + "$ref": "#/definitions/DirectionsBatchRequestItem" + } + } + } + }, + "DirectionsBatchResponseItem": { + "description": "Batch response item", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/OptionalId" + }, + { + "$ref": "#/definitions/RouteDirectionsResponse" + }, + { + "type": "object", + "description": "error details", + "properties": { + "error": { + "$ref": "../../../../../common-types/data-plane/v1/types.json#/definitions/ErrorDetail" + } + } + } + ] + }, + "DirectionsBatchResponse": { + "description": "This object is returned from a successful Directions Batch service call.", + "type": "object", + "properties": { + "summary": { + "description": "Summary for the batch request", + "type": "object", + "properties": { + "successfulRequests": { + "description": "Number of successful requests in the batch", + "type": "integer", + "format": "int32" + }, + "totalRequests": { + "description": "Total number of requests in the batch", + "type": "integer", + "format": "int32" + } + } + }, + "batchItems": { + "description": "Array containing the batch results.", + "type": "array", + "items": { + "$ref": "#/definitions/DirectionsBatchResponseItem" + } + }, + "nextLink": { + "$ref": "#/definitions/NextLink" + } + } + } + } +} diff --git a/specification/maps/data-plane/Route/readme.md b/specification/maps/data-plane/Route/readme.md index e650ffa2e615..c2586ef3dcf1 100644 --- a/specification/maps/data-plane/Route/readme.md +++ b/specification/maps/data-plane/Route/readme.md @@ -27,7 +27,7 @@ These are the global settings for Route Client. ``` yaml title: RouteClient openapi-type: data-plane -tag: package-preview-2023-09 +tag: package-preview-2023-10 add-credentials: true credential-default-policy-type: BearerTokenCredentialPolicy credential-scopes: 'https://atlas.microsoft.com/.default' @@ -40,14 +40,23 @@ modelerfour: ``` +### Tag: package-preview-2023-10 + +These settings apply only when `--tag=package-preview-2023-10` is specified on the command line. + +```yaml $(tag) == 'package-preview-2023-10' +input-file: + - preview/2023-10-01-preview/route.json +``` ### Tag: package-preview-2023-09 These settings apply only when `--tag=package-preview-2023-09` is specified on the command line. -```yaml $(tag) == 'package-preview-2023-09' +``` yaml $(tag) == 'package-preview-2023-09' input-file: - preview/2023-09-01-preview/route.json ``` + ### Tag: package-preview-2023-08 These settings apply only when `--tag=package-preview-2023-08` is specified on the command line.