Returns a route between an origin and a destination, passing through waypoints if they are specified. The
+ * route will take into account factors such as current traffic and the typical road speeds on the requested day of
+ * the week and time of day.
+ *
+ *
Information returned includes the distance, estimated travel time, and a representation of the route geometry.
+ * Additional routing information such as optimized waypoint order or turn by turn instructions is also available,
+ * depending on the options selected.
+ *
+ *
Routing service provides a set of parameters for a detailed description of vehicle-specific Consumption Model.
+ * Please check [Consumption Model](https://docs.microsoft.com/azure/azure-maps/consumption-model) for detailed
+ * explanation of the concepts and parameters involved.
+ *
+ *
> getRouteDirectionsWithResponse(String format, RequestOptions requestOptions) {
+ return this.serviceClient.getRouteDirectionsWithResponseAsync(format, requestOptions);
+ }
+
+ /**
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ * Returns a route between an origin and a destination, passing through waypoints if they are specified. The
+ * route will take into account factors such as current traffic and the typical road speeds on the requested day of
+ * the week and time of day.
+ *
+ *
Information returned includes the distance, estimated travel time, and a representation of the route geometry.
+ * Additional routing information such as optimized waypoint order or turn by turn instructions is also available,
+ * depending on the options selected.
+ *
+ *
Routing service provides a set of parameters for a detailed description of a vehicle-specific Consumption
+ * Model. Please check [Consumption Model](https://docs.microsoft.com/azure/azure-maps/consumption-model) for
+ * detailed explanation of the concepts and parameters involved.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ * | query | String | Yes | The Coordinates through which the route is calculated, delimited by a colon. A minimum of two coordinates is required. The first one is the origin and the last is the destination of the route. Optional coordinates in-between act as WayPoints in the route. You can pass up to 150 WayPoints. |
+ * | maxAlternatives | String | No | Number of desired alternative routes to be calculated. Default: 0, minimum: 0 and maximum: 5 |
+ * | alternativeType | String | No | Controls the optimality, with respect to the given planning criteria, of the calculated alternatives compared to the reference route. |
+ * | minDeviationDistance | String | No | All alternative routes returned will follow the reference route (see section POST Requests) from the origin point of the calculateRoute request for at least this number of meters. Can only be used when reconstructing a route. The minDeviationDistance parameter cannot be used in conjunction with arriveAt |
+ * | minDeviationTime | String | No | All alternative routes returned will follow the reference route (see section POST Requests) from the origin point of the calculateRoute request for at least this number of seconds. Can only be used when reconstructing a route. The minDeviationTime parameter cannot be used in conjunction with arriveAt. Default value is 0. Setting )minDeviationTime_ to a value greater than zero has the following consequences:
+ * - The origin point of the _calculateRoute_ Request must be on
+ * (or very near) the input reference route.
+ * - If this is not the case, an error is returned.
+ * - However, the origin point does not need to be at the beginning
+ * of the input reference route (it can be thought of as the current
+ * vehicle position on the reference route).
+ * - The reference route, returned as the first route in the _calculateRoute_
+ * Response, will start at the origin point specified in the _calculateRoute_
+ * Request. The initial part of the input reference route up until the origin
+ * point will be excluded from the Response.
+ * - The values of _minDeviationDistance_ and _minDeviationTime_ determine
+ * how far alternative routes will be guaranteed to follow the reference
+ * route from the origin point onwards.
+ * - The route must use _departAt_.
+ * - The _vehicleHeading_ is ignored. |
+ * | instructionsType | String | No | If specified, guidance instructions will be returned. Note that the instructionsType parameter cannot be used in conjunction with routeRepresentation=none |
+ * | language | String | No | The language parameter determines the language of the guidance messages. It does not affect proper nouns (the names of streets, plazas, etc.) It has no effect when instructionsType=coded. Allowed values are (a subset of) the IETF language tags described |
+ * | computeBestOrder | String | No | Re-order the route waypoints using a fast heuristic algorithm to reduce the route length. Yields best results when used in conjunction with routeType _shortest_. Notice that origin and destination are excluded from the optimized waypoint indices. To include origin and destination in the response, please increase all the indices by 1 to account for the origin, and then add the destination as the final index. Possible values are true or false. True computes a better order if possible, but is not allowed to be used in conjunction with maxAlternatives value greater than 0 or in conjunction with circle waypoints. False will use the locations in the given order and not allowed to be used in conjunction with routeRepresentation _none_. |
+ * | routeRepresentation | String | No | Specifies the representation of the set of routes provided as response. This parameter value can only be used in conjunction with computeBestOrder=true. |
+ * | computeTravelTimeFor | String | No | Specifies whether to return additional travel times using different types of traffic information (none, historic, live) as well as the default best-estimate travel time. |
+ * | vehicleHeading | String | No | The 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 |
+ * | report | String | No | Specifies which data should be reported for diagnosis purposes. The only possible value is _effectiveSettings_. Reports the effective parameters or data used when calling the API. In the case of defaulted parameters the default will be reflected where the parameter was not specified by the caller. |
+ * | sectionType | String | No | Specifies which of the section types is reported in the route response. <br><br>For example if sectionType = pedestrian the sections which are suited for pedestrians only are returned. Multiple types can be used. The default sectionType refers to the travelMode input. By default travelMode is set to car |
+ * | arriveAt | String | No | The date and time of arrival at the destination point. It must be specified as a dateTime. When a time zone offset is not specified it will be assumed to be that of the destination point. The arriveAt value must be in the future. The arriveAt parameter cannot be used in conjunction with departAt, minDeviationDistance or minDeviationTime. |
+ * | departAt | String | No | The date and time of departure from the origin point. Departure times apart from now must be specified as a dateTime. When a time zone offset is not specified, it will be assumed to be that of the origin point. The departAt value must be in the future in the date-time format (1996-12-19T16:39:57-08:00). |
+ * | vehicleAxleWeight | String | No | Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per axle are not considered. |
+ * | vehicleLength | String | No | Length of the vehicle in meters. A value of 0 means that length restrictions are not considered. |
+ * | vehicleHeight | String | No | Height of the vehicle in meters. A value of 0 means that height restrictions are not considered. |
+ * | vehicleWidth | String | No | Width of the vehicle in meters. A value of 0 means that width restrictions are not considered. |
+ * | vehicleMaxSpeed | String | No | 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.
+ *
+ * * A value of 0 means that an appropriate value for the vehicle will be determined and applied during route planning.
+ *
+ * * A 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. |
+ * | vehicleWeight | String | No | Weight of the vehicle in kilograms.
+ *
+ * * It is mandatory if any of the *Efficiency parameters are set.
+ *
+ * * It must be strictly positive when used in the context of the Consumption Model. Weight restrictions are considered.
+ *
+ * * If no detailed **Consumption Model** is specified and the value of **vehicleWeight** is non-zero, then weight restrictions are considered.
+ *
+ * * In all other cases, this parameter is ignored.
+ *
+ * Sensible Values : for **Combustion Model** : 1600, for **Electric Model** : 1900 |
+ * | vehicleCommercial | String | No | Whether the vehicle is used for commercial purposes. Commercial vehicles may not be allowed to drive on some roads. |
+ * | windingness | String | No | Level of turns for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | hilliness | String | No | Degree of hilliness for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | travelMode | String | No | The mode of travel for the requested route. If not defined, default is 'car'. Note that the requested travelMode may not be available for the entire route. Where the requested travelMode is not available for a particular section, the travelMode element of the response for that section will be "other". Note that travel modes bus, motorcycle, taxi and van are BETA functionality. Full restriction data is not available in all areas. In **calculateReachableRange** requests, the values bicycle and pedestrian must not be used. |
+ * | avoid | String | No | Specifies something that the route calculation should try to avoid when determining the route. Can be specified multiple times in one request, for example, '&avoid=motorways&avoid=tollRoads&avoid=ferries'. In calculateReachableRange requests, the value alreadyUsedRoads must not be used. |
+ * | traffic | String | No | Possible values:
+ * * true - Do consider all available traffic information during routing
+ * * false - Ignore current traffic data during routing. Note that although the current traffic data is ignored
+ * during routing, the effect of historic traffic on effective road speeds is still incorporated. |
+ * | routeType | String | No | The type of route requested. |
+ * | vehicleLoadType | String | No | 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 can be specified multiple times. This parameter is currently only considered for travelMode=truck. |
+ * | vehicleEngineType | String | No | Engine type of the vehicle. When a detailed Consumption Model is specified, it must be consistent with the value of **vehicleEngineType**. |
+ * | constantSpeedConsumptionInLitersPerHundredkm | String | No |
+ *
+ * Specifies the speed-dependent component of consumption.
+ *
+ * Provided as an unordered list of colon-delimited speed & consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
+ *
+ * * by linear interpolation, if the given speed lies in between two speeds in the list
+ *
+ * * by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list
+ *
+ * The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing.
+ *
+ * Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates.
+ *
+ * Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.
+ *
+ * The valid range for the consumption values(expressed in l/100km) is between 0.01 and 100000.0.
+ *
+ * Sensible Values : 50,6.3:130,11.5
+ *
+ * **Note** : This parameter is required for **The Combustion Consumption Model**. |
+ * | currentFuelInLiters | String | No | Specifies the current supply of fuel in liters.
+ *
+ * Sensible Values : 55 |
+ * | auxiliaryPowerInLitersPerHour | String | No | Specifies the amount of fuel consumed for sustaining auxiliary systems of the vehicle, in liters per hour.
+ *
+ * It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
+ *
+ * Sensible Values : 0.2 |
+ * | fuelEnergyDensityInMJoulesPerLiter | String | No | Specifies the amount of chemical energy stored in one liter of fuel in megajoules (MJ). It is used in conjunction with the ***Efficiency** parameters for conversions between saved or consumed energy and fuel. For example, energy density is 34.2 MJ/l for gasoline, and 35.8 MJ/l for Diesel fuel.
+ *
+ * This parameter is required if any ***Efficiency** parameter is set.
+ *
+ * Sensible Values : 34.2 |
+ * | accelerationEfficiency | String | No | Specifies the efficiency of converting chemical energy stored in fuel to kinetic energy when the vehicle accelerates _(i.e. KineticEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed_ is obtained by converting consumed fuel to chemical energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **decelerationEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**decelerationEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.33, for **Electric Model** : 0.66 |
+ * | decelerationEfficiency | String | No | Specifies the efficiency of converting kinetic energy to saved (not consumed) fuel when the vehicle decelerates _(i.e. ChemicalEnergySaved/KineticEnergyLost). ChemicalEnergySaved_ is obtained by converting saved (not consumed) fuel to energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **accelerationEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**accelerationEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.83, for **Electric Model** : 0.91 |
+ * | uphillEfficiency | String | No | Specifies the efficiency of converting chemical energy stored in fuel to potential energy when the vehicle gains elevation _(i.e. PotentialEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed_ is obtained by converting consumed fuel to chemical energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **downhillEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**downhillEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.27, for **Electric Model** : 0.74 |
+ * | downhillEfficiency | String | No | Specifies the efficiency of converting potential energy to saved (not consumed) fuel when the vehicle loses elevation _(i.e. ChemicalEnergySaved/PotentialEnergyLost). ChemicalEnergySaved_ is obtained by converting saved (not consumed) fuel to energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **uphillEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**uphillEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.51, for **Electric Model** : 0.73 |
+ * | constantSpeedConsumptionInkWhPerHundredkm | String | No | Specifies the speed-dependent component of consumption.
+ *
+ * Provided as an unordered list of speed/consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
+ *
+ * * by linear interpolation, if the given speed lies in between two speeds in the list
+ *
+ * * by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list
+ *
+ * The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing.
+ *
+ * Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates.
+ *
+ * Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.
+ *
+ * The valid range for the consumption values(expressed in kWh/100km) is between 0.01 and 100000.0.
+ *
+ * Sensible Values : 50,8.2:130,21.3
+ *
+ * This parameter is required for **Electric consumption model**. |
+ * | currentChargeInkWh | String | No | Specifies the current electric energy supply in kilowatt hours (kWh).
+ *
+ * This parameter co-exists with **maxChargeInkWh** parameter.
+ *
+ * The range of values allowed are 0.0 to **maxChargeInkWh**.
+ *
+ * Sensible Values : 43 |
+ * | maxChargeInkWh | String | No | Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in the vehicle's battery.
+ *
+ * This parameter co-exists with **currentChargeInkWh** parameter.
+ *
+ * Minimum value has to be greater than or equal to **currentChargeInkWh**.
+ *
+ * Sensible Values : 85 |
+ * | auxiliaryPowerInkW | String | No | Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts (kW).
+ *
+ * It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
+ *
+ * Sensible Values : 1.7 |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Request Body Schema
+ *
+ *
{@code
+ * {
+ * supportingPoints: {
+ * geometries: [
+ * {
+ * }
+ * ]
+ * }
+ * avoidVignette: [
+ * String
+ * ]
+ * allowVignette: [
+ * String
+ * ]
+ * avoidAreas: {
+ * coordinates: [
+ * [
+ * [
+ * [
+ * double
+ * ]
+ * ]
+ * ]
+ * ]
+ * }
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * formatVersion: String
+ * routes: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * }
+ * legs: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * points: [
+ * {
+ * latitude: Double
+ * longitude: Double
+ * }
+ * ]
+ * }
+ * ]
+ * sections: [
+ * {
+ * startPointIndex: Integer
+ * endPointIndex: Integer
+ * sectionType: String(CAR_TRAIN/COUNTRY/FERRY/MOTORWAY/PEDESTRIAN/TOLL_ROAD/TOLL_VIGNETTE/TRAFFIC/TRAVEL_MODE/TUNNEL/CARPOOL/URBAN)
+ * travelMode: String(car/truck/taxi/bus/van/motorcycle/bicycle/pedestrian/other)
+ * simpleCategory: String(JAM/ROAD_WORK/ROAD_CLOSURE/OTHER)
+ * effectiveSpeedInKmh: Integer
+ * delayInSeconds: Integer
+ * delayMagnitude: String(0/1/2/3/4)
+ * tec: {
+ * effectCode: Integer
+ * causes: [
+ * {
+ * mainCauseCode: Integer
+ * subCauseCode: Integer
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * guidance: {
+ * instructions: [
+ * {
+ * routeOffsetInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * point: (recursive schema, see point above)
+ * pointIndex: Integer
+ * instructionType: String(TURN/ROAD_CHANGE/LOCATION_DEPARTURE/LOCATION_ARRIVAL/DIRECTION_INFO/LOCATION_WAYPOINT)
+ * roadNumbers: [
+ * String
+ * ]
+ * exitNumber: String
+ * street: String
+ * signpostText: String
+ * countryCode: String
+ * stateCode: String
+ * junctionType: String(REGULAR/ROUNDABOUT/BIFURCATION)
+ * turnAngleInDegrees: Integer
+ * roundaboutExitNumber: String
+ * possibleCombineWithNext: Boolean
+ * drivingSide: String(LEFT/RIGHT)
+ * maneuver: String(ARRIVE/ARRIVE_LEFT/ARRIVE_RIGHT/DEPART/STRAIGHT/KEEP_RIGHT/BEAR_RIGHT/TURN_RIGHT/SHARP_RIGHT/KEEP_LEFT/BEAR_LEFT/TURN_LEFT/SHARP_LEFT/MAKE_UTURN/ENTER_MOTORWAY/ENTER_FREEWAY/ENTER_HIGHWAY/TAKE_EXIT/MOTORWAY_EXIT_LEFT/MOTORWAY_EXIT_RIGHT/TAKE_FERRY/ROUNDABOUT_CROSS/ROUNDABOUT_RIGHT/ROUNDABOUT_LEFT/ROUNDABOUT_BACK/TRY_MAKE_UTURN/FOLLOW/SWITCH_PARALLEL_ROAD/SWITCH_MAIN_ROAD/ENTRANCE_RAMP/WAYPOINT_LEFT/WAYPOINT_RIGHT/WAYPOINT_REACHED)
+ * message: String
+ * combinedMessage: String
+ * }
+ * ]
+ * instructionGroups: [
+ * {
+ * firstInstructionIndex: Integer
+ * lastInstructionIndex: Integer
+ * groupLengthInMeters: Integer
+ * groupMessage: String
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * optimizedWaypoints: [
+ * {
+ * providedIndex: Integer
+ * optimizedIndex: Integer
+ * }
+ * ]
+ * report: {
+ * effectiveSettings: [
+ * {
+ * key: String
+ * value: String
+ * }
+ * ]
+ * }
+ * }
+ * }
+ *
+ * @param format Desired format of the response. Value can be either _json_ or _xml_.
+ * @param routeDirectionParameters Used for reconstructing a route and for calculating zero or more alternative
+ * routes to this reference route. The provided sequence of coordinates is used as input for route
+ * reconstruction. The alternative routes are calculated between the origin and destination points specified in
+ * the base path parameter locations. If both minDeviationDistance and minDeviationTime are set to zero, then
+ * these origin and destination points are expected to be at (or very near) the beginning and end of the
+ * reference route, respectively. Intermediate locations (waypoints) are not supported when using
+ * supportingPoints.
+ * Setting at least one of minDeviationDistance or minDeviationTime to a value greater than zero has the
+ * following consequences:
+ *
* The origin point of the calculateRoute request must be on (or very near) the input reference route. If
+ * this is not the case, an error is returned. However, the origin point does not need to be at the beginning of
+ * the input reference route (it can be thought of as the current vehicle position on the reference route). *
+ * The reference route, returned as the first route in the calculateRoute response, will start at the origin
+ * point specified in the calculateRoute request. The initial part of the input reference route up until the
+ * origin point will be excluded from the response. * The values of minDeviationDistance and minDeviationTime
+ * determine how far alternative routes will be guaranteed to follow the reference route from the origin point
+ * onwards. * The route must use departAt. * The vehicleHeading is ignored.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return this object is returned from a successful Route Directions call along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getRouteDirectionsWithAdditionalParametersWithResponse(
+ String format, BinaryData routeDirectionParameters, RequestOptions requestOptions) {
+ return this.serviceClient.getRouteDirectionsWithAdditionalParametersWithResponseAsync(
+ format, routeDirectionParameters, requestOptions);
+ }
+
+ /**
+ * __Route Range (Isochrone) API__
+ *
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ *
This service will calculate a set of locations that can be reached from the origin point based on fuel,
+ * energy, time or distance budget that is specified. A polygon boundary (or Isochrone) is returned in a
+ * counterclockwise orientation as well as the precise polygon center which was the result of the origin point.
+ *
+ *
The returned polygon can be used for further processing such as [Search Inside
+ * Geometry](https://docs.microsoft.com/rest/api/maps/search/postsearchinsidegeometry) to search for POIs within the
+ * provided Isochrone.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ * | query | String | Yes | The Coordinate from which the range calculation should start. |
+ * | fuelBudgetInLiters | String | No | Fuel budget in liters that determines maximal range which can be travelled using the specified Combustion Consumption Model.<br> When fuelBudgetInLiters is used, it is mandatory to specify a detailed Combustion Consumption Model.<br> Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used. |
+ * | energyBudgetInkWh | String | No | Electric energy budget in kilowatt hours (kWh) that determines maximal range which can be travelled using the specified Electric Consumption Model.<br> When energyBudgetInkWh is used, it is mandatory to specify a detailed Electric Consumption Model.<br> Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used. |
+ * | timeBudgetInSec | String | No | Time budget in seconds that determines maximal range which can be travelled using driving time. The Consumption Model will only affect the range when routeType is eco.<br> Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used. |
+ * | distanceBudgetInMeters | String | No | Distance budget in meters that determines maximal range which can be travelled using driving distance. The Consumption Model will only affect the range when routeType is eco.<br> Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used. |
+ * | departAt | String | No | The date and time of departure from the origin point. Departure times apart from now must be specified as a dateTime. When a time zone offset is not specified, it will be assumed to be that of the origin point. The departAt value must be in the future in the date-time format (1996-12-19T16:39:57-08:00). |
+ * | routeType | String | No | The type of route requested. |
+ * | traffic | String | No | Possible values:
+ * * true - Do consider all available traffic information during routing
+ * * false - Ignore current traffic data during routing. Note that although the current traffic data is ignored
+ * during routing, the effect of historic traffic on effective road speeds is still incorporated. |
+ * | avoid | String | No | Specifies something that the route calculation should try to avoid when determining the route. Can be specified multiple times in one request, for example, '&avoid=motorways&avoid=tollRoads&avoid=ferries'. In calculateReachableRange requests, the value alreadyUsedRoads must not be used. |
+ * | travelMode | String | No | The mode of travel for the requested route. If not defined, default is 'car'. Note that the requested travelMode may not be available for the entire route. Where the requested travelMode is not available for a particular section, the travelMode element of the response for that section will be "other". Note that travel modes bus, motorcycle, taxi and van are BETA functionality. Full restriction data is not available in all areas. In **calculateReachableRange** requests, the values bicycle and pedestrian must not be used. |
+ * | hilliness | String | No | Degree of hilliness for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | windingness | String | No | Level of turns for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | vehicleAxleWeight | String | No | Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per axle are not considered. |
+ * | vehicleWidth | String | No | Width of the vehicle in meters. A value of 0 means that width restrictions are not considered. |
+ * | vehicleHeight | String | No | Height of the vehicle in meters. A value of 0 means that height restrictions are not considered. |
+ * | vehicleLength | String | No | Length of the vehicle in meters. A value of 0 means that length restrictions are not considered. |
+ * | vehicleMaxSpeed | String | No | 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.
+ *
+ * * A value of 0 means that an appropriate value for the vehicle will be determined and applied during route planning.
+ *
+ * * A 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. |
+ * | vehicleWeight | String | No | Weight of the vehicle in kilograms.
+ *
+ * * It is mandatory if any of the *Efficiency parameters are set.
+ *
+ * * It must be strictly positive when used in the context of the Consumption Model. Weight restrictions are considered.
+ *
+ * * If no detailed **Consumption Model** is specified and the value of **vehicleWeight** is non-zero, then weight restrictions are considered.
+ *
+ * * In all other cases, this parameter is ignored.
+ *
+ * Sensible Values : for **Combustion Model** : 1600, for **Electric Model** : 1900 |
+ * | vehicleCommercial | String | No | Whether the vehicle is used for commercial purposes. Commercial vehicles may not be allowed to drive on some roads. |
+ * | vehicleLoadType | String | No | 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 can be specified multiple times. This parameter is currently only considered for travelMode=truck. |
+ * | vehicleEngineType | String | No | Engine type of the vehicle. When a detailed Consumption Model is specified, it must be consistent with the value of **vehicleEngineType**. |
+ * | constantSpeedConsumptionInLitersPerHundredkm | String | No |
+ *
+ * Specifies the speed-dependent component of consumption.
+ *
+ * Provided as an unordered list of colon-delimited speed & consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
+ *
+ * * by linear interpolation, if the given speed lies in between two speeds in the list
+ *
+ * * by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list
+ *
+ * The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing.
+ *
+ * Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates.
+ *
+ * Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.
+ *
+ * The valid range for the consumption values(expressed in l/100km) is between 0.01 and 100000.0.
+ *
+ * Sensible Values : 50,6.3:130,11.5
+ *
+ * **Note** : This parameter is required for **The Combustion Consumption Model**. |
+ * | currentFuelInLiters | String | No | Specifies the current supply of fuel in liters.
+ *
+ * Sensible Values : 55 |
+ * | auxiliaryPowerInLitersPerHour | String | No | Specifies the amount of fuel consumed for sustaining auxiliary systems of the vehicle, in liters per hour.
+ *
+ * It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
+ *
+ * Sensible Values : 0.2 |
+ * | fuelEnergyDensityInMJoulesPerLiter | String | No | Specifies the amount of chemical energy stored in one liter of fuel in megajoules (MJ). It is used in conjunction with the ***Efficiency** parameters for conversions between saved or consumed energy and fuel. For example, energy density is 34.2 MJ/l for gasoline, and 35.8 MJ/l for Diesel fuel.
+ *
+ * This parameter is required if any ***Efficiency** parameter is set.
+ *
+ * Sensible Values : 34.2 |
+ * | accelerationEfficiency | String | No | Specifies the efficiency of converting chemical energy stored in fuel to kinetic energy when the vehicle accelerates _(i.e. KineticEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed_ is obtained by converting consumed fuel to chemical energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **decelerationEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**decelerationEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.33, for **Electric Model** : 0.66 |
+ * | decelerationEfficiency | String | No | Specifies the efficiency of converting kinetic energy to saved (not consumed) fuel when the vehicle decelerates _(i.e. ChemicalEnergySaved/KineticEnergyLost). ChemicalEnergySaved_ is obtained by converting saved (not consumed) fuel to energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **accelerationEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**accelerationEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.83, for **Electric Model** : 0.91 |
+ * | uphillEfficiency | String | No | Specifies the efficiency of converting chemical energy stored in fuel to potential energy when the vehicle gains elevation _(i.e. PotentialEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed_ is obtained by converting consumed fuel to chemical energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **downhillEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**downhillEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.27, for **Electric Model** : 0.74 |
+ * | downhillEfficiency | String | No | Specifies the efficiency of converting potential energy to saved (not consumed) fuel when the vehicle loses elevation _(i.e. ChemicalEnergySaved/PotentialEnergyLost). ChemicalEnergySaved_ is obtained by converting saved (not consumed) fuel to energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **uphillEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**uphillEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.51, for **Electric Model** : 0.73 |
+ * | constantSpeedConsumptionInkWhPerHundredkm | String | No | Specifies the speed-dependent component of consumption.
+ *
+ * Provided as an unordered list of speed/consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
+ *
+ * * by linear interpolation, if the given speed lies in between two speeds in the list
+ *
+ * * by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list
+ *
+ * The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing.
+ *
+ * Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates.
+ *
+ * Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.
+ *
+ * The valid range for the consumption values(expressed in kWh/100km) is between 0.01 and 100000.0.
+ *
+ * Sensible Values : 50,8.2:130,21.3
+ *
+ * This parameter is required for **Electric consumption model**. |
+ * | currentChargeInkWh | String | No | Specifies the current electric energy supply in kilowatt hours (kWh).
+ *
+ * This parameter co-exists with **maxChargeInkWh** parameter.
+ *
+ * The range of values allowed are 0.0 to **maxChargeInkWh**.
+ *
+ * Sensible Values : 43 |
+ * | maxChargeInkWh | String | No | Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in the vehicle's battery.
+ *
+ * This parameter co-exists with **currentChargeInkWh** parameter.
+ *
+ * Minimum value has to be greater than or equal to **currentChargeInkWh**.
+ *
+ * Sensible Values : 85 |
+ * | auxiliaryPowerInkW | String | No | Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts (kW).
+ *
+ * It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
+ *
+ * Sensible Values : 1.7 |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * formatVersion: String
+ * reachableRange: {
+ * center: {
+ * latitude: Double
+ * longitude: Double
+ * }
+ * boundary: [
+ * (recursive schema, see above)
+ * ]
+ * }
+ * report: {
+ * effectiveSettings: [
+ * {
+ * key: String
+ * value: String
+ * }
+ * ]
+ * }
+ * }
+ * }
+ *
+ * @param format Desired format of the response. Value can be either _json_ or _xml_.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return this object is returned from a successful Route Reachable Range call along with {@link Response} on
+ * successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getRouteRangeWithResponse(String format, RequestOptions requestOptions) {
+ return this.serviceClient.getRouteRangeWithResponseAsync(format, requestOptions);
+ }
+
+ /**
+ * **Route Directions Batch API**
+ *
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ *
The Route Directions Batch API sends batches of queries to [Route Directions
+ * API](https://docs.microsoft.com/rest/api/maps/route/getroutedirections) using just a single API call. You can
+ * call Route Directions Batch API to run either asynchronously (async) or synchronously (sync). The async API
+ * allows caller to batch up to **700** queries and sync API up to **100** queries. ### Submit Asynchronous Batch
+ * Request The Asynchronous API is appropriate for processing big volumes of relatively complex route requests - It
+ * allows the retrieval of results in a separate call (multiple downloads are possible). - The asynchronous API is
+ * optimized for reliability and is not expected to run into a timeout. - The number of batch items is limited to
+ * **700** for this API.
+ *
+ *
When you make a request by using async request, by default the service returns a 202 response code along a
+ * redirect URL in the Location field of the response header. This URL should be checked periodically until the
+ * response data or error information is available. The asynchronous responses are stored for **14** days. The
+ * redirect URL returns a 404 response if used after the expiration period.
+ *
+ *
Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
+ * operations: 1. Client sends a Route Directions Batch `POST` request to Azure Maps 2. The server will respond with
+ * one of the following:
+ *
+ *
> HTTP `202 Accepted` - Batch request has been accepted.
+ *
+ *
> HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
+ * or any other `Error` status code.
+ *
+ *
3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
+ * download the results of the batch request. This status URI looks like following:
+ *
+ *
``` GET https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0 ``` Note:- Please
+ * remember to add AUTH information (subscription-key/azure_auth - See [Security](#security)) to the _status URI_
+ * before running it. <br> 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to
+ * download the batch results.
+ *
+ *
### POST Body for Batch Request To send the _route 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 3 _route directions_ queries:
+ *
+ *
```json { "batchItems": [ { "query":
+ * "?query=47.620659,-122.348934:47.610101,-122.342015&travelMode=bicycle&routeType=eco&traffic=false"
+ * }, { "query": "?query=40.759856,-73.985108:40.771136,-73.973506&travelMode=pedestrian&routeType=shortest"
+ * }, { "query": "?query=48.923159,-122.557362:32.621279,-116.840362" } ] } ```
+ *
+ *
A _route directions_ query in a batch is just a partial URL _without_ the protocol, base URL, path,
+ * api-version and subscription-key. It can accept any of the supported _route directions_ [URI
+ * parameters](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#uri-parameters). The string values
+ * in the _route directions_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it
+ * should also be properly URL-encoded.
+ *
+ *
The async API allows caller to batch up to **700** queries and sync API up to **100** queries, and the batch
+ * should contain at least **1** query.
+ *
+ *
### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
+ * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
+ * `POST` batch request and looks like the following:
+ *
+ *
```
+ * https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}
+ * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
+ * using the _download URL_. 2. The server will respond with one of the following:
+ *
+ *
> HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
+ * time.
+ *
+ *
> HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
+ *
+ *
### Batch Response Model The returned data content is similar for async and sync requests. When downloading
+ * the results of an async batch request, if the batch has finished processing, the response body contains the batch
+ * response. This 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 in `batchItems` contains `statusCode` and `response` fields. Each `response` in
+ * `batchItems` is of one of the following types:
+ *
+ *
- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
+ * the query completed successfully.
+ *
+ *
- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
+ *
+ *
Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
+ *
+ *
```json { "summary": { "successfulRequests": 1, "totalRequests": 2 }, "batchItems": [ { "statusCode": 200,
+ * "response": { "routes": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "legs": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "points": [ { "latitude": 47.62094, "longitude": -122.34892 }, { "latitude":
+ * 47.62094, "longitude": -122.3485 }, { "latitude": 47.62095, "longitude": -122.3476 } ] } ], "sections": [ {
+ * "startPointIndex": 0, "endPointIndex": 40, "sectionType": "TRAVEL_MODE", "travelMode": "bicycle" } ] } ] } }, {
+ * "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
+ * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Request Body Schema
+ *
+ *
{@code
+ * {
+ * batchItems: [
+ * {
+ * query: String
+ * }
+ * ]
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * batchSummary: {
+ * successfulRequests: Integer
+ * totalRequests: Integer
+ * }
+ * batchItems: [
+ * {
+ * statusCode: Integer
+ * response: {
+ * formatVersion: String
+ * routes: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * }
+ * legs: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * points: [
+ * {
+ * latitude: Double
+ * longitude: Double
+ * }
+ * ]
+ * }
+ * ]
+ * sections: [
+ * {
+ * startPointIndex: Integer
+ * endPointIndex: Integer
+ * sectionType: String(CAR_TRAIN/COUNTRY/FERRY/MOTORWAY/PEDESTRIAN/TOLL_ROAD/TOLL_VIGNETTE/TRAFFIC/TRAVEL_MODE/TUNNEL/CARPOOL/URBAN)
+ * travelMode: String(car/truck/taxi/bus/van/motorcycle/bicycle/pedestrian/other)
+ * simpleCategory: String(JAM/ROAD_WORK/ROAD_CLOSURE/OTHER)
+ * effectiveSpeedInKmh: Integer
+ * delayInSeconds: Integer
+ * delayMagnitude: String(0/1/2/3/4)
+ * tec: {
+ * effectCode: Integer
+ * causes: [
+ * {
+ * mainCauseCode: Integer
+ * subCauseCode: Integer
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * guidance: {
+ * instructions: [
+ * {
+ * routeOffsetInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * point: (recursive schema, see point above)
+ * pointIndex: Integer
+ * instructionType: String(TURN/ROAD_CHANGE/LOCATION_DEPARTURE/LOCATION_ARRIVAL/DIRECTION_INFO/LOCATION_WAYPOINT)
+ * roadNumbers: [
+ * String
+ * ]
+ * exitNumber: String
+ * street: String
+ * signpostText: String
+ * countryCode: String
+ * stateCode: String
+ * junctionType: String(REGULAR/ROUNDABOUT/BIFURCATION)
+ * turnAngleInDegrees: Integer
+ * roundaboutExitNumber: String
+ * possibleCombineWithNext: Boolean
+ * drivingSide: String(LEFT/RIGHT)
+ * maneuver: String(ARRIVE/ARRIVE_LEFT/ARRIVE_RIGHT/DEPART/STRAIGHT/KEEP_RIGHT/BEAR_RIGHT/TURN_RIGHT/SHARP_RIGHT/KEEP_LEFT/BEAR_LEFT/TURN_LEFT/SHARP_LEFT/MAKE_UTURN/ENTER_MOTORWAY/ENTER_FREEWAY/ENTER_HIGHWAY/TAKE_EXIT/MOTORWAY_EXIT_LEFT/MOTORWAY_EXIT_RIGHT/TAKE_FERRY/ROUNDABOUT_CROSS/ROUNDABOUT_RIGHT/ROUNDABOUT_LEFT/ROUNDABOUT_BACK/TRY_MAKE_UTURN/FOLLOW/SWITCH_PARALLEL_ROAD/SWITCH_MAIN_ROAD/ENTRANCE_RAMP/WAYPOINT_LEFT/WAYPOINT_RIGHT/WAYPOINT_REACHED)
+ * message: String
+ * combinedMessage: String
+ * }
+ * ]
+ * instructionGroups: [
+ * {
+ * firstInstructionIndex: Integer
+ * lastInstructionIndex: Integer
+ * groupLengthInMeters: Integer
+ * groupMessage: String
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * optimizedWaypoints: [
+ * {
+ * providedIndex: Integer
+ * optimizedIndex: Integer
+ * }
+ * ]
+ * report: {
+ * effectiveSettings: [
+ * {
+ * key: String
+ * value: String
+ * }
+ * ]
+ * }
+ * error: {
+ * code: String
+ * message: String
+ * target: String
+ * details: [
+ * (recursive schema, see above)
+ * ]
+ * additionalInfo: [
+ * {
+ * type: String
+ * info: Object
+ * }
+ * ]
+ * }
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ * @param format Desired format of the response. Only `json` format is supported.
+ * @param routeDirectionsBatchQueries The list of route directions queries/requests to process. The list can contain
+ * a max of 700 queries for async and 100 queries for sync version and must contain at least 1 query.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return this object is returned from a successful Route Directions Batch service call along with {@link Response}
+ * on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> requestRouteDirectionsBatchWithResponse(
+ String format, BinaryData routeDirectionsBatchQueries, RequestOptions requestOptions) {
+ return this.serviceClient.requestRouteDirectionsBatchWithResponseAsync(
+ format, routeDirectionsBatchQueries, requestOptions);
+ }
+
+ /**
+ * **Route Directions Batch API**
+ *
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ *
The Route Directions Batch API sends batches of queries to [Route Directions
+ * API](https://docs.microsoft.com/rest/api/maps/route/getroutedirections) using just a single API call. You can
+ * call Route Directions Batch API to run either asynchronously (async) or synchronously (sync). The async API
+ * allows caller to batch up to **700** queries and sync API up to **100** queries. ### Submit Asynchronous Batch
+ * Request The Asynchronous API is appropriate for processing big volumes of relatively complex route requests - It
+ * allows the retrieval of results in a separate call (multiple downloads are possible). - The asynchronous API is
+ * optimized for reliability and is not expected to run into a timeout. - The number of batch items is limited to
+ * **700** for this API.
+ *
+ *
When you make a request by using async request, by default the service returns a 202 response code along a
+ * redirect URL in the Location field of the response header. This URL should be checked periodically until the
+ * response data or error information is available. The asynchronous responses are stored for **14** days. The
+ * redirect URL returns a 404 response if used after the expiration period.
+ *
+ *
Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
+ * operations: 1. Client sends a Route Directions Batch `POST` request to Azure Maps 2. The server will respond with
+ * one of the following:
+ *
+ *
> HTTP `202 Accepted` - Batch request has been accepted.
+ *
+ *
> HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
+ * or any other `Error` status code.
+ *
+ *
3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
+ * download the results of the batch request. This status URI looks like following:
+ *
+ *
``` GET https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0 ``` Note:- Please
+ * remember to add AUTH information (subscription-key/azure_auth - See [Security](#security)) to the _status URI_
+ * before running it. <br> 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to
+ * download the batch results.
+ *
+ *
### POST Body for Batch Request To send the _route 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 3 _route directions_ queries:
+ *
+ *
```json { "batchItems": [ { "query":
+ * "?query=47.620659,-122.348934:47.610101,-122.342015&travelMode=bicycle&routeType=eco&traffic=false"
+ * }, { "query": "?query=40.759856,-73.985108:40.771136,-73.973506&travelMode=pedestrian&routeType=shortest"
+ * }, { "query": "?query=48.923159,-122.557362:32.621279,-116.840362" } ] } ```
+ *
+ *
A _route directions_ query in a batch is just a partial URL _without_ the protocol, base URL, path,
+ * api-version and subscription-key. It can accept any of the supported _route directions_ [URI
+ * parameters](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#uri-parameters). The string values
+ * in the _route directions_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it
+ * should also be properly URL-encoded.
+ *
+ *
The async API allows caller to batch up to **700** queries and sync API up to **100** queries, and the batch
+ * should contain at least **1** query.
+ *
+ *
### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
+ * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
+ * `POST` batch request and looks like the following:
+ *
+ *
```
+ * https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}
+ * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
+ * using the _download URL_. 2. The server will respond with one of the following:
+ *
+ *
> HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
+ * time.
+ *
+ *
> HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
+ *
+ *
### Batch Response Model The returned data content is similar for async and sync requests. When downloading
+ * the results of an async batch request, if the batch has finished processing, the response body contains the batch
+ * response. This 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 in `batchItems` contains `statusCode` and `response` fields. Each `response` in
+ * `batchItems` is of one of the following types:
+ *
+ *
- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
+ * the query completed successfully.
+ *
+ *
- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
+ *
+ *
Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
+ *
+ *
```json { "summary": { "successfulRequests": 1, "totalRequests": 2 }, "batchItems": [ { "statusCode": 200,
+ * "response": { "routes": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "legs": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "points": [ { "latitude": 47.62094, "longitude": -122.34892 }, { "latitude":
+ * 47.62094, "longitude": -122.3485 }, { "latitude": 47.62095, "longitude": -122.3476 } ] } ], "sections": [ {
+ * "startPointIndex": 0, "endPointIndex": 40, "sectionType": "TRAVEL_MODE", "travelMode": "bicycle" } ] } ] } }, {
+ * "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
+ * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Request Body Schema
+ *
+ *
{@code
+ * {
+ * batchItems: [
+ * {
+ * query: String
+ * }
+ * ]
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * batchSummary: {
+ * successfulRequests: Integer
+ * totalRequests: Integer
+ * }
+ * batchItems: [
+ * {
+ * statusCode: Integer
+ * response: {
+ * formatVersion: String
+ * routes: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * }
+ * legs: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * points: [
+ * {
+ * latitude: Double
+ * longitude: Double
+ * }
+ * ]
+ * }
+ * ]
+ * sections: [
+ * {
+ * startPointIndex: Integer
+ * endPointIndex: Integer
+ * sectionType: String(CAR_TRAIN/COUNTRY/FERRY/MOTORWAY/PEDESTRIAN/TOLL_ROAD/TOLL_VIGNETTE/TRAFFIC/TRAVEL_MODE/TUNNEL/CARPOOL/URBAN)
+ * travelMode: String(car/truck/taxi/bus/van/motorcycle/bicycle/pedestrian/other)
+ * simpleCategory: String(JAM/ROAD_WORK/ROAD_CLOSURE/OTHER)
+ * effectiveSpeedInKmh: Integer
+ * delayInSeconds: Integer
+ * delayMagnitude: String(0/1/2/3/4)
+ * tec: {
+ * effectCode: Integer
+ * causes: [
+ * {
+ * mainCauseCode: Integer
+ * subCauseCode: Integer
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * guidance: {
+ * instructions: [
+ * {
+ * routeOffsetInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * point: (recursive schema, see point above)
+ * pointIndex: Integer
+ * instructionType: String(TURN/ROAD_CHANGE/LOCATION_DEPARTURE/LOCATION_ARRIVAL/DIRECTION_INFO/LOCATION_WAYPOINT)
+ * roadNumbers: [
+ * String
+ * ]
+ * exitNumber: String
+ * street: String
+ * signpostText: String
+ * countryCode: String
+ * stateCode: String
+ * junctionType: String(REGULAR/ROUNDABOUT/BIFURCATION)
+ * turnAngleInDegrees: Integer
+ * roundaboutExitNumber: String
+ * possibleCombineWithNext: Boolean
+ * drivingSide: String(LEFT/RIGHT)
+ * maneuver: String(ARRIVE/ARRIVE_LEFT/ARRIVE_RIGHT/DEPART/STRAIGHT/KEEP_RIGHT/BEAR_RIGHT/TURN_RIGHT/SHARP_RIGHT/KEEP_LEFT/BEAR_LEFT/TURN_LEFT/SHARP_LEFT/MAKE_UTURN/ENTER_MOTORWAY/ENTER_FREEWAY/ENTER_HIGHWAY/TAKE_EXIT/MOTORWAY_EXIT_LEFT/MOTORWAY_EXIT_RIGHT/TAKE_FERRY/ROUNDABOUT_CROSS/ROUNDABOUT_RIGHT/ROUNDABOUT_LEFT/ROUNDABOUT_BACK/TRY_MAKE_UTURN/FOLLOW/SWITCH_PARALLEL_ROAD/SWITCH_MAIN_ROAD/ENTRANCE_RAMP/WAYPOINT_LEFT/WAYPOINT_RIGHT/WAYPOINT_REACHED)
+ * message: String
+ * combinedMessage: String
+ * }
+ * ]
+ * instructionGroups: [
+ * {
+ * firstInstructionIndex: Integer
+ * lastInstructionIndex: Integer
+ * groupLengthInMeters: Integer
+ * groupMessage: String
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * optimizedWaypoints: [
+ * {
+ * providedIndex: Integer
+ * optimizedIndex: Integer
+ * }
+ * ]
+ * report: {
+ * effectiveSettings: [
+ * {
+ * key: String
+ * value: String
+ * }
+ * ]
+ * }
+ * error: {
+ * code: String
+ * message: String
+ * target: String
+ * details: [
+ * (recursive schema, see above)
+ * ]
+ * additionalInfo: [
+ * {
+ * type: String
+ * info: Object
+ * }
+ * ]
+ * }
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ * @param format Desired format of the response. Only `json` format is supported.
+ * @param routeDirectionsBatchQueries The list of route directions queries/requests to process. The list can contain
+ * a max of 700 queries for async and 100 queries for sync version and must contain at least 1 query.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return the {@link PollerFlux} for polling of this object is returned from a successful Route Directions Batch
+ * service call.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginRequestRouteDirectionsBatch(
+ String format, BinaryData routeDirectionsBatchQueries, RequestOptions requestOptions) {
+ return this.serviceClient.beginRequestRouteDirectionsBatchAsync(
+ format, routeDirectionsBatchQueries, requestOptions);
+ }
+
+ /**
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ * ### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
+ * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
+ * `POST` batch request and looks like the following:
+ *
+ *
```
+ * https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}
+ * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
+ * using the _download URL_. 2. The server will respond with one of the following:
+ *
+ *
> HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
+ * time.
+ *
+ *
> HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
+ *
+ *
### Batch Response Model The returned data content is similar for async and sync requests. When downloading
+ * the results of an async batch request, if the batch has finished processing, the response body contains the batch
+ * response. This 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 in `batchItems` contains `statusCode` and `response` fields. Each `response` in
+ * `batchItems` is of one of the following types:
+ *
+ *
- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
+ * the query completed successfully.
+ *
+ *
- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
+ *
+ *
Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
+ *
+ *
```json { "summary": { "successfulRequests": 1, "totalRequests": 2 }, "batchItems": [ { "statusCode": 200,
+ * "response": { "routes": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "legs": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "points": [ { "latitude": 47.62094, "longitude": -122.34892 }, { "latitude":
+ * 47.62094, "longitude": -122.3485 }, { "latitude": 47.62095, "longitude": -122.3476 } ] } ], "sections": [ {
+ * "startPointIndex": 0, "endPointIndex": 40, "sectionType": "TRAVEL_MODE", "travelMode": "bicycle" } ] } ] } }, {
+ * "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
+ * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * batchSummary: {
+ * successfulRequests: Integer
+ * totalRequests: Integer
+ * }
+ * batchItems: [
+ * {
+ * statusCode: Integer
+ * response: {
+ * formatVersion: String
+ * routes: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * }
+ * legs: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * points: [
+ * {
+ * latitude: Double
+ * longitude: Double
+ * }
+ * ]
+ * }
+ * ]
+ * sections: [
+ * {
+ * startPointIndex: Integer
+ * endPointIndex: Integer
+ * sectionType: String(CAR_TRAIN/COUNTRY/FERRY/MOTORWAY/PEDESTRIAN/TOLL_ROAD/TOLL_VIGNETTE/TRAFFIC/TRAVEL_MODE/TUNNEL/CARPOOL/URBAN)
+ * travelMode: String(car/truck/taxi/bus/van/motorcycle/bicycle/pedestrian/other)
+ * simpleCategory: String(JAM/ROAD_WORK/ROAD_CLOSURE/OTHER)
+ * effectiveSpeedInKmh: Integer
+ * delayInSeconds: Integer
+ * delayMagnitude: String(0/1/2/3/4)
+ * tec: {
+ * effectCode: Integer
+ * causes: [
+ * {
+ * mainCauseCode: Integer
+ * subCauseCode: Integer
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * guidance: {
+ * instructions: [
+ * {
+ * routeOffsetInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * point: (recursive schema, see point above)
+ * pointIndex: Integer
+ * instructionType: String(TURN/ROAD_CHANGE/LOCATION_DEPARTURE/LOCATION_ARRIVAL/DIRECTION_INFO/LOCATION_WAYPOINT)
+ * roadNumbers: [
+ * String
+ * ]
+ * exitNumber: String
+ * street: String
+ * signpostText: String
+ * countryCode: String
+ * stateCode: String
+ * junctionType: String(REGULAR/ROUNDABOUT/BIFURCATION)
+ * turnAngleInDegrees: Integer
+ * roundaboutExitNumber: String
+ * possibleCombineWithNext: Boolean
+ * drivingSide: String(LEFT/RIGHT)
+ * maneuver: String(ARRIVE/ARRIVE_LEFT/ARRIVE_RIGHT/DEPART/STRAIGHT/KEEP_RIGHT/BEAR_RIGHT/TURN_RIGHT/SHARP_RIGHT/KEEP_LEFT/BEAR_LEFT/TURN_LEFT/SHARP_LEFT/MAKE_UTURN/ENTER_MOTORWAY/ENTER_FREEWAY/ENTER_HIGHWAY/TAKE_EXIT/MOTORWAY_EXIT_LEFT/MOTORWAY_EXIT_RIGHT/TAKE_FERRY/ROUNDABOUT_CROSS/ROUNDABOUT_RIGHT/ROUNDABOUT_LEFT/ROUNDABOUT_BACK/TRY_MAKE_UTURN/FOLLOW/SWITCH_PARALLEL_ROAD/SWITCH_MAIN_ROAD/ENTRANCE_RAMP/WAYPOINT_LEFT/WAYPOINT_RIGHT/WAYPOINT_REACHED)
+ * message: String
+ * combinedMessage: String
+ * }
+ * ]
+ * instructionGroups: [
+ * {
+ * firstInstructionIndex: Integer
+ * lastInstructionIndex: Integer
+ * groupLengthInMeters: Integer
+ * groupMessage: String
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * optimizedWaypoints: [
+ * {
+ * providedIndex: Integer
+ * optimizedIndex: Integer
+ * }
+ * ]
+ * report: {
+ * effectiveSettings: [
+ * {
+ * key: String
+ * value: String
+ * }
+ * ]
+ * }
+ * error: {
+ * code: String
+ * message: String
+ * target: String
+ * details: [
+ * (recursive schema, see above)
+ * ]
+ * additionalInfo: [
+ * {
+ * type: String
+ * info: Object
+ * }
+ * ]
+ * }
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ * @param batchId Batch id for querying the operation.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return this object is returned from a successful Route Directions Batch service call along with {@link Response}
+ * on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getRouteDirectionsBatchWithResponse(
+ String batchId, RequestOptions requestOptions) {
+ return this.serviceClient.getRouteDirectionsBatchWithResponseAsync(batchId, requestOptions);
+ }
+
+ /**
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ * ### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
+ * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
+ * `POST` batch request and looks like the following:
+ *
+ *
```
+ * https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}
+ * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
+ * using the _download URL_. 2. The server will respond with one of the following:
+ *
+ *
> HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
+ * time.
+ *
+ *
> HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
+ *
+ *
### Batch Response Model The returned data content is similar for async and sync requests. When downloading
+ * the results of an async batch request, if the batch has finished processing, the response body contains the batch
+ * response. This 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 in `batchItems` contains `statusCode` and `response` fields. Each `response` in
+ * `batchItems` is of one of the following types:
+ *
+ *
- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
+ * the query completed successfully.
+ *
+ *
- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
+ *
+ *
Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
+ *
+ *
```json { "summary": { "successfulRequests": 1, "totalRequests": 2 }, "batchItems": [ { "statusCode": 200,
+ * "response": { "routes": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "legs": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "points": [ { "latitude": 47.62094, "longitude": -122.34892 }, { "latitude":
+ * 47.62094, "longitude": -122.3485 }, { "latitude": 47.62095, "longitude": -122.3476 } ] } ], "sections": [ {
+ * "startPointIndex": 0, "endPointIndex": 40, "sectionType": "TRAVEL_MODE", "travelMode": "bicycle" } ] } ] } }, {
+ * "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
+ * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * batchSummary: {
+ * successfulRequests: Integer
+ * totalRequests: Integer
+ * }
+ * batchItems: [
+ * {
+ * statusCode: Integer
+ * response: {
+ * formatVersion: String
+ * routes: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * }
+ * legs: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * points: [
+ * {
+ * latitude: Double
+ * longitude: Double
+ * }
+ * ]
+ * }
+ * ]
+ * sections: [
+ * {
+ * startPointIndex: Integer
+ * endPointIndex: Integer
+ * sectionType: String(CAR_TRAIN/COUNTRY/FERRY/MOTORWAY/PEDESTRIAN/TOLL_ROAD/TOLL_VIGNETTE/TRAFFIC/TRAVEL_MODE/TUNNEL/CARPOOL/URBAN)
+ * travelMode: String(car/truck/taxi/bus/van/motorcycle/bicycle/pedestrian/other)
+ * simpleCategory: String(JAM/ROAD_WORK/ROAD_CLOSURE/OTHER)
+ * effectiveSpeedInKmh: Integer
+ * delayInSeconds: Integer
+ * delayMagnitude: String(0/1/2/3/4)
+ * tec: {
+ * effectCode: Integer
+ * causes: [
+ * {
+ * mainCauseCode: Integer
+ * subCauseCode: Integer
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * guidance: {
+ * instructions: [
+ * {
+ * routeOffsetInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * point: (recursive schema, see point above)
+ * pointIndex: Integer
+ * instructionType: String(TURN/ROAD_CHANGE/LOCATION_DEPARTURE/LOCATION_ARRIVAL/DIRECTION_INFO/LOCATION_WAYPOINT)
+ * roadNumbers: [
+ * String
+ * ]
+ * exitNumber: String
+ * street: String
+ * signpostText: String
+ * countryCode: String
+ * stateCode: String
+ * junctionType: String(REGULAR/ROUNDABOUT/BIFURCATION)
+ * turnAngleInDegrees: Integer
+ * roundaboutExitNumber: String
+ * possibleCombineWithNext: Boolean
+ * drivingSide: String(LEFT/RIGHT)
+ * maneuver: String(ARRIVE/ARRIVE_LEFT/ARRIVE_RIGHT/DEPART/STRAIGHT/KEEP_RIGHT/BEAR_RIGHT/TURN_RIGHT/SHARP_RIGHT/KEEP_LEFT/BEAR_LEFT/TURN_LEFT/SHARP_LEFT/MAKE_UTURN/ENTER_MOTORWAY/ENTER_FREEWAY/ENTER_HIGHWAY/TAKE_EXIT/MOTORWAY_EXIT_LEFT/MOTORWAY_EXIT_RIGHT/TAKE_FERRY/ROUNDABOUT_CROSS/ROUNDABOUT_RIGHT/ROUNDABOUT_LEFT/ROUNDABOUT_BACK/TRY_MAKE_UTURN/FOLLOW/SWITCH_PARALLEL_ROAD/SWITCH_MAIN_ROAD/ENTRANCE_RAMP/WAYPOINT_LEFT/WAYPOINT_RIGHT/WAYPOINT_REACHED)
+ * message: String
+ * combinedMessage: String
+ * }
+ * ]
+ * instructionGroups: [
+ * {
+ * firstInstructionIndex: Integer
+ * lastInstructionIndex: Integer
+ * groupLengthInMeters: Integer
+ * groupMessage: String
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * optimizedWaypoints: [
+ * {
+ * providedIndex: Integer
+ * optimizedIndex: Integer
+ * }
+ * ]
+ * report: {
+ * effectiveSettings: [
+ * {
+ * key: String
+ * value: String
+ * }
+ * ]
+ * }
+ * error: {
+ * code: String
+ * message: String
+ * target: String
+ * details: [
+ * (recursive schema, see above)
+ * ]
+ * additionalInfo: [
+ * {
+ * type: String
+ * info: Object
+ * }
+ * ]
+ * }
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ * @param batchId Batch id for querying the operation.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return the {@link PollerFlux} for polling of this object is returned from a successful Route Directions Batch
+ * service call.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginGetRouteDirectionsBatch(
+ String batchId, RequestOptions requestOptions) {
+ return this.serviceClient.beginGetRouteDirectionsBatchAsync(batchId, requestOptions);
+ }
+
+ /**
+ * **Route Directions Batch API**
+ *
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ *
The Route Directions Batch API sends batches of queries to [Route Directions
+ * API](https://docs.microsoft.com/rest/api/maps/route/getroutedirections) using just a single API call. You can
+ * call Route Directions Batch API to run either asynchronously (async) or synchronously (sync). The async API
+ * allows caller to batch up to **700** queries and sync API up to **100** queries. ### Submit Synchronous Batch
+ * Request The 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. ``` POST
+ * https://atlas.microsoft.com/route/directions/batch/sync/json?api-version=1.0&subscription-key={subscription-key}
+ * ``` ### Batch Response Model The returned data content is similar for async and sync requests. When downloading
+ * the results of an async batch request, if the batch has finished processing, the response body contains the batch
+ * response. This 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 in `batchItems` contains `statusCode` and `response` fields. Each `response` in
+ * `batchItems` is of one of the following types:
+ *
+ *
- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
+ * the query completed successfully.
+ *
+ *
- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
+ *
+ *
Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
+ *
+ *
```json { "summary": { "successfulRequests": 1, "totalRequests": 2 }, "batchItems": [ { "statusCode": 200,
+ * "response": { "routes": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "legs": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "points": [ { "latitude": 47.62094, "longitude": -122.34892 }, { "latitude":
+ * 47.62094, "longitude": -122.3485 }, { "latitude": 47.62095, "longitude": -122.3476 } ] } ], "sections": [ {
+ * "startPointIndex": 0, "endPointIndex": 40, "sectionType": "TRAVEL_MODE", "travelMode": "bicycle" } ] } ] } }, {
+ * "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
+ * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Request Body Schema
+ *
+ *
{@code
+ * {
+ * batchItems: [
+ * {
+ * query: String
+ * }
+ * ]
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * batchSummary: {
+ * successfulRequests: Integer
+ * totalRequests: Integer
+ * }
+ * batchItems: [
+ * {
+ * statusCode: Integer
+ * response: {
+ * formatVersion: String
+ * routes: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * }
+ * legs: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * points: [
+ * {
+ * latitude: Double
+ * longitude: Double
+ * }
+ * ]
+ * }
+ * ]
+ * sections: [
+ * {
+ * startPointIndex: Integer
+ * endPointIndex: Integer
+ * sectionType: String(CAR_TRAIN/COUNTRY/FERRY/MOTORWAY/PEDESTRIAN/TOLL_ROAD/TOLL_VIGNETTE/TRAFFIC/TRAVEL_MODE/TUNNEL/CARPOOL/URBAN)
+ * travelMode: String(car/truck/taxi/bus/van/motorcycle/bicycle/pedestrian/other)
+ * simpleCategory: String(JAM/ROAD_WORK/ROAD_CLOSURE/OTHER)
+ * effectiveSpeedInKmh: Integer
+ * delayInSeconds: Integer
+ * delayMagnitude: String(0/1/2/3/4)
+ * tec: {
+ * effectCode: Integer
+ * causes: [
+ * {
+ * mainCauseCode: Integer
+ * subCauseCode: Integer
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * guidance: {
+ * instructions: [
+ * {
+ * routeOffsetInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * point: (recursive schema, see point above)
+ * pointIndex: Integer
+ * instructionType: String(TURN/ROAD_CHANGE/LOCATION_DEPARTURE/LOCATION_ARRIVAL/DIRECTION_INFO/LOCATION_WAYPOINT)
+ * roadNumbers: [
+ * String
+ * ]
+ * exitNumber: String
+ * street: String
+ * signpostText: String
+ * countryCode: String
+ * stateCode: String
+ * junctionType: String(REGULAR/ROUNDABOUT/BIFURCATION)
+ * turnAngleInDegrees: Integer
+ * roundaboutExitNumber: String
+ * possibleCombineWithNext: Boolean
+ * drivingSide: String(LEFT/RIGHT)
+ * maneuver: String(ARRIVE/ARRIVE_LEFT/ARRIVE_RIGHT/DEPART/STRAIGHT/KEEP_RIGHT/BEAR_RIGHT/TURN_RIGHT/SHARP_RIGHT/KEEP_LEFT/BEAR_LEFT/TURN_LEFT/SHARP_LEFT/MAKE_UTURN/ENTER_MOTORWAY/ENTER_FREEWAY/ENTER_HIGHWAY/TAKE_EXIT/MOTORWAY_EXIT_LEFT/MOTORWAY_EXIT_RIGHT/TAKE_FERRY/ROUNDABOUT_CROSS/ROUNDABOUT_RIGHT/ROUNDABOUT_LEFT/ROUNDABOUT_BACK/TRY_MAKE_UTURN/FOLLOW/SWITCH_PARALLEL_ROAD/SWITCH_MAIN_ROAD/ENTRANCE_RAMP/WAYPOINT_LEFT/WAYPOINT_RIGHT/WAYPOINT_REACHED)
+ * message: String
+ * combinedMessage: String
+ * }
+ * ]
+ * instructionGroups: [
+ * {
+ * firstInstructionIndex: Integer
+ * lastInstructionIndex: Integer
+ * groupLengthInMeters: Integer
+ * groupMessage: String
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * optimizedWaypoints: [
+ * {
+ * providedIndex: Integer
+ * optimizedIndex: Integer
+ * }
+ * ]
+ * report: {
+ * effectiveSettings: [
+ * {
+ * key: String
+ * value: String
+ * }
+ * ]
+ * }
+ * error: {
+ * code: String
+ * message: String
+ * target: String
+ * details: [
+ * (recursive schema, see above)
+ * ]
+ * additionalInfo: [
+ * {
+ * type: String
+ * info: Object
+ * }
+ * ]
+ * }
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ * @param format Desired format of the response. Only `json` format is supported.
+ * @param routeDirectionsBatchQueries The list of route directions queries/requests to process. The list can contain
+ * a max of 700 queries for async and 100 queries for sync version and must contain at least 1 query.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return this object is returned from a successful Route Directions Batch service call along with {@link Response}
+ * on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> requestRouteDirectionsBatchSyncWithResponse(
+ String format, BinaryData routeDirectionsBatchQueries, RequestOptions requestOptions) {
+ return this.serviceClient.requestRouteDirectionsBatchSyncWithResponseAsync(
+ format, routeDirectionsBatchQueries, requestOptions);
+ }
+}
diff --git a/sdk/maps/azure-maps-route/src/main/java/com/azure/maps/route/AzureMapsRouteServiceClient.java b/sdk/maps/azure-maps-route/src/main/java/com/azure/maps/route/AzureMapsRouteServiceClient.java
new file mode 100644
index 000000000000..1d68d5b6e05a
--- /dev/null
+++ b/sdk/maps/azure-maps-route/src/main/java/com/azure/maps/route/AzureMapsRouteServiceClient.java
@@ -0,0 +1,2067 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.maps.route;
+
+import com.azure.core.annotation.Generated;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceClient;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.exception.HttpResponseException;
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.BinaryData;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.maps.route.implementation.RoutesImpl;
+
+/** Initializes a new instance of the synchronous AzureMapsRouteServiceClient type. */
+@ServiceClient(builder = AzureMapsRouteServiceClientBuilder.class)
+public final class AzureMapsRouteServiceClient {
+ @Generated private final RoutesImpl serviceClient;
+
+ /**
+ * Initializes an instance of Routes client.
+ *
+ * @param serviceClient the service client implementation.
+ */
+ @Generated
+ AzureMapsRouteServiceClient(RoutesImpl serviceClient) {
+ this.serviceClient = serviceClient;
+ }
+
+ /**
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ * The Matrix Routing service allows calculation of a matrix of route summaries for a set of routes defined by
+ * origin and destination locations by using an asynchronous (async) or synchronous (sync) POST request. For every
+ * given origin, the service calculates the cost of routing from that origin to every given destination. The set of
+ * origins and the set of destinations can be thought of as the column and row headers of a table and each cell in
+ * the table contains the costs of routing from the origin to the destination for that cell. As an example, let's
+ * say a food delivery company has 20 drivers and they need to find the closest driver to pick up the delivery from
+ * the restaurant. To solve this use case, they can call Matrix Route API.
+ *
+ *
For each route, the travel times and distances are returned. You can use the computed costs to determine which
+ * detailed routes to calculate using the Route Directions API.
+ *
+ *
The maximum size of a matrix for async request is **700** and for sync request it's **100** (the number of
+ * origins multiplied by the number of destinations).
+ *
+ *
### Submit Synchronous Route Matrix Request If your scenario requires synchronous requests and the maximum
+ * size of the matrix is less than or equal to 100, you might want to make synchronous request. The maximum size of
+ * a matrix for this API is **100** (the number of origins multiplied by the number of destinations). With that
+ * constraint in mind, examples of possible matrix dimensions are: 10x10, 6x8, 9x8 (it does not need to be square).
+ *
+ *
``` POST
+ * https://atlas.microsoft.com/route/matrix/sync/json?api-version=1.0&subscription-key={subscription-key} ```
+ *
+ *
### Submit Asynchronous Route Matrix Request The Asynchronous API is appropriate for processing big volumes of
+ * relatively complex routing requests. When you make a request by using async request, by default the service
+ * returns a 202 response code along a redirect URL in the Location field of the response header. This URL should be
+ * checked periodically until the response data or error information is available. If `waitForResults` parameter in
+ * the request is set to true, user will get a 200 response if the request is finished under 120 seconds.
+ *
+ *
The maximum size of a matrix for this API is **700** (the number of origins multiplied by the number of
+ * destinations). With that constraint in mind, examples of possible matrix dimensions are: 50x10, 10x10, 28x25.
+ * 10x70 (it does not need to be square).
+ *
+ *
The asynchronous responses are stored for **14** days. The redirect URL returns a 404 response if used after
+ * the expiration period.
+ *
+ *
``` POST https://atlas.microsoft.com/route/matrix/json?api-version=1.0&subscription-key={subscription-key}
+ * ```
+ *
+ *
Here's a typical sequence of asynchronous operations: 1. Client sends a Route Matrix POST request to Azure
+ * Maps
+ *
+ *
2. The server will respond with one of the following:
+ *
+ *
> HTTP `202 Accepted` - Route Matrix request has been accepted.
+ *
+ *
> HTTP `Error` - There was an error processing your Route Matrix request. This could either be a 400 Bad
+ * Request or any other Error status code.
+ *
+ *
3. If the Matrix Route request was accepted successfully, the Location header in the response contains the URL
+ * to download the results of the request. This status URI looks like the following:
+ *
+ *
``` GET
+ * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
+ *
+ *
4. Client issues a GET request on the download URL obtained in Step 3 to download the results
+ *
+ *
### Download Sync Results When you make a POST request for Route Matrix Sync API, the service returns 200
+ * response code for successful request and a response array. The response body will contain the data and there will
+ * be no possibility to retrieve the results later.
+ *
+ *
### Download Async Results When a request issues a `202 Accepted` response, the request is being processed
+ * using our async pipeline. You will be given a URL to check the progress of your async request in the location
+ * header of the response. This status URI looks like the following: ``` GET
+ * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
+ *
+ *
The URL provided by the location header will return the following responses when a `GET` request is issued.
+ *
+ *
> HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some
+ * time.
+ *
+ *
> HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ * | waitForResults | String | No | Boolean to indicate whether to execute the request synchronously. If set to true, user will get a 200 response if the request is finished under 120 seconds. Otherwise, user will get a 202 response right away. Please refer to the API description for more details on 202 response. **Supported only for async request**. |
+ * | computeTravelTimeFor | String | No | Specifies whether to return additional travel times using different types of traffic information (none, historic, live) as well as the default best-estimate travel time. |
+ * | sectionType | String | No | Specifies which of the section types is reported in the route response. <br><br>For example if sectionType = pedestrian the sections which are suited for pedestrians only are returned. Multiple types can be used. The default sectionType refers to the travelMode input. By default travelMode is set to car |
+ * | arriveAt | String | No | The date and time of arrival at the destination point. It must be specified as a dateTime. When a time zone offset is not specified it will be assumed to be that of the destination point. The arriveAt value must be in the future. The arriveAt parameter cannot be used in conjunction with departAt, minDeviationDistance or minDeviationTime. |
+ * | departAt | String | No | The date and time of departure from the origin point. Departure times apart from now must be specified as a dateTime. When a time zone offset is not specified, it will be assumed to be that of the origin point. The departAt value must be in the future in the date-time format (1996-12-19T16:39:57-08:00). |
+ * | vehicleAxleWeight | String | No | Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per axle are not considered. |
+ * | vehicleLength | String | No | Length of the vehicle in meters. A value of 0 means that length restrictions are not considered. |
+ * | vehicleHeight | String | No | Height of the vehicle in meters. A value of 0 means that height restrictions are not considered. |
+ * | vehicleWidth | String | No | Width of the vehicle in meters. A value of 0 means that width restrictions are not considered. |
+ * | vehicleMaxSpeed | String | No | 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.
+ *
+ * * A value of 0 means that an appropriate value for the vehicle will be determined and applied during route planning.
+ *
+ * * A 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. |
+ * | vehicleWeight | String | No | Weight of the vehicle in kilograms. |
+ * | windingness | String | No | Level of turns for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | hilliness | String | No | Degree of hilliness for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | travelMode | String | No | The mode of travel for the requested route. If not defined, default is 'car'. Note that the requested travelMode may not be available for the entire route. Where the requested travelMode is not available for a particular section, the travelMode element of the response for that section will be "other". Note that travel modes bus, motorcycle, taxi and van are BETA functionality. Full restriction data is not available in all areas. In **calculateReachableRange** requests, the values bicycle and pedestrian must not be used. |
+ * | avoid | String | No | Specifies something that the route calculation should try to avoid when determining the route. Can be specified multiple times in one request, for example, '&avoid=motorways&avoid=tollRoads&avoid=ferries'. In calculateReachableRange requests, the value alreadyUsedRoads must not be used. |
+ * | traffic | String | No | Possible values:
+ * * true - Do consider all available traffic information during routing
+ * * false - Ignore current traffic data during routing. Note that although the current traffic data is ignored
+ * during routing, the effect of historic traffic on effective road speeds is still incorporated. |
+ * | routeType | String | No | The type of route requested. |
+ * | vehicleLoadType | String | No | 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 can be specified multiple times. This parameter is currently only considered for travelMode=truck. |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Request Body Schema
+ *
+ *
{@code
+ * {
+ * origins: {
+ * coordinates: [
+ * [
+ * double
+ * ]
+ * ]
+ * }
+ * destinations: (recursive schema, see destinations above)
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * formatVersion: String
+ * matrix: [
+ * [
+ * {
+ * statusCode: Integer
+ * response: {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * }
+ * }
+ * ]
+ * ]
+ * summary: {
+ * successfulRoutes: Integer
+ * totalRoutes: Integer
+ * }
+ * }
+ * }
+ *
+ * @param format Desired format of the response. Only `json` format is supported.
+ * @param routeMatrixQuery The matrix of origin and destination coordinates to compute the route distance, travel
+ * time and other summary for each cell of the matrix based on the input parameters. The minimum and the maximum
+ * cell count supported are 1 and **700** for async and **100** for sync respectively. For example, it can be 35
+ * origins and 20 destinations or 25 origins and 25 destinations for async API.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return the {@link SyncPoller} for polling of this object is returned from a successful Route Matrix call.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginRequestRouteMatrix(
+ String format, BinaryData routeMatrixQuery, RequestOptions requestOptions) {
+ return this.serviceClient.beginRequestRouteMatrix(format, routeMatrixQuery, requestOptions);
+ }
+
+ /**
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ * If the Matrix Route request was accepted successfully, the Location header in the response contains the URL to
+ * download the results of the request. This status URI looks like the following:
+ *
+ *
``` GET
+ * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
+ *
+ *
4. Client issues a GET request on the download URL obtained in Step 3 to download the results
+ *
+ *
### Download Sync Results When you make a POST request for Route Matrix Sync API, the service returns 200
+ * response code for successful request and a response array. The response body will contain the data and there will
+ * be no possibility to retrieve the results later.
+ *
+ *
### Download Async Results When a request issues a `202 Accepted` response, the request is being processed
+ * using our async pipeline. You will be given a URL to check the progress of your async request in the location
+ * header of the response. This status URI looks like the following: ``` GET
+ * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
+ *
+ *
The URL provided by the location header will return the following responses when a `GET` request is issued.
+ *
+ *
> HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some
+ * time.
+ *
+ *
> HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * formatVersion: String
+ * matrix: [
+ * [
+ * {
+ * statusCode: Integer
+ * response: {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * }
+ * }
+ * ]
+ * ]
+ * summary: {
+ * successfulRoutes: Integer
+ * totalRoutes: Integer
+ * }
+ * }
+ * }
+ *
+ * @param matrixId Matrix id received after the Matrix Route request was accepted successfully.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return the {@link SyncPoller} for polling of this object is returned from a successful Route Matrix call.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginGetRouteMatrix(String matrixId, RequestOptions requestOptions) {
+ return this.serviceClient.beginGetRouteMatrix(matrixId, requestOptions);
+ }
+
+ /**
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ * The Matrix Routing service allows calculation of a matrix of route summaries for a set of routes defined by
+ * origin and destination locations by using an asynchronous (async) or synchronous (sync) POST request. For every
+ * given origin, the service calculates the cost of routing from that origin to every given destination. The set of
+ * origins and the set of destinations can be thought of as the column and row headers of a table and each cell in
+ * the table contains the costs of routing from the origin to the destination for that cell. As an example, let's
+ * say a food delivery company has 20 drivers and they need to find the closest driver to pick up the delivery from
+ * the restaurant. To solve this use case, they can call Matrix Route API.
+ *
+ *
For each route, the travel times and distances are returned. You can use the computed costs to determine which
+ * detailed routes to calculate using the Route Directions API.
+ *
+ *
The maximum size of a matrix for async request is **700** and for sync request it's **100** (the number of
+ * origins multiplied by the number of destinations).
+ *
+ *
### Submit Synchronous Route Matrix Request If your scenario requires synchronous requests and the maximum
+ * size of the matrix is less than or equal to 100, you might want to make synchronous request. The maximum size of
+ * a matrix for this API is **100** (the number of origins multiplied by the number of destinations). With that
+ * constraint in mind, examples of possible matrix dimensions are: 10x10, 6x8, 9x8 (it does not need to be square).
+ *
+ *
``` POST
+ * https://atlas.microsoft.com/route/matrix/sync/json?api-version=1.0&subscription-key={subscription-key} ```
+ *
+ *
### Submit Asynchronous Route Matrix Request The Asynchronous API is appropriate for processing big volumes of
+ * relatively complex routing requests. When you make a request by using async request, by default the service
+ * returns a 202 response code along a redirect URL in the Location field of the response header. This URL should be
+ * checked periodically until the response data or error information is available. If `waitForResults` parameter in
+ * the request is set to true, user will get a 200 response if the request is finished under 120 seconds.
+ *
+ *
The maximum size of a matrix for this API is **700** (the number of origins multiplied by the number of
+ * destinations). With that constraint in mind, examples of possible matrix dimensions are: 50x10, 10x10, 28x25.
+ * 10x70 (it does not need to be square).
+ *
+ *
The asynchronous responses are stored for **14** days. The redirect URL returns a 404 response if used after
+ * the expiration period.
+ *
+ *
``` POST https://atlas.microsoft.com/route/matrix/json?api-version=1.0&subscription-key={subscription-key}
+ * ```
+ *
+ *
Here's a typical sequence of asynchronous operations: 1. Client sends a Route Matrix POST request to Azure
+ * Maps
+ *
+ *
2. The server will respond with one of the following:
+ *
+ *
> HTTP `202 Accepted` - Route Matrix request has been accepted.
+ *
+ *
> HTTP `Error` - There was an error processing your Route Matrix request. This could either be a 400 Bad
+ * Request or any other Error status code.
+ *
+ *
3. If the Matrix Route request was accepted successfully, the Location header in the response contains the URL
+ * to download the results of the request. This status URI looks like the following:
+ *
+ *
``` GET
+ * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
+ *
+ *
4. Client issues a GET request on the download URL obtained in Step 3 to download the results
+ *
+ *
### Download Sync Results When you make a POST request for Route Matrix Sync API, the service returns 200
+ * response code for successful request and a response array. The response body will contain the data and there will
+ * be no possibility to retrieve the results later.
+ *
+ *
### Download Async Results When a request issues a `202 Accepted` response, the request is being processed
+ * using our async pipeline. You will be given a URL to check the progress of your async request in the location
+ * header of the response. This status URI looks like the following: ``` GET
+ * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
+ *
+ *
The URL provided by the location header will return the following responses when a `GET` request is issued.
+ *
+ *
> HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some
+ * time.
+ *
+ *
> HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ * | waitForResults | String | No | Boolean to indicate whether to execute the request synchronously. If set to true, user will get a 200 response if the request is finished under 120 seconds. Otherwise, user will get a 202 response right away. Please refer to the API description for more details on 202 response. **Supported only for async request**. |
+ * | computeTravelTimeFor | String | No | Specifies whether to return additional travel times using different types of traffic information (none, historic, live) as well as the default best-estimate travel time. |
+ * | sectionType | String | No | Specifies which of the section types is reported in the route response. <br><br>For example if sectionType = pedestrian the sections which are suited for pedestrians only are returned. Multiple types can be used. The default sectionType refers to the travelMode input. By default travelMode is set to car |
+ * | arriveAt | String | No | The date and time of arrival at the destination point. It must be specified as a dateTime. When a time zone offset is not specified it will be assumed to be that of the destination point. The arriveAt value must be in the future. The arriveAt parameter cannot be used in conjunction with departAt, minDeviationDistance or minDeviationTime. |
+ * | departAt | String | No | The date and time of departure from the origin point. Departure times apart from now must be specified as a dateTime. When a time zone offset is not specified, it will be assumed to be that of the origin point. The departAt value must be in the future in the date-time format (1996-12-19T16:39:57-08:00). |
+ * | vehicleAxleWeight | String | No | Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per axle are not considered. |
+ * | vehicleLength | String | No | Length of the vehicle in meters. A value of 0 means that length restrictions are not considered. |
+ * | vehicleHeight | String | No | Height of the vehicle in meters. A value of 0 means that height restrictions are not considered. |
+ * | vehicleWidth | String | No | Width of the vehicle in meters. A value of 0 means that width restrictions are not considered. |
+ * | vehicleMaxSpeed | String | No | 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.
+ *
+ * * A value of 0 means that an appropriate value for the vehicle will be determined and applied during route planning.
+ *
+ * * A 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. |
+ * | vehicleWeight | String | No | Weight of the vehicle in kilograms. |
+ * | windingness | String | No | Level of turns for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | hilliness | String | No | Degree of hilliness for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | travelMode | String | No | The mode of travel for the requested route. If not defined, default is 'car'. Note that the requested travelMode may not be available for the entire route. Where the requested travelMode is not available for a particular section, the travelMode element of the response for that section will be "other". Note that travel modes bus, motorcycle, taxi and van are BETA functionality. Full restriction data is not available in all areas. In **calculateReachableRange** requests, the values bicycle and pedestrian must not be used. |
+ * | avoid | String | No | Specifies something that the route calculation should try to avoid when determining the route. Can be specified multiple times in one request, for example, '&avoid=motorways&avoid=tollRoads&avoid=ferries'. In calculateReachableRange requests, the value alreadyUsedRoads must not be used. |
+ * | traffic | String | No | Possible values:
+ * * true - Do consider all available traffic information during routing
+ * * false - Ignore current traffic data during routing. Note that although the current traffic data is ignored
+ * during routing, the effect of historic traffic on effective road speeds is still incorporated. |
+ * | routeType | String | No | The type of route requested. |
+ * | vehicleLoadType | String | No | 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 can be specified multiple times. This parameter is currently only considered for travelMode=truck. |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Request Body Schema
+ *
+ *
{@code
+ * {
+ * origins: {
+ * coordinates: [
+ * [
+ * double
+ * ]
+ * ]
+ * }
+ * destinations: (recursive schema, see destinations above)
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * formatVersion: String
+ * matrix: [
+ * [
+ * {
+ * statusCode: Integer
+ * response: {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * }
+ * }
+ * ]
+ * ]
+ * summary: {
+ * successfulRoutes: Integer
+ * totalRoutes: Integer
+ * }
+ * }
+ * }
+ *
+ * @param format Desired format of the response. Only `json` format is supported.
+ * @param routeMatrixQuery The matrix of origin and destination coordinates to compute the route distance, travel
+ * time and other summary for each cell of the matrix based on the input parameters. The minimum and the maximum
+ * cell count supported are 1 and **700** for async and **100** for sync respectively. For example, it can be 35
+ * origins and 20 destinations or 25 origins and 25 destinations for async API.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return this object is returned from a successful Route Matrix call along with {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response requestRouteMatrixSyncWithResponse(
+ String format, BinaryData routeMatrixQuery, RequestOptions requestOptions) {
+ return this.serviceClient.requestRouteMatrixSyncWithResponse(format, routeMatrixQuery, requestOptions);
+ }
+
+ /**
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ * Returns a route between an origin and a destination, passing through waypoints if they are specified. The
+ * route will take into account factors such as current traffic and the typical road speeds on the requested day of
+ * the week and time of day.
+ *
+ *
Information returned includes the distance, estimated travel time, and a representation of the route geometry.
+ * Additional routing information such as optimized waypoint order or turn by turn instructions is also available,
+ * depending on the options selected.
+ *
+ *
Routing service provides a set of parameters for a detailed description of vehicle-specific Consumption Model.
+ * Please check [Consumption Model](https://docs.microsoft.com/azure/azure-maps/consumption-model) for detailed
+ * explanation of the concepts and parameters involved.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ * | query | String | Yes | The Coordinates through which the route is calculated, delimited by a colon. A minimum of two coordinates is required. The first one is the origin and the last is the destination of the route. Optional coordinates in-between act as WayPoints in the route. You can pass up to 150 WayPoints. |
+ * | maxAlternatives | String | No | Number of desired alternative routes to be calculated. Default: 0, minimum: 0 and maximum: 5 |
+ * | alternativeType | String | No | Controls the optimality, with respect to the given planning criteria, of the calculated alternatives compared to the reference route. |
+ * | minDeviationDistance | String | No | All alternative routes returned will follow the reference route (see section POST Requests) from the origin point of the calculateRoute request for at least this number of meters. Can only be used when reconstructing a route. The minDeviationDistance parameter cannot be used in conjunction with arriveAt |
+ * | arriveAt | String | No | The date and time of arrival at the destination point. It must be specified as a dateTime. When a time zone offset is not specified it will be assumed to be that of the destination point. The arriveAt value must be in the future. The arriveAt parameter cannot be used in conjunction with departAt, minDeviationDistance or minDeviationTime. |
+ * | departAt | String | No | The date and time of departure from the origin point. Departure times apart from now must be specified as a dateTime. When a time zone offset is not specified, it will be assumed to be that of the origin point. The departAt value must be in the future in the date-time format (1996-12-19T16:39:57-08:00). |
+ * | minDeviationTime | String | No | All alternative routes returned will follow the reference route (see section POST Requests) from the origin point of the calculateRoute request for at least this number of seconds. Can only be used when reconstructing a route. The minDeviationTime parameter cannot be used in conjunction with arriveAt. Default value is 0. Setting )minDeviationTime_ to a value greater than zero has the following consequences:
+ * - The origin point of the _calculateRoute_ Request must be on
+ * (or very near) the input reference route.
+ * - If this is not the case, an error is returned.
+ * - However, the origin point does not need to be at the beginning
+ * of the input reference route (it can be thought of as the current
+ * vehicle position on the reference route).
+ * - The reference route, returned as the first route in the _calculateRoute_
+ * Response, will start at the origin point specified in the _calculateRoute_
+ * Request. The initial part of the input reference route up until the origin
+ * point will be excluded from the Response.
+ * - The values of _minDeviationDistance_ and _minDeviationTime_ determine
+ * how far alternative routes will be guaranteed to follow the reference
+ * route from the origin point onwards.
+ * - The route must use _departAt_.
+ * - The _vehicleHeading_ is ignored. |
+ * | instructionsType | String | No | If specified, guidance instructions will be returned. Note that the instructionsType parameter cannot be used in conjunction with routeRepresentation=none |
+ * | language | String | No | The language parameter determines the language of the guidance messages. Proper nouns (the names of streets, plazas, etc.) are returned in the specified language, or if that is not available, they are returned in an available language that is close to it. Allowed values are (a subset of) the IETF language tags. The currently supported languages are listed in the [Supported languages section](https://docs.microsoft.com/azure/azure-maps/supported-languages).
+ *
+ * Default value: en-GB |
+ * | computeBestOrder | String | No | Re-order the route waypoints using a fast heuristic algorithm to reduce the route length. Yields best results when used in conjunction with routeType _shortest_. Notice that origin and destination are excluded from the optimized waypoint indices. To include origin and destination in the response, please increase all the indices by 1 to account for the origin, and then add the destination as the final index. Possible values are true or false. True computes a better order if possible, but is not allowed to be used in conjunction with maxAlternatives value greater than 0 or in conjunction with circle waypoints. False will use the locations in the given order and not allowed to be used in conjunction with routeRepresentation _none_. |
+ * | routeRepresentation | String | No | Specifies the representation of the set of routes provided as response. This parameter value can only be used in conjunction with computeBestOrder=true. |
+ * | computeTravelTimeFor | String | No | Specifies whether to return additional travel times using different types of traffic information (none, historic, live) as well as the default best-estimate travel time. |
+ * | vehicleHeading | String | No | The 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 |
+ * | report | String | No | Specifies which data should be reported for diagnosis purposes. The only possible value is _effectiveSettings_. Reports the effective parameters or data used when calling the API. In the case of defaulted parameters the default will be reflected where the parameter was not specified by the caller. |
+ * | sectionType | String | No | Specifies which of the section types is reported in the route response. <br><br>For example if sectionType = pedestrian the sections which are suited for pedestrians only are returned. Multiple types can be used. The default sectionType refers to the travelMode input. By default travelMode is set to car |
+ * | vehicleAxleWeight | String | No | Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per axle are not considered. |
+ * | vehicleWidth | String | No | Width of the vehicle in meters. A value of 0 means that width restrictions are not considered. |
+ * | vehicleHeight | String | No | Height of the vehicle in meters. A value of 0 means that height restrictions are not considered. |
+ * | vehicleLength | String | No | Length of the vehicle in meters. A value of 0 means that length restrictions are not considered. |
+ * | vehicleMaxSpeed | String | No | 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.
+ *
+ * * A value of 0 means that an appropriate value for the vehicle will be determined and applied during route planning.
+ *
+ * * A 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. |
+ * | vehicleWeight | String | No | Weight of the vehicle in kilograms.
+ *
+ * * It is mandatory if any of the *Efficiency parameters are set.
+ *
+ * * It must be strictly positive when used in the context of the Consumption Model. Weight restrictions are considered.
+ *
+ * * If no detailed **Consumption Model** is specified and the value of **vehicleWeight** is non-zero, then weight restrictions are considered.
+ *
+ * * In all other cases, this parameter is ignored.
+ *
+ * Sensible Values : for **Combustion Model** : 1600, for **Electric Model** : 1900 |
+ * | vehicleCommercial | String | No | Whether the vehicle is used for commercial purposes. Commercial vehicles may not be allowed to drive on some roads. |
+ * | windingness | String | No | Level of turns for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | hilliness | String | No | Degree of hilliness for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | travelMode | String | No | The mode of travel for the requested route. If not defined, default is 'car'. Note that the requested travelMode may not be available for the entire route. Where the requested travelMode is not available for a particular section, the travelMode element of the response for that section will be "other". Note that travel modes bus, motorcycle, taxi and van are BETA functionality. Full restriction data is not available in all areas. In **calculateReachableRange** requests, the values bicycle and pedestrian must not be used. |
+ * | avoid | String | No | Specifies something that the route calculation should try to avoid when determining the route. Can be specified multiple times in one request, for example, '&avoid=motorways&avoid=tollRoads&avoid=ferries'. In calculateReachableRange requests, the value alreadyUsedRoads must not be used. |
+ * | traffic | String | No | Possible values:
+ * * true - Do consider all available traffic information during routing
+ * * false - Ignore current traffic data during routing. Note that although the current traffic data is ignored
+ * during routing, the effect of historic traffic on effective road speeds is still incorporated. |
+ * | routeType | String | No | The type of route requested. |
+ * | vehicleLoadType | String | No | 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 can be specified multiple times. This parameter is currently only considered for travelMode=truck. |
+ * | vehicleEngineType | String | No | Engine type of the vehicle. When a detailed Consumption Model is specified, it must be consistent with the value of **vehicleEngineType**. |
+ * | constantSpeedConsumptionInLitersPerHundredkm | String | No |
+ *
+ * Specifies the speed-dependent component of consumption.
+ *
+ * Provided as an unordered list of colon-delimited speed & consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
+ *
+ * * by linear interpolation, if the given speed lies in between two speeds in the list
+ *
+ * * by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list
+ *
+ * The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing.
+ *
+ * Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates.
+ *
+ * Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.
+ *
+ * The valid range for the consumption values(expressed in l/100km) is between 0.01 and 100000.0.
+ *
+ * Sensible Values : 50,6.3:130,11.5
+ *
+ * **Note** : This parameter is required for **The Combustion Consumption Model**. |
+ * | currentFuelInLiters | String | No | Specifies the current supply of fuel in liters.
+ *
+ * Sensible Values : 55 |
+ * | auxiliaryPowerInLitersPerHour | String | No | Specifies the amount of fuel consumed for sustaining auxiliary systems of the vehicle, in liters per hour.
+ *
+ * It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
+ *
+ * Sensible Values : 0.2 |
+ * | fuelEnergyDensityInMJoulesPerLiter | String | No | Specifies the amount of chemical energy stored in one liter of fuel in megajoules (MJ). It is used in conjunction with the ***Efficiency** parameters for conversions between saved or consumed energy and fuel. For example, energy density is 34.2 MJ/l for gasoline, and 35.8 MJ/l for Diesel fuel.
+ *
+ * This parameter is required if any ***Efficiency** parameter is set.
+ *
+ * Sensible Values : 34.2 |
+ * | accelerationEfficiency | String | No | Specifies the efficiency of converting chemical energy stored in fuel to kinetic energy when the vehicle accelerates _(i.e. KineticEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed_ is obtained by converting consumed fuel to chemical energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **decelerationEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**decelerationEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.33, for **Electric Model** : 0.66 |
+ * | decelerationEfficiency | String | No | Specifies the efficiency of converting kinetic energy to saved (not consumed) fuel when the vehicle decelerates _(i.e. ChemicalEnergySaved/KineticEnergyLost). ChemicalEnergySaved_ is obtained by converting saved (not consumed) fuel to energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **accelerationEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**accelerationEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.83, for **Electric Model** : 0.91 |
+ * | uphillEfficiency | String | No | Specifies the efficiency of converting chemical energy stored in fuel to potential energy when the vehicle gains elevation _(i.e. PotentialEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed_ is obtained by converting consumed fuel to chemical energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **downhillEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**downhillEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.27, for **Electric Model** : 0.74 |
+ * | downhillEfficiency | String | No | Specifies the efficiency of converting potential energy to saved (not consumed) fuel when the vehicle loses elevation _(i.e. ChemicalEnergySaved/PotentialEnergyLost). ChemicalEnergySaved_ is obtained by converting saved (not consumed) fuel to energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **uphillEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**uphillEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.51, for **Electric Model** : 0.73 |
+ * | constantSpeedConsumptionInkWhPerHundredkm | String | No | Specifies the speed-dependent component of consumption.
+ *
+ * Provided as an unordered list of speed/consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
+ *
+ * * by linear interpolation, if the given speed lies in between two speeds in the list
+ *
+ * * by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list
+ *
+ * The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing.
+ *
+ * Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates.
+ *
+ * Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.
+ *
+ * The valid range for the consumption values(expressed in kWh/100km) is between 0.01 and 100000.0.
+ *
+ * Sensible Values : 50,8.2:130,21.3
+ *
+ * This parameter is required for **Electric consumption model**. |
+ * | currentChargeInkWh | String | No | Specifies the current electric energy supply in kilowatt hours (kWh).
+ *
+ * This parameter co-exists with **maxChargeInkWh** parameter.
+ *
+ * The range of values allowed are 0.0 to **maxChargeInkWh**.
+ *
+ * Sensible Values : 43 |
+ * | maxChargeInkWh | String | No | Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in the vehicle's battery.
+ *
+ * This parameter co-exists with **currentChargeInkWh** parameter.
+ *
+ * Minimum value has to be greater than or equal to **currentChargeInkWh**.
+ *
+ * Sensible Values : 85 |
+ * | auxiliaryPowerInkW | String | No | Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts (kW).
+ *
+ * It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
+ *
+ * Sensible Values : 1.7 |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * formatVersion: String
+ * routes: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * }
+ * legs: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * points: [
+ * {
+ * latitude: Double
+ * longitude: Double
+ * }
+ * ]
+ * }
+ * ]
+ * sections: [
+ * {
+ * startPointIndex: Integer
+ * endPointIndex: Integer
+ * sectionType: String(CAR_TRAIN/COUNTRY/FERRY/MOTORWAY/PEDESTRIAN/TOLL_ROAD/TOLL_VIGNETTE/TRAFFIC/TRAVEL_MODE/TUNNEL/CARPOOL/URBAN)
+ * travelMode: String(car/truck/taxi/bus/van/motorcycle/bicycle/pedestrian/other)
+ * simpleCategory: String(JAM/ROAD_WORK/ROAD_CLOSURE/OTHER)
+ * effectiveSpeedInKmh: Integer
+ * delayInSeconds: Integer
+ * delayMagnitude: String(0/1/2/3/4)
+ * tec: {
+ * effectCode: Integer
+ * causes: [
+ * {
+ * mainCauseCode: Integer
+ * subCauseCode: Integer
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * guidance: {
+ * instructions: [
+ * {
+ * routeOffsetInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * point: (recursive schema, see point above)
+ * pointIndex: Integer
+ * instructionType: String(TURN/ROAD_CHANGE/LOCATION_DEPARTURE/LOCATION_ARRIVAL/DIRECTION_INFO/LOCATION_WAYPOINT)
+ * roadNumbers: [
+ * String
+ * ]
+ * exitNumber: String
+ * street: String
+ * signpostText: String
+ * countryCode: String
+ * stateCode: String
+ * junctionType: String(REGULAR/ROUNDABOUT/BIFURCATION)
+ * turnAngleInDegrees: Integer
+ * roundaboutExitNumber: String
+ * possibleCombineWithNext: Boolean
+ * drivingSide: String(LEFT/RIGHT)
+ * maneuver: String(ARRIVE/ARRIVE_LEFT/ARRIVE_RIGHT/DEPART/STRAIGHT/KEEP_RIGHT/BEAR_RIGHT/TURN_RIGHT/SHARP_RIGHT/KEEP_LEFT/BEAR_LEFT/TURN_LEFT/SHARP_LEFT/MAKE_UTURN/ENTER_MOTORWAY/ENTER_FREEWAY/ENTER_HIGHWAY/TAKE_EXIT/MOTORWAY_EXIT_LEFT/MOTORWAY_EXIT_RIGHT/TAKE_FERRY/ROUNDABOUT_CROSS/ROUNDABOUT_RIGHT/ROUNDABOUT_LEFT/ROUNDABOUT_BACK/TRY_MAKE_UTURN/FOLLOW/SWITCH_PARALLEL_ROAD/SWITCH_MAIN_ROAD/ENTRANCE_RAMP/WAYPOINT_LEFT/WAYPOINT_RIGHT/WAYPOINT_REACHED)
+ * message: String
+ * combinedMessage: String
+ * }
+ * ]
+ * instructionGroups: [
+ * {
+ * firstInstructionIndex: Integer
+ * lastInstructionIndex: Integer
+ * groupLengthInMeters: Integer
+ * groupMessage: String
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * optimizedWaypoints: [
+ * {
+ * providedIndex: Integer
+ * optimizedIndex: Integer
+ * }
+ * ]
+ * report: {
+ * effectiveSettings: [
+ * {
+ * key: String
+ * value: String
+ * }
+ * ]
+ * }
+ * }
+ * }
+ *
+ * @param format Desired format of the response. Value can be either _json_ or _xml_.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return this object is returned from a successful Route Directions call along with {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getRouteDirectionsWithResponse(String format, RequestOptions requestOptions) {
+ return this.serviceClient.getRouteDirectionsWithResponse(format, requestOptions);
+ }
+
+ /**
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ * Returns a route between an origin and a destination, passing through waypoints if they are specified. The
+ * route will take into account factors such as current traffic and the typical road speeds on the requested day of
+ * the week and time of day.
+ *
+ *
Information returned includes the distance, estimated travel time, and a representation of the route geometry.
+ * Additional routing information such as optimized waypoint order or turn by turn instructions is also available,
+ * depending on the options selected.
+ *
+ *
Routing service provides a set of parameters for a detailed description of a vehicle-specific Consumption
+ * Model. Please check [Consumption Model](https://docs.microsoft.com/azure/azure-maps/consumption-model) for
+ * detailed explanation of the concepts and parameters involved.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ * | query | String | Yes | The Coordinates through which the route is calculated, delimited by a colon. A minimum of two coordinates is required. The first one is the origin and the last is the destination of the route. Optional coordinates in-between act as WayPoints in the route. You can pass up to 150 WayPoints. |
+ * | maxAlternatives | String | No | Number of desired alternative routes to be calculated. Default: 0, minimum: 0 and maximum: 5 |
+ * | alternativeType | String | No | Controls the optimality, with respect to the given planning criteria, of the calculated alternatives compared to the reference route. |
+ * | minDeviationDistance | String | No | All alternative routes returned will follow the reference route (see section POST Requests) from the origin point of the calculateRoute request for at least this number of meters. Can only be used when reconstructing a route. The minDeviationDistance parameter cannot be used in conjunction with arriveAt |
+ * | minDeviationTime | String | No | All alternative routes returned will follow the reference route (see section POST Requests) from the origin point of the calculateRoute request for at least this number of seconds. Can only be used when reconstructing a route. The minDeviationTime parameter cannot be used in conjunction with arriveAt. Default value is 0. Setting )minDeviationTime_ to a value greater than zero has the following consequences:
+ * - The origin point of the _calculateRoute_ Request must be on
+ * (or very near) the input reference route.
+ * - If this is not the case, an error is returned.
+ * - However, the origin point does not need to be at the beginning
+ * of the input reference route (it can be thought of as the current
+ * vehicle position on the reference route).
+ * - The reference route, returned as the first route in the _calculateRoute_
+ * Response, will start at the origin point specified in the _calculateRoute_
+ * Request. The initial part of the input reference route up until the origin
+ * point will be excluded from the Response.
+ * - The values of _minDeviationDistance_ and _minDeviationTime_ determine
+ * how far alternative routes will be guaranteed to follow the reference
+ * route from the origin point onwards.
+ * - The route must use _departAt_.
+ * - The _vehicleHeading_ is ignored. |
+ * | instructionsType | String | No | If specified, guidance instructions will be returned. Note that the instructionsType parameter cannot be used in conjunction with routeRepresentation=none |
+ * | language | String | No | The language parameter determines the language of the guidance messages. It does not affect proper nouns (the names of streets, plazas, etc.) It has no effect when instructionsType=coded. Allowed values are (a subset of) the IETF language tags described |
+ * | computeBestOrder | String | No | Re-order the route waypoints using a fast heuristic algorithm to reduce the route length. Yields best results when used in conjunction with routeType _shortest_. Notice that origin and destination are excluded from the optimized waypoint indices. To include origin and destination in the response, please increase all the indices by 1 to account for the origin, and then add the destination as the final index. Possible values are true or false. True computes a better order if possible, but is not allowed to be used in conjunction with maxAlternatives value greater than 0 or in conjunction with circle waypoints. False will use the locations in the given order and not allowed to be used in conjunction with routeRepresentation _none_. |
+ * | routeRepresentation | String | No | Specifies the representation of the set of routes provided as response. This parameter value can only be used in conjunction with computeBestOrder=true. |
+ * | computeTravelTimeFor | String | No | Specifies whether to return additional travel times using different types of traffic information (none, historic, live) as well as the default best-estimate travel time. |
+ * | vehicleHeading | String | No | The 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 |
+ * | report | String | No | Specifies which data should be reported for diagnosis purposes. The only possible value is _effectiveSettings_. Reports the effective parameters or data used when calling the API. In the case of defaulted parameters the default will be reflected where the parameter was not specified by the caller. |
+ * | sectionType | String | No | Specifies which of the section types is reported in the route response. <br><br>For example if sectionType = pedestrian the sections which are suited for pedestrians only are returned. Multiple types can be used. The default sectionType refers to the travelMode input. By default travelMode is set to car |
+ * | arriveAt | String | No | The date and time of arrival at the destination point. It must be specified as a dateTime. When a time zone offset is not specified it will be assumed to be that of the destination point. The arriveAt value must be in the future. The arriveAt parameter cannot be used in conjunction with departAt, minDeviationDistance or minDeviationTime. |
+ * | departAt | String | No | The date and time of departure from the origin point. Departure times apart from now must be specified as a dateTime. When a time zone offset is not specified, it will be assumed to be that of the origin point. The departAt value must be in the future in the date-time format (1996-12-19T16:39:57-08:00). |
+ * | vehicleAxleWeight | String | No | Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per axle are not considered. |
+ * | vehicleLength | String | No | Length of the vehicle in meters. A value of 0 means that length restrictions are not considered. |
+ * | vehicleHeight | String | No | Height of the vehicle in meters. A value of 0 means that height restrictions are not considered. |
+ * | vehicleWidth | String | No | Width of the vehicle in meters. A value of 0 means that width restrictions are not considered. |
+ * | vehicleMaxSpeed | String | No | 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.
+ *
+ * * A value of 0 means that an appropriate value for the vehicle will be determined and applied during route planning.
+ *
+ * * A 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. |
+ * | vehicleWeight | String | No | Weight of the vehicle in kilograms.
+ *
+ * * It is mandatory if any of the *Efficiency parameters are set.
+ *
+ * * It must be strictly positive when used in the context of the Consumption Model. Weight restrictions are considered.
+ *
+ * * If no detailed **Consumption Model** is specified and the value of **vehicleWeight** is non-zero, then weight restrictions are considered.
+ *
+ * * In all other cases, this parameter is ignored.
+ *
+ * Sensible Values : for **Combustion Model** : 1600, for **Electric Model** : 1900 |
+ * | vehicleCommercial | String | No | Whether the vehicle is used for commercial purposes. Commercial vehicles may not be allowed to drive on some roads. |
+ * | windingness | String | No | Level of turns for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | hilliness | String | No | Degree of hilliness for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | travelMode | String | No | The mode of travel for the requested route. If not defined, default is 'car'. Note that the requested travelMode may not be available for the entire route. Where the requested travelMode is not available for a particular section, the travelMode element of the response for that section will be "other". Note that travel modes bus, motorcycle, taxi and van are BETA functionality. Full restriction data is not available in all areas. In **calculateReachableRange** requests, the values bicycle and pedestrian must not be used. |
+ * | avoid | String | No | Specifies something that the route calculation should try to avoid when determining the route. Can be specified multiple times in one request, for example, '&avoid=motorways&avoid=tollRoads&avoid=ferries'. In calculateReachableRange requests, the value alreadyUsedRoads must not be used. |
+ * | traffic | String | No | Possible values:
+ * * true - Do consider all available traffic information during routing
+ * * false - Ignore current traffic data during routing. Note that although the current traffic data is ignored
+ * during routing, the effect of historic traffic on effective road speeds is still incorporated. |
+ * | routeType | String | No | The type of route requested. |
+ * | vehicleLoadType | String | No | 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 can be specified multiple times. This parameter is currently only considered for travelMode=truck. |
+ * | vehicleEngineType | String | No | Engine type of the vehicle. When a detailed Consumption Model is specified, it must be consistent with the value of **vehicleEngineType**. |
+ * | constantSpeedConsumptionInLitersPerHundredkm | String | No |
+ *
+ * Specifies the speed-dependent component of consumption.
+ *
+ * Provided as an unordered list of colon-delimited speed & consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
+ *
+ * * by linear interpolation, if the given speed lies in between two speeds in the list
+ *
+ * * by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list
+ *
+ * The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing.
+ *
+ * Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates.
+ *
+ * Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.
+ *
+ * The valid range for the consumption values(expressed in l/100km) is between 0.01 and 100000.0.
+ *
+ * Sensible Values : 50,6.3:130,11.5
+ *
+ * **Note** : This parameter is required for **The Combustion Consumption Model**. |
+ * | currentFuelInLiters | String | No | Specifies the current supply of fuel in liters.
+ *
+ * Sensible Values : 55 |
+ * | auxiliaryPowerInLitersPerHour | String | No | Specifies the amount of fuel consumed for sustaining auxiliary systems of the vehicle, in liters per hour.
+ *
+ * It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
+ *
+ * Sensible Values : 0.2 |
+ * | fuelEnergyDensityInMJoulesPerLiter | String | No | Specifies the amount of chemical energy stored in one liter of fuel in megajoules (MJ). It is used in conjunction with the ***Efficiency** parameters for conversions between saved or consumed energy and fuel. For example, energy density is 34.2 MJ/l for gasoline, and 35.8 MJ/l for Diesel fuel.
+ *
+ * This parameter is required if any ***Efficiency** parameter is set.
+ *
+ * Sensible Values : 34.2 |
+ * | accelerationEfficiency | String | No | Specifies the efficiency of converting chemical energy stored in fuel to kinetic energy when the vehicle accelerates _(i.e. KineticEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed_ is obtained by converting consumed fuel to chemical energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **decelerationEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**decelerationEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.33, for **Electric Model** : 0.66 |
+ * | decelerationEfficiency | String | No | Specifies the efficiency of converting kinetic energy to saved (not consumed) fuel when the vehicle decelerates _(i.e. ChemicalEnergySaved/KineticEnergyLost). ChemicalEnergySaved_ is obtained by converting saved (not consumed) fuel to energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **accelerationEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**accelerationEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.83, for **Electric Model** : 0.91 |
+ * | uphillEfficiency | String | No | Specifies the efficiency of converting chemical energy stored in fuel to potential energy when the vehicle gains elevation _(i.e. PotentialEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed_ is obtained by converting consumed fuel to chemical energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **downhillEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**downhillEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.27, for **Electric Model** : 0.74 |
+ * | downhillEfficiency | String | No | Specifies the efficiency of converting potential energy to saved (not consumed) fuel when the vehicle loses elevation _(i.e. ChemicalEnergySaved/PotentialEnergyLost). ChemicalEnergySaved_ is obtained by converting saved (not consumed) fuel to energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **uphillEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**uphillEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.51, for **Electric Model** : 0.73 |
+ * | constantSpeedConsumptionInkWhPerHundredkm | String | No | Specifies the speed-dependent component of consumption.
+ *
+ * Provided as an unordered list of speed/consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
+ *
+ * * by linear interpolation, if the given speed lies in between two speeds in the list
+ *
+ * * by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list
+ *
+ * The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing.
+ *
+ * Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates.
+ *
+ * Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.
+ *
+ * The valid range for the consumption values(expressed in kWh/100km) is between 0.01 and 100000.0.
+ *
+ * Sensible Values : 50,8.2:130,21.3
+ *
+ * This parameter is required for **Electric consumption model**. |
+ * | currentChargeInkWh | String | No | Specifies the current electric energy supply in kilowatt hours (kWh).
+ *
+ * This parameter co-exists with **maxChargeInkWh** parameter.
+ *
+ * The range of values allowed are 0.0 to **maxChargeInkWh**.
+ *
+ * Sensible Values : 43 |
+ * | maxChargeInkWh | String | No | Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in the vehicle's battery.
+ *
+ * This parameter co-exists with **currentChargeInkWh** parameter.
+ *
+ * Minimum value has to be greater than or equal to **currentChargeInkWh**.
+ *
+ * Sensible Values : 85 |
+ * | auxiliaryPowerInkW | String | No | Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts (kW).
+ *
+ * It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
+ *
+ * Sensible Values : 1.7 |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Request Body Schema
+ *
+ *
{@code
+ * {
+ * supportingPoints: {
+ * geometries: [
+ * {
+ * }
+ * ]
+ * }
+ * avoidVignette: [
+ * String
+ * ]
+ * allowVignette: [
+ * String
+ * ]
+ * avoidAreas: {
+ * coordinates: [
+ * [
+ * [
+ * [
+ * double
+ * ]
+ * ]
+ * ]
+ * ]
+ * }
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * formatVersion: String
+ * routes: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * }
+ * legs: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * points: [
+ * {
+ * latitude: Double
+ * longitude: Double
+ * }
+ * ]
+ * }
+ * ]
+ * sections: [
+ * {
+ * startPointIndex: Integer
+ * endPointIndex: Integer
+ * sectionType: String(CAR_TRAIN/COUNTRY/FERRY/MOTORWAY/PEDESTRIAN/TOLL_ROAD/TOLL_VIGNETTE/TRAFFIC/TRAVEL_MODE/TUNNEL/CARPOOL/URBAN)
+ * travelMode: String(car/truck/taxi/bus/van/motorcycle/bicycle/pedestrian/other)
+ * simpleCategory: String(JAM/ROAD_WORK/ROAD_CLOSURE/OTHER)
+ * effectiveSpeedInKmh: Integer
+ * delayInSeconds: Integer
+ * delayMagnitude: String(0/1/2/3/4)
+ * tec: {
+ * effectCode: Integer
+ * causes: [
+ * {
+ * mainCauseCode: Integer
+ * subCauseCode: Integer
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * guidance: {
+ * instructions: [
+ * {
+ * routeOffsetInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * point: (recursive schema, see point above)
+ * pointIndex: Integer
+ * instructionType: String(TURN/ROAD_CHANGE/LOCATION_DEPARTURE/LOCATION_ARRIVAL/DIRECTION_INFO/LOCATION_WAYPOINT)
+ * roadNumbers: [
+ * String
+ * ]
+ * exitNumber: String
+ * street: String
+ * signpostText: String
+ * countryCode: String
+ * stateCode: String
+ * junctionType: String(REGULAR/ROUNDABOUT/BIFURCATION)
+ * turnAngleInDegrees: Integer
+ * roundaboutExitNumber: String
+ * possibleCombineWithNext: Boolean
+ * drivingSide: String(LEFT/RIGHT)
+ * maneuver: String(ARRIVE/ARRIVE_LEFT/ARRIVE_RIGHT/DEPART/STRAIGHT/KEEP_RIGHT/BEAR_RIGHT/TURN_RIGHT/SHARP_RIGHT/KEEP_LEFT/BEAR_LEFT/TURN_LEFT/SHARP_LEFT/MAKE_UTURN/ENTER_MOTORWAY/ENTER_FREEWAY/ENTER_HIGHWAY/TAKE_EXIT/MOTORWAY_EXIT_LEFT/MOTORWAY_EXIT_RIGHT/TAKE_FERRY/ROUNDABOUT_CROSS/ROUNDABOUT_RIGHT/ROUNDABOUT_LEFT/ROUNDABOUT_BACK/TRY_MAKE_UTURN/FOLLOW/SWITCH_PARALLEL_ROAD/SWITCH_MAIN_ROAD/ENTRANCE_RAMP/WAYPOINT_LEFT/WAYPOINT_RIGHT/WAYPOINT_REACHED)
+ * message: String
+ * combinedMessage: String
+ * }
+ * ]
+ * instructionGroups: [
+ * {
+ * firstInstructionIndex: Integer
+ * lastInstructionIndex: Integer
+ * groupLengthInMeters: Integer
+ * groupMessage: String
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * optimizedWaypoints: [
+ * {
+ * providedIndex: Integer
+ * optimizedIndex: Integer
+ * }
+ * ]
+ * report: {
+ * effectiveSettings: [
+ * {
+ * key: String
+ * value: String
+ * }
+ * ]
+ * }
+ * }
+ * }
+ *
+ * @param format Desired format of the response. Value can be either _json_ or _xml_.
+ * @param routeDirectionParameters Used for reconstructing a route and for calculating zero or more alternative
+ * routes to this reference route. The provided sequence of coordinates is used as input for route
+ * reconstruction. The alternative routes are calculated between the origin and destination points specified in
+ * the base path parameter locations. If both minDeviationDistance and minDeviationTime are set to zero, then
+ * these origin and destination points are expected to be at (or very near) the beginning and end of the
+ * reference route, respectively. Intermediate locations (waypoints) are not supported when using
+ * supportingPoints.
+ * Setting at least one of minDeviationDistance or minDeviationTime to a value greater than zero has the
+ * following consequences:
+ *
* The origin point of the calculateRoute request must be on (or very near) the input reference route. If
+ * this is not the case, an error is returned. However, the origin point does not need to be at the beginning of
+ * the input reference route (it can be thought of as the current vehicle position on the reference route). *
+ * The reference route, returned as the first route in the calculateRoute response, will start at the origin
+ * point specified in the calculateRoute request. The initial part of the input reference route up until the
+ * origin point will be excluded from the response. * The values of minDeviationDistance and minDeviationTime
+ * determine how far alternative routes will be guaranteed to follow the reference route from the origin point
+ * onwards. * The route must use departAt. * The vehicleHeading is ignored.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return this object is returned from a successful Route Directions call along with {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getRouteDirectionsWithAdditionalParametersWithResponse(
+ String format, BinaryData routeDirectionParameters, RequestOptions requestOptions) {
+ return this.serviceClient.getRouteDirectionsWithAdditionalParametersWithResponse(
+ format, routeDirectionParameters, requestOptions);
+ }
+
+ /**
+ * __Route Range (Isochrone) API__
+ *
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ *
This service will calculate a set of locations that can be reached from the origin point based on fuel,
+ * energy, time or distance budget that is specified. A polygon boundary (or Isochrone) is returned in a
+ * counterclockwise orientation as well as the precise polygon center which was the result of the origin point.
+ *
+ *
The returned polygon can be used for further processing such as [Search Inside
+ * Geometry](https://docs.microsoft.com/rest/api/maps/search/postsearchinsidegeometry) to search for POIs within the
+ * provided Isochrone.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ * | query | String | Yes | The Coordinate from which the range calculation should start. |
+ * | fuelBudgetInLiters | String | No | Fuel budget in liters that determines maximal range which can be travelled using the specified Combustion Consumption Model.<br> When fuelBudgetInLiters is used, it is mandatory to specify a detailed Combustion Consumption Model.<br> Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used. |
+ * | energyBudgetInkWh | String | No | Electric energy budget in kilowatt hours (kWh) that determines maximal range which can be travelled using the specified Electric Consumption Model.<br> When energyBudgetInkWh is used, it is mandatory to specify a detailed Electric Consumption Model.<br> Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used. |
+ * | timeBudgetInSec | String | No | Time budget in seconds that determines maximal range which can be travelled using driving time. The Consumption Model will only affect the range when routeType is eco.<br> Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used. |
+ * | distanceBudgetInMeters | String | No | Distance budget in meters that determines maximal range which can be travelled using driving distance. The Consumption Model will only affect the range when routeType is eco.<br> Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used. |
+ * | departAt | String | No | The date and time of departure from the origin point. Departure times apart from now must be specified as a dateTime. When a time zone offset is not specified, it will be assumed to be that of the origin point. The departAt value must be in the future in the date-time format (1996-12-19T16:39:57-08:00). |
+ * | routeType | String | No | The type of route requested. |
+ * | traffic | String | No | Possible values:
+ * * true - Do consider all available traffic information during routing
+ * * false - Ignore current traffic data during routing. Note that although the current traffic data is ignored
+ * during routing, the effect of historic traffic on effective road speeds is still incorporated. |
+ * | avoid | String | No | Specifies something that the route calculation should try to avoid when determining the route. Can be specified multiple times in one request, for example, '&avoid=motorways&avoid=tollRoads&avoid=ferries'. In calculateReachableRange requests, the value alreadyUsedRoads must not be used. |
+ * | travelMode | String | No | The mode of travel for the requested route. If not defined, default is 'car'. Note that the requested travelMode may not be available for the entire route. Where the requested travelMode is not available for a particular section, the travelMode element of the response for that section will be "other". Note that travel modes bus, motorcycle, taxi and van are BETA functionality. Full restriction data is not available in all areas. In **calculateReachableRange** requests, the values bicycle and pedestrian must not be used. |
+ * | hilliness | String | No | Degree of hilliness for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | windingness | String | No | Level of turns for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | vehicleAxleWeight | String | No | Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per axle are not considered. |
+ * | vehicleWidth | String | No | Width of the vehicle in meters. A value of 0 means that width restrictions are not considered. |
+ * | vehicleHeight | String | No | Height of the vehicle in meters. A value of 0 means that height restrictions are not considered. |
+ * | vehicleLength | String | No | Length of the vehicle in meters. A value of 0 means that length restrictions are not considered. |
+ * | vehicleMaxSpeed | String | No | 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.
+ *
+ * * A value of 0 means that an appropriate value for the vehicle will be determined and applied during route planning.
+ *
+ * * A 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. |
+ * | vehicleWeight | String | No | Weight of the vehicle in kilograms.
+ *
+ * * It is mandatory if any of the *Efficiency parameters are set.
+ *
+ * * It must be strictly positive when used in the context of the Consumption Model. Weight restrictions are considered.
+ *
+ * * If no detailed **Consumption Model** is specified and the value of **vehicleWeight** is non-zero, then weight restrictions are considered.
+ *
+ * * In all other cases, this parameter is ignored.
+ *
+ * Sensible Values : for **Combustion Model** : 1600, for **Electric Model** : 1900 |
+ * | vehicleCommercial | String | No | Whether the vehicle is used for commercial purposes. Commercial vehicles may not be allowed to drive on some roads. |
+ * | vehicleLoadType | String | No | 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 can be specified multiple times. This parameter is currently only considered for travelMode=truck. |
+ * | vehicleEngineType | String | No | Engine type of the vehicle. When a detailed Consumption Model is specified, it must be consistent with the value of **vehicleEngineType**. |
+ * | constantSpeedConsumptionInLitersPerHundredkm | String | No |
+ *
+ * Specifies the speed-dependent component of consumption.
+ *
+ * Provided as an unordered list of colon-delimited speed & consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
+ *
+ * * by linear interpolation, if the given speed lies in between two speeds in the list
+ *
+ * * by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list
+ *
+ * The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing.
+ *
+ * Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates.
+ *
+ * Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.
+ *
+ * The valid range for the consumption values(expressed in l/100km) is between 0.01 and 100000.0.
+ *
+ * Sensible Values : 50,6.3:130,11.5
+ *
+ * **Note** : This parameter is required for **The Combustion Consumption Model**. |
+ * | currentFuelInLiters | String | No | Specifies the current supply of fuel in liters.
+ *
+ * Sensible Values : 55 |
+ * | auxiliaryPowerInLitersPerHour | String | No | Specifies the amount of fuel consumed for sustaining auxiliary systems of the vehicle, in liters per hour.
+ *
+ * It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
+ *
+ * Sensible Values : 0.2 |
+ * | fuelEnergyDensityInMJoulesPerLiter | String | No | Specifies the amount of chemical energy stored in one liter of fuel in megajoules (MJ). It is used in conjunction with the ***Efficiency** parameters for conversions between saved or consumed energy and fuel. For example, energy density is 34.2 MJ/l for gasoline, and 35.8 MJ/l for Diesel fuel.
+ *
+ * This parameter is required if any ***Efficiency** parameter is set.
+ *
+ * Sensible Values : 34.2 |
+ * | accelerationEfficiency | String | No | Specifies the efficiency of converting chemical energy stored in fuel to kinetic energy when the vehicle accelerates _(i.e. KineticEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed_ is obtained by converting consumed fuel to chemical energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **decelerationEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**decelerationEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.33, for **Electric Model** : 0.66 |
+ * | decelerationEfficiency | String | No | Specifies the efficiency of converting kinetic energy to saved (not consumed) fuel when the vehicle decelerates _(i.e. ChemicalEnergySaved/KineticEnergyLost). ChemicalEnergySaved_ is obtained by converting saved (not consumed) fuel to energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **accelerationEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**accelerationEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.83, for **Electric Model** : 0.91 |
+ * | uphillEfficiency | String | No | Specifies the efficiency of converting chemical energy stored in fuel to potential energy when the vehicle gains elevation _(i.e. PotentialEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed_ is obtained by converting consumed fuel to chemical energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **downhillEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**downhillEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.27, for **Electric Model** : 0.74 |
+ * | downhillEfficiency | String | No | Specifies the efficiency of converting potential energy to saved (not consumed) fuel when the vehicle loses elevation _(i.e. ChemicalEnergySaved/PotentialEnergyLost). ChemicalEnergySaved_ is obtained by converting saved (not consumed) fuel to energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **uphillEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**uphillEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.51, for **Electric Model** : 0.73 |
+ * | constantSpeedConsumptionInkWhPerHundredkm | String | No | Specifies the speed-dependent component of consumption.
+ *
+ * Provided as an unordered list of speed/consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
+ *
+ * * by linear interpolation, if the given speed lies in between two speeds in the list
+ *
+ * * by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list
+ *
+ * The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing.
+ *
+ * Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates.
+ *
+ * Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.
+ *
+ * The valid range for the consumption values(expressed in kWh/100km) is between 0.01 and 100000.0.
+ *
+ * Sensible Values : 50,8.2:130,21.3
+ *
+ * This parameter is required for **Electric consumption model**. |
+ * | currentChargeInkWh | String | No | Specifies the current electric energy supply in kilowatt hours (kWh).
+ *
+ * This parameter co-exists with **maxChargeInkWh** parameter.
+ *
+ * The range of values allowed are 0.0 to **maxChargeInkWh**.
+ *
+ * Sensible Values : 43 |
+ * | maxChargeInkWh | String | No | Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in the vehicle's battery.
+ *
+ * This parameter co-exists with **currentChargeInkWh** parameter.
+ *
+ * Minimum value has to be greater than or equal to **currentChargeInkWh**.
+ *
+ * Sensible Values : 85 |
+ * | auxiliaryPowerInkW | String | No | Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts (kW).
+ *
+ * It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
+ *
+ * Sensible Values : 1.7 |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * formatVersion: String
+ * reachableRange: {
+ * center: {
+ * latitude: Double
+ * longitude: Double
+ * }
+ * boundary: [
+ * (recursive schema, see above)
+ * ]
+ * }
+ * report: {
+ * effectiveSettings: [
+ * {
+ * key: String
+ * value: String
+ * }
+ * ]
+ * }
+ * }
+ * }
+ *
+ * @param format Desired format of the response. Value can be either _json_ or _xml_.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return this object is returned from a successful Route Reachable Range call along with {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getRouteRangeWithResponse(String format, RequestOptions requestOptions) {
+ return this.serviceClient.getRouteRangeWithResponse(format, requestOptions);
+ }
+
+ /**
+ * **Route Directions Batch API**
+ *
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ *
The Route Directions Batch API sends batches of queries to [Route Directions
+ * API](https://docs.microsoft.com/rest/api/maps/route/getroutedirections) using just a single API call. You can
+ * call Route Directions Batch API to run either asynchronously (async) or synchronously (sync). The async API
+ * allows caller to batch up to **700** queries and sync API up to **100** queries. ### Submit Asynchronous Batch
+ * Request The Asynchronous API is appropriate for processing big volumes of relatively complex route requests - It
+ * allows the retrieval of results in a separate call (multiple downloads are possible). - The asynchronous API is
+ * optimized for reliability and is not expected to run into a timeout. - The number of batch items is limited to
+ * **700** for this API.
+ *
+ *
When you make a request by using async request, by default the service returns a 202 response code along a
+ * redirect URL in the Location field of the response header. This URL should be checked periodically until the
+ * response data or error information is available. The asynchronous responses are stored for **14** days. The
+ * redirect URL returns a 404 response if used after the expiration period.
+ *
+ *
Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
+ * operations: 1. Client sends a Route Directions Batch `POST` request to Azure Maps 2. The server will respond with
+ * one of the following:
+ *
+ *
> HTTP `202 Accepted` - Batch request has been accepted.
+ *
+ *
> HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
+ * or any other `Error` status code.
+ *
+ *
3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
+ * download the results of the batch request. This status URI looks like following:
+ *
+ *
``` GET https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0 ``` Note:- Please
+ * remember to add AUTH information (subscription-key/azure_auth - See [Security](#security)) to the _status URI_
+ * before running it. <br> 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to
+ * download the batch results.
+ *
+ *
### POST Body for Batch Request To send the _route 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 3 _route directions_ queries:
+ *
+ *
```json { "batchItems": [ { "query":
+ * "?query=47.620659,-122.348934:47.610101,-122.342015&travelMode=bicycle&routeType=eco&traffic=false"
+ * }, { "query": "?query=40.759856,-73.985108:40.771136,-73.973506&travelMode=pedestrian&routeType=shortest"
+ * }, { "query": "?query=48.923159,-122.557362:32.621279,-116.840362" } ] } ```
+ *
+ *
A _route directions_ query in a batch is just a partial URL _without_ the protocol, base URL, path,
+ * api-version and subscription-key. It can accept any of the supported _route directions_ [URI
+ * parameters](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#uri-parameters). The string values
+ * in the _route directions_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it
+ * should also be properly URL-encoded.
+ *
+ *
The async API allows caller to batch up to **700** queries and sync API up to **100** queries, and the batch
+ * should contain at least **1** query.
+ *
+ *
### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
+ * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
+ * `POST` batch request and looks like the following:
+ *
+ *
```
+ * https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}
+ * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
+ * using the _download URL_. 2. The server will respond with one of the following:
+ *
+ *
> HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
+ * time.
+ *
+ *
> HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
+ *
+ *
### Batch Response Model The returned data content is similar for async and sync requests. When downloading
+ * the results of an async batch request, if the batch has finished processing, the response body contains the batch
+ * response. This 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 in `batchItems` contains `statusCode` and `response` fields. Each `response` in
+ * `batchItems` is of one of the following types:
+ *
+ *
- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
+ * the query completed successfully.
+ *
+ *
- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
+ *
+ *
Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
+ *
+ *
```json { "summary": { "successfulRequests": 1, "totalRequests": 2 }, "batchItems": [ { "statusCode": 200,
+ * "response": { "routes": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "legs": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "points": [ { "latitude": 47.62094, "longitude": -122.34892 }, { "latitude":
+ * 47.62094, "longitude": -122.3485 }, { "latitude": 47.62095, "longitude": -122.3476 } ] } ], "sections": [ {
+ * "startPointIndex": 0, "endPointIndex": 40, "sectionType": "TRAVEL_MODE", "travelMode": "bicycle" } ] } ] } }, {
+ * "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
+ * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Request Body Schema
+ *
+ *
{@code
+ * {
+ * batchItems: [
+ * {
+ * query: String
+ * }
+ * ]
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * batchSummary: {
+ * successfulRequests: Integer
+ * totalRequests: Integer
+ * }
+ * batchItems: [
+ * {
+ * statusCode: Integer
+ * response: {
+ * formatVersion: String
+ * routes: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * }
+ * legs: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * points: [
+ * {
+ * latitude: Double
+ * longitude: Double
+ * }
+ * ]
+ * }
+ * ]
+ * sections: [
+ * {
+ * startPointIndex: Integer
+ * endPointIndex: Integer
+ * sectionType: String(CAR_TRAIN/COUNTRY/FERRY/MOTORWAY/PEDESTRIAN/TOLL_ROAD/TOLL_VIGNETTE/TRAFFIC/TRAVEL_MODE/TUNNEL/CARPOOL/URBAN)
+ * travelMode: String(car/truck/taxi/bus/van/motorcycle/bicycle/pedestrian/other)
+ * simpleCategory: String(JAM/ROAD_WORK/ROAD_CLOSURE/OTHER)
+ * effectiveSpeedInKmh: Integer
+ * delayInSeconds: Integer
+ * delayMagnitude: String(0/1/2/3/4)
+ * tec: {
+ * effectCode: Integer
+ * causes: [
+ * {
+ * mainCauseCode: Integer
+ * subCauseCode: Integer
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * guidance: {
+ * instructions: [
+ * {
+ * routeOffsetInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * point: (recursive schema, see point above)
+ * pointIndex: Integer
+ * instructionType: String(TURN/ROAD_CHANGE/LOCATION_DEPARTURE/LOCATION_ARRIVAL/DIRECTION_INFO/LOCATION_WAYPOINT)
+ * roadNumbers: [
+ * String
+ * ]
+ * exitNumber: String
+ * street: String
+ * signpostText: String
+ * countryCode: String
+ * stateCode: String
+ * junctionType: String(REGULAR/ROUNDABOUT/BIFURCATION)
+ * turnAngleInDegrees: Integer
+ * roundaboutExitNumber: String
+ * possibleCombineWithNext: Boolean
+ * drivingSide: String(LEFT/RIGHT)
+ * maneuver: String(ARRIVE/ARRIVE_LEFT/ARRIVE_RIGHT/DEPART/STRAIGHT/KEEP_RIGHT/BEAR_RIGHT/TURN_RIGHT/SHARP_RIGHT/KEEP_LEFT/BEAR_LEFT/TURN_LEFT/SHARP_LEFT/MAKE_UTURN/ENTER_MOTORWAY/ENTER_FREEWAY/ENTER_HIGHWAY/TAKE_EXIT/MOTORWAY_EXIT_LEFT/MOTORWAY_EXIT_RIGHT/TAKE_FERRY/ROUNDABOUT_CROSS/ROUNDABOUT_RIGHT/ROUNDABOUT_LEFT/ROUNDABOUT_BACK/TRY_MAKE_UTURN/FOLLOW/SWITCH_PARALLEL_ROAD/SWITCH_MAIN_ROAD/ENTRANCE_RAMP/WAYPOINT_LEFT/WAYPOINT_RIGHT/WAYPOINT_REACHED)
+ * message: String
+ * combinedMessage: String
+ * }
+ * ]
+ * instructionGroups: [
+ * {
+ * firstInstructionIndex: Integer
+ * lastInstructionIndex: Integer
+ * groupLengthInMeters: Integer
+ * groupMessage: String
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * optimizedWaypoints: [
+ * {
+ * providedIndex: Integer
+ * optimizedIndex: Integer
+ * }
+ * ]
+ * report: {
+ * effectiveSettings: [
+ * {
+ * key: String
+ * value: String
+ * }
+ * ]
+ * }
+ * error: {
+ * code: String
+ * message: String
+ * target: String
+ * details: [
+ * (recursive schema, see above)
+ * ]
+ * additionalInfo: [
+ * {
+ * type: String
+ * info: Object
+ * }
+ * ]
+ * }
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ * @param format Desired format of the response. Only `json` format is supported.
+ * @param routeDirectionsBatchQueries The list of route directions queries/requests to process. The list can contain
+ * a max of 700 queries for async and 100 queries for sync version and must contain at least 1 query.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return the {@link SyncPoller} for polling of this object is returned from a successful Route Directions Batch
+ * service call.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginRequestRouteDirectionsBatch(
+ String format, BinaryData routeDirectionsBatchQueries, RequestOptions requestOptions) {
+ return this.serviceClient.beginRequestRouteDirectionsBatch(format, routeDirectionsBatchQueries, requestOptions);
+ }
+
+ /**
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ * ### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
+ * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
+ * `POST` batch request and looks like the following:
+ *
+ *
```
+ * https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}
+ * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
+ * using the _download URL_. 2. The server will respond with one of the following:
+ *
+ *
> HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
+ * time.
+ *
+ *
> HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
+ *
+ *
### Batch Response Model The returned data content is similar for async and sync requests. When downloading
+ * the results of an async batch request, if the batch has finished processing, the response body contains the batch
+ * response. This 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 in `batchItems` contains `statusCode` and `response` fields. Each `response` in
+ * `batchItems` is of one of the following types:
+ *
+ *
- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
+ * the query completed successfully.
+ *
+ *
- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
+ *
+ *
Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
+ *
+ *
```json { "summary": { "successfulRequests": 1, "totalRequests": 2 }, "batchItems": [ { "statusCode": 200,
+ * "response": { "routes": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "legs": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "points": [ { "latitude": 47.62094, "longitude": -122.34892 }, { "latitude":
+ * 47.62094, "longitude": -122.3485 }, { "latitude": 47.62095, "longitude": -122.3476 } ] } ], "sections": [ {
+ * "startPointIndex": 0, "endPointIndex": 40, "sectionType": "TRAVEL_MODE", "travelMode": "bicycle" } ] } ] } }, {
+ * "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
+ * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * batchSummary: {
+ * successfulRequests: Integer
+ * totalRequests: Integer
+ * }
+ * batchItems: [
+ * {
+ * statusCode: Integer
+ * response: {
+ * formatVersion: String
+ * routes: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * }
+ * legs: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * points: [
+ * {
+ * latitude: Double
+ * longitude: Double
+ * }
+ * ]
+ * }
+ * ]
+ * sections: [
+ * {
+ * startPointIndex: Integer
+ * endPointIndex: Integer
+ * sectionType: String(CAR_TRAIN/COUNTRY/FERRY/MOTORWAY/PEDESTRIAN/TOLL_ROAD/TOLL_VIGNETTE/TRAFFIC/TRAVEL_MODE/TUNNEL/CARPOOL/URBAN)
+ * travelMode: String(car/truck/taxi/bus/van/motorcycle/bicycle/pedestrian/other)
+ * simpleCategory: String(JAM/ROAD_WORK/ROAD_CLOSURE/OTHER)
+ * effectiveSpeedInKmh: Integer
+ * delayInSeconds: Integer
+ * delayMagnitude: String(0/1/2/3/4)
+ * tec: {
+ * effectCode: Integer
+ * causes: [
+ * {
+ * mainCauseCode: Integer
+ * subCauseCode: Integer
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * guidance: {
+ * instructions: [
+ * {
+ * routeOffsetInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * point: (recursive schema, see point above)
+ * pointIndex: Integer
+ * instructionType: String(TURN/ROAD_CHANGE/LOCATION_DEPARTURE/LOCATION_ARRIVAL/DIRECTION_INFO/LOCATION_WAYPOINT)
+ * roadNumbers: [
+ * String
+ * ]
+ * exitNumber: String
+ * street: String
+ * signpostText: String
+ * countryCode: String
+ * stateCode: String
+ * junctionType: String(REGULAR/ROUNDABOUT/BIFURCATION)
+ * turnAngleInDegrees: Integer
+ * roundaboutExitNumber: String
+ * possibleCombineWithNext: Boolean
+ * drivingSide: String(LEFT/RIGHT)
+ * maneuver: String(ARRIVE/ARRIVE_LEFT/ARRIVE_RIGHT/DEPART/STRAIGHT/KEEP_RIGHT/BEAR_RIGHT/TURN_RIGHT/SHARP_RIGHT/KEEP_LEFT/BEAR_LEFT/TURN_LEFT/SHARP_LEFT/MAKE_UTURN/ENTER_MOTORWAY/ENTER_FREEWAY/ENTER_HIGHWAY/TAKE_EXIT/MOTORWAY_EXIT_LEFT/MOTORWAY_EXIT_RIGHT/TAKE_FERRY/ROUNDABOUT_CROSS/ROUNDABOUT_RIGHT/ROUNDABOUT_LEFT/ROUNDABOUT_BACK/TRY_MAKE_UTURN/FOLLOW/SWITCH_PARALLEL_ROAD/SWITCH_MAIN_ROAD/ENTRANCE_RAMP/WAYPOINT_LEFT/WAYPOINT_RIGHT/WAYPOINT_REACHED)
+ * message: String
+ * combinedMessage: String
+ * }
+ * ]
+ * instructionGroups: [
+ * {
+ * firstInstructionIndex: Integer
+ * lastInstructionIndex: Integer
+ * groupLengthInMeters: Integer
+ * groupMessage: String
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * optimizedWaypoints: [
+ * {
+ * providedIndex: Integer
+ * optimizedIndex: Integer
+ * }
+ * ]
+ * report: {
+ * effectiveSettings: [
+ * {
+ * key: String
+ * value: String
+ * }
+ * ]
+ * }
+ * error: {
+ * code: String
+ * message: String
+ * target: String
+ * details: [
+ * (recursive schema, see above)
+ * ]
+ * additionalInfo: [
+ * {
+ * type: String
+ * info: Object
+ * }
+ * ]
+ * }
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ * @param batchId Batch id for querying the operation.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return the {@link SyncPoller} for polling of this object is returned from a successful Route Directions Batch
+ * service call.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginGetRouteDirectionsBatch(
+ String batchId, RequestOptions requestOptions) {
+ return this.serviceClient.beginGetRouteDirectionsBatch(batchId, requestOptions);
+ }
+
+ /**
+ * **Route Directions Batch API**
+ *
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ *
The Route Directions Batch API sends batches of queries to [Route Directions
+ * API](https://docs.microsoft.com/rest/api/maps/route/getroutedirections) using just a single API call. You can
+ * call Route Directions Batch API to run either asynchronously (async) or synchronously (sync). The async API
+ * allows caller to batch up to **700** queries and sync API up to **100** queries. ### Submit Synchronous Batch
+ * Request The 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. ``` POST
+ * https://atlas.microsoft.com/route/directions/batch/sync/json?api-version=1.0&subscription-key={subscription-key}
+ * ``` ### Batch Response Model The returned data content is similar for async and sync requests. When downloading
+ * the results of an async batch request, if the batch has finished processing, the response body contains the batch
+ * response. This 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 in `batchItems` contains `statusCode` and `response` fields. Each `response` in
+ * `batchItems` is of one of the following types:
+ *
+ *
- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
+ * the query completed successfully.
+ *
+ *
- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
+ *
+ *
Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
+ *
+ *
```json { "summary": { "successfulRequests": 1, "totalRequests": 2 }, "batchItems": [ { "statusCode": 200,
+ * "response": { "routes": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "legs": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "points": [ { "latitude": 47.62094, "longitude": -122.34892 }, { "latitude":
+ * 47.62094, "longitude": -122.3485 }, { "latitude": 47.62095, "longitude": -122.3476 } ] } ], "sections": [ {
+ * "startPointIndex": 0, "endPointIndex": 40, "sectionType": "TRAVEL_MODE", "travelMode": "bicycle" } ] } ] } }, {
+ * "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
+ * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Request Body Schema
+ *
+ *
{@code
+ * {
+ * batchItems: [
+ * {
+ * query: String
+ * }
+ * ]
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * batchSummary: {
+ * successfulRequests: Integer
+ * totalRequests: Integer
+ * }
+ * batchItems: [
+ * {
+ * statusCode: Integer
+ * response: {
+ * formatVersion: String
+ * routes: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * }
+ * legs: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * points: [
+ * {
+ * latitude: Double
+ * longitude: Double
+ * }
+ * ]
+ * }
+ * ]
+ * sections: [
+ * {
+ * startPointIndex: Integer
+ * endPointIndex: Integer
+ * sectionType: String(CAR_TRAIN/COUNTRY/FERRY/MOTORWAY/PEDESTRIAN/TOLL_ROAD/TOLL_VIGNETTE/TRAFFIC/TRAVEL_MODE/TUNNEL/CARPOOL/URBAN)
+ * travelMode: String(car/truck/taxi/bus/van/motorcycle/bicycle/pedestrian/other)
+ * simpleCategory: String(JAM/ROAD_WORK/ROAD_CLOSURE/OTHER)
+ * effectiveSpeedInKmh: Integer
+ * delayInSeconds: Integer
+ * delayMagnitude: String(0/1/2/3/4)
+ * tec: {
+ * effectCode: Integer
+ * causes: [
+ * {
+ * mainCauseCode: Integer
+ * subCauseCode: Integer
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * guidance: {
+ * instructions: [
+ * {
+ * routeOffsetInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * point: (recursive schema, see point above)
+ * pointIndex: Integer
+ * instructionType: String(TURN/ROAD_CHANGE/LOCATION_DEPARTURE/LOCATION_ARRIVAL/DIRECTION_INFO/LOCATION_WAYPOINT)
+ * roadNumbers: [
+ * String
+ * ]
+ * exitNumber: String
+ * street: String
+ * signpostText: String
+ * countryCode: String
+ * stateCode: String
+ * junctionType: String(REGULAR/ROUNDABOUT/BIFURCATION)
+ * turnAngleInDegrees: Integer
+ * roundaboutExitNumber: String
+ * possibleCombineWithNext: Boolean
+ * drivingSide: String(LEFT/RIGHT)
+ * maneuver: String(ARRIVE/ARRIVE_LEFT/ARRIVE_RIGHT/DEPART/STRAIGHT/KEEP_RIGHT/BEAR_RIGHT/TURN_RIGHT/SHARP_RIGHT/KEEP_LEFT/BEAR_LEFT/TURN_LEFT/SHARP_LEFT/MAKE_UTURN/ENTER_MOTORWAY/ENTER_FREEWAY/ENTER_HIGHWAY/TAKE_EXIT/MOTORWAY_EXIT_LEFT/MOTORWAY_EXIT_RIGHT/TAKE_FERRY/ROUNDABOUT_CROSS/ROUNDABOUT_RIGHT/ROUNDABOUT_LEFT/ROUNDABOUT_BACK/TRY_MAKE_UTURN/FOLLOW/SWITCH_PARALLEL_ROAD/SWITCH_MAIN_ROAD/ENTRANCE_RAMP/WAYPOINT_LEFT/WAYPOINT_RIGHT/WAYPOINT_REACHED)
+ * message: String
+ * combinedMessage: String
+ * }
+ * ]
+ * instructionGroups: [
+ * {
+ * firstInstructionIndex: Integer
+ * lastInstructionIndex: Integer
+ * groupLengthInMeters: Integer
+ * groupMessage: String
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * optimizedWaypoints: [
+ * {
+ * providedIndex: Integer
+ * optimizedIndex: Integer
+ * }
+ * ]
+ * report: {
+ * effectiveSettings: [
+ * {
+ * key: String
+ * value: String
+ * }
+ * ]
+ * }
+ * error: {
+ * code: String
+ * message: String
+ * target: String
+ * details: [
+ * (recursive schema, see above)
+ * ]
+ * additionalInfo: [
+ * {
+ * type: String
+ * info: Object
+ * }
+ * ]
+ * }
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ * @param format Desired format of the response. Only `json` format is supported.
+ * @param routeDirectionsBatchQueries The list of route directions queries/requests to process. The list can contain
+ * a max of 700 queries for async and 100 queries for sync version and must contain at least 1 query.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return this object is returned from a successful Route Directions Batch service call along with {@link
+ * Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response requestRouteDirectionsBatchSyncWithResponse(
+ String format, BinaryData routeDirectionsBatchQueries, RequestOptions requestOptions) {
+ return this.serviceClient.requestRouteDirectionsBatchSyncWithResponse(
+ format, routeDirectionsBatchQueries, requestOptions);
+ }
+}
diff --git a/sdk/maps/azure-maps-route/src/main/java/com/azure/maps/route/AzureMapsRouteServiceClientBuilder.java b/sdk/maps/azure-maps-route/src/main/java/com/azure/maps/route/AzureMapsRouteServiceClientBuilder.java
new file mode 100644
index 000000000000..0c72930ae28e
--- /dev/null
+++ b/sdk/maps/azure-maps-route/src/main/java/com/azure/maps/route/AzureMapsRouteServiceClientBuilder.java
@@ -0,0 +1,333 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.maps.route;
+
+import com.azure.core.annotation.Generated;
+import com.azure.core.annotation.ServiceClientBuilder;
+import com.azure.core.credential.TokenCredential;
+import com.azure.core.http.HttpClient;
+import com.azure.core.http.HttpHeaders;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.HttpPipelinePosition;
+import com.azure.core.http.policy.AddHeadersPolicy;
+import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
+import com.azure.core.http.policy.CookiePolicy;
+import com.azure.core.http.policy.HttpLogOptions;
+import com.azure.core.http.policy.HttpLoggingPolicy;
+import com.azure.core.http.policy.HttpPipelinePolicy;
+import com.azure.core.http.policy.HttpPolicyProviders;
+import com.azure.core.http.policy.RetryPolicy;
+import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.util.ClientOptions;
+import com.azure.core.util.Configuration;
+import com.azure.core.util.CoreUtils;
+import com.azure.core.util.serializer.JacksonAdapter;
+import com.azure.maps.route.implementation.AzureMapsRouteServiceClientImpl;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/** A builder for creating a new instance of the AzureMapsRouteServiceClient type. */
+@ServiceClientBuilder(serviceClients = {AzureMapsRouteServiceClient.class, AzureMapsRouteServiceAsyncClient.class})
+public final class AzureMapsRouteServiceClientBuilder {
+ @Generated private static final String SDK_NAME = "name";
+
+ @Generated private static final String SDK_VERSION = "version";
+
+ @Generated private static final String[] DEFAULT_SCOPES = new String[] {"https://atlas.microsoft.com/.default"};
+
+ @Generated private final Map properties = CoreUtils.getProperties("azure-maps-route.properties");
+
+ /** Create an instance of the AzureMapsRouteServiceClientBuilder. */
+ @Generated
+ public AzureMapsRouteServiceClientBuilder() {
+ this.pipelinePolicies = new ArrayList<>();
+ }
+
+ /*
+ * Specifies which account is intended for usage in conjunction with the
+ * Azure AD security model. It represents a unique ID for the Azure Maps
+ * account and can be retrieved from the Azure Maps management plane
+ * Account API. To use Azure AD security in Azure Maps see the following
+ * [articles](https://aka.ms/amauthdetails) for guidance.
+ */
+ @Generated private String clientId;
+
+ /**
+ * Sets Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents
+ * a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To
+ * use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.
+ *
+ * @param clientId the clientId value.
+ * @return the AzureMapsRouteServiceClientBuilder.
+ */
+ @Generated
+ public AzureMapsRouteServiceClientBuilder clientId(String clientId) {
+ this.clientId = clientId;
+ return this;
+ }
+
+ /*
+ * server parameter
+ */
+ @Generated private String host;
+
+ /**
+ * Sets server parameter.
+ *
+ * @param host the host value.
+ * @return the AzureMapsRouteServiceClientBuilder.
+ */
+ @Generated
+ public AzureMapsRouteServiceClientBuilder host(String host) {
+ this.host = host;
+ return this;
+ }
+
+ /*
+ * Service version
+ */
+ @Generated private AzureMapsRouteServiceVersion serviceVersion;
+
+ /**
+ * Sets Service version.
+ *
+ * @param serviceVersion the serviceVersion value.
+ * @return the AzureMapsRouteServiceClientBuilder.
+ */
+ @Generated
+ public AzureMapsRouteServiceClientBuilder serviceVersion(AzureMapsRouteServiceVersion serviceVersion) {
+ this.serviceVersion = serviceVersion;
+ return this;
+ }
+
+ /*
+ * The HTTP pipeline to send requests through
+ */
+ @Generated private HttpPipeline pipeline;
+
+ /**
+ * Sets The HTTP pipeline to send requests through.
+ *
+ * @param pipeline the pipeline value.
+ * @return the AzureMapsRouteServiceClientBuilder.
+ */
+ @Generated
+ public AzureMapsRouteServiceClientBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
+ return this;
+ }
+
+ /*
+ * The HTTP client used to send the request.
+ */
+ @Generated private HttpClient httpClient;
+
+ /**
+ * Sets The HTTP client used to send the request.
+ *
+ * @param httpClient the httpClient value.
+ * @return the AzureMapsRouteServiceClientBuilder.
+ */
+ @Generated
+ public AzureMapsRouteServiceClientBuilder httpClient(HttpClient httpClient) {
+ this.httpClient = httpClient;
+ return this;
+ }
+
+ /*
+ * The configuration store that is used during construction of the service
+ * client.
+ */
+ @Generated private Configuration configuration;
+
+ /**
+ * Sets The configuration store that is used during construction of the service client.
+ *
+ * @param configuration the configuration value.
+ * @return the AzureMapsRouteServiceClientBuilder.
+ */
+ @Generated
+ public AzureMapsRouteServiceClientBuilder configuration(Configuration configuration) {
+ this.configuration = configuration;
+ return this;
+ }
+
+ /*
+ * The TokenCredential used for authentication.
+ */
+ @Generated private TokenCredential tokenCredential;
+
+ /**
+ * Sets The TokenCredential used for authentication.
+ *
+ * @param tokenCredential the tokenCredential value.
+ * @return the AzureMapsRouteServiceClientBuilder.
+ */
+ @Generated
+ public AzureMapsRouteServiceClientBuilder credential(TokenCredential tokenCredential) {
+ this.tokenCredential = tokenCredential;
+ return this;
+ }
+
+ /*
+ * The logging configuration for HTTP requests and responses.
+ */
+ @Generated private HttpLogOptions httpLogOptions;
+
+ /**
+ * Sets The logging configuration for HTTP requests and responses.
+ *
+ * @param httpLogOptions the httpLogOptions value.
+ * @return the AzureMapsRouteServiceClientBuilder.
+ */
+ @Generated
+ public AzureMapsRouteServiceClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) {
+ this.httpLogOptions = httpLogOptions;
+ return this;
+ }
+
+ /*
+ * The retry policy that will attempt to retry failed requests, if
+ * applicable.
+ */
+ @Generated private RetryPolicy retryPolicy;
+
+ /**
+ * Sets The retry policy that will attempt to retry failed requests, if applicable.
+ *
+ * @param retryPolicy the retryPolicy value.
+ * @return the AzureMapsRouteServiceClientBuilder.
+ */
+ @Generated
+ public AzureMapsRouteServiceClientBuilder retryPolicy(RetryPolicy retryPolicy) {
+ this.retryPolicy = retryPolicy;
+ return this;
+ }
+
+ /*
+ * The list of Http pipeline policies to add.
+ */
+ @Generated private final List pipelinePolicies;
+
+ /*
+ * The client options such as application ID and custom headers to set on a
+ * request.
+ */
+ @Generated private ClientOptions clientOptions;
+
+ /**
+ * Sets The client options such as application ID and custom headers to set on a request.
+ *
+ * @param clientOptions the clientOptions value.
+ * @return the AzureMapsRouteServiceClientBuilder.
+ */
+ @Generated
+ public AzureMapsRouteServiceClientBuilder clientOptions(ClientOptions clientOptions) {
+ this.clientOptions = clientOptions;
+ return this;
+ }
+
+ /**
+ * Adds a custom Http pipeline policy.
+ *
+ * @param customPolicy The custom Http pipeline policy to add.
+ * @return the AzureMapsRouteServiceClientBuilder.
+ */
+ @Generated
+ public AzureMapsRouteServiceClientBuilder addPolicy(HttpPipelinePolicy customPolicy) {
+ pipelinePolicies.add(customPolicy);
+ return this;
+ }
+
+ /**
+ * Builds an instance of AzureMapsRouteServiceClientImpl with the provided parameters.
+ *
+ * @return an instance of AzureMapsRouteServiceClientImpl.
+ */
+ @Generated
+ private AzureMapsRouteServiceClientImpl buildInnerClient() {
+ if (host == null) {
+ this.host = "https://atlas.microsoft.com";
+ }
+ if (serviceVersion == null) {
+ this.serviceVersion = AzureMapsRouteServiceVersion.getLatest();
+ }
+ if (pipeline == null) {
+ this.pipeline = createHttpPipeline();
+ }
+ AzureMapsRouteServiceClientImpl client =
+ new AzureMapsRouteServiceClientImpl(
+ pipeline, JacksonAdapter.createDefaultSerializerAdapter(), clientId, host, serviceVersion);
+ return client;
+ }
+
+ @Generated
+ private HttpPipeline createHttpPipeline() {
+ Configuration buildConfiguration =
+ (configuration == null) ? Configuration.getGlobalConfiguration() : configuration;
+ if (httpLogOptions == null) {
+ httpLogOptions = new HttpLogOptions();
+ }
+ if (clientOptions == null) {
+ clientOptions = new ClientOptions();
+ }
+ List policies = new ArrayList<>();
+ String clientName = properties.getOrDefault(SDK_NAME, "UnknownName");
+ String clientVersion = properties.getOrDefault(SDK_VERSION, "UnknownVersion");
+ String applicationId = CoreUtils.getApplicationId(clientOptions, httpLogOptions);
+ policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration));
+ HttpHeaders headers = new HttpHeaders();
+ clientOptions.getHeaders().forEach(header -> headers.set(header.getName(), header.getValue()));
+ if (headers.getSize() > 0) {
+ policies.add(new AddHeadersPolicy(headers));
+ }
+ policies.addAll(
+ this.pipelinePolicies.stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addBeforeRetryPolicies(policies);
+ policies.add(retryPolicy == null ? new RetryPolicy() : retryPolicy);
+ policies.add(new CookiePolicy());
+ if (tokenCredential != null) {
+ policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES));
+ }
+ policies.addAll(
+ this.pipelinePolicies.stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addAfterRetryPolicies(policies);
+ policies.add(new HttpLoggingPolicy(httpLogOptions));
+ HttpPipeline httpPipeline =
+ new HttpPipelineBuilder()
+ .policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .httpClient(httpClient)
+ .clientOptions(clientOptions)
+ .build();
+ return httpPipeline;
+ }
+
+ /**
+ * Builds an instance of AzureMapsRouteServiceAsyncClient async client.
+ *
+ * @return an instance of AzureMapsRouteServiceAsyncClient.
+ */
+ @Generated
+ public AzureMapsRouteServiceAsyncClient buildAsyncClient() {
+ return new AzureMapsRouteServiceAsyncClient(buildInnerClient().getRoutes());
+ }
+
+ /**
+ * Builds an instance of AzureMapsRouteServiceClient sync client.
+ *
+ * @return an instance of AzureMapsRouteServiceClient.
+ */
+ @Generated
+ public AzureMapsRouteServiceClient buildClient() {
+ return new AzureMapsRouteServiceClient(buildInnerClient().getRoutes());
+ }
+}
diff --git a/sdk/maps/azure-maps-route/src/main/java/com/azure/maps/route/AzureMapsRouteServiceVersion.java b/sdk/maps/azure-maps-route/src/main/java/com/azure/maps/route/AzureMapsRouteServiceVersion.java
new file mode 100644
index 000000000000..daa81df718df
--- /dev/null
+++ b/sdk/maps/azure-maps-route/src/main/java/com/azure/maps/route/AzureMapsRouteServiceVersion.java
@@ -0,0 +1,33 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.maps.route;
+
+import com.azure.core.util.ServiceVersion;
+
+/** Service version of AzureMapsRouteServiceClient. */
+public enum AzureMapsRouteServiceVersion implements ServiceVersion {
+ /** Enum value 1.0. */
+ V1_0("1.0");
+
+ private final String version;
+
+ AzureMapsRouteServiceVersion(String version) {
+ this.version = version;
+ }
+
+ @Override
+ public String getVersion() {
+ return this.version;
+ }
+
+ /**
+ * Gets the latest service version supported by this client library.
+ *
+ * @return The latest {@link AzureMapsRouteServiceVersion}.
+ */
+ public static AzureMapsRouteServiceVersion getLatest() {
+ return V1_0;
+ }
+}
diff --git a/sdk/maps/azure-maps-route/src/main/java/com/azure/maps/route/implementation/AzureMapsRouteServiceClientImpl.java b/sdk/maps/azure-maps-route/src/main/java/com/azure/maps/route/implementation/AzureMapsRouteServiceClientImpl.java
new file mode 100644
index 000000000000..f5e6fe26501f
--- /dev/null
+++ b/sdk/maps/azure-maps-route/src/main/java/com/azure/maps/route/implementation/AzureMapsRouteServiceClientImpl.java
@@ -0,0 +1,158 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.maps.route.implementation;
+
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.policy.CookiePolicy;
+import com.azure.core.http.policy.RetryPolicy;
+import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.util.serializer.JacksonAdapter;
+import com.azure.core.util.serializer.SerializerAdapter;
+import com.azure.maps.route.AzureMapsRouteServiceVersion;
+
+/** Initializes a new instance of the AzureMapsRouteServiceClient type. */
+public final class AzureMapsRouteServiceClientImpl {
+ /**
+ * Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a
+ * unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To
+ * use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.
+ */
+ private final String clientId;
+
+ /**
+ * Gets Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents
+ * a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To
+ * use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance.
+ *
+ * @return the clientId value.
+ */
+ public String getClientId() {
+ return this.clientId;
+ }
+
+ /** server parameter. */
+ private final String host;
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the host value.
+ */
+ public String getHost() {
+ return this.host;
+ }
+
+ /** Service version. */
+ private final AzureMapsRouteServiceVersion serviceVersion;
+
+ /**
+ * Gets Service version.
+ *
+ * @return the serviceVersion value.
+ */
+ public AzureMapsRouteServiceVersion getServiceVersion() {
+ return this.serviceVersion;
+ }
+
+ /** The HTTP pipeline to send requests through. */
+ private final HttpPipeline httpPipeline;
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ public HttpPipeline getHttpPipeline() {
+ return this.httpPipeline;
+ }
+
+ /** The serializer to serialize an object into a string. */
+ private final SerializerAdapter serializerAdapter;
+
+ /**
+ * Gets The serializer to serialize an object into a string.
+ *
+ * @return the serializerAdapter value.
+ */
+ public SerializerAdapter getSerializerAdapter() {
+ return this.serializerAdapter;
+ }
+
+ /** The RoutesImpl object to access its operations. */
+ private final RoutesImpl routes;
+
+ /**
+ * Gets the RoutesImpl object to access its operations.
+ *
+ * @return the RoutesImpl object.
+ */
+ public RoutesImpl getRoutes() {
+ return this.routes;
+ }
+
+ /**
+ * Initializes an instance of AzureMapsRouteServiceClient client.
+ *
+ * @param clientId Specifies which account is intended for usage in conjunction with the Azure AD security model. It
+ * represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane
+ * Account API. To use Azure AD security in Azure Maps see the following
+ * [articles](https://aka.ms/amauthdetails) for guidance.
+ * @param host server parameter.
+ * @param serviceVersion Service version.
+ */
+ public AzureMapsRouteServiceClientImpl(String clientId, String host, AzureMapsRouteServiceVersion serviceVersion) {
+ this(
+ new HttpPipelineBuilder()
+ .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy())
+ .build(),
+ JacksonAdapter.createDefaultSerializerAdapter(),
+ clientId,
+ host,
+ serviceVersion);
+ }
+
+ /**
+ * Initializes an instance of AzureMapsRouteServiceClient client.
+ *
+ * @param httpPipeline The HTTP pipeline to send requests through.
+ * @param clientId Specifies which account is intended for usage in conjunction with the Azure AD security model. It
+ * represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane
+ * Account API. To use Azure AD security in Azure Maps see the following
+ * [articles](https://aka.ms/amauthdetails) for guidance.
+ * @param host server parameter.
+ * @param serviceVersion Service version.
+ */
+ public AzureMapsRouteServiceClientImpl(
+ HttpPipeline httpPipeline, String clientId, String host, AzureMapsRouteServiceVersion serviceVersion) {
+ this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), clientId, host, serviceVersion);
+ }
+
+ /**
+ * Initializes an instance of AzureMapsRouteServiceClient client.
+ *
+ * @param httpPipeline The HTTP pipeline to send requests through.
+ * @param serializerAdapter The serializer to serialize an object into a string.
+ * @param clientId Specifies which account is intended for usage in conjunction with the Azure AD security model. It
+ * represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane
+ * Account API. To use Azure AD security in Azure Maps see the following
+ * [articles](https://aka.ms/amauthdetails) for guidance.
+ * @param host server parameter.
+ * @param serviceVersion Service version.
+ */
+ public AzureMapsRouteServiceClientImpl(
+ HttpPipeline httpPipeline,
+ SerializerAdapter serializerAdapter,
+ String clientId,
+ String host,
+ AzureMapsRouteServiceVersion serviceVersion) {
+ this.httpPipeline = httpPipeline;
+ this.serializerAdapter = serializerAdapter;
+ this.clientId = clientId;
+ this.host = host;
+ this.serviceVersion = serviceVersion;
+ this.routes = new RoutesImpl(this);
+ }
+}
diff --git a/sdk/maps/azure-maps-route/src/main/java/com/azure/maps/route/implementation/RoutesImpl.java b/sdk/maps/azure-maps-route/src/main/java/com/azure/maps/route/implementation/RoutesImpl.java
new file mode 100644
index 000000000000..4acadd83fe67
--- /dev/null
+++ b/sdk/maps/azure-maps-route/src/main/java/com/azure/maps/route/implementation/RoutesImpl.java
@@ -0,0 +1,7891 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.maps.route.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.exception.HttpResponseException;
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.util.BinaryData;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.DefaultPollingStrategy;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.core.util.serializer.TypeReference;
+import java.time.Duration;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in Routes. */
+public final class RoutesImpl {
+ /** The proxy service used to perform REST calls. */
+ private final RoutesService service;
+
+ /** The service client containing this operation class. */
+ private final AzureMapsRouteServiceClientImpl client;
+
+ /**
+ * Initializes an instance of RoutesImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ RoutesImpl(AzureMapsRouteServiceClientImpl client) {
+ this.service = RestProxy.create(RoutesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for AzureMapsRouteServiceRoutes to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "AzureMapsRouteServic")
+ private interface RoutesService {
+ @Post("/route/matrix/{format}")
+ @ExpectedResponses({200, 202})
+ Mono> requestRouteMatrix(
+ @HostParam("$host") String host,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("format") String format,
+ @BodyParam("application/json") BinaryData routeMatrixQuery,
+ RequestOptions requestOptions,
+ Context context);
+
+ @Get("/route/matrix/{format}")
+ @ExpectedResponses({200, 202})
+ Mono> getRouteMatrix(
+ @HostParam("$host") String host,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("format") String matrixId,
+ RequestOptions requestOptions,
+ Context context);
+
+ @Post("/route/matrix/sync/{format}")
+ @ExpectedResponses({200})
+ Mono> requestRouteMatrixSync(
+ @HostParam("$host") String host,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("format") String format,
+ @BodyParam("application/json") BinaryData routeMatrixQuery,
+ RequestOptions requestOptions,
+ Context context);
+
+ @Get("/route/directions/{format}")
+ @ExpectedResponses({200})
+ Mono> getRouteDirections(
+ @HostParam("$host") String host,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("format") String format,
+ RequestOptions requestOptions,
+ Context context);
+
+ @Post("/route/directions/{format}")
+ @ExpectedResponses({200})
+ Mono> getRouteDirectionsWithAdditionalParameters(
+ @HostParam("$host") String host,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("format") String format,
+ @BodyParam("application/json") BinaryData routeDirectionParameters,
+ RequestOptions requestOptions,
+ Context context);
+
+ @Get("/route/range/{format}")
+ @ExpectedResponses({200})
+ Mono> getRouteRange(
+ @HostParam("$host") String host,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("format") String format,
+ RequestOptions requestOptions,
+ Context context);
+
+ @Post("/route/directions/batch/{format}")
+ @ExpectedResponses({200, 202})
+ Mono> requestRouteDirectionsBatch(
+ @HostParam("$host") String host,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("format") String format,
+ @BodyParam("application/json") BinaryData routeDirectionsBatchQueries,
+ RequestOptions requestOptions,
+ Context context);
+
+ @Get("/route/directions/batch/{format}")
+ @ExpectedResponses({200, 202})
+ Mono> getRouteDirectionsBatch(
+ @HostParam("$host") String host,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("format") String batchId,
+ RequestOptions requestOptions,
+ Context context);
+
+ @Post("/route/directions/batch/sync/{format}")
+ @ExpectedResponses({200})
+ Mono> requestRouteDirectionsBatchSync(
+ @HostParam("$host") String host,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("format") String format,
+ @BodyParam("application/json") BinaryData routeDirectionsBatchQueries,
+ RequestOptions requestOptions,
+ Context context);
+ }
+
+ /**
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ * The Matrix Routing service allows calculation of a matrix of route summaries for a set of routes defined by
+ * origin and destination locations by using an asynchronous (async) or synchronous (sync) POST request. For every
+ * given origin, the service calculates the cost of routing from that origin to every given destination. The set of
+ * origins and the set of destinations can be thought of as the column and row headers of a table and each cell in
+ * the table contains the costs of routing from the origin to the destination for that cell. As an example, let's
+ * say a food delivery company has 20 drivers and they need to find the closest driver to pick up the delivery from
+ * the restaurant. To solve this use case, they can call Matrix Route API.
+ *
+ *
For each route, the travel times and distances are returned. You can use the computed costs to determine which
+ * detailed routes to calculate using the Route Directions API.
+ *
+ *
The maximum size of a matrix for async request is **700** and for sync request it's **100** (the number of
+ * origins multiplied by the number of destinations).
+ *
+ *
### Submit Synchronous Route Matrix Request If your scenario requires synchronous requests and the maximum
+ * size of the matrix is less than or equal to 100, you might want to make synchronous request. The maximum size of
+ * a matrix for this API is **100** (the number of origins multiplied by the number of destinations). With that
+ * constraint in mind, examples of possible matrix dimensions are: 10x10, 6x8, 9x8 (it does not need to be square).
+ *
+ *
``` POST
+ * https://atlas.microsoft.com/route/matrix/sync/json?api-version=1.0&subscription-key={subscription-key} ```
+ *
+ *
### Submit Asynchronous Route Matrix Request The Asynchronous API is appropriate for processing big volumes of
+ * relatively complex routing requests. When you make a request by using async request, by default the service
+ * returns a 202 response code along a redirect URL in the Location field of the response header. This URL should be
+ * checked periodically until the response data or error information is available. If `waitForResults` parameter in
+ * the request is set to true, user will get a 200 response if the request is finished under 120 seconds.
+ *
+ *
The maximum size of a matrix for this API is **700** (the number of origins multiplied by the number of
+ * destinations). With that constraint in mind, examples of possible matrix dimensions are: 50x10, 10x10, 28x25.
+ * 10x70 (it does not need to be square).
+ *
+ *
The asynchronous responses are stored for **14** days. The redirect URL returns a 404 response if used after
+ * the expiration period.
+ *
+ *
``` POST https://atlas.microsoft.com/route/matrix/json?api-version=1.0&subscription-key={subscription-key}
+ * ```
+ *
+ *
Here's a typical sequence of asynchronous operations: 1. Client sends a Route Matrix POST request to Azure
+ * Maps
+ *
+ *
2. The server will respond with one of the following:
+ *
+ *
> HTTP `202 Accepted` - Route Matrix request has been accepted.
+ *
+ *
> HTTP `Error` - There was an error processing your Route Matrix request. This could either be a 400 Bad
+ * Request or any other Error status code.
+ *
+ *
3. If the Matrix Route request was accepted successfully, the Location header in the response contains the URL
+ * to download the results of the request. This status URI looks like the following:
+ *
+ *
``` GET
+ * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
+ *
+ *
4. Client issues a GET request on the download URL obtained in Step 3 to download the results
+ *
+ *
### Download Sync Results When you make a POST request for Route Matrix Sync API, the service returns 200
+ * response code for successful request and a response array. The response body will contain the data and there will
+ * be no possibility to retrieve the results later.
+ *
+ *
### Download Async Results When a request issues a `202 Accepted` response, the request is being processed
+ * using our async pipeline. You will be given a URL to check the progress of your async request in the location
+ * header of the response. This status URI looks like the following: ``` GET
+ * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
+ *
+ *
The URL provided by the location header will return the following responses when a `GET` request is issued.
+ *
+ *
> HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some
+ * time.
+ *
+ *
> HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ * | waitForResults | String | No | Boolean to indicate whether to execute the request synchronously. If set to true, user will get a 200 response if the request is finished under 120 seconds. Otherwise, user will get a 202 response right away. Please refer to the API description for more details on 202 response. **Supported only for async request**. |
+ * | computeTravelTimeFor | String | No | Specifies whether to return additional travel times using different types of traffic information (none, historic, live) as well as the default best-estimate travel time. |
+ * | sectionType | String | No | Specifies which of the section types is reported in the route response. <br><br>For example if sectionType = pedestrian the sections which are suited for pedestrians only are returned. Multiple types can be used. The default sectionType refers to the travelMode input. By default travelMode is set to car |
+ * | arriveAt | String | No | The date and time of arrival at the destination point. It must be specified as a dateTime. When a time zone offset is not specified it will be assumed to be that of the destination point. The arriveAt value must be in the future. The arriveAt parameter cannot be used in conjunction with departAt, minDeviationDistance or minDeviationTime. |
+ * | departAt | String | No | The date and time of departure from the origin point. Departure times apart from now must be specified as a dateTime. When a time zone offset is not specified, it will be assumed to be that of the origin point. The departAt value must be in the future in the date-time format (1996-12-19T16:39:57-08:00). |
+ * | vehicleAxleWeight | String | No | Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per axle are not considered. |
+ * | vehicleLength | String | No | Length of the vehicle in meters. A value of 0 means that length restrictions are not considered. |
+ * | vehicleHeight | String | No | Height of the vehicle in meters. A value of 0 means that height restrictions are not considered. |
+ * | vehicleWidth | String | No | Width of the vehicle in meters. A value of 0 means that width restrictions are not considered. |
+ * | vehicleMaxSpeed | String | No | 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.
+ *
+ * * A value of 0 means that an appropriate value for the vehicle will be determined and applied during route planning.
+ *
+ * * A 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. |
+ * | vehicleWeight | String | No | Weight of the vehicle in kilograms. |
+ * | windingness | String | No | Level of turns for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | hilliness | String | No | Degree of hilliness for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | travelMode | String | No | The mode of travel for the requested route. If not defined, default is 'car'. Note that the requested travelMode may not be available for the entire route. Where the requested travelMode is not available for a particular section, the travelMode element of the response for that section will be "other". Note that travel modes bus, motorcycle, taxi and van are BETA functionality. Full restriction data is not available in all areas. In **calculateReachableRange** requests, the values bicycle and pedestrian must not be used. |
+ * | avoid | String | No | Specifies something that the route calculation should try to avoid when determining the route. Can be specified multiple times in one request, for example, '&avoid=motorways&avoid=tollRoads&avoid=ferries'. In calculateReachableRange requests, the value alreadyUsedRoads must not be used. |
+ * | traffic | String | No | Possible values:
+ * * true - Do consider all available traffic information during routing
+ * * false - Ignore current traffic data during routing. Note that although the current traffic data is ignored
+ * during routing, the effect of historic traffic on effective road speeds is still incorporated. |
+ * | routeType | String | No | The type of route requested. |
+ * | vehicleLoadType | String | No | 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 can be specified multiple times. This parameter is currently only considered for travelMode=truck. |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Request Body Schema
+ *
+ *
{@code
+ * {
+ * origins: {
+ * coordinates: [
+ * [
+ * double
+ * ]
+ * ]
+ * }
+ * destinations: (recursive schema, see destinations above)
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * formatVersion: String
+ * matrix: [
+ * [
+ * {
+ * statusCode: Integer
+ * response: {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * }
+ * }
+ * ]
+ * ]
+ * summary: {
+ * successfulRoutes: Integer
+ * totalRoutes: Integer
+ * }
+ * }
+ * }
+ *
+ * @param format Desired format of the response. Only `json` format is supported.
+ * @param routeMatrixQuery The matrix of origin and destination coordinates to compute the route distance, travel
+ * time and other summary for each cell of the matrix based on the input parameters. The minimum and the maximum
+ * cell count supported are 1 and **700** for async and **100** for sync respectively. For example, it can be 35
+ * origins and 20 destinations or 25 origins and 25 destinations for async API.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return this object is returned from a successful Route Matrix call along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> requestRouteMatrixWithResponseAsync(
+ String format, BinaryData routeMatrixQuery, RequestOptions requestOptions) {
+ return FluxUtil.withContext(
+ context ->
+ service.requestRouteMatrix(
+ this.client.getHost(),
+ this.client.getServiceVersion().getVersion(),
+ format,
+ routeMatrixQuery,
+ requestOptions,
+ context));
+ }
+
+ /**
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ * The Matrix Routing service allows calculation of a matrix of route summaries for a set of routes defined by
+ * origin and destination locations by using an asynchronous (async) or synchronous (sync) POST request. For every
+ * given origin, the service calculates the cost of routing from that origin to every given destination. The set of
+ * origins and the set of destinations can be thought of as the column and row headers of a table and each cell in
+ * the table contains the costs of routing from the origin to the destination for that cell. As an example, let's
+ * say a food delivery company has 20 drivers and they need to find the closest driver to pick up the delivery from
+ * the restaurant. To solve this use case, they can call Matrix Route API.
+ *
+ *
For each route, the travel times and distances are returned. You can use the computed costs to determine which
+ * detailed routes to calculate using the Route Directions API.
+ *
+ *
The maximum size of a matrix for async request is **700** and for sync request it's **100** (the number of
+ * origins multiplied by the number of destinations).
+ *
+ *
### Submit Synchronous Route Matrix Request If your scenario requires synchronous requests and the maximum
+ * size of the matrix is less than or equal to 100, you might want to make synchronous request. The maximum size of
+ * a matrix for this API is **100** (the number of origins multiplied by the number of destinations). With that
+ * constraint in mind, examples of possible matrix dimensions are: 10x10, 6x8, 9x8 (it does not need to be square).
+ *
+ *
``` POST
+ * https://atlas.microsoft.com/route/matrix/sync/json?api-version=1.0&subscription-key={subscription-key} ```
+ *
+ *
### Submit Asynchronous Route Matrix Request The Asynchronous API is appropriate for processing big volumes of
+ * relatively complex routing requests. When you make a request by using async request, by default the service
+ * returns a 202 response code along a redirect URL in the Location field of the response header. This URL should be
+ * checked periodically until the response data or error information is available. If `waitForResults` parameter in
+ * the request is set to true, user will get a 200 response if the request is finished under 120 seconds.
+ *
+ *
The maximum size of a matrix for this API is **700** (the number of origins multiplied by the number of
+ * destinations). With that constraint in mind, examples of possible matrix dimensions are: 50x10, 10x10, 28x25.
+ * 10x70 (it does not need to be square).
+ *
+ *
The asynchronous responses are stored for **14** days. The redirect URL returns a 404 response if used after
+ * the expiration period.
+ *
+ *
``` POST https://atlas.microsoft.com/route/matrix/json?api-version=1.0&subscription-key={subscription-key}
+ * ```
+ *
+ *
Here's a typical sequence of asynchronous operations: 1. Client sends a Route Matrix POST request to Azure
+ * Maps
+ *
+ *
2. The server will respond with one of the following:
+ *
+ *
> HTTP `202 Accepted` - Route Matrix request has been accepted.
+ *
+ *
> HTTP `Error` - There was an error processing your Route Matrix request. This could either be a 400 Bad
+ * Request or any other Error status code.
+ *
+ *
3. If the Matrix Route request was accepted successfully, the Location header in the response contains the URL
+ * to download the results of the request. This status URI looks like the following:
+ *
+ *
``` GET
+ * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
+ *
+ *
4. Client issues a GET request on the download URL obtained in Step 3 to download the results
+ *
+ *
### Download Sync Results When you make a POST request for Route Matrix Sync API, the service returns 200
+ * response code for successful request and a response array. The response body will contain the data and there will
+ * be no possibility to retrieve the results later.
+ *
+ *
### Download Async Results When a request issues a `202 Accepted` response, the request is being processed
+ * using our async pipeline. You will be given a URL to check the progress of your async request in the location
+ * header of the response. This status URI looks like the following: ``` GET
+ * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
+ *
+ *
The URL provided by the location header will return the following responses when a `GET` request is issued.
+ *
+ *
> HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some
+ * time.
+ *
+ *
> HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ * | waitForResults | String | No | Boolean to indicate whether to execute the request synchronously. If set to true, user will get a 200 response if the request is finished under 120 seconds. Otherwise, user will get a 202 response right away. Please refer to the API description for more details on 202 response. **Supported only for async request**. |
+ * | computeTravelTimeFor | String | No | Specifies whether to return additional travel times using different types of traffic information (none, historic, live) as well as the default best-estimate travel time. |
+ * | sectionType | String | No | Specifies which of the section types is reported in the route response. <br><br>For example if sectionType = pedestrian the sections which are suited for pedestrians only are returned. Multiple types can be used. The default sectionType refers to the travelMode input. By default travelMode is set to car |
+ * | arriveAt | String | No | The date and time of arrival at the destination point. It must be specified as a dateTime. When a time zone offset is not specified it will be assumed to be that of the destination point. The arriveAt value must be in the future. The arriveAt parameter cannot be used in conjunction with departAt, minDeviationDistance or minDeviationTime. |
+ * | departAt | String | No | The date and time of departure from the origin point. Departure times apart from now must be specified as a dateTime. When a time zone offset is not specified, it will be assumed to be that of the origin point. The departAt value must be in the future in the date-time format (1996-12-19T16:39:57-08:00). |
+ * | vehicleAxleWeight | String | No | Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per axle are not considered. |
+ * | vehicleLength | String | No | Length of the vehicle in meters. A value of 0 means that length restrictions are not considered. |
+ * | vehicleHeight | String | No | Height of the vehicle in meters. A value of 0 means that height restrictions are not considered. |
+ * | vehicleWidth | String | No | Width of the vehicle in meters. A value of 0 means that width restrictions are not considered. |
+ * | vehicleMaxSpeed | String | No | 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.
+ *
+ * * A value of 0 means that an appropriate value for the vehicle will be determined and applied during route planning.
+ *
+ * * A 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. |
+ * | vehicleWeight | String | No | Weight of the vehicle in kilograms. |
+ * | windingness | String | No | Level of turns for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | hilliness | String | No | Degree of hilliness for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | travelMode | String | No | The mode of travel for the requested route. If not defined, default is 'car'. Note that the requested travelMode may not be available for the entire route. Where the requested travelMode is not available for a particular section, the travelMode element of the response for that section will be "other". Note that travel modes bus, motorcycle, taxi and van are BETA functionality. Full restriction data is not available in all areas. In **calculateReachableRange** requests, the values bicycle and pedestrian must not be used. |
+ * | avoid | String | No | Specifies something that the route calculation should try to avoid when determining the route. Can be specified multiple times in one request, for example, '&avoid=motorways&avoid=tollRoads&avoid=ferries'. In calculateReachableRange requests, the value alreadyUsedRoads must not be used. |
+ * | traffic | String | No | Possible values:
+ * * true - Do consider all available traffic information during routing
+ * * false - Ignore current traffic data during routing. Note that although the current traffic data is ignored
+ * during routing, the effect of historic traffic on effective road speeds is still incorporated. |
+ * | routeType | String | No | The type of route requested. |
+ * | vehicleLoadType | String | No | 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 can be specified multiple times. This parameter is currently only considered for travelMode=truck. |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Request Body Schema
+ *
+ *
{@code
+ * {
+ * origins: {
+ * coordinates: [
+ * [
+ * double
+ * ]
+ * ]
+ * }
+ * destinations: (recursive schema, see destinations above)
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * formatVersion: String
+ * matrix: [
+ * [
+ * {
+ * statusCode: Integer
+ * response: {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * }
+ * }
+ * ]
+ * ]
+ * summary: {
+ * successfulRoutes: Integer
+ * totalRoutes: Integer
+ * }
+ * }
+ * }
+ *
+ * @param format Desired format of the response. Only `json` format is supported.
+ * @param routeMatrixQuery The matrix of origin and destination coordinates to compute the route distance, travel
+ * time and other summary for each cell of the matrix based on the input parameters. The minimum and the maximum
+ * cell count supported are 1 and **700** for async and **100** for sync respectively. For example, it can be 35
+ * origins and 20 destinations or 25 origins and 25 destinations for async API.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @param context The context to associate with this operation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return this object is returned from a successful Route Matrix call along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> requestRouteMatrixWithResponseAsync(
+ String format, BinaryData routeMatrixQuery, RequestOptions requestOptions, Context context) {
+ return service.requestRouteMatrix(
+ this.client.getHost(),
+ this.client.getServiceVersion().getVersion(),
+ format,
+ routeMatrixQuery,
+ requestOptions,
+ context);
+ }
+
+ /**
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ * The Matrix Routing service allows calculation of a matrix of route summaries for a set of routes defined by
+ * origin and destination locations by using an asynchronous (async) or synchronous (sync) POST request. For every
+ * given origin, the service calculates the cost of routing from that origin to every given destination. The set of
+ * origins and the set of destinations can be thought of as the column and row headers of a table and each cell in
+ * the table contains the costs of routing from the origin to the destination for that cell. As an example, let's
+ * say a food delivery company has 20 drivers and they need to find the closest driver to pick up the delivery from
+ * the restaurant. To solve this use case, they can call Matrix Route API.
+ *
+ *
For each route, the travel times and distances are returned. You can use the computed costs to determine which
+ * detailed routes to calculate using the Route Directions API.
+ *
+ *
The maximum size of a matrix for async request is **700** and for sync request it's **100** (the number of
+ * origins multiplied by the number of destinations).
+ *
+ *
### Submit Synchronous Route Matrix Request If your scenario requires synchronous requests and the maximum
+ * size of the matrix is less than or equal to 100, you might want to make synchronous request. The maximum size of
+ * a matrix for this API is **100** (the number of origins multiplied by the number of destinations). With that
+ * constraint in mind, examples of possible matrix dimensions are: 10x10, 6x8, 9x8 (it does not need to be square).
+ *
+ *
``` POST
+ * https://atlas.microsoft.com/route/matrix/sync/json?api-version=1.0&subscription-key={subscription-key} ```
+ *
+ *
### Submit Asynchronous Route Matrix Request The Asynchronous API is appropriate for processing big volumes of
+ * relatively complex routing requests. When you make a request by using async request, by default the service
+ * returns a 202 response code along a redirect URL in the Location field of the response header. This URL should be
+ * checked periodically until the response data or error information is available. If `waitForResults` parameter in
+ * the request is set to true, user will get a 200 response if the request is finished under 120 seconds.
+ *
+ *
The maximum size of a matrix for this API is **700** (the number of origins multiplied by the number of
+ * destinations). With that constraint in mind, examples of possible matrix dimensions are: 50x10, 10x10, 28x25.
+ * 10x70 (it does not need to be square).
+ *
+ *
The asynchronous responses are stored for **14** days. The redirect URL returns a 404 response if used after
+ * the expiration period.
+ *
+ *
``` POST https://atlas.microsoft.com/route/matrix/json?api-version=1.0&subscription-key={subscription-key}
+ * ```
+ *
+ *
Here's a typical sequence of asynchronous operations: 1. Client sends a Route Matrix POST request to Azure
+ * Maps
+ *
+ *
2. The server will respond with one of the following:
+ *
+ *
> HTTP `202 Accepted` - Route Matrix request has been accepted.
+ *
+ *
> HTTP `Error` - There was an error processing your Route Matrix request. This could either be a 400 Bad
+ * Request or any other Error status code.
+ *
+ *
3. If the Matrix Route request was accepted successfully, the Location header in the response contains the URL
+ * to download the results of the request. This status URI looks like the following:
+ *
+ *
``` GET
+ * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
+ *
+ *
4. Client issues a GET request on the download URL obtained in Step 3 to download the results
+ *
+ *
### Download Sync Results When you make a POST request for Route Matrix Sync API, the service returns 200
+ * response code for successful request and a response array. The response body will contain the data and there will
+ * be no possibility to retrieve the results later.
+ *
+ *
### Download Async Results When a request issues a `202 Accepted` response, the request is being processed
+ * using our async pipeline. You will be given a URL to check the progress of your async request in the location
+ * header of the response. This status URI looks like the following: ``` GET
+ * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
+ *
+ *
The URL provided by the location header will return the following responses when a `GET` request is issued.
+ *
+ *
> HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some
+ * time.
+ *
+ *
> HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ * | waitForResults | String | No | Boolean to indicate whether to execute the request synchronously. If set to true, user will get a 200 response if the request is finished under 120 seconds. Otherwise, user will get a 202 response right away. Please refer to the API description for more details on 202 response. **Supported only for async request**. |
+ * | computeTravelTimeFor | String | No | Specifies whether to return additional travel times using different types of traffic information (none, historic, live) as well as the default best-estimate travel time. |
+ * | sectionType | String | No | Specifies which of the section types is reported in the route response. <br><br>For example if sectionType = pedestrian the sections which are suited for pedestrians only are returned. Multiple types can be used. The default sectionType refers to the travelMode input. By default travelMode is set to car |
+ * | arriveAt | String | No | The date and time of arrival at the destination point. It must be specified as a dateTime. When a time zone offset is not specified it will be assumed to be that of the destination point. The arriveAt value must be in the future. The arriveAt parameter cannot be used in conjunction with departAt, minDeviationDistance or minDeviationTime. |
+ * | departAt | String | No | The date and time of departure from the origin point. Departure times apart from now must be specified as a dateTime. When a time zone offset is not specified, it will be assumed to be that of the origin point. The departAt value must be in the future in the date-time format (1996-12-19T16:39:57-08:00). |
+ * | vehicleAxleWeight | String | No | Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per axle are not considered. |
+ * | vehicleLength | String | No | Length of the vehicle in meters. A value of 0 means that length restrictions are not considered. |
+ * | vehicleHeight | String | No | Height of the vehicle in meters. A value of 0 means that height restrictions are not considered. |
+ * | vehicleWidth | String | No | Width of the vehicle in meters. A value of 0 means that width restrictions are not considered. |
+ * | vehicleMaxSpeed | String | No | 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.
+ *
+ * * A value of 0 means that an appropriate value for the vehicle will be determined and applied during route planning.
+ *
+ * * A 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. |
+ * | vehicleWeight | String | No | Weight of the vehicle in kilograms. |
+ * | windingness | String | No | Level of turns for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | hilliness | String | No | Degree of hilliness for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | travelMode | String | No | The mode of travel for the requested route. If not defined, default is 'car'. Note that the requested travelMode may not be available for the entire route. Where the requested travelMode is not available for a particular section, the travelMode element of the response for that section will be "other". Note that travel modes bus, motorcycle, taxi and van are BETA functionality. Full restriction data is not available in all areas. In **calculateReachableRange** requests, the values bicycle and pedestrian must not be used. |
+ * | avoid | String | No | Specifies something that the route calculation should try to avoid when determining the route. Can be specified multiple times in one request, for example, '&avoid=motorways&avoid=tollRoads&avoid=ferries'. In calculateReachableRange requests, the value alreadyUsedRoads must not be used. |
+ * | traffic | String | No | Possible values:
+ * * true - Do consider all available traffic information during routing
+ * * false - Ignore current traffic data during routing. Note that although the current traffic data is ignored
+ * during routing, the effect of historic traffic on effective road speeds is still incorporated. |
+ * | routeType | String | No | The type of route requested. |
+ * | vehicleLoadType | String | No | 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 can be specified multiple times. This parameter is currently only considered for travelMode=truck. |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Request Body Schema
+ *
+ *
{@code
+ * {
+ * origins: {
+ * coordinates: [
+ * [
+ * double
+ * ]
+ * ]
+ * }
+ * destinations: (recursive schema, see destinations above)
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * formatVersion: String
+ * matrix: [
+ * [
+ * {
+ * statusCode: Integer
+ * response: {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * }
+ * }
+ * ]
+ * ]
+ * summary: {
+ * successfulRoutes: Integer
+ * totalRoutes: Integer
+ * }
+ * }
+ * }
+ *
+ * @param format Desired format of the response. Only `json` format is supported.
+ * @param routeMatrixQuery The matrix of origin and destination coordinates to compute the route distance, travel
+ * time and other summary for each cell of the matrix based on the input parameters. The minimum and the maximum
+ * cell count supported are 1 and **700** for async and **100** for sync respectively. For example, it can be 35
+ * origins and 20 destinations or 25 origins and 25 destinations for async API.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return the {@link PollerFlux} for polling of this object is returned from a successful Route Matrix call.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginRequestRouteMatrixAsync(
+ String format, BinaryData routeMatrixQuery, RequestOptions requestOptions) {
+ return PollerFlux.create(
+ Duration.ofSeconds(1),
+ () -> this.requestRouteMatrixWithResponseAsync(format, routeMatrixQuery, requestOptions),
+ new DefaultPollingStrategy<>(this.client.getHttpPipeline()),
+ new TypeReferenceBinaryData(),
+ new TypeReferenceBinaryData());
+ }
+
+ /**
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ * The Matrix Routing service allows calculation of a matrix of route summaries for a set of routes defined by
+ * origin and destination locations by using an asynchronous (async) or synchronous (sync) POST request. For every
+ * given origin, the service calculates the cost of routing from that origin to every given destination. The set of
+ * origins and the set of destinations can be thought of as the column and row headers of a table and each cell in
+ * the table contains the costs of routing from the origin to the destination for that cell. As an example, let's
+ * say a food delivery company has 20 drivers and they need to find the closest driver to pick up the delivery from
+ * the restaurant. To solve this use case, they can call Matrix Route API.
+ *
+ *
For each route, the travel times and distances are returned. You can use the computed costs to determine which
+ * detailed routes to calculate using the Route Directions API.
+ *
+ *
The maximum size of a matrix for async request is **700** and for sync request it's **100** (the number of
+ * origins multiplied by the number of destinations).
+ *
+ *
### Submit Synchronous Route Matrix Request If your scenario requires synchronous requests and the maximum
+ * size of the matrix is less than or equal to 100, you might want to make synchronous request. The maximum size of
+ * a matrix for this API is **100** (the number of origins multiplied by the number of destinations). With that
+ * constraint in mind, examples of possible matrix dimensions are: 10x10, 6x8, 9x8 (it does not need to be square).
+ *
+ *
``` POST
+ * https://atlas.microsoft.com/route/matrix/sync/json?api-version=1.0&subscription-key={subscription-key} ```
+ *
+ *
### Submit Asynchronous Route Matrix Request The Asynchronous API is appropriate for processing big volumes of
+ * relatively complex routing requests. When you make a request by using async request, by default the service
+ * returns a 202 response code along a redirect URL in the Location field of the response header. This URL should be
+ * checked periodically until the response data or error information is available. If `waitForResults` parameter in
+ * the request is set to true, user will get a 200 response if the request is finished under 120 seconds.
+ *
+ *
The maximum size of a matrix for this API is **700** (the number of origins multiplied by the number of
+ * destinations). With that constraint in mind, examples of possible matrix dimensions are: 50x10, 10x10, 28x25.
+ * 10x70 (it does not need to be square).
+ *
+ *
The asynchronous responses are stored for **14** days. The redirect URL returns a 404 response if used after
+ * the expiration period.
+ *
+ *
``` POST https://atlas.microsoft.com/route/matrix/json?api-version=1.0&subscription-key={subscription-key}
+ * ```
+ *
+ *
Here's a typical sequence of asynchronous operations: 1. Client sends a Route Matrix POST request to Azure
+ * Maps
+ *
+ *
2. The server will respond with one of the following:
+ *
+ *
> HTTP `202 Accepted` - Route Matrix request has been accepted.
+ *
+ *
> HTTP `Error` - There was an error processing your Route Matrix request. This could either be a 400 Bad
+ * Request or any other Error status code.
+ *
+ *
3. If the Matrix Route request was accepted successfully, the Location header in the response contains the URL
+ * to download the results of the request. This status URI looks like the following:
+ *
+ *
``` GET
+ * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
+ *
+ *
4. Client issues a GET request on the download URL obtained in Step 3 to download the results
+ *
+ *
### Download Sync Results When you make a POST request for Route Matrix Sync API, the service returns 200
+ * response code for successful request and a response array. The response body will contain the data and there will
+ * be no possibility to retrieve the results later.
+ *
+ *
### Download Async Results When a request issues a `202 Accepted` response, the request is being processed
+ * using our async pipeline. You will be given a URL to check the progress of your async request in the location
+ * header of the response. This status URI looks like the following: ``` GET
+ * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
+ *
+ *
The URL provided by the location header will return the following responses when a `GET` request is issued.
+ *
+ *
> HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some
+ * time.
+ *
+ *
> HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ * | waitForResults | String | No | Boolean to indicate whether to execute the request synchronously. If set to true, user will get a 200 response if the request is finished under 120 seconds. Otherwise, user will get a 202 response right away. Please refer to the API description for more details on 202 response. **Supported only for async request**. |
+ * | computeTravelTimeFor | String | No | Specifies whether to return additional travel times using different types of traffic information (none, historic, live) as well as the default best-estimate travel time. |
+ * | sectionType | String | No | Specifies which of the section types is reported in the route response. <br><br>For example if sectionType = pedestrian the sections which are suited for pedestrians only are returned. Multiple types can be used. The default sectionType refers to the travelMode input. By default travelMode is set to car |
+ * | arriveAt | String | No | The date and time of arrival at the destination point. It must be specified as a dateTime. When a time zone offset is not specified it will be assumed to be that of the destination point. The arriveAt value must be in the future. The arriveAt parameter cannot be used in conjunction with departAt, minDeviationDistance or minDeviationTime. |
+ * | departAt | String | No | The date and time of departure from the origin point. Departure times apart from now must be specified as a dateTime. When a time zone offset is not specified, it will be assumed to be that of the origin point. The departAt value must be in the future in the date-time format (1996-12-19T16:39:57-08:00). |
+ * | vehicleAxleWeight | String | No | Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per axle are not considered. |
+ * | vehicleLength | String | No | Length of the vehicle in meters. A value of 0 means that length restrictions are not considered. |
+ * | vehicleHeight | String | No | Height of the vehicle in meters. A value of 0 means that height restrictions are not considered. |
+ * | vehicleWidth | String | No | Width of the vehicle in meters. A value of 0 means that width restrictions are not considered. |
+ * | vehicleMaxSpeed | String | No | 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.
+ *
+ * * A value of 0 means that an appropriate value for the vehicle will be determined and applied during route planning.
+ *
+ * * A 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. |
+ * | vehicleWeight | String | No | Weight of the vehicle in kilograms. |
+ * | windingness | String | No | Level of turns for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | hilliness | String | No | Degree of hilliness for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | travelMode | String | No | The mode of travel for the requested route. If not defined, default is 'car'. Note that the requested travelMode may not be available for the entire route. Where the requested travelMode is not available for a particular section, the travelMode element of the response for that section will be "other". Note that travel modes bus, motorcycle, taxi and van are BETA functionality. Full restriction data is not available in all areas. In **calculateReachableRange** requests, the values bicycle and pedestrian must not be used. |
+ * | avoid | String | No | Specifies something that the route calculation should try to avoid when determining the route. Can be specified multiple times in one request, for example, '&avoid=motorways&avoid=tollRoads&avoid=ferries'. In calculateReachableRange requests, the value alreadyUsedRoads must not be used. |
+ * | traffic | String | No | Possible values:
+ * * true - Do consider all available traffic information during routing
+ * * false - Ignore current traffic data during routing. Note that although the current traffic data is ignored
+ * during routing, the effect of historic traffic on effective road speeds is still incorporated. |
+ * | routeType | String | No | The type of route requested. |
+ * | vehicleLoadType | String | No | 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 can be specified multiple times. This parameter is currently only considered for travelMode=truck. |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Request Body Schema
+ *
+ *
{@code
+ * {
+ * origins: {
+ * coordinates: [
+ * [
+ * double
+ * ]
+ * ]
+ * }
+ * destinations: (recursive schema, see destinations above)
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * formatVersion: String
+ * matrix: [
+ * [
+ * {
+ * statusCode: Integer
+ * response: {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * }
+ * }
+ * ]
+ * ]
+ * summary: {
+ * successfulRoutes: Integer
+ * totalRoutes: Integer
+ * }
+ * }
+ * }
+ *
+ * @param format Desired format of the response. Only `json` format is supported.
+ * @param routeMatrixQuery The matrix of origin and destination coordinates to compute the route distance, travel
+ * time and other summary for each cell of the matrix based on the input parameters. The minimum and the maximum
+ * cell count supported are 1 and **700** for async and **100** for sync respectively. For example, it can be 35
+ * origins and 20 destinations or 25 origins and 25 destinations for async API.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @param context The context to associate with this operation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return the {@link PollerFlux} for polling of this object is returned from a successful Route Matrix call.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginRequestRouteMatrixAsync(
+ String format, BinaryData routeMatrixQuery, RequestOptions requestOptions, Context context) {
+ return PollerFlux.create(
+ Duration.ofSeconds(1),
+ () -> this.requestRouteMatrixWithResponseAsync(format, routeMatrixQuery, requestOptions, context),
+ new DefaultPollingStrategy<>(this.client.getHttpPipeline()),
+ new TypeReferenceBinaryData(),
+ new TypeReferenceBinaryData());
+ }
+
+ /**
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ * The Matrix Routing service allows calculation of a matrix of route summaries for a set of routes defined by
+ * origin and destination locations by using an asynchronous (async) or synchronous (sync) POST request. For every
+ * given origin, the service calculates the cost of routing from that origin to every given destination. The set of
+ * origins and the set of destinations can be thought of as the column and row headers of a table and each cell in
+ * the table contains the costs of routing from the origin to the destination for that cell. As an example, let's
+ * say a food delivery company has 20 drivers and they need to find the closest driver to pick up the delivery from
+ * the restaurant. To solve this use case, they can call Matrix Route API.
+ *
+ *
For each route, the travel times and distances are returned. You can use the computed costs to determine which
+ * detailed routes to calculate using the Route Directions API.
+ *
+ *
The maximum size of a matrix for async request is **700** and for sync request it's **100** (the number of
+ * origins multiplied by the number of destinations).
+ *
+ *
### Submit Synchronous Route Matrix Request If your scenario requires synchronous requests and the maximum
+ * size of the matrix is less than or equal to 100, you might want to make synchronous request. The maximum size of
+ * a matrix for this API is **100** (the number of origins multiplied by the number of destinations). With that
+ * constraint in mind, examples of possible matrix dimensions are: 10x10, 6x8, 9x8 (it does not need to be square).
+ *
+ *
``` POST
+ * https://atlas.microsoft.com/route/matrix/sync/json?api-version=1.0&subscription-key={subscription-key} ```
+ *
+ *
### Submit Asynchronous Route Matrix Request The Asynchronous API is appropriate for processing big volumes of
+ * relatively complex routing requests. When you make a request by using async request, by default the service
+ * returns a 202 response code along a redirect URL in the Location field of the response header. This URL should be
+ * checked periodically until the response data or error information is available. If `waitForResults` parameter in
+ * the request is set to true, user will get a 200 response if the request is finished under 120 seconds.
+ *
+ *
The maximum size of a matrix for this API is **700** (the number of origins multiplied by the number of
+ * destinations). With that constraint in mind, examples of possible matrix dimensions are: 50x10, 10x10, 28x25.
+ * 10x70 (it does not need to be square).
+ *
+ *
The asynchronous responses are stored for **14** days. The redirect URL returns a 404 response if used after
+ * the expiration period.
+ *
+ *
``` POST https://atlas.microsoft.com/route/matrix/json?api-version=1.0&subscription-key={subscription-key}
+ * ```
+ *
+ *
Here's a typical sequence of asynchronous operations: 1. Client sends a Route Matrix POST request to Azure
+ * Maps
+ *
+ *
2. The server will respond with one of the following:
+ *
+ *
> HTTP `202 Accepted` - Route Matrix request has been accepted.
+ *
+ *
> HTTP `Error` - There was an error processing your Route Matrix request. This could either be a 400 Bad
+ * Request or any other Error status code.
+ *
+ *
3. If the Matrix Route request was accepted successfully, the Location header in the response contains the URL
+ * to download the results of the request. This status URI looks like the following:
+ *
+ *
``` GET
+ * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
+ *
+ *
4. Client issues a GET request on the download URL obtained in Step 3 to download the results
+ *
+ *
### Download Sync Results When you make a POST request for Route Matrix Sync API, the service returns 200
+ * response code for successful request and a response array. The response body will contain the data and there will
+ * be no possibility to retrieve the results later.
+ *
+ *
### Download Async Results When a request issues a `202 Accepted` response, the request is being processed
+ * using our async pipeline. You will be given a URL to check the progress of your async request in the location
+ * header of the response. This status URI looks like the following: ``` GET
+ * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
+ *
+ *
The URL provided by the location header will return the following responses when a `GET` request is issued.
+ *
+ *
> HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some
+ * time.
+ *
+ *
> HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ * | waitForResults | String | No | Boolean to indicate whether to execute the request synchronously. If set to true, user will get a 200 response if the request is finished under 120 seconds. Otherwise, user will get a 202 response right away. Please refer to the API description for more details on 202 response. **Supported only for async request**. |
+ * | computeTravelTimeFor | String | No | Specifies whether to return additional travel times using different types of traffic information (none, historic, live) as well as the default best-estimate travel time. |
+ * | sectionType | String | No | Specifies which of the section types is reported in the route response. <br><br>For example if sectionType = pedestrian the sections which are suited for pedestrians only are returned. Multiple types can be used. The default sectionType refers to the travelMode input. By default travelMode is set to car |
+ * | arriveAt | String | No | The date and time of arrival at the destination point. It must be specified as a dateTime. When a time zone offset is not specified it will be assumed to be that of the destination point. The arriveAt value must be in the future. The arriveAt parameter cannot be used in conjunction with departAt, minDeviationDistance or minDeviationTime. |
+ * | departAt | String | No | The date and time of departure from the origin point. Departure times apart from now must be specified as a dateTime. When a time zone offset is not specified, it will be assumed to be that of the origin point. The departAt value must be in the future in the date-time format (1996-12-19T16:39:57-08:00). |
+ * | vehicleAxleWeight | String | No | Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per axle are not considered. |
+ * | vehicleLength | String | No | Length of the vehicle in meters. A value of 0 means that length restrictions are not considered. |
+ * | vehicleHeight | String | No | Height of the vehicle in meters. A value of 0 means that height restrictions are not considered. |
+ * | vehicleWidth | String | No | Width of the vehicle in meters. A value of 0 means that width restrictions are not considered. |
+ * | vehicleMaxSpeed | String | No | 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.
+ *
+ * * A value of 0 means that an appropriate value for the vehicle will be determined and applied during route planning.
+ *
+ * * A 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. |
+ * | vehicleWeight | String | No | Weight of the vehicle in kilograms. |
+ * | windingness | String | No | Level of turns for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | hilliness | String | No | Degree of hilliness for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | travelMode | String | No | The mode of travel for the requested route. If not defined, default is 'car'. Note that the requested travelMode may not be available for the entire route. Where the requested travelMode is not available for a particular section, the travelMode element of the response for that section will be "other". Note that travel modes bus, motorcycle, taxi and van are BETA functionality. Full restriction data is not available in all areas. In **calculateReachableRange** requests, the values bicycle and pedestrian must not be used. |
+ * | avoid | String | No | Specifies something that the route calculation should try to avoid when determining the route. Can be specified multiple times in one request, for example, '&avoid=motorways&avoid=tollRoads&avoid=ferries'. In calculateReachableRange requests, the value alreadyUsedRoads must not be used. |
+ * | traffic | String | No | Possible values:
+ * * true - Do consider all available traffic information during routing
+ * * false - Ignore current traffic data during routing. Note that although the current traffic data is ignored
+ * during routing, the effect of historic traffic on effective road speeds is still incorporated. |
+ * | routeType | String | No | The type of route requested. |
+ * | vehicleLoadType | String | No | 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 can be specified multiple times. This parameter is currently only considered for travelMode=truck. |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Request Body Schema
+ *
+ *
{@code
+ * {
+ * origins: {
+ * coordinates: [
+ * [
+ * double
+ * ]
+ * ]
+ * }
+ * destinations: (recursive schema, see destinations above)
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * formatVersion: String
+ * matrix: [
+ * [
+ * {
+ * statusCode: Integer
+ * response: {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * }
+ * }
+ * ]
+ * ]
+ * summary: {
+ * successfulRoutes: Integer
+ * totalRoutes: Integer
+ * }
+ * }
+ * }
+ *
+ * @param format Desired format of the response. Only `json` format is supported.
+ * @param routeMatrixQuery The matrix of origin and destination coordinates to compute the route distance, travel
+ * time and other summary for each cell of the matrix based on the input parameters. The minimum and the maximum
+ * cell count supported are 1 and **700** for async and **100** for sync respectively. For example, it can be 35
+ * origins and 20 destinations or 25 origins and 25 destinations for async API.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return the {@link SyncPoller} for polling of this object is returned from a successful Route Matrix call.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginRequestRouteMatrix(
+ String format, BinaryData routeMatrixQuery, RequestOptions requestOptions) {
+ return this.beginRequestRouteMatrixAsync(format, routeMatrixQuery, requestOptions).getSyncPoller();
+ }
+
+ /**
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ * If the Matrix Route request was accepted successfully, the Location header in the response contains the URL to
+ * download the results of the request. This status URI looks like the following:
+ *
+ *
``` GET
+ * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
+ *
+ *
4. Client issues a GET request on the download URL obtained in Step 3 to download the results
+ *
+ *
### Download Sync Results When you make a POST request for Route Matrix Sync API, the service returns 200
+ * response code for successful request and a response array. The response body will contain the data and there will
+ * be no possibility to retrieve the results later.
+ *
+ *
### Download Async Results When a request issues a `202 Accepted` response, the request is being processed
+ * using our async pipeline. You will be given a URL to check the progress of your async request in the location
+ * header of the response. This status URI looks like the following: ``` GET
+ * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
+ *
+ *
The URL provided by the location header will return the following responses when a `GET` request is issued.
+ *
+ *
> HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some
+ * time.
+ *
+ *
> HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * formatVersion: String
+ * matrix: [
+ * [
+ * {
+ * statusCode: Integer
+ * response: {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * }
+ * }
+ * ]
+ * ]
+ * summary: {
+ * successfulRoutes: Integer
+ * totalRoutes: Integer
+ * }
+ * }
+ * }
+ *
+ * @param matrixId Matrix id received after the Matrix Route request was accepted successfully.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return this object is returned from a successful Route Matrix call along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getRouteMatrixWithResponseAsync(String matrixId, RequestOptions requestOptions) {
+ return FluxUtil.withContext(
+ context ->
+ service.getRouteMatrix(
+ this.client.getHost(),
+ this.client.getServiceVersion().getVersion(),
+ matrixId,
+ requestOptions,
+ context));
+ }
+
+ /**
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ * If the Matrix Route request was accepted successfully, the Location header in the response contains the URL to
+ * download the results of the request. This status URI looks like the following:
+ *
+ *
``` GET
+ * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
+ *
+ *
4. Client issues a GET request on the download URL obtained in Step 3 to download the results
+ *
+ *
### Download Sync Results When you make a POST request for Route Matrix Sync API, the service returns 200
+ * response code for successful request and a response array. The response body will contain the data and there will
+ * be no possibility to retrieve the results later.
+ *
+ *
### Download Async Results When a request issues a `202 Accepted` response, the request is being processed
+ * using our async pipeline. You will be given a URL to check the progress of your async request in the location
+ * header of the response. This status URI looks like the following: ``` GET
+ * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
+ *
+ *
The URL provided by the location header will return the following responses when a `GET` request is issued.
+ *
+ *
> HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some
+ * time.
+ *
+ *
> HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * formatVersion: String
+ * matrix: [
+ * [
+ * {
+ * statusCode: Integer
+ * response: {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * }
+ * }
+ * ]
+ * ]
+ * summary: {
+ * successfulRoutes: Integer
+ * totalRoutes: Integer
+ * }
+ * }
+ * }
+ *
+ * @param matrixId Matrix id received after the Matrix Route request was accepted successfully.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @param context The context to associate with this operation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return this object is returned from a successful Route Matrix call along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getRouteMatrixWithResponseAsync(
+ String matrixId, RequestOptions requestOptions, Context context) {
+ return service.getRouteMatrix(
+ this.client.getHost(), this.client.getServiceVersion().getVersion(), matrixId, requestOptions, context);
+ }
+
+ /**
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ * If the Matrix Route request was accepted successfully, the Location header in the response contains the URL to
+ * download the results of the request. This status URI looks like the following:
+ *
+ *
``` GET
+ * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
+ *
+ *
4. Client issues a GET request on the download URL obtained in Step 3 to download the results
+ *
+ *
### Download Sync Results When you make a POST request for Route Matrix Sync API, the service returns 200
+ * response code for successful request and a response array. The response body will contain the data and there will
+ * be no possibility to retrieve the results later.
+ *
+ *
### Download Async Results When a request issues a `202 Accepted` response, the request is being processed
+ * using our async pipeline. You will be given a URL to check the progress of your async request in the location
+ * header of the response. This status URI looks like the following: ``` GET
+ * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
+ *
+ *
The URL provided by the location header will return the following responses when a `GET` request is issued.
+ *
+ *
> HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some
+ * time.
+ *
+ *
> HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * formatVersion: String
+ * matrix: [
+ * [
+ * {
+ * statusCode: Integer
+ * response: {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * }
+ * }
+ * ]
+ * ]
+ * summary: {
+ * successfulRoutes: Integer
+ * totalRoutes: Integer
+ * }
+ * }
+ * }
+ *
+ * @param matrixId Matrix id received after the Matrix Route request was accepted successfully.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return the {@link PollerFlux} for polling of this object is returned from a successful Route Matrix call.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginGetRouteMatrixAsync(String matrixId, RequestOptions requestOptions) {
+ return PollerFlux.create(
+ Duration.ofSeconds(1),
+ () -> this.getRouteMatrixWithResponseAsync(matrixId, requestOptions),
+ new DefaultPollingStrategy<>(this.client.getHttpPipeline()),
+ new TypeReferenceBinaryData(),
+ new TypeReferenceBinaryData());
+ }
+
+ /**
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ * If the Matrix Route request was accepted successfully, the Location header in the response contains the URL to
+ * download the results of the request. This status URI looks like the following:
+ *
+ *
``` GET
+ * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
+ *
+ *
4. Client issues a GET request on the download URL obtained in Step 3 to download the results
+ *
+ *
### Download Sync Results When you make a POST request for Route Matrix Sync API, the service returns 200
+ * response code for successful request and a response array. The response body will contain the data and there will
+ * be no possibility to retrieve the results later.
+ *
+ *
### Download Async Results When a request issues a `202 Accepted` response, the request is being processed
+ * using our async pipeline. You will be given a URL to check the progress of your async request in the location
+ * header of the response. This status URI looks like the following: ``` GET
+ * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
+ *
+ *
The URL provided by the location header will return the following responses when a `GET` request is issued.
+ *
+ *
> HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some
+ * time.
+ *
+ *
> HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * formatVersion: String
+ * matrix: [
+ * [
+ * {
+ * statusCode: Integer
+ * response: {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * }
+ * }
+ * ]
+ * ]
+ * summary: {
+ * successfulRoutes: Integer
+ * totalRoutes: Integer
+ * }
+ * }
+ * }
+ *
+ * @param matrixId Matrix id received after the Matrix Route request was accepted successfully.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @param context The context to associate with this operation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return the {@link PollerFlux} for polling of this object is returned from a successful Route Matrix call.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginGetRouteMatrixAsync(
+ String matrixId, RequestOptions requestOptions, Context context) {
+ return PollerFlux.create(
+ Duration.ofSeconds(1),
+ () -> this.getRouteMatrixWithResponseAsync(matrixId, requestOptions, context),
+ new DefaultPollingStrategy<>(this.client.getHttpPipeline()),
+ new TypeReferenceBinaryData(),
+ new TypeReferenceBinaryData());
+ }
+
+ /**
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ * If the Matrix Route request was accepted successfully, the Location header in the response contains the URL to
+ * download the results of the request. This status URI looks like the following:
+ *
+ *
``` GET
+ * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
+ *
+ *
4. Client issues a GET request on the download URL obtained in Step 3 to download the results
+ *
+ *
### Download Sync Results When you make a POST request for Route Matrix Sync API, the service returns 200
+ * response code for successful request and a response array. The response body will contain the data and there will
+ * be no possibility to retrieve the results later.
+ *
+ *
### Download Async Results When a request issues a `202 Accepted` response, the request is being processed
+ * using our async pipeline. You will be given a URL to check the progress of your async request in the location
+ * header of the response. This status URI looks like the following: ``` GET
+ * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
+ *
+ *
The URL provided by the location header will return the following responses when a `GET` request is issued.
+ *
+ *
> HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some
+ * time.
+ *
+ *
> HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * formatVersion: String
+ * matrix: [
+ * [
+ * {
+ * statusCode: Integer
+ * response: {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * }
+ * }
+ * ]
+ * ]
+ * summary: {
+ * successfulRoutes: Integer
+ * totalRoutes: Integer
+ * }
+ * }
+ * }
+ *
+ * @param matrixId Matrix id received after the Matrix Route request was accepted successfully.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return the {@link SyncPoller} for polling of this object is returned from a successful Route Matrix call.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginGetRouteMatrix(String matrixId, RequestOptions requestOptions) {
+ return this.beginGetRouteMatrixAsync(matrixId, requestOptions).getSyncPoller();
+ }
+
+ /**
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ * The Matrix Routing service allows calculation of a matrix of route summaries for a set of routes defined by
+ * origin and destination locations by using an asynchronous (async) or synchronous (sync) POST request. For every
+ * given origin, the service calculates the cost of routing from that origin to every given destination. The set of
+ * origins and the set of destinations can be thought of as the column and row headers of a table and each cell in
+ * the table contains the costs of routing from the origin to the destination for that cell. As an example, let's
+ * say a food delivery company has 20 drivers and they need to find the closest driver to pick up the delivery from
+ * the restaurant. To solve this use case, they can call Matrix Route API.
+ *
+ *
For each route, the travel times and distances are returned. You can use the computed costs to determine which
+ * detailed routes to calculate using the Route Directions API.
+ *
+ *
The maximum size of a matrix for async request is **700** and for sync request it's **100** (the number of
+ * origins multiplied by the number of destinations).
+ *
+ *
### Submit Synchronous Route Matrix Request If your scenario requires synchronous requests and the maximum
+ * size of the matrix is less than or equal to 100, you might want to make synchronous request. The maximum size of
+ * a matrix for this API is **100** (the number of origins multiplied by the number of destinations). With that
+ * constraint in mind, examples of possible matrix dimensions are: 10x10, 6x8, 9x8 (it does not need to be square).
+ *
+ *
``` POST
+ * https://atlas.microsoft.com/route/matrix/sync/json?api-version=1.0&subscription-key={subscription-key} ```
+ *
+ *
### Submit Asynchronous Route Matrix Request The Asynchronous API is appropriate for processing big volumes of
+ * relatively complex routing requests. When you make a request by using async request, by default the service
+ * returns a 202 response code along a redirect URL in the Location field of the response header. This URL should be
+ * checked periodically until the response data or error information is available. If `waitForResults` parameter in
+ * the request is set to true, user will get a 200 response if the request is finished under 120 seconds.
+ *
+ *
The maximum size of a matrix for this API is **700** (the number of origins multiplied by the number of
+ * destinations). With that constraint in mind, examples of possible matrix dimensions are: 50x10, 10x10, 28x25.
+ * 10x70 (it does not need to be square).
+ *
+ *
The asynchronous responses are stored for **14** days. The redirect URL returns a 404 response if used after
+ * the expiration period.
+ *
+ *
``` POST https://atlas.microsoft.com/route/matrix/json?api-version=1.0&subscription-key={subscription-key}
+ * ```
+ *
+ *
Here's a typical sequence of asynchronous operations: 1. Client sends a Route Matrix POST request to Azure
+ * Maps
+ *
+ *
2. The server will respond with one of the following:
+ *
+ *
> HTTP `202 Accepted` - Route Matrix request has been accepted.
+ *
+ *
> HTTP `Error` - There was an error processing your Route Matrix request. This could either be a 400 Bad
+ * Request or any other Error status code.
+ *
+ *
3. If the Matrix Route request was accepted successfully, the Location header in the response contains the URL
+ * to download the results of the request. This status URI looks like the following:
+ *
+ *
``` GET
+ * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
+ *
+ *
4. Client issues a GET request on the download URL obtained in Step 3 to download the results
+ *
+ *
### Download Sync Results When you make a POST request for Route Matrix Sync API, the service returns 200
+ * response code for successful request and a response array. The response body will contain the data and there will
+ * be no possibility to retrieve the results later.
+ *
+ *
### Download Async Results When a request issues a `202 Accepted` response, the request is being processed
+ * using our async pipeline. You will be given a URL to check the progress of your async request in the location
+ * header of the response. This status URI looks like the following: ``` GET
+ * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
+ *
+ *
The URL provided by the location header will return the following responses when a `GET` request is issued.
+ *
+ *
> HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some
+ * time.
+ *
+ *
> HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ * | waitForResults | String | No | Boolean to indicate whether to execute the request synchronously. If set to true, user will get a 200 response if the request is finished under 120 seconds. Otherwise, user will get a 202 response right away. Please refer to the API description for more details on 202 response. **Supported only for async request**. |
+ * | computeTravelTimeFor | String | No | Specifies whether to return additional travel times using different types of traffic information (none, historic, live) as well as the default best-estimate travel time. |
+ * | sectionType | String | No | Specifies which of the section types is reported in the route response. <br><br>For example if sectionType = pedestrian the sections which are suited for pedestrians only are returned. Multiple types can be used. The default sectionType refers to the travelMode input. By default travelMode is set to car |
+ * | arriveAt | String | No | The date and time of arrival at the destination point. It must be specified as a dateTime. When a time zone offset is not specified it will be assumed to be that of the destination point. The arriveAt value must be in the future. The arriveAt parameter cannot be used in conjunction with departAt, minDeviationDistance or minDeviationTime. |
+ * | departAt | String | No | The date and time of departure from the origin point. Departure times apart from now must be specified as a dateTime. When a time zone offset is not specified, it will be assumed to be that of the origin point. The departAt value must be in the future in the date-time format (1996-12-19T16:39:57-08:00). |
+ * | vehicleAxleWeight | String | No | Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per axle are not considered. |
+ * | vehicleLength | String | No | Length of the vehicle in meters. A value of 0 means that length restrictions are not considered. |
+ * | vehicleHeight | String | No | Height of the vehicle in meters. A value of 0 means that height restrictions are not considered. |
+ * | vehicleWidth | String | No | Width of the vehicle in meters. A value of 0 means that width restrictions are not considered. |
+ * | vehicleMaxSpeed | String | No | 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.
+ *
+ * * A value of 0 means that an appropriate value for the vehicle will be determined and applied during route planning.
+ *
+ * * A 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. |
+ * | vehicleWeight | String | No | Weight of the vehicle in kilograms. |
+ * | windingness | String | No | Level of turns for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | hilliness | String | No | Degree of hilliness for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | travelMode | String | No | The mode of travel for the requested route. If not defined, default is 'car'. Note that the requested travelMode may not be available for the entire route. Where the requested travelMode is not available for a particular section, the travelMode element of the response for that section will be "other". Note that travel modes bus, motorcycle, taxi and van are BETA functionality. Full restriction data is not available in all areas. In **calculateReachableRange** requests, the values bicycle and pedestrian must not be used. |
+ * | avoid | String | No | Specifies something that the route calculation should try to avoid when determining the route. Can be specified multiple times in one request, for example, '&avoid=motorways&avoid=tollRoads&avoid=ferries'. In calculateReachableRange requests, the value alreadyUsedRoads must not be used. |
+ * | traffic | String | No | Possible values:
+ * * true - Do consider all available traffic information during routing
+ * * false - Ignore current traffic data during routing. Note that although the current traffic data is ignored
+ * during routing, the effect of historic traffic on effective road speeds is still incorporated. |
+ * | routeType | String | No | The type of route requested. |
+ * | vehicleLoadType | String | No | 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 can be specified multiple times. This parameter is currently only considered for travelMode=truck. |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Request Body Schema
+ *
+ *
{@code
+ * {
+ * origins: {
+ * coordinates: [
+ * [
+ * double
+ * ]
+ * ]
+ * }
+ * destinations: (recursive schema, see destinations above)
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * formatVersion: String
+ * matrix: [
+ * [
+ * {
+ * statusCode: Integer
+ * response: {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * }
+ * }
+ * ]
+ * ]
+ * summary: {
+ * successfulRoutes: Integer
+ * totalRoutes: Integer
+ * }
+ * }
+ * }
+ *
+ * @param format Desired format of the response. Only `json` format is supported.
+ * @param routeMatrixQuery The matrix of origin and destination coordinates to compute the route distance, travel
+ * time and other summary for each cell of the matrix based on the input parameters. The minimum and the maximum
+ * cell count supported are 1 and **700** for async and **100** for sync respectively. For example, it can be 35
+ * origins and 20 destinations or 25 origins and 25 destinations for async API.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return this object is returned from a successful Route Matrix call along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> requestRouteMatrixSyncWithResponseAsync(
+ String format, BinaryData routeMatrixQuery, RequestOptions requestOptions) {
+ return FluxUtil.withContext(
+ context ->
+ service.requestRouteMatrixSync(
+ this.client.getHost(),
+ this.client.getServiceVersion().getVersion(),
+ format,
+ routeMatrixQuery,
+ requestOptions,
+ context));
+ }
+
+ /**
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ * The Matrix Routing service allows calculation of a matrix of route summaries for a set of routes defined by
+ * origin and destination locations by using an asynchronous (async) or synchronous (sync) POST request. For every
+ * given origin, the service calculates the cost of routing from that origin to every given destination. The set of
+ * origins and the set of destinations can be thought of as the column and row headers of a table and each cell in
+ * the table contains the costs of routing from the origin to the destination for that cell. As an example, let's
+ * say a food delivery company has 20 drivers and they need to find the closest driver to pick up the delivery from
+ * the restaurant. To solve this use case, they can call Matrix Route API.
+ *
+ *
For each route, the travel times and distances are returned. You can use the computed costs to determine which
+ * detailed routes to calculate using the Route Directions API.
+ *
+ *
The maximum size of a matrix for async request is **700** and for sync request it's **100** (the number of
+ * origins multiplied by the number of destinations).
+ *
+ *
### Submit Synchronous Route Matrix Request If your scenario requires synchronous requests and the maximum
+ * size of the matrix is less than or equal to 100, you might want to make synchronous request. The maximum size of
+ * a matrix for this API is **100** (the number of origins multiplied by the number of destinations). With that
+ * constraint in mind, examples of possible matrix dimensions are: 10x10, 6x8, 9x8 (it does not need to be square).
+ *
+ *
``` POST
+ * https://atlas.microsoft.com/route/matrix/sync/json?api-version=1.0&subscription-key={subscription-key} ```
+ *
+ *
### Submit Asynchronous Route Matrix Request The Asynchronous API is appropriate for processing big volumes of
+ * relatively complex routing requests. When you make a request by using async request, by default the service
+ * returns a 202 response code along a redirect URL in the Location field of the response header. This URL should be
+ * checked periodically until the response data or error information is available. If `waitForResults` parameter in
+ * the request is set to true, user will get a 200 response if the request is finished under 120 seconds.
+ *
+ *
The maximum size of a matrix for this API is **700** (the number of origins multiplied by the number of
+ * destinations). With that constraint in mind, examples of possible matrix dimensions are: 50x10, 10x10, 28x25.
+ * 10x70 (it does not need to be square).
+ *
+ *
The asynchronous responses are stored for **14** days. The redirect URL returns a 404 response if used after
+ * the expiration period.
+ *
+ *
``` POST https://atlas.microsoft.com/route/matrix/json?api-version=1.0&subscription-key={subscription-key}
+ * ```
+ *
+ *
Here's a typical sequence of asynchronous operations: 1. Client sends a Route Matrix POST request to Azure
+ * Maps
+ *
+ *
2. The server will respond with one of the following:
+ *
+ *
> HTTP `202 Accepted` - Route Matrix request has been accepted.
+ *
+ *
> HTTP `Error` - There was an error processing your Route Matrix request. This could either be a 400 Bad
+ * Request or any other Error status code.
+ *
+ *
3. If the Matrix Route request was accepted successfully, the Location header in the response contains the URL
+ * to download the results of the request. This status URI looks like the following:
+ *
+ *
``` GET
+ * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
+ *
+ *
4. Client issues a GET request on the download URL obtained in Step 3 to download the results
+ *
+ *
### Download Sync Results When you make a POST request for Route Matrix Sync API, the service returns 200
+ * response code for successful request and a response array. The response body will contain the data and there will
+ * be no possibility to retrieve the results later.
+ *
+ *
### Download Async Results When a request issues a `202 Accepted` response, the request is being processed
+ * using our async pipeline. You will be given a URL to check the progress of your async request in the location
+ * header of the response. This status URI looks like the following: ``` GET
+ * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
+ *
+ *
The URL provided by the location header will return the following responses when a `GET` request is issued.
+ *
+ *
> HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some
+ * time.
+ *
+ *
> HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ * | waitForResults | String | No | Boolean to indicate whether to execute the request synchronously. If set to true, user will get a 200 response if the request is finished under 120 seconds. Otherwise, user will get a 202 response right away. Please refer to the API description for more details on 202 response. **Supported only for async request**. |
+ * | computeTravelTimeFor | String | No | Specifies whether to return additional travel times using different types of traffic information (none, historic, live) as well as the default best-estimate travel time. |
+ * | sectionType | String | No | Specifies which of the section types is reported in the route response. <br><br>For example if sectionType = pedestrian the sections which are suited for pedestrians only are returned. Multiple types can be used. The default sectionType refers to the travelMode input. By default travelMode is set to car |
+ * | arriveAt | String | No | The date and time of arrival at the destination point. It must be specified as a dateTime. When a time zone offset is not specified it will be assumed to be that of the destination point. The arriveAt value must be in the future. The arriveAt parameter cannot be used in conjunction with departAt, minDeviationDistance or minDeviationTime. |
+ * | departAt | String | No | The date and time of departure from the origin point. Departure times apart from now must be specified as a dateTime. When a time zone offset is not specified, it will be assumed to be that of the origin point. The departAt value must be in the future in the date-time format (1996-12-19T16:39:57-08:00). |
+ * | vehicleAxleWeight | String | No | Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per axle are not considered. |
+ * | vehicleLength | String | No | Length of the vehicle in meters. A value of 0 means that length restrictions are not considered. |
+ * | vehicleHeight | String | No | Height of the vehicle in meters. A value of 0 means that height restrictions are not considered. |
+ * | vehicleWidth | String | No | Width of the vehicle in meters. A value of 0 means that width restrictions are not considered. |
+ * | vehicleMaxSpeed | String | No | 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.
+ *
+ * * A value of 0 means that an appropriate value for the vehicle will be determined and applied during route planning.
+ *
+ * * A 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. |
+ * | vehicleWeight | String | No | Weight of the vehicle in kilograms. |
+ * | windingness | String | No | Level of turns for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | hilliness | String | No | Degree of hilliness for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | travelMode | String | No | The mode of travel for the requested route. If not defined, default is 'car'. Note that the requested travelMode may not be available for the entire route. Where the requested travelMode is not available for a particular section, the travelMode element of the response for that section will be "other". Note that travel modes bus, motorcycle, taxi and van are BETA functionality. Full restriction data is not available in all areas. In **calculateReachableRange** requests, the values bicycle and pedestrian must not be used. |
+ * | avoid | String | No | Specifies something that the route calculation should try to avoid when determining the route. Can be specified multiple times in one request, for example, '&avoid=motorways&avoid=tollRoads&avoid=ferries'. In calculateReachableRange requests, the value alreadyUsedRoads must not be used. |
+ * | traffic | String | No | Possible values:
+ * * true - Do consider all available traffic information during routing
+ * * false - Ignore current traffic data during routing. Note that although the current traffic data is ignored
+ * during routing, the effect of historic traffic on effective road speeds is still incorporated. |
+ * | routeType | String | No | The type of route requested. |
+ * | vehicleLoadType | String | No | 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 can be specified multiple times. This parameter is currently only considered for travelMode=truck. |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Request Body Schema
+ *
+ *
{@code
+ * {
+ * origins: {
+ * coordinates: [
+ * [
+ * double
+ * ]
+ * ]
+ * }
+ * destinations: (recursive schema, see destinations above)
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * formatVersion: String
+ * matrix: [
+ * [
+ * {
+ * statusCode: Integer
+ * response: {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * }
+ * }
+ * ]
+ * ]
+ * summary: {
+ * successfulRoutes: Integer
+ * totalRoutes: Integer
+ * }
+ * }
+ * }
+ *
+ * @param format Desired format of the response. Only `json` format is supported.
+ * @param routeMatrixQuery The matrix of origin and destination coordinates to compute the route distance, travel
+ * time and other summary for each cell of the matrix based on the input parameters. The minimum and the maximum
+ * cell count supported are 1 and **700** for async and **100** for sync respectively. For example, it can be 35
+ * origins and 20 destinations or 25 origins and 25 destinations for async API.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @param context The context to associate with this operation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return this object is returned from a successful Route Matrix call along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> requestRouteMatrixSyncWithResponseAsync(
+ String format, BinaryData routeMatrixQuery, RequestOptions requestOptions, Context context) {
+ return service.requestRouteMatrixSync(
+ this.client.getHost(),
+ this.client.getServiceVersion().getVersion(),
+ format,
+ routeMatrixQuery,
+ requestOptions,
+ context);
+ }
+
+ /**
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ * The Matrix Routing service allows calculation of a matrix of route summaries for a set of routes defined by
+ * origin and destination locations by using an asynchronous (async) or synchronous (sync) POST request. For every
+ * given origin, the service calculates the cost of routing from that origin to every given destination. The set of
+ * origins and the set of destinations can be thought of as the column and row headers of a table and each cell in
+ * the table contains the costs of routing from the origin to the destination for that cell. As an example, let's
+ * say a food delivery company has 20 drivers and they need to find the closest driver to pick up the delivery from
+ * the restaurant. To solve this use case, they can call Matrix Route API.
+ *
+ *
For each route, the travel times and distances are returned. You can use the computed costs to determine which
+ * detailed routes to calculate using the Route Directions API.
+ *
+ *
The maximum size of a matrix for async request is **700** and for sync request it's **100** (the number of
+ * origins multiplied by the number of destinations).
+ *
+ *
### Submit Synchronous Route Matrix Request If your scenario requires synchronous requests and the maximum
+ * size of the matrix is less than or equal to 100, you might want to make synchronous request. The maximum size of
+ * a matrix for this API is **100** (the number of origins multiplied by the number of destinations). With that
+ * constraint in mind, examples of possible matrix dimensions are: 10x10, 6x8, 9x8 (it does not need to be square).
+ *
+ *
``` POST
+ * https://atlas.microsoft.com/route/matrix/sync/json?api-version=1.0&subscription-key={subscription-key} ```
+ *
+ *
### Submit Asynchronous Route Matrix Request The Asynchronous API is appropriate for processing big volumes of
+ * relatively complex routing requests. When you make a request by using async request, by default the service
+ * returns a 202 response code along a redirect URL in the Location field of the response header. This URL should be
+ * checked periodically until the response data or error information is available. If `waitForResults` parameter in
+ * the request is set to true, user will get a 200 response if the request is finished under 120 seconds.
+ *
+ *
The maximum size of a matrix for this API is **700** (the number of origins multiplied by the number of
+ * destinations). With that constraint in mind, examples of possible matrix dimensions are: 50x10, 10x10, 28x25.
+ * 10x70 (it does not need to be square).
+ *
+ *
The asynchronous responses are stored for **14** days. The redirect URL returns a 404 response if used after
+ * the expiration period.
+ *
+ *
``` POST https://atlas.microsoft.com/route/matrix/json?api-version=1.0&subscription-key={subscription-key}
+ * ```
+ *
+ *
Here's a typical sequence of asynchronous operations: 1. Client sends a Route Matrix POST request to Azure
+ * Maps
+ *
+ *
2. The server will respond with one of the following:
+ *
+ *
> HTTP `202 Accepted` - Route Matrix request has been accepted.
+ *
+ *
> HTTP `Error` - There was an error processing your Route Matrix request. This could either be a 400 Bad
+ * Request or any other Error status code.
+ *
+ *
3. If the Matrix Route request was accepted successfully, the Location header in the response contains the URL
+ * to download the results of the request. This status URI looks like the following:
+ *
+ *
``` GET
+ * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
+ *
+ *
4. Client issues a GET request on the download URL obtained in Step 3 to download the results
+ *
+ *
### Download Sync Results When you make a POST request for Route Matrix Sync API, the service returns 200
+ * response code for successful request and a response array. The response body will contain the data and there will
+ * be no possibility to retrieve the results later.
+ *
+ *
### Download Async Results When a request issues a `202 Accepted` response, the request is being processed
+ * using our async pipeline. You will be given a URL to check the progress of your async request in the location
+ * header of the response. This status URI looks like the following: ``` GET
+ * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
+ *
+ *
The URL provided by the location header will return the following responses when a `GET` request is issued.
+ *
+ *
> HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some
+ * time.
+ *
+ *
> HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ * | waitForResults | String | No | Boolean to indicate whether to execute the request synchronously. If set to true, user will get a 200 response if the request is finished under 120 seconds. Otherwise, user will get a 202 response right away. Please refer to the API description for more details on 202 response. **Supported only for async request**. |
+ * | computeTravelTimeFor | String | No | Specifies whether to return additional travel times using different types of traffic information (none, historic, live) as well as the default best-estimate travel time. |
+ * | sectionType | String | No | Specifies which of the section types is reported in the route response. <br><br>For example if sectionType = pedestrian the sections which are suited for pedestrians only are returned. Multiple types can be used. The default sectionType refers to the travelMode input. By default travelMode is set to car |
+ * | arriveAt | String | No | The date and time of arrival at the destination point. It must be specified as a dateTime. When a time zone offset is not specified it will be assumed to be that of the destination point. The arriveAt value must be in the future. The arriveAt parameter cannot be used in conjunction with departAt, minDeviationDistance or minDeviationTime. |
+ * | departAt | String | No | The date and time of departure from the origin point. Departure times apart from now must be specified as a dateTime. When a time zone offset is not specified, it will be assumed to be that of the origin point. The departAt value must be in the future in the date-time format (1996-12-19T16:39:57-08:00). |
+ * | vehicleAxleWeight | String | No | Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per axle are not considered. |
+ * | vehicleLength | String | No | Length of the vehicle in meters. A value of 0 means that length restrictions are not considered. |
+ * | vehicleHeight | String | No | Height of the vehicle in meters. A value of 0 means that height restrictions are not considered. |
+ * | vehicleWidth | String | No | Width of the vehicle in meters. A value of 0 means that width restrictions are not considered. |
+ * | vehicleMaxSpeed | String | No | 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.
+ *
+ * * A value of 0 means that an appropriate value for the vehicle will be determined and applied during route planning.
+ *
+ * * A 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. |
+ * | vehicleWeight | String | No | Weight of the vehicle in kilograms. |
+ * | windingness | String | No | Level of turns for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | hilliness | String | No | Degree of hilliness for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | travelMode | String | No | The mode of travel for the requested route. If not defined, default is 'car'. Note that the requested travelMode may not be available for the entire route. Where the requested travelMode is not available for a particular section, the travelMode element of the response for that section will be "other". Note that travel modes bus, motorcycle, taxi and van are BETA functionality. Full restriction data is not available in all areas. In **calculateReachableRange** requests, the values bicycle and pedestrian must not be used. |
+ * | avoid | String | No | Specifies something that the route calculation should try to avoid when determining the route. Can be specified multiple times in one request, for example, '&avoid=motorways&avoid=tollRoads&avoid=ferries'. In calculateReachableRange requests, the value alreadyUsedRoads must not be used. |
+ * | traffic | String | No | Possible values:
+ * * true - Do consider all available traffic information during routing
+ * * false - Ignore current traffic data during routing. Note that although the current traffic data is ignored
+ * during routing, the effect of historic traffic on effective road speeds is still incorporated. |
+ * | routeType | String | No | The type of route requested. |
+ * | vehicleLoadType | String | No | 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 can be specified multiple times. This parameter is currently only considered for travelMode=truck. |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Request Body Schema
+ *
+ *
{@code
+ * {
+ * origins: {
+ * coordinates: [
+ * [
+ * double
+ * ]
+ * ]
+ * }
+ * destinations: (recursive schema, see destinations above)
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * formatVersion: String
+ * matrix: [
+ * [
+ * {
+ * statusCode: Integer
+ * response: {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * }
+ * }
+ * ]
+ * ]
+ * summary: {
+ * successfulRoutes: Integer
+ * totalRoutes: Integer
+ * }
+ * }
+ * }
+ *
+ * @param format Desired format of the response. Only `json` format is supported.
+ * @param routeMatrixQuery The matrix of origin and destination coordinates to compute the route distance, travel
+ * time and other summary for each cell of the matrix based on the input parameters. The minimum and the maximum
+ * cell count supported are 1 and **700** for async and **100** for sync respectively. For example, it can be 35
+ * origins and 20 destinations or 25 origins and 25 destinations for async API.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return this object is returned from a successful Route Matrix call along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response requestRouteMatrixSyncWithResponse(
+ String format, BinaryData routeMatrixQuery, RequestOptions requestOptions) {
+ return requestRouteMatrixSyncWithResponseAsync(format, routeMatrixQuery, requestOptions).block();
+ }
+
+ /**
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ * Returns a route between an origin and a destination, passing through waypoints if they are specified. The
+ * route will take into account factors such as current traffic and the typical road speeds on the requested day of
+ * the week and time of day.
+ *
+ *
Information returned includes the distance, estimated travel time, and a representation of the route geometry.
+ * Additional routing information such as optimized waypoint order or turn by turn instructions is also available,
+ * depending on the options selected.
+ *
+ *
Routing service provides a set of parameters for a detailed description of vehicle-specific Consumption Model.
+ * Please check [Consumption Model](https://docs.microsoft.com/azure/azure-maps/consumption-model) for detailed
+ * explanation of the concepts and parameters involved.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ * | query | String | Yes | The Coordinates through which the route is calculated, delimited by a colon. A minimum of two coordinates is required. The first one is the origin and the last is the destination of the route. Optional coordinates in-between act as WayPoints in the route. You can pass up to 150 WayPoints. |
+ * | maxAlternatives | String | No | Number of desired alternative routes to be calculated. Default: 0, minimum: 0 and maximum: 5 |
+ * | alternativeType | String | No | Controls the optimality, with respect to the given planning criteria, of the calculated alternatives compared to the reference route. |
+ * | minDeviationDistance | String | No | All alternative routes returned will follow the reference route (see section POST Requests) from the origin point of the calculateRoute request for at least this number of meters. Can only be used when reconstructing a route. The minDeviationDistance parameter cannot be used in conjunction with arriveAt |
+ * | arriveAt | String | No | The date and time of arrival at the destination point. It must be specified as a dateTime. When a time zone offset is not specified it will be assumed to be that of the destination point. The arriveAt value must be in the future. The arriveAt parameter cannot be used in conjunction with departAt, minDeviationDistance or minDeviationTime. |
+ * | departAt | String | No | The date and time of departure from the origin point. Departure times apart from now must be specified as a dateTime. When a time zone offset is not specified, it will be assumed to be that of the origin point. The departAt value must be in the future in the date-time format (1996-12-19T16:39:57-08:00). |
+ * | minDeviationTime | String | No | All alternative routes returned will follow the reference route (see section POST Requests) from the origin point of the calculateRoute request for at least this number of seconds. Can only be used when reconstructing a route. The minDeviationTime parameter cannot be used in conjunction with arriveAt. Default value is 0. Setting )minDeviationTime_ to a value greater than zero has the following consequences:
+ * - The origin point of the _calculateRoute_ Request must be on
+ * (or very near) the input reference route.
+ * - If this is not the case, an error is returned.
+ * - However, the origin point does not need to be at the beginning
+ * of the input reference route (it can be thought of as the current
+ * vehicle position on the reference route).
+ * - The reference route, returned as the first route in the _calculateRoute_
+ * Response, will start at the origin point specified in the _calculateRoute_
+ * Request. The initial part of the input reference route up until the origin
+ * point will be excluded from the Response.
+ * - The values of _minDeviationDistance_ and _minDeviationTime_ determine
+ * how far alternative routes will be guaranteed to follow the reference
+ * route from the origin point onwards.
+ * - The route must use _departAt_.
+ * - The _vehicleHeading_ is ignored. |
+ * | instructionsType | String | No | If specified, guidance instructions will be returned. Note that the instructionsType parameter cannot be used in conjunction with routeRepresentation=none |
+ * | language | String | No | The language parameter determines the language of the guidance messages. Proper nouns (the names of streets, plazas, etc.) are returned in the specified language, or if that is not available, they are returned in an available language that is close to it. Allowed values are (a subset of) the IETF language tags. The currently supported languages are listed in the [Supported languages section](https://docs.microsoft.com/azure/azure-maps/supported-languages).
+ *
+ * Default value: en-GB |
+ * | computeBestOrder | String | No | Re-order the route waypoints using a fast heuristic algorithm to reduce the route length. Yields best results when used in conjunction with routeType _shortest_. Notice that origin and destination are excluded from the optimized waypoint indices. To include origin and destination in the response, please increase all the indices by 1 to account for the origin, and then add the destination as the final index. Possible values are true or false. True computes a better order if possible, but is not allowed to be used in conjunction with maxAlternatives value greater than 0 or in conjunction with circle waypoints. False will use the locations in the given order and not allowed to be used in conjunction with routeRepresentation _none_. |
+ * | routeRepresentation | String | No | Specifies the representation of the set of routes provided as response. This parameter value can only be used in conjunction with computeBestOrder=true. |
+ * | computeTravelTimeFor | String | No | Specifies whether to return additional travel times using different types of traffic information (none, historic, live) as well as the default best-estimate travel time. |
+ * | vehicleHeading | String | No | The 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 |
+ * | report | String | No | Specifies which data should be reported for diagnosis purposes. The only possible value is _effectiveSettings_. Reports the effective parameters or data used when calling the API. In the case of defaulted parameters the default will be reflected where the parameter was not specified by the caller. |
+ * | sectionType | String | No | Specifies which of the section types is reported in the route response. <br><br>For example if sectionType = pedestrian the sections which are suited for pedestrians only are returned. Multiple types can be used. The default sectionType refers to the travelMode input. By default travelMode is set to car |
+ * | vehicleAxleWeight | String | No | Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per axle are not considered. |
+ * | vehicleWidth | String | No | Width of the vehicle in meters. A value of 0 means that width restrictions are not considered. |
+ * | vehicleHeight | String | No | Height of the vehicle in meters. A value of 0 means that height restrictions are not considered. |
+ * | vehicleLength | String | No | Length of the vehicle in meters. A value of 0 means that length restrictions are not considered. |
+ * | vehicleMaxSpeed | String | No | 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.
+ *
+ * * A value of 0 means that an appropriate value for the vehicle will be determined and applied during route planning.
+ *
+ * * A 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. |
+ * | vehicleWeight | String | No | Weight of the vehicle in kilograms.
+ *
+ * * It is mandatory if any of the *Efficiency parameters are set.
+ *
+ * * It must be strictly positive when used in the context of the Consumption Model. Weight restrictions are considered.
+ *
+ * * If no detailed **Consumption Model** is specified and the value of **vehicleWeight** is non-zero, then weight restrictions are considered.
+ *
+ * * In all other cases, this parameter is ignored.
+ *
+ * Sensible Values : for **Combustion Model** : 1600, for **Electric Model** : 1900 |
+ * | vehicleCommercial | String | No | Whether the vehicle is used for commercial purposes. Commercial vehicles may not be allowed to drive on some roads. |
+ * | windingness | String | No | Level of turns for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | hilliness | String | No | Degree of hilliness for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | travelMode | String | No | The mode of travel for the requested route. If not defined, default is 'car'. Note that the requested travelMode may not be available for the entire route. Where the requested travelMode is not available for a particular section, the travelMode element of the response for that section will be "other". Note that travel modes bus, motorcycle, taxi and van are BETA functionality. Full restriction data is not available in all areas. In **calculateReachableRange** requests, the values bicycle and pedestrian must not be used. |
+ * | avoid | String | No | Specifies something that the route calculation should try to avoid when determining the route. Can be specified multiple times in one request, for example, '&avoid=motorways&avoid=tollRoads&avoid=ferries'. In calculateReachableRange requests, the value alreadyUsedRoads must not be used. |
+ * | traffic | String | No | Possible values:
+ * * true - Do consider all available traffic information during routing
+ * * false - Ignore current traffic data during routing. Note that although the current traffic data is ignored
+ * during routing, the effect of historic traffic on effective road speeds is still incorporated. |
+ * | routeType | String | No | The type of route requested. |
+ * | vehicleLoadType | String | No | 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 can be specified multiple times. This parameter is currently only considered for travelMode=truck. |
+ * | vehicleEngineType | String | No | Engine type of the vehicle. When a detailed Consumption Model is specified, it must be consistent with the value of **vehicleEngineType**. |
+ * | constantSpeedConsumptionInLitersPerHundredkm | String | No |
+ *
+ * Specifies the speed-dependent component of consumption.
+ *
+ * Provided as an unordered list of colon-delimited speed & consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
+ *
+ * * by linear interpolation, if the given speed lies in between two speeds in the list
+ *
+ * * by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list
+ *
+ * The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing.
+ *
+ * Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates.
+ *
+ * Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.
+ *
+ * The valid range for the consumption values(expressed in l/100km) is between 0.01 and 100000.0.
+ *
+ * Sensible Values : 50,6.3:130,11.5
+ *
+ * **Note** : This parameter is required for **The Combustion Consumption Model**. |
+ * | currentFuelInLiters | String | No | Specifies the current supply of fuel in liters.
+ *
+ * Sensible Values : 55 |
+ * | auxiliaryPowerInLitersPerHour | String | No | Specifies the amount of fuel consumed for sustaining auxiliary systems of the vehicle, in liters per hour.
+ *
+ * It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
+ *
+ * Sensible Values : 0.2 |
+ * | fuelEnergyDensityInMJoulesPerLiter | String | No | Specifies the amount of chemical energy stored in one liter of fuel in megajoules (MJ). It is used in conjunction with the ***Efficiency** parameters for conversions between saved or consumed energy and fuel. For example, energy density is 34.2 MJ/l for gasoline, and 35.8 MJ/l for Diesel fuel.
+ *
+ * This parameter is required if any ***Efficiency** parameter is set.
+ *
+ * Sensible Values : 34.2 |
+ * | accelerationEfficiency | String | No | Specifies the efficiency of converting chemical energy stored in fuel to kinetic energy when the vehicle accelerates _(i.e. KineticEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed_ is obtained by converting consumed fuel to chemical energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **decelerationEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**decelerationEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.33, for **Electric Model** : 0.66 |
+ * | decelerationEfficiency | String | No | Specifies the efficiency of converting kinetic energy to saved (not consumed) fuel when the vehicle decelerates _(i.e. ChemicalEnergySaved/KineticEnergyLost). ChemicalEnergySaved_ is obtained by converting saved (not consumed) fuel to energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **accelerationEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**accelerationEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.83, for **Electric Model** : 0.91 |
+ * | uphillEfficiency | String | No | Specifies the efficiency of converting chemical energy stored in fuel to potential energy when the vehicle gains elevation _(i.e. PotentialEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed_ is obtained by converting consumed fuel to chemical energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **downhillEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**downhillEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.27, for **Electric Model** : 0.74 |
+ * | downhillEfficiency | String | No | Specifies the efficiency of converting potential energy to saved (not consumed) fuel when the vehicle loses elevation _(i.e. ChemicalEnergySaved/PotentialEnergyLost). ChemicalEnergySaved_ is obtained by converting saved (not consumed) fuel to energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **uphillEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**uphillEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.51, for **Electric Model** : 0.73 |
+ * | constantSpeedConsumptionInkWhPerHundredkm | String | No | Specifies the speed-dependent component of consumption.
+ *
+ * Provided as an unordered list of speed/consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
+ *
+ * * by linear interpolation, if the given speed lies in between two speeds in the list
+ *
+ * * by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list
+ *
+ * The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing.
+ *
+ * Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates.
+ *
+ * Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.
+ *
+ * The valid range for the consumption values(expressed in kWh/100km) is between 0.01 and 100000.0.
+ *
+ * Sensible Values : 50,8.2:130,21.3
+ *
+ * This parameter is required for **Electric consumption model**. |
+ * | currentChargeInkWh | String | No | Specifies the current electric energy supply in kilowatt hours (kWh).
+ *
+ * This parameter co-exists with **maxChargeInkWh** parameter.
+ *
+ * The range of values allowed are 0.0 to **maxChargeInkWh**.
+ *
+ * Sensible Values : 43 |
+ * | maxChargeInkWh | String | No | Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in the vehicle's battery.
+ *
+ * This parameter co-exists with **currentChargeInkWh** parameter.
+ *
+ * Minimum value has to be greater than or equal to **currentChargeInkWh**.
+ *
+ * Sensible Values : 85 |
+ * | auxiliaryPowerInkW | String | No | Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts (kW).
+ *
+ * It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
+ *
+ * Sensible Values : 1.7 |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * formatVersion: String
+ * routes: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * }
+ * legs: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * points: [
+ * {
+ * latitude: Double
+ * longitude: Double
+ * }
+ * ]
+ * }
+ * ]
+ * sections: [
+ * {
+ * startPointIndex: Integer
+ * endPointIndex: Integer
+ * sectionType: String(CAR_TRAIN/COUNTRY/FERRY/MOTORWAY/PEDESTRIAN/TOLL_ROAD/TOLL_VIGNETTE/TRAFFIC/TRAVEL_MODE/TUNNEL/CARPOOL/URBAN)
+ * travelMode: String(car/truck/taxi/bus/van/motorcycle/bicycle/pedestrian/other)
+ * simpleCategory: String(JAM/ROAD_WORK/ROAD_CLOSURE/OTHER)
+ * effectiveSpeedInKmh: Integer
+ * delayInSeconds: Integer
+ * delayMagnitude: String(0/1/2/3/4)
+ * tec: {
+ * effectCode: Integer
+ * causes: [
+ * {
+ * mainCauseCode: Integer
+ * subCauseCode: Integer
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * guidance: {
+ * instructions: [
+ * {
+ * routeOffsetInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * point: (recursive schema, see point above)
+ * pointIndex: Integer
+ * instructionType: String(TURN/ROAD_CHANGE/LOCATION_DEPARTURE/LOCATION_ARRIVAL/DIRECTION_INFO/LOCATION_WAYPOINT)
+ * roadNumbers: [
+ * String
+ * ]
+ * exitNumber: String
+ * street: String
+ * signpostText: String
+ * countryCode: String
+ * stateCode: String
+ * junctionType: String(REGULAR/ROUNDABOUT/BIFURCATION)
+ * turnAngleInDegrees: Integer
+ * roundaboutExitNumber: String
+ * possibleCombineWithNext: Boolean
+ * drivingSide: String(LEFT/RIGHT)
+ * maneuver: String(ARRIVE/ARRIVE_LEFT/ARRIVE_RIGHT/DEPART/STRAIGHT/KEEP_RIGHT/BEAR_RIGHT/TURN_RIGHT/SHARP_RIGHT/KEEP_LEFT/BEAR_LEFT/TURN_LEFT/SHARP_LEFT/MAKE_UTURN/ENTER_MOTORWAY/ENTER_FREEWAY/ENTER_HIGHWAY/TAKE_EXIT/MOTORWAY_EXIT_LEFT/MOTORWAY_EXIT_RIGHT/TAKE_FERRY/ROUNDABOUT_CROSS/ROUNDABOUT_RIGHT/ROUNDABOUT_LEFT/ROUNDABOUT_BACK/TRY_MAKE_UTURN/FOLLOW/SWITCH_PARALLEL_ROAD/SWITCH_MAIN_ROAD/ENTRANCE_RAMP/WAYPOINT_LEFT/WAYPOINT_RIGHT/WAYPOINT_REACHED)
+ * message: String
+ * combinedMessage: String
+ * }
+ * ]
+ * instructionGroups: [
+ * {
+ * firstInstructionIndex: Integer
+ * lastInstructionIndex: Integer
+ * groupLengthInMeters: Integer
+ * groupMessage: String
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * optimizedWaypoints: [
+ * {
+ * providedIndex: Integer
+ * optimizedIndex: Integer
+ * }
+ * ]
+ * report: {
+ * effectiveSettings: [
+ * {
+ * key: String
+ * value: String
+ * }
+ * ]
+ * }
+ * }
+ * }
+ *
+ * @param format Desired format of the response. Value can be either _json_ or _xml_.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return this object is returned from a successful Route Directions call along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getRouteDirectionsWithResponseAsync(
+ String format, RequestOptions requestOptions) {
+ return FluxUtil.withContext(
+ context ->
+ service.getRouteDirections(
+ this.client.getHost(),
+ this.client.getServiceVersion().getVersion(),
+ format,
+ requestOptions,
+ context));
+ }
+
+ /**
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ * Returns a route between an origin and a destination, passing through waypoints if they are specified. The
+ * route will take into account factors such as current traffic and the typical road speeds on the requested day of
+ * the week and time of day.
+ *
+ *
Information returned includes the distance, estimated travel time, and a representation of the route geometry.
+ * Additional routing information such as optimized waypoint order or turn by turn instructions is also available,
+ * depending on the options selected.
+ *
+ *
Routing service provides a set of parameters for a detailed description of vehicle-specific Consumption Model.
+ * Please check [Consumption Model](https://docs.microsoft.com/azure/azure-maps/consumption-model) for detailed
+ * explanation of the concepts and parameters involved.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ * | query | String | Yes | The Coordinates through which the route is calculated, delimited by a colon. A minimum of two coordinates is required. The first one is the origin and the last is the destination of the route. Optional coordinates in-between act as WayPoints in the route. You can pass up to 150 WayPoints. |
+ * | maxAlternatives | String | No | Number of desired alternative routes to be calculated. Default: 0, minimum: 0 and maximum: 5 |
+ * | alternativeType | String | No | Controls the optimality, with respect to the given planning criteria, of the calculated alternatives compared to the reference route. |
+ * | minDeviationDistance | String | No | All alternative routes returned will follow the reference route (see section POST Requests) from the origin point of the calculateRoute request for at least this number of meters. Can only be used when reconstructing a route. The minDeviationDistance parameter cannot be used in conjunction with arriveAt |
+ * | arriveAt | String | No | The date and time of arrival at the destination point. It must be specified as a dateTime. When a time zone offset is not specified it will be assumed to be that of the destination point. The arriveAt value must be in the future. The arriveAt parameter cannot be used in conjunction with departAt, minDeviationDistance or minDeviationTime. |
+ * | departAt | String | No | The date and time of departure from the origin point. Departure times apart from now must be specified as a dateTime. When a time zone offset is not specified, it will be assumed to be that of the origin point. The departAt value must be in the future in the date-time format (1996-12-19T16:39:57-08:00). |
+ * | minDeviationTime | String | No | All alternative routes returned will follow the reference route (see section POST Requests) from the origin point of the calculateRoute request for at least this number of seconds. Can only be used when reconstructing a route. The minDeviationTime parameter cannot be used in conjunction with arriveAt. Default value is 0. Setting )minDeviationTime_ to a value greater than zero has the following consequences:
+ * - The origin point of the _calculateRoute_ Request must be on
+ * (or very near) the input reference route.
+ * - If this is not the case, an error is returned.
+ * - However, the origin point does not need to be at the beginning
+ * of the input reference route (it can be thought of as the current
+ * vehicle position on the reference route).
+ * - The reference route, returned as the first route in the _calculateRoute_
+ * Response, will start at the origin point specified in the _calculateRoute_
+ * Request. The initial part of the input reference route up until the origin
+ * point will be excluded from the Response.
+ * - The values of _minDeviationDistance_ and _minDeviationTime_ determine
+ * how far alternative routes will be guaranteed to follow the reference
+ * route from the origin point onwards.
+ * - The route must use _departAt_.
+ * - The _vehicleHeading_ is ignored. |
+ * | instructionsType | String | No | If specified, guidance instructions will be returned. Note that the instructionsType parameter cannot be used in conjunction with routeRepresentation=none |
+ * | language | String | No | The language parameter determines the language of the guidance messages. Proper nouns (the names of streets, plazas, etc.) are returned in the specified language, or if that is not available, they are returned in an available language that is close to it. Allowed values are (a subset of) the IETF language tags. The currently supported languages are listed in the [Supported languages section](https://docs.microsoft.com/azure/azure-maps/supported-languages).
+ *
+ * Default value: en-GB |
+ * | computeBestOrder | String | No | Re-order the route waypoints using a fast heuristic algorithm to reduce the route length. Yields best results when used in conjunction with routeType _shortest_. Notice that origin and destination are excluded from the optimized waypoint indices. To include origin and destination in the response, please increase all the indices by 1 to account for the origin, and then add the destination as the final index. Possible values are true or false. True computes a better order if possible, but is not allowed to be used in conjunction with maxAlternatives value greater than 0 or in conjunction with circle waypoints. False will use the locations in the given order and not allowed to be used in conjunction with routeRepresentation _none_. |
+ * | routeRepresentation | String | No | Specifies the representation of the set of routes provided as response. This parameter value can only be used in conjunction with computeBestOrder=true. |
+ * | computeTravelTimeFor | String | No | Specifies whether to return additional travel times using different types of traffic information (none, historic, live) as well as the default best-estimate travel time. |
+ * | vehicleHeading | String | No | The 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 |
+ * | report | String | No | Specifies which data should be reported for diagnosis purposes. The only possible value is _effectiveSettings_. Reports the effective parameters or data used when calling the API. In the case of defaulted parameters the default will be reflected where the parameter was not specified by the caller. |
+ * | sectionType | String | No | Specifies which of the section types is reported in the route response. <br><br>For example if sectionType = pedestrian the sections which are suited for pedestrians only are returned. Multiple types can be used. The default sectionType refers to the travelMode input. By default travelMode is set to car |
+ * | vehicleAxleWeight | String | No | Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per axle are not considered. |
+ * | vehicleWidth | String | No | Width of the vehicle in meters. A value of 0 means that width restrictions are not considered. |
+ * | vehicleHeight | String | No | Height of the vehicle in meters. A value of 0 means that height restrictions are not considered. |
+ * | vehicleLength | String | No | Length of the vehicle in meters. A value of 0 means that length restrictions are not considered. |
+ * | vehicleMaxSpeed | String | No | 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.
+ *
+ * * A value of 0 means that an appropriate value for the vehicle will be determined and applied during route planning.
+ *
+ * * A 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. |
+ * | vehicleWeight | String | No | Weight of the vehicle in kilograms.
+ *
+ * * It is mandatory if any of the *Efficiency parameters are set.
+ *
+ * * It must be strictly positive when used in the context of the Consumption Model. Weight restrictions are considered.
+ *
+ * * If no detailed **Consumption Model** is specified and the value of **vehicleWeight** is non-zero, then weight restrictions are considered.
+ *
+ * * In all other cases, this parameter is ignored.
+ *
+ * Sensible Values : for **Combustion Model** : 1600, for **Electric Model** : 1900 |
+ * | vehicleCommercial | String | No | Whether the vehicle is used for commercial purposes. Commercial vehicles may not be allowed to drive on some roads. |
+ * | windingness | String | No | Level of turns for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | hilliness | String | No | Degree of hilliness for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | travelMode | String | No | The mode of travel for the requested route. If not defined, default is 'car'. Note that the requested travelMode may not be available for the entire route. Where the requested travelMode is not available for a particular section, the travelMode element of the response for that section will be "other". Note that travel modes bus, motorcycle, taxi and van are BETA functionality. Full restriction data is not available in all areas. In **calculateReachableRange** requests, the values bicycle and pedestrian must not be used. |
+ * | avoid | String | No | Specifies something that the route calculation should try to avoid when determining the route. Can be specified multiple times in one request, for example, '&avoid=motorways&avoid=tollRoads&avoid=ferries'. In calculateReachableRange requests, the value alreadyUsedRoads must not be used. |
+ * | traffic | String | No | Possible values:
+ * * true - Do consider all available traffic information during routing
+ * * false - Ignore current traffic data during routing. Note that although the current traffic data is ignored
+ * during routing, the effect of historic traffic on effective road speeds is still incorporated. |
+ * | routeType | String | No | The type of route requested. |
+ * | vehicleLoadType | String | No | 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 can be specified multiple times. This parameter is currently only considered for travelMode=truck. |
+ * | vehicleEngineType | String | No | Engine type of the vehicle. When a detailed Consumption Model is specified, it must be consistent with the value of **vehicleEngineType**. |
+ * | constantSpeedConsumptionInLitersPerHundredkm | String | No |
+ *
+ * Specifies the speed-dependent component of consumption.
+ *
+ * Provided as an unordered list of colon-delimited speed & consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
+ *
+ * * by linear interpolation, if the given speed lies in between two speeds in the list
+ *
+ * * by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list
+ *
+ * The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing.
+ *
+ * Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates.
+ *
+ * Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.
+ *
+ * The valid range for the consumption values(expressed in l/100km) is between 0.01 and 100000.0.
+ *
+ * Sensible Values : 50,6.3:130,11.5
+ *
+ * **Note** : This parameter is required for **The Combustion Consumption Model**. |
+ * | currentFuelInLiters | String | No | Specifies the current supply of fuel in liters.
+ *
+ * Sensible Values : 55 |
+ * | auxiliaryPowerInLitersPerHour | String | No | Specifies the amount of fuel consumed for sustaining auxiliary systems of the vehicle, in liters per hour.
+ *
+ * It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
+ *
+ * Sensible Values : 0.2 |
+ * | fuelEnergyDensityInMJoulesPerLiter | String | No | Specifies the amount of chemical energy stored in one liter of fuel in megajoules (MJ). It is used in conjunction with the ***Efficiency** parameters for conversions between saved or consumed energy and fuel. For example, energy density is 34.2 MJ/l for gasoline, and 35.8 MJ/l for Diesel fuel.
+ *
+ * This parameter is required if any ***Efficiency** parameter is set.
+ *
+ * Sensible Values : 34.2 |
+ * | accelerationEfficiency | String | No | Specifies the efficiency of converting chemical energy stored in fuel to kinetic energy when the vehicle accelerates _(i.e. KineticEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed_ is obtained by converting consumed fuel to chemical energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **decelerationEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**decelerationEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.33, for **Electric Model** : 0.66 |
+ * | decelerationEfficiency | String | No | Specifies the efficiency of converting kinetic energy to saved (not consumed) fuel when the vehicle decelerates _(i.e. ChemicalEnergySaved/KineticEnergyLost). ChemicalEnergySaved_ is obtained by converting saved (not consumed) fuel to energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **accelerationEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**accelerationEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.83, for **Electric Model** : 0.91 |
+ * | uphillEfficiency | String | No | Specifies the efficiency of converting chemical energy stored in fuel to potential energy when the vehicle gains elevation _(i.e. PotentialEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed_ is obtained by converting consumed fuel to chemical energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **downhillEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**downhillEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.27, for **Electric Model** : 0.74 |
+ * | downhillEfficiency | String | No | Specifies the efficiency of converting potential energy to saved (not consumed) fuel when the vehicle loses elevation _(i.e. ChemicalEnergySaved/PotentialEnergyLost). ChemicalEnergySaved_ is obtained by converting saved (not consumed) fuel to energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **uphillEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**uphillEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.51, for **Electric Model** : 0.73 |
+ * | constantSpeedConsumptionInkWhPerHundredkm | String | No | Specifies the speed-dependent component of consumption.
+ *
+ * Provided as an unordered list of speed/consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
+ *
+ * * by linear interpolation, if the given speed lies in between two speeds in the list
+ *
+ * * by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list
+ *
+ * The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing.
+ *
+ * Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates.
+ *
+ * Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.
+ *
+ * The valid range for the consumption values(expressed in kWh/100km) is between 0.01 and 100000.0.
+ *
+ * Sensible Values : 50,8.2:130,21.3
+ *
+ * This parameter is required for **Electric consumption model**. |
+ * | currentChargeInkWh | String | No | Specifies the current electric energy supply in kilowatt hours (kWh).
+ *
+ * This parameter co-exists with **maxChargeInkWh** parameter.
+ *
+ * The range of values allowed are 0.0 to **maxChargeInkWh**.
+ *
+ * Sensible Values : 43 |
+ * | maxChargeInkWh | String | No | Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in the vehicle's battery.
+ *
+ * This parameter co-exists with **currentChargeInkWh** parameter.
+ *
+ * Minimum value has to be greater than or equal to **currentChargeInkWh**.
+ *
+ * Sensible Values : 85 |
+ * | auxiliaryPowerInkW | String | No | Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts (kW).
+ *
+ * It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
+ *
+ * Sensible Values : 1.7 |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * formatVersion: String
+ * routes: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * }
+ * legs: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * points: [
+ * {
+ * latitude: Double
+ * longitude: Double
+ * }
+ * ]
+ * }
+ * ]
+ * sections: [
+ * {
+ * startPointIndex: Integer
+ * endPointIndex: Integer
+ * sectionType: String(CAR_TRAIN/COUNTRY/FERRY/MOTORWAY/PEDESTRIAN/TOLL_ROAD/TOLL_VIGNETTE/TRAFFIC/TRAVEL_MODE/TUNNEL/CARPOOL/URBAN)
+ * travelMode: String(car/truck/taxi/bus/van/motorcycle/bicycle/pedestrian/other)
+ * simpleCategory: String(JAM/ROAD_WORK/ROAD_CLOSURE/OTHER)
+ * effectiveSpeedInKmh: Integer
+ * delayInSeconds: Integer
+ * delayMagnitude: String(0/1/2/3/4)
+ * tec: {
+ * effectCode: Integer
+ * causes: [
+ * {
+ * mainCauseCode: Integer
+ * subCauseCode: Integer
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * guidance: {
+ * instructions: [
+ * {
+ * routeOffsetInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * point: (recursive schema, see point above)
+ * pointIndex: Integer
+ * instructionType: String(TURN/ROAD_CHANGE/LOCATION_DEPARTURE/LOCATION_ARRIVAL/DIRECTION_INFO/LOCATION_WAYPOINT)
+ * roadNumbers: [
+ * String
+ * ]
+ * exitNumber: String
+ * street: String
+ * signpostText: String
+ * countryCode: String
+ * stateCode: String
+ * junctionType: String(REGULAR/ROUNDABOUT/BIFURCATION)
+ * turnAngleInDegrees: Integer
+ * roundaboutExitNumber: String
+ * possibleCombineWithNext: Boolean
+ * drivingSide: String(LEFT/RIGHT)
+ * maneuver: String(ARRIVE/ARRIVE_LEFT/ARRIVE_RIGHT/DEPART/STRAIGHT/KEEP_RIGHT/BEAR_RIGHT/TURN_RIGHT/SHARP_RIGHT/KEEP_LEFT/BEAR_LEFT/TURN_LEFT/SHARP_LEFT/MAKE_UTURN/ENTER_MOTORWAY/ENTER_FREEWAY/ENTER_HIGHWAY/TAKE_EXIT/MOTORWAY_EXIT_LEFT/MOTORWAY_EXIT_RIGHT/TAKE_FERRY/ROUNDABOUT_CROSS/ROUNDABOUT_RIGHT/ROUNDABOUT_LEFT/ROUNDABOUT_BACK/TRY_MAKE_UTURN/FOLLOW/SWITCH_PARALLEL_ROAD/SWITCH_MAIN_ROAD/ENTRANCE_RAMP/WAYPOINT_LEFT/WAYPOINT_RIGHT/WAYPOINT_REACHED)
+ * message: String
+ * combinedMessage: String
+ * }
+ * ]
+ * instructionGroups: [
+ * {
+ * firstInstructionIndex: Integer
+ * lastInstructionIndex: Integer
+ * groupLengthInMeters: Integer
+ * groupMessage: String
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * optimizedWaypoints: [
+ * {
+ * providedIndex: Integer
+ * optimizedIndex: Integer
+ * }
+ * ]
+ * report: {
+ * effectiveSettings: [
+ * {
+ * key: String
+ * value: String
+ * }
+ * ]
+ * }
+ * }
+ * }
+ *
+ * @param format Desired format of the response. Value can be either _json_ or _xml_.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @param context The context to associate with this operation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return this object is returned from a successful Route Directions call along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getRouteDirectionsWithResponseAsync(
+ String format, RequestOptions requestOptions, Context context) {
+ return service.getRouteDirections(
+ this.client.getHost(), this.client.getServiceVersion().getVersion(), format, requestOptions, context);
+ }
+
+ /**
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ * Returns a route between an origin and a destination, passing through waypoints if they are specified. The
+ * route will take into account factors such as current traffic and the typical road speeds on the requested day of
+ * the week and time of day.
+ *
+ *
Information returned includes the distance, estimated travel time, and a representation of the route geometry.
+ * Additional routing information such as optimized waypoint order or turn by turn instructions is also available,
+ * depending on the options selected.
+ *
+ *
Routing service provides a set of parameters for a detailed description of vehicle-specific Consumption Model.
+ * Please check [Consumption Model](https://docs.microsoft.com/azure/azure-maps/consumption-model) for detailed
+ * explanation of the concepts and parameters involved.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ * | query | String | Yes | The Coordinates through which the route is calculated, delimited by a colon. A minimum of two coordinates is required. The first one is the origin and the last is the destination of the route. Optional coordinates in-between act as WayPoints in the route. You can pass up to 150 WayPoints. |
+ * | maxAlternatives | String | No | Number of desired alternative routes to be calculated. Default: 0, minimum: 0 and maximum: 5 |
+ * | alternativeType | String | No | Controls the optimality, with respect to the given planning criteria, of the calculated alternatives compared to the reference route. |
+ * | minDeviationDistance | String | No | All alternative routes returned will follow the reference route (see section POST Requests) from the origin point of the calculateRoute request for at least this number of meters. Can only be used when reconstructing a route. The minDeviationDistance parameter cannot be used in conjunction with arriveAt |
+ * | arriveAt | String | No | The date and time of arrival at the destination point. It must be specified as a dateTime. When a time zone offset is not specified it will be assumed to be that of the destination point. The arriveAt value must be in the future. The arriveAt parameter cannot be used in conjunction with departAt, minDeviationDistance or minDeviationTime. |
+ * | departAt | String | No | The date and time of departure from the origin point. Departure times apart from now must be specified as a dateTime. When a time zone offset is not specified, it will be assumed to be that of the origin point. The departAt value must be in the future in the date-time format (1996-12-19T16:39:57-08:00). |
+ * | minDeviationTime | String | No | All alternative routes returned will follow the reference route (see section POST Requests) from the origin point of the calculateRoute request for at least this number of seconds. Can only be used when reconstructing a route. The minDeviationTime parameter cannot be used in conjunction with arriveAt. Default value is 0. Setting )minDeviationTime_ to a value greater than zero has the following consequences:
+ * - The origin point of the _calculateRoute_ Request must be on
+ * (or very near) the input reference route.
+ * - If this is not the case, an error is returned.
+ * - However, the origin point does not need to be at the beginning
+ * of the input reference route (it can be thought of as the current
+ * vehicle position on the reference route).
+ * - The reference route, returned as the first route in the _calculateRoute_
+ * Response, will start at the origin point specified in the _calculateRoute_
+ * Request. The initial part of the input reference route up until the origin
+ * point will be excluded from the Response.
+ * - The values of _minDeviationDistance_ and _minDeviationTime_ determine
+ * how far alternative routes will be guaranteed to follow the reference
+ * route from the origin point onwards.
+ * - The route must use _departAt_.
+ * - The _vehicleHeading_ is ignored. |
+ * | instructionsType | String | No | If specified, guidance instructions will be returned. Note that the instructionsType parameter cannot be used in conjunction with routeRepresentation=none |
+ * | language | String | No | The language parameter determines the language of the guidance messages. Proper nouns (the names of streets, plazas, etc.) are returned in the specified language, or if that is not available, they are returned in an available language that is close to it. Allowed values are (a subset of) the IETF language tags. The currently supported languages are listed in the [Supported languages section](https://docs.microsoft.com/azure/azure-maps/supported-languages).
+ *
+ * Default value: en-GB |
+ * | computeBestOrder | String | No | Re-order the route waypoints using a fast heuristic algorithm to reduce the route length. Yields best results when used in conjunction with routeType _shortest_. Notice that origin and destination are excluded from the optimized waypoint indices. To include origin and destination in the response, please increase all the indices by 1 to account for the origin, and then add the destination as the final index. Possible values are true or false. True computes a better order if possible, but is not allowed to be used in conjunction with maxAlternatives value greater than 0 or in conjunction with circle waypoints. False will use the locations in the given order and not allowed to be used in conjunction with routeRepresentation _none_. |
+ * | routeRepresentation | String | No | Specifies the representation of the set of routes provided as response. This parameter value can only be used in conjunction with computeBestOrder=true. |
+ * | computeTravelTimeFor | String | No | Specifies whether to return additional travel times using different types of traffic information (none, historic, live) as well as the default best-estimate travel time. |
+ * | vehicleHeading | String | No | The 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 |
+ * | report | String | No | Specifies which data should be reported for diagnosis purposes. The only possible value is _effectiveSettings_. Reports the effective parameters or data used when calling the API. In the case of defaulted parameters the default will be reflected where the parameter was not specified by the caller. |
+ * | sectionType | String | No | Specifies which of the section types is reported in the route response. <br><br>For example if sectionType = pedestrian the sections which are suited for pedestrians only are returned. Multiple types can be used. The default sectionType refers to the travelMode input. By default travelMode is set to car |
+ * | vehicleAxleWeight | String | No | Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per axle are not considered. |
+ * | vehicleWidth | String | No | Width of the vehicle in meters. A value of 0 means that width restrictions are not considered. |
+ * | vehicleHeight | String | No | Height of the vehicle in meters. A value of 0 means that height restrictions are not considered. |
+ * | vehicleLength | String | No | Length of the vehicle in meters. A value of 0 means that length restrictions are not considered. |
+ * | vehicleMaxSpeed | String | No | 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.
+ *
+ * * A value of 0 means that an appropriate value for the vehicle will be determined and applied during route planning.
+ *
+ * * A 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. |
+ * | vehicleWeight | String | No | Weight of the vehicle in kilograms.
+ *
+ * * It is mandatory if any of the *Efficiency parameters are set.
+ *
+ * * It must be strictly positive when used in the context of the Consumption Model. Weight restrictions are considered.
+ *
+ * * If no detailed **Consumption Model** is specified and the value of **vehicleWeight** is non-zero, then weight restrictions are considered.
+ *
+ * * In all other cases, this parameter is ignored.
+ *
+ * Sensible Values : for **Combustion Model** : 1600, for **Electric Model** : 1900 |
+ * | vehicleCommercial | String | No | Whether the vehicle is used for commercial purposes. Commercial vehicles may not be allowed to drive on some roads. |
+ * | windingness | String | No | Level of turns for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | hilliness | String | No | Degree of hilliness for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | travelMode | String | No | The mode of travel for the requested route. If not defined, default is 'car'. Note that the requested travelMode may not be available for the entire route. Where the requested travelMode is not available for a particular section, the travelMode element of the response for that section will be "other". Note that travel modes bus, motorcycle, taxi and van are BETA functionality. Full restriction data is not available in all areas. In **calculateReachableRange** requests, the values bicycle and pedestrian must not be used. |
+ * | avoid | String | No | Specifies something that the route calculation should try to avoid when determining the route. Can be specified multiple times in one request, for example, '&avoid=motorways&avoid=tollRoads&avoid=ferries'. In calculateReachableRange requests, the value alreadyUsedRoads must not be used. |
+ * | traffic | String | No | Possible values:
+ * * true - Do consider all available traffic information during routing
+ * * false - Ignore current traffic data during routing. Note that although the current traffic data is ignored
+ * during routing, the effect of historic traffic on effective road speeds is still incorporated. |
+ * | routeType | String | No | The type of route requested. |
+ * | vehicleLoadType | String | No | 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 can be specified multiple times. This parameter is currently only considered for travelMode=truck. |
+ * | vehicleEngineType | String | No | Engine type of the vehicle. When a detailed Consumption Model is specified, it must be consistent with the value of **vehicleEngineType**. |
+ * | constantSpeedConsumptionInLitersPerHundredkm | String | No |
+ *
+ * Specifies the speed-dependent component of consumption.
+ *
+ * Provided as an unordered list of colon-delimited speed & consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
+ *
+ * * by linear interpolation, if the given speed lies in between two speeds in the list
+ *
+ * * by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list
+ *
+ * The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing.
+ *
+ * Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates.
+ *
+ * Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.
+ *
+ * The valid range for the consumption values(expressed in l/100km) is between 0.01 and 100000.0.
+ *
+ * Sensible Values : 50,6.3:130,11.5
+ *
+ * **Note** : This parameter is required for **The Combustion Consumption Model**. |
+ * | currentFuelInLiters | String | No | Specifies the current supply of fuel in liters.
+ *
+ * Sensible Values : 55 |
+ * | auxiliaryPowerInLitersPerHour | String | No | Specifies the amount of fuel consumed for sustaining auxiliary systems of the vehicle, in liters per hour.
+ *
+ * It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
+ *
+ * Sensible Values : 0.2 |
+ * | fuelEnergyDensityInMJoulesPerLiter | String | No | Specifies the amount of chemical energy stored in one liter of fuel in megajoules (MJ). It is used in conjunction with the ***Efficiency** parameters for conversions between saved or consumed energy and fuel. For example, energy density is 34.2 MJ/l for gasoline, and 35.8 MJ/l for Diesel fuel.
+ *
+ * This parameter is required if any ***Efficiency** parameter is set.
+ *
+ * Sensible Values : 34.2 |
+ * | accelerationEfficiency | String | No | Specifies the efficiency of converting chemical energy stored in fuel to kinetic energy when the vehicle accelerates _(i.e. KineticEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed_ is obtained by converting consumed fuel to chemical energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **decelerationEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**decelerationEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.33, for **Electric Model** : 0.66 |
+ * | decelerationEfficiency | String | No | Specifies the efficiency of converting kinetic energy to saved (not consumed) fuel when the vehicle decelerates _(i.e. ChemicalEnergySaved/KineticEnergyLost). ChemicalEnergySaved_ is obtained by converting saved (not consumed) fuel to energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **accelerationEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**accelerationEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.83, for **Electric Model** : 0.91 |
+ * | uphillEfficiency | String | No | Specifies the efficiency of converting chemical energy stored in fuel to potential energy when the vehicle gains elevation _(i.e. PotentialEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed_ is obtained by converting consumed fuel to chemical energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **downhillEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**downhillEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.27, for **Electric Model** : 0.74 |
+ * | downhillEfficiency | String | No | Specifies the efficiency of converting potential energy to saved (not consumed) fuel when the vehicle loses elevation _(i.e. ChemicalEnergySaved/PotentialEnergyLost). ChemicalEnergySaved_ is obtained by converting saved (not consumed) fuel to energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **uphillEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**uphillEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.51, for **Electric Model** : 0.73 |
+ * | constantSpeedConsumptionInkWhPerHundredkm | String | No | Specifies the speed-dependent component of consumption.
+ *
+ * Provided as an unordered list of speed/consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
+ *
+ * * by linear interpolation, if the given speed lies in between two speeds in the list
+ *
+ * * by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list
+ *
+ * The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing.
+ *
+ * Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates.
+ *
+ * Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.
+ *
+ * The valid range for the consumption values(expressed in kWh/100km) is between 0.01 and 100000.0.
+ *
+ * Sensible Values : 50,8.2:130,21.3
+ *
+ * This parameter is required for **Electric consumption model**. |
+ * | currentChargeInkWh | String | No | Specifies the current electric energy supply in kilowatt hours (kWh).
+ *
+ * This parameter co-exists with **maxChargeInkWh** parameter.
+ *
+ * The range of values allowed are 0.0 to **maxChargeInkWh**.
+ *
+ * Sensible Values : 43 |
+ * | maxChargeInkWh | String | No | Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in the vehicle's battery.
+ *
+ * This parameter co-exists with **currentChargeInkWh** parameter.
+ *
+ * Minimum value has to be greater than or equal to **currentChargeInkWh**.
+ *
+ * Sensible Values : 85 |
+ * | auxiliaryPowerInkW | String | No | Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts (kW).
+ *
+ * It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
+ *
+ * Sensible Values : 1.7 |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * formatVersion: String
+ * routes: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * }
+ * legs: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * points: [
+ * {
+ * latitude: Double
+ * longitude: Double
+ * }
+ * ]
+ * }
+ * ]
+ * sections: [
+ * {
+ * startPointIndex: Integer
+ * endPointIndex: Integer
+ * sectionType: String(CAR_TRAIN/COUNTRY/FERRY/MOTORWAY/PEDESTRIAN/TOLL_ROAD/TOLL_VIGNETTE/TRAFFIC/TRAVEL_MODE/TUNNEL/CARPOOL/URBAN)
+ * travelMode: String(car/truck/taxi/bus/van/motorcycle/bicycle/pedestrian/other)
+ * simpleCategory: String(JAM/ROAD_WORK/ROAD_CLOSURE/OTHER)
+ * effectiveSpeedInKmh: Integer
+ * delayInSeconds: Integer
+ * delayMagnitude: String(0/1/2/3/4)
+ * tec: {
+ * effectCode: Integer
+ * causes: [
+ * {
+ * mainCauseCode: Integer
+ * subCauseCode: Integer
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * guidance: {
+ * instructions: [
+ * {
+ * routeOffsetInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * point: (recursive schema, see point above)
+ * pointIndex: Integer
+ * instructionType: String(TURN/ROAD_CHANGE/LOCATION_DEPARTURE/LOCATION_ARRIVAL/DIRECTION_INFO/LOCATION_WAYPOINT)
+ * roadNumbers: [
+ * String
+ * ]
+ * exitNumber: String
+ * street: String
+ * signpostText: String
+ * countryCode: String
+ * stateCode: String
+ * junctionType: String(REGULAR/ROUNDABOUT/BIFURCATION)
+ * turnAngleInDegrees: Integer
+ * roundaboutExitNumber: String
+ * possibleCombineWithNext: Boolean
+ * drivingSide: String(LEFT/RIGHT)
+ * maneuver: String(ARRIVE/ARRIVE_LEFT/ARRIVE_RIGHT/DEPART/STRAIGHT/KEEP_RIGHT/BEAR_RIGHT/TURN_RIGHT/SHARP_RIGHT/KEEP_LEFT/BEAR_LEFT/TURN_LEFT/SHARP_LEFT/MAKE_UTURN/ENTER_MOTORWAY/ENTER_FREEWAY/ENTER_HIGHWAY/TAKE_EXIT/MOTORWAY_EXIT_LEFT/MOTORWAY_EXIT_RIGHT/TAKE_FERRY/ROUNDABOUT_CROSS/ROUNDABOUT_RIGHT/ROUNDABOUT_LEFT/ROUNDABOUT_BACK/TRY_MAKE_UTURN/FOLLOW/SWITCH_PARALLEL_ROAD/SWITCH_MAIN_ROAD/ENTRANCE_RAMP/WAYPOINT_LEFT/WAYPOINT_RIGHT/WAYPOINT_REACHED)
+ * message: String
+ * combinedMessage: String
+ * }
+ * ]
+ * instructionGroups: [
+ * {
+ * firstInstructionIndex: Integer
+ * lastInstructionIndex: Integer
+ * groupLengthInMeters: Integer
+ * groupMessage: String
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * optimizedWaypoints: [
+ * {
+ * providedIndex: Integer
+ * optimizedIndex: Integer
+ * }
+ * ]
+ * report: {
+ * effectiveSettings: [
+ * {
+ * key: String
+ * value: String
+ * }
+ * ]
+ * }
+ * }
+ * }
+ *
+ * @param format Desired format of the response. Value can be either _json_ or _xml_.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return this object is returned from a successful Route Directions call along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getRouteDirectionsWithResponse(String format, RequestOptions requestOptions) {
+ return getRouteDirectionsWithResponseAsync(format, requestOptions).block();
+ }
+
+ /**
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ * Returns a route between an origin and a destination, passing through waypoints if they are specified. The
+ * route will take into account factors such as current traffic and the typical road speeds on the requested day of
+ * the week and time of day.
+ *
+ *
Information returned includes the distance, estimated travel time, and a representation of the route geometry.
+ * Additional routing information such as optimized waypoint order or turn by turn instructions is also available,
+ * depending on the options selected.
+ *
+ *
Routing service provides a set of parameters for a detailed description of a vehicle-specific Consumption
+ * Model. Please check [Consumption Model](https://docs.microsoft.com/azure/azure-maps/consumption-model) for
+ * detailed explanation of the concepts and parameters involved.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ * | query | String | Yes | The Coordinates through which the route is calculated, delimited by a colon. A minimum of two coordinates is required. The first one is the origin and the last is the destination of the route. Optional coordinates in-between act as WayPoints in the route. You can pass up to 150 WayPoints. |
+ * | maxAlternatives | String | No | Number of desired alternative routes to be calculated. Default: 0, minimum: 0 and maximum: 5 |
+ * | alternativeType | String | No | Controls the optimality, with respect to the given planning criteria, of the calculated alternatives compared to the reference route. |
+ * | minDeviationDistance | String | No | All alternative routes returned will follow the reference route (see section POST Requests) from the origin point of the calculateRoute request for at least this number of meters. Can only be used when reconstructing a route. The minDeviationDistance parameter cannot be used in conjunction with arriveAt |
+ * | minDeviationTime | String | No | All alternative routes returned will follow the reference route (see section POST Requests) from the origin point of the calculateRoute request for at least this number of seconds. Can only be used when reconstructing a route. The minDeviationTime parameter cannot be used in conjunction with arriveAt. Default value is 0. Setting )minDeviationTime_ to a value greater than zero has the following consequences:
+ * - The origin point of the _calculateRoute_ Request must be on
+ * (or very near) the input reference route.
+ * - If this is not the case, an error is returned.
+ * - However, the origin point does not need to be at the beginning
+ * of the input reference route (it can be thought of as the current
+ * vehicle position on the reference route).
+ * - The reference route, returned as the first route in the _calculateRoute_
+ * Response, will start at the origin point specified in the _calculateRoute_
+ * Request. The initial part of the input reference route up until the origin
+ * point will be excluded from the Response.
+ * - The values of _minDeviationDistance_ and _minDeviationTime_ determine
+ * how far alternative routes will be guaranteed to follow the reference
+ * route from the origin point onwards.
+ * - The route must use _departAt_.
+ * - The _vehicleHeading_ is ignored. |
+ * | instructionsType | String | No | If specified, guidance instructions will be returned. Note that the instructionsType parameter cannot be used in conjunction with routeRepresentation=none |
+ * | language | String | No | The language parameter determines the language of the guidance messages. It does not affect proper nouns (the names of streets, plazas, etc.) It has no effect when instructionsType=coded. Allowed values are (a subset of) the IETF language tags described |
+ * | computeBestOrder | String | No | Re-order the route waypoints using a fast heuristic algorithm to reduce the route length. Yields best results when used in conjunction with routeType _shortest_. Notice that origin and destination are excluded from the optimized waypoint indices. To include origin and destination in the response, please increase all the indices by 1 to account for the origin, and then add the destination as the final index. Possible values are true or false. True computes a better order if possible, but is not allowed to be used in conjunction with maxAlternatives value greater than 0 or in conjunction with circle waypoints. False will use the locations in the given order and not allowed to be used in conjunction with routeRepresentation _none_. |
+ * | routeRepresentation | String | No | Specifies the representation of the set of routes provided as response. This parameter value can only be used in conjunction with computeBestOrder=true. |
+ * | computeTravelTimeFor | String | No | Specifies whether to return additional travel times using different types of traffic information (none, historic, live) as well as the default best-estimate travel time. |
+ * | vehicleHeading | String | No | The 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 |
+ * | report | String | No | Specifies which data should be reported for diagnosis purposes. The only possible value is _effectiveSettings_. Reports the effective parameters or data used when calling the API. In the case of defaulted parameters the default will be reflected where the parameter was not specified by the caller. |
+ * | sectionType | String | No | Specifies which of the section types is reported in the route response. <br><br>For example if sectionType = pedestrian the sections which are suited for pedestrians only are returned. Multiple types can be used. The default sectionType refers to the travelMode input. By default travelMode is set to car |
+ * | arriveAt | String | No | The date and time of arrival at the destination point. It must be specified as a dateTime. When a time zone offset is not specified it will be assumed to be that of the destination point. The arriveAt value must be in the future. The arriveAt parameter cannot be used in conjunction with departAt, minDeviationDistance or minDeviationTime. |
+ * | departAt | String | No | The date and time of departure from the origin point. Departure times apart from now must be specified as a dateTime. When a time zone offset is not specified, it will be assumed to be that of the origin point. The departAt value must be in the future in the date-time format (1996-12-19T16:39:57-08:00). |
+ * | vehicleAxleWeight | String | No | Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per axle are not considered. |
+ * | vehicleLength | String | No | Length of the vehicle in meters. A value of 0 means that length restrictions are not considered. |
+ * | vehicleHeight | String | No | Height of the vehicle in meters. A value of 0 means that height restrictions are not considered. |
+ * | vehicleWidth | String | No | Width of the vehicle in meters. A value of 0 means that width restrictions are not considered. |
+ * | vehicleMaxSpeed | String | No | 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.
+ *
+ * * A value of 0 means that an appropriate value for the vehicle will be determined and applied during route planning.
+ *
+ * * A 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. |
+ * | vehicleWeight | String | No | Weight of the vehicle in kilograms.
+ *
+ * * It is mandatory if any of the *Efficiency parameters are set.
+ *
+ * * It must be strictly positive when used in the context of the Consumption Model. Weight restrictions are considered.
+ *
+ * * If no detailed **Consumption Model** is specified and the value of **vehicleWeight** is non-zero, then weight restrictions are considered.
+ *
+ * * In all other cases, this parameter is ignored.
+ *
+ * Sensible Values : for **Combustion Model** : 1600, for **Electric Model** : 1900 |
+ * | vehicleCommercial | String | No | Whether the vehicle is used for commercial purposes. Commercial vehicles may not be allowed to drive on some roads. |
+ * | windingness | String | No | Level of turns for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | hilliness | String | No | Degree of hilliness for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | travelMode | String | No | The mode of travel for the requested route. If not defined, default is 'car'. Note that the requested travelMode may not be available for the entire route. Where the requested travelMode is not available for a particular section, the travelMode element of the response for that section will be "other". Note that travel modes bus, motorcycle, taxi and van are BETA functionality. Full restriction data is not available in all areas. In **calculateReachableRange** requests, the values bicycle and pedestrian must not be used. |
+ * | avoid | String | No | Specifies something that the route calculation should try to avoid when determining the route. Can be specified multiple times in one request, for example, '&avoid=motorways&avoid=tollRoads&avoid=ferries'. In calculateReachableRange requests, the value alreadyUsedRoads must not be used. |
+ * | traffic | String | No | Possible values:
+ * * true - Do consider all available traffic information during routing
+ * * false - Ignore current traffic data during routing. Note that although the current traffic data is ignored
+ * during routing, the effect of historic traffic on effective road speeds is still incorporated. |
+ * | routeType | String | No | The type of route requested. |
+ * | vehicleLoadType | String | No | 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 can be specified multiple times. This parameter is currently only considered for travelMode=truck. |
+ * | vehicleEngineType | String | No | Engine type of the vehicle. When a detailed Consumption Model is specified, it must be consistent with the value of **vehicleEngineType**. |
+ * | constantSpeedConsumptionInLitersPerHundredkm | String | No |
+ *
+ * Specifies the speed-dependent component of consumption.
+ *
+ * Provided as an unordered list of colon-delimited speed & consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
+ *
+ * * by linear interpolation, if the given speed lies in between two speeds in the list
+ *
+ * * by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list
+ *
+ * The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing.
+ *
+ * Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates.
+ *
+ * Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.
+ *
+ * The valid range for the consumption values(expressed in l/100km) is between 0.01 and 100000.0.
+ *
+ * Sensible Values : 50,6.3:130,11.5
+ *
+ * **Note** : This parameter is required for **The Combustion Consumption Model**. |
+ * | currentFuelInLiters | String | No | Specifies the current supply of fuel in liters.
+ *
+ * Sensible Values : 55 |
+ * | auxiliaryPowerInLitersPerHour | String | No | Specifies the amount of fuel consumed for sustaining auxiliary systems of the vehicle, in liters per hour.
+ *
+ * It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
+ *
+ * Sensible Values : 0.2 |
+ * | fuelEnergyDensityInMJoulesPerLiter | String | No | Specifies the amount of chemical energy stored in one liter of fuel in megajoules (MJ). It is used in conjunction with the ***Efficiency** parameters for conversions between saved or consumed energy and fuel. For example, energy density is 34.2 MJ/l for gasoline, and 35.8 MJ/l for Diesel fuel.
+ *
+ * This parameter is required if any ***Efficiency** parameter is set.
+ *
+ * Sensible Values : 34.2 |
+ * | accelerationEfficiency | String | No | Specifies the efficiency of converting chemical energy stored in fuel to kinetic energy when the vehicle accelerates _(i.e. KineticEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed_ is obtained by converting consumed fuel to chemical energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **decelerationEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**decelerationEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.33, for **Electric Model** : 0.66 |
+ * | decelerationEfficiency | String | No | Specifies the efficiency of converting kinetic energy to saved (not consumed) fuel when the vehicle decelerates _(i.e. ChemicalEnergySaved/KineticEnergyLost). ChemicalEnergySaved_ is obtained by converting saved (not consumed) fuel to energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **accelerationEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**accelerationEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.83, for **Electric Model** : 0.91 |
+ * | uphillEfficiency | String | No | Specifies the efficiency of converting chemical energy stored in fuel to potential energy when the vehicle gains elevation _(i.e. PotentialEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed_ is obtained by converting consumed fuel to chemical energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **downhillEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**downhillEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.27, for **Electric Model** : 0.74 |
+ * | downhillEfficiency | String | No | Specifies the efficiency of converting potential energy to saved (not consumed) fuel when the vehicle loses elevation _(i.e. ChemicalEnergySaved/PotentialEnergyLost). ChemicalEnergySaved_ is obtained by converting saved (not consumed) fuel to energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **uphillEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**uphillEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.51, for **Electric Model** : 0.73 |
+ * | constantSpeedConsumptionInkWhPerHundredkm | String | No | Specifies the speed-dependent component of consumption.
+ *
+ * Provided as an unordered list of speed/consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
+ *
+ * * by linear interpolation, if the given speed lies in between two speeds in the list
+ *
+ * * by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list
+ *
+ * The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing.
+ *
+ * Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates.
+ *
+ * Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.
+ *
+ * The valid range for the consumption values(expressed in kWh/100km) is between 0.01 and 100000.0.
+ *
+ * Sensible Values : 50,8.2:130,21.3
+ *
+ * This parameter is required for **Electric consumption model**. |
+ * | currentChargeInkWh | String | No | Specifies the current electric energy supply in kilowatt hours (kWh).
+ *
+ * This parameter co-exists with **maxChargeInkWh** parameter.
+ *
+ * The range of values allowed are 0.0 to **maxChargeInkWh**.
+ *
+ * Sensible Values : 43 |
+ * | maxChargeInkWh | String | No | Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in the vehicle's battery.
+ *
+ * This parameter co-exists with **currentChargeInkWh** parameter.
+ *
+ * Minimum value has to be greater than or equal to **currentChargeInkWh**.
+ *
+ * Sensible Values : 85 |
+ * | auxiliaryPowerInkW | String | No | Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts (kW).
+ *
+ * It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
+ *
+ * Sensible Values : 1.7 |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Request Body Schema
+ *
+ *
{@code
+ * {
+ * supportingPoints: {
+ * geometries: [
+ * {
+ * }
+ * ]
+ * }
+ * avoidVignette: [
+ * String
+ * ]
+ * allowVignette: [
+ * String
+ * ]
+ * avoidAreas: {
+ * coordinates: [
+ * [
+ * [
+ * [
+ * double
+ * ]
+ * ]
+ * ]
+ * ]
+ * }
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * formatVersion: String
+ * routes: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * }
+ * legs: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * points: [
+ * {
+ * latitude: Double
+ * longitude: Double
+ * }
+ * ]
+ * }
+ * ]
+ * sections: [
+ * {
+ * startPointIndex: Integer
+ * endPointIndex: Integer
+ * sectionType: String(CAR_TRAIN/COUNTRY/FERRY/MOTORWAY/PEDESTRIAN/TOLL_ROAD/TOLL_VIGNETTE/TRAFFIC/TRAVEL_MODE/TUNNEL/CARPOOL/URBAN)
+ * travelMode: String(car/truck/taxi/bus/van/motorcycle/bicycle/pedestrian/other)
+ * simpleCategory: String(JAM/ROAD_WORK/ROAD_CLOSURE/OTHER)
+ * effectiveSpeedInKmh: Integer
+ * delayInSeconds: Integer
+ * delayMagnitude: String(0/1/2/3/4)
+ * tec: {
+ * effectCode: Integer
+ * causes: [
+ * {
+ * mainCauseCode: Integer
+ * subCauseCode: Integer
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * guidance: {
+ * instructions: [
+ * {
+ * routeOffsetInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * point: (recursive schema, see point above)
+ * pointIndex: Integer
+ * instructionType: String(TURN/ROAD_CHANGE/LOCATION_DEPARTURE/LOCATION_ARRIVAL/DIRECTION_INFO/LOCATION_WAYPOINT)
+ * roadNumbers: [
+ * String
+ * ]
+ * exitNumber: String
+ * street: String
+ * signpostText: String
+ * countryCode: String
+ * stateCode: String
+ * junctionType: String(REGULAR/ROUNDABOUT/BIFURCATION)
+ * turnAngleInDegrees: Integer
+ * roundaboutExitNumber: String
+ * possibleCombineWithNext: Boolean
+ * drivingSide: String(LEFT/RIGHT)
+ * maneuver: String(ARRIVE/ARRIVE_LEFT/ARRIVE_RIGHT/DEPART/STRAIGHT/KEEP_RIGHT/BEAR_RIGHT/TURN_RIGHT/SHARP_RIGHT/KEEP_LEFT/BEAR_LEFT/TURN_LEFT/SHARP_LEFT/MAKE_UTURN/ENTER_MOTORWAY/ENTER_FREEWAY/ENTER_HIGHWAY/TAKE_EXIT/MOTORWAY_EXIT_LEFT/MOTORWAY_EXIT_RIGHT/TAKE_FERRY/ROUNDABOUT_CROSS/ROUNDABOUT_RIGHT/ROUNDABOUT_LEFT/ROUNDABOUT_BACK/TRY_MAKE_UTURN/FOLLOW/SWITCH_PARALLEL_ROAD/SWITCH_MAIN_ROAD/ENTRANCE_RAMP/WAYPOINT_LEFT/WAYPOINT_RIGHT/WAYPOINT_REACHED)
+ * message: String
+ * combinedMessage: String
+ * }
+ * ]
+ * instructionGroups: [
+ * {
+ * firstInstructionIndex: Integer
+ * lastInstructionIndex: Integer
+ * groupLengthInMeters: Integer
+ * groupMessage: String
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * optimizedWaypoints: [
+ * {
+ * providedIndex: Integer
+ * optimizedIndex: Integer
+ * }
+ * ]
+ * report: {
+ * effectiveSettings: [
+ * {
+ * key: String
+ * value: String
+ * }
+ * ]
+ * }
+ * }
+ * }
+ *
+ * @param format Desired format of the response. Value can be either _json_ or _xml_.
+ * @param routeDirectionParameters Used for reconstructing a route and for calculating zero or more alternative
+ * routes to this reference route. The provided sequence of coordinates is used as input for route
+ * reconstruction. The alternative routes are calculated between the origin and destination points specified in
+ * the base path parameter locations. If both minDeviationDistance and minDeviationTime are set to zero, then
+ * these origin and destination points are expected to be at (or very near) the beginning and end of the
+ * reference route, respectively. Intermediate locations (waypoints) are not supported when using
+ * supportingPoints.
+ * Setting at least one of minDeviationDistance or minDeviationTime to a value greater than zero has the
+ * following consequences:
+ *
* The origin point of the calculateRoute request must be on (or very near) the input reference route. If
+ * this is not the case, an error is returned. However, the origin point does not need to be at the beginning of
+ * the input reference route (it can be thought of as the current vehicle position on the reference route). *
+ * The reference route, returned as the first route in the calculateRoute response, will start at the origin
+ * point specified in the calculateRoute request. The initial part of the input reference route up until the
+ * origin point will be excluded from the response. * The values of minDeviationDistance and minDeviationTime
+ * determine how far alternative routes will be guaranteed to follow the reference route from the origin point
+ * onwards. * The route must use departAt. * The vehicleHeading is ignored.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return this object is returned from a successful Route Directions call along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getRouteDirectionsWithAdditionalParametersWithResponseAsync(
+ String format, BinaryData routeDirectionParameters, RequestOptions requestOptions) {
+ return FluxUtil.withContext(
+ context ->
+ service.getRouteDirectionsWithAdditionalParameters(
+ this.client.getHost(),
+ this.client.getServiceVersion().getVersion(),
+ format,
+ routeDirectionParameters,
+ requestOptions,
+ context));
+ }
+
+ /**
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ * Returns a route between an origin and a destination, passing through waypoints if they are specified. The
+ * route will take into account factors such as current traffic and the typical road speeds on the requested day of
+ * the week and time of day.
+ *
+ *
Information returned includes the distance, estimated travel time, and a representation of the route geometry.
+ * Additional routing information such as optimized waypoint order or turn by turn instructions is also available,
+ * depending on the options selected.
+ *
+ *
Routing service provides a set of parameters for a detailed description of a vehicle-specific Consumption
+ * Model. Please check [Consumption Model](https://docs.microsoft.com/azure/azure-maps/consumption-model) for
+ * detailed explanation of the concepts and parameters involved.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ * | query | String | Yes | The Coordinates through which the route is calculated, delimited by a colon. A minimum of two coordinates is required. The first one is the origin and the last is the destination of the route. Optional coordinates in-between act as WayPoints in the route. You can pass up to 150 WayPoints. |
+ * | maxAlternatives | String | No | Number of desired alternative routes to be calculated. Default: 0, minimum: 0 and maximum: 5 |
+ * | alternativeType | String | No | Controls the optimality, with respect to the given planning criteria, of the calculated alternatives compared to the reference route. |
+ * | minDeviationDistance | String | No | All alternative routes returned will follow the reference route (see section POST Requests) from the origin point of the calculateRoute request for at least this number of meters. Can only be used when reconstructing a route. The minDeviationDistance parameter cannot be used in conjunction with arriveAt |
+ * | minDeviationTime | String | No | All alternative routes returned will follow the reference route (see section POST Requests) from the origin point of the calculateRoute request for at least this number of seconds. Can only be used when reconstructing a route. The minDeviationTime parameter cannot be used in conjunction with arriveAt. Default value is 0. Setting )minDeviationTime_ to a value greater than zero has the following consequences:
+ * - The origin point of the _calculateRoute_ Request must be on
+ * (or very near) the input reference route.
+ * - If this is not the case, an error is returned.
+ * - However, the origin point does not need to be at the beginning
+ * of the input reference route (it can be thought of as the current
+ * vehicle position on the reference route).
+ * - The reference route, returned as the first route in the _calculateRoute_
+ * Response, will start at the origin point specified in the _calculateRoute_
+ * Request. The initial part of the input reference route up until the origin
+ * point will be excluded from the Response.
+ * - The values of _minDeviationDistance_ and _minDeviationTime_ determine
+ * how far alternative routes will be guaranteed to follow the reference
+ * route from the origin point onwards.
+ * - The route must use _departAt_.
+ * - The _vehicleHeading_ is ignored. |
+ * | instructionsType | String | No | If specified, guidance instructions will be returned. Note that the instructionsType parameter cannot be used in conjunction with routeRepresentation=none |
+ * | language | String | No | The language parameter determines the language of the guidance messages. It does not affect proper nouns (the names of streets, plazas, etc.) It has no effect when instructionsType=coded. Allowed values are (a subset of) the IETF language tags described |
+ * | computeBestOrder | String | No | Re-order the route waypoints using a fast heuristic algorithm to reduce the route length. Yields best results when used in conjunction with routeType _shortest_. Notice that origin and destination are excluded from the optimized waypoint indices. To include origin and destination in the response, please increase all the indices by 1 to account for the origin, and then add the destination as the final index. Possible values are true or false. True computes a better order if possible, but is not allowed to be used in conjunction with maxAlternatives value greater than 0 or in conjunction with circle waypoints. False will use the locations in the given order and not allowed to be used in conjunction with routeRepresentation _none_. |
+ * | routeRepresentation | String | No | Specifies the representation of the set of routes provided as response. This parameter value can only be used in conjunction with computeBestOrder=true. |
+ * | computeTravelTimeFor | String | No | Specifies whether to return additional travel times using different types of traffic information (none, historic, live) as well as the default best-estimate travel time. |
+ * | vehicleHeading | String | No | The 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 |
+ * | report | String | No | Specifies which data should be reported for diagnosis purposes. The only possible value is _effectiveSettings_. Reports the effective parameters or data used when calling the API. In the case of defaulted parameters the default will be reflected where the parameter was not specified by the caller. |
+ * | sectionType | String | No | Specifies which of the section types is reported in the route response. <br><br>For example if sectionType = pedestrian the sections which are suited for pedestrians only are returned. Multiple types can be used. The default sectionType refers to the travelMode input. By default travelMode is set to car |
+ * | arriveAt | String | No | The date and time of arrival at the destination point. It must be specified as a dateTime. When a time zone offset is not specified it will be assumed to be that of the destination point. The arriveAt value must be in the future. The arriveAt parameter cannot be used in conjunction with departAt, minDeviationDistance or minDeviationTime. |
+ * | departAt | String | No | The date and time of departure from the origin point. Departure times apart from now must be specified as a dateTime. When a time zone offset is not specified, it will be assumed to be that of the origin point. The departAt value must be in the future in the date-time format (1996-12-19T16:39:57-08:00). |
+ * | vehicleAxleWeight | String | No | Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per axle are not considered. |
+ * | vehicleLength | String | No | Length of the vehicle in meters. A value of 0 means that length restrictions are not considered. |
+ * | vehicleHeight | String | No | Height of the vehicle in meters. A value of 0 means that height restrictions are not considered. |
+ * | vehicleWidth | String | No | Width of the vehicle in meters. A value of 0 means that width restrictions are not considered. |
+ * | vehicleMaxSpeed | String | No | 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.
+ *
+ * * A value of 0 means that an appropriate value for the vehicle will be determined and applied during route planning.
+ *
+ * * A 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. |
+ * | vehicleWeight | String | No | Weight of the vehicle in kilograms.
+ *
+ * * It is mandatory if any of the *Efficiency parameters are set.
+ *
+ * * It must be strictly positive when used in the context of the Consumption Model. Weight restrictions are considered.
+ *
+ * * If no detailed **Consumption Model** is specified and the value of **vehicleWeight** is non-zero, then weight restrictions are considered.
+ *
+ * * In all other cases, this parameter is ignored.
+ *
+ * Sensible Values : for **Combustion Model** : 1600, for **Electric Model** : 1900 |
+ * | vehicleCommercial | String | No | Whether the vehicle is used for commercial purposes. Commercial vehicles may not be allowed to drive on some roads. |
+ * | windingness | String | No | Level of turns for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | hilliness | String | No | Degree of hilliness for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | travelMode | String | No | The mode of travel for the requested route. If not defined, default is 'car'. Note that the requested travelMode may not be available for the entire route. Where the requested travelMode is not available for a particular section, the travelMode element of the response for that section will be "other". Note that travel modes bus, motorcycle, taxi and van are BETA functionality. Full restriction data is not available in all areas. In **calculateReachableRange** requests, the values bicycle and pedestrian must not be used. |
+ * | avoid | String | No | Specifies something that the route calculation should try to avoid when determining the route. Can be specified multiple times in one request, for example, '&avoid=motorways&avoid=tollRoads&avoid=ferries'. In calculateReachableRange requests, the value alreadyUsedRoads must not be used. |
+ * | traffic | String | No | Possible values:
+ * * true - Do consider all available traffic information during routing
+ * * false - Ignore current traffic data during routing. Note that although the current traffic data is ignored
+ * during routing, the effect of historic traffic on effective road speeds is still incorporated. |
+ * | routeType | String | No | The type of route requested. |
+ * | vehicleLoadType | String | No | 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 can be specified multiple times. This parameter is currently only considered for travelMode=truck. |
+ * | vehicleEngineType | String | No | Engine type of the vehicle. When a detailed Consumption Model is specified, it must be consistent with the value of **vehicleEngineType**. |
+ * | constantSpeedConsumptionInLitersPerHundredkm | String | No |
+ *
+ * Specifies the speed-dependent component of consumption.
+ *
+ * Provided as an unordered list of colon-delimited speed & consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
+ *
+ * * by linear interpolation, if the given speed lies in between two speeds in the list
+ *
+ * * by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list
+ *
+ * The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing.
+ *
+ * Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates.
+ *
+ * Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.
+ *
+ * The valid range for the consumption values(expressed in l/100km) is between 0.01 and 100000.0.
+ *
+ * Sensible Values : 50,6.3:130,11.5
+ *
+ * **Note** : This parameter is required for **The Combustion Consumption Model**. |
+ * | currentFuelInLiters | String | No | Specifies the current supply of fuel in liters.
+ *
+ * Sensible Values : 55 |
+ * | auxiliaryPowerInLitersPerHour | String | No | Specifies the amount of fuel consumed for sustaining auxiliary systems of the vehicle, in liters per hour.
+ *
+ * It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
+ *
+ * Sensible Values : 0.2 |
+ * | fuelEnergyDensityInMJoulesPerLiter | String | No | Specifies the amount of chemical energy stored in one liter of fuel in megajoules (MJ). It is used in conjunction with the ***Efficiency** parameters for conversions between saved or consumed energy and fuel. For example, energy density is 34.2 MJ/l for gasoline, and 35.8 MJ/l for Diesel fuel.
+ *
+ * This parameter is required if any ***Efficiency** parameter is set.
+ *
+ * Sensible Values : 34.2 |
+ * | accelerationEfficiency | String | No | Specifies the efficiency of converting chemical energy stored in fuel to kinetic energy when the vehicle accelerates _(i.e. KineticEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed_ is obtained by converting consumed fuel to chemical energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **decelerationEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**decelerationEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.33, for **Electric Model** : 0.66 |
+ * | decelerationEfficiency | String | No | Specifies the efficiency of converting kinetic energy to saved (not consumed) fuel when the vehicle decelerates _(i.e. ChemicalEnergySaved/KineticEnergyLost). ChemicalEnergySaved_ is obtained by converting saved (not consumed) fuel to energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **accelerationEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**accelerationEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.83, for **Electric Model** : 0.91 |
+ * | uphillEfficiency | String | No | Specifies the efficiency of converting chemical energy stored in fuel to potential energy when the vehicle gains elevation _(i.e. PotentialEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed_ is obtained by converting consumed fuel to chemical energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **downhillEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**downhillEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.27, for **Electric Model** : 0.74 |
+ * | downhillEfficiency | String | No | Specifies the efficiency of converting potential energy to saved (not consumed) fuel when the vehicle loses elevation _(i.e. ChemicalEnergySaved/PotentialEnergyLost). ChemicalEnergySaved_ is obtained by converting saved (not consumed) fuel to energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **uphillEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**uphillEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.51, for **Electric Model** : 0.73 |
+ * | constantSpeedConsumptionInkWhPerHundredkm | String | No | Specifies the speed-dependent component of consumption.
+ *
+ * Provided as an unordered list of speed/consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
+ *
+ * * by linear interpolation, if the given speed lies in between two speeds in the list
+ *
+ * * by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list
+ *
+ * The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing.
+ *
+ * Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates.
+ *
+ * Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.
+ *
+ * The valid range for the consumption values(expressed in kWh/100km) is between 0.01 and 100000.0.
+ *
+ * Sensible Values : 50,8.2:130,21.3
+ *
+ * This parameter is required for **Electric consumption model**. |
+ * | currentChargeInkWh | String | No | Specifies the current electric energy supply in kilowatt hours (kWh).
+ *
+ * This parameter co-exists with **maxChargeInkWh** parameter.
+ *
+ * The range of values allowed are 0.0 to **maxChargeInkWh**.
+ *
+ * Sensible Values : 43 |
+ * | maxChargeInkWh | String | No | Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in the vehicle's battery.
+ *
+ * This parameter co-exists with **currentChargeInkWh** parameter.
+ *
+ * Minimum value has to be greater than or equal to **currentChargeInkWh**.
+ *
+ * Sensible Values : 85 |
+ * | auxiliaryPowerInkW | String | No | Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts (kW).
+ *
+ * It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
+ *
+ * Sensible Values : 1.7 |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Request Body Schema
+ *
+ *
{@code
+ * {
+ * supportingPoints: {
+ * geometries: [
+ * {
+ * }
+ * ]
+ * }
+ * avoidVignette: [
+ * String
+ * ]
+ * allowVignette: [
+ * String
+ * ]
+ * avoidAreas: {
+ * coordinates: [
+ * [
+ * [
+ * [
+ * double
+ * ]
+ * ]
+ * ]
+ * ]
+ * }
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * formatVersion: String
+ * routes: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * }
+ * legs: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * points: [
+ * {
+ * latitude: Double
+ * longitude: Double
+ * }
+ * ]
+ * }
+ * ]
+ * sections: [
+ * {
+ * startPointIndex: Integer
+ * endPointIndex: Integer
+ * sectionType: String(CAR_TRAIN/COUNTRY/FERRY/MOTORWAY/PEDESTRIAN/TOLL_ROAD/TOLL_VIGNETTE/TRAFFIC/TRAVEL_MODE/TUNNEL/CARPOOL/URBAN)
+ * travelMode: String(car/truck/taxi/bus/van/motorcycle/bicycle/pedestrian/other)
+ * simpleCategory: String(JAM/ROAD_WORK/ROAD_CLOSURE/OTHER)
+ * effectiveSpeedInKmh: Integer
+ * delayInSeconds: Integer
+ * delayMagnitude: String(0/1/2/3/4)
+ * tec: {
+ * effectCode: Integer
+ * causes: [
+ * {
+ * mainCauseCode: Integer
+ * subCauseCode: Integer
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * guidance: {
+ * instructions: [
+ * {
+ * routeOffsetInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * point: (recursive schema, see point above)
+ * pointIndex: Integer
+ * instructionType: String(TURN/ROAD_CHANGE/LOCATION_DEPARTURE/LOCATION_ARRIVAL/DIRECTION_INFO/LOCATION_WAYPOINT)
+ * roadNumbers: [
+ * String
+ * ]
+ * exitNumber: String
+ * street: String
+ * signpostText: String
+ * countryCode: String
+ * stateCode: String
+ * junctionType: String(REGULAR/ROUNDABOUT/BIFURCATION)
+ * turnAngleInDegrees: Integer
+ * roundaboutExitNumber: String
+ * possibleCombineWithNext: Boolean
+ * drivingSide: String(LEFT/RIGHT)
+ * maneuver: String(ARRIVE/ARRIVE_LEFT/ARRIVE_RIGHT/DEPART/STRAIGHT/KEEP_RIGHT/BEAR_RIGHT/TURN_RIGHT/SHARP_RIGHT/KEEP_LEFT/BEAR_LEFT/TURN_LEFT/SHARP_LEFT/MAKE_UTURN/ENTER_MOTORWAY/ENTER_FREEWAY/ENTER_HIGHWAY/TAKE_EXIT/MOTORWAY_EXIT_LEFT/MOTORWAY_EXIT_RIGHT/TAKE_FERRY/ROUNDABOUT_CROSS/ROUNDABOUT_RIGHT/ROUNDABOUT_LEFT/ROUNDABOUT_BACK/TRY_MAKE_UTURN/FOLLOW/SWITCH_PARALLEL_ROAD/SWITCH_MAIN_ROAD/ENTRANCE_RAMP/WAYPOINT_LEFT/WAYPOINT_RIGHT/WAYPOINT_REACHED)
+ * message: String
+ * combinedMessage: String
+ * }
+ * ]
+ * instructionGroups: [
+ * {
+ * firstInstructionIndex: Integer
+ * lastInstructionIndex: Integer
+ * groupLengthInMeters: Integer
+ * groupMessage: String
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * optimizedWaypoints: [
+ * {
+ * providedIndex: Integer
+ * optimizedIndex: Integer
+ * }
+ * ]
+ * report: {
+ * effectiveSettings: [
+ * {
+ * key: String
+ * value: String
+ * }
+ * ]
+ * }
+ * }
+ * }
+ *
+ * @param format Desired format of the response. Value can be either _json_ or _xml_.
+ * @param routeDirectionParameters Used for reconstructing a route and for calculating zero or more alternative
+ * routes to this reference route. The provided sequence of coordinates is used as input for route
+ * reconstruction. The alternative routes are calculated between the origin and destination points specified in
+ * the base path parameter locations. If both minDeviationDistance and minDeviationTime are set to zero, then
+ * these origin and destination points are expected to be at (or very near) the beginning and end of the
+ * reference route, respectively. Intermediate locations (waypoints) are not supported when using
+ * supportingPoints.
+ * Setting at least one of minDeviationDistance or minDeviationTime to a value greater than zero has the
+ * following consequences:
+ *
* The origin point of the calculateRoute request must be on (or very near) the input reference route. If
+ * this is not the case, an error is returned. However, the origin point does not need to be at the beginning of
+ * the input reference route (it can be thought of as the current vehicle position on the reference route). *
+ * The reference route, returned as the first route in the calculateRoute response, will start at the origin
+ * point specified in the calculateRoute request. The initial part of the input reference route up until the
+ * origin point will be excluded from the response. * The values of minDeviationDistance and minDeviationTime
+ * determine how far alternative routes will be guaranteed to follow the reference route from the origin point
+ * onwards. * The route must use departAt. * The vehicleHeading is ignored.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @param context The context to associate with this operation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return this object is returned from a successful Route Directions call along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getRouteDirectionsWithAdditionalParametersWithResponseAsync(
+ String format, BinaryData routeDirectionParameters, RequestOptions requestOptions, Context context) {
+ return service.getRouteDirectionsWithAdditionalParameters(
+ this.client.getHost(),
+ this.client.getServiceVersion().getVersion(),
+ format,
+ routeDirectionParameters,
+ requestOptions,
+ context);
+ }
+
+ /**
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ * Returns a route between an origin and a destination, passing through waypoints if they are specified. The
+ * route will take into account factors such as current traffic and the typical road speeds on the requested day of
+ * the week and time of day.
+ *
+ *
Information returned includes the distance, estimated travel time, and a representation of the route geometry.
+ * Additional routing information such as optimized waypoint order or turn by turn instructions is also available,
+ * depending on the options selected.
+ *
+ *
Routing service provides a set of parameters for a detailed description of a vehicle-specific Consumption
+ * Model. Please check [Consumption Model](https://docs.microsoft.com/azure/azure-maps/consumption-model) for
+ * detailed explanation of the concepts and parameters involved.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ * | query | String | Yes | The Coordinates through which the route is calculated, delimited by a colon. A minimum of two coordinates is required. The first one is the origin and the last is the destination of the route. Optional coordinates in-between act as WayPoints in the route. You can pass up to 150 WayPoints. |
+ * | maxAlternatives | String | No | Number of desired alternative routes to be calculated. Default: 0, minimum: 0 and maximum: 5 |
+ * | alternativeType | String | No | Controls the optimality, with respect to the given planning criteria, of the calculated alternatives compared to the reference route. |
+ * | minDeviationDistance | String | No | All alternative routes returned will follow the reference route (see section POST Requests) from the origin point of the calculateRoute request for at least this number of meters. Can only be used when reconstructing a route. The minDeviationDistance parameter cannot be used in conjunction with arriveAt |
+ * | minDeviationTime | String | No | All alternative routes returned will follow the reference route (see section POST Requests) from the origin point of the calculateRoute request for at least this number of seconds. Can only be used when reconstructing a route. The minDeviationTime parameter cannot be used in conjunction with arriveAt. Default value is 0. Setting )minDeviationTime_ to a value greater than zero has the following consequences:
+ * - The origin point of the _calculateRoute_ Request must be on
+ * (or very near) the input reference route.
+ * - If this is not the case, an error is returned.
+ * - However, the origin point does not need to be at the beginning
+ * of the input reference route (it can be thought of as the current
+ * vehicle position on the reference route).
+ * - The reference route, returned as the first route in the _calculateRoute_
+ * Response, will start at the origin point specified in the _calculateRoute_
+ * Request. The initial part of the input reference route up until the origin
+ * point will be excluded from the Response.
+ * - The values of _minDeviationDistance_ and _minDeviationTime_ determine
+ * how far alternative routes will be guaranteed to follow the reference
+ * route from the origin point onwards.
+ * - The route must use _departAt_.
+ * - The _vehicleHeading_ is ignored. |
+ * | instructionsType | String | No | If specified, guidance instructions will be returned. Note that the instructionsType parameter cannot be used in conjunction with routeRepresentation=none |
+ * | language | String | No | The language parameter determines the language of the guidance messages. It does not affect proper nouns (the names of streets, plazas, etc.) It has no effect when instructionsType=coded. Allowed values are (a subset of) the IETF language tags described |
+ * | computeBestOrder | String | No | Re-order the route waypoints using a fast heuristic algorithm to reduce the route length. Yields best results when used in conjunction with routeType _shortest_. Notice that origin and destination are excluded from the optimized waypoint indices. To include origin and destination in the response, please increase all the indices by 1 to account for the origin, and then add the destination as the final index. Possible values are true or false. True computes a better order if possible, but is not allowed to be used in conjunction with maxAlternatives value greater than 0 or in conjunction with circle waypoints. False will use the locations in the given order and not allowed to be used in conjunction with routeRepresentation _none_. |
+ * | routeRepresentation | String | No | Specifies the representation of the set of routes provided as response. This parameter value can only be used in conjunction with computeBestOrder=true. |
+ * | computeTravelTimeFor | String | No | Specifies whether to return additional travel times using different types of traffic information (none, historic, live) as well as the default best-estimate travel time. |
+ * | vehicleHeading | String | No | The 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 |
+ * | report | String | No | Specifies which data should be reported for diagnosis purposes. The only possible value is _effectiveSettings_. Reports the effective parameters or data used when calling the API. In the case of defaulted parameters the default will be reflected where the parameter was not specified by the caller. |
+ * | sectionType | String | No | Specifies which of the section types is reported in the route response. <br><br>For example if sectionType = pedestrian the sections which are suited for pedestrians only are returned. Multiple types can be used. The default sectionType refers to the travelMode input. By default travelMode is set to car |
+ * | arriveAt | String | No | The date and time of arrival at the destination point. It must be specified as a dateTime. When a time zone offset is not specified it will be assumed to be that of the destination point. The arriveAt value must be in the future. The arriveAt parameter cannot be used in conjunction with departAt, minDeviationDistance or minDeviationTime. |
+ * | departAt | String | No | The date and time of departure from the origin point. Departure times apart from now must be specified as a dateTime. When a time zone offset is not specified, it will be assumed to be that of the origin point. The departAt value must be in the future in the date-time format (1996-12-19T16:39:57-08:00). |
+ * | vehicleAxleWeight | String | No | Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per axle are not considered. |
+ * | vehicleLength | String | No | Length of the vehicle in meters. A value of 0 means that length restrictions are not considered. |
+ * | vehicleHeight | String | No | Height of the vehicle in meters. A value of 0 means that height restrictions are not considered. |
+ * | vehicleWidth | String | No | Width of the vehicle in meters. A value of 0 means that width restrictions are not considered. |
+ * | vehicleMaxSpeed | String | No | 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.
+ *
+ * * A value of 0 means that an appropriate value for the vehicle will be determined and applied during route planning.
+ *
+ * * A 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. |
+ * | vehicleWeight | String | No | Weight of the vehicle in kilograms.
+ *
+ * * It is mandatory if any of the *Efficiency parameters are set.
+ *
+ * * It must be strictly positive when used in the context of the Consumption Model. Weight restrictions are considered.
+ *
+ * * If no detailed **Consumption Model** is specified and the value of **vehicleWeight** is non-zero, then weight restrictions are considered.
+ *
+ * * In all other cases, this parameter is ignored.
+ *
+ * Sensible Values : for **Combustion Model** : 1600, for **Electric Model** : 1900 |
+ * | vehicleCommercial | String | No | Whether the vehicle is used for commercial purposes. Commercial vehicles may not be allowed to drive on some roads. |
+ * | windingness | String | No | Level of turns for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | hilliness | String | No | Degree of hilliness for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | travelMode | String | No | The mode of travel for the requested route. If not defined, default is 'car'. Note that the requested travelMode may not be available for the entire route. Where the requested travelMode is not available for a particular section, the travelMode element of the response for that section will be "other". Note that travel modes bus, motorcycle, taxi and van are BETA functionality. Full restriction data is not available in all areas. In **calculateReachableRange** requests, the values bicycle and pedestrian must not be used. |
+ * | avoid | String | No | Specifies something that the route calculation should try to avoid when determining the route. Can be specified multiple times in one request, for example, '&avoid=motorways&avoid=tollRoads&avoid=ferries'. In calculateReachableRange requests, the value alreadyUsedRoads must not be used. |
+ * | traffic | String | No | Possible values:
+ * * true - Do consider all available traffic information during routing
+ * * false - Ignore current traffic data during routing. Note that although the current traffic data is ignored
+ * during routing, the effect of historic traffic on effective road speeds is still incorporated. |
+ * | routeType | String | No | The type of route requested. |
+ * | vehicleLoadType | String | No | 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 can be specified multiple times. This parameter is currently only considered for travelMode=truck. |
+ * | vehicleEngineType | String | No | Engine type of the vehicle. When a detailed Consumption Model is specified, it must be consistent with the value of **vehicleEngineType**. |
+ * | constantSpeedConsumptionInLitersPerHundredkm | String | No |
+ *
+ * Specifies the speed-dependent component of consumption.
+ *
+ * Provided as an unordered list of colon-delimited speed & consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
+ *
+ * * by linear interpolation, if the given speed lies in between two speeds in the list
+ *
+ * * by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list
+ *
+ * The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing.
+ *
+ * Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates.
+ *
+ * Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.
+ *
+ * The valid range for the consumption values(expressed in l/100km) is between 0.01 and 100000.0.
+ *
+ * Sensible Values : 50,6.3:130,11.5
+ *
+ * **Note** : This parameter is required for **The Combustion Consumption Model**. |
+ * | currentFuelInLiters | String | No | Specifies the current supply of fuel in liters.
+ *
+ * Sensible Values : 55 |
+ * | auxiliaryPowerInLitersPerHour | String | No | Specifies the amount of fuel consumed for sustaining auxiliary systems of the vehicle, in liters per hour.
+ *
+ * It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
+ *
+ * Sensible Values : 0.2 |
+ * | fuelEnergyDensityInMJoulesPerLiter | String | No | Specifies the amount of chemical energy stored in one liter of fuel in megajoules (MJ). It is used in conjunction with the ***Efficiency** parameters for conversions between saved or consumed energy and fuel. For example, energy density is 34.2 MJ/l for gasoline, and 35.8 MJ/l for Diesel fuel.
+ *
+ * This parameter is required if any ***Efficiency** parameter is set.
+ *
+ * Sensible Values : 34.2 |
+ * | accelerationEfficiency | String | No | Specifies the efficiency of converting chemical energy stored in fuel to kinetic energy when the vehicle accelerates _(i.e. KineticEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed_ is obtained by converting consumed fuel to chemical energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **decelerationEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**decelerationEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.33, for **Electric Model** : 0.66 |
+ * | decelerationEfficiency | String | No | Specifies the efficiency of converting kinetic energy to saved (not consumed) fuel when the vehicle decelerates _(i.e. ChemicalEnergySaved/KineticEnergyLost). ChemicalEnergySaved_ is obtained by converting saved (not consumed) fuel to energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **accelerationEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**accelerationEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.83, for **Electric Model** : 0.91 |
+ * | uphillEfficiency | String | No | Specifies the efficiency of converting chemical energy stored in fuel to potential energy when the vehicle gains elevation _(i.e. PotentialEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed_ is obtained by converting consumed fuel to chemical energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **downhillEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**downhillEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.27, for **Electric Model** : 0.74 |
+ * | downhillEfficiency | String | No | Specifies the efficiency of converting potential energy to saved (not consumed) fuel when the vehicle loses elevation _(i.e. ChemicalEnergySaved/PotentialEnergyLost). ChemicalEnergySaved_ is obtained by converting saved (not consumed) fuel to energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **uphillEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**uphillEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.51, for **Electric Model** : 0.73 |
+ * | constantSpeedConsumptionInkWhPerHundredkm | String | No | Specifies the speed-dependent component of consumption.
+ *
+ * Provided as an unordered list of speed/consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
+ *
+ * * by linear interpolation, if the given speed lies in between two speeds in the list
+ *
+ * * by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list
+ *
+ * The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing.
+ *
+ * Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates.
+ *
+ * Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.
+ *
+ * The valid range for the consumption values(expressed in kWh/100km) is between 0.01 and 100000.0.
+ *
+ * Sensible Values : 50,8.2:130,21.3
+ *
+ * This parameter is required for **Electric consumption model**. |
+ * | currentChargeInkWh | String | No | Specifies the current electric energy supply in kilowatt hours (kWh).
+ *
+ * This parameter co-exists with **maxChargeInkWh** parameter.
+ *
+ * The range of values allowed are 0.0 to **maxChargeInkWh**.
+ *
+ * Sensible Values : 43 |
+ * | maxChargeInkWh | String | No | Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in the vehicle's battery.
+ *
+ * This parameter co-exists with **currentChargeInkWh** parameter.
+ *
+ * Minimum value has to be greater than or equal to **currentChargeInkWh**.
+ *
+ * Sensible Values : 85 |
+ * | auxiliaryPowerInkW | String | No | Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts (kW).
+ *
+ * It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
+ *
+ * Sensible Values : 1.7 |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Request Body Schema
+ *
+ *
{@code
+ * {
+ * supportingPoints: {
+ * geometries: [
+ * {
+ * }
+ * ]
+ * }
+ * avoidVignette: [
+ * String
+ * ]
+ * allowVignette: [
+ * String
+ * ]
+ * avoidAreas: {
+ * coordinates: [
+ * [
+ * [
+ * [
+ * double
+ * ]
+ * ]
+ * ]
+ * ]
+ * }
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * formatVersion: String
+ * routes: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * }
+ * legs: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * points: [
+ * {
+ * latitude: Double
+ * longitude: Double
+ * }
+ * ]
+ * }
+ * ]
+ * sections: [
+ * {
+ * startPointIndex: Integer
+ * endPointIndex: Integer
+ * sectionType: String(CAR_TRAIN/COUNTRY/FERRY/MOTORWAY/PEDESTRIAN/TOLL_ROAD/TOLL_VIGNETTE/TRAFFIC/TRAVEL_MODE/TUNNEL/CARPOOL/URBAN)
+ * travelMode: String(car/truck/taxi/bus/van/motorcycle/bicycle/pedestrian/other)
+ * simpleCategory: String(JAM/ROAD_WORK/ROAD_CLOSURE/OTHER)
+ * effectiveSpeedInKmh: Integer
+ * delayInSeconds: Integer
+ * delayMagnitude: String(0/1/2/3/4)
+ * tec: {
+ * effectCode: Integer
+ * causes: [
+ * {
+ * mainCauseCode: Integer
+ * subCauseCode: Integer
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * guidance: {
+ * instructions: [
+ * {
+ * routeOffsetInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * point: (recursive schema, see point above)
+ * pointIndex: Integer
+ * instructionType: String(TURN/ROAD_CHANGE/LOCATION_DEPARTURE/LOCATION_ARRIVAL/DIRECTION_INFO/LOCATION_WAYPOINT)
+ * roadNumbers: [
+ * String
+ * ]
+ * exitNumber: String
+ * street: String
+ * signpostText: String
+ * countryCode: String
+ * stateCode: String
+ * junctionType: String(REGULAR/ROUNDABOUT/BIFURCATION)
+ * turnAngleInDegrees: Integer
+ * roundaboutExitNumber: String
+ * possibleCombineWithNext: Boolean
+ * drivingSide: String(LEFT/RIGHT)
+ * maneuver: String(ARRIVE/ARRIVE_LEFT/ARRIVE_RIGHT/DEPART/STRAIGHT/KEEP_RIGHT/BEAR_RIGHT/TURN_RIGHT/SHARP_RIGHT/KEEP_LEFT/BEAR_LEFT/TURN_LEFT/SHARP_LEFT/MAKE_UTURN/ENTER_MOTORWAY/ENTER_FREEWAY/ENTER_HIGHWAY/TAKE_EXIT/MOTORWAY_EXIT_LEFT/MOTORWAY_EXIT_RIGHT/TAKE_FERRY/ROUNDABOUT_CROSS/ROUNDABOUT_RIGHT/ROUNDABOUT_LEFT/ROUNDABOUT_BACK/TRY_MAKE_UTURN/FOLLOW/SWITCH_PARALLEL_ROAD/SWITCH_MAIN_ROAD/ENTRANCE_RAMP/WAYPOINT_LEFT/WAYPOINT_RIGHT/WAYPOINT_REACHED)
+ * message: String
+ * combinedMessage: String
+ * }
+ * ]
+ * instructionGroups: [
+ * {
+ * firstInstructionIndex: Integer
+ * lastInstructionIndex: Integer
+ * groupLengthInMeters: Integer
+ * groupMessage: String
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * optimizedWaypoints: [
+ * {
+ * providedIndex: Integer
+ * optimizedIndex: Integer
+ * }
+ * ]
+ * report: {
+ * effectiveSettings: [
+ * {
+ * key: String
+ * value: String
+ * }
+ * ]
+ * }
+ * }
+ * }
+ *
+ * @param format Desired format of the response. Value can be either _json_ or _xml_.
+ * @param routeDirectionParameters Used for reconstructing a route and for calculating zero or more alternative
+ * routes to this reference route. The provided sequence of coordinates is used as input for route
+ * reconstruction. The alternative routes are calculated between the origin and destination points specified in
+ * the base path parameter locations. If both minDeviationDistance and minDeviationTime are set to zero, then
+ * these origin and destination points are expected to be at (or very near) the beginning and end of the
+ * reference route, respectively. Intermediate locations (waypoints) are not supported when using
+ * supportingPoints.
+ * Setting at least one of minDeviationDistance or minDeviationTime to a value greater than zero has the
+ * following consequences:
+ *
* The origin point of the calculateRoute request must be on (or very near) the input reference route. If
+ * this is not the case, an error is returned. However, the origin point does not need to be at the beginning of
+ * the input reference route (it can be thought of as the current vehicle position on the reference route). *
+ * The reference route, returned as the first route in the calculateRoute response, will start at the origin
+ * point specified in the calculateRoute request. The initial part of the input reference route up until the
+ * origin point will be excluded from the response. * The values of minDeviationDistance and minDeviationTime
+ * determine how far alternative routes will be guaranteed to follow the reference route from the origin point
+ * onwards. * The route must use departAt. * The vehicleHeading is ignored.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return this object is returned from a successful Route Directions call along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getRouteDirectionsWithAdditionalParametersWithResponse(
+ String format, BinaryData routeDirectionParameters, RequestOptions requestOptions) {
+ return getRouteDirectionsWithAdditionalParametersWithResponseAsync(
+ format, routeDirectionParameters, requestOptions)
+ .block();
+ }
+
+ /**
+ * __Route Range (Isochrone) API__
+ *
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ *
This service will calculate a set of locations that can be reached from the origin point based on fuel,
+ * energy, time or distance budget that is specified. A polygon boundary (or Isochrone) is returned in a
+ * counterclockwise orientation as well as the precise polygon center which was the result of the origin point.
+ *
+ *
The returned polygon can be used for further processing such as [Search Inside
+ * Geometry](https://docs.microsoft.com/rest/api/maps/search/postsearchinsidegeometry) to search for POIs within the
+ * provided Isochrone.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ * | query | String | Yes | The Coordinate from which the range calculation should start. |
+ * | fuelBudgetInLiters | String | No | Fuel budget in liters that determines maximal range which can be travelled using the specified Combustion Consumption Model.<br> When fuelBudgetInLiters is used, it is mandatory to specify a detailed Combustion Consumption Model.<br> Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used. |
+ * | energyBudgetInkWh | String | No | Electric energy budget in kilowatt hours (kWh) that determines maximal range which can be travelled using the specified Electric Consumption Model.<br> When energyBudgetInkWh is used, it is mandatory to specify a detailed Electric Consumption Model.<br> Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used. |
+ * | timeBudgetInSec | String | No | Time budget in seconds that determines maximal range which can be travelled using driving time. The Consumption Model will only affect the range when routeType is eco.<br> Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used. |
+ * | distanceBudgetInMeters | String | No | Distance budget in meters that determines maximal range which can be travelled using driving distance. The Consumption Model will only affect the range when routeType is eco.<br> Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used. |
+ * | departAt | String | No | The date and time of departure from the origin point. Departure times apart from now must be specified as a dateTime. When a time zone offset is not specified, it will be assumed to be that of the origin point. The departAt value must be in the future in the date-time format (1996-12-19T16:39:57-08:00). |
+ * | routeType | String | No | The type of route requested. |
+ * | traffic | String | No | Possible values:
+ * * true - Do consider all available traffic information during routing
+ * * false - Ignore current traffic data during routing. Note that although the current traffic data is ignored
+ * during routing, the effect of historic traffic on effective road speeds is still incorporated. |
+ * | avoid | String | No | Specifies something that the route calculation should try to avoid when determining the route. Can be specified multiple times in one request, for example, '&avoid=motorways&avoid=tollRoads&avoid=ferries'. In calculateReachableRange requests, the value alreadyUsedRoads must not be used. |
+ * | travelMode | String | No | The mode of travel for the requested route. If not defined, default is 'car'. Note that the requested travelMode may not be available for the entire route. Where the requested travelMode is not available for a particular section, the travelMode element of the response for that section will be "other". Note that travel modes bus, motorcycle, taxi and van are BETA functionality. Full restriction data is not available in all areas. In **calculateReachableRange** requests, the values bicycle and pedestrian must not be used. |
+ * | hilliness | String | No | Degree of hilliness for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | windingness | String | No | Level of turns for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | vehicleAxleWeight | String | No | Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per axle are not considered. |
+ * | vehicleWidth | String | No | Width of the vehicle in meters. A value of 0 means that width restrictions are not considered. |
+ * | vehicleHeight | String | No | Height of the vehicle in meters. A value of 0 means that height restrictions are not considered. |
+ * | vehicleLength | String | No | Length of the vehicle in meters. A value of 0 means that length restrictions are not considered. |
+ * | vehicleMaxSpeed | String | No | 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.
+ *
+ * * A value of 0 means that an appropriate value for the vehicle will be determined and applied during route planning.
+ *
+ * * A 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. |
+ * | vehicleWeight | String | No | Weight of the vehicle in kilograms.
+ *
+ * * It is mandatory if any of the *Efficiency parameters are set.
+ *
+ * * It must be strictly positive when used in the context of the Consumption Model. Weight restrictions are considered.
+ *
+ * * If no detailed **Consumption Model** is specified and the value of **vehicleWeight** is non-zero, then weight restrictions are considered.
+ *
+ * * In all other cases, this parameter is ignored.
+ *
+ * Sensible Values : for **Combustion Model** : 1600, for **Electric Model** : 1900 |
+ * | vehicleCommercial | String | No | Whether the vehicle is used for commercial purposes. Commercial vehicles may not be allowed to drive on some roads. |
+ * | vehicleLoadType | String | No | 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 can be specified multiple times. This parameter is currently only considered for travelMode=truck. |
+ * | vehicleEngineType | String | No | Engine type of the vehicle. When a detailed Consumption Model is specified, it must be consistent with the value of **vehicleEngineType**. |
+ * | constantSpeedConsumptionInLitersPerHundredkm | String | No |
+ *
+ * Specifies the speed-dependent component of consumption.
+ *
+ * Provided as an unordered list of colon-delimited speed & consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
+ *
+ * * by linear interpolation, if the given speed lies in between two speeds in the list
+ *
+ * * by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list
+ *
+ * The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing.
+ *
+ * Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates.
+ *
+ * Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.
+ *
+ * The valid range for the consumption values(expressed in l/100km) is between 0.01 and 100000.0.
+ *
+ * Sensible Values : 50,6.3:130,11.5
+ *
+ * **Note** : This parameter is required for **The Combustion Consumption Model**. |
+ * | currentFuelInLiters | String | No | Specifies the current supply of fuel in liters.
+ *
+ * Sensible Values : 55 |
+ * | auxiliaryPowerInLitersPerHour | String | No | Specifies the amount of fuel consumed for sustaining auxiliary systems of the vehicle, in liters per hour.
+ *
+ * It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
+ *
+ * Sensible Values : 0.2 |
+ * | fuelEnergyDensityInMJoulesPerLiter | String | No | Specifies the amount of chemical energy stored in one liter of fuel in megajoules (MJ). It is used in conjunction with the ***Efficiency** parameters for conversions between saved or consumed energy and fuel. For example, energy density is 34.2 MJ/l for gasoline, and 35.8 MJ/l for Diesel fuel.
+ *
+ * This parameter is required if any ***Efficiency** parameter is set.
+ *
+ * Sensible Values : 34.2 |
+ * | accelerationEfficiency | String | No | Specifies the efficiency of converting chemical energy stored in fuel to kinetic energy when the vehicle accelerates _(i.e. KineticEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed_ is obtained by converting consumed fuel to chemical energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **decelerationEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**decelerationEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.33, for **Electric Model** : 0.66 |
+ * | decelerationEfficiency | String | No | Specifies the efficiency of converting kinetic energy to saved (not consumed) fuel when the vehicle decelerates _(i.e. ChemicalEnergySaved/KineticEnergyLost). ChemicalEnergySaved_ is obtained by converting saved (not consumed) fuel to energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **accelerationEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**accelerationEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.83, for **Electric Model** : 0.91 |
+ * | uphillEfficiency | String | No | Specifies the efficiency of converting chemical energy stored in fuel to potential energy when the vehicle gains elevation _(i.e. PotentialEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed_ is obtained by converting consumed fuel to chemical energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **downhillEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**downhillEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.27, for **Electric Model** : 0.74 |
+ * | downhillEfficiency | String | No | Specifies the efficiency of converting potential energy to saved (not consumed) fuel when the vehicle loses elevation _(i.e. ChemicalEnergySaved/PotentialEnergyLost). ChemicalEnergySaved_ is obtained by converting saved (not consumed) fuel to energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **uphillEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**uphillEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.51, for **Electric Model** : 0.73 |
+ * | constantSpeedConsumptionInkWhPerHundredkm | String | No | Specifies the speed-dependent component of consumption.
+ *
+ * Provided as an unordered list of speed/consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
+ *
+ * * by linear interpolation, if the given speed lies in between two speeds in the list
+ *
+ * * by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list
+ *
+ * The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing.
+ *
+ * Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates.
+ *
+ * Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.
+ *
+ * The valid range for the consumption values(expressed in kWh/100km) is between 0.01 and 100000.0.
+ *
+ * Sensible Values : 50,8.2:130,21.3
+ *
+ * This parameter is required for **Electric consumption model**. |
+ * | currentChargeInkWh | String | No | Specifies the current electric energy supply in kilowatt hours (kWh).
+ *
+ * This parameter co-exists with **maxChargeInkWh** parameter.
+ *
+ * The range of values allowed are 0.0 to **maxChargeInkWh**.
+ *
+ * Sensible Values : 43 |
+ * | maxChargeInkWh | String | No | Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in the vehicle's battery.
+ *
+ * This parameter co-exists with **currentChargeInkWh** parameter.
+ *
+ * Minimum value has to be greater than or equal to **currentChargeInkWh**.
+ *
+ * Sensible Values : 85 |
+ * | auxiliaryPowerInkW | String | No | Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts (kW).
+ *
+ * It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
+ *
+ * Sensible Values : 1.7 |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * formatVersion: String
+ * reachableRange: {
+ * center: {
+ * latitude: Double
+ * longitude: Double
+ * }
+ * boundary: [
+ * (recursive schema, see above)
+ * ]
+ * }
+ * report: {
+ * effectiveSettings: [
+ * {
+ * key: String
+ * value: String
+ * }
+ * ]
+ * }
+ * }
+ * }
+ *
+ * @param format Desired format of the response. Value can be either _json_ or _xml_.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return this object is returned from a successful Route Reachable Range call along with {@link Response} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getRouteRangeWithResponseAsync(String format, RequestOptions requestOptions) {
+ return FluxUtil.withContext(
+ context ->
+ service.getRouteRange(
+ this.client.getHost(),
+ this.client.getServiceVersion().getVersion(),
+ format,
+ requestOptions,
+ context));
+ }
+
+ /**
+ * __Route Range (Isochrone) API__
+ *
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ *
This service will calculate a set of locations that can be reached from the origin point based on fuel,
+ * energy, time or distance budget that is specified. A polygon boundary (or Isochrone) is returned in a
+ * counterclockwise orientation as well as the precise polygon center which was the result of the origin point.
+ *
+ *
The returned polygon can be used for further processing such as [Search Inside
+ * Geometry](https://docs.microsoft.com/rest/api/maps/search/postsearchinsidegeometry) to search for POIs within the
+ * provided Isochrone.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ * | query | String | Yes | The Coordinate from which the range calculation should start. |
+ * | fuelBudgetInLiters | String | No | Fuel budget in liters that determines maximal range which can be travelled using the specified Combustion Consumption Model.<br> When fuelBudgetInLiters is used, it is mandatory to specify a detailed Combustion Consumption Model.<br> Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used. |
+ * | energyBudgetInkWh | String | No | Electric energy budget in kilowatt hours (kWh) that determines maximal range which can be travelled using the specified Electric Consumption Model.<br> When energyBudgetInkWh is used, it is mandatory to specify a detailed Electric Consumption Model.<br> Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used. |
+ * | timeBudgetInSec | String | No | Time budget in seconds that determines maximal range which can be travelled using driving time. The Consumption Model will only affect the range when routeType is eco.<br> Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used. |
+ * | distanceBudgetInMeters | String | No | Distance budget in meters that determines maximal range which can be travelled using driving distance. The Consumption Model will only affect the range when routeType is eco.<br> Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used. |
+ * | departAt | String | No | The date and time of departure from the origin point. Departure times apart from now must be specified as a dateTime. When a time zone offset is not specified, it will be assumed to be that of the origin point. The departAt value must be in the future in the date-time format (1996-12-19T16:39:57-08:00). |
+ * | routeType | String | No | The type of route requested. |
+ * | traffic | String | No | Possible values:
+ * * true - Do consider all available traffic information during routing
+ * * false - Ignore current traffic data during routing. Note that although the current traffic data is ignored
+ * during routing, the effect of historic traffic on effective road speeds is still incorporated. |
+ * | avoid | String | No | Specifies something that the route calculation should try to avoid when determining the route. Can be specified multiple times in one request, for example, '&avoid=motorways&avoid=tollRoads&avoid=ferries'. In calculateReachableRange requests, the value alreadyUsedRoads must not be used. |
+ * | travelMode | String | No | The mode of travel for the requested route. If not defined, default is 'car'. Note that the requested travelMode may not be available for the entire route. Where the requested travelMode is not available for a particular section, the travelMode element of the response for that section will be "other". Note that travel modes bus, motorcycle, taxi and van are BETA functionality. Full restriction data is not available in all areas. In **calculateReachableRange** requests, the values bicycle and pedestrian must not be used. |
+ * | hilliness | String | No | Degree of hilliness for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | windingness | String | No | Level of turns for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | vehicleAxleWeight | String | No | Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per axle are not considered. |
+ * | vehicleWidth | String | No | Width of the vehicle in meters. A value of 0 means that width restrictions are not considered. |
+ * | vehicleHeight | String | No | Height of the vehicle in meters. A value of 0 means that height restrictions are not considered. |
+ * | vehicleLength | String | No | Length of the vehicle in meters. A value of 0 means that length restrictions are not considered. |
+ * | vehicleMaxSpeed | String | No | 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.
+ *
+ * * A value of 0 means that an appropriate value for the vehicle will be determined and applied during route planning.
+ *
+ * * A 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. |
+ * | vehicleWeight | String | No | Weight of the vehicle in kilograms.
+ *
+ * * It is mandatory if any of the *Efficiency parameters are set.
+ *
+ * * It must be strictly positive when used in the context of the Consumption Model. Weight restrictions are considered.
+ *
+ * * If no detailed **Consumption Model** is specified and the value of **vehicleWeight** is non-zero, then weight restrictions are considered.
+ *
+ * * In all other cases, this parameter is ignored.
+ *
+ * Sensible Values : for **Combustion Model** : 1600, for **Electric Model** : 1900 |
+ * | vehicleCommercial | String | No | Whether the vehicle is used for commercial purposes. Commercial vehicles may not be allowed to drive on some roads. |
+ * | vehicleLoadType | String | No | 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 can be specified multiple times. This parameter is currently only considered for travelMode=truck. |
+ * | vehicleEngineType | String | No | Engine type of the vehicle. When a detailed Consumption Model is specified, it must be consistent with the value of **vehicleEngineType**. |
+ * | constantSpeedConsumptionInLitersPerHundredkm | String | No |
+ *
+ * Specifies the speed-dependent component of consumption.
+ *
+ * Provided as an unordered list of colon-delimited speed & consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
+ *
+ * * by linear interpolation, if the given speed lies in between two speeds in the list
+ *
+ * * by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list
+ *
+ * The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing.
+ *
+ * Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates.
+ *
+ * Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.
+ *
+ * The valid range for the consumption values(expressed in l/100km) is between 0.01 and 100000.0.
+ *
+ * Sensible Values : 50,6.3:130,11.5
+ *
+ * **Note** : This parameter is required for **The Combustion Consumption Model**. |
+ * | currentFuelInLiters | String | No | Specifies the current supply of fuel in liters.
+ *
+ * Sensible Values : 55 |
+ * | auxiliaryPowerInLitersPerHour | String | No | Specifies the amount of fuel consumed for sustaining auxiliary systems of the vehicle, in liters per hour.
+ *
+ * It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
+ *
+ * Sensible Values : 0.2 |
+ * | fuelEnergyDensityInMJoulesPerLiter | String | No | Specifies the amount of chemical energy stored in one liter of fuel in megajoules (MJ). It is used in conjunction with the ***Efficiency** parameters for conversions between saved or consumed energy and fuel. For example, energy density is 34.2 MJ/l for gasoline, and 35.8 MJ/l for Diesel fuel.
+ *
+ * This parameter is required if any ***Efficiency** parameter is set.
+ *
+ * Sensible Values : 34.2 |
+ * | accelerationEfficiency | String | No | Specifies the efficiency of converting chemical energy stored in fuel to kinetic energy when the vehicle accelerates _(i.e. KineticEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed_ is obtained by converting consumed fuel to chemical energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **decelerationEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**decelerationEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.33, for **Electric Model** : 0.66 |
+ * | decelerationEfficiency | String | No | Specifies the efficiency of converting kinetic energy to saved (not consumed) fuel when the vehicle decelerates _(i.e. ChemicalEnergySaved/KineticEnergyLost). ChemicalEnergySaved_ is obtained by converting saved (not consumed) fuel to energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **accelerationEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**accelerationEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.83, for **Electric Model** : 0.91 |
+ * | uphillEfficiency | String | No | Specifies the efficiency of converting chemical energy stored in fuel to potential energy when the vehicle gains elevation _(i.e. PotentialEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed_ is obtained by converting consumed fuel to chemical energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **downhillEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**downhillEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.27, for **Electric Model** : 0.74 |
+ * | downhillEfficiency | String | No | Specifies the efficiency of converting potential energy to saved (not consumed) fuel when the vehicle loses elevation _(i.e. ChemicalEnergySaved/PotentialEnergyLost). ChemicalEnergySaved_ is obtained by converting saved (not consumed) fuel to energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **uphillEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**uphillEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.51, for **Electric Model** : 0.73 |
+ * | constantSpeedConsumptionInkWhPerHundredkm | String | No | Specifies the speed-dependent component of consumption.
+ *
+ * Provided as an unordered list of speed/consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
+ *
+ * * by linear interpolation, if the given speed lies in between two speeds in the list
+ *
+ * * by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list
+ *
+ * The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing.
+ *
+ * Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates.
+ *
+ * Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.
+ *
+ * The valid range for the consumption values(expressed in kWh/100km) is between 0.01 and 100000.0.
+ *
+ * Sensible Values : 50,8.2:130,21.3
+ *
+ * This parameter is required for **Electric consumption model**. |
+ * | currentChargeInkWh | String | No | Specifies the current electric energy supply in kilowatt hours (kWh).
+ *
+ * This parameter co-exists with **maxChargeInkWh** parameter.
+ *
+ * The range of values allowed are 0.0 to **maxChargeInkWh**.
+ *
+ * Sensible Values : 43 |
+ * | maxChargeInkWh | String | No | Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in the vehicle's battery.
+ *
+ * This parameter co-exists with **currentChargeInkWh** parameter.
+ *
+ * Minimum value has to be greater than or equal to **currentChargeInkWh**.
+ *
+ * Sensible Values : 85 |
+ * | auxiliaryPowerInkW | String | No | Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts (kW).
+ *
+ * It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
+ *
+ * Sensible Values : 1.7 |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * formatVersion: String
+ * reachableRange: {
+ * center: {
+ * latitude: Double
+ * longitude: Double
+ * }
+ * boundary: [
+ * (recursive schema, see above)
+ * ]
+ * }
+ * report: {
+ * effectiveSettings: [
+ * {
+ * key: String
+ * value: String
+ * }
+ * ]
+ * }
+ * }
+ * }
+ *
+ * @param format Desired format of the response. Value can be either _json_ or _xml_.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @param context The context to associate with this operation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return this object is returned from a successful Route Reachable Range call along with {@link Response} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getRouteRangeWithResponseAsync(
+ String format, RequestOptions requestOptions, Context context) {
+ return service.getRouteRange(
+ this.client.getHost(), this.client.getServiceVersion().getVersion(), format, requestOptions, context);
+ }
+
+ /**
+ * __Route Range (Isochrone) API__
+ *
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ *
This service will calculate a set of locations that can be reached from the origin point based on fuel,
+ * energy, time or distance budget that is specified. A polygon boundary (or Isochrone) is returned in a
+ * counterclockwise orientation as well as the precise polygon center which was the result of the origin point.
+ *
+ *
The returned polygon can be used for further processing such as [Search Inside
+ * Geometry](https://docs.microsoft.com/rest/api/maps/search/postsearchinsidegeometry) to search for POIs within the
+ * provided Isochrone.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ * | query | String | Yes | The Coordinate from which the range calculation should start. |
+ * | fuelBudgetInLiters | String | No | Fuel budget in liters that determines maximal range which can be travelled using the specified Combustion Consumption Model.<br> When fuelBudgetInLiters is used, it is mandatory to specify a detailed Combustion Consumption Model.<br> Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used. |
+ * | energyBudgetInkWh | String | No | Electric energy budget in kilowatt hours (kWh) that determines maximal range which can be travelled using the specified Electric Consumption Model.<br> When energyBudgetInkWh is used, it is mandatory to specify a detailed Electric Consumption Model.<br> Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used. |
+ * | timeBudgetInSec | String | No | Time budget in seconds that determines maximal range which can be travelled using driving time. The Consumption Model will only affect the range when routeType is eco.<br> Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used. |
+ * | distanceBudgetInMeters | String | No | Distance budget in meters that determines maximal range which can be travelled using driving distance. The Consumption Model will only affect the range when routeType is eco.<br> Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used. |
+ * | departAt | String | No | The date and time of departure from the origin point. Departure times apart from now must be specified as a dateTime. When a time zone offset is not specified, it will be assumed to be that of the origin point. The departAt value must be in the future in the date-time format (1996-12-19T16:39:57-08:00). |
+ * | routeType | String | No | The type of route requested. |
+ * | traffic | String | No | Possible values:
+ * * true - Do consider all available traffic information during routing
+ * * false - Ignore current traffic data during routing. Note that although the current traffic data is ignored
+ * during routing, the effect of historic traffic on effective road speeds is still incorporated. |
+ * | avoid | String | No | Specifies something that the route calculation should try to avoid when determining the route. Can be specified multiple times in one request, for example, '&avoid=motorways&avoid=tollRoads&avoid=ferries'. In calculateReachableRange requests, the value alreadyUsedRoads must not be used. |
+ * | travelMode | String | No | The mode of travel for the requested route. If not defined, default is 'car'. Note that the requested travelMode may not be available for the entire route. Where the requested travelMode is not available for a particular section, the travelMode element of the response for that section will be "other". Note that travel modes bus, motorcycle, taxi and van are BETA functionality. Full restriction data is not available in all areas. In **calculateReachableRange** requests, the values bicycle and pedestrian must not be used. |
+ * | hilliness | String | No | Degree of hilliness for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | windingness | String | No | Level of turns for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. |
+ * | vehicleAxleWeight | String | No | Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per axle are not considered. |
+ * | vehicleWidth | String | No | Width of the vehicle in meters. A value of 0 means that width restrictions are not considered. |
+ * | vehicleHeight | String | No | Height of the vehicle in meters. A value of 0 means that height restrictions are not considered. |
+ * | vehicleLength | String | No | Length of the vehicle in meters. A value of 0 means that length restrictions are not considered. |
+ * | vehicleMaxSpeed | String | No | 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.
+ *
+ * * A value of 0 means that an appropriate value for the vehicle will be determined and applied during route planning.
+ *
+ * * A 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. |
+ * | vehicleWeight | String | No | Weight of the vehicle in kilograms.
+ *
+ * * It is mandatory if any of the *Efficiency parameters are set.
+ *
+ * * It must be strictly positive when used in the context of the Consumption Model. Weight restrictions are considered.
+ *
+ * * If no detailed **Consumption Model** is specified and the value of **vehicleWeight** is non-zero, then weight restrictions are considered.
+ *
+ * * In all other cases, this parameter is ignored.
+ *
+ * Sensible Values : for **Combustion Model** : 1600, for **Electric Model** : 1900 |
+ * | vehicleCommercial | String | No | Whether the vehicle is used for commercial purposes. Commercial vehicles may not be allowed to drive on some roads. |
+ * | vehicleLoadType | String | No | 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 can be specified multiple times. This parameter is currently only considered for travelMode=truck. |
+ * | vehicleEngineType | String | No | Engine type of the vehicle. When a detailed Consumption Model is specified, it must be consistent with the value of **vehicleEngineType**. |
+ * | constantSpeedConsumptionInLitersPerHundredkm | String | No |
+ *
+ * Specifies the speed-dependent component of consumption.
+ *
+ * Provided as an unordered list of colon-delimited speed & consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
+ *
+ * * by linear interpolation, if the given speed lies in between two speeds in the list
+ *
+ * * by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list
+ *
+ * The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing.
+ *
+ * Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates.
+ *
+ * Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.
+ *
+ * The valid range for the consumption values(expressed in l/100km) is between 0.01 and 100000.0.
+ *
+ * Sensible Values : 50,6.3:130,11.5
+ *
+ * **Note** : This parameter is required for **The Combustion Consumption Model**. |
+ * | currentFuelInLiters | String | No | Specifies the current supply of fuel in liters.
+ *
+ * Sensible Values : 55 |
+ * | auxiliaryPowerInLitersPerHour | String | No | Specifies the amount of fuel consumed for sustaining auxiliary systems of the vehicle, in liters per hour.
+ *
+ * It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
+ *
+ * Sensible Values : 0.2 |
+ * | fuelEnergyDensityInMJoulesPerLiter | String | No | Specifies the amount of chemical energy stored in one liter of fuel in megajoules (MJ). It is used in conjunction with the ***Efficiency** parameters for conversions between saved or consumed energy and fuel. For example, energy density is 34.2 MJ/l for gasoline, and 35.8 MJ/l for Diesel fuel.
+ *
+ * This parameter is required if any ***Efficiency** parameter is set.
+ *
+ * Sensible Values : 34.2 |
+ * | accelerationEfficiency | String | No | Specifies the efficiency of converting chemical energy stored in fuel to kinetic energy when the vehicle accelerates _(i.e. KineticEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed_ is obtained by converting consumed fuel to chemical energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **decelerationEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**decelerationEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.33, for **Electric Model** : 0.66 |
+ * | decelerationEfficiency | String | No | Specifies the efficiency of converting kinetic energy to saved (not consumed) fuel when the vehicle decelerates _(i.e. ChemicalEnergySaved/KineticEnergyLost). ChemicalEnergySaved_ is obtained by converting saved (not consumed) fuel to energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **accelerationEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**accelerationEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.83, for **Electric Model** : 0.91 |
+ * | uphillEfficiency | String | No | Specifies the efficiency of converting chemical energy stored in fuel to potential energy when the vehicle gains elevation _(i.e. PotentialEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed_ is obtained by converting consumed fuel to chemical energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **downhillEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**downhillEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.27, for **Electric Model** : 0.74 |
+ * | downhillEfficiency | String | No | Specifies the efficiency of converting potential energy to saved (not consumed) fuel when the vehicle loses elevation _(i.e. ChemicalEnergySaved/PotentialEnergyLost). ChemicalEnergySaved_ is obtained by converting saved (not consumed) fuel to energy using **fuelEnergyDensityInMJoulesPerLiter**.
+ *
+ * Must be paired with **uphillEfficiency**.
+ *
+ * The range of values allowed are 0.0 to 1/**uphillEfficiency**.
+ *
+ * Sensible Values : for **Combustion Model** : 0.51, for **Electric Model** : 0.73 |
+ * | constantSpeedConsumptionInkWhPerHundredkm | String | No | Specifies the speed-dependent component of consumption.
+ *
+ * Provided as an unordered list of speed/consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
+ *
+ * * by linear interpolation, if the given speed lies in between two speeds in the list
+ *
+ * * by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list
+ *
+ * The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing.
+ *
+ * Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates.
+ *
+ * Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.
+ *
+ * The valid range for the consumption values(expressed in kWh/100km) is between 0.01 and 100000.0.
+ *
+ * Sensible Values : 50,8.2:130,21.3
+ *
+ * This parameter is required for **Electric consumption model**. |
+ * | currentChargeInkWh | String | No | Specifies the current electric energy supply in kilowatt hours (kWh).
+ *
+ * This parameter co-exists with **maxChargeInkWh** parameter.
+ *
+ * The range of values allowed are 0.0 to **maxChargeInkWh**.
+ *
+ * Sensible Values : 43 |
+ * | maxChargeInkWh | String | No | Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in the vehicle's battery.
+ *
+ * This parameter co-exists with **currentChargeInkWh** parameter.
+ *
+ * Minimum value has to be greater than or equal to **currentChargeInkWh**.
+ *
+ * Sensible Values : 85 |
+ * | auxiliaryPowerInkW | String | No | Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts (kW).
+ *
+ * It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
+ *
+ * Sensible Values : 1.7 |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * formatVersion: String
+ * reachableRange: {
+ * center: {
+ * latitude: Double
+ * longitude: Double
+ * }
+ * boundary: [
+ * (recursive schema, see above)
+ * ]
+ * }
+ * report: {
+ * effectiveSettings: [
+ * {
+ * key: String
+ * value: String
+ * }
+ * ]
+ * }
+ * }
+ * }
+ *
+ * @param format Desired format of the response. Value can be either _json_ or _xml_.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return this object is returned from a successful Route Reachable Range call along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getRouteRangeWithResponse(String format, RequestOptions requestOptions) {
+ return getRouteRangeWithResponseAsync(format, requestOptions).block();
+ }
+
+ /**
+ * **Route Directions Batch API**
+ *
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ *
The Route Directions Batch API sends batches of queries to [Route Directions
+ * API](https://docs.microsoft.com/rest/api/maps/route/getroutedirections) using just a single API call. You can
+ * call Route Directions Batch API to run either asynchronously (async) or synchronously (sync). The async API
+ * allows caller to batch up to **700** queries and sync API up to **100** queries. ### Submit Asynchronous Batch
+ * Request The Asynchronous API is appropriate for processing big volumes of relatively complex route requests - It
+ * allows the retrieval of results in a separate call (multiple downloads are possible). - The asynchronous API is
+ * optimized for reliability and is not expected to run into a timeout. - The number of batch items is limited to
+ * **700** for this API.
+ *
+ *
When you make a request by using async request, by default the service returns a 202 response code along a
+ * redirect URL in the Location field of the response header. This URL should be checked periodically until the
+ * response data or error information is available. The asynchronous responses are stored for **14** days. The
+ * redirect URL returns a 404 response if used after the expiration period.
+ *
+ *
Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
+ * operations: 1. Client sends a Route Directions Batch `POST` request to Azure Maps 2. The server will respond with
+ * one of the following:
+ *
+ *
> HTTP `202 Accepted` - Batch request has been accepted.
+ *
+ *
> HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
+ * or any other `Error` status code.
+ *
+ *
3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
+ * download the results of the batch request. This status URI looks like following:
+ *
+ *
``` GET https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0 ``` Note:- Please
+ * remember to add AUTH information (subscription-key/azure_auth - See [Security](#security)) to the _status URI_
+ * before running it. <br> 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to
+ * download the batch results.
+ *
+ *
### POST Body for Batch Request To send the _route 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 3 _route directions_ queries:
+ *
+ *
```json { "batchItems": [ { "query":
+ * "?query=47.620659,-122.348934:47.610101,-122.342015&travelMode=bicycle&routeType=eco&traffic=false"
+ * }, { "query": "?query=40.759856,-73.985108:40.771136,-73.973506&travelMode=pedestrian&routeType=shortest"
+ * }, { "query": "?query=48.923159,-122.557362:32.621279,-116.840362" } ] } ```
+ *
+ *
A _route directions_ query in a batch is just a partial URL _without_ the protocol, base URL, path,
+ * api-version and subscription-key. It can accept any of the supported _route directions_ [URI
+ * parameters](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#uri-parameters). The string values
+ * in the _route directions_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it
+ * should also be properly URL-encoded.
+ *
+ *
The async API allows caller to batch up to **700** queries and sync API up to **100** queries, and the batch
+ * should contain at least **1** query.
+ *
+ *
### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
+ * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
+ * `POST` batch request and looks like the following:
+ *
+ *
```
+ * https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}
+ * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
+ * using the _download URL_. 2. The server will respond with one of the following:
+ *
+ *
> HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
+ * time.
+ *
+ *
> HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
+ *
+ *
### Batch Response Model The returned data content is similar for async and sync requests. When downloading
+ * the results of an async batch request, if the batch has finished processing, the response body contains the batch
+ * response. This 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 in `batchItems` contains `statusCode` and `response` fields. Each `response` in
+ * `batchItems` is of one of the following types:
+ *
+ *
- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
+ * the query completed successfully.
+ *
+ *
- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
+ *
+ *
Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
+ *
+ *
```json { "summary": { "successfulRequests": 1, "totalRequests": 2 }, "batchItems": [ { "statusCode": 200,
+ * "response": { "routes": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "legs": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "points": [ { "latitude": 47.62094, "longitude": -122.34892 }, { "latitude":
+ * 47.62094, "longitude": -122.3485 }, { "latitude": 47.62095, "longitude": -122.3476 } ] } ], "sections": [ {
+ * "startPointIndex": 0, "endPointIndex": 40, "sectionType": "TRAVEL_MODE", "travelMode": "bicycle" } ] } ] } }, {
+ * "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
+ * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Request Body Schema
+ *
+ *
{@code
+ * {
+ * batchItems: [
+ * {
+ * query: String
+ * }
+ * ]
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * batchSummary: {
+ * successfulRequests: Integer
+ * totalRequests: Integer
+ * }
+ * batchItems: [
+ * {
+ * statusCode: Integer
+ * response: {
+ * formatVersion: String
+ * routes: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * }
+ * legs: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * points: [
+ * {
+ * latitude: Double
+ * longitude: Double
+ * }
+ * ]
+ * }
+ * ]
+ * sections: [
+ * {
+ * startPointIndex: Integer
+ * endPointIndex: Integer
+ * sectionType: String(CAR_TRAIN/COUNTRY/FERRY/MOTORWAY/PEDESTRIAN/TOLL_ROAD/TOLL_VIGNETTE/TRAFFIC/TRAVEL_MODE/TUNNEL/CARPOOL/URBAN)
+ * travelMode: String(car/truck/taxi/bus/van/motorcycle/bicycle/pedestrian/other)
+ * simpleCategory: String(JAM/ROAD_WORK/ROAD_CLOSURE/OTHER)
+ * effectiveSpeedInKmh: Integer
+ * delayInSeconds: Integer
+ * delayMagnitude: String(0/1/2/3/4)
+ * tec: {
+ * effectCode: Integer
+ * causes: [
+ * {
+ * mainCauseCode: Integer
+ * subCauseCode: Integer
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * guidance: {
+ * instructions: [
+ * {
+ * routeOffsetInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * point: (recursive schema, see point above)
+ * pointIndex: Integer
+ * instructionType: String(TURN/ROAD_CHANGE/LOCATION_DEPARTURE/LOCATION_ARRIVAL/DIRECTION_INFO/LOCATION_WAYPOINT)
+ * roadNumbers: [
+ * String
+ * ]
+ * exitNumber: String
+ * street: String
+ * signpostText: String
+ * countryCode: String
+ * stateCode: String
+ * junctionType: String(REGULAR/ROUNDABOUT/BIFURCATION)
+ * turnAngleInDegrees: Integer
+ * roundaboutExitNumber: String
+ * possibleCombineWithNext: Boolean
+ * drivingSide: String(LEFT/RIGHT)
+ * maneuver: String(ARRIVE/ARRIVE_LEFT/ARRIVE_RIGHT/DEPART/STRAIGHT/KEEP_RIGHT/BEAR_RIGHT/TURN_RIGHT/SHARP_RIGHT/KEEP_LEFT/BEAR_LEFT/TURN_LEFT/SHARP_LEFT/MAKE_UTURN/ENTER_MOTORWAY/ENTER_FREEWAY/ENTER_HIGHWAY/TAKE_EXIT/MOTORWAY_EXIT_LEFT/MOTORWAY_EXIT_RIGHT/TAKE_FERRY/ROUNDABOUT_CROSS/ROUNDABOUT_RIGHT/ROUNDABOUT_LEFT/ROUNDABOUT_BACK/TRY_MAKE_UTURN/FOLLOW/SWITCH_PARALLEL_ROAD/SWITCH_MAIN_ROAD/ENTRANCE_RAMP/WAYPOINT_LEFT/WAYPOINT_RIGHT/WAYPOINT_REACHED)
+ * message: String
+ * combinedMessage: String
+ * }
+ * ]
+ * instructionGroups: [
+ * {
+ * firstInstructionIndex: Integer
+ * lastInstructionIndex: Integer
+ * groupLengthInMeters: Integer
+ * groupMessage: String
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * optimizedWaypoints: [
+ * {
+ * providedIndex: Integer
+ * optimizedIndex: Integer
+ * }
+ * ]
+ * report: {
+ * effectiveSettings: [
+ * {
+ * key: String
+ * value: String
+ * }
+ * ]
+ * }
+ * error: {
+ * code: String
+ * message: String
+ * target: String
+ * details: [
+ * (recursive schema, see above)
+ * ]
+ * additionalInfo: [
+ * {
+ * type: String
+ * info: Object
+ * }
+ * ]
+ * }
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ * @param format Desired format of the response. Only `json` format is supported.
+ * @param routeDirectionsBatchQueries The list of route directions queries/requests to process. The list can contain
+ * a max of 700 queries for async and 100 queries for sync version and must contain at least 1 query.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return this object is returned from a successful Route Directions Batch service call along with {@link Response}
+ * on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> requestRouteDirectionsBatchWithResponseAsync(
+ String format, BinaryData routeDirectionsBatchQueries, RequestOptions requestOptions) {
+ return FluxUtil.withContext(
+ context ->
+ service.requestRouteDirectionsBatch(
+ this.client.getHost(),
+ this.client.getServiceVersion().getVersion(),
+ format,
+ routeDirectionsBatchQueries,
+ requestOptions,
+ context));
+ }
+
+ /**
+ * **Route Directions Batch API**
+ *
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ *
The Route Directions Batch API sends batches of queries to [Route Directions
+ * API](https://docs.microsoft.com/rest/api/maps/route/getroutedirections) using just a single API call. You can
+ * call Route Directions Batch API to run either asynchronously (async) or synchronously (sync). The async API
+ * allows caller to batch up to **700** queries and sync API up to **100** queries. ### Submit Asynchronous Batch
+ * Request The Asynchronous API is appropriate for processing big volumes of relatively complex route requests - It
+ * allows the retrieval of results in a separate call (multiple downloads are possible). - The asynchronous API is
+ * optimized for reliability and is not expected to run into a timeout. - The number of batch items is limited to
+ * **700** for this API.
+ *
+ *
When you make a request by using async request, by default the service returns a 202 response code along a
+ * redirect URL in the Location field of the response header. This URL should be checked periodically until the
+ * response data or error information is available. The asynchronous responses are stored for **14** days. The
+ * redirect URL returns a 404 response if used after the expiration period.
+ *
+ *
Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
+ * operations: 1. Client sends a Route Directions Batch `POST` request to Azure Maps 2. The server will respond with
+ * one of the following:
+ *
+ *
> HTTP `202 Accepted` - Batch request has been accepted.
+ *
+ *
> HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
+ * or any other `Error` status code.
+ *
+ *
3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
+ * download the results of the batch request. This status URI looks like following:
+ *
+ *
``` GET https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0 ``` Note:- Please
+ * remember to add AUTH information (subscription-key/azure_auth - See [Security](#security)) to the _status URI_
+ * before running it. <br> 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to
+ * download the batch results.
+ *
+ *
### POST Body for Batch Request To send the _route 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 3 _route directions_ queries:
+ *
+ *
```json { "batchItems": [ { "query":
+ * "?query=47.620659,-122.348934:47.610101,-122.342015&travelMode=bicycle&routeType=eco&traffic=false"
+ * }, { "query": "?query=40.759856,-73.985108:40.771136,-73.973506&travelMode=pedestrian&routeType=shortest"
+ * }, { "query": "?query=48.923159,-122.557362:32.621279,-116.840362" } ] } ```
+ *
+ *
A _route directions_ query in a batch is just a partial URL _without_ the protocol, base URL, path,
+ * api-version and subscription-key. It can accept any of the supported _route directions_ [URI
+ * parameters](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#uri-parameters). The string values
+ * in the _route directions_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it
+ * should also be properly URL-encoded.
+ *
+ *
The async API allows caller to batch up to **700** queries and sync API up to **100** queries, and the batch
+ * should contain at least **1** query.
+ *
+ *
### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
+ * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
+ * `POST` batch request and looks like the following:
+ *
+ *
```
+ * https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}
+ * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
+ * using the _download URL_. 2. The server will respond with one of the following:
+ *
+ *
> HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
+ * time.
+ *
+ *
> HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
+ *
+ *
### Batch Response Model The returned data content is similar for async and sync requests. When downloading
+ * the results of an async batch request, if the batch has finished processing, the response body contains the batch
+ * response. This 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 in `batchItems` contains `statusCode` and `response` fields. Each `response` in
+ * `batchItems` is of one of the following types:
+ *
+ *
- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
+ * the query completed successfully.
+ *
+ *
- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
+ *
+ *
Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
+ *
+ *
```json { "summary": { "successfulRequests": 1, "totalRequests": 2 }, "batchItems": [ { "statusCode": 200,
+ * "response": { "routes": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "legs": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "points": [ { "latitude": 47.62094, "longitude": -122.34892 }, { "latitude":
+ * 47.62094, "longitude": -122.3485 }, { "latitude": 47.62095, "longitude": -122.3476 } ] } ], "sections": [ {
+ * "startPointIndex": 0, "endPointIndex": 40, "sectionType": "TRAVEL_MODE", "travelMode": "bicycle" } ] } ] } }, {
+ * "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
+ * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Request Body Schema
+ *
+ *
{@code
+ * {
+ * batchItems: [
+ * {
+ * query: String
+ * }
+ * ]
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * batchSummary: {
+ * successfulRequests: Integer
+ * totalRequests: Integer
+ * }
+ * batchItems: [
+ * {
+ * statusCode: Integer
+ * response: {
+ * formatVersion: String
+ * routes: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * }
+ * legs: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * points: [
+ * {
+ * latitude: Double
+ * longitude: Double
+ * }
+ * ]
+ * }
+ * ]
+ * sections: [
+ * {
+ * startPointIndex: Integer
+ * endPointIndex: Integer
+ * sectionType: String(CAR_TRAIN/COUNTRY/FERRY/MOTORWAY/PEDESTRIAN/TOLL_ROAD/TOLL_VIGNETTE/TRAFFIC/TRAVEL_MODE/TUNNEL/CARPOOL/URBAN)
+ * travelMode: String(car/truck/taxi/bus/van/motorcycle/bicycle/pedestrian/other)
+ * simpleCategory: String(JAM/ROAD_WORK/ROAD_CLOSURE/OTHER)
+ * effectiveSpeedInKmh: Integer
+ * delayInSeconds: Integer
+ * delayMagnitude: String(0/1/2/3/4)
+ * tec: {
+ * effectCode: Integer
+ * causes: [
+ * {
+ * mainCauseCode: Integer
+ * subCauseCode: Integer
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * guidance: {
+ * instructions: [
+ * {
+ * routeOffsetInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * point: (recursive schema, see point above)
+ * pointIndex: Integer
+ * instructionType: String(TURN/ROAD_CHANGE/LOCATION_DEPARTURE/LOCATION_ARRIVAL/DIRECTION_INFO/LOCATION_WAYPOINT)
+ * roadNumbers: [
+ * String
+ * ]
+ * exitNumber: String
+ * street: String
+ * signpostText: String
+ * countryCode: String
+ * stateCode: String
+ * junctionType: String(REGULAR/ROUNDABOUT/BIFURCATION)
+ * turnAngleInDegrees: Integer
+ * roundaboutExitNumber: String
+ * possibleCombineWithNext: Boolean
+ * drivingSide: String(LEFT/RIGHT)
+ * maneuver: String(ARRIVE/ARRIVE_LEFT/ARRIVE_RIGHT/DEPART/STRAIGHT/KEEP_RIGHT/BEAR_RIGHT/TURN_RIGHT/SHARP_RIGHT/KEEP_LEFT/BEAR_LEFT/TURN_LEFT/SHARP_LEFT/MAKE_UTURN/ENTER_MOTORWAY/ENTER_FREEWAY/ENTER_HIGHWAY/TAKE_EXIT/MOTORWAY_EXIT_LEFT/MOTORWAY_EXIT_RIGHT/TAKE_FERRY/ROUNDABOUT_CROSS/ROUNDABOUT_RIGHT/ROUNDABOUT_LEFT/ROUNDABOUT_BACK/TRY_MAKE_UTURN/FOLLOW/SWITCH_PARALLEL_ROAD/SWITCH_MAIN_ROAD/ENTRANCE_RAMP/WAYPOINT_LEFT/WAYPOINT_RIGHT/WAYPOINT_REACHED)
+ * message: String
+ * combinedMessage: String
+ * }
+ * ]
+ * instructionGroups: [
+ * {
+ * firstInstructionIndex: Integer
+ * lastInstructionIndex: Integer
+ * groupLengthInMeters: Integer
+ * groupMessage: String
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * optimizedWaypoints: [
+ * {
+ * providedIndex: Integer
+ * optimizedIndex: Integer
+ * }
+ * ]
+ * report: {
+ * effectiveSettings: [
+ * {
+ * key: String
+ * value: String
+ * }
+ * ]
+ * }
+ * error: {
+ * code: String
+ * message: String
+ * target: String
+ * details: [
+ * (recursive schema, see above)
+ * ]
+ * additionalInfo: [
+ * {
+ * type: String
+ * info: Object
+ * }
+ * ]
+ * }
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ * @param format Desired format of the response. Only `json` format is supported.
+ * @param routeDirectionsBatchQueries The list of route directions queries/requests to process. The list can contain
+ * a max of 700 queries for async and 100 queries for sync version and must contain at least 1 query.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @param context The context to associate with this operation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return this object is returned from a successful Route Directions Batch service call along with {@link Response}
+ * on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> requestRouteDirectionsBatchWithResponseAsync(
+ String format, BinaryData routeDirectionsBatchQueries, RequestOptions requestOptions, Context context) {
+ return service.requestRouteDirectionsBatch(
+ this.client.getHost(),
+ this.client.getServiceVersion().getVersion(),
+ format,
+ routeDirectionsBatchQueries,
+ requestOptions,
+ context);
+ }
+
+ /**
+ * **Route Directions Batch API**
+ *
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ *
The Route Directions Batch API sends batches of queries to [Route Directions
+ * API](https://docs.microsoft.com/rest/api/maps/route/getroutedirections) using just a single API call. You can
+ * call Route Directions Batch API to run either asynchronously (async) or synchronously (sync). The async API
+ * allows caller to batch up to **700** queries and sync API up to **100** queries. ### Submit Asynchronous Batch
+ * Request The Asynchronous API is appropriate for processing big volumes of relatively complex route requests - It
+ * allows the retrieval of results in a separate call (multiple downloads are possible). - The asynchronous API is
+ * optimized for reliability and is not expected to run into a timeout. - The number of batch items is limited to
+ * **700** for this API.
+ *
+ *
When you make a request by using async request, by default the service returns a 202 response code along a
+ * redirect URL in the Location field of the response header. This URL should be checked periodically until the
+ * response data or error information is available. The asynchronous responses are stored for **14** days. The
+ * redirect URL returns a 404 response if used after the expiration period.
+ *
+ *
Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
+ * operations: 1. Client sends a Route Directions Batch `POST` request to Azure Maps 2. The server will respond with
+ * one of the following:
+ *
+ *
> HTTP `202 Accepted` - Batch request has been accepted.
+ *
+ *
> HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
+ * or any other `Error` status code.
+ *
+ *
3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
+ * download the results of the batch request. This status URI looks like following:
+ *
+ *
``` GET https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0 ``` Note:- Please
+ * remember to add AUTH information (subscription-key/azure_auth - See [Security](#security)) to the _status URI_
+ * before running it. <br> 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to
+ * download the batch results.
+ *
+ *
### POST Body for Batch Request To send the _route 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 3 _route directions_ queries:
+ *
+ *
```json { "batchItems": [ { "query":
+ * "?query=47.620659,-122.348934:47.610101,-122.342015&travelMode=bicycle&routeType=eco&traffic=false"
+ * }, { "query": "?query=40.759856,-73.985108:40.771136,-73.973506&travelMode=pedestrian&routeType=shortest"
+ * }, { "query": "?query=48.923159,-122.557362:32.621279,-116.840362" } ] } ```
+ *
+ *
A _route directions_ query in a batch is just a partial URL _without_ the protocol, base URL, path,
+ * api-version and subscription-key. It can accept any of the supported _route directions_ [URI
+ * parameters](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#uri-parameters). The string values
+ * in the _route directions_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it
+ * should also be properly URL-encoded.
+ *
+ *
The async API allows caller to batch up to **700** queries and sync API up to **100** queries, and the batch
+ * should contain at least **1** query.
+ *
+ *
### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
+ * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
+ * `POST` batch request and looks like the following:
+ *
+ *
```
+ * https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}
+ * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
+ * using the _download URL_. 2. The server will respond with one of the following:
+ *
+ *
> HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
+ * time.
+ *
+ *
> HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
+ *
+ *
### Batch Response Model The returned data content is similar for async and sync requests. When downloading
+ * the results of an async batch request, if the batch has finished processing, the response body contains the batch
+ * response. This 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 in `batchItems` contains `statusCode` and `response` fields. Each `response` in
+ * `batchItems` is of one of the following types:
+ *
+ *
- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
+ * the query completed successfully.
+ *
+ *
- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
+ *
+ *
Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
+ *
+ *
```json { "summary": { "successfulRequests": 1, "totalRequests": 2 }, "batchItems": [ { "statusCode": 200,
+ * "response": { "routes": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "legs": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "points": [ { "latitude": 47.62094, "longitude": -122.34892 }, { "latitude":
+ * 47.62094, "longitude": -122.3485 }, { "latitude": 47.62095, "longitude": -122.3476 } ] } ], "sections": [ {
+ * "startPointIndex": 0, "endPointIndex": 40, "sectionType": "TRAVEL_MODE", "travelMode": "bicycle" } ] } ] } }, {
+ * "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
+ * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Request Body Schema
+ *
+ *
{@code
+ * {
+ * batchItems: [
+ * {
+ * query: String
+ * }
+ * ]
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * batchSummary: {
+ * successfulRequests: Integer
+ * totalRequests: Integer
+ * }
+ * batchItems: [
+ * {
+ * statusCode: Integer
+ * response: {
+ * formatVersion: String
+ * routes: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * }
+ * legs: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * points: [
+ * {
+ * latitude: Double
+ * longitude: Double
+ * }
+ * ]
+ * }
+ * ]
+ * sections: [
+ * {
+ * startPointIndex: Integer
+ * endPointIndex: Integer
+ * sectionType: String(CAR_TRAIN/COUNTRY/FERRY/MOTORWAY/PEDESTRIAN/TOLL_ROAD/TOLL_VIGNETTE/TRAFFIC/TRAVEL_MODE/TUNNEL/CARPOOL/URBAN)
+ * travelMode: String(car/truck/taxi/bus/van/motorcycle/bicycle/pedestrian/other)
+ * simpleCategory: String(JAM/ROAD_WORK/ROAD_CLOSURE/OTHER)
+ * effectiveSpeedInKmh: Integer
+ * delayInSeconds: Integer
+ * delayMagnitude: String(0/1/2/3/4)
+ * tec: {
+ * effectCode: Integer
+ * causes: [
+ * {
+ * mainCauseCode: Integer
+ * subCauseCode: Integer
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * guidance: {
+ * instructions: [
+ * {
+ * routeOffsetInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * point: (recursive schema, see point above)
+ * pointIndex: Integer
+ * instructionType: String(TURN/ROAD_CHANGE/LOCATION_DEPARTURE/LOCATION_ARRIVAL/DIRECTION_INFO/LOCATION_WAYPOINT)
+ * roadNumbers: [
+ * String
+ * ]
+ * exitNumber: String
+ * street: String
+ * signpostText: String
+ * countryCode: String
+ * stateCode: String
+ * junctionType: String(REGULAR/ROUNDABOUT/BIFURCATION)
+ * turnAngleInDegrees: Integer
+ * roundaboutExitNumber: String
+ * possibleCombineWithNext: Boolean
+ * drivingSide: String(LEFT/RIGHT)
+ * maneuver: String(ARRIVE/ARRIVE_LEFT/ARRIVE_RIGHT/DEPART/STRAIGHT/KEEP_RIGHT/BEAR_RIGHT/TURN_RIGHT/SHARP_RIGHT/KEEP_LEFT/BEAR_LEFT/TURN_LEFT/SHARP_LEFT/MAKE_UTURN/ENTER_MOTORWAY/ENTER_FREEWAY/ENTER_HIGHWAY/TAKE_EXIT/MOTORWAY_EXIT_LEFT/MOTORWAY_EXIT_RIGHT/TAKE_FERRY/ROUNDABOUT_CROSS/ROUNDABOUT_RIGHT/ROUNDABOUT_LEFT/ROUNDABOUT_BACK/TRY_MAKE_UTURN/FOLLOW/SWITCH_PARALLEL_ROAD/SWITCH_MAIN_ROAD/ENTRANCE_RAMP/WAYPOINT_LEFT/WAYPOINT_RIGHT/WAYPOINT_REACHED)
+ * message: String
+ * combinedMessage: String
+ * }
+ * ]
+ * instructionGroups: [
+ * {
+ * firstInstructionIndex: Integer
+ * lastInstructionIndex: Integer
+ * groupLengthInMeters: Integer
+ * groupMessage: String
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * optimizedWaypoints: [
+ * {
+ * providedIndex: Integer
+ * optimizedIndex: Integer
+ * }
+ * ]
+ * report: {
+ * effectiveSettings: [
+ * {
+ * key: String
+ * value: String
+ * }
+ * ]
+ * }
+ * error: {
+ * code: String
+ * message: String
+ * target: String
+ * details: [
+ * (recursive schema, see above)
+ * ]
+ * additionalInfo: [
+ * {
+ * type: String
+ * info: Object
+ * }
+ * ]
+ * }
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ * @param format Desired format of the response. Only `json` format is supported.
+ * @param routeDirectionsBatchQueries The list of route directions queries/requests to process. The list can contain
+ * a max of 700 queries for async and 100 queries for sync version and must contain at least 1 query.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return the {@link PollerFlux} for polling of this object is returned from a successful Route Directions Batch
+ * service call.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginRequestRouteDirectionsBatchAsync(
+ String format, BinaryData routeDirectionsBatchQueries, RequestOptions requestOptions) {
+ return PollerFlux.create(
+ Duration.ofSeconds(1),
+ () ->
+ this.requestRouteDirectionsBatchWithResponseAsync(
+ format, routeDirectionsBatchQueries, requestOptions),
+ new DefaultPollingStrategy<>(this.client.getHttpPipeline()),
+ new TypeReferenceBinaryData(),
+ new TypeReferenceBinaryData());
+ }
+
+ /**
+ * **Route Directions Batch API**
+ *
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ *
The Route Directions Batch API sends batches of queries to [Route Directions
+ * API](https://docs.microsoft.com/rest/api/maps/route/getroutedirections) using just a single API call. You can
+ * call Route Directions Batch API to run either asynchronously (async) or synchronously (sync). The async API
+ * allows caller to batch up to **700** queries and sync API up to **100** queries. ### Submit Asynchronous Batch
+ * Request The Asynchronous API is appropriate for processing big volumes of relatively complex route requests - It
+ * allows the retrieval of results in a separate call (multiple downloads are possible). - The asynchronous API is
+ * optimized for reliability and is not expected to run into a timeout. - The number of batch items is limited to
+ * **700** for this API.
+ *
+ *
When you make a request by using async request, by default the service returns a 202 response code along a
+ * redirect URL in the Location field of the response header. This URL should be checked periodically until the
+ * response data or error information is available. The asynchronous responses are stored for **14** days. The
+ * redirect URL returns a 404 response if used after the expiration period.
+ *
+ *
Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
+ * operations: 1. Client sends a Route Directions Batch `POST` request to Azure Maps 2. The server will respond with
+ * one of the following:
+ *
+ *
> HTTP `202 Accepted` - Batch request has been accepted.
+ *
+ *
> HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
+ * or any other `Error` status code.
+ *
+ *
3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
+ * download the results of the batch request. This status URI looks like following:
+ *
+ *
``` GET https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0 ``` Note:- Please
+ * remember to add AUTH information (subscription-key/azure_auth - See [Security](#security)) to the _status URI_
+ * before running it. <br> 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to
+ * download the batch results.
+ *
+ *
### POST Body for Batch Request To send the _route 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 3 _route directions_ queries:
+ *
+ *
```json { "batchItems": [ { "query":
+ * "?query=47.620659,-122.348934:47.610101,-122.342015&travelMode=bicycle&routeType=eco&traffic=false"
+ * }, { "query": "?query=40.759856,-73.985108:40.771136,-73.973506&travelMode=pedestrian&routeType=shortest"
+ * }, { "query": "?query=48.923159,-122.557362:32.621279,-116.840362" } ] } ```
+ *
+ *
A _route directions_ query in a batch is just a partial URL _without_ the protocol, base URL, path,
+ * api-version and subscription-key. It can accept any of the supported _route directions_ [URI
+ * parameters](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#uri-parameters). The string values
+ * in the _route directions_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it
+ * should also be properly URL-encoded.
+ *
+ *
The async API allows caller to batch up to **700** queries and sync API up to **100** queries, and the batch
+ * should contain at least **1** query.
+ *
+ *
### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
+ * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
+ * `POST` batch request and looks like the following:
+ *
+ *
```
+ * https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}
+ * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
+ * using the _download URL_. 2. The server will respond with one of the following:
+ *
+ *
> HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
+ * time.
+ *
+ *
> HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
+ *
+ *
### Batch Response Model The returned data content is similar for async and sync requests. When downloading
+ * the results of an async batch request, if the batch has finished processing, the response body contains the batch
+ * response. This 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 in `batchItems` contains `statusCode` and `response` fields. Each `response` in
+ * `batchItems` is of one of the following types:
+ *
+ *
- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
+ * the query completed successfully.
+ *
+ *
- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
+ *
+ *
Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
+ *
+ *
```json { "summary": { "successfulRequests": 1, "totalRequests": 2 }, "batchItems": [ { "statusCode": 200,
+ * "response": { "routes": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "legs": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "points": [ { "latitude": 47.62094, "longitude": -122.34892 }, { "latitude":
+ * 47.62094, "longitude": -122.3485 }, { "latitude": 47.62095, "longitude": -122.3476 } ] } ], "sections": [ {
+ * "startPointIndex": 0, "endPointIndex": 40, "sectionType": "TRAVEL_MODE", "travelMode": "bicycle" } ] } ] } }, {
+ * "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
+ * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Request Body Schema
+ *
+ *
{@code
+ * {
+ * batchItems: [
+ * {
+ * query: String
+ * }
+ * ]
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * batchSummary: {
+ * successfulRequests: Integer
+ * totalRequests: Integer
+ * }
+ * batchItems: [
+ * {
+ * statusCode: Integer
+ * response: {
+ * formatVersion: String
+ * routes: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * }
+ * legs: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * points: [
+ * {
+ * latitude: Double
+ * longitude: Double
+ * }
+ * ]
+ * }
+ * ]
+ * sections: [
+ * {
+ * startPointIndex: Integer
+ * endPointIndex: Integer
+ * sectionType: String(CAR_TRAIN/COUNTRY/FERRY/MOTORWAY/PEDESTRIAN/TOLL_ROAD/TOLL_VIGNETTE/TRAFFIC/TRAVEL_MODE/TUNNEL/CARPOOL/URBAN)
+ * travelMode: String(car/truck/taxi/bus/van/motorcycle/bicycle/pedestrian/other)
+ * simpleCategory: String(JAM/ROAD_WORK/ROAD_CLOSURE/OTHER)
+ * effectiveSpeedInKmh: Integer
+ * delayInSeconds: Integer
+ * delayMagnitude: String(0/1/2/3/4)
+ * tec: {
+ * effectCode: Integer
+ * causes: [
+ * {
+ * mainCauseCode: Integer
+ * subCauseCode: Integer
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * guidance: {
+ * instructions: [
+ * {
+ * routeOffsetInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * point: (recursive schema, see point above)
+ * pointIndex: Integer
+ * instructionType: String(TURN/ROAD_CHANGE/LOCATION_DEPARTURE/LOCATION_ARRIVAL/DIRECTION_INFO/LOCATION_WAYPOINT)
+ * roadNumbers: [
+ * String
+ * ]
+ * exitNumber: String
+ * street: String
+ * signpostText: String
+ * countryCode: String
+ * stateCode: String
+ * junctionType: String(REGULAR/ROUNDABOUT/BIFURCATION)
+ * turnAngleInDegrees: Integer
+ * roundaboutExitNumber: String
+ * possibleCombineWithNext: Boolean
+ * drivingSide: String(LEFT/RIGHT)
+ * maneuver: String(ARRIVE/ARRIVE_LEFT/ARRIVE_RIGHT/DEPART/STRAIGHT/KEEP_RIGHT/BEAR_RIGHT/TURN_RIGHT/SHARP_RIGHT/KEEP_LEFT/BEAR_LEFT/TURN_LEFT/SHARP_LEFT/MAKE_UTURN/ENTER_MOTORWAY/ENTER_FREEWAY/ENTER_HIGHWAY/TAKE_EXIT/MOTORWAY_EXIT_LEFT/MOTORWAY_EXIT_RIGHT/TAKE_FERRY/ROUNDABOUT_CROSS/ROUNDABOUT_RIGHT/ROUNDABOUT_LEFT/ROUNDABOUT_BACK/TRY_MAKE_UTURN/FOLLOW/SWITCH_PARALLEL_ROAD/SWITCH_MAIN_ROAD/ENTRANCE_RAMP/WAYPOINT_LEFT/WAYPOINT_RIGHT/WAYPOINT_REACHED)
+ * message: String
+ * combinedMessage: String
+ * }
+ * ]
+ * instructionGroups: [
+ * {
+ * firstInstructionIndex: Integer
+ * lastInstructionIndex: Integer
+ * groupLengthInMeters: Integer
+ * groupMessage: String
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * optimizedWaypoints: [
+ * {
+ * providedIndex: Integer
+ * optimizedIndex: Integer
+ * }
+ * ]
+ * report: {
+ * effectiveSettings: [
+ * {
+ * key: String
+ * value: String
+ * }
+ * ]
+ * }
+ * error: {
+ * code: String
+ * message: String
+ * target: String
+ * details: [
+ * (recursive schema, see above)
+ * ]
+ * additionalInfo: [
+ * {
+ * type: String
+ * info: Object
+ * }
+ * ]
+ * }
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ * @param format Desired format of the response. Only `json` format is supported.
+ * @param routeDirectionsBatchQueries The list of route directions queries/requests to process. The list can contain
+ * a max of 700 queries for async and 100 queries for sync version and must contain at least 1 query.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @param context The context to associate with this operation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return the {@link PollerFlux} for polling of this object is returned from a successful Route Directions Batch
+ * service call.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginRequestRouteDirectionsBatchAsync(
+ String format, BinaryData routeDirectionsBatchQueries, RequestOptions requestOptions, Context context) {
+ return PollerFlux.create(
+ Duration.ofSeconds(1),
+ () ->
+ this.requestRouteDirectionsBatchWithResponseAsync(
+ format, routeDirectionsBatchQueries, requestOptions, context),
+ new DefaultPollingStrategy<>(this.client.getHttpPipeline()),
+ new TypeReferenceBinaryData(),
+ new TypeReferenceBinaryData());
+ }
+
+ /**
+ * **Route Directions Batch API**
+ *
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ *
The Route Directions Batch API sends batches of queries to [Route Directions
+ * API](https://docs.microsoft.com/rest/api/maps/route/getroutedirections) using just a single API call. You can
+ * call Route Directions Batch API to run either asynchronously (async) or synchronously (sync). The async API
+ * allows caller to batch up to **700** queries and sync API up to **100** queries. ### Submit Asynchronous Batch
+ * Request The Asynchronous API is appropriate for processing big volumes of relatively complex route requests - It
+ * allows the retrieval of results in a separate call (multiple downloads are possible). - The asynchronous API is
+ * optimized for reliability and is not expected to run into a timeout. - The number of batch items is limited to
+ * **700** for this API.
+ *
+ *
When you make a request by using async request, by default the service returns a 202 response code along a
+ * redirect URL in the Location field of the response header. This URL should be checked periodically until the
+ * response data or error information is available. The asynchronous responses are stored for **14** days. The
+ * redirect URL returns a 404 response if used after the expiration period.
+ *
+ *
Please note that asynchronous batch request is a long-running request. Here's a typical sequence of
+ * operations: 1. Client sends a Route Directions Batch `POST` request to Azure Maps 2. The server will respond with
+ * one of the following:
+ *
+ *
> HTTP `202 Accepted` - Batch request has been accepted.
+ *
+ *
> HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
+ * or any other `Error` status code.
+ *
+ *
3. If the batch request was accepted successfully, the `Location` header in the response contains the URL to
+ * download the results of the batch request. This status URI looks like following:
+ *
+ *
``` GET https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0 ``` Note:- Please
+ * remember to add AUTH information (subscription-key/azure_auth - See [Security](#security)) to the _status URI_
+ * before running it. <br> 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to
+ * download the batch results.
+ *
+ *
### POST Body for Batch Request To send the _route 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 3 _route directions_ queries:
+ *
+ *
```json { "batchItems": [ { "query":
+ * "?query=47.620659,-122.348934:47.610101,-122.342015&travelMode=bicycle&routeType=eco&traffic=false"
+ * }, { "query": "?query=40.759856,-73.985108:40.771136,-73.973506&travelMode=pedestrian&routeType=shortest"
+ * }, { "query": "?query=48.923159,-122.557362:32.621279,-116.840362" } ] } ```
+ *
+ *
A _route directions_ query in a batch is just a partial URL _without_ the protocol, base URL, path,
+ * api-version and subscription-key. It can accept any of the supported _route directions_ [URI
+ * parameters](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#uri-parameters). The string values
+ * in the _route directions_ query must be properly escaped (e.g. " character should be escaped with \\ ) and it
+ * should also be properly URL-encoded.
+ *
+ *
The async API allows caller to batch up to **700** queries and sync API up to **100** queries, and the batch
+ * should contain at least **1** query.
+ *
+ *
### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
+ * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
+ * `POST` batch request and looks like the following:
+ *
+ *
```
+ * https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}
+ * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
+ * using the _download URL_. 2. The server will respond with one of the following:
+ *
+ *
> HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
+ * time.
+ *
+ *
> HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
+ *
+ *
### Batch Response Model The returned data content is similar for async and sync requests. When downloading
+ * the results of an async batch request, if the batch has finished processing, the response body contains the batch
+ * response. This 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 in `batchItems` contains `statusCode` and `response` fields. Each `response` in
+ * `batchItems` is of one of the following types:
+ *
+ *
- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
+ * the query completed successfully.
+ *
+ *
- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
+ *
+ *
Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
+ *
+ *
```json { "summary": { "successfulRequests": 1, "totalRequests": 2 }, "batchItems": [ { "statusCode": 200,
+ * "response": { "routes": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "legs": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "points": [ { "latitude": 47.62094, "longitude": -122.34892 }, { "latitude":
+ * 47.62094, "longitude": -122.3485 }, { "latitude": 47.62095, "longitude": -122.3476 } ] } ], "sections": [ {
+ * "startPointIndex": 0, "endPointIndex": 40, "sectionType": "TRAVEL_MODE", "travelMode": "bicycle" } ] } ] } }, {
+ * "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
+ * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Request Body Schema
+ *
+ *
{@code
+ * {
+ * batchItems: [
+ * {
+ * query: String
+ * }
+ * ]
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * batchSummary: {
+ * successfulRequests: Integer
+ * totalRequests: Integer
+ * }
+ * batchItems: [
+ * {
+ * statusCode: Integer
+ * response: {
+ * formatVersion: String
+ * routes: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * }
+ * legs: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * points: [
+ * {
+ * latitude: Double
+ * longitude: Double
+ * }
+ * ]
+ * }
+ * ]
+ * sections: [
+ * {
+ * startPointIndex: Integer
+ * endPointIndex: Integer
+ * sectionType: String(CAR_TRAIN/COUNTRY/FERRY/MOTORWAY/PEDESTRIAN/TOLL_ROAD/TOLL_VIGNETTE/TRAFFIC/TRAVEL_MODE/TUNNEL/CARPOOL/URBAN)
+ * travelMode: String(car/truck/taxi/bus/van/motorcycle/bicycle/pedestrian/other)
+ * simpleCategory: String(JAM/ROAD_WORK/ROAD_CLOSURE/OTHER)
+ * effectiveSpeedInKmh: Integer
+ * delayInSeconds: Integer
+ * delayMagnitude: String(0/1/2/3/4)
+ * tec: {
+ * effectCode: Integer
+ * causes: [
+ * {
+ * mainCauseCode: Integer
+ * subCauseCode: Integer
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * guidance: {
+ * instructions: [
+ * {
+ * routeOffsetInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * point: (recursive schema, see point above)
+ * pointIndex: Integer
+ * instructionType: String(TURN/ROAD_CHANGE/LOCATION_DEPARTURE/LOCATION_ARRIVAL/DIRECTION_INFO/LOCATION_WAYPOINT)
+ * roadNumbers: [
+ * String
+ * ]
+ * exitNumber: String
+ * street: String
+ * signpostText: String
+ * countryCode: String
+ * stateCode: String
+ * junctionType: String(REGULAR/ROUNDABOUT/BIFURCATION)
+ * turnAngleInDegrees: Integer
+ * roundaboutExitNumber: String
+ * possibleCombineWithNext: Boolean
+ * drivingSide: String(LEFT/RIGHT)
+ * maneuver: String(ARRIVE/ARRIVE_LEFT/ARRIVE_RIGHT/DEPART/STRAIGHT/KEEP_RIGHT/BEAR_RIGHT/TURN_RIGHT/SHARP_RIGHT/KEEP_LEFT/BEAR_LEFT/TURN_LEFT/SHARP_LEFT/MAKE_UTURN/ENTER_MOTORWAY/ENTER_FREEWAY/ENTER_HIGHWAY/TAKE_EXIT/MOTORWAY_EXIT_LEFT/MOTORWAY_EXIT_RIGHT/TAKE_FERRY/ROUNDABOUT_CROSS/ROUNDABOUT_RIGHT/ROUNDABOUT_LEFT/ROUNDABOUT_BACK/TRY_MAKE_UTURN/FOLLOW/SWITCH_PARALLEL_ROAD/SWITCH_MAIN_ROAD/ENTRANCE_RAMP/WAYPOINT_LEFT/WAYPOINT_RIGHT/WAYPOINT_REACHED)
+ * message: String
+ * combinedMessage: String
+ * }
+ * ]
+ * instructionGroups: [
+ * {
+ * firstInstructionIndex: Integer
+ * lastInstructionIndex: Integer
+ * groupLengthInMeters: Integer
+ * groupMessage: String
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * optimizedWaypoints: [
+ * {
+ * providedIndex: Integer
+ * optimizedIndex: Integer
+ * }
+ * ]
+ * report: {
+ * effectiveSettings: [
+ * {
+ * key: String
+ * value: String
+ * }
+ * ]
+ * }
+ * error: {
+ * code: String
+ * message: String
+ * target: String
+ * details: [
+ * (recursive schema, see above)
+ * ]
+ * additionalInfo: [
+ * {
+ * type: String
+ * info: Object
+ * }
+ * ]
+ * }
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ * @param format Desired format of the response. Only `json` format is supported.
+ * @param routeDirectionsBatchQueries The list of route directions queries/requests to process. The list can contain
+ * a max of 700 queries for async and 100 queries for sync version and must contain at least 1 query.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return the {@link SyncPoller} for polling of this object is returned from a successful Route Directions Batch
+ * service call.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginRequestRouteDirectionsBatch(
+ String format, BinaryData routeDirectionsBatchQueries, RequestOptions requestOptions) {
+ return this.beginRequestRouteDirectionsBatchAsync(format, routeDirectionsBatchQueries, requestOptions)
+ .getSyncPoller();
+ }
+
+ /**
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ * ### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
+ * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
+ * `POST` batch request and looks like the following:
+ *
+ *
```
+ * https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}
+ * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
+ * using the _download URL_. 2. The server will respond with one of the following:
+ *
+ *
> HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
+ * time.
+ *
+ *
> HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
+ *
+ *
### Batch Response Model The returned data content is similar for async and sync requests. When downloading
+ * the results of an async batch request, if the batch has finished processing, the response body contains the batch
+ * response. This 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 in `batchItems` contains `statusCode` and `response` fields. Each `response` in
+ * `batchItems` is of one of the following types:
+ *
+ *
- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
+ * the query completed successfully.
+ *
+ *
- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
+ *
+ *
Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
+ *
+ *
```json { "summary": { "successfulRequests": 1, "totalRequests": 2 }, "batchItems": [ { "statusCode": 200,
+ * "response": { "routes": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "legs": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "points": [ { "latitude": 47.62094, "longitude": -122.34892 }, { "latitude":
+ * 47.62094, "longitude": -122.3485 }, { "latitude": 47.62095, "longitude": -122.3476 } ] } ], "sections": [ {
+ * "startPointIndex": 0, "endPointIndex": 40, "sectionType": "TRAVEL_MODE", "travelMode": "bicycle" } ] } ] } }, {
+ * "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
+ * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * batchSummary: {
+ * successfulRequests: Integer
+ * totalRequests: Integer
+ * }
+ * batchItems: [
+ * {
+ * statusCode: Integer
+ * response: {
+ * formatVersion: String
+ * routes: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * }
+ * legs: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * points: [
+ * {
+ * latitude: Double
+ * longitude: Double
+ * }
+ * ]
+ * }
+ * ]
+ * sections: [
+ * {
+ * startPointIndex: Integer
+ * endPointIndex: Integer
+ * sectionType: String(CAR_TRAIN/COUNTRY/FERRY/MOTORWAY/PEDESTRIAN/TOLL_ROAD/TOLL_VIGNETTE/TRAFFIC/TRAVEL_MODE/TUNNEL/CARPOOL/URBAN)
+ * travelMode: String(car/truck/taxi/bus/van/motorcycle/bicycle/pedestrian/other)
+ * simpleCategory: String(JAM/ROAD_WORK/ROAD_CLOSURE/OTHER)
+ * effectiveSpeedInKmh: Integer
+ * delayInSeconds: Integer
+ * delayMagnitude: String(0/1/2/3/4)
+ * tec: {
+ * effectCode: Integer
+ * causes: [
+ * {
+ * mainCauseCode: Integer
+ * subCauseCode: Integer
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * guidance: {
+ * instructions: [
+ * {
+ * routeOffsetInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * point: (recursive schema, see point above)
+ * pointIndex: Integer
+ * instructionType: String(TURN/ROAD_CHANGE/LOCATION_DEPARTURE/LOCATION_ARRIVAL/DIRECTION_INFO/LOCATION_WAYPOINT)
+ * roadNumbers: [
+ * String
+ * ]
+ * exitNumber: String
+ * street: String
+ * signpostText: String
+ * countryCode: String
+ * stateCode: String
+ * junctionType: String(REGULAR/ROUNDABOUT/BIFURCATION)
+ * turnAngleInDegrees: Integer
+ * roundaboutExitNumber: String
+ * possibleCombineWithNext: Boolean
+ * drivingSide: String(LEFT/RIGHT)
+ * maneuver: String(ARRIVE/ARRIVE_LEFT/ARRIVE_RIGHT/DEPART/STRAIGHT/KEEP_RIGHT/BEAR_RIGHT/TURN_RIGHT/SHARP_RIGHT/KEEP_LEFT/BEAR_LEFT/TURN_LEFT/SHARP_LEFT/MAKE_UTURN/ENTER_MOTORWAY/ENTER_FREEWAY/ENTER_HIGHWAY/TAKE_EXIT/MOTORWAY_EXIT_LEFT/MOTORWAY_EXIT_RIGHT/TAKE_FERRY/ROUNDABOUT_CROSS/ROUNDABOUT_RIGHT/ROUNDABOUT_LEFT/ROUNDABOUT_BACK/TRY_MAKE_UTURN/FOLLOW/SWITCH_PARALLEL_ROAD/SWITCH_MAIN_ROAD/ENTRANCE_RAMP/WAYPOINT_LEFT/WAYPOINT_RIGHT/WAYPOINT_REACHED)
+ * message: String
+ * combinedMessage: String
+ * }
+ * ]
+ * instructionGroups: [
+ * {
+ * firstInstructionIndex: Integer
+ * lastInstructionIndex: Integer
+ * groupLengthInMeters: Integer
+ * groupMessage: String
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * optimizedWaypoints: [
+ * {
+ * providedIndex: Integer
+ * optimizedIndex: Integer
+ * }
+ * ]
+ * report: {
+ * effectiveSettings: [
+ * {
+ * key: String
+ * value: String
+ * }
+ * ]
+ * }
+ * error: {
+ * code: String
+ * message: String
+ * target: String
+ * details: [
+ * (recursive schema, see above)
+ * ]
+ * additionalInfo: [
+ * {
+ * type: String
+ * info: Object
+ * }
+ * ]
+ * }
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ * @param batchId Batch id for querying the operation.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return this object is returned from a successful Route Directions Batch service call along with {@link Response}
+ * on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getRouteDirectionsBatchWithResponseAsync(
+ String batchId, RequestOptions requestOptions) {
+ return FluxUtil.withContext(
+ context ->
+ service.getRouteDirectionsBatch(
+ this.client.getHost(),
+ this.client.getServiceVersion().getVersion(),
+ batchId,
+ requestOptions,
+ context));
+ }
+
+ /**
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ * ### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
+ * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
+ * `POST` batch request and looks like the following:
+ *
+ *
```
+ * https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}
+ * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
+ * using the _download URL_. 2. The server will respond with one of the following:
+ *
+ *
> HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
+ * time.
+ *
+ *
> HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
+ *
+ *
### Batch Response Model The returned data content is similar for async and sync requests. When downloading
+ * the results of an async batch request, if the batch has finished processing, the response body contains the batch
+ * response. This 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 in `batchItems` contains `statusCode` and `response` fields. Each `response` in
+ * `batchItems` is of one of the following types:
+ *
+ *
- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
+ * the query completed successfully.
+ *
+ *
- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
+ *
+ *
Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
+ *
+ *
```json { "summary": { "successfulRequests": 1, "totalRequests": 2 }, "batchItems": [ { "statusCode": 200,
+ * "response": { "routes": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "legs": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "points": [ { "latitude": 47.62094, "longitude": -122.34892 }, { "latitude":
+ * 47.62094, "longitude": -122.3485 }, { "latitude": 47.62095, "longitude": -122.3476 } ] } ], "sections": [ {
+ * "startPointIndex": 0, "endPointIndex": 40, "sectionType": "TRAVEL_MODE", "travelMode": "bicycle" } ] } ] } }, {
+ * "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
+ * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * batchSummary: {
+ * successfulRequests: Integer
+ * totalRequests: Integer
+ * }
+ * batchItems: [
+ * {
+ * statusCode: Integer
+ * response: {
+ * formatVersion: String
+ * routes: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * }
+ * legs: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * points: [
+ * {
+ * latitude: Double
+ * longitude: Double
+ * }
+ * ]
+ * }
+ * ]
+ * sections: [
+ * {
+ * startPointIndex: Integer
+ * endPointIndex: Integer
+ * sectionType: String(CAR_TRAIN/COUNTRY/FERRY/MOTORWAY/PEDESTRIAN/TOLL_ROAD/TOLL_VIGNETTE/TRAFFIC/TRAVEL_MODE/TUNNEL/CARPOOL/URBAN)
+ * travelMode: String(car/truck/taxi/bus/van/motorcycle/bicycle/pedestrian/other)
+ * simpleCategory: String(JAM/ROAD_WORK/ROAD_CLOSURE/OTHER)
+ * effectiveSpeedInKmh: Integer
+ * delayInSeconds: Integer
+ * delayMagnitude: String(0/1/2/3/4)
+ * tec: {
+ * effectCode: Integer
+ * causes: [
+ * {
+ * mainCauseCode: Integer
+ * subCauseCode: Integer
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * guidance: {
+ * instructions: [
+ * {
+ * routeOffsetInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * point: (recursive schema, see point above)
+ * pointIndex: Integer
+ * instructionType: String(TURN/ROAD_CHANGE/LOCATION_DEPARTURE/LOCATION_ARRIVAL/DIRECTION_INFO/LOCATION_WAYPOINT)
+ * roadNumbers: [
+ * String
+ * ]
+ * exitNumber: String
+ * street: String
+ * signpostText: String
+ * countryCode: String
+ * stateCode: String
+ * junctionType: String(REGULAR/ROUNDABOUT/BIFURCATION)
+ * turnAngleInDegrees: Integer
+ * roundaboutExitNumber: String
+ * possibleCombineWithNext: Boolean
+ * drivingSide: String(LEFT/RIGHT)
+ * maneuver: String(ARRIVE/ARRIVE_LEFT/ARRIVE_RIGHT/DEPART/STRAIGHT/KEEP_RIGHT/BEAR_RIGHT/TURN_RIGHT/SHARP_RIGHT/KEEP_LEFT/BEAR_LEFT/TURN_LEFT/SHARP_LEFT/MAKE_UTURN/ENTER_MOTORWAY/ENTER_FREEWAY/ENTER_HIGHWAY/TAKE_EXIT/MOTORWAY_EXIT_LEFT/MOTORWAY_EXIT_RIGHT/TAKE_FERRY/ROUNDABOUT_CROSS/ROUNDABOUT_RIGHT/ROUNDABOUT_LEFT/ROUNDABOUT_BACK/TRY_MAKE_UTURN/FOLLOW/SWITCH_PARALLEL_ROAD/SWITCH_MAIN_ROAD/ENTRANCE_RAMP/WAYPOINT_LEFT/WAYPOINT_RIGHT/WAYPOINT_REACHED)
+ * message: String
+ * combinedMessage: String
+ * }
+ * ]
+ * instructionGroups: [
+ * {
+ * firstInstructionIndex: Integer
+ * lastInstructionIndex: Integer
+ * groupLengthInMeters: Integer
+ * groupMessage: String
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * optimizedWaypoints: [
+ * {
+ * providedIndex: Integer
+ * optimizedIndex: Integer
+ * }
+ * ]
+ * report: {
+ * effectiveSettings: [
+ * {
+ * key: String
+ * value: String
+ * }
+ * ]
+ * }
+ * error: {
+ * code: String
+ * message: String
+ * target: String
+ * details: [
+ * (recursive schema, see above)
+ * ]
+ * additionalInfo: [
+ * {
+ * type: String
+ * info: Object
+ * }
+ * ]
+ * }
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ * @param batchId Batch id for querying the operation.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @param context The context to associate with this operation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return this object is returned from a successful Route Directions Batch service call along with {@link Response}
+ * on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getRouteDirectionsBatchWithResponseAsync(
+ String batchId, RequestOptions requestOptions, Context context) {
+ return service.getRouteDirectionsBatch(
+ this.client.getHost(), this.client.getServiceVersion().getVersion(), batchId, requestOptions, context);
+ }
+
+ /**
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ * ### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
+ * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
+ * `POST` batch request and looks like the following:
+ *
+ *
```
+ * https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}
+ * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
+ * using the _download URL_. 2. The server will respond with one of the following:
+ *
+ *
> HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
+ * time.
+ *
+ *
> HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
+ *
+ *
### Batch Response Model The returned data content is similar for async and sync requests. When downloading
+ * the results of an async batch request, if the batch has finished processing, the response body contains the batch
+ * response. This 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 in `batchItems` contains `statusCode` and `response` fields. Each `response` in
+ * `batchItems` is of one of the following types:
+ *
+ *
- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
+ * the query completed successfully.
+ *
+ *
- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
+ *
+ *
Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
+ *
+ *
```json { "summary": { "successfulRequests": 1, "totalRequests": 2 }, "batchItems": [ { "statusCode": 200,
+ * "response": { "routes": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "legs": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "points": [ { "latitude": 47.62094, "longitude": -122.34892 }, { "latitude":
+ * 47.62094, "longitude": -122.3485 }, { "latitude": 47.62095, "longitude": -122.3476 } ] } ], "sections": [ {
+ * "startPointIndex": 0, "endPointIndex": 40, "sectionType": "TRAVEL_MODE", "travelMode": "bicycle" } ] } ] } }, {
+ * "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
+ * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * batchSummary: {
+ * successfulRequests: Integer
+ * totalRequests: Integer
+ * }
+ * batchItems: [
+ * {
+ * statusCode: Integer
+ * response: {
+ * formatVersion: String
+ * routes: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * }
+ * legs: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * points: [
+ * {
+ * latitude: Double
+ * longitude: Double
+ * }
+ * ]
+ * }
+ * ]
+ * sections: [
+ * {
+ * startPointIndex: Integer
+ * endPointIndex: Integer
+ * sectionType: String(CAR_TRAIN/COUNTRY/FERRY/MOTORWAY/PEDESTRIAN/TOLL_ROAD/TOLL_VIGNETTE/TRAFFIC/TRAVEL_MODE/TUNNEL/CARPOOL/URBAN)
+ * travelMode: String(car/truck/taxi/bus/van/motorcycle/bicycle/pedestrian/other)
+ * simpleCategory: String(JAM/ROAD_WORK/ROAD_CLOSURE/OTHER)
+ * effectiveSpeedInKmh: Integer
+ * delayInSeconds: Integer
+ * delayMagnitude: String(0/1/2/3/4)
+ * tec: {
+ * effectCode: Integer
+ * causes: [
+ * {
+ * mainCauseCode: Integer
+ * subCauseCode: Integer
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * guidance: {
+ * instructions: [
+ * {
+ * routeOffsetInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * point: (recursive schema, see point above)
+ * pointIndex: Integer
+ * instructionType: String(TURN/ROAD_CHANGE/LOCATION_DEPARTURE/LOCATION_ARRIVAL/DIRECTION_INFO/LOCATION_WAYPOINT)
+ * roadNumbers: [
+ * String
+ * ]
+ * exitNumber: String
+ * street: String
+ * signpostText: String
+ * countryCode: String
+ * stateCode: String
+ * junctionType: String(REGULAR/ROUNDABOUT/BIFURCATION)
+ * turnAngleInDegrees: Integer
+ * roundaboutExitNumber: String
+ * possibleCombineWithNext: Boolean
+ * drivingSide: String(LEFT/RIGHT)
+ * maneuver: String(ARRIVE/ARRIVE_LEFT/ARRIVE_RIGHT/DEPART/STRAIGHT/KEEP_RIGHT/BEAR_RIGHT/TURN_RIGHT/SHARP_RIGHT/KEEP_LEFT/BEAR_LEFT/TURN_LEFT/SHARP_LEFT/MAKE_UTURN/ENTER_MOTORWAY/ENTER_FREEWAY/ENTER_HIGHWAY/TAKE_EXIT/MOTORWAY_EXIT_LEFT/MOTORWAY_EXIT_RIGHT/TAKE_FERRY/ROUNDABOUT_CROSS/ROUNDABOUT_RIGHT/ROUNDABOUT_LEFT/ROUNDABOUT_BACK/TRY_MAKE_UTURN/FOLLOW/SWITCH_PARALLEL_ROAD/SWITCH_MAIN_ROAD/ENTRANCE_RAMP/WAYPOINT_LEFT/WAYPOINT_RIGHT/WAYPOINT_REACHED)
+ * message: String
+ * combinedMessage: String
+ * }
+ * ]
+ * instructionGroups: [
+ * {
+ * firstInstructionIndex: Integer
+ * lastInstructionIndex: Integer
+ * groupLengthInMeters: Integer
+ * groupMessage: String
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * optimizedWaypoints: [
+ * {
+ * providedIndex: Integer
+ * optimizedIndex: Integer
+ * }
+ * ]
+ * report: {
+ * effectiveSettings: [
+ * {
+ * key: String
+ * value: String
+ * }
+ * ]
+ * }
+ * error: {
+ * code: String
+ * message: String
+ * target: String
+ * details: [
+ * (recursive schema, see above)
+ * ]
+ * additionalInfo: [
+ * {
+ * type: String
+ * info: Object
+ * }
+ * ]
+ * }
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ * @param batchId Batch id for querying the operation.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return the {@link PollerFlux} for polling of this object is returned from a successful Route Directions Batch
+ * service call.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginGetRouteDirectionsBatchAsync(
+ String batchId, RequestOptions requestOptions) {
+ return PollerFlux.create(
+ Duration.ofSeconds(1),
+ () -> this.getRouteDirectionsBatchWithResponseAsync(batchId, requestOptions),
+ new DefaultPollingStrategy<>(this.client.getHttpPipeline()),
+ new TypeReferenceBinaryData(),
+ new TypeReferenceBinaryData());
+ }
+
+ /**
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ * ### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
+ * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
+ * `POST` batch request and looks like the following:
+ *
+ *
```
+ * https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}
+ * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
+ * using the _download URL_. 2. The server will respond with one of the following:
+ *
+ *
> HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
+ * time.
+ *
+ *
> HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
+ *
+ *
### Batch Response Model The returned data content is similar for async and sync requests. When downloading
+ * the results of an async batch request, if the batch has finished processing, the response body contains the batch
+ * response. This 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 in `batchItems` contains `statusCode` and `response` fields. Each `response` in
+ * `batchItems` is of one of the following types:
+ *
+ *
- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
+ * the query completed successfully.
+ *
+ *
- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
+ *
+ *
Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
+ *
+ *
```json { "summary": { "successfulRequests": 1, "totalRequests": 2 }, "batchItems": [ { "statusCode": 200,
+ * "response": { "routes": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "legs": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "points": [ { "latitude": 47.62094, "longitude": -122.34892 }, { "latitude":
+ * 47.62094, "longitude": -122.3485 }, { "latitude": 47.62095, "longitude": -122.3476 } ] } ], "sections": [ {
+ * "startPointIndex": 0, "endPointIndex": 40, "sectionType": "TRAVEL_MODE", "travelMode": "bicycle" } ] } ] } }, {
+ * "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
+ * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * batchSummary: {
+ * successfulRequests: Integer
+ * totalRequests: Integer
+ * }
+ * batchItems: [
+ * {
+ * statusCode: Integer
+ * response: {
+ * formatVersion: String
+ * routes: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * }
+ * legs: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * points: [
+ * {
+ * latitude: Double
+ * longitude: Double
+ * }
+ * ]
+ * }
+ * ]
+ * sections: [
+ * {
+ * startPointIndex: Integer
+ * endPointIndex: Integer
+ * sectionType: String(CAR_TRAIN/COUNTRY/FERRY/MOTORWAY/PEDESTRIAN/TOLL_ROAD/TOLL_VIGNETTE/TRAFFIC/TRAVEL_MODE/TUNNEL/CARPOOL/URBAN)
+ * travelMode: String(car/truck/taxi/bus/van/motorcycle/bicycle/pedestrian/other)
+ * simpleCategory: String(JAM/ROAD_WORK/ROAD_CLOSURE/OTHER)
+ * effectiveSpeedInKmh: Integer
+ * delayInSeconds: Integer
+ * delayMagnitude: String(0/1/2/3/4)
+ * tec: {
+ * effectCode: Integer
+ * causes: [
+ * {
+ * mainCauseCode: Integer
+ * subCauseCode: Integer
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * guidance: {
+ * instructions: [
+ * {
+ * routeOffsetInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * point: (recursive schema, see point above)
+ * pointIndex: Integer
+ * instructionType: String(TURN/ROAD_CHANGE/LOCATION_DEPARTURE/LOCATION_ARRIVAL/DIRECTION_INFO/LOCATION_WAYPOINT)
+ * roadNumbers: [
+ * String
+ * ]
+ * exitNumber: String
+ * street: String
+ * signpostText: String
+ * countryCode: String
+ * stateCode: String
+ * junctionType: String(REGULAR/ROUNDABOUT/BIFURCATION)
+ * turnAngleInDegrees: Integer
+ * roundaboutExitNumber: String
+ * possibleCombineWithNext: Boolean
+ * drivingSide: String(LEFT/RIGHT)
+ * maneuver: String(ARRIVE/ARRIVE_LEFT/ARRIVE_RIGHT/DEPART/STRAIGHT/KEEP_RIGHT/BEAR_RIGHT/TURN_RIGHT/SHARP_RIGHT/KEEP_LEFT/BEAR_LEFT/TURN_LEFT/SHARP_LEFT/MAKE_UTURN/ENTER_MOTORWAY/ENTER_FREEWAY/ENTER_HIGHWAY/TAKE_EXIT/MOTORWAY_EXIT_LEFT/MOTORWAY_EXIT_RIGHT/TAKE_FERRY/ROUNDABOUT_CROSS/ROUNDABOUT_RIGHT/ROUNDABOUT_LEFT/ROUNDABOUT_BACK/TRY_MAKE_UTURN/FOLLOW/SWITCH_PARALLEL_ROAD/SWITCH_MAIN_ROAD/ENTRANCE_RAMP/WAYPOINT_LEFT/WAYPOINT_RIGHT/WAYPOINT_REACHED)
+ * message: String
+ * combinedMessage: String
+ * }
+ * ]
+ * instructionGroups: [
+ * {
+ * firstInstructionIndex: Integer
+ * lastInstructionIndex: Integer
+ * groupLengthInMeters: Integer
+ * groupMessage: String
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * optimizedWaypoints: [
+ * {
+ * providedIndex: Integer
+ * optimizedIndex: Integer
+ * }
+ * ]
+ * report: {
+ * effectiveSettings: [
+ * {
+ * key: String
+ * value: String
+ * }
+ * ]
+ * }
+ * error: {
+ * code: String
+ * message: String
+ * target: String
+ * details: [
+ * (recursive schema, see above)
+ * ]
+ * additionalInfo: [
+ * {
+ * type: String
+ * info: Object
+ * }
+ * ]
+ * }
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ * @param batchId Batch id for querying the operation.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @param context The context to associate with this operation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return the {@link PollerFlux} for polling of this object is returned from a successful Route Directions Batch
+ * service call.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginGetRouteDirectionsBatchAsync(
+ String batchId, RequestOptions requestOptions, Context context) {
+ return PollerFlux.create(
+ Duration.ofSeconds(1),
+ () -> this.getRouteDirectionsBatchWithResponseAsync(batchId, requestOptions, context),
+ new DefaultPollingStrategy<>(this.client.getHttpPipeline()),
+ new TypeReferenceBinaryData(),
+ new TypeReferenceBinaryData());
+ }
+
+ /**
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ * ### Download Asynchronous Batch Results To download the async batch results you will issue a `GET` request to
+ * the batch download endpoint. This _download URL_ can be obtained from the `Location` header of a successful
+ * `POST` batch request and looks like the following:
+ *
+ *
```
+ * https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0&subscription-key={subscription-key}
+ * ``` Here's the typical sequence of operations for downloading the batch results: 1. Client sends a `GET` request
+ * using the _download URL_. 2. The server will respond with one of the following:
+ *
+ *
> HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
+ * time.
+ *
+ *
> HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
+ *
+ *
### Batch Response Model The returned data content is similar for async and sync requests. When downloading
+ * the results of an async batch request, if the batch has finished processing, the response body contains the batch
+ * response. This 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 in `batchItems` contains `statusCode` and `response` fields. Each `response` in
+ * `batchItems` is of one of the following types:
+ *
+ *
- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
+ * the query completed successfully.
+ *
+ *
- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
+ *
+ *
Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
+ *
+ *
```json { "summary": { "successfulRequests": 1, "totalRequests": 2 }, "batchItems": [ { "statusCode": 200,
+ * "response": { "routes": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "legs": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "points": [ { "latitude": 47.62094, "longitude": -122.34892 }, { "latitude":
+ * 47.62094, "longitude": -122.3485 }, { "latitude": 47.62095, "longitude": -122.3476 } ] } ], "sections": [ {
+ * "startPointIndex": 0, "endPointIndex": 40, "sectionType": "TRAVEL_MODE", "travelMode": "bicycle" } ] } ] } }, {
+ * "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
+ * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * batchSummary: {
+ * successfulRequests: Integer
+ * totalRequests: Integer
+ * }
+ * batchItems: [
+ * {
+ * statusCode: Integer
+ * response: {
+ * formatVersion: String
+ * routes: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * }
+ * legs: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * points: [
+ * {
+ * latitude: Double
+ * longitude: Double
+ * }
+ * ]
+ * }
+ * ]
+ * sections: [
+ * {
+ * startPointIndex: Integer
+ * endPointIndex: Integer
+ * sectionType: String(CAR_TRAIN/COUNTRY/FERRY/MOTORWAY/PEDESTRIAN/TOLL_ROAD/TOLL_VIGNETTE/TRAFFIC/TRAVEL_MODE/TUNNEL/CARPOOL/URBAN)
+ * travelMode: String(car/truck/taxi/bus/van/motorcycle/bicycle/pedestrian/other)
+ * simpleCategory: String(JAM/ROAD_WORK/ROAD_CLOSURE/OTHER)
+ * effectiveSpeedInKmh: Integer
+ * delayInSeconds: Integer
+ * delayMagnitude: String(0/1/2/3/4)
+ * tec: {
+ * effectCode: Integer
+ * causes: [
+ * {
+ * mainCauseCode: Integer
+ * subCauseCode: Integer
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * guidance: {
+ * instructions: [
+ * {
+ * routeOffsetInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * point: (recursive schema, see point above)
+ * pointIndex: Integer
+ * instructionType: String(TURN/ROAD_CHANGE/LOCATION_DEPARTURE/LOCATION_ARRIVAL/DIRECTION_INFO/LOCATION_WAYPOINT)
+ * roadNumbers: [
+ * String
+ * ]
+ * exitNumber: String
+ * street: String
+ * signpostText: String
+ * countryCode: String
+ * stateCode: String
+ * junctionType: String(REGULAR/ROUNDABOUT/BIFURCATION)
+ * turnAngleInDegrees: Integer
+ * roundaboutExitNumber: String
+ * possibleCombineWithNext: Boolean
+ * drivingSide: String(LEFT/RIGHT)
+ * maneuver: String(ARRIVE/ARRIVE_LEFT/ARRIVE_RIGHT/DEPART/STRAIGHT/KEEP_RIGHT/BEAR_RIGHT/TURN_RIGHT/SHARP_RIGHT/KEEP_LEFT/BEAR_LEFT/TURN_LEFT/SHARP_LEFT/MAKE_UTURN/ENTER_MOTORWAY/ENTER_FREEWAY/ENTER_HIGHWAY/TAKE_EXIT/MOTORWAY_EXIT_LEFT/MOTORWAY_EXIT_RIGHT/TAKE_FERRY/ROUNDABOUT_CROSS/ROUNDABOUT_RIGHT/ROUNDABOUT_LEFT/ROUNDABOUT_BACK/TRY_MAKE_UTURN/FOLLOW/SWITCH_PARALLEL_ROAD/SWITCH_MAIN_ROAD/ENTRANCE_RAMP/WAYPOINT_LEFT/WAYPOINT_RIGHT/WAYPOINT_REACHED)
+ * message: String
+ * combinedMessage: String
+ * }
+ * ]
+ * instructionGroups: [
+ * {
+ * firstInstructionIndex: Integer
+ * lastInstructionIndex: Integer
+ * groupLengthInMeters: Integer
+ * groupMessage: String
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * optimizedWaypoints: [
+ * {
+ * providedIndex: Integer
+ * optimizedIndex: Integer
+ * }
+ * ]
+ * report: {
+ * effectiveSettings: [
+ * {
+ * key: String
+ * value: String
+ * }
+ * ]
+ * }
+ * error: {
+ * code: String
+ * message: String
+ * target: String
+ * details: [
+ * (recursive schema, see above)
+ * ]
+ * additionalInfo: [
+ * {
+ * type: String
+ * info: Object
+ * }
+ * ]
+ * }
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ * @param batchId Batch id for querying the operation.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return the {@link SyncPoller} for polling of this object is returned from a successful Route Directions Batch
+ * service call.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginGetRouteDirectionsBatch(
+ String batchId, RequestOptions requestOptions) {
+ return this.beginGetRouteDirectionsBatchAsync(batchId, requestOptions).getSyncPoller();
+ }
+
+ /**
+ * **Route Directions Batch API**
+ *
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ *
The Route Directions Batch API sends batches of queries to [Route Directions
+ * API](https://docs.microsoft.com/rest/api/maps/route/getroutedirections) using just a single API call. You can
+ * call Route Directions Batch API to run either asynchronously (async) or synchronously (sync). The async API
+ * allows caller to batch up to **700** queries and sync API up to **100** queries. ### Submit Synchronous Batch
+ * Request The 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. ``` POST
+ * https://atlas.microsoft.com/route/directions/batch/sync/json?api-version=1.0&subscription-key={subscription-key}
+ * ``` ### Batch Response Model The returned data content is similar for async and sync requests. When downloading
+ * the results of an async batch request, if the batch has finished processing, the response body contains the batch
+ * response. This 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 in `batchItems` contains `statusCode` and `response` fields. Each `response` in
+ * `batchItems` is of one of the following types:
+ *
+ *
- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
+ * the query completed successfully.
+ *
+ *
- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
+ *
+ *
Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
+ *
+ *
```json { "summary": { "successfulRequests": 1, "totalRequests": 2 }, "batchItems": [ { "statusCode": 200,
+ * "response": { "routes": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "legs": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "points": [ { "latitude": 47.62094, "longitude": -122.34892 }, { "latitude":
+ * 47.62094, "longitude": -122.3485 }, { "latitude": 47.62095, "longitude": -122.3476 } ] } ], "sections": [ {
+ * "startPointIndex": 0, "endPointIndex": 40, "sectionType": "TRAVEL_MODE", "travelMode": "bicycle" } ] } ] } }, {
+ * "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
+ * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Request Body Schema
+ *
+ *
{@code
+ * {
+ * batchItems: [
+ * {
+ * query: String
+ * }
+ * ]
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * batchSummary: {
+ * successfulRequests: Integer
+ * totalRequests: Integer
+ * }
+ * batchItems: [
+ * {
+ * statusCode: Integer
+ * response: {
+ * formatVersion: String
+ * routes: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * }
+ * legs: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * points: [
+ * {
+ * latitude: Double
+ * longitude: Double
+ * }
+ * ]
+ * }
+ * ]
+ * sections: [
+ * {
+ * startPointIndex: Integer
+ * endPointIndex: Integer
+ * sectionType: String(CAR_TRAIN/COUNTRY/FERRY/MOTORWAY/PEDESTRIAN/TOLL_ROAD/TOLL_VIGNETTE/TRAFFIC/TRAVEL_MODE/TUNNEL/CARPOOL/URBAN)
+ * travelMode: String(car/truck/taxi/bus/van/motorcycle/bicycle/pedestrian/other)
+ * simpleCategory: String(JAM/ROAD_WORK/ROAD_CLOSURE/OTHER)
+ * effectiveSpeedInKmh: Integer
+ * delayInSeconds: Integer
+ * delayMagnitude: String(0/1/2/3/4)
+ * tec: {
+ * effectCode: Integer
+ * causes: [
+ * {
+ * mainCauseCode: Integer
+ * subCauseCode: Integer
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * guidance: {
+ * instructions: [
+ * {
+ * routeOffsetInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * point: (recursive schema, see point above)
+ * pointIndex: Integer
+ * instructionType: String(TURN/ROAD_CHANGE/LOCATION_DEPARTURE/LOCATION_ARRIVAL/DIRECTION_INFO/LOCATION_WAYPOINT)
+ * roadNumbers: [
+ * String
+ * ]
+ * exitNumber: String
+ * street: String
+ * signpostText: String
+ * countryCode: String
+ * stateCode: String
+ * junctionType: String(REGULAR/ROUNDABOUT/BIFURCATION)
+ * turnAngleInDegrees: Integer
+ * roundaboutExitNumber: String
+ * possibleCombineWithNext: Boolean
+ * drivingSide: String(LEFT/RIGHT)
+ * maneuver: String(ARRIVE/ARRIVE_LEFT/ARRIVE_RIGHT/DEPART/STRAIGHT/KEEP_RIGHT/BEAR_RIGHT/TURN_RIGHT/SHARP_RIGHT/KEEP_LEFT/BEAR_LEFT/TURN_LEFT/SHARP_LEFT/MAKE_UTURN/ENTER_MOTORWAY/ENTER_FREEWAY/ENTER_HIGHWAY/TAKE_EXIT/MOTORWAY_EXIT_LEFT/MOTORWAY_EXIT_RIGHT/TAKE_FERRY/ROUNDABOUT_CROSS/ROUNDABOUT_RIGHT/ROUNDABOUT_LEFT/ROUNDABOUT_BACK/TRY_MAKE_UTURN/FOLLOW/SWITCH_PARALLEL_ROAD/SWITCH_MAIN_ROAD/ENTRANCE_RAMP/WAYPOINT_LEFT/WAYPOINT_RIGHT/WAYPOINT_REACHED)
+ * message: String
+ * combinedMessage: String
+ * }
+ * ]
+ * instructionGroups: [
+ * {
+ * firstInstructionIndex: Integer
+ * lastInstructionIndex: Integer
+ * groupLengthInMeters: Integer
+ * groupMessage: String
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * optimizedWaypoints: [
+ * {
+ * providedIndex: Integer
+ * optimizedIndex: Integer
+ * }
+ * ]
+ * report: {
+ * effectiveSettings: [
+ * {
+ * key: String
+ * value: String
+ * }
+ * ]
+ * }
+ * error: {
+ * code: String
+ * message: String
+ * target: String
+ * details: [
+ * (recursive schema, see above)
+ * ]
+ * additionalInfo: [
+ * {
+ * type: String
+ * info: Object
+ * }
+ * ]
+ * }
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ * @param format Desired format of the response. Only `json` format is supported.
+ * @param routeDirectionsBatchQueries The list of route directions queries/requests to process. The list can contain
+ * a max of 700 queries for async and 100 queries for sync version and must contain at least 1 query.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return this object is returned from a successful Route Directions Batch service call along with {@link Response}
+ * on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> requestRouteDirectionsBatchSyncWithResponseAsync(
+ String format, BinaryData routeDirectionsBatchQueries, RequestOptions requestOptions) {
+ return FluxUtil.withContext(
+ context ->
+ service.requestRouteDirectionsBatchSync(
+ this.client.getHost(),
+ this.client.getServiceVersion().getVersion(),
+ format,
+ routeDirectionsBatchQueries,
+ requestOptions,
+ context));
+ }
+
+ /**
+ * **Route Directions Batch API**
+ *
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ *
The Route Directions Batch API sends batches of queries to [Route Directions
+ * API](https://docs.microsoft.com/rest/api/maps/route/getroutedirections) using just a single API call. You can
+ * call Route Directions Batch API to run either asynchronously (async) or synchronously (sync). The async API
+ * allows caller to batch up to **700** queries and sync API up to **100** queries. ### Submit Synchronous Batch
+ * Request The 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. ``` POST
+ * https://atlas.microsoft.com/route/directions/batch/sync/json?api-version=1.0&subscription-key={subscription-key}
+ * ``` ### Batch Response Model The returned data content is similar for async and sync requests. When downloading
+ * the results of an async batch request, if the batch has finished processing, the response body contains the batch
+ * response. This 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 in `batchItems` contains `statusCode` and `response` fields. Each `response` in
+ * `batchItems` is of one of the following types:
+ *
+ *
- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
+ * the query completed successfully.
+ *
+ *
- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
+ *
+ *
Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
+ *
+ *
```json { "summary": { "successfulRequests": 1, "totalRequests": 2 }, "batchItems": [ { "statusCode": 200,
+ * "response": { "routes": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "legs": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "points": [ { "latitude": 47.62094, "longitude": -122.34892 }, { "latitude":
+ * 47.62094, "longitude": -122.3485 }, { "latitude": 47.62095, "longitude": -122.3476 } ] } ], "sections": [ {
+ * "startPointIndex": 0, "endPointIndex": 40, "sectionType": "TRAVEL_MODE", "travelMode": "bicycle" } ] } ] } }, {
+ * "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
+ * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Request Body Schema
+ *
+ *
{@code
+ * {
+ * batchItems: [
+ * {
+ * query: String
+ * }
+ * ]
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * batchSummary: {
+ * successfulRequests: Integer
+ * totalRequests: Integer
+ * }
+ * batchItems: [
+ * {
+ * statusCode: Integer
+ * response: {
+ * formatVersion: String
+ * routes: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * }
+ * legs: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * points: [
+ * {
+ * latitude: Double
+ * longitude: Double
+ * }
+ * ]
+ * }
+ * ]
+ * sections: [
+ * {
+ * startPointIndex: Integer
+ * endPointIndex: Integer
+ * sectionType: String(CAR_TRAIN/COUNTRY/FERRY/MOTORWAY/PEDESTRIAN/TOLL_ROAD/TOLL_VIGNETTE/TRAFFIC/TRAVEL_MODE/TUNNEL/CARPOOL/URBAN)
+ * travelMode: String(car/truck/taxi/bus/van/motorcycle/bicycle/pedestrian/other)
+ * simpleCategory: String(JAM/ROAD_WORK/ROAD_CLOSURE/OTHER)
+ * effectiveSpeedInKmh: Integer
+ * delayInSeconds: Integer
+ * delayMagnitude: String(0/1/2/3/4)
+ * tec: {
+ * effectCode: Integer
+ * causes: [
+ * {
+ * mainCauseCode: Integer
+ * subCauseCode: Integer
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * guidance: {
+ * instructions: [
+ * {
+ * routeOffsetInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * point: (recursive schema, see point above)
+ * pointIndex: Integer
+ * instructionType: String(TURN/ROAD_CHANGE/LOCATION_DEPARTURE/LOCATION_ARRIVAL/DIRECTION_INFO/LOCATION_WAYPOINT)
+ * roadNumbers: [
+ * String
+ * ]
+ * exitNumber: String
+ * street: String
+ * signpostText: String
+ * countryCode: String
+ * stateCode: String
+ * junctionType: String(REGULAR/ROUNDABOUT/BIFURCATION)
+ * turnAngleInDegrees: Integer
+ * roundaboutExitNumber: String
+ * possibleCombineWithNext: Boolean
+ * drivingSide: String(LEFT/RIGHT)
+ * maneuver: String(ARRIVE/ARRIVE_LEFT/ARRIVE_RIGHT/DEPART/STRAIGHT/KEEP_RIGHT/BEAR_RIGHT/TURN_RIGHT/SHARP_RIGHT/KEEP_LEFT/BEAR_LEFT/TURN_LEFT/SHARP_LEFT/MAKE_UTURN/ENTER_MOTORWAY/ENTER_FREEWAY/ENTER_HIGHWAY/TAKE_EXIT/MOTORWAY_EXIT_LEFT/MOTORWAY_EXIT_RIGHT/TAKE_FERRY/ROUNDABOUT_CROSS/ROUNDABOUT_RIGHT/ROUNDABOUT_LEFT/ROUNDABOUT_BACK/TRY_MAKE_UTURN/FOLLOW/SWITCH_PARALLEL_ROAD/SWITCH_MAIN_ROAD/ENTRANCE_RAMP/WAYPOINT_LEFT/WAYPOINT_RIGHT/WAYPOINT_REACHED)
+ * message: String
+ * combinedMessage: String
+ * }
+ * ]
+ * instructionGroups: [
+ * {
+ * firstInstructionIndex: Integer
+ * lastInstructionIndex: Integer
+ * groupLengthInMeters: Integer
+ * groupMessage: String
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * optimizedWaypoints: [
+ * {
+ * providedIndex: Integer
+ * optimizedIndex: Integer
+ * }
+ * ]
+ * report: {
+ * effectiveSettings: [
+ * {
+ * key: String
+ * value: String
+ * }
+ * ]
+ * }
+ * error: {
+ * code: String
+ * message: String
+ * target: String
+ * details: [
+ * (recursive schema, see above)
+ * ]
+ * additionalInfo: [
+ * {
+ * type: String
+ * info: Object
+ * }
+ * ]
+ * }
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ * @param format Desired format of the response. Only `json` format is supported.
+ * @param routeDirectionsBatchQueries The list of route directions queries/requests to process. The list can contain
+ * a max of 700 queries for async and 100 queries for sync version and must contain at least 1 query.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @param context The context to associate with this operation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return this object is returned from a successful Route Directions Batch service call along with {@link Response}
+ * on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> requestRouteDirectionsBatchSyncWithResponseAsync(
+ String format, BinaryData routeDirectionsBatchQueries, RequestOptions requestOptions, Context context) {
+ return service.requestRouteDirectionsBatchSync(
+ this.client.getHost(),
+ this.client.getServiceVersion().getVersion(),
+ format,
+ routeDirectionsBatchQueries,
+ requestOptions,
+ context);
+ }
+
+ /**
+ * **Route Directions Batch API**
+ *
+ * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
+ *
+ *
The Route Directions Batch API sends batches of queries to [Route Directions
+ * API](https://docs.microsoft.com/rest/api/maps/route/getroutedirections) using just a single API call. You can
+ * call Route Directions Batch API to run either asynchronously (async) or synchronously (sync). The async API
+ * allows caller to batch up to **700** queries and sync API up to **100** queries. ### Submit Synchronous Batch
+ * Request The 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. ``` POST
+ * https://atlas.microsoft.com/route/directions/batch/sync/json?api-version=1.0&subscription-key={subscription-key}
+ * ``` ### Batch Response Model The returned data content is similar for async and sync requests. When downloading
+ * the results of an async batch request, if the batch has finished processing, the response body contains the batch
+ * response. This 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 in `batchItems` contains `statusCode` and `response` fields. Each `response` in
+ * `batchItems` is of one of the following types:
+ *
+ *
- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
+ * the query completed successfully.
+ *
+ *
- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
+ *
+ *
Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
+ *
+ *
```json { "summary": { "successfulRequests": 1, "totalRequests": 2 }, "batchItems": [ { "statusCode": 200,
+ * "response": { "routes": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "legs": [ { "summary": { "lengthInMeters": 1758, "travelTimeInSeconds": 387,
+ * "trafficDelayInSeconds": 0, "departureTime": "2018-07-17T00:49:56+00:00", "arrivalTime":
+ * "2018-07-17T00:56:22+00:00" }, "points": [ { "latitude": 47.62094, "longitude": -122.34892 }, { "latitude":
+ * 47.62094, "longitude": -122.3485 }, { "latitude": 47.62095, "longitude": -122.3476 } ] } ], "sections": [ {
+ * "startPointIndex": 0, "endPointIndex": 40, "sectionType": "TRAVEL_MODE", "travelMode": "bicycle" } ] } ] } }, {
+ * "statusCode": 400, "response": { "error": { "code": "400 BadRequest", "message": "Bad request: one or more
+ * parameters were incorrectly specified or are mutually exclusive." } } } ] } ```.
+ *
+ *
Query Parameters
+ *
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | api-version | String | Yes | Api Version |
+ *
+ *
+ * Header Parameters
+ *
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | x-ms-client-id | String | No | Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following [articles](https://aka.ms/amauthdetails) for guidance. |
+ *
+ *
+ * Request Body Schema
+ *
+ *
{@code
+ * {
+ * batchItems: [
+ * {
+ * query: String
+ * }
+ * ]
+ * }
+ * }
+ *
+ * Response Body Schema
+ *
+ *
{@code
+ * {
+ * batchSummary: {
+ * successfulRequests: Integer
+ * totalRequests: Integer
+ * }
+ * batchItems: [
+ * {
+ * statusCode: Integer
+ * response: {
+ * formatVersion: String
+ * routes: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * }
+ * legs: [
+ * {
+ * summary: {
+ * lengthInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * trafficDelayInSeconds: Integer
+ * departureTime: String
+ * arrivalTime: String
+ * noTrafficTravelTimeInSeconds: Integer
+ * historicTrafficTravelTimeInSeconds: Integer
+ * liveTrafficIncidentsTravelTimeInSeconds: Integer
+ * fuelConsumptionInLiters: Double
+ * batteryConsumptionInKwH: Double
+ * }
+ * points: [
+ * {
+ * latitude: Double
+ * longitude: Double
+ * }
+ * ]
+ * }
+ * ]
+ * sections: [
+ * {
+ * startPointIndex: Integer
+ * endPointIndex: Integer
+ * sectionType: String(CAR_TRAIN/COUNTRY/FERRY/MOTORWAY/PEDESTRIAN/TOLL_ROAD/TOLL_VIGNETTE/TRAFFIC/TRAVEL_MODE/TUNNEL/CARPOOL/URBAN)
+ * travelMode: String(car/truck/taxi/bus/van/motorcycle/bicycle/pedestrian/other)
+ * simpleCategory: String(JAM/ROAD_WORK/ROAD_CLOSURE/OTHER)
+ * effectiveSpeedInKmh: Integer
+ * delayInSeconds: Integer
+ * delayMagnitude: String(0/1/2/3/4)
+ * tec: {
+ * effectCode: Integer
+ * causes: [
+ * {
+ * mainCauseCode: Integer
+ * subCauseCode: Integer
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * guidance: {
+ * instructions: [
+ * {
+ * routeOffsetInMeters: Integer
+ * travelTimeInSeconds: Integer
+ * point: (recursive schema, see point above)
+ * pointIndex: Integer
+ * instructionType: String(TURN/ROAD_CHANGE/LOCATION_DEPARTURE/LOCATION_ARRIVAL/DIRECTION_INFO/LOCATION_WAYPOINT)
+ * roadNumbers: [
+ * String
+ * ]
+ * exitNumber: String
+ * street: String
+ * signpostText: String
+ * countryCode: String
+ * stateCode: String
+ * junctionType: String(REGULAR/ROUNDABOUT/BIFURCATION)
+ * turnAngleInDegrees: Integer
+ * roundaboutExitNumber: String
+ * possibleCombineWithNext: Boolean
+ * drivingSide: String(LEFT/RIGHT)
+ * maneuver: String(ARRIVE/ARRIVE_LEFT/ARRIVE_RIGHT/DEPART/STRAIGHT/KEEP_RIGHT/BEAR_RIGHT/TURN_RIGHT/SHARP_RIGHT/KEEP_LEFT/BEAR_LEFT/TURN_LEFT/SHARP_LEFT/MAKE_UTURN/ENTER_MOTORWAY/ENTER_FREEWAY/ENTER_HIGHWAY/TAKE_EXIT/MOTORWAY_EXIT_LEFT/MOTORWAY_EXIT_RIGHT/TAKE_FERRY/ROUNDABOUT_CROSS/ROUNDABOUT_RIGHT/ROUNDABOUT_LEFT/ROUNDABOUT_BACK/TRY_MAKE_UTURN/FOLLOW/SWITCH_PARALLEL_ROAD/SWITCH_MAIN_ROAD/ENTRANCE_RAMP/WAYPOINT_LEFT/WAYPOINT_RIGHT/WAYPOINT_REACHED)
+ * message: String
+ * combinedMessage: String
+ * }
+ * ]
+ * instructionGroups: [
+ * {
+ * firstInstructionIndex: Integer
+ * lastInstructionIndex: Integer
+ * groupLengthInMeters: Integer
+ * groupMessage: String
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * optimizedWaypoints: [
+ * {
+ * providedIndex: Integer
+ * optimizedIndex: Integer
+ * }
+ * ]
+ * report: {
+ * effectiveSettings: [
+ * {
+ * key: String
+ * value: String
+ * }
+ * ]
+ * }
+ * error: {
+ * code: String
+ * message: String
+ * target: String
+ * details: [
+ * (recursive schema, see above)
+ * ]
+ * additionalInfo: [
+ * {
+ * type: String
+ * info: Object
+ * }
+ * ]
+ * }
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ * @param format Desired format of the response. Only `json` format is supported.
+ * @param routeDirectionsBatchQueries The list of route directions queries/requests to process. The list can contain
+ * a max of 700 queries for async and 100 queries for sync version and must contain at least 1 query.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @return this object is returned from a successful Route Directions Batch service call along with {@link
+ * Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response requestRouteDirectionsBatchSyncWithResponse(
+ String format, BinaryData routeDirectionsBatchQueries, RequestOptions requestOptions) {
+ return requestRouteDirectionsBatchSyncWithResponseAsync(format, routeDirectionsBatchQueries, requestOptions)
+ .block();
+ }
+
+ private static final class TypeReferenceBinaryData extends TypeReference {
+ // empty
+ }
+}
diff --git a/sdk/maps/azure-maps-route/src/main/java/com/azure/maps/route/package-info.java b/sdk/maps/azure-maps-route/src/main/java/com/azure/maps/route/package-info.java
new file mode 100644
index 000000000000..09b79ea1b7f6
--- /dev/null
+++ b/sdk/maps/azure-maps-route/src/main/java/com/azure/maps/route/package-info.java
@@ -0,0 +1,6 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/** Package containing the classes for AzureMapsRouteService. Azure Maps Route REST APIs. */
+package com.azure.maps.route;
diff --git a/sdk/maps/azure-maps-route/src/main/java/module-info.java b/sdk/maps/azure-maps-route/src/main/java/module-info.java
new file mode 100644
index 000000000000..df21502a8c5f
--- /dev/null
+++ b/sdk/maps/azure-maps-route/src/main/java/module-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+module com.azure.maps.route {
+ requires transitive com.azure.core;
+
+ exports com.azure.maps.route;
+}
diff --git a/sdk/maps/azure-maps-route/src/main/resources/azure-maps-route.properties b/sdk/maps/azure-maps-route/src/main/resources/azure-maps-route.properties
new file mode 100644
index 000000000000..ca812989b4f2
--- /dev/null
+++ b/sdk/maps/azure-maps-route/src/main/resources/azure-maps-route.properties
@@ -0,0 +1,2 @@
+name=${project.artifactId}
+version=${project.version}
diff --git a/sdk/maps/azure-maps-route/src/samples/java/com/azure/maps/route/ReadmeSamples.java b/sdk/maps/azure-maps-route/src/samples/java/com/azure/maps/route/ReadmeSamples.java
new file mode 100644
index 000000000000..e28a16be81b4
--- /dev/null
+++ b/sdk/maps/azure-maps-route/src/samples/java/com/azure/maps/route/ReadmeSamples.java
@@ -0,0 +1,12 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.maps.route;
+
+public final class ReadmeSamples {
+ public void readmeSamples() {
+ // BEGIN: com.azure.maps.route.readme
+ // END: com.azure.maps.route.readme
+ }
+}
diff --git a/sdk/maps/azure-maps-route/src/samples/java/com/azure/maps/route/generated/SuccessfullyRetrieveARouteBetweenAnOriginAndADestination.java b/sdk/maps/azure-maps-route/src/samples/java/com/azure/maps/route/generated/SuccessfullyRetrieveARouteBetweenAnOriginAndADestination.java
new file mode 100644
index 000000000000..c7dd022fdde6
--- /dev/null
+++ b/sdk/maps/azure-maps-route/src/samples/java/com/azure/maps/route/generated/SuccessfullyRetrieveARouteBetweenAnOriginAndADestination.java
@@ -0,0 +1,25 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.maps.route.generated;
+
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.BinaryData;
+import com.azure.identity.DefaultAzureCredentialBuilder;
+import com.azure.maps.route.AzureMapsRouteServiceClient;
+import com.azure.maps.route.AzureMapsRouteServiceClientBuilder;
+
+public class SuccessfullyRetrieveARouteBetweenAnOriginAndADestination {
+ public static void main(String[] args) {
+ AzureMapsRouteServiceClient client =
+ new AzureMapsRouteServiceClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .host("https://atlas.microsoft.com")
+ .buildClient();
+ RequestOptions requestOptions = new RequestOptions();
+ requestOptions.addQueryParam("query", "52.50931,13.42936:52.50274,13.43872");
+ Response response = client.getRouteDirectionsWithResponse("json", requestOptions);
+ }
+}
diff --git a/sdk/maps/azure-maps-route/src/samples/java/com/azure/maps/route/generated/SuccessfullyRetrieveARouteBetweenAnOriginAndADestinationWithAdditionalParametersInTheBody.java b/sdk/maps/azure-maps-route/src/samples/java/com/azure/maps/route/generated/SuccessfullyRetrieveARouteBetweenAnOriginAndADestinationWithAdditionalParametersInTheBody.java
new file mode 100644
index 000000000000..2e39c5f7d2bf
--- /dev/null
+++ b/sdk/maps/azure-maps-route/src/samples/java/com/azure/maps/route/generated/SuccessfullyRetrieveARouteBetweenAnOriginAndADestinationWithAdditionalParametersInTheBody.java
@@ -0,0 +1,30 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.maps.route.generated;
+
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.BinaryData;
+import com.azure.identity.DefaultAzureCredentialBuilder;
+import com.azure.maps.route.AzureMapsRouteServiceClient;
+import com.azure.maps.route.AzureMapsRouteServiceClientBuilder;
+
+public class SuccessfullyRetrieveARouteBetweenAnOriginAndADestinationWithAdditionalParametersInTheBody {
+ public static void main(String[] args) {
+ AzureMapsRouteServiceClient client =
+ new AzureMapsRouteServiceClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .host("https://atlas.microsoft.com")
+ .buildClient();
+ BinaryData routeDirectionParameters =
+ BinaryData.fromString(
+ "{\"avoidAreas\":{\"type\":\"MultiPolygon\",\"coordinates\":[[[[-122.39456176757811,47.489368981370724],[-122.00454711914061,47.489368981370724],[-122.00454711914061,47.65151268066222],[-122.39456176757811,47.65151268066222],[-122.39456176757811,47.489368981370724]]],[[[100,0],[101,0],[101,1],[100,1],[100,0]]]]},\"avoidVignette\":[\"AUS\",\"CHE\"],\"supportingPoints\":{\"type\":\"GeometryCollection\",\"geometries\":[{\"type\":\"Point\",\"coordinates\":[13.42936,52.5093]},{\"type\":\"Point\",\"coordinates\":[13.42859,52.50844]}]}}");
+ RequestOptions requestOptions = new RequestOptions();
+ requestOptions.addQueryParam("query", "52.50931,13.42936:52.50274,13.43872");
+ Response response =
+ client.getRouteDirectionsWithAdditionalParametersWithResponse(
+ "json", routeDirectionParameters, requestOptions);
+ }
+}
diff --git a/sdk/maps/azure-maps-route/src/samples/java/com/azure/maps/route/generated/SuccessfullyRetrieveARouteMatrixRequestResultSynchronously.java b/sdk/maps/azure-maps-route/src/samples/java/com/azure/maps/route/generated/SuccessfullyRetrieveARouteMatrixRequestResultSynchronously.java
new file mode 100644
index 000000000000..86f9a62b422b
--- /dev/null
+++ b/sdk/maps/azure-maps-route/src/samples/java/com/azure/maps/route/generated/SuccessfullyRetrieveARouteMatrixRequestResultSynchronously.java
@@ -0,0 +1,29 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.maps.route.generated;
+
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.BinaryData;
+import com.azure.identity.DefaultAzureCredentialBuilder;
+import com.azure.maps.route.AzureMapsRouteServiceClient;
+import com.azure.maps.route.AzureMapsRouteServiceClientBuilder;
+
+public class SuccessfullyRetrieveARouteMatrixRequestResultSynchronously {
+ public static void main(String[] args) {
+ AzureMapsRouteServiceClient client =
+ new AzureMapsRouteServiceClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .host("https://atlas.microsoft.com")
+ .buildClient();
+ BinaryData routeMatrixQuery =
+ BinaryData.fromString(
+ "{\"destinations\":{\"type\":\"MultiPoint\",\"coordinates\":[[4.85003,52.36241],[13.42937,52.50931]]},\"origins\":{\"type\":\"MultiPoint\",\"coordinates\":[[4.85106,52.36006],[4.85056,52.36187]]}}");
+ RequestOptions requestOptions = new RequestOptions();
+ requestOptions.addQueryParam("routeType", "shortest");
+ Response response =
+ client.requestRouteMatrixSyncWithResponse("json", routeMatrixQuery, requestOptions);
+ }
+}
diff --git a/sdk/maps/azure-maps-route/src/samples/java/com/azure/maps/route/generated/SuccessfullyRetrieveASetOfLocationsThatCanBeReachedFromTheOriginPointBasedOnVariousConditions.java b/sdk/maps/azure-maps-route/src/samples/java/com/azure/maps/route/generated/SuccessfullyRetrieveASetOfLocationsThatCanBeReachedFromTheOriginPointBasedOnVariousConditions.java
new file mode 100644
index 000000000000..2dac7725bc43
--- /dev/null
+++ b/sdk/maps/azure-maps-route/src/samples/java/com/azure/maps/route/generated/SuccessfullyRetrieveASetOfLocationsThatCanBeReachedFromTheOriginPointBasedOnVariousConditions.java
@@ -0,0 +1,26 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.maps.route.generated;
+
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.BinaryData;
+import com.azure.identity.DefaultAzureCredentialBuilder;
+import com.azure.maps.route.AzureMapsRouteServiceClient;
+import com.azure.maps.route.AzureMapsRouteServiceClientBuilder;
+
+public class SuccessfullyRetrieveASetOfLocationsThatCanBeReachedFromTheOriginPointBasedOnVariousConditions {
+ public static void main(String[] args) {
+ AzureMapsRouteServiceClient client =
+ new AzureMapsRouteServiceClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .host("https://atlas.microsoft.com")
+ .buildClient();
+ RequestOptions requestOptions = new RequestOptions();
+ requestOptions.addQueryParam("timeBudgetInSec", "6000");
+ requestOptions.addQueryParam("query", "50.97452,5.86605");
+ Response response = client.getRouteRangeWithResponse("json", requestOptions);
+ }
+}
diff --git a/sdk/maps/azure-maps-route/src/samples/java/com/azure/maps/route/generated/SuccessfullyRetrieveTheRouteDirectionBatchResultSynchronously.java b/sdk/maps/azure-maps-route/src/samples/java/com/azure/maps/route/generated/SuccessfullyRetrieveTheRouteDirectionBatchResultSynchronously.java
new file mode 100644
index 000000000000..5c9752a14d7d
--- /dev/null
+++ b/sdk/maps/azure-maps-route/src/samples/java/com/azure/maps/route/generated/SuccessfullyRetrieveTheRouteDirectionBatchResultSynchronously.java
@@ -0,0 +1,28 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.maps.route.generated;
+
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.BinaryData;
+import com.azure.identity.DefaultAzureCredentialBuilder;
+import com.azure.maps.route.AzureMapsRouteServiceClient;
+import com.azure.maps.route.AzureMapsRouteServiceClientBuilder;
+
+public class SuccessfullyRetrieveTheRouteDirectionBatchResultSynchronously {
+ public static void main(String[] args) {
+ AzureMapsRouteServiceClient client =
+ new AzureMapsRouteServiceClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .host("https://atlas.microsoft.com")
+ .buildClient();
+ BinaryData routeDirectionsBatchQueries =
+ BinaryData.fromString(
+ "{\"batchItems\":[{\"query\":\"?query=47.639987,-122.128384:47.621252,-122.184408:47.596437,-122.332000&routeType=fastest&travelMode=car&maxAlternatives=99\"},{\"query\":\"?query=47.620659,-122.348934:47.610101,-122.342015&travelMode=bicycle&routeType=eco&traffic=false\"},{\"query\":\"?query=40.759856,-73.985108:40.771136,-73.973506&travelMode=pedestrian&routeType=shortest\"}]}");
+ RequestOptions requestOptions = new RequestOptions();
+ Response response =
+ client.requestRouteDirectionsBatchSyncWithResponse("json", routeDirectionsBatchQueries, requestOptions);
+ }
+}
diff --git a/sdk/maps/azure-maps-route/src/samples/java/com/azure/maps/route/generated/SuccessfullyRetrieveTheStatusForARouteMatrixRequest.java b/sdk/maps/azure-maps-route/src/samples/java/com/azure/maps/route/generated/SuccessfullyRetrieveTheStatusForARouteMatrixRequest.java
new file mode 100644
index 000000000000..dd3cd50e2549
--- /dev/null
+++ b/sdk/maps/azure-maps-route/src/samples/java/com/azure/maps/route/generated/SuccessfullyRetrieveTheStatusForARouteMatrixRequest.java
@@ -0,0 +1,25 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.maps.route.generated;
+
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.util.BinaryData;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.identity.DefaultAzureCredentialBuilder;
+import com.azure.maps.route.AzureMapsRouteServiceClient;
+import com.azure.maps.route.AzureMapsRouteServiceClientBuilder;
+
+public class SuccessfullyRetrieveTheStatusForARouteMatrixRequest {
+ public static void main(String[] args) {
+ AzureMapsRouteServiceClient client =
+ new AzureMapsRouteServiceClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .host("https://atlas.microsoft.com")
+ .buildClient();
+ RequestOptions requestOptions = new RequestOptions();
+ SyncPoller response =
+ client.beginGetRouteMatrix("11111111-2222-3333-4444-555555555555", requestOptions);
+ }
+}
diff --git a/sdk/maps/azure-maps-route/src/samples/java/com/azure/maps/route/generated/SuccessfullyRetrieveTheStatusForTheRouteDirectionBatchRequest.java b/sdk/maps/azure-maps-route/src/samples/java/com/azure/maps/route/generated/SuccessfullyRetrieveTheStatusForTheRouteDirectionBatchRequest.java
new file mode 100644
index 000000000000..c55fbf1c9005
--- /dev/null
+++ b/sdk/maps/azure-maps-route/src/samples/java/com/azure/maps/route/generated/SuccessfullyRetrieveTheStatusForTheRouteDirectionBatchRequest.java
@@ -0,0 +1,25 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.maps.route.generated;
+
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.util.BinaryData;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.identity.DefaultAzureCredentialBuilder;
+import com.azure.maps.route.AzureMapsRouteServiceClient;
+import com.azure.maps.route.AzureMapsRouteServiceClientBuilder;
+
+public class SuccessfullyRetrieveTheStatusForTheRouteDirectionBatchRequest {
+ public static void main(String[] args) {
+ AzureMapsRouteServiceClient client =
+ new AzureMapsRouteServiceClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .host("https://atlas.microsoft.com")
+ .buildClient();
+ RequestOptions requestOptions = new RequestOptions();
+ SyncPoller response =
+ client.beginGetRouteDirectionsBatch("11111111-2222-3333-4444-555555555555", requestOptions);
+ }
+}
diff --git a/sdk/maps/azure-maps-route/src/samples/java/com/azure/maps/route/generated/SuccessfullySubmitARouteDirectionBatchRequest.java b/sdk/maps/azure-maps-route/src/samples/java/com/azure/maps/route/generated/SuccessfullySubmitARouteDirectionBatchRequest.java
new file mode 100644
index 000000000000..0809df6e21f9
--- /dev/null
+++ b/sdk/maps/azure-maps-route/src/samples/java/com/azure/maps/route/generated/SuccessfullySubmitARouteDirectionBatchRequest.java
@@ -0,0 +1,28 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.maps.route.generated;
+
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.util.BinaryData;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.identity.DefaultAzureCredentialBuilder;
+import com.azure.maps.route.AzureMapsRouteServiceClient;
+import com.azure.maps.route.AzureMapsRouteServiceClientBuilder;
+
+public class SuccessfullySubmitARouteDirectionBatchRequest {
+ public static void main(String[] args) {
+ AzureMapsRouteServiceClient client =
+ new AzureMapsRouteServiceClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .host("https://atlas.microsoft.com")
+ .buildClient();
+ BinaryData routeDirectionsBatchQueries =
+ BinaryData.fromString(
+ "{\"batchItems\":[{\"query\":\"?query=47.639987,-122.128384:47.621252,-122.184408:47.596437,-122.332000&routeType=fastest&travelMode=car&maxAlternatives=99\"},{\"query\":\"?query=47.620659,-122.348934:47.610101,-122.342015&travelMode=bicycle&routeType=eco&traffic=false\"},{\"query\":\"?query=40.759856,-73.985108:40.771136,-73.973506&travelMode=pedestrian&routeType=shortest\"}]}");
+ RequestOptions requestOptions = new RequestOptions();
+ SyncPoller response =
+ client.beginRequestRouteDirectionsBatch("json", routeDirectionsBatchQueries, requestOptions);
+ }
+}
diff --git a/sdk/maps/azure-maps-route/src/samples/java/com/azure/maps/route/generated/SuccessfullySubmitARouteMatrixRequest.java b/sdk/maps/azure-maps-route/src/samples/java/com/azure/maps/route/generated/SuccessfullySubmitARouteMatrixRequest.java
new file mode 100644
index 000000000000..ee382117b19e
--- /dev/null
+++ b/sdk/maps/azure-maps-route/src/samples/java/com/azure/maps/route/generated/SuccessfullySubmitARouteMatrixRequest.java
@@ -0,0 +1,29 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.maps.route.generated;
+
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.util.BinaryData;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.identity.DefaultAzureCredentialBuilder;
+import com.azure.maps.route.AzureMapsRouteServiceClient;
+import com.azure.maps.route.AzureMapsRouteServiceClientBuilder;
+
+public class SuccessfullySubmitARouteMatrixRequest {
+ public static void main(String[] args) {
+ AzureMapsRouteServiceClient client =
+ new AzureMapsRouteServiceClientBuilder()
+ .credential(new DefaultAzureCredentialBuilder().build())
+ .host("https://atlas.microsoft.com")
+ .buildClient();
+ BinaryData routeMatrixQuery =
+ BinaryData.fromString(
+ "{\"destinations\":{\"type\":\"MultiPoint\",\"coordinates\":[[4.85003,52.36241],[13.42937,52.50931]]},\"origins\":{\"type\":\"MultiPoint\",\"coordinates\":[[4.85106,52.36006],[4.85056,52.36187]]}}");
+ RequestOptions requestOptions = new RequestOptions();
+ requestOptions.addQueryParam("routeType", "shortest");
+ SyncPoller response =
+ client.beginRequestRouteMatrix("json", routeMatrixQuery, requestOptions);
+ }
+}
diff --git a/sdk/maps/azure-maps-route/src/test/java/com/azure/maps/route/ClientTests.java b/sdk/maps/azure-maps-route/src/test/java/com/azure/maps/route/ClientTests.java
new file mode 100644
index 000000000000..55ea5ebc8f66
--- /dev/null
+++ b/sdk/maps/azure-maps-route/src/test/java/com/azure/maps/route/ClientTests.java
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.maps.route;
+
+import com.azure.core.credential.AccessToken;
+import com.azure.core.http.HttpClient;
+import com.azure.core.http.policy.HttpLogDetailLevel;
+import com.azure.core.http.policy.HttpLogOptions;
+import com.azure.core.test.TestBase;
+import com.azure.core.test.TestMode;
+import com.azure.core.test.annotation.DoNotRecord;
+import com.azure.core.util.Configuration;
+import com.azure.identity.DefaultAzureCredentialBuilder;
+import java.time.OffsetDateTime;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import reactor.core.publisher.Mono;
+
+public final class ClientTests extends TestBase {
+ private AzureMapsRouteServiceClient azureMapsRouteServiceClient;
+
+ @BeforeEach
+ public void setup() {
+ AzureMapsRouteServiceClientBuilder azureMapsRouteServiceClientbuilder =
+ new AzureMapsRouteServiceClientBuilder()
+ .host(Configuration.getGlobalConfiguration().get("HOST", "https://atlas.microsoft.com"))
+ .httpClient(HttpClient.createDefault())
+ .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC));
+ if (getTestMode() == TestMode.PLAYBACK) {
+ azureMapsRouteServiceClientbuilder
+ .httpClient(interceptorManager.getPlaybackClient())
+ .credential(request -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)));
+ } else if (getTestMode() == TestMode.RECORD) {
+ azureMapsRouteServiceClientbuilder
+ .addPolicy(interceptorManager.getRecordPolicy())
+ .credential(new DefaultAzureCredentialBuilder().build());
+ } else if (getTestMode() == TestMode.LIVE) {
+ azureMapsRouteServiceClientbuilder.credential(new DefaultAzureCredentialBuilder().build());
+ }
+ azureMapsRouteServiceClient = azureMapsRouteServiceClientbuilder.buildClient();
+ }
+
+ @Test
+ @DoNotRecord(skipInPlayback = true)
+ public void testClient() {
+ // use the builder to create client
+ }
+}
diff --git a/sdk/maps/azure-maps-route/swagger/README_SPEC.md b/sdk/maps/azure-maps-route/swagger/README_SPEC.md
new file mode 100644
index 000000000000..a3f7b2d71309
--- /dev/null
+++ b/sdk/maps/azure-maps-route/swagger/README_SPEC.md
@@ -0,0 +1,25 @@
+## Generate autorest code
+
+```yaml
+input-files:
+- /home/vsts/work/1/s/azure-rest-api-specs/specification/maps/data-plane/Route/preview/1.0/route.json
+output-folder: ../
+java: true
+regenerate-pom: false
+partial-update: true
+generate-sync-async-clients: true
+generate-client-as-impl: true
+generate-client-interfaces: false
+generate-builder-per-client: true
+add-context-parameter: true
+artifact-id: azure-maps-route
+low-level-client: true
+sync-methods: all
+generate-samples: true
+license-header: MICROSOFT_MIT_SMALL
+namespace: com.azure.maps.route
+context-client-method-parameter: true
+azure-arm: false
+service-versions:
+- '1.0'
+```