// 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.HeaderParam;
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.annotation.UnexpectedResponseExceptionType;
import com.azure.core.exception.HttpResponseException;
import com.azure.core.http.rest.Response;
import com.azure.core.http.rest.RestProxy;
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.CollectionFormat;
import com.azure.core.util.serializer.JacksonAdapter;
import com.azure.core.util.serializer.TypeReference;
import com.azure.maps.route.implementation.models.BatchRequest;
import com.azure.maps.route.implementation.models.ErrorResponseException;
import com.azure.maps.route.implementation.models.JsonFormat;
import com.azure.maps.route.implementation.models.ResponseFormat;
import com.azure.maps.route.implementation.models.RouteDirectionParametersPrivate;
import com.azure.maps.route.implementation.models.RouteDirectionsBatchResultPrivate;
import com.azure.maps.route.implementation.models.RouteMatrixQueryPrivate;
import com.azure.maps.route.implementation.models.RouteMatrixResultPrivate;
import com.azure.maps.route.implementation.models.RoutesGetRouteDirectionsBatchResponse;
import com.azure.maps.route.implementation.models.RoutesGetRouteMatrixResponse;
import com.azure.maps.route.implementation.models.RoutesRequestRouteDirectionsBatchResponse;
import com.azure.maps.route.implementation.models.RoutesRequestRouteMatrixResponse;
import com.azure.maps.route.models.AlternativeRouteType;
import com.azure.maps.route.models.ComputeTravelTime;
import com.azure.maps.route.models.InclineLevel;
import com.azure.maps.route.models.Report;
import com.azure.maps.route.models.RouteAvoidType;
import com.azure.maps.route.models.RouteDirections;
import com.azure.maps.route.models.RouteInstructionsType;
import com.azure.maps.route.models.RouteRangeResult;
import com.azure.maps.route.models.RouteRepresentationForBestOrder;
import com.azure.maps.route.models.RouteType;
import com.azure.maps.route.models.SectionType;
import com.azure.maps.route.models.TravelMode;
import com.azure.maps.route.models.VehicleEngineType;
import com.azure.maps.route.models.VehicleLoadType;
import com.azure.maps.route.models.WindingnessLevel;
import java.time.Duration;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
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 RouteClientImpl client;

    /**
     * Initializes an instance of RoutesImpl.
     *
     * @param client the instance of the service client containing this operation class.
     */
    RoutesImpl(RouteClientImpl client) {
        this.service = RestProxy.create(RoutesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
        this.client = client;
    }

    /**
     * The interface defining all the services for RouteClientRoutes to be used by the proxy service to perform REST
     * calls.
     */
    @Host("{$host}")
    @ServiceInterface(name = "RouteClientRoutes")
    private interface RoutesService {
        @Post("/route/matrix/{format}")
        @ExpectedResponses({200, 202})
        @UnexpectedResponseExceptionType(HttpResponseException.class)
        Mono<RoutesRequestRouteMatrixResponse> requestRouteMatrix(
                @HostParam("$host") String host,
                @HeaderParam("x-ms-client-id") String clientId,
                @QueryParam("api-version") String apiVersion,
                @PathParam("format") JsonFormat format,
                @QueryParam("waitForResults") Boolean waitForResults,
                @QueryParam("computeTravelTimeFor") ComputeTravelTime computeTravelTime,
                @QueryParam("sectionType") SectionType filterSectionType,
                @QueryParam("arriveAt") OffsetDateTime arriveAt,
                @QueryParam("departAt") OffsetDateTime departAt,
                @QueryParam("vehicleAxleWeight") Integer vehicleAxleWeight,
                @QueryParam("vehicleLength") Double vehicleLength,
                @QueryParam("vehicleHeight") Double vehicleHeight,
                @QueryParam("vehicleWidth") Double vehicleWidth,
                @QueryParam("vehicleMaxSpeed") Integer vehicleMaxSpeed,
                @QueryParam("vehicleWeight") Integer vehicleWeight,
                @QueryParam("windingness") WindingnessLevel windingness,
                @QueryParam("hilliness") InclineLevel inclineLevel,
                @QueryParam("travelMode") TravelMode travelMode,
                @QueryParam(value = "avoid", multipleQueryParams = true) List<String> avoid,
                @QueryParam("traffic") Boolean useTrafficData,
                @QueryParam("routeType") RouteType routeType,
                @QueryParam("vehicleLoadType") VehicleLoadType vehicleLoadType,
                @BodyParam("application/json") RouteMatrixQueryPrivate routeMatrixQuery,
                @HeaderParam("Accept") String accept,
                Context context);

        @Get("/route/matrix/{format}")
        @ExpectedResponses({200, 202})
        @UnexpectedResponseExceptionType(HttpResponseException.class)
        Mono<RoutesGetRouteMatrixResponse> getRouteMatrix(
                @HostParam("$host") String host,
                @HeaderParam("x-ms-client-id") String clientId,
                @QueryParam("api-version") String apiVersion,
                @PathParam("format") String matrixId,
                @HeaderParam("Accept") String accept,
                Context context);

        @Post("/route/matrix/sync/{format}")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(
                value = ErrorResponseException.class,
                code = {408})
        @UnexpectedResponseExceptionType(ErrorResponseException.class)
        Mono<Response<RouteMatrixResultPrivate>> requestRouteMatrixSync(
                @HostParam("$host") String host,
                @HeaderParam("x-ms-client-id") String clientId,
                @QueryParam("api-version") String apiVersion,
                @PathParam("format") JsonFormat format,
                @QueryParam("waitForResults") Boolean waitForResults,
                @QueryParam("computeTravelTimeFor") ComputeTravelTime computeTravelTime,
                @QueryParam("sectionType") SectionType filterSectionType,
                @QueryParam("arriveAt") OffsetDateTime arriveAt,
                @QueryParam("departAt") OffsetDateTime departAt,
                @QueryParam("vehicleAxleWeight") Integer vehicleAxleWeight,
                @QueryParam("vehicleLength") Double vehicleLength,
                @QueryParam("vehicleHeight") Double vehicleHeight,
                @QueryParam("vehicleWidth") Double vehicleWidth,
                @QueryParam("vehicleMaxSpeed") Integer vehicleMaxSpeed,
                @QueryParam("vehicleWeight") Integer vehicleWeight,
                @QueryParam("windingness") WindingnessLevel windingness,
                @QueryParam("hilliness") InclineLevel inclineLevel,
                @QueryParam("travelMode") TravelMode travelMode,
                @QueryParam(value = "avoid", multipleQueryParams = true) List<String> avoid,
                @QueryParam("traffic") Boolean useTrafficData,
                @QueryParam("routeType") RouteType routeType,
                @QueryParam("vehicleLoadType") VehicleLoadType vehicleLoadType,
                @BodyParam("application/json") RouteMatrixQueryPrivate routeMatrixQuery,
                @HeaderParam("Accept") String accept,
                Context context);

        @Get("/route/directions/{format}")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(ErrorResponseException.class)
        Mono<Response<RouteDirections>> getRouteDirections(
                @HostParam("$host") String host,
                @HeaderParam("x-ms-client-id") String clientId,
                @QueryParam("api-version") String apiVersion,
                @PathParam("format") ResponseFormat format,
                @QueryParam("query") String routePoints,
                @QueryParam("maxAlternatives") Integer maxAlternatives,
                @QueryParam("alternativeType") AlternativeRouteType alternativeType,
                @QueryParam("minDeviationDistance") Integer minDeviationDistance,
                @QueryParam("arriveAt") OffsetDateTime arriveAt,
                @QueryParam("departAt") OffsetDateTime departAt,
                @QueryParam("minDeviationTime") Integer minDeviationTime,
                @QueryParam("instructionsType") RouteInstructionsType instructionsType,
                @QueryParam("language") String language,
                @QueryParam("computeBestOrder") Boolean computeBestWaypointOrder,
                @QueryParam("routeRepresentation") RouteRepresentationForBestOrder routeRepresentationForBestOrder,
                @QueryParam("computeTravelTimeFor") ComputeTravelTime computeTravelTime,
                @QueryParam("vehicleHeading") Integer vehicleHeading,
                @QueryParam("report") Report report,
                @QueryParam("sectionType") SectionType filterSectionType,
                @QueryParam("vehicleAxleWeight") Integer vehicleAxleWeight,
                @QueryParam("vehicleWidth") Double vehicleWidth,
                @QueryParam("vehicleHeight") Double vehicleHeight,
                @QueryParam("vehicleLength") Double vehicleLength,
                @QueryParam("vehicleMaxSpeed") Integer vehicleMaxSpeed,
                @QueryParam("vehicleWeight") Integer vehicleWeight,
                @QueryParam("vehicleCommercial") Boolean isCommercialVehicle,
                @QueryParam("windingness") WindingnessLevel windingness,
                @QueryParam("hilliness") InclineLevel inclineLevel,
                @QueryParam("travelMode") TravelMode travelMode,
                @QueryParam(value = "avoid", multipleQueryParams = true) List<String> avoid,
                @QueryParam("traffic") Boolean useTrafficData,
                @QueryParam("routeType") RouteType routeType,
                @QueryParam("vehicleLoadType") VehicleLoadType vehicleLoadType,
                @QueryParam("vehicleEngineType") VehicleEngineType vehicleEngineType,
                @QueryParam("constantSpeedConsumptionInLitersPerHundredkm")
                        String constantSpeedConsumptionInLitersPerHundredKm,
                @QueryParam("currentFuelInLiters") Double currentFuelInLiters,
                @QueryParam("auxiliaryPowerInLitersPerHour") Double auxiliaryPowerInLitersPerHour,
                @QueryParam("fuelEnergyDensityInMJoulesPerLiter") Double fuelEnergyDensityInMegajoulesPerLiter,
                @QueryParam("accelerationEfficiency") Double accelerationEfficiency,
                @QueryParam("decelerationEfficiency") Double decelerationEfficiency,
                @QueryParam("uphillEfficiency") Double uphillEfficiency,
                @QueryParam("downhillEfficiency") Double downhillEfficiency,
                @QueryParam("constantSpeedConsumptionInkWhPerHundredkm")
                        String constantSpeedConsumptionInKwHPerHundredKm,
                @QueryParam("currentChargeInkWh") Double currentChargeInKwH,
                @QueryParam("maxChargeInkWh") Double maxChargeInKwH,
                @QueryParam("auxiliaryPowerInkW") Double auxiliaryPowerInKw,
                @HeaderParam("Accept") String accept,
                Context context);

        @Post("/route/directions/{format}")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(ErrorResponseException.class)
        Mono<Response<RouteDirections>> getRouteDirectionsWithAdditionalParameters(
                @HostParam("$host") String host,
                @HeaderParam("x-ms-client-id") String clientId,
                @QueryParam("api-version") String apiVersion,
                @PathParam("format") ResponseFormat format,
                @QueryParam("query") String routePoints,
                @QueryParam("maxAlternatives") Integer maxAlternatives,
                @QueryParam("alternativeType") AlternativeRouteType alternativeType,
                @QueryParam("minDeviationDistance") Integer minDeviationDistance,
                @QueryParam("minDeviationTime") Integer minDeviationTime,
                @QueryParam("instructionsType") RouteInstructionsType instructionsType,
                @QueryParam("language") String language,
                @QueryParam("computeBestOrder") Boolean computeBestWaypointOrder,
                @QueryParam("routeRepresentation") RouteRepresentationForBestOrder routeRepresentationForBestOrder,
                @QueryParam("computeTravelTimeFor") ComputeTravelTime computeTravelTime,
                @QueryParam("vehicleHeading") Integer vehicleHeading,
                @QueryParam("report") Report report,
                @QueryParam("sectionType") SectionType filterSectionType,
                @QueryParam("arriveAt") OffsetDateTime arriveAt,
                @QueryParam("departAt") OffsetDateTime departAt,
                @QueryParam("vehicleAxleWeight") Integer vehicleAxleWeight,
                @QueryParam("vehicleLength") Double vehicleLength,
                @QueryParam("vehicleHeight") Double vehicleHeight,
                @QueryParam("vehicleWidth") Double vehicleWidth,
                @QueryParam("vehicleMaxSpeed") Integer vehicleMaxSpeed,
                @QueryParam("vehicleWeight") Integer vehicleWeight,
                @QueryParam("vehicleCommercial") Boolean isCommercialVehicle,
                @QueryParam("windingness") WindingnessLevel windingness,
                @QueryParam("hilliness") InclineLevel inclineLevel,
                @QueryParam("travelMode") TravelMode travelMode,
                @QueryParam(value = "avoid", multipleQueryParams = true) List<String> avoid,
                @QueryParam("traffic") Boolean useTrafficData,
                @QueryParam("routeType") RouteType routeType,
                @QueryParam("vehicleLoadType") VehicleLoadType vehicleLoadType,
                @QueryParam("vehicleEngineType") VehicleEngineType vehicleEngineType,
                @QueryParam("constantSpeedConsumptionInLitersPerHundredkm")
                        String constantSpeedConsumptionInLitersPerHundredKm,
                @QueryParam("currentFuelInLiters") Double currentFuelInLiters,
                @QueryParam("auxiliaryPowerInLitersPerHour") Double auxiliaryPowerInLitersPerHour,
                @QueryParam("fuelEnergyDensityInMJoulesPerLiter") Double fuelEnergyDensityInMegajoulesPerLiter,
                @QueryParam("accelerationEfficiency") Double accelerationEfficiency,
                @QueryParam("decelerationEfficiency") Double decelerationEfficiency,
                @QueryParam("uphillEfficiency") Double uphillEfficiency,
                @QueryParam("downhillEfficiency") Double downhillEfficiency,
                @QueryParam("constantSpeedConsumptionInkWhPerHundredkm")
                        String constantSpeedConsumptionInKwHPerHundredKm,
                @QueryParam("currentChargeInkWh") Double currentChargeInKwH,
                @QueryParam("maxChargeInkWh") Double maxChargeInKwH,
                @QueryParam("auxiliaryPowerInkW") Double auxiliaryPowerInKw,
                @BodyParam("application/json") RouteDirectionParametersPrivate routeDirectionParameters,
                @HeaderParam("Accept") String accept,
                Context context);

        @Get("/route/range/{format}")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(ErrorResponseException.class)
        Mono<Response<RouteRangeResult>> getRouteRange(
                @HostParam("$host") String host,
                @HeaderParam("x-ms-client-id") String clientId,
                @QueryParam("api-version") String apiVersion,
                @PathParam("format") ResponseFormat format,
                @QueryParam("query") String query,
                @QueryParam("fuelBudgetInLiters") Double fuelBudgetInLiters,
                @QueryParam("energyBudgetInkWh") Double energyBudgetInKwH,
                @QueryParam("timeBudgetInSec") Double timeBudgetInSec,
                @QueryParam("distanceBudgetInMeters") Double distanceBudgetInMeters,
                @QueryParam("departAt") OffsetDateTime departAt,
                @QueryParam("routeType") RouteType routeType,
                @QueryParam("traffic") Boolean useTrafficData,
                @QueryParam(value = "avoid", multipleQueryParams = true) List<String> avoid,
                @QueryParam("travelMode") TravelMode travelMode,
                @QueryParam("hilliness") InclineLevel inclineLevel,
                @QueryParam("windingness") WindingnessLevel windingness,
                @QueryParam("vehicleAxleWeight") Integer vehicleAxleWeight,
                @QueryParam("vehicleWidth") Double vehicleWidth,
                @QueryParam("vehicleHeight") Double vehicleHeight,
                @QueryParam("vehicleLength") Double vehicleLength,
                @QueryParam("vehicleMaxSpeed") Integer vehicleMaxSpeed,
                @QueryParam("vehicleWeight") Integer vehicleWeight,
                @QueryParam("vehicleCommercial") Boolean isCommercialVehicle,
                @QueryParam("vehicleLoadType") VehicleLoadType vehicleLoadType,
                @QueryParam("vehicleEngineType") VehicleEngineType vehicleEngineType,
                @QueryParam("constantSpeedConsumptionInLitersPerHundredkm")
                        String constantSpeedConsumptionInLitersPerHundredKm,
                @QueryParam("currentFuelInLiters") Double currentFuelInLiters,
                @QueryParam("auxiliaryPowerInLitersPerHour") Double auxiliaryPowerInLitersPerHour,
                @QueryParam("fuelEnergyDensityInMJoulesPerLiter") Double fuelEnergyDensityInMegajoulesPerLiter,
                @QueryParam("accelerationEfficiency") Double accelerationEfficiency,
                @QueryParam("decelerationEfficiency") Double decelerationEfficiency,
                @QueryParam("uphillEfficiency") Double uphillEfficiency,
                @QueryParam("downhillEfficiency") Double downhillEfficiency,
                @QueryParam("constantSpeedConsumptionInkWhPerHundredkm")
                        String constantSpeedConsumptionInKwHPerHundredKm,
                @QueryParam("currentChargeInkWh") Double currentChargeInKwH,
                @QueryParam("maxChargeInkWh") Double maxChargeInKwH,
                @QueryParam("auxiliaryPowerInkW") Double auxiliaryPowerInKw,
                @HeaderParam("Accept") String accept,
                Context context);

        @Post("/route/directions/batch/{format}")
        @ExpectedResponses({200, 202})
        @UnexpectedResponseExceptionType(HttpResponseException.class)
        Mono<RoutesRequestRouteDirectionsBatchResponse> requestRouteDirectionsBatch(
                @HostParam("$host") String host,
                @HeaderParam("x-ms-client-id") String clientId,
                @QueryParam("api-version") String apiVersion,
                @PathParam("format") JsonFormat format,
                @BodyParam("application/json") BatchRequest routeDirectionsBatchQueries,
                @HeaderParam("Accept") String accept,
                Context context);

        @Get("/route/directions/batch/{format}")
        @ExpectedResponses({200, 202})
        @UnexpectedResponseExceptionType(HttpResponseException.class)
        Mono<RoutesGetRouteDirectionsBatchResponse> getRouteDirectionsBatch(
                @HostParam("$host") String host,
                @HeaderParam("x-ms-client-id") String clientId,
                @QueryParam("api-version") String apiVersion,
                @PathParam("format") String batchId,
                @HeaderParam("Accept") String accept,
                Context context);

        @Post("/route/directions/batch/sync/{format}")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(
                value = ErrorResponseException.class,
                code = {408})
        @UnexpectedResponseExceptionType(ErrorResponseException.class)
        Mono<Response<RouteDirectionsBatchResultPrivate>> requestRouteDirectionsBatchSync(
                @HostParam("$host") String host,
                @HeaderParam("x-ms-client-id") String clientId,
                @QueryParam("api-version") String apiVersion,
                @PathParam("format") JsonFormat format,
                @BodyParam("application/json") BatchRequest routeDirectionsBatchQueries,
                @HeaderParam("Accept") String accept,
                Context context);
    }

    /**
     * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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.
     *
     * <p>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.
     *
     * <p>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).
     *
     * <p>### 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).
     *
     * <p>``` POST
     * https://atlas.microsoft.com/route/matrix/sync/json?api-version=1.0&amp;subscription-key={subscription-key} ```
     *
     * <p>### 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.
     *
     * <p>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).
     *
     * <p>The asynchronous responses are stored for **14** days. The redirect URL returns a 404 response if used after
     * the expiration period.
     *
     * <p>``` POST https://atlas.microsoft.com/route/matrix/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ```
     *
     * <p>Here's a typical sequence of asynchronous operations: 1. Client sends a Route Matrix POST request to Azure
     * Maps
     *
     * <p>2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Route Matrix request has been accepted.
     *
     * <p>&gt; 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.
     *
     * <p>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:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
     *
     * <p>4. Client issues a GET request on the download URL obtained in Step 3 to download the results
     *
     * <p>### 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.
     *
     * <p>### 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} ```
     *
     * <p>The URL provided by the location header will return the following responses when a `GET` request is issued.
     *
     * <p>&gt; HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.
     *
     * @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 waitForResults 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**.
     * @param computeTravelTime 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.
     * @param filterSectionType Specifies which of the section types is reported in the route response.
     *     &lt;br&gt;&lt;br&gt;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.
     * @param arriveAt 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.
     * @param departAt 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).
     * @param vehicleAxleWeight Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per
     *     axle are not considered.
     * @param vehicleLength Length of the vehicle in meters. A value of 0 means that length restrictions are not
     *     considered.
     * @param vehicleHeight Height of the vehicle in meters. A value of 0 means that height restrictions are not
     *     considered.
     * @param vehicleWidth Width of the vehicle in meters. A value of 0 means that width restrictions are not
     *     considered.
     * @param vehicleMaxSpeed 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.
     *     <p>* A value of 0 means that an appropriate value for the vehicle will be determined and applied during route
     *     planning.
     *     <p>* 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.
     * @param vehicleWeight Weight of the vehicle in kilograms.
     * @param windingness Level of turns for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param inclineLevel Degree of hilliness for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param travelMode 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.
     * @param avoid Specifies something that the route calculation should try to avoid when determining the route. Can
     *     be specified multiple times in one request, for example,
     *     '&amp;avoid=motorways&amp;avoid=tollRoads&amp;avoid=ferries'. In calculateReachableRange requests, the value
     *     alreadyUsedRoads must not be used.
     * @param useTrafficData 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.
     * @param routeType The type of route requested.
     * @param vehicleLoadType 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.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Route Matrix call on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<RoutesRequestRouteMatrixResponse> requestRouteMatrixWithResponseAsync(
            JsonFormat format,
            RouteMatrixQueryPrivate routeMatrixQuery,
            Boolean waitForResults,
            ComputeTravelTime computeTravelTime,
            SectionType filterSectionType,
            OffsetDateTime arriveAt,
            OffsetDateTime departAt,
            Integer vehicleAxleWeight,
            Double vehicleLength,
            Double vehicleHeight,
            Double vehicleWidth,
            Integer vehicleMaxSpeed,
            Integer vehicleWeight,
            WindingnessLevel windingness,
            InclineLevel inclineLevel,
            TravelMode travelMode,
            List<RouteAvoidType> avoid,
            Boolean useTrafficData,
            RouteType routeType,
            VehicleLoadType vehicleLoadType) {
        final String accept = "application/json";
        List<String> avoidConverted =
                (avoid == null)
                        ? new ArrayList<>()
                        : avoid.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList());
        return FluxUtil.withContext(
                context ->
                        service.requestRouteMatrix(
                                this.client.getHost(),
                                this.client.getClientId(),
                                this.client.getApiVersion(),
                                format,
                                waitForResults,
                                computeTravelTime,
                                filterSectionType,
                                arriveAt,
                                departAt,
                                vehicleAxleWeight,
                                vehicleLength,
                                vehicleHeight,
                                vehicleWidth,
                                vehicleMaxSpeed,
                                vehicleWeight,
                                windingness,
                                inclineLevel,
                                travelMode,
                                avoidConverted,
                                useTrafficData,
                                routeType,
                                vehicleLoadType,
                                routeMatrixQuery,
                                accept,
                                context));
    }

    /**
     * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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.
     *
     * <p>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.
     *
     * <p>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).
     *
     * <p>### 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).
     *
     * <p>``` POST
     * https://atlas.microsoft.com/route/matrix/sync/json?api-version=1.0&amp;subscription-key={subscription-key} ```
     *
     * <p>### 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.
     *
     * <p>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).
     *
     * <p>The asynchronous responses are stored for **14** days. The redirect URL returns a 404 response if used after
     * the expiration period.
     *
     * <p>``` POST https://atlas.microsoft.com/route/matrix/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ```
     *
     * <p>Here's a typical sequence of asynchronous operations: 1. Client sends a Route Matrix POST request to Azure
     * Maps
     *
     * <p>2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Route Matrix request has been accepted.
     *
     * <p>&gt; 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.
     *
     * <p>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:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
     *
     * <p>4. Client issues a GET request on the download URL obtained in Step 3 to download the results
     *
     * <p>### 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.
     *
     * <p>### 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} ```
     *
     * <p>The URL provided by the location header will return the following responses when a `GET` request is issued.
     *
     * <p>&gt; HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.
     *
     * @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 waitForResults 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**.
     * @param computeTravelTime 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.
     * @param filterSectionType Specifies which of the section types is reported in the route response.
     *     &lt;br&gt;&lt;br&gt;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.
     * @param arriveAt 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.
     * @param departAt 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).
     * @param vehicleAxleWeight Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per
     *     axle are not considered.
     * @param vehicleLength Length of the vehicle in meters. A value of 0 means that length restrictions are not
     *     considered.
     * @param vehicleHeight Height of the vehicle in meters. A value of 0 means that height restrictions are not
     *     considered.
     * @param vehicleWidth Width of the vehicle in meters. A value of 0 means that width restrictions are not
     *     considered.
     * @param vehicleMaxSpeed 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.
     *     <p>* A value of 0 means that an appropriate value for the vehicle will be determined and applied during route
     *     planning.
     *     <p>* 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.
     * @param vehicleWeight Weight of the vehicle in kilograms.
     * @param windingness Level of turns for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param inclineLevel Degree of hilliness for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param travelMode 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.
     * @param avoid Specifies something that the route calculation should try to avoid when determining the route. Can
     *     be specified multiple times in one request, for example,
     *     '&amp;avoid=motorways&amp;avoid=tollRoads&amp;avoid=ferries'. In calculateReachableRange requests, the value
     *     alreadyUsedRoads must not be used.
     * @param useTrafficData 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.
     * @param routeType The type of route requested.
     * @param vehicleLoadType 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.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Route Matrix call on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<RoutesRequestRouteMatrixResponse> requestRouteMatrixWithResponseAsync(
            JsonFormat format,
            RouteMatrixQueryPrivate routeMatrixQuery,
            Boolean waitForResults,
            ComputeTravelTime computeTravelTime,
            SectionType filterSectionType,
            OffsetDateTime arriveAt,
            OffsetDateTime departAt,
            Integer vehicleAxleWeight,
            Double vehicleLength,
            Double vehicleHeight,
            Double vehicleWidth,
            Integer vehicleMaxSpeed,
            Integer vehicleWeight,
            WindingnessLevel windingness,
            InclineLevel inclineLevel,
            TravelMode travelMode,
            List<RouteAvoidType> avoid,
            Boolean useTrafficData,
            RouteType routeType,
            VehicleLoadType vehicleLoadType,
            Context context) {
        final String accept = "application/json";
        List<String> avoidConverted =
                (avoid == null)
                        ? new ArrayList<>()
                        : avoid.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList());
        return service.requestRouteMatrix(
                this.client.getHost(),
                this.client.getClientId(),
                this.client.getApiVersion(),
                format,
                waitForResults,
                computeTravelTime,
                filterSectionType,
                arriveAt,
                departAt,
                vehicleAxleWeight,
                vehicleLength,
                vehicleHeight,
                vehicleWidth,
                vehicleMaxSpeed,
                vehicleWeight,
                windingness,
                inclineLevel,
                travelMode,
                avoidConverted,
                useTrafficData,
                routeType,
                vehicleLoadType,
                routeMatrixQuery,
                accept,
                context);
    }

    /**
     * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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.
     *
     * <p>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.
     *
     * <p>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).
     *
     * <p>### 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).
     *
     * <p>``` POST
     * https://atlas.microsoft.com/route/matrix/sync/json?api-version=1.0&amp;subscription-key={subscription-key} ```
     *
     * <p>### 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.
     *
     * <p>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).
     *
     * <p>The asynchronous responses are stored for **14** days. The redirect URL returns a 404 response if used after
     * the expiration period.
     *
     * <p>``` POST https://atlas.microsoft.com/route/matrix/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ```
     *
     * <p>Here's a typical sequence of asynchronous operations: 1. Client sends a Route Matrix POST request to Azure
     * Maps
     *
     * <p>2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Route Matrix request has been accepted.
     *
     * <p>&gt; 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.
     *
     * <p>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:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
     *
     * <p>4. Client issues a GET request on the download URL obtained in Step 3 to download the results
     *
     * <p>### 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.
     *
     * <p>### 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} ```
     *
     * <p>The URL provided by the location header will return the following responses when a `GET` request is issued.
     *
     * <p>&gt; HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.
     *
     * @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 waitForResults 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**.
     * @param computeTravelTime 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.
     * @param filterSectionType Specifies which of the section types is reported in the route response.
     *     &lt;br&gt;&lt;br&gt;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.
     * @param arriveAt 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.
     * @param departAt 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).
     * @param vehicleAxleWeight Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per
     *     axle are not considered.
     * @param vehicleLength Length of the vehicle in meters. A value of 0 means that length restrictions are not
     *     considered.
     * @param vehicleHeight Height of the vehicle in meters. A value of 0 means that height restrictions are not
     *     considered.
     * @param vehicleWidth Width of the vehicle in meters. A value of 0 means that width restrictions are not
     *     considered.
     * @param vehicleMaxSpeed 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.
     *     <p>* A value of 0 means that an appropriate value for the vehicle will be determined and applied during route
     *     planning.
     *     <p>* 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.
     * @param vehicleWeight Weight of the vehicle in kilograms.
     * @param windingness Level of turns for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param inclineLevel Degree of hilliness for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param travelMode 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.
     * @param avoid Specifies something that the route calculation should try to avoid when determining the route. Can
     *     be specified multiple times in one request, for example,
     *     '&amp;avoid=motorways&amp;avoid=tollRoads&amp;avoid=ferries'. In calculateReachableRange requests, the value
     *     alreadyUsedRoads must not be used.
     * @param useTrafficData 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.
     * @param routeType The type of route requested.
     * @param vehicleLoadType 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.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @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<RouteMatrixResultPrivate, RouteMatrixResultPrivate> beginRequestRouteMatrixAsync(
            JsonFormat format,
            RouteMatrixQueryPrivate routeMatrixQuery,
            Boolean waitForResults,
            ComputeTravelTime computeTravelTime,
            SectionType filterSectionType,
            OffsetDateTime arriveAt,
            OffsetDateTime departAt,
            Integer vehicleAxleWeight,
            Double vehicleLength,
            Double vehicleHeight,
            Double vehicleWidth,
            Integer vehicleMaxSpeed,
            Integer vehicleWeight,
            WindingnessLevel windingness,
            InclineLevel inclineLevel,
            TravelMode travelMode,
            List<RouteAvoidType> avoid,
            Boolean useTrafficData,
            RouteType routeType,
            VehicleLoadType vehicleLoadType) {
        return PollerFlux.create(
                Duration.ofSeconds(1),
                () ->
                        this.requestRouteMatrixWithResponseAsync(
                                format,
                                routeMatrixQuery,
                                waitForResults,
                                computeTravelTime,
                                filterSectionType,
                                arriveAt,
                                departAt,
                                vehicleAxleWeight,
                                vehicleLength,
                                vehicleHeight,
                                vehicleWidth,
                                vehicleMaxSpeed,
                                vehicleWeight,
                                windingness,
                                inclineLevel,
                                travelMode,
                                avoid,
                                useTrafficData,
                                routeType,
                                vehicleLoadType),
                new DefaultPollingStrategy<>(this.client.getHttpPipeline(), null, Context.NONE),
                new TypeReferenceRouteMatrixResultPrivate(),
                new TypeReferenceRouteMatrixResultPrivate());
    }

    /**
     * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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.
     *
     * <p>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.
     *
     * <p>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).
     *
     * <p>### 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).
     *
     * <p>``` POST
     * https://atlas.microsoft.com/route/matrix/sync/json?api-version=1.0&amp;subscription-key={subscription-key} ```
     *
     * <p>### 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.
     *
     * <p>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).
     *
     * <p>The asynchronous responses are stored for **14** days. The redirect URL returns a 404 response if used after
     * the expiration period.
     *
     * <p>``` POST https://atlas.microsoft.com/route/matrix/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ```
     *
     * <p>Here's a typical sequence of asynchronous operations: 1. Client sends a Route Matrix POST request to Azure
     * Maps
     *
     * <p>2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Route Matrix request has been accepted.
     *
     * <p>&gt; 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.
     *
     * <p>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:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
     *
     * <p>4. Client issues a GET request on the download URL obtained in Step 3 to download the results
     *
     * <p>### 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.
     *
     * <p>### 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} ```
     *
     * <p>The URL provided by the location header will return the following responses when a `GET` request is issued.
     *
     * <p>&gt; HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.
     *
     * @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 waitForResults 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**.
     * @param computeTravelTime 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.
     * @param filterSectionType Specifies which of the section types is reported in the route response.
     *     &lt;br&gt;&lt;br&gt;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.
     * @param arriveAt 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.
     * @param departAt 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).
     * @param vehicleAxleWeight Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per
     *     axle are not considered.
     * @param vehicleLength Length of the vehicle in meters. A value of 0 means that length restrictions are not
     *     considered.
     * @param vehicleHeight Height of the vehicle in meters. A value of 0 means that height restrictions are not
     *     considered.
     * @param vehicleWidth Width of the vehicle in meters. A value of 0 means that width restrictions are not
     *     considered.
     * @param vehicleMaxSpeed 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.
     *     <p>* A value of 0 means that an appropriate value for the vehicle will be determined and applied during route
     *     planning.
     *     <p>* 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.
     * @param vehicleWeight Weight of the vehicle in kilograms.
     * @param windingness Level of turns for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param inclineLevel Degree of hilliness for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param travelMode 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.
     * @param avoid Specifies something that the route calculation should try to avoid when determining the route. Can
     *     be specified multiple times in one request, for example,
     *     '&amp;avoid=motorways&amp;avoid=tollRoads&amp;avoid=ferries'. In calculateReachableRange requests, the value
     *     alreadyUsedRoads must not be used.
     * @param useTrafficData 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.
     * @param routeType The type of route requested.
     * @param vehicleLoadType 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.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @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<RouteMatrixResultPrivate, RouteMatrixResultPrivate> beginRequestRouteMatrixAsync(
            JsonFormat format,
            RouteMatrixQueryPrivate routeMatrixQuery,
            Boolean waitForResults,
            ComputeTravelTime computeTravelTime,
            SectionType filterSectionType,
            OffsetDateTime arriveAt,
            OffsetDateTime departAt,
            Integer vehicleAxleWeight,
            Double vehicleLength,
            Double vehicleHeight,
            Double vehicleWidth,
            Integer vehicleMaxSpeed,
            Integer vehicleWeight,
            WindingnessLevel windingness,
            InclineLevel inclineLevel,
            TravelMode travelMode,
            List<RouteAvoidType> avoid,
            Boolean useTrafficData,
            RouteType routeType,
            VehicleLoadType vehicleLoadType,
            Context context) {
        return PollerFlux.create(
                Duration.ofSeconds(1),
                () ->
                        this.requestRouteMatrixWithResponseAsync(
                                format,
                                routeMatrixQuery,
                                waitForResults,
                                computeTravelTime,
                                filterSectionType,
                                arriveAt,
                                departAt,
                                vehicleAxleWeight,
                                vehicleLength,
                                vehicleHeight,
                                vehicleWidth,
                                vehicleMaxSpeed,
                                vehicleWeight,
                                windingness,
                                inclineLevel,
                                travelMode,
                                avoid,
                                useTrafficData,
                                routeType,
                                vehicleLoadType,
                                context),
                new DefaultPollingStrategy<>(this.client.getHttpPipeline(), null, context),
                new TypeReferenceRouteMatrixResultPrivate(),
                new TypeReferenceRouteMatrixResultPrivate());
    }

    /**
     * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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.
     *
     * <p>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.
     *
     * <p>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).
     *
     * <p>### 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).
     *
     * <p>``` POST
     * https://atlas.microsoft.com/route/matrix/sync/json?api-version=1.0&amp;subscription-key={subscription-key} ```
     *
     * <p>### 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.
     *
     * <p>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).
     *
     * <p>The asynchronous responses are stored for **14** days. The redirect URL returns a 404 response if used after
     * the expiration period.
     *
     * <p>``` POST https://atlas.microsoft.com/route/matrix/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ```
     *
     * <p>Here's a typical sequence of asynchronous operations: 1. Client sends a Route Matrix POST request to Azure
     * Maps
     *
     * <p>2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Route Matrix request has been accepted.
     *
     * <p>&gt; 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.
     *
     * <p>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:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
     *
     * <p>4. Client issues a GET request on the download URL obtained in Step 3 to download the results
     *
     * <p>### 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.
     *
     * <p>### 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} ```
     *
     * <p>The URL provided by the location header will return the following responses when a `GET` request is issued.
     *
     * <p>&gt; HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.
     *
     * @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 waitForResults 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**.
     * @param computeTravelTime 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.
     * @param filterSectionType Specifies which of the section types is reported in the route response.
     *     &lt;br&gt;&lt;br&gt;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.
     * @param arriveAt 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.
     * @param departAt 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).
     * @param vehicleAxleWeight Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per
     *     axle are not considered.
     * @param vehicleLength Length of the vehicle in meters. A value of 0 means that length restrictions are not
     *     considered.
     * @param vehicleHeight Height of the vehicle in meters. A value of 0 means that height restrictions are not
     *     considered.
     * @param vehicleWidth Width of the vehicle in meters. A value of 0 means that width restrictions are not
     *     considered.
     * @param vehicleMaxSpeed 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.
     *     <p>* A value of 0 means that an appropriate value for the vehicle will be determined and applied during route
     *     planning.
     *     <p>* 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.
     * @param vehicleWeight Weight of the vehicle in kilograms.
     * @param windingness Level of turns for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param inclineLevel Degree of hilliness for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param travelMode 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.
     * @param avoid Specifies something that the route calculation should try to avoid when determining the route. Can
     *     be specified multiple times in one request, for example,
     *     '&amp;avoid=motorways&amp;avoid=tollRoads&amp;avoid=ferries'. In calculateReachableRange requests, the value
     *     alreadyUsedRoads must not be used.
     * @param useTrafficData 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.
     * @param routeType The type of route requested.
     * @param vehicleLoadType 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.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @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<RouteMatrixResultPrivate, RouteMatrixResultPrivate> beginRequestRouteMatrix(
            JsonFormat format,
            RouteMatrixQueryPrivate routeMatrixQuery,
            Boolean waitForResults,
            ComputeTravelTime computeTravelTime,
            SectionType filterSectionType,
            OffsetDateTime arriveAt,
            OffsetDateTime departAt,
            Integer vehicleAxleWeight,
            Double vehicleLength,
            Double vehicleHeight,
            Double vehicleWidth,
            Integer vehicleMaxSpeed,
            Integer vehicleWeight,
            WindingnessLevel windingness,
            InclineLevel inclineLevel,
            TravelMode travelMode,
            List<RouteAvoidType> avoid,
            Boolean useTrafficData,
            RouteType routeType,
            VehicleLoadType vehicleLoadType) {
        return this.beginRequestRouteMatrixAsync(
                        format,
                        routeMatrixQuery,
                        waitForResults,
                        computeTravelTime,
                        filterSectionType,
                        arriveAt,
                        departAt,
                        vehicleAxleWeight,
                        vehicleLength,
                        vehicleHeight,
                        vehicleWidth,
                        vehicleMaxSpeed,
                        vehicleWeight,
                        windingness,
                        inclineLevel,
                        travelMode,
                        avoid,
                        useTrafficData,
                        routeType,
                        vehicleLoadType)
                .getSyncPoller();
    }

    /**
     * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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.
     *
     * <p>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.
     *
     * <p>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).
     *
     * <p>### 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).
     *
     * <p>``` POST
     * https://atlas.microsoft.com/route/matrix/sync/json?api-version=1.0&amp;subscription-key={subscription-key} ```
     *
     * <p>### 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.
     *
     * <p>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).
     *
     * <p>The asynchronous responses are stored for **14** days. The redirect URL returns a 404 response if used after
     * the expiration period.
     *
     * <p>``` POST https://atlas.microsoft.com/route/matrix/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ```
     *
     * <p>Here's a typical sequence of asynchronous operations: 1. Client sends a Route Matrix POST request to Azure
     * Maps
     *
     * <p>2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Route Matrix request has been accepted.
     *
     * <p>&gt; 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.
     *
     * <p>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:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
     *
     * <p>4. Client issues a GET request on the download URL obtained in Step 3 to download the results
     *
     * <p>### 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.
     *
     * <p>### 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} ```
     *
     * <p>The URL provided by the location header will return the following responses when a `GET` request is issued.
     *
     * <p>&gt; HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.
     *
     * @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 waitForResults 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**.
     * @param computeTravelTime 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.
     * @param filterSectionType Specifies which of the section types is reported in the route response.
     *     &lt;br&gt;&lt;br&gt;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.
     * @param arriveAt 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.
     * @param departAt 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).
     * @param vehicleAxleWeight Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per
     *     axle are not considered.
     * @param vehicleLength Length of the vehicle in meters. A value of 0 means that length restrictions are not
     *     considered.
     * @param vehicleHeight Height of the vehicle in meters. A value of 0 means that height restrictions are not
     *     considered.
     * @param vehicleWidth Width of the vehicle in meters. A value of 0 means that width restrictions are not
     *     considered.
     * @param vehicleMaxSpeed 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.
     *     <p>* A value of 0 means that an appropriate value for the vehicle will be determined and applied during route
     *     planning.
     *     <p>* 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.
     * @param vehicleWeight Weight of the vehicle in kilograms.
     * @param windingness Level of turns for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param inclineLevel Degree of hilliness for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param travelMode 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.
     * @param avoid Specifies something that the route calculation should try to avoid when determining the route. Can
     *     be specified multiple times in one request, for example,
     *     '&amp;avoid=motorways&amp;avoid=tollRoads&amp;avoid=ferries'. In calculateReachableRange requests, the value
     *     alreadyUsedRoads must not be used.
     * @param useTrafficData 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.
     * @param routeType The type of route requested.
     * @param vehicleLoadType 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.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @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<RouteMatrixResultPrivate, RouteMatrixResultPrivate> beginRequestRouteMatrix(
            JsonFormat format,
            RouteMatrixQueryPrivate routeMatrixQuery,
            Boolean waitForResults,
            ComputeTravelTime computeTravelTime,
            SectionType filterSectionType,
            OffsetDateTime arriveAt,
            OffsetDateTime departAt,
            Integer vehicleAxleWeight,
            Double vehicleLength,
            Double vehicleHeight,
            Double vehicleWidth,
            Integer vehicleMaxSpeed,
            Integer vehicleWeight,
            WindingnessLevel windingness,
            InclineLevel inclineLevel,
            TravelMode travelMode,
            List<RouteAvoidType> avoid,
            Boolean useTrafficData,
            RouteType routeType,
            VehicleLoadType vehicleLoadType,
            Context context) {
        return this.beginRequestRouteMatrixAsync(
                        format,
                        routeMatrixQuery,
                        waitForResults,
                        computeTravelTime,
                        filterSectionType,
                        arriveAt,
                        departAt,
                        vehicleAxleWeight,
                        vehicleLength,
                        vehicleHeight,
                        vehicleWidth,
                        vehicleMaxSpeed,
                        vehicleWeight,
                        windingness,
                        inclineLevel,
                        travelMode,
                        avoid,
                        useTrafficData,
                        routeType,
                        vehicleLoadType,
                        context)
                .getSyncPoller();
    }

    /**
     * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
     *
     * <p>4. Client issues a GET request on the download URL obtained in Step 3 to download the results
     *
     * <p>### 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.
     *
     * <p>### 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} ```
     *
     * <p>The URL provided by the location header will return the following responses when a `GET` request is issued.
     *
     * <p>&gt; HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.
     *
     * @param matrixId Matrix id received after the Matrix Route request was accepted successfully.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Route Matrix call on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<RoutesGetRouteMatrixResponse> getRouteMatrixWithResponseAsync(String matrixId) {
        final String accept = "application/json";
        return FluxUtil.withContext(
                context ->
                        service.getRouteMatrix(
                                this.client.getHost(),
                                this.client.getClientId(),
                                this.client.getApiVersion(),
                                matrixId,
                                accept,
                                context));
    }

    /**
     * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
     *
     * <p>4. Client issues a GET request on the download URL obtained in Step 3 to download the results
     *
     * <p>### 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.
     *
     * <p>### 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} ```
     *
     * <p>The URL provided by the location header will return the following responses when a `GET` request is issued.
     *
     * <p>&gt; HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.
     *
     * @param matrixId Matrix id received after the Matrix Route request was accepted successfully.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Route Matrix call on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<RoutesGetRouteMatrixResponse> getRouteMatrixWithResponseAsync(String matrixId, Context context) {
        final String accept = "application/json";
        return service.getRouteMatrix(
                this.client.getHost(),
                this.client.getClientId(),
                this.client.getApiVersion(),
                matrixId,
                accept,
                context);
    }

    /**
     * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
     *
     * <p>4. Client issues a GET request on the download URL obtained in Step 3 to download the results
     *
     * <p>### 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.
     *
     * <p>### 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} ```
     *
     * <p>The URL provided by the location header will return the following responses when a `GET` request is issued.
     *
     * <p>&gt; HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.
     *
     * @param matrixId Matrix id received after the Matrix Route request was accepted successfully.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @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<RouteMatrixResultPrivate, RouteMatrixResultPrivate> beginGetRouteMatrixAsync(String matrixId) {
        return PollerFlux.create(
                Duration.ofSeconds(1),
                () -> this.getRouteMatrixWithResponseAsync(matrixId),
                new DefaultPollingStrategy<>(this.client.getHttpPipeline(), null, Context.NONE),
                new TypeReferenceRouteMatrixResultPrivate(),
                new TypeReferenceRouteMatrixResultPrivate());
    }

    /**
     * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
     *
     * <p>4. Client issues a GET request on the download URL obtained in Step 3 to download the results
     *
     * <p>### 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.
     *
     * <p>### 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} ```
     *
     * <p>The URL provided by the location header will return the following responses when a `GET` request is issued.
     *
     * <p>&gt; HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.
     *
     * @param matrixId Matrix id received after the Matrix Route request was accepted successfully.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @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<RouteMatrixResultPrivate, RouteMatrixResultPrivate> beginGetRouteMatrixAsync(
            String matrixId, Context context) {
        return PollerFlux.create(
                Duration.ofSeconds(1),
                () -> this.getRouteMatrixWithResponseAsync(matrixId, context),
                new DefaultPollingStrategy<>(this.client.getHttpPipeline(), null, context),
                new TypeReferenceRouteMatrixResultPrivate(),
                new TypeReferenceRouteMatrixResultPrivate());
    }

    /**
     * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
     *
     * <p>4. Client issues a GET request on the download URL obtained in Step 3 to download the results
     *
     * <p>### 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.
     *
     * <p>### 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} ```
     *
     * <p>The URL provided by the location header will return the following responses when a `GET` request is issued.
     *
     * <p>&gt; HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.
     *
     * @param matrixId Matrix id received after the Matrix Route request was accepted successfully.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @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<RouteMatrixResultPrivate, RouteMatrixResultPrivate> beginGetRouteMatrix(String matrixId) {
        return this.beginGetRouteMatrixAsync(matrixId).getSyncPoller();
    }

    /**
     * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
     *
     * <p>4. Client issues a GET request on the download URL obtained in Step 3 to download the results
     *
     * <p>### 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.
     *
     * <p>### 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} ```
     *
     * <p>The URL provided by the location header will return the following responses when a `GET` request is issued.
     *
     * <p>&gt; HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.
     *
     * @param matrixId Matrix id received after the Matrix Route request was accepted successfully.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @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<RouteMatrixResultPrivate, RouteMatrixResultPrivate> beginGetRouteMatrix(
            String matrixId, Context context) {
        return this.beginGetRouteMatrixAsync(matrixId, context).getSyncPoller();
    }

    /**
     * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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.
     *
     * <p>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.
     *
     * <p>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).
     *
     * <p>### 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).
     *
     * <p>``` POST
     * https://atlas.microsoft.com/route/matrix/sync/json?api-version=1.0&amp;subscription-key={subscription-key} ```
     *
     * <p>### 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.
     *
     * <p>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).
     *
     * <p>The asynchronous responses are stored for **14** days. The redirect URL returns a 404 response if used after
     * the expiration period.
     *
     * <p>``` POST https://atlas.microsoft.com/route/matrix/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ```
     *
     * <p>Here's a typical sequence of asynchronous operations: 1. Client sends a Route Matrix POST request to Azure
     * Maps
     *
     * <p>2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Route Matrix request has been accepted.
     *
     * <p>&gt; 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.
     *
     * <p>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:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
     *
     * <p>4. Client issues a GET request on the download URL obtained in Step 3 to download the results
     *
     * <p>### 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.
     *
     * <p>### 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} ```
     *
     * <p>The URL provided by the location header will return the following responses when a `GET` request is issued.
     *
     * <p>&gt; HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.
     *
     * @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 waitForResults 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**.
     * @param computeTravelTime 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.
     * @param filterSectionType Specifies which of the section types is reported in the route response.
     *     &lt;br&gt;&lt;br&gt;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.
     * @param arriveAt 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.
     * @param departAt 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).
     * @param vehicleAxleWeight Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per
     *     axle are not considered.
     * @param vehicleLength Length of the vehicle in meters. A value of 0 means that length restrictions are not
     *     considered.
     * @param vehicleHeight Height of the vehicle in meters. A value of 0 means that height restrictions are not
     *     considered.
     * @param vehicleWidth Width of the vehicle in meters. A value of 0 means that width restrictions are not
     *     considered.
     * @param vehicleMaxSpeed 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.
     *     <p>* A value of 0 means that an appropriate value for the vehicle will be determined and applied during route
     *     planning.
     *     <p>* 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.
     * @param vehicleWeight Weight of the vehicle in kilograms.
     * @param windingness Level of turns for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param inclineLevel Degree of hilliness for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param travelMode 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.
     * @param avoid Specifies something that the route calculation should try to avoid when determining the route. Can
     *     be specified multiple times in one request, for example,
     *     '&amp;avoid=motorways&amp;avoid=tollRoads&amp;avoid=ferries'. In calculateReachableRange requests, the value
     *     alreadyUsedRoads must not be used.
     * @param useTrafficData 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.
     * @param routeType The type of route requested.
     * @param vehicleLoadType 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.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws ErrorResponseException thrown if the request is rejected by server on status code 408.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @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<Response<RouteMatrixResultPrivate>> requestRouteMatrixSyncWithResponseAsync(
            JsonFormat format,
            RouteMatrixQueryPrivate routeMatrixQuery,
            Boolean waitForResults,
            ComputeTravelTime computeTravelTime,
            SectionType filterSectionType,
            OffsetDateTime arriveAt,
            OffsetDateTime departAt,
            Integer vehicleAxleWeight,
            Double vehicleLength,
            Double vehicleHeight,
            Double vehicleWidth,
            Integer vehicleMaxSpeed,
            Integer vehicleWeight,
            WindingnessLevel windingness,
            InclineLevel inclineLevel,
            TravelMode travelMode,
            List<RouteAvoidType> avoid,
            Boolean useTrafficData,
            RouteType routeType,
            VehicleLoadType vehicleLoadType) {
        final String accept = "application/json";
        List<String> avoidConverted =
                (avoid == null)
                        ? new ArrayList<>()
                        : avoid.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList());
        return FluxUtil.withContext(
                context ->
                        service.requestRouteMatrixSync(
                                this.client.getHost(),
                                this.client.getClientId(),
                                this.client.getApiVersion(),
                                format,
                                waitForResults,
                                computeTravelTime,
                                filterSectionType,
                                arriveAt,
                                departAt,
                                vehicleAxleWeight,
                                vehicleLength,
                                vehicleHeight,
                                vehicleWidth,
                                vehicleMaxSpeed,
                                vehicleWeight,
                                windingness,
                                inclineLevel,
                                travelMode,
                                avoidConverted,
                                useTrafficData,
                                routeType,
                                vehicleLoadType,
                                routeMatrixQuery,
                                accept,
                                context));
    }

    /**
     * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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.
     *
     * <p>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.
     *
     * <p>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).
     *
     * <p>### 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).
     *
     * <p>``` POST
     * https://atlas.microsoft.com/route/matrix/sync/json?api-version=1.0&amp;subscription-key={subscription-key} ```
     *
     * <p>### 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.
     *
     * <p>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).
     *
     * <p>The asynchronous responses are stored for **14** days. The redirect URL returns a 404 response if used after
     * the expiration period.
     *
     * <p>``` POST https://atlas.microsoft.com/route/matrix/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ```
     *
     * <p>Here's a typical sequence of asynchronous operations: 1. Client sends a Route Matrix POST request to Azure
     * Maps
     *
     * <p>2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Route Matrix request has been accepted.
     *
     * <p>&gt; 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.
     *
     * <p>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:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
     *
     * <p>4. Client issues a GET request on the download URL obtained in Step 3 to download the results
     *
     * <p>### 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.
     *
     * <p>### 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} ```
     *
     * <p>The URL provided by the location header will return the following responses when a `GET` request is issued.
     *
     * <p>&gt; HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.
     *
     * @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 waitForResults 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**.
     * @param computeTravelTime 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.
     * @param filterSectionType Specifies which of the section types is reported in the route response.
     *     &lt;br&gt;&lt;br&gt;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.
     * @param arriveAt 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.
     * @param departAt 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).
     * @param vehicleAxleWeight Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per
     *     axle are not considered.
     * @param vehicleLength Length of the vehicle in meters. A value of 0 means that length restrictions are not
     *     considered.
     * @param vehicleHeight Height of the vehicle in meters. A value of 0 means that height restrictions are not
     *     considered.
     * @param vehicleWidth Width of the vehicle in meters. A value of 0 means that width restrictions are not
     *     considered.
     * @param vehicleMaxSpeed 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.
     *     <p>* A value of 0 means that an appropriate value for the vehicle will be determined and applied during route
     *     planning.
     *     <p>* 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.
     * @param vehicleWeight Weight of the vehicle in kilograms.
     * @param windingness Level of turns for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param inclineLevel Degree of hilliness for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param travelMode 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.
     * @param avoid Specifies something that the route calculation should try to avoid when determining the route. Can
     *     be specified multiple times in one request, for example,
     *     '&amp;avoid=motorways&amp;avoid=tollRoads&amp;avoid=ferries'. In calculateReachableRange requests, the value
     *     alreadyUsedRoads must not be used.
     * @param useTrafficData 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.
     * @param routeType The type of route requested.
     * @param vehicleLoadType 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.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws ErrorResponseException thrown if the request is rejected by server on status code 408.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @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<Response<RouteMatrixResultPrivate>> requestRouteMatrixSyncWithResponseAsync(
            JsonFormat format,
            RouteMatrixQueryPrivate routeMatrixQuery,
            Boolean waitForResults,
            ComputeTravelTime computeTravelTime,
            SectionType filterSectionType,
            OffsetDateTime arriveAt,
            OffsetDateTime departAt,
            Integer vehicleAxleWeight,
            Double vehicleLength,
            Double vehicleHeight,
            Double vehicleWidth,
            Integer vehicleMaxSpeed,
            Integer vehicleWeight,
            WindingnessLevel windingness,
            InclineLevel inclineLevel,
            TravelMode travelMode,
            List<RouteAvoidType> avoid,
            Boolean useTrafficData,
            RouteType routeType,
            VehicleLoadType vehicleLoadType,
            Context context) {
        final String accept = "application/json";
        List<String> avoidConverted =
                (avoid == null)
                        ? new ArrayList<>()
                        : avoid.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList());
        return service.requestRouteMatrixSync(
                this.client.getHost(),
                this.client.getClientId(),
                this.client.getApiVersion(),
                format,
                waitForResults,
                computeTravelTime,
                filterSectionType,
                arriveAt,
                departAt,
                vehicleAxleWeight,
                vehicleLength,
                vehicleHeight,
                vehicleWidth,
                vehicleMaxSpeed,
                vehicleWeight,
                windingness,
                inclineLevel,
                travelMode,
                avoidConverted,
                useTrafficData,
                routeType,
                vehicleLoadType,
                routeMatrixQuery,
                accept,
                context);
    }

    /**
     * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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.
     *
     * <p>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.
     *
     * <p>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).
     *
     * <p>### 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).
     *
     * <p>``` POST
     * https://atlas.microsoft.com/route/matrix/sync/json?api-version=1.0&amp;subscription-key={subscription-key} ```
     *
     * <p>### 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.
     *
     * <p>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).
     *
     * <p>The asynchronous responses are stored for **14** days. The redirect URL returns a 404 response if used after
     * the expiration period.
     *
     * <p>``` POST https://atlas.microsoft.com/route/matrix/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ```
     *
     * <p>Here's a typical sequence of asynchronous operations: 1. Client sends a Route Matrix POST request to Azure
     * Maps
     *
     * <p>2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Route Matrix request has been accepted.
     *
     * <p>&gt; 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.
     *
     * <p>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:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
     *
     * <p>4. Client issues a GET request on the download URL obtained in Step 3 to download the results
     *
     * <p>### 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.
     *
     * <p>### 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} ```
     *
     * <p>The URL provided by the location header will return the following responses when a `GET` request is issued.
     *
     * <p>&gt; HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.
     *
     * @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 waitForResults 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**.
     * @param computeTravelTime 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.
     * @param filterSectionType Specifies which of the section types is reported in the route response.
     *     &lt;br&gt;&lt;br&gt;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.
     * @param arriveAt 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.
     * @param departAt 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).
     * @param vehicleAxleWeight Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per
     *     axle are not considered.
     * @param vehicleLength Length of the vehicle in meters. A value of 0 means that length restrictions are not
     *     considered.
     * @param vehicleHeight Height of the vehicle in meters. A value of 0 means that height restrictions are not
     *     considered.
     * @param vehicleWidth Width of the vehicle in meters. A value of 0 means that width restrictions are not
     *     considered.
     * @param vehicleMaxSpeed 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.
     *     <p>* A value of 0 means that an appropriate value for the vehicle will be determined and applied during route
     *     planning.
     *     <p>* 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.
     * @param vehicleWeight Weight of the vehicle in kilograms.
     * @param windingness Level of turns for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param inclineLevel Degree of hilliness for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param travelMode 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.
     * @param avoid Specifies something that the route calculation should try to avoid when determining the route. Can
     *     be specified multiple times in one request, for example,
     *     '&amp;avoid=motorways&amp;avoid=tollRoads&amp;avoid=ferries'. In calculateReachableRange requests, the value
     *     alreadyUsedRoads must not be used.
     * @param useTrafficData 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.
     * @param routeType The type of route requested.
     * @param vehicleLoadType 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.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws ErrorResponseException thrown if the request is rejected by server on status code 408.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Route Matrix call on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<RouteMatrixResultPrivate> requestRouteMatrixSyncAsync(
            JsonFormat format,
            RouteMatrixQueryPrivate routeMatrixQuery,
            Boolean waitForResults,
            ComputeTravelTime computeTravelTime,
            SectionType filterSectionType,
            OffsetDateTime arriveAt,
            OffsetDateTime departAt,
            Integer vehicleAxleWeight,
            Double vehicleLength,
            Double vehicleHeight,
            Double vehicleWidth,
            Integer vehicleMaxSpeed,
            Integer vehicleWeight,
            WindingnessLevel windingness,
            InclineLevel inclineLevel,
            TravelMode travelMode,
            List<RouteAvoidType> avoid,
            Boolean useTrafficData,
            RouteType routeType,
            VehicleLoadType vehicleLoadType) {
        return requestRouteMatrixSyncWithResponseAsync(
                        format,
                        routeMatrixQuery,
                        waitForResults,
                        computeTravelTime,
                        filterSectionType,
                        arriveAt,
                        departAt,
                        vehicleAxleWeight,
                        vehicleLength,
                        vehicleHeight,
                        vehicleWidth,
                        vehicleMaxSpeed,
                        vehicleWeight,
                        windingness,
                        inclineLevel,
                        travelMode,
                        avoid,
                        useTrafficData,
                        routeType,
                        vehicleLoadType)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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.
     *
     * <p>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.
     *
     * <p>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).
     *
     * <p>### 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).
     *
     * <p>``` POST
     * https://atlas.microsoft.com/route/matrix/sync/json?api-version=1.0&amp;subscription-key={subscription-key} ```
     *
     * <p>### 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.
     *
     * <p>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).
     *
     * <p>The asynchronous responses are stored for **14** days. The redirect URL returns a 404 response if used after
     * the expiration period.
     *
     * <p>``` POST https://atlas.microsoft.com/route/matrix/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ```
     *
     * <p>Here's a typical sequence of asynchronous operations: 1. Client sends a Route Matrix POST request to Azure
     * Maps
     *
     * <p>2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Route Matrix request has been accepted.
     *
     * <p>&gt; 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.
     *
     * <p>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:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
     *
     * <p>4. Client issues a GET request on the download URL obtained in Step 3 to download the results
     *
     * <p>### 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.
     *
     * <p>### 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} ```
     *
     * <p>The URL provided by the location header will return the following responses when a `GET` request is issued.
     *
     * <p>&gt; HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.
     *
     * @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 waitForResults 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**.
     * @param computeTravelTime 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.
     * @param filterSectionType Specifies which of the section types is reported in the route response.
     *     &lt;br&gt;&lt;br&gt;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.
     * @param arriveAt 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.
     * @param departAt 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).
     * @param vehicleAxleWeight Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per
     *     axle are not considered.
     * @param vehicleLength Length of the vehicle in meters. A value of 0 means that length restrictions are not
     *     considered.
     * @param vehicleHeight Height of the vehicle in meters. A value of 0 means that height restrictions are not
     *     considered.
     * @param vehicleWidth Width of the vehicle in meters. A value of 0 means that width restrictions are not
     *     considered.
     * @param vehicleMaxSpeed 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.
     *     <p>* A value of 0 means that an appropriate value for the vehicle will be determined and applied during route
     *     planning.
     *     <p>* 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.
     * @param vehicleWeight Weight of the vehicle in kilograms.
     * @param windingness Level of turns for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param inclineLevel Degree of hilliness for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param travelMode 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.
     * @param avoid Specifies something that the route calculation should try to avoid when determining the route. Can
     *     be specified multiple times in one request, for example,
     *     '&amp;avoid=motorways&amp;avoid=tollRoads&amp;avoid=ferries'. In calculateReachableRange requests, the value
     *     alreadyUsedRoads must not be used.
     * @param useTrafficData 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.
     * @param routeType The type of route requested.
     * @param vehicleLoadType 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.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws ErrorResponseException thrown if the request is rejected by server on status code 408.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Route Matrix call on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<RouteMatrixResultPrivate> requestRouteMatrixSyncAsync(
            JsonFormat format,
            RouteMatrixQueryPrivate routeMatrixQuery,
            Boolean waitForResults,
            ComputeTravelTime computeTravelTime,
            SectionType filterSectionType,
            OffsetDateTime arriveAt,
            OffsetDateTime departAt,
            Integer vehicleAxleWeight,
            Double vehicleLength,
            Double vehicleHeight,
            Double vehicleWidth,
            Integer vehicleMaxSpeed,
            Integer vehicleWeight,
            WindingnessLevel windingness,
            InclineLevel inclineLevel,
            TravelMode travelMode,
            List<RouteAvoidType> avoid,
            Boolean useTrafficData,
            RouteType routeType,
            VehicleLoadType vehicleLoadType,
            Context context) {
        return requestRouteMatrixSyncWithResponseAsync(
                        format,
                        routeMatrixQuery,
                        waitForResults,
                        computeTravelTime,
                        filterSectionType,
                        arriveAt,
                        departAt,
                        vehicleAxleWeight,
                        vehicleLength,
                        vehicleHeight,
                        vehicleWidth,
                        vehicleMaxSpeed,
                        vehicleWeight,
                        windingness,
                        inclineLevel,
                        travelMode,
                        avoid,
                        useTrafficData,
                        routeType,
                        vehicleLoadType,
                        context)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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.
     *
     * <p>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.
     *
     * <p>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).
     *
     * <p>### 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).
     *
     * <p>``` POST
     * https://atlas.microsoft.com/route/matrix/sync/json?api-version=1.0&amp;subscription-key={subscription-key} ```
     *
     * <p>### 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.
     *
     * <p>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).
     *
     * <p>The asynchronous responses are stored for **14** days. The redirect URL returns a 404 response if used after
     * the expiration period.
     *
     * <p>``` POST https://atlas.microsoft.com/route/matrix/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ```
     *
     * <p>Here's a typical sequence of asynchronous operations: 1. Client sends a Route Matrix POST request to Azure
     * Maps
     *
     * <p>2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Route Matrix request has been accepted.
     *
     * <p>&gt; 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.
     *
     * <p>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:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
     *
     * <p>4. Client issues a GET request on the download URL obtained in Step 3 to download the results
     *
     * <p>### 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.
     *
     * <p>### 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} ```
     *
     * <p>The URL provided by the location header will return the following responses when a `GET` request is issued.
     *
     * <p>&gt; HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.
     *
     * @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 waitForResults 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**.
     * @param computeTravelTime 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.
     * @param filterSectionType Specifies which of the section types is reported in the route response.
     *     &lt;br&gt;&lt;br&gt;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.
     * @param arriveAt 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.
     * @param departAt 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).
     * @param vehicleAxleWeight Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per
     *     axle are not considered.
     * @param vehicleLength Length of the vehicle in meters. A value of 0 means that length restrictions are not
     *     considered.
     * @param vehicleHeight Height of the vehicle in meters. A value of 0 means that height restrictions are not
     *     considered.
     * @param vehicleWidth Width of the vehicle in meters. A value of 0 means that width restrictions are not
     *     considered.
     * @param vehicleMaxSpeed 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.
     *     <p>* A value of 0 means that an appropriate value for the vehicle will be determined and applied during route
     *     planning.
     *     <p>* 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.
     * @param vehicleWeight Weight of the vehicle in kilograms.
     * @param windingness Level of turns for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param inclineLevel Degree of hilliness for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param travelMode 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.
     * @param avoid Specifies something that the route calculation should try to avoid when determining the route. Can
     *     be specified multiple times in one request, for example,
     *     '&amp;avoid=motorways&amp;avoid=tollRoads&amp;avoid=ferries'. In calculateReachableRange requests, the value
     *     alreadyUsedRoads must not be used.
     * @param useTrafficData 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.
     * @param routeType The type of route requested.
     * @param vehicleLoadType 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.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws ErrorResponseException thrown if the request is rejected by server on status code 408.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Route Matrix call.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public RouteMatrixResultPrivate requestRouteMatrixSync(
            JsonFormat format,
            RouteMatrixQueryPrivate routeMatrixQuery,
            Boolean waitForResults,
            ComputeTravelTime computeTravelTime,
            SectionType filterSectionType,
            OffsetDateTime arriveAt,
            OffsetDateTime departAt,
            Integer vehicleAxleWeight,
            Double vehicleLength,
            Double vehicleHeight,
            Double vehicleWidth,
            Integer vehicleMaxSpeed,
            Integer vehicleWeight,
            WindingnessLevel windingness,
            InclineLevel inclineLevel,
            TravelMode travelMode,
            List<RouteAvoidType> avoid,
            Boolean useTrafficData,
            RouteType routeType,
            VehicleLoadType vehicleLoadType) {
        return requestRouteMatrixSyncAsync(
                        format,
                        routeMatrixQuery,
                        waitForResults,
                        computeTravelTime,
                        filterSectionType,
                        arriveAt,
                        departAt,
                        vehicleAxleWeight,
                        vehicleLength,
                        vehicleHeight,
                        vehicleWidth,
                        vehicleMaxSpeed,
                        vehicleWeight,
                        windingness,
                        inclineLevel,
                        travelMode,
                        avoid,
                        useTrafficData,
                        routeType,
                        vehicleLoadType)
                .block();
    }

    /**
     * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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.
     *
     * <p>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.
     *
     * <p>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).
     *
     * <p>### 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).
     *
     * <p>``` POST
     * https://atlas.microsoft.com/route/matrix/sync/json?api-version=1.0&amp;subscription-key={subscription-key} ```
     *
     * <p>### 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.
     *
     * <p>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).
     *
     * <p>The asynchronous responses are stored for **14** days. The redirect URL returns a 404 response if used after
     * the expiration period.
     *
     * <p>``` POST https://atlas.microsoft.com/route/matrix/json?api-version=1.0&amp;subscription-key={subscription-key}
     * ```
     *
     * <p>Here's a typical sequence of asynchronous operations: 1. Client sends a Route Matrix POST request to Azure
     * Maps
     *
     * <p>2. The server will respond with one of the following:
     *
     * <p>&gt; HTTP `202 Accepted` - Route Matrix request has been accepted.
     *
     * <p>&gt; 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.
     *
     * <p>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:
     *
     * <p>``` GET
     * https://atlas.microsoft.com/route/matrix/{matrixId}?api-version=1.0?subscription-key={subscription-key} ```
     *
     * <p>4. Client issues a GET request on the download URL obtained in Step 3 to download the results
     *
     * <p>### 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.
     *
     * <p>### 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} ```
     *
     * <p>The URL provided by the location header will return the following responses when a `GET` request is issued.
     *
     * <p>&gt; HTTP `202 Accepted` - Matrix request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Matrix request successfully processed. The response body contains all of the results.
     *
     * @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 waitForResults 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**.
     * @param computeTravelTime 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.
     * @param filterSectionType Specifies which of the section types is reported in the route response.
     *     &lt;br&gt;&lt;br&gt;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.
     * @param arriveAt 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.
     * @param departAt 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).
     * @param vehicleAxleWeight Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per
     *     axle are not considered.
     * @param vehicleLength Length of the vehicle in meters. A value of 0 means that length restrictions are not
     *     considered.
     * @param vehicleHeight Height of the vehicle in meters. A value of 0 means that height restrictions are not
     *     considered.
     * @param vehicleWidth Width of the vehicle in meters. A value of 0 means that width restrictions are not
     *     considered.
     * @param vehicleMaxSpeed 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.
     *     <p>* A value of 0 means that an appropriate value for the vehicle will be determined and applied during route
     *     planning.
     *     <p>* 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.
     * @param vehicleWeight Weight of the vehicle in kilograms.
     * @param windingness Level of turns for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param inclineLevel Degree of hilliness for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param travelMode 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.
     * @param avoid Specifies something that the route calculation should try to avoid when determining the route. Can
     *     be specified multiple times in one request, for example,
     *     '&amp;avoid=motorways&amp;avoid=tollRoads&amp;avoid=ferries'. In calculateReachableRange requests, the value
     *     alreadyUsedRoads must not be used.
     * @param useTrafficData 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.
     * @param routeType The type of route requested.
     * @param vehicleLoadType 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.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws ErrorResponseException thrown if the request is rejected by server on status code 408.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Route Matrix call along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<RouteMatrixResultPrivate> requestRouteMatrixSyncWithResponse(
            JsonFormat format,
            RouteMatrixQueryPrivate routeMatrixQuery,
            Boolean waitForResults,
            ComputeTravelTime computeTravelTime,
            SectionType filterSectionType,
            OffsetDateTime arriveAt,
            OffsetDateTime departAt,
            Integer vehicleAxleWeight,
            Double vehicleLength,
            Double vehicleHeight,
            Double vehicleWidth,
            Integer vehicleMaxSpeed,
            Integer vehicleWeight,
            WindingnessLevel windingness,
            InclineLevel inclineLevel,
            TravelMode travelMode,
            List<RouteAvoidType> avoid,
            Boolean useTrafficData,
            RouteType routeType,
            VehicleLoadType vehicleLoadType,
            Context context) {
        return requestRouteMatrixSyncWithResponseAsync(
                        format,
                        routeMatrixQuery,
                        waitForResults,
                        computeTravelTime,
                        filterSectionType,
                        arriveAt,
                        departAt,
                        vehicleAxleWeight,
                        vehicleLength,
                        vehicleHeight,
                        vehicleWidth,
                        vehicleMaxSpeed,
                        vehicleWeight,
                        windingness,
                        inclineLevel,
                        travelMode,
                        avoid,
                        useTrafficData,
                        routeType,
                        vehicleLoadType,
                        context)
                .block();
    }

    /**
     * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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.
     *
     * <p>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.
     *
     * <p>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.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param routePoints 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.
     * @param maxAlternatives Number of desired alternative routes to be calculated. Default: 0, minimum: 0 and maximum:
     *     5.
     * @param alternativeType Controls the optimality, with respect to the given planning criteria, of the calculated
     *     alternatives compared to the reference route.
     * @param minDeviationDistance 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.
     * @param arriveAt 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.
     * @param departAt 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).
     * @param minDeviationTime 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.
     * @param instructionsType If specified, guidance instructions will be returned. Note that the instructionsType
     *     parameter cannot be used in conjunction with routeRepresentation=none.
     * @param language 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).
     *     <p>Default value: en-GB.
     * @param computeBestWaypointOrder 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_.
     * @param routeRepresentationForBestOrder Specifies the representation of the set of routes provided as response.
     *     This parameter value can only be used in conjunction with computeBestOrder=true.
     * @param computeTravelTime 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.
     * @param vehicleHeading 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.
     * @param report 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.
     * @param filterSectionType Specifies which of the section types is reported in the route response.
     *     &lt;br&gt;&lt;br&gt;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.
     * @param vehicleAxleWeight Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per
     *     axle are not considered.
     * @param vehicleWidth Width of the vehicle in meters. A value of 0 means that width restrictions are not
     *     considered.
     * @param vehicleHeight Height of the vehicle in meters. A value of 0 means that height restrictions are not
     *     considered.
     * @param vehicleLength Length of the vehicle in meters. A value of 0 means that length restrictions are not
     *     considered.
     * @param vehicleMaxSpeed 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.
     *     <p>* A value of 0 means that an appropriate value for the vehicle will be determined and applied during route
     *     planning.
     *     <p>* 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.
     * @param vehicleWeight Weight of the vehicle in kilograms.
     *     <p>* It is mandatory if any of the *Efficiency parameters are set.
     *     <p>* It must be strictly positive when used in the context of the Consumption Model. Weight restrictions are
     *     considered.
     *     <p>* If no detailed **Consumption Model** is specified and the value of **vehicleWeight** is non-zero, then
     *     weight restrictions are considered.
     *     <p>* In all other cases, this parameter is ignored.
     *     <p>Sensible Values : for **Combustion Model** : 1600, for **Electric Model** : 1900.
     * @param isCommercialVehicle Whether the vehicle is used for commercial purposes. Commercial vehicles may not be
     *     allowed to drive on some roads.
     * @param windingness Level of turns for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param inclineLevel Degree of hilliness for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param travelMode 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.
     * @param avoid Specifies something that the route calculation should try to avoid when determining the route. Can
     *     be specified multiple times in one request, for example,
     *     '&amp;avoid=motorways&amp;avoid=tollRoads&amp;avoid=ferries'. In calculateReachableRange requests, the value
     *     alreadyUsedRoads must not be used.
     * @param useTrafficData 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.
     * @param routeType The type of route requested.
     * @param vehicleLoadType 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.
     * @param vehicleEngineType Engine type of the vehicle. When a detailed Consumption Model is specified, it must be
     *     consistent with the value of **vehicleEngineType**.
     * @param constantSpeedConsumptionInLitersPerHundredKm Specifies the speed-dependent component of consumption.
     *     <p>Provided as an unordered list of colon-delimited speed &amp; consumption-rate pairs. The list defines
     *     points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
     *     <p>* by linear interpolation, if the given speed lies in between two speeds in the list
     *     <p>* by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest
     *     two points in the list
     *     <p>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.
     *     <p>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.
     *     <p>Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative
     *     consumption rate for any smaller speed.
     *     <p>The valid range for the consumption values(expressed in l/100km) is between 0.01 and 100000.0.
     *     <p>Sensible Values : 50,6.3:130,11.5
     *     <p>**Note** : This parameter is required for **The Combustion Consumption Model**.
     * @param currentFuelInLiters Specifies the current supply of fuel in liters.
     *     <p>Sensible Values : 55.
     * @param auxiliaryPowerInLitersPerHour Specifies the amount of fuel consumed for sustaining auxiliary systems of
     *     the vehicle, in liters per hour.
     *     <p>It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
     *     <p>Sensible Values : 0.2.
     * @param fuelEnergyDensityInMegajoulesPerLiter 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.
     *     <p>This parameter is required if any ***Efficiency** parameter is set.
     *     <p>Sensible Values : 34.2.
     * @param accelerationEfficiency 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**.
     *     <p>Must be paired with **decelerationEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**decelerationEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.33, for **Electric Model** : 0.66.
     * @param decelerationEfficiency 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**.
     *     <p>Must be paired with **accelerationEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**accelerationEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.83, for **Electric Model** : 0.91.
     * @param uphillEfficiency 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**.
     *     <p>Must be paired with **downhillEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**downhillEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.27, for **Electric Model** : 0.74.
     * @param downhillEfficiency 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**.
     *     <p>Must be paired with **uphillEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**uphillEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.51, for **Electric Model** : 0.73.
     * @param constantSpeedConsumptionInKwHPerHundredKm Specifies the speed-dependent component of consumption.
     *     <p>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:
     *     <p>* by linear interpolation, if the given speed lies in between two speeds in the list
     *     <p>* by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest
     *     two points in the list
     *     <p>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.
     *     <p>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.
     *     <p>Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative
     *     consumption rate for any smaller speed.
     *     <p>The valid range for the consumption values(expressed in kWh/100km) is between 0.01 and 100000.0.
     *     <p>Sensible Values : 50,8.2:130,21.3
     *     <p>This parameter is required for **Electric consumption model**.
     * @param currentChargeInKwH Specifies the current electric energy supply in kilowatt hours (kWh).
     *     <p>This parameter co-exists with **maxChargeInkWh** parameter.
     *     <p>The range of values allowed are 0.0 to **maxChargeInkWh**.
     *     <p>Sensible Values : 43.
     * @param maxChargeInKwH Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in
     *     the vehicle's battery.
     *     <p>This parameter co-exists with **currentChargeInkWh** parameter.
     *     <p>Minimum value has to be greater than or equal to **currentChargeInkWh**.
     *     <p>Sensible Values : 85.
     * @param auxiliaryPowerInKw Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts
     *     (kW).
     *     <p>It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
     *     <p>Sensible Values : 1.7.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @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<Response<RouteDirections>> getRouteDirectionsWithResponseAsync(
            ResponseFormat format,
            String routePoints,
            Integer maxAlternatives,
            AlternativeRouteType alternativeType,
            Integer minDeviationDistance,
            OffsetDateTime arriveAt,
            OffsetDateTime departAt,
            Integer minDeviationTime,
            RouteInstructionsType instructionsType,
            String language,
            Boolean computeBestWaypointOrder,
            RouteRepresentationForBestOrder routeRepresentationForBestOrder,
            ComputeTravelTime computeTravelTime,
            Integer vehicleHeading,
            Report report,
            SectionType filterSectionType,
            Integer vehicleAxleWeight,
            Double vehicleWidth,
            Double vehicleHeight,
            Double vehicleLength,
            Integer vehicleMaxSpeed,
            Integer vehicleWeight,
            Boolean isCommercialVehicle,
            WindingnessLevel windingness,
            InclineLevel inclineLevel,
            TravelMode travelMode,
            List<RouteAvoidType> avoid,
            Boolean useTrafficData,
            RouteType routeType,
            VehicleLoadType vehicleLoadType,
            VehicleEngineType vehicleEngineType,
            String constantSpeedConsumptionInLitersPerHundredKm,
            Double currentFuelInLiters,
            Double auxiliaryPowerInLitersPerHour,
            Double fuelEnergyDensityInMegajoulesPerLiter,
            Double accelerationEfficiency,
            Double decelerationEfficiency,
            Double uphillEfficiency,
            Double downhillEfficiency,
            String constantSpeedConsumptionInKwHPerHundredKm,
            Double currentChargeInKwH,
            Double maxChargeInKwH,
            Double auxiliaryPowerInKw) {
        final String accept = "application/json";
        List<String> avoidConverted =
                (avoid == null)
                        ? new ArrayList<>()
                        : avoid.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList());
        return FluxUtil.withContext(
                context ->
                        service.getRouteDirections(
                                this.client.getHost(),
                                this.client.getClientId(),
                                this.client.getApiVersion(),
                                format,
                                routePoints,
                                maxAlternatives,
                                alternativeType,
                                minDeviationDistance,
                                arriveAt,
                                departAt,
                                minDeviationTime,
                                instructionsType,
                                language,
                                computeBestWaypointOrder,
                                routeRepresentationForBestOrder,
                                computeTravelTime,
                                vehicleHeading,
                                report,
                                filterSectionType,
                                vehicleAxleWeight,
                                vehicleWidth,
                                vehicleHeight,
                                vehicleLength,
                                vehicleMaxSpeed,
                                vehicleWeight,
                                isCommercialVehicle,
                                windingness,
                                inclineLevel,
                                travelMode,
                                avoidConverted,
                                useTrafficData,
                                routeType,
                                vehicleLoadType,
                                vehicleEngineType,
                                constantSpeedConsumptionInLitersPerHundredKm,
                                currentFuelInLiters,
                                auxiliaryPowerInLitersPerHour,
                                fuelEnergyDensityInMegajoulesPerLiter,
                                accelerationEfficiency,
                                decelerationEfficiency,
                                uphillEfficiency,
                                downhillEfficiency,
                                constantSpeedConsumptionInKwHPerHundredKm,
                                currentChargeInKwH,
                                maxChargeInKwH,
                                auxiliaryPowerInKw,
                                accept,
                                context));
    }

    /**
     * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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.
     *
     * <p>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.
     *
     * <p>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.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param routePoints 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.
     * @param maxAlternatives Number of desired alternative routes to be calculated. Default: 0, minimum: 0 and maximum:
     *     5.
     * @param alternativeType Controls the optimality, with respect to the given planning criteria, of the calculated
     *     alternatives compared to the reference route.
     * @param minDeviationDistance 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.
     * @param arriveAt 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.
     * @param departAt 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).
     * @param minDeviationTime 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.
     * @param instructionsType If specified, guidance instructions will be returned. Note that the instructionsType
     *     parameter cannot be used in conjunction with routeRepresentation=none.
     * @param language 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).
     *     <p>Default value: en-GB.
     * @param computeBestWaypointOrder 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_.
     * @param routeRepresentationForBestOrder Specifies the representation of the set of routes provided as response.
     *     This parameter value can only be used in conjunction with computeBestOrder=true.
     * @param computeTravelTime 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.
     * @param vehicleHeading 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.
     * @param report 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.
     * @param filterSectionType Specifies which of the section types is reported in the route response.
     *     &lt;br&gt;&lt;br&gt;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.
     * @param vehicleAxleWeight Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per
     *     axle are not considered.
     * @param vehicleWidth Width of the vehicle in meters. A value of 0 means that width restrictions are not
     *     considered.
     * @param vehicleHeight Height of the vehicle in meters. A value of 0 means that height restrictions are not
     *     considered.
     * @param vehicleLength Length of the vehicle in meters. A value of 0 means that length restrictions are not
     *     considered.
     * @param vehicleMaxSpeed 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.
     *     <p>* A value of 0 means that an appropriate value for the vehicle will be determined and applied during route
     *     planning.
     *     <p>* 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.
     * @param vehicleWeight Weight of the vehicle in kilograms.
     *     <p>* It is mandatory if any of the *Efficiency parameters are set.
     *     <p>* It must be strictly positive when used in the context of the Consumption Model. Weight restrictions are
     *     considered.
     *     <p>* If no detailed **Consumption Model** is specified and the value of **vehicleWeight** is non-zero, then
     *     weight restrictions are considered.
     *     <p>* In all other cases, this parameter is ignored.
     *     <p>Sensible Values : for **Combustion Model** : 1600, for **Electric Model** : 1900.
     * @param isCommercialVehicle Whether the vehicle is used for commercial purposes. Commercial vehicles may not be
     *     allowed to drive on some roads.
     * @param windingness Level of turns for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param inclineLevel Degree of hilliness for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param travelMode 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.
     * @param avoid Specifies something that the route calculation should try to avoid when determining the route. Can
     *     be specified multiple times in one request, for example,
     *     '&amp;avoid=motorways&amp;avoid=tollRoads&amp;avoid=ferries'. In calculateReachableRange requests, the value
     *     alreadyUsedRoads must not be used.
     * @param useTrafficData 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.
     * @param routeType The type of route requested.
     * @param vehicleLoadType 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.
     * @param vehicleEngineType Engine type of the vehicle. When a detailed Consumption Model is specified, it must be
     *     consistent with the value of **vehicleEngineType**.
     * @param constantSpeedConsumptionInLitersPerHundredKm Specifies the speed-dependent component of consumption.
     *     <p>Provided as an unordered list of colon-delimited speed &amp; consumption-rate pairs. The list defines
     *     points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
     *     <p>* by linear interpolation, if the given speed lies in between two speeds in the list
     *     <p>* by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest
     *     two points in the list
     *     <p>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.
     *     <p>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.
     *     <p>Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative
     *     consumption rate for any smaller speed.
     *     <p>The valid range for the consumption values(expressed in l/100km) is between 0.01 and 100000.0.
     *     <p>Sensible Values : 50,6.3:130,11.5
     *     <p>**Note** : This parameter is required for **The Combustion Consumption Model**.
     * @param currentFuelInLiters Specifies the current supply of fuel in liters.
     *     <p>Sensible Values : 55.
     * @param auxiliaryPowerInLitersPerHour Specifies the amount of fuel consumed for sustaining auxiliary systems of
     *     the vehicle, in liters per hour.
     *     <p>It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
     *     <p>Sensible Values : 0.2.
     * @param fuelEnergyDensityInMegajoulesPerLiter 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.
     *     <p>This parameter is required if any ***Efficiency** parameter is set.
     *     <p>Sensible Values : 34.2.
     * @param accelerationEfficiency 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**.
     *     <p>Must be paired with **decelerationEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**decelerationEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.33, for **Electric Model** : 0.66.
     * @param decelerationEfficiency 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**.
     *     <p>Must be paired with **accelerationEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**accelerationEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.83, for **Electric Model** : 0.91.
     * @param uphillEfficiency 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**.
     *     <p>Must be paired with **downhillEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**downhillEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.27, for **Electric Model** : 0.74.
     * @param downhillEfficiency 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**.
     *     <p>Must be paired with **uphillEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**uphillEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.51, for **Electric Model** : 0.73.
     * @param constantSpeedConsumptionInKwHPerHundredKm Specifies the speed-dependent component of consumption.
     *     <p>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:
     *     <p>* by linear interpolation, if the given speed lies in between two speeds in the list
     *     <p>* by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest
     *     two points in the list
     *     <p>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.
     *     <p>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.
     *     <p>Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative
     *     consumption rate for any smaller speed.
     *     <p>The valid range for the consumption values(expressed in kWh/100km) is between 0.01 and 100000.0.
     *     <p>Sensible Values : 50,8.2:130,21.3
     *     <p>This parameter is required for **Electric consumption model**.
     * @param currentChargeInKwH Specifies the current electric energy supply in kilowatt hours (kWh).
     *     <p>This parameter co-exists with **maxChargeInkWh** parameter.
     *     <p>The range of values allowed are 0.0 to **maxChargeInkWh**.
     *     <p>Sensible Values : 43.
     * @param maxChargeInKwH Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in
     *     the vehicle's battery.
     *     <p>This parameter co-exists with **currentChargeInkWh** parameter.
     *     <p>Minimum value has to be greater than or equal to **currentChargeInkWh**.
     *     <p>Sensible Values : 85.
     * @param auxiliaryPowerInKw Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts
     *     (kW).
     *     <p>It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
     *     <p>Sensible Values : 1.7.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @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<Response<RouteDirections>> getRouteDirectionsWithResponseAsync(
            ResponseFormat format,
            String routePoints,
            Integer maxAlternatives,
            AlternativeRouteType alternativeType,
            Integer minDeviationDistance,
            OffsetDateTime arriveAt,
            OffsetDateTime departAt,
            Integer minDeviationTime,
            RouteInstructionsType instructionsType,
            String language,
            Boolean computeBestWaypointOrder,
            RouteRepresentationForBestOrder routeRepresentationForBestOrder,
            ComputeTravelTime computeTravelTime,
            Integer vehicleHeading,
            Report report,
            SectionType filterSectionType,
            Integer vehicleAxleWeight,
            Double vehicleWidth,
            Double vehicleHeight,
            Double vehicleLength,
            Integer vehicleMaxSpeed,
            Integer vehicleWeight,
            Boolean isCommercialVehicle,
            WindingnessLevel windingness,
            InclineLevel inclineLevel,
            TravelMode travelMode,
            List<RouteAvoidType> avoid,
            Boolean useTrafficData,
            RouteType routeType,
            VehicleLoadType vehicleLoadType,
            VehicleEngineType vehicleEngineType,
            String constantSpeedConsumptionInLitersPerHundredKm,
            Double currentFuelInLiters,
            Double auxiliaryPowerInLitersPerHour,
            Double fuelEnergyDensityInMegajoulesPerLiter,
            Double accelerationEfficiency,
            Double decelerationEfficiency,
            Double uphillEfficiency,
            Double downhillEfficiency,
            String constantSpeedConsumptionInKwHPerHundredKm,
            Double currentChargeInKwH,
            Double maxChargeInKwH,
            Double auxiliaryPowerInKw,
            Context context) {
        final String accept = "application/json";
        List<String> avoidConverted =
                (avoid == null)
                        ? new ArrayList<>()
                        : avoid.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList());
        return service.getRouteDirections(
                this.client.getHost(),
                this.client.getClientId(),
                this.client.getApiVersion(),
                format,
                routePoints,
                maxAlternatives,
                alternativeType,
                minDeviationDistance,
                arriveAt,
                departAt,
                minDeviationTime,
                instructionsType,
                language,
                computeBestWaypointOrder,
                routeRepresentationForBestOrder,
                computeTravelTime,
                vehicleHeading,
                report,
                filterSectionType,
                vehicleAxleWeight,
                vehicleWidth,
                vehicleHeight,
                vehicleLength,
                vehicleMaxSpeed,
                vehicleWeight,
                isCommercialVehicle,
                windingness,
                inclineLevel,
                travelMode,
                avoidConverted,
                useTrafficData,
                routeType,
                vehicleLoadType,
                vehicleEngineType,
                constantSpeedConsumptionInLitersPerHundredKm,
                currentFuelInLiters,
                auxiliaryPowerInLitersPerHour,
                fuelEnergyDensityInMegajoulesPerLiter,
                accelerationEfficiency,
                decelerationEfficiency,
                uphillEfficiency,
                downhillEfficiency,
                constantSpeedConsumptionInKwHPerHundredKm,
                currentChargeInKwH,
                maxChargeInKwH,
                auxiliaryPowerInKw,
                accept,
                context);
    }

    /**
     * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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.
     *
     * <p>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.
     *
     * <p>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.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param routePoints 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.
     * @param maxAlternatives Number of desired alternative routes to be calculated. Default: 0, minimum: 0 and maximum:
     *     5.
     * @param alternativeType Controls the optimality, with respect to the given planning criteria, of the calculated
     *     alternatives compared to the reference route.
     * @param minDeviationDistance 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.
     * @param arriveAt 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.
     * @param departAt 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).
     * @param minDeviationTime 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.
     * @param instructionsType If specified, guidance instructions will be returned. Note that the instructionsType
     *     parameter cannot be used in conjunction with routeRepresentation=none.
     * @param language 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).
     *     <p>Default value: en-GB.
     * @param computeBestWaypointOrder 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_.
     * @param routeRepresentationForBestOrder Specifies the representation of the set of routes provided as response.
     *     This parameter value can only be used in conjunction with computeBestOrder=true.
     * @param computeTravelTime 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.
     * @param vehicleHeading 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.
     * @param report 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.
     * @param filterSectionType Specifies which of the section types is reported in the route response.
     *     &lt;br&gt;&lt;br&gt;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.
     * @param vehicleAxleWeight Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per
     *     axle are not considered.
     * @param vehicleWidth Width of the vehicle in meters. A value of 0 means that width restrictions are not
     *     considered.
     * @param vehicleHeight Height of the vehicle in meters. A value of 0 means that height restrictions are not
     *     considered.
     * @param vehicleLength Length of the vehicle in meters. A value of 0 means that length restrictions are not
     *     considered.
     * @param vehicleMaxSpeed 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.
     *     <p>* A value of 0 means that an appropriate value for the vehicle will be determined and applied during route
     *     planning.
     *     <p>* 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.
     * @param vehicleWeight Weight of the vehicle in kilograms.
     *     <p>* It is mandatory if any of the *Efficiency parameters are set.
     *     <p>* It must be strictly positive when used in the context of the Consumption Model. Weight restrictions are
     *     considered.
     *     <p>* If no detailed **Consumption Model** is specified and the value of **vehicleWeight** is non-zero, then
     *     weight restrictions are considered.
     *     <p>* In all other cases, this parameter is ignored.
     *     <p>Sensible Values : for **Combustion Model** : 1600, for **Electric Model** : 1900.
     * @param isCommercialVehicle Whether the vehicle is used for commercial purposes. Commercial vehicles may not be
     *     allowed to drive on some roads.
     * @param windingness Level of turns for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param inclineLevel Degree of hilliness for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param travelMode 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.
     * @param avoid Specifies something that the route calculation should try to avoid when determining the route. Can
     *     be specified multiple times in one request, for example,
     *     '&amp;avoid=motorways&amp;avoid=tollRoads&amp;avoid=ferries'. In calculateReachableRange requests, the value
     *     alreadyUsedRoads must not be used.
     * @param useTrafficData 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.
     * @param routeType The type of route requested.
     * @param vehicleLoadType 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.
     * @param vehicleEngineType Engine type of the vehicle. When a detailed Consumption Model is specified, it must be
     *     consistent with the value of **vehicleEngineType**.
     * @param constantSpeedConsumptionInLitersPerHundredKm Specifies the speed-dependent component of consumption.
     *     <p>Provided as an unordered list of colon-delimited speed &amp; consumption-rate pairs. The list defines
     *     points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
     *     <p>* by linear interpolation, if the given speed lies in between two speeds in the list
     *     <p>* by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest
     *     two points in the list
     *     <p>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.
     *     <p>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.
     *     <p>Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative
     *     consumption rate for any smaller speed.
     *     <p>The valid range for the consumption values(expressed in l/100km) is between 0.01 and 100000.0.
     *     <p>Sensible Values : 50,6.3:130,11.5
     *     <p>**Note** : This parameter is required for **The Combustion Consumption Model**.
     * @param currentFuelInLiters Specifies the current supply of fuel in liters.
     *     <p>Sensible Values : 55.
     * @param auxiliaryPowerInLitersPerHour Specifies the amount of fuel consumed for sustaining auxiliary systems of
     *     the vehicle, in liters per hour.
     *     <p>It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
     *     <p>Sensible Values : 0.2.
     * @param fuelEnergyDensityInMegajoulesPerLiter 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.
     *     <p>This parameter is required if any ***Efficiency** parameter is set.
     *     <p>Sensible Values : 34.2.
     * @param accelerationEfficiency 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**.
     *     <p>Must be paired with **decelerationEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**decelerationEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.33, for **Electric Model** : 0.66.
     * @param decelerationEfficiency 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**.
     *     <p>Must be paired with **accelerationEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**accelerationEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.83, for **Electric Model** : 0.91.
     * @param uphillEfficiency 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**.
     *     <p>Must be paired with **downhillEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**downhillEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.27, for **Electric Model** : 0.74.
     * @param downhillEfficiency 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**.
     *     <p>Must be paired with **uphillEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**uphillEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.51, for **Electric Model** : 0.73.
     * @param constantSpeedConsumptionInKwHPerHundredKm Specifies the speed-dependent component of consumption.
     *     <p>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:
     *     <p>* by linear interpolation, if the given speed lies in between two speeds in the list
     *     <p>* by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest
     *     two points in the list
     *     <p>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.
     *     <p>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.
     *     <p>Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative
     *     consumption rate for any smaller speed.
     *     <p>The valid range for the consumption values(expressed in kWh/100km) is between 0.01 and 100000.0.
     *     <p>Sensible Values : 50,8.2:130,21.3
     *     <p>This parameter is required for **Electric consumption model**.
     * @param currentChargeInKwH Specifies the current electric energy supply in kilowatt hours (kWh).
     *     <p>This parameter co-exists with **maxChargeInkWh** parameter.
     *     <p>The range of values allowed are 0.0 to **maxChargeInkWh**.
     *     <p>Sensible Values : 43.
     * @param maxChargeInKwH Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in
     *     the vehicle's battery.
     *     <p>This parameter co-exists with **currentChargeInkWh** parameter.
     *     <p>Minimum value has to be greater than or equal to **currentChargeInkWh**.
     *     <p>Sensible Values : 85.
     * @param auxiliaryPowerInKw Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts
     *     (kW).
     *     <p>It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
     *     <p>Sensible Values : 1.7.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Route Directions call on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<RouteDirections> getRouteDirectionsAsync(
            ResponseFormat format,
            String routePoints,
            Integer maxAlternatives,
            AlternativeRouteType alternativeType,
            Integer minDeviationDistance,
            OffsetDateTime arriveAt,
            OffsetDateTime departAt,
            Integer minDeviationTime,
            RouteInstructionsType instructionsType,
            String language,
            Boolean computeBestWaypointOrder,
            RouteRepresentationForBestOrder routeRepresentationForBestOrder,
            ComputeTravelTime computeTravelTime,
            Integer vehicleHeading,
            Report report,
            SectionType filterSectionType,
            Integer vehicleAxleWeight,
            Double vehicleWidth,
            Double vehicleHeight,
            Double vehicleLength,
            Integer vehicleMaxSpeed,
            Integer vehicleWeight,
            Boolean isCommercialVehicle,
            WindingnessLevel windingness,
            InclineLevel inclineLevel,
            TravelMode travelMode,
            List<RouteAvoidType> avoid,
            Boolean useTrafficData,
            RouteType routeType,
            VehicleLoadType vehicleLoadType,
            VehicleEngineType vehicleEngineType,
            String constantSpeedConsumptionInLitersPerHundredKm,
            Double currentFuelInLiters,
            Double auxiliaryPowerInLitersPerHour,
            Double fuelEnergyDensityInMegajoulesPerLiter,
            Double accelerationEfficiency,
            Double decelerationEfficiency,
            Double uphillEfficiency,
            Double downhillEfficiency,
            String constantSpeedConsumptionInKwHPerHundredKm,
            Double currentChargeInKwH,
            Double maxChargeInKwH,
            Double auxiliaryPowerInKw) {
        return getRouteDirectionsWithResponseAsync(
                        format,
                        routePoints,
                        maxAlternatives,
                        alternativeType,
                        minDeviationDistance,
                        arriveAt,
                        departAt,
                        minDeviationTime,
                        instructionsType,
                        language,
                        computeBestWaypointOrder,
                        routeRepresentationForBestOrder,
                        computeTravelTime,
                        vehicleHeading,
                        report,
                        filterSectionType,
                        vehicleAxleWeight,
                        vehicleWidth,
                        vehicleHeight,
                        vehicleLength,
                        vehicleMaxSpeed,
                        vehicleWeight,
                        isCommercialVehicle,
                        windingness,
                        inclineLevel,
                        travelMode,
                        avoid,
                        useTrafficData,
                        routeType,
                        vehicleLoadType,
                        vehicleEngineType,
                        constantSpeedConsumptionInLitersPerHundredKm,
                        currentFuelInLiters,
                        auxiliaryPowerInLitersPerHour,
                        fuelEnergyDensityInMegajoulesPerLiter,
                        accelerationEfficiency,
                        decelerationEfficiency,
                        uphillEfficiency,
                        downhillEfficiency,
                        constantSpeedConsumptionInKwHPerHundredKm,
                        currentChargeInKwH,
                        maxChargeInKwH,
                        auxiliaryPowerInKw)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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.
     *
     * <p>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.
     *
     * <p>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.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param routePoints 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.
     * @param maxAlternatives Number of desired alternative routes to be calculated. Default: 0, minimum: 0 and maximum:
     *     5.
     * @param alternativeType Controls the optimality, with respect to the given planning criteria, of the calculated
     *     alternatives compared to the reference route.
     * @param minDeviationDistance 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.
     * @param arriveAt 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.
     * @param departAt 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).
     * @param minDeviationTime 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.
     * @param instructionsType If specified, guidance instructions will be returned. Note that the instructionsType
     *     parameter cannot be used in conjunction with routeRepresentation=none.
     * @param language 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).
     *     <p>Default value: en-GB.
     * @param computeBestWaypointOrder 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_.
     * @param routeRepresentationForBestOrder Specifies the representation of the set of routes provided as response.
     *     This parameter value can only be used in conjunction with computeBestOrder=true.
     * @param computeTravelTime 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.
     * @param vehicleHeading 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.
     * @param report 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.
     * @param filterSectionType Specifies which of the section types is reported in the route response.
     *     &lt;br&gt;&lt;br&gt;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.
     * @param vehicleAxleWeight Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per
     *     axle are not considered.
     * @param vehicleWidth Width of the vehicle in meters. A value of 0 means that width restrictions are not
     *     considered.
     * @param vehicleHeight Height of the vehicle in meters. A value of 0 means that height restrictions are not
     *     considered.
     * @param vehicleLength Length of the vehicle in meters. A value of 0 means that length restrictions are not
     *     considered.
     * @param vehicleMaxSpeed 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.
     *     <p>* A value of 0 means that an appropriate value for the vehicle will be determined and applied during route
     *     planning.
     *     <p>* 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.
     * @param vehicleWeight Weight of the vehicle in kilograms.
     *     <p>* It is mandatory if any of the *Efficiency parameters are set.
     *     <p>* It must be strictly positive when used in the context of the Consumption Model. Weight restrictions are
     *     considered.
     *     <p>* If no detailed **Consumption Model** is specified and the value of **vehicleWeight** is non-zero, then
     *     weight restrictions are considered.
     *     <p>* In all other cases, this parameter is ignored.
     *     <p>Sensible Values : for **Combustion Model** : 1600, for **Electric Model** : 1900.
     * @param isCommercialVehicle Whether the vehicle is used for commercial purposes. Commercial vehicles may not be
     *     allowed to drive on some roads.
     * @param windingness Level of turns for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param inclineLevel Degree of hilliness for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param travelMode 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.
     * @param avoid Specifies something that the route calculation should try to avoid when determining the route. Can
     *     be specified multiple times in one request, for example,
     *     '&amp;avoid=motorways&amp;avoid=tollRoads&amp;avoid=ferries'. In calculateReachableRange requests, the value
     *     alreadyUsedRoads must not be used.
     * @param useTrafficData 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.
     * @param routeType The type of route requested.
     * @param vehicleLoadType 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.
     * @param vehicleEngineType Engine type of the vehicle. When a detailed Consumption Model is specified, it must be
     *     consistent with the value of **vehicleEngineType**.
     * @param constantSpeedConsumptionInLitersPerHundredKm Specifies the speed-dependent component of consumption.
     *     <p>Provided as an unordered list of colon-delimited speed &amp; consumption-rate pairs. The list defines
     *     points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
     *     <p>* by linear interpolation, if the given speed lies in between two speeds in the list
     *     <p>* by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest
     *     two points in the list
     *     <p>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.
     *     <p>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.
     *     <p>Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative
     *     consumption rate for any smaller speed.
     *     <p>The valid range for the consumption values(expressed in l/100km) is between 0.01 and 100000.0.
     *     <p>Sensible Values : 50,6.3:130,11.5
     *     <p>**Note** : This parameter is required for **The Combustion Consumption Model**.
     * @param currentFuelInLiters Specifies the current supply of fuel in liters.
     *     <p>Sensible Values : 55.
     * @param auxiliaryPowerInLitersPerHour Specifies the amount of fuel consumed for sustaining auxiliary systems of
     *     the vehicle, in liters per hour.
     *     <p>It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
     *     <p>Sensible Values : 0.2.
     * @param fuelEnergyDensityInMegajoulesPerLiter 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.
     *     <p>This parameter is required if any ***Efficiency** parameter is set.
     *     <p>Sensible Values : 34.2.
     * @param accelerationEfficiency 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**.
     *     <p>Must be paired with **decelerationEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**decelerationEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.33, for **Electric Model** : 0.66.
     * @param decelerationEfficiency 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**.
     *     <p>Must be paired with **accelerationEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**accelerationEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.83, for **Electric Model** : 0.91.
     * @param uphillEfficiency 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**.
     *     <p>Must be paired with **downhillEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**downhillEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.27, for **Electric Model** : 0.74.
     * @param downhillEfficiency 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**.
     *     <p>Must be paired with **uphillEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**uphillEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.51, for **Electric Model** : 0.73.
     * @param constantSpeedConsumptionInKwHPerHundredKm Specifies the speed-dependent component of consumption.
     *     <p>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:
     *     <p>* by linear interpolation, if the given speed lies in between two speeds in the list
     *     <p>* by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest
     *     two points in the list
     *     <p>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.
     *     <p>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.
     *     <p>Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative
     *     consumption rate for any smaller speed.
     *     <p>The valid range for the consumption values(expressed in kWh/100km) is between 0.01 and 100000.0.
     *     <p>Sensible Values : 50,8.2:130,21.3
     *     <p>This parameter is required for **Electric consumption model**.
     * @param currentChargeInKwH Specifies the current electric energy supply in kilowatt hours (kWh).
     *     <p>This parameter co-exists with **maxChargeInkWh** parameter.
     *     <p>The range of values allowed are 0.0 to **maxChargeInkWh**.
     *     <p>Sensible Values : 43.
     * @param maxChargeInKwH Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in
     *     the vehicle's battery.
     *     <p>This parameter co-exists with **currentChargeInkWh** parameter.
     *     <p>Minimum value has to be greater than or equal to **currentChargeInkWh**.
     *     <p>Sensible Values : 85.
     * @param auxiliaryPowerInKw Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts
     *     (kW).
     *     <p>It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
     *     <p>Sensible Values : 1.7.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Route Directions call on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<RouteDirections> getRouteDirectionsAsync(
            ResponseFormat format,
            String routePoints,
            Integer maxAlternatives,
            AlternativeRouteType alternativeType,
            Integer minDeviationDistance,
            OffsetDateTime arriveAt,
            OffsetDateTime departAt,
            Integer minDeviationTime,
            RouteInstructionsType instructionsType,
            String language,
            Boolean computeBestWaypointOrder,
            RouteRepresentationForBestOrder routeRepresentationForBestOrder,
            ComputeTravelTime computeTravelTime,
            Integer vehicleHeading,
            Report report,
            SectionType filterSectionType,
            Integer vehicleAxleWeight,
            Double vehicleWidth,
            Double vehicleHeight,
            Double vehicleLength,
            Integer vehicleMaxSpeed,
            Integer vehicleWeight,
            Boolean isCommercialVehicle,
            WindingnessLevel windingness,
            InclineLevel inclineLevel,
            TravelMode travelMode,
            List<RouteAvoidType> avoid,
            Boolean useTrafficData,
            RouteType routeType,
            VehicleLoadType vehicleLoadType,
            VehicleEngineType vehicleEngineType,
            String constantSpeedConsumptionInLitersPerHundredKm,
            Double currentFuelInLiters,
            Double auxiliaryPowerInLitersPerHour,
            Double fuelEnergyDensityInMegajoulesPerLiter,
            Double accelerationEfficiency,
            Double decelerationEfficiency,
            Double uphillEfficiency,
            Double downhillEfficiency,
            String constantSpeedConsumptionInKwHPerHundredKm,
            Double currentChargeInKwH,
            Double maxChargeInKwH,
            Double auxiliaryPowerInKw,
            Context context) {
        return getRouteDirectionsWithResponseAsync(
                        format,
                        routePoints,
                        maxAlternatives,
                        alternativeType,
                        minDeviationDistance,
                        arriveAt,
                        departAt,
                        minDeviationTime,
                        instructionsType,
                        language,
                        computeBestWaypointOrder,
                        routeRepresentationForBestOrder,
                        computeTravelTime,
                        vehicleHeading,
                        report,
                        filterSectionType,
                        vehicleAxleWeight,
                        vehicleWidth,
                        vehicleHeight,
                        vehicleLength,
                        vehicleMaxSpeed,
                        vehicleWeight,
                        isCommercialVehicle,
                        windingness,
                        inclineLevel,
                        travelMode,
                        avoid,
                        useTrafficData,
                        routeType,
                        vehicleLoadType,
                        vehicleEngineType,
                        constantSpeedConsumptionInLitersPerHundredKm,
                        currentFuelInLiters,
                        auxiliaryPowerInLitersPerHour,
                        fuelEnergyDensityInMegajoulesPerLiter,
                        accelerationEfficiency,
                        decelerationEfficiency,
                        uphillEfficiency,
                        downhillEfficiency,
                        constantSpeedConsumptionInKwHPerHundredKm,
                        currentChargeInKwH,
                        maxChargeInKwH,
                        auxiliaryPowerInKw,
                        context)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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.
     *
     * <p>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.
     *
     * <p>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.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param routePoints 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.
     * @param maxAlternatives Number of desired alternative routes to be calculated. Default: 0, minimum: 0 and maximum:
     *     5.
     * @param alternativeType Controls the optimality, with respect to the given planning criteria, of the calculated
     *     alternatives compared to the reference route.
     * @param minDeviationDistance 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.
     * @param arriveAt 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.
     * @param departAt 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).
     * @param minDeviationTime 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.
     * @param instructionsType If specified, guidance instructions will be returned. Note that the instructionsType
     *     parameter cannot be used in conjunction with routeRepresentation=none.
     * @param language 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).
     *     <p>Default value: en-GB.
     * @param computeBestWaypointOrder 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_.
     * @param routeRepresentationForBestOrder Specifies the representation of the set of routes provided as response.
     *     This parameter value can only be used in conjunction with computeBestOrder=true.
     * @param computeTravelTime 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.
     * @param vehicleHeading 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.
     * @param report 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.
     * @param filterSectionType Specifies which of the section types is reported in the route response.
     *     &lt;br&gt;&lt;br&gt;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.
     * @param vehicleAxleWeight Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per
     *     axle are not considered.
     * @param vehicleWidth Width of the vehicle in meters. A value of 0 means that width restrictions are not
     *     considered.
     * @param vehicleHeight Height of the vehicle in meters. A value of 0 means that height restrictions are not
     *     considered.
     * @param vehicleLength Length of the vehicle in meters. A value of 0 means that length restrictions are not
     *     considered.
     * @param vehicleMaxSpeed 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.
     *     <p>* A value of 0 means that an appropriate value for the vehicle will be determined and applied during route
     *     planning.
     *     <p>* 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.
     * @param vehicleWeight Weight of the vehicle in kilograms.
     *     <p>* It is mandatory if any of the *Efficiency parameters are set.
     *     <p>* It must be strictly positive when used in the context of the Consumption Model. Weight restrictions are
     *     considered.
     *     <p>* If no detailed **Consumption Model** is specified and the value of **vehicleWeight** is non-zero, then
     *     weight restrictions are considered.
     *     <p>* In all other cases, this parameter is ignored.
     *     <p>Sensible Values : for **Combustion Model** : 1600, for **Electric Model** : 1900.
     * @param isCommercialVehicle Whether the vehicle is used for commercial purposes. Commercial vehicles may not be
     *     allowed to drive on some roads.
     * @param windingness Level of turns for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param inclineLevel Degree of hilliness for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param travelMode 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.
     * @param avoid Specifies something that the route calculation should try to avoid when determining the route. Can
     *     be specified multiple times in one request, for example,
     *     '&amp;avoid=motorways&amp;avoid=tollRoads&amp;avoid=ferries'. In calculateReachableRange requests, the value
     *     alreadyUsedRoads must not be used.
     * @param useTrafficData 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.
     * @param routeType The type of route requested.
     * @param vehicleLoadType 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.
     * @param vehicleEngineType Engine type of the vehicle. When a detailed Consumption Model is specified, it must be
     *     consistent with the value of **vehicleEngineType**.
     * @param constantSpeedConsumptionInLitersPerHundredKm Specifies the speed-dependent component of consumption.
     *     <p>Provided as an unordered list of colon-delimited speed &amp; consumption-rate pairs. The list defines
     *     points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
     *     <p>* by linear interpolation, if the given speed lies in between two speeds in the list
     *     <p>* by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest
     *     two points in the list
     *     <p>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.
     *     <p>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.
     *     <p>Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative
     *     consumption rate for any smaller speed.
     *     <p>The valid range for the consumption values(expressed in l/100km) is between 0.01 and 100000.0.
     *     <p>Sensible Values : 50,6.3:130,11.5
     *     <p>**Note** : This parameter is required for **The Combustion Consumption Model**.
     * @param currentFuelInLiters Specifies the current supply of fuel in liters.
     *     <p>Sensible Values : 55.
     * @param auxiliaryPowerInLitersPerHour Specifies the amount of fuel consumed for sustaining auxiliary systems of
     *     the vehicle, in liters per hour.
     *     <p>It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
     *     <p>Sensible Values : 0.2.
     * @param fuelEnergyDensityInMegajoulesPerLiter 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.
     *     <p>This parameter is required if any ***Efficiency** parameter is set.
     *     <p>Sensible Values : 34.2.
     * @param accelerationEfficiency 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**.
     *     <p>Must be paired with **decelerationEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**decelerationEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.33, for **Electric Model** : 0.66.
     * @param decelerationEfficiency 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**.
     *     <p>Must be paired with **accelerationEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**accelerationEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.83, for **Electric Model** : 0.91.
     * @param uphillEfficiency 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**.
     *     <p>Must be paired with **downhillEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**downhillEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.27, for **Electric Model** : 0.74.
     * @param downhillEfficiency 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**.
     *     <p>Must be paired with **uphillEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**uphillEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.51, for **Electric Model** : 0.73.
     * @param constantSpeedConsumptionInKwHPerHundredKm Specifies the speed-dependent component of consumption.
     *     <p>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:
     *     <p>* by linear interpolation, if the given speed lies in between two speeds in the list
     *     <p>* by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest
     *     two points in the list
     *     <p>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.
     *     <p>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.
     *     <p>Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative
     *     consumption rate for any smaller speed.
     *     <p>The valid range for the consumption values(expressed in kWh/100km) is between 0.01 and 100000.0.
     *     <p>Sensible Values : 50,8.2:130,21.3
     *     <p>This parameter is required for **Electric consumption model**.
     * @param currentChargeInKwH Specifies the current electric energy supply in kilowatt hours (kWh).
     *     <p>This parameter co-exists with **maxChargeInkWh** parameter.
     *     <p>The range of values allowed are 0.0 to **maxChargeInkWh**.
     *     <p>Sensible Values : 43.
     * @param maxChargeInKwH Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in
     *     the vehicle's battery.
     *     <p>This parameter co-exists with **currentChargeInkWh** parameter.
     *     <p>Minimum value has to be greater than or equal to **currentChargeInkWh**.
     *     <p>Sensible Values : 85.
     * @param auxiliaryPowerInKw Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts
     *     (kW).
     *     <p>It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
     *     <p>Sensible Values : 1.7.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Route Directions call.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public RouteDirections getRouteDirections(
            ResponseFormat format,
            String routePoints,
            Integer maxAlternatives,
            AlternativeRouteType alternativeType,
            Integer minDeviationDistance,
            OffsetDateTime arriveAt,
            OffsetDateTime departAt,
            Integer minDeviationTime,
            RouteInstructionsType instructionsType,
            String language,
            Boolean computeBestWaypointOrder,
            RouteRepresentationForBestOrder routeRepresentationForBestOrder,
            ComputeTravelTime computeTravelTime,
            Integer vehicleHeading,
            Report report,
            SectionType filterSectionType,
            Integer vehicleAxleWeight,
            Double vehicleWidth,
            Double vehicleHeight,
            Double vehicleLength,
            Integer vehicleMaxSpeed,
            Integer vehicleWeight,
            Boolean isCommercialVehicle,
            WindingnessLevel windingness,
            InclineLevel inclineLevel,
            TravelMode travelMode,
            List<RouteAvoidType> avoid,
            Boolean useTrafficData,
            RouteType routeType,
            VehicleLoadType vehicleLoadType,
            VehicleEngineType vehicleEngineType,
            String constantSpeedConsumptionInLitersPerHundredKm,
            Double currentFuelInLiters,
            Double auxiliaryPowerInLitersPerHour,
            Double fuelEnergyDensityInMegajoulesPerLiter,
            Double accelerationEfficiency,
            Double decelerationEfficiency,
            Double uphillEfficiency,
            Double downhillEfficiency,
            String constantSpeedConsumptionInKwHPerHundredKm,
            Double currentChargeInKwH,
            Double maxChargeInKwH,
            Double auxiliaryPowerInKw) {
        return getRouteDirectionsAsync(
                        format,
                        routePoints,
                        maxAlternatives,
                        alternativeType,
                        minDeviationDistance,
                        arriveAt,
                        departAt,
                        minDeviationTime,
                        instructionsType,
                        language,
                        computeBestWaypointOrder,
                        routeRepresentationForBestOrder,
                        computeTravelTime,
                        vehicleHeading,
                        report,
                        filterSectionType,
                        vehicleAxleWeight,
                        vehicleWidth,
                        vehicleHeight,
                        vehicleLength,
                        vehicleMaxSpeed,
                        vehicleWeight,
                        isCommercialVehicle,
                        windingness,
                        inclineLevel,
                        travelMode,
                        avoid,
                        useTrafficData,
                        routeType,
                        vehicleLoadType,
                        vehicleEngineType,
                        constantSpeedConsumptionInLitersPerHundredKm,
                        currentFuelInLiters,
                        auxiliaryPowerInLitersPerHour,
                        fuelEnergyDensityInMegajoulesPerLiter,
                        accelerationEfficiency,
                        decelerationEfficiency,
                        uphillEfficiency,
                        downhillEfficiency,
                        constantSpeedConsumptionInKwHPerHundredKm,
                        currentChargeInKwH,
                        maxChargeInKwH,
                        auxiliaryPowerInKw)
                .block();
    }

    /**
     * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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.
     *
     * <p>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.
     *
     * <p>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.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param routePoints 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.
     * @param maxAlternatives Number of desired alternative routes to be calculated. Default: 0, minimum: 0 and maximum:
     *     5.
     * @param alternativeType Controls the optimality, with respect to the given planning criteria, of the calculated
     *     alternatives compared to the reference route.
     * @param minDeviationDistance 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.
     * @param arriveAt 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.
     * @param departAt 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).
     * @param minDeviationTime 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.
     * @param instructionsType If specified, guidance instructions will be returned. Note that the instructionsType
     *     parameter cannot be used in conjunction with routeRepresentation=none.
     * @param language 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).
     *     <p>Default value: en-GB.
     * @param computeBestWaypointOrder 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_.
     * @param routeRepresentationForBestOrder Specifies the representation of the set of routes provided as response.
     *     This parameter value can only be used in conjunction with computeBestOrder=true.
     * @param computeTravelTime 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.
     * @param vehicleHeading 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.
     * @param report 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.
     * @param filterSectionType Specifies which of the section types is reported in the route response.
     *     &lt;br&gt;&lt;br&gt;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.
     * @param vehicleAxleWeight Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per
     *     axle are not considered.
     * @param vehicleWidth Width of the vehicle in meters. A value of 0 means that width restrictions are not
     *     considered.
     * @param vehicleHeight Height of the vehicle in meters. A value of 0 means that height restrictions are not
     *     considered.
     * @param vehicleLength Length of the vehicle in meters. A value of 0 means that length restrictions are not
     *     considered.
     * @param vehicleMaxSpeed 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.
     *     <p>* A value of 0 means that an appropriate value for the vehicle will be determined and applied during route
     *     planning.
     *     <p>* 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.
     * @param vehicleWeight Weight of the vehicle in kilograms.
     *     <p>* It is mandatory if any of the *Efficiency parameters are set.
     *     <p>* It must be strictly positive when used in the context of the Consumption Model. Weight restrictions are
     *     considered.
     *     <p>* If no detailed **Consumption Model** is specified and the value of **vehicleWeight** is non-zero, then
     *     weight restrictions are considered.
     *     <p>* In all other cases, this parameter is ignored.
     *     <p>Sensible Values : for **Combustion Model** : 1600, for **Electric Model** : 1900.
     * @param isCommercialVehicle Whether the vehicle is used for commercial purposes. Commercial vehicles may not be
     *     allowed to drive on some roads.
     * @param windingness Level of turns for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param inclineLevel Degree of hilliness for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param travelMode 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.
     * @param avoid Specifies something that the route calculation should try to avoid when determining the route. Can
     *     be specified multiple times in one request, for example,
     *     '&amp;avoid=motorways&amp;avoid=tollRoads&amp;avoid=ferries'. In calculateReachableRange requests, the value
     *     alreadyUsedRoads must not be used.
     * @param useTrafficData 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.
     * @param routeType The type of route requested.
     * @param vehicleLoadType 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.
     * @param vehicleEngineType Engine type of the vehicle. When a detailed Consumption Model is specified, it must be
     *     consistent with the value of **vehicleEngineType**.
     * @param constantSpeedConsumptionInLitersPerHundredKm Specifies the speed-dependent component of consumption.
     *     <p>Provided as an unordered list of colon-delimited speed &amp; consumption-rate pairs. The list defines
     *     points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
     *     <p>* by linear interpolation, if the given speed lies in between two speeds in the list
     *     <p>* by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest
     *     two points in the list
     *     <p>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.
     *     <p>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.
     *     <p>Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative
     *     consumption rate for any smaller speed.
     *     <p>The valid range for the consumption values(expressed in l/100km) is between 0.01 and 100000.0.
     *     <p>Sensible Values : 50,6.3:130,11.5
     *     <p>**Note** : This parameter is required for **The Combustion Consumption Model**.
     * @param currentFuelInLiters Specifies the current supply of fuel in liters.
     *     <p>Sensible Values : 55.
     * @param auxiliaryPowerInLitersPerHour Specifies the amount of fuel consumed for sustaining auxiliary systems of
     *     the vehicle, in liters per hour.
     *     <p>It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
     *     <p>Sensible Values : 0.2.
     * @param fuelEnergyDensityInMegajoulesPerLiter 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.
     *     <p>This parameter is required if any ***Efficiency** parameter is set.
     *     <p>Sensible Values : 34.2.
     * @param accelerationEfficiency 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**.
     *     <p>Must be paired with **decelerationEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**decelerationEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.33, for **Electric Model** : 0.66.
     * @param decelerationEfficiency 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**.
     *     <p>Must be paired with **accelerationEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**accelerationEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.83, for **Electric Model** : 0.91.
     * @param uphillEfficiency 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**.
     *     <p>Must be paired with **downhillEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**downhillEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.27, for **Electric Model** : 0.74.
     * @param downhillEfficiency 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**.
     *     <p>Must be paired with **uphillEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**uphillEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.51, for **Electric Model** : 0.73.
     * @param constantSpeedConsumptionInKwHPerHundredKm Specifies the speed-dependent component of consumption.
     *     <p>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:
     *     <p>* by linear interpolation, if the given speed lies in between two speeds in the list
     *     <p>* by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest
     *     two points in the list
     *     <p>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.
     *     <p>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.
     *     <p>Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative
     *     consumption rate for any smaller speed.
     *     <p>The valid range for the consumption values(expressed in kWh/100km) is between 0.01 and 100000.0.
     *     <p>Sensible Values : 50,8.2:130,21.3
     *     <p>This parameter is required for **Electric consumption model**.
     * @param currentChargeInKwH Specifies the current electric energy supply in kilowatt hours (kWh).
     *     <p>This parameter co-exists with **maxChargeInkWh** parameter.
     *     <p>The range of values allowed are 0.0 to **maxChargeInkWh**.
     *     <p>Sensible Values : 43.
     * @param maxChargeInKwH Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in
     *     the vehicle's battery.
     *     <p>This parameter co-exists with **currentChargeInkWh** parameter.
     *     <p>Minimum value has to be greater than or equal to **currentChargeInkWh**.
     *     <p>Sensible Values : 85.
     * @param auxiliaryPowerInKw Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts
     *     (kW).
     *     <p>It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
     *     <p>Sensible Values : 1.7.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Route Directions call along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<RouteDirections> getRouteDirectionsWithResponse(
            ResponseFormat format,
            String routePoints,
            Integer maxAlternatives,
            AlternativeRouteType alternativeType,
            Integer minDeviationDistance,
            OffsetDateTime arriveAt,
            OffsetDateTime departAt,
            Integer minDeviationTime,
            RouteInstructionsType instructionsType,
            String language,
            Boolean computeBestWaypointOrder,
            RouteRepresentationForBestOrder routeRepresentationForBestOrder,
            ComputeTravelTime computeTravelTime,
            Integer vehicleHeading,
            Report report,
            SectionType filterSectionType,
            Integer vehicleAxleWeight,
            Double vehicleWidth,
            Double vehicleHeight,
            Double vehicleLength,
            Integer vehicleMaxSpeed,
            Integer vehicleWeight,
            Boolean isCommercialVehicle,
            WindingnessLevel windingness,
            InclineLevel inclineLevel,
            TravelMode travelMode,
            List<RouteAvoidType> avoid,
            Boolean useTrafficData,
            RouteType routeType,
            VehicleLoadType vehicleLoadType,
            VehicleEngineType vehicleEngineType,
            String constantSpeedConsumptionInLitersPerHundredKm,
            Double currentFuelInLiters,
            Double auxiliaryPowerInLitersPerHour,
            Double fuelEnergyDensityInMegajoulesPerLiter,
            Double accelerationEfficiency,
            Double decelerationEfficiency,
            Double uphillEfficiency,
            Double downhillEfficiency,
            String constantSpeedConsumptionInKwHPerHundredKm,
            Double currentChargeInKwH,
            Double maxChargeInKwH,
            Double auxiliaryPowerInKw,
            Context context) {
        return getRouteDirectionsWithResponseAsync(
                        format,
                        routePoints,
                        maxAlternatives,
                        alternativeType,
                        minDeviationDistance,
                        arriveAt,
                        departAt,
                        minDeviationTime,
                        instructionsType,
                        language,
                        computeBestWaypointOrder,
                        routeRepresentationForBestOrder,
                        computeTravelTime,
                        vehicleHeading,
                        report,
                        filterSectionType,
                        vehicleAxleWeight,
                        vehicleWidth,
                        vehicleHeight,
                        vehicleLength,
                        vehicleMaxSpeed,
                        vehicleWeight,
                        isCommercialVehicle,
                        windingness,
                        inclineLevel,
                        travelMode,
                        avoid,
                        useTrafficData,
                        routeType,
                        vehicleLoadType,
                        vehicleEngineType,
                        constantSpeedConsumptionInLitersPerHundredKm,
                        currentFuelInLiters,
                        auxiliaryPowerInLitersPerHour,
                        fuelEnergyDensityInMegajoulesPerLiter,
                        accelerationEfficiency,
                        decelerationEfficiency,
                        uphillEfficiency,
                        downhillEfficiency,
                        constantSpeedConsumptionInKwHPerHundredKm,
                        currentChargeInKwH,
                        maxChargeInKwH,
                        auxiliaryPowerInKw,
                        context)
                .block();
    }

    /**
     * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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.
     *
     * <p>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.
     *
     * <p>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.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param routePoints 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.
     * @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.
     *     <p>Setting at least one of minDeviationDistance or minDeviationTime to a value greater than zero has the
     *     following consequences:
     *     <p>* 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 maxAlternatives Number of desired alternative routes to be calculated. Default: 0, minimum: 0 and maximum:
     *     5.
     * @param alternativeType Controls the optimality, with respect to the given planning criteria, of the calculated
     *     alternatives compared to the reference route.
     * @param minDeviationDistance 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.
     * @param minDeviationTime 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.
     * @param instructionsType If specified, guidance instructions will be returned. Note that the instructionsType
     *     parameter cannot be used in conjunction with routeRepresentation=none.
     * @param language 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.
     * @param computeBestWaypointOrder 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_.
     * @param routeRepresentationForBestOrder Specifies the representation of the set of routes provided as response.
     *     This parameter value can only be used in conjunction with computeBestOrder=true.
     * @param computeTravelTime 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.
     * @param vehicleHeading 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.
     * @param report 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.
     * @param filterSectionType Specifies which of the section types is reported in the route response.
     *     &lt;br&gt;&lt;br&gt;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.
     * @param arriveAt 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.
     * @param departAt 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).
     * @param vehicleAxleWeight Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per
     *     axle are not considered.
     * @param vehicleLength Length of the vehicle in meters. A value of 0 means that length restrictions are not
     *     considered.
     * @param vehicleHeight Height of the vehicle in meters. A value of 0 means that height restrictions are not
     *     considered.
     * @param vehicleWidth Width of the vehicle in meters. A value of 0 means that width restrictions are not
     *     considered.
     * @param vehicleMaxSpeed 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.
     *     <p>* A value of 0 means that an appropriate value for the vehicle will be determined and applied during route
     *     planning.
     *     <p>* 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.
     * @param vehicleWeight Weight of the vehicle in kilograms.
     *     <p>* It is mandatory if any of the *Efficiency parameters are set.
     *     <p>* It must be strictly positive when used in the context of the Consumption Model. Weight restrictions are
     *     considered.
     *     <p>* If no detailed **Consumption Model** is specified and the value of **vehicleWeight** is non-zero, then
     *     weight restrictions are considered.
     *     <p>* In all other cases, this parameter is ignored.
     *     <p>Sensible Values : for **Combustion Model** : 1600, for **Electric Model** : 1900.
     * @param isCommercialVehicle Whether the vehicle is used for commercial purposes. Commercial vehicles may not be
     *     allowed to drive on some roads.
     * @param windingness Level of turns for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param inclineLevel Degree of hilliness for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param travelMode 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.
     * @param avoid Specifies something that the route calculation should try to avoid when determining the route. Can
     *     be specified multiple times in one request, for example,
     *     '&amp;avoid=motorways&amp;avoid=tollRoads&amp;avoid=ferries'. In calculateReachableRange requests, the value
     *     alreadyUsedRoads must not be used.
     * @param useTrafficData 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.
     * @param routeType The type of route requested.
     * @param vehicleLoadType 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.
     * @param vehicleEngineType Engine type of the vehicle. When a detailed Consumption Model is specified, it must be
     *     consistent with the value of **vehicleEngineType**.
     * @param constantSpeedConsumptionInLitersPerHundredKm Specifies the speed-dependent component of consumption.
     *     <p>Provided as an unordered list of colon-delimited speed &amp; consumption-rate pairs. The list defines
     *     points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
     *     <p>* by linear interpolation, if the given speed lies in between two speeds in the list
     *     <p>* by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest
     *     two points in the list
     *     <p>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.
     *     <p>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.
     *     <p>Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative
     *     consumption rate for any smaller speed.
     *     <p>The valid range for the consumption values(expressed in l/100km) is between 0.01 and 100000.0.
     *     <p>Sensible Values : 50,6.3:130,11.5
     *     <p>**Note** : This parameter is required for **The Combustion Consumption Model**.
     * @param currentFuelInLiters Specifies the current supply of fuel in liters.
     *     <p>Sensible Values : 55.
     * @param auxiliaryPowerInLitersPerHour Specifies the amount of fuel consumed for sustaining auxiliary systems of
     *     the vehicle, in liters per hour.
     *     <p>It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
     *     <p>Sensible Values : 0.2.
     * @param fuelEnergyDensityInMegajoulesPerLiter 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.
     *     <p>This parameter is required if any ***Efficiency** parameter is set.
     *     <p>Sensible Values : 34.2.
     * @param accelerationEfficiency 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**.
     *     <p>Must be paired with **decelerationEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**decelerationEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.33, for **Electric Model** : 0.66.
     * @param decelerationEfficiency 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**.
     *     <p>Must be paired with **accelerationEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**accelerationEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.83, for **Electric Model** : 0.91.
     * @param uphillEfficiency 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**.
     *     <p>Must be paired with **downhillEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**downhillEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.27, for **Electric Model** : 0.74.
     * @param downhillEfficiency 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**.
     *     <p>Must be paired with **uphillEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**uphillEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.51, for **Electric Model** : 0.73.
     * @param constantSpeedConsumptionInKwHPerHundredKm Specifies the speed-dependent component of consumption.
     *     <p>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:
     *     <p>* by linear interpolation, if the given speed lies in between two speeds in the list
     *     <p>* by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest
     *     two points in the list
     *     <p>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.
     *     <p>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.
     *     <p>Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative
     *     consumption rate for any smaller speed.
     *     <p>The valid range for the consumption values(expressed in kWh/100km) is between 0.01 and 100000.0.
     *     <p>Sensible Values : 50,8.2:130,21.3
     *     <p>This parameter is required for **Electric consumption model**.
     * @param currentChargeInKwH Specifies the current electric energy supply in kilowatt hours (kWh).
     *     <p>This parameter co-exists with **maxChargeInkWh** parameter.
     *     <p>The range of values allowed are 0.0 to **maxChargeInkWh**.
     *     <p>Sensible Values : 43.
     * @param maxChargeInKwH Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in
     *     the vehicle's battery.
     *     <p>This parameter co-exists with **currentChargeInkWh** parameter.
     *     <p>Minimum value has to be greater than or equal to **currentChargeInkWh**.
     *     <p>Sensible Values : 85.
     * @param auxiliaryPowerInKw Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts
     *     (kW).
     *     <p>It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
     *     <p>Sensible Values : 1.7.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @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<Response<RouteDirections>> getRouteDirectionsWithAdditionalParametersWithResponseAsync(
            ResponseFormat format,
            String routePoints,
            RouteDirectionParametersPrivate routeDirectionParameters,
            Integer maxAlternatives,
            AlternativeRouteType alternativeType,
            Integer minDeviationDistance,
            Integer minDeviationTime,
            RouteInstructionsType instructionsType,
            String language,
            Boolean computeBestWaypointOrder,
            RouteRepresentationForBestOrder routeRepresentationForBestOrder,
            ComputeTravelTime computeTravelTime,
            Integer vehicleHeading,
            Report report,
            SectionType filterSectionType,
            OffsetDateTime arriveAt,
            OffsetDateTime departAt,
            Integer vehicleAxleWeight,
            Double vehicleLength,
            Double vehicleHeight,
            Double vehicleWidth,
            Integer vehicleMaxSpeed,
            Integer vehicleWeight,
            Boolean isCommercialVehicle,
            WindingnessLevel windingness,
            InclineLevel inclineLevel,
            TravelMode travelMode,
            List<RouteAvoidType> avoid,
            Boolean useTrafficData,
            RouteType routeType,
            VehicleLoadType vehicleLoadType,
            VehicleEngineType vehicleEngineType,
            String constantSpeedConsumptionInLitersPerHundredKm,
            Double currentFuelInLiters,
            Double auxiliaryPowerInLitersPerHour,
            Double fuelEnergyDensityInMegajoulesPerLiter,
            Double accelerationEfficiency,
            Double decelerationEfficiency,
            Double uphillEfficiency,
            Double downhillEfficiency,
            String constantSpeedConsumptionInKwHPerHundredKm,
            Double currentChargeInKwH,
            Double maxChargeInKwH,
            Double auxiliaryPowerInKw) {
        final String accept = "application/json";
        List<String> avoidConverted =
                (avoid == null)
                        ? new ArrayList<>()
                        : avoid.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList());
        return FluxUtil.withContext(
                context ->
                        service.getRouteDirectionsWithAdditionalParameters(
                                this.client.getHost(),
                                this.client.getClientId(),
                                this.client.getApiVersion(),
                                format,
                                routePoints,
                                maxAlternatives,
                                alternativeType,
                                minDeviationDistance,
                                minDeviationTime,
                                instructionsType,
                                language,
                                computeBestWaypointOrder,
                                routeRepresentationForBestOrder,
                                computeTravelTime,
                                vehicleHeading,
                                report,
                                filterSectionType,
                                arriveAt,
                                departAt,
                                vehicleAxleWeight,
                                vehicleLength,
                                vehicleHeight,
                                vehicleWidth,
                                vehicleMaxSpeed,
                                vehicleWeight,
                                isCommercialVehicle,
                                windingness,
                                inclineLevel,
                                travelMode,
                                avoidConverted,
                                useTrafficData,
                                routeType,
                                vehicleLoadType,
                                vehicleEngineType,
                                constantSpeedConsumptionInLitersPerHundredKm,
                                currentFuelInLiters,
                                auxiliaryPowerInLitersPerHour,
                                fuelEnergyDensityInMegajoulesPerLiter,
                                accelerationEfficiency,
                                decelerationEfficiency,
                                uphillEfficiency,
                                downhillEfficiency,
                                constantSpeedConsumptionInKwHPerHundredKm,
                                currentChargeInKwH,
                                maxChargeInKwH,
                                auxiliaryPowerInKw,
                                routeDirectionParameters,
                                accept,
                                context));
    }

    /**
     * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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.
     *
     * <p>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.
     *
     * <p>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.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param routePoints 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.
     * @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.
     *     <p>Setting at least one of minDeviationDistance or minDeviationTime to a value greater than zero has the
     *     following consequences:
     *     <p>* 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 maxAlternatives Number of desired alternative routes to be calculated. Default: 0, minimum: 0 and maximum:
     *     5.
     * @param alternativeType Controls the optimality, with respect to the given planning criteria, of the calculated
     *     alternatives compared to the reference route.
     * @param minDeviationDistance 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.
     * @param minDeviationTime 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.
     * @param instructionsType If specified, guidance instructions will be returned. Note that the instructionsType
     *     parameter cannot be used in conjunction with routeRepresentation=none.
     * @param language 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.
     * @param computeBestWaypointOrder 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_.
     * @param routeRepresentationForBestOrder Specifies the representation of the set of routes provided as response.
     *     This parameter value can only be used in conjunction with computeBestOrder=true.
     * @param computeTravelTime 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.
     * @param vehicleHeading 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.
     * @param report 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.
     * @param filterSectionType Specifies which of the section types is reported in the route response.
     *     &lt;br&gt;&lt;br&gt;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.
     * @param arriveAt 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.
     * @param departAt 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).
     * @param vehicleAxleWeight Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per
     *     axle are not considered.
     * @param vehicleLength Length of the vehicle in meters. A value of 0 means that length restrictions are not
     *     considered.
     * @param vehicleHeight Height of the vehicle in meters. A value of 0 means that height restrictions are not
     *     considered.
     * @param vehicleWidth Width of the vehicle in meters. A value of 0 means that width restrictions are not
     *     considered.
     * @param vehicleMaxSpeed 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.
     *     <p>* A value of 0 means that an appropriate value for the vehicle will be determined and applied during route
     *     planning.
     *     <p>* 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.
     * @param vehicleWeight Weight of the vehicle in kilograms.
     *     <p>* It is mandatory if any of the *Efficiency parameters are set.
     *     <p>* It must be strictly positive when used in the context of the Consumption Model. Weight restrictions are
     *     considered.
     *     <p>* If no detailed **Consumption Model** is specified and the value of **vehicleWeight** is non-zero, then
     *     weight restrictions are considered.
     *     <p>* In all other cases, this parameter is ignored.
     *     <p>Sensible Values : for **Combustion Model** : 1600, for **Electric Model** : 1900.
     * @param isCommercialVehicle Whether the vehicle is used for commercial purposes. Commercial vehicles may not be
     *     allowed to drive on some roads.
     * @param windingness Level of turns for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param inclineLevel Degree of hilliness for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param travelMode 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.
     * @param avoid Specifies something that the route calculation should try to avoid when determining the route. Can
     *     be specified multiple times in one request, for example,
     *     '&amp;avoid=motorways&amp;avoid=tollRoads&amp;avoid=ferries'. In calculateReachableRange requests, the value
     *     alreadyUsedRoads must not be used.
     * @param useTrafficData 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.
     * @param routeType The type of route requested.
     * @param vehicleLoadType 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.
     * @param vehicleEngineType Engine type of the vehicle. When a detailed Consumption Model is specified, it must be
     *     consistent with the value of **vehicleEngineType**.
     * @param constantSpeedConsumptionInLitersPerHundredKm Specifies the speed-dependent component of consumption.
     *     <p>Provided as an unordered list of colon-delimited speed &amp; consumption-rate pairs. The list defines
     *     points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
     *     <p>* by linear interpolation, if the given speed lies in between two speeds in the list
     *     <p>* by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest
     *     two points in the list
     *     <p>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.
     *     <p>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.
     *     <p>Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative
     *     consumption rate for any smaller speed.
     *     <p>The valid range for the consumption values(expressed in l/100km) is between 0.01 and 100000.0.
     *     <p>Sensible Values : 50,6.3:130,11.5
     *     <p>**Note** : This parameter is required for **The Combustion Consumption Model**.
     * @param currentFuelInLiters Specifies the current supply of fuel in liters.
     *     <p>Sensible Values : 55.
     * @param auxiliaryPowerInLitersPerHour Specifies the amount of fuel consumed for sustaining auxiliary systems of
     *     the vehicle, in liters per hour.
     *     <p>It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
     *     <p>Sensible Values : 0.2.
     * @param fuelEnergyDensityInMegajoulesPerLiter 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.
     *     <p>This parameter is required if any ***Efficiency** parameter is set.
     *     <p>Sensible Values : 34.2.
     * @param accelerationEfficiency 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**.
     *     <p>Must be paired with **decelerationEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**decelerationEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.33, for **Electric Model** : 0.66.
     * @param decelerationEfficiency 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**.
     *     <p>Must be paired with **accelerationEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**accelerationEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.83, for **Electric Model** : 0.91.
     * @param uphillEfficiency 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**.
     *     <p>Must be paired with **downhillEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**downhillEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.27, for **Electric Model** : 0.74.
     * @param downhillEfficiency 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**.
     *     <p>Must be paired with **uphillEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**uphillEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.51, for **Electric Model** : 0.73.
     * @param constantSpeedConsumptionInKwHPerHundredKm Specifies the speed-dependent component of consumption.
     *     <p>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:
     *     <p>* by linear interpolation, if the given speed lies in between two speeds in the list
     *     <p>* by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest
     *     two points in the list
     *     <p>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.
     *     <p>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.
     *     <p>Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative
     *     consumption rate for any smaller speed.
     *     <p>The valid range for the consumption values(expressed in kWh/100km) is between 0.01 and 100000.0.
     *     <p>Sensible Values : 50,8.2:130,21.3
     *     <p>This parameter is required for **Electric consumption model**.
     * @param currentChargeInKwH Specifies the current electric energy supply in kilowatt hours (kWh).
     *     <p>This parameter co-exists with **maxChargeInkWh** parameter.
     *     <p>The range of values allowed are 0.0 to **maxChargeInkWh**.
     *     <p>Sensible Values : 43.
     * @param maxChargeInKwH Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in
     *     the vehicle's battery.
     *     <p>This parameter co-exists with **currentChargeInkWh** parameter.
     *     <p>Minimum value has to be greater than or equal to **currentChargeInkWh**.
     *     <p>Sensible Values : 85.
     * @param auxiliaryPowerInKw Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts
     *     (kW).
     *     <p>It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
     *     <p>Sensible Values : 1.7.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @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<Response<RouteDirections>> getRouteDirectionsWithAdditionalParametersWithResponseAsync(
            ResponseFormat format,
            String routePoints,
            RouteDirectionParametersPrivate routeDirectionParameters,
            Integer maxAlternatives,
            AlternativeRouteType alternativeType,
            Integer minDeviationDistance,
            Integer minDeviationTime,
            RouteInstructionsType instructionsType,
            String language,
            Boolean computeBestWaypointOrder,
            RouteRepresentationForBestOrder routeRepresentationForBestOrder,
            ComputeTravelTime computeTravelTime,
            Integer vehicleHeading,
            Report report,
            SectionType filterSectionType,
            OffsetDateTime arriveAt,
            OffsetDateTime departAt,
            Integer vehicleAxleWeight,
            Double vehicleLength,
            Double vehicleHeight,
            Double vehicleWidth,
            Integer vehicleMaxSpeed,
            Integer vehicleWeight,
            Boolean isCommercialVehicle,
            WindingnessLevel windingness,
            InclineLevel inclineLevel,
            TravelMode travelMode,
            List<RouteAvoidType> avoid,
            Boolean useTrafficData,
            RouteType routeType,
            VehicleLoadType vehicleLoadType,
            VehicleEngineType vehicleEngineType,
            String constantSpeedConsumptionInLitersPerHundredKm,
            Double currentFuelInLiters,
            Double auxiliaryPowerInLitersPerHour,
            Double fuelEnergyDensityInMegajoulesPerLiter,
            Double accelerationEfficiency,
            Double decelerationEfficiency,
            Double uphillEfficiency,
            Double downhillEfficiency,
            String constantSpeedConsumptionInKwHPerHundredKm,
            Double currentChargeInKwH,
            Double maxChargeInKwH,
            Double auxiliaryPowerInKw,
            Context context) {
        final String accept = "application/json";
        List<String> avoidConverted =
                (avoid == null)
                        ? new ArrayList<>()
                        : avoid.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList());
        return service.getRouteDirectionsWithAdditionalParameters(
                this.client.getHost(),
                this.client.getClientId(),
                this.client.getApiVersion(),
                format,
                routePoints,
                maxAlternatives,
                alternativeType,
                minDeviationDistance,
                minDeviationTime,
                instructionsType,
                language,
                computeBestWaypointOrder,
                routeRepresentationForBestOrder,
                computeTravelTime,
                vehicleHeading,
                report,
                filterSectionType,
                arriveAt,
                departAt,
                vehicleAxleWeight,
                vehicleLength,
                vehicleHeight,
                vehicleWidth,
                vehicleMaxSpeed,
                vehicleWeight,
                isCommercialVehicle,
                windingness,
                inclineLevel,
                travelMode,
                avoidConverted,
                useTrafficData,
                routeType,
                vehicleLoadType,
                vehicleEngineType,
                constantSpeedConsumptionInLitersPerHundredKm,
                currentFuelInLiters,
                auxiliaryPowerInLitersPerHour,
                fuelEnergyDensityInMegajoulesPerLiter,
                accelerationEfficiency,
                decelerationEfficiency,
                uphillEfficiency,
                downhillEfficiency,
                constantSpeedConsumptionInKwHPerHundredKm,
                currentChargeInKwH,
                maxChargeInKwH,
                auxiliaryPowerInKw,
                routeDirectionParameters,
                accept,
                context);
    }

    /**
     * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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.
     *
     * <p>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.
     *
     * <p>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.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param routePoints 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.
     * @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.
     *     <p>Setting at least one of minDeviationDistance or minDeviationTime to a value greater than zero has the
     *     following consequences:
     *     <p>* 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 maxAlternatives Number of desired alternative routes to be calculated. Default: 0, minimum: 0 and maximum:
     *     5.
     * @param alternativeType Controls the optimality, with respect to the given planning criteria, of the calculated
     *     alternatives compared to the reference route.
     * @param minDeviationDistance 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.
     * @param minDeviationTime 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.
     * @param instructionsType If specified, guidance instructions will be returned. Note that the instructionsType
     *     parameter cannot be used in conjunction with routeRepresentation=none.
     * @param language 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.
     * @param computeBestWaypointOrder 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_.
     * @param routeRepresentationForBestOrder Specifies the representation of the set of routes provided as response.
     *     This parameter value can only be used in conjunction with computeBestOrder=true.
     * @param computeTravelTime 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.
     * @param vehicleHeading 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.
     * @param report 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.
     * @param filterSectionType Specifies which of the section types is reported in the route response.
     *     &lt;br&gt;&lt;br&gt;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.
     * @param arriveAt 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.
     * @param departAt 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).
     * @param vehicleAxleWeight Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per
     *     axle are not considered.
     * @param vehicleLength Length of the vehicle in meters. A value of 0 means that length restrictions are not
     *     considered.
     * @param vehicleHeight Height of the vehicle in meters. A value of 0 means that height restrictions are not
     *     considered.
     * @param vehicleWidth Width of the vehicle in meters. A value of 0 means that width restrictions are not
     *     considered.
     * @param vehicleMaxSpeed 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.
     *     <p>* A value of 0 means that an appropriate value for the vehicle will be determined and applied during route
     *     planning.
     *     <p>* 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.
     * @param vehicleWeight Weight of the vehicle in kilograms.
     *     <p>* It is mandatory if any of the *Efficiency parameters are set.
     *     <p>* It must be strictly positive when used in the context of the Consumption Model. Weight restrictions are
     *     considered.
     *     <p>* If no detailed **Consumption Model** is specified and the value of **vehicleWeight** is non-zero, then
     *     weight restrictions are considered.
     *     <p>* In all other cases, this parameter is ignored.
     *     <p>Sensible Values : for **Combustion Model** : 1600, for **Electric Model** : 1900.
     * @param isCommercialVehicle Whether the vehicle is used for commercial purposes. Commercial vehicles may not be
     *     allowed to drive on some roads.
     * @param windingness Level of turns for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param inclineLevel Degree of hilliness for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param travelMode 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.
     * @param avoid Specifies something that the route calculation should try to avoid when determining the route. Can
     *     be specified multiple times in one request, for example,
     *     '&amp;avoid=motorways&amp;avoid=tollRoads&amp;avoid=ferries'. In calculateReachableRange requests, the value
     *     alreadyUsedRoads must not be used.
     * @param useTrafficData 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.
     * @param routeType The type of route requested.
     * @param vehicleLoadType 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.
     * @param vehicleEngineType Engine type of the vehicle. When a detailed Consumption Model is specified, it must be
     *     consistent with the value of **vehicleEngineType**.
     * @param constantSpeedConsumptionInLitersPerHundredKm Specifies the speed-dependent component of consumption.
     *     <p>Provided as an unordered list of colon-delimited speed &amp; consumption-rate pairs. The list defines
     *     points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
     *     <p>* by linear interpolation, if the given speed lies in between two speeds in the list
     *     <p>* by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest
     *     two points in the list
     *     <p>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.
     *     <p>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.
     *     <p>Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative
     *     consumption rate for any smaller speed.
     *     <p>The valid range for the consumption values(expressed in l/100km) is between 0.01 and 100000.0.
     *     <p>Sensible Values : 50,6.3:130,11.5
     *     <p>**Note** : This parameter is required for **The Combustion Consumption Model**.
     * @param currentFuelInLiters Specifies the current supply of fuel in liters.
     *     <p>Sensible Values : 55.
     * @param auxiliaryPowerInLitersPerHour Specifies the amount of fuel consumed for sustaining auxiliary systems of
     *     the vehicle, in liters per hour.
     *     <p>It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
     *     <p>Sensible Values : 0.2.
     * @param fuelEnergyDensityInMegajoulesPerLiter 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.
     *     <p>This parameter is required if any ***Efficiency** parameter is set.
     *     <p>Sensible Values : 34.2.
     * @param accelerationEfficiency 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**.
     *     <p>Must be paired with **decelerationEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**decelerationEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.33, for **Electric Model** : 0.66.
     * @param decelerationEfficiency 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**.
     *     <p>Must be paired with **accelerationEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**accelerationEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.83, for **Electric Model** : 0.91.
     * @param uphillEfficiency 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**.
     *     <p>Must be paired with **downhillEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**downhillEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.27, for **Electric Model** : 0.74.
     * @param downhillEfficiency 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**.
     *     <p>Must be paired with **uphillEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**uphillEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.51, for **Electric Model** : 0.73.
     * @param constantSpeedConsumptionInKwHPerHundredKm Specifies the speed-dependent component of consumption.
     *     <p>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:
     *     <p>* by linear interpolation, if the given speed lies in between two speeds in the list
     *     <p>* by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest
     *     two points in the list
     *     <p>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.
     *     <p>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.
     *     <p>Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative
     *     consumption rate for any smaller speed.
     *     <p>The valid range for the consumption values(expressed in kWh/100km) is between 0.01 and 100000.0.
     *     <p>Sensible Values : 50,8.2:130,21.3
     *     <p>This parameter is required for **Electric consumption model**.
     * @param currentChargeInKwH Specifies the current electric energy supply in kilowatt hours (kWh).
     *     <p>This parameter co-exists with **maxChargeInkWh** parameter.
     *     <p>The range of values allowed are 0.0 to **maxChargeInkWh**.
     *     <p>Sensible Values : 43.
     * @param maxChargeInKwH Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in
     *     the vehicle's battery.
     *     <p>This parameter co-exists with **currentChargeInkWh** parameter.
     *     <p>Minimum value has to be greater than or equal to **currentChargeInkWh**.
     *     <p>Sensible Values : 85.
     * @param auxiliaryPowerInKw Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts
     *     (kW).
     *     <p>It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
     *     <p>Sensible Values : 1.7.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Route Directions call on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<RouteDirections> getRouteDirectionsWithAdditionalParametersAsync(
            ResponseFormat format,
            String routePoints,
            RouteDirectionParametersPrivate routeDirectionParameters,
            Integer maxAlternatives,
            AlternativeRouteType alternativeType,
            Integer minDeviationDistance,
            Integer minDeviationTime,
            RouteInstructionsType instructionsType,
            String language,
            Boolean computeBestWaypointOrder,
            RouteRepresentationForBestOrder routeRepresentationForBestOrder,
            ComputeTravelTime computeTravelTime,
            Integer vehicleHeading,
            Report report,
            SectionType filterSectionType,
            OffsetDateTime arriveAt,
            OffsetDateTime departAt,
            Integer vehicleAxleWeight,
            Double vehicleLength,
            Double vehicleHeight,
            Double vehicleWidth,
            Integer vehicleMaxSpeed,
            Integer vehicleWeight,
            Boolean isCommercialVehicle,
            WindingnessLevel windingness,
            InclineLevel inclineLevel,
            TravelMode travelMode,
            List<RouteAvoidType> avoid,
            Boolean useTrafficData,
            RouteType routeType,
            VehicleLoadType vehicleLoadType,
            VehicleEngineType vehicleEngineType,
            String constantSpeedConsumptionInLitersPerHundredKm,
            Double currentFuelInLiters,
            Double auxiliaryPowerInLitersPerHour,
            Double fuelEnergyDensityInMegajoulesPerLiter,
            Double accelerationEfficiency,
            Double decelerationEfficiency,
            Double uphillEfficiency,
            Double downhillEfficiency,
            String constantSpeedConsumptionInKwHPerHundredKm,
            Double currentChargeInKwH,
            Double maxChargeInKwH,
            Double auxiliaryPowerInKw) {
        return getRouteDirectionsWithAdditionalParametersWithResponseAsync(
                        format,
                        routePoints,
                        routeDirectionParameters,
                        maxAlternatives,
                        alternativeType,
                        minDeviationDistance,
                        minDeviationTime,
                        instructionsType,
                        language,
                        computeBestWaypointOrder,
                        routeRepresentationForBestOrder,
                        computeTravelTime,
                        vehicleHeading,
                        report,
                        filterSectionType,
                        arriveAt,
                        departAt,
                        vehicleAxleWeight,
                        vehicleLength,
                        vehicleHeight,
                        vehicleWidth,
                        vehicleMaxSpeed,
                        vehicleWeight,
                        isCommercialVehicle,
                        windingness,
                        inclineLevel,
                        travelMode,
                        avoid,
                        useTrafficData,
                        routeType,
                        vehicleLoadType,
                        vehicleEngineType,
                        constantSpeedConsumptionInLitersPerHundredKm,
                        currentFuelInLiters,
                        auxiliaryPowerInLitersPerHour,
                        fuelEnergyDensityInMegajoulesPerLiter,
                        accelerationEfficiency,
                        decelerationEfficiency,
                        uphillEfficiency,
                        downhillEfficiency,
                        constantSpeedConsumptionInKwHPerHundredKm,
                        currentChargeInKwH,
                        maxChargeInKwH,
                        auxiliaryPowerInKw)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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.
     *
     * <p>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.
     *
     * <p>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.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param routePoints 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.
     * @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.
     *     <p>Setting at least one of minDeviationDistance or minDeviationTime to a value greater than zero has the
     *     following consequences:
     *     <p>* 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 maxAlternatives Number of desired alternative routes to be calculated. Default: 0, minimum: 0 and maximum:
     *     5.
     * @param alternativeType Controls the optimality, with respect to the given planning criteria, of the calculated
     *     alternatives compared to the reference route.
     * @param minDeviationDistance 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.
     * @param minDeviationTime 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.
     * @param instructionsType If specified, guidance instructions will be returned. Note that the instructionsType
     *     parameter cannot be used in conjunction with routeRepresentation=none.
     * @param language 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.
     * @param computeBestWaypointOrder 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_.
     * @param routeRepresentationForBestOrder Specifies the representation of the set of routes provided as response.
     *     This parameter value can only be used in conjunction with computeBestOrder=true.
     * @param computeTravelTime 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.
     * @param vehicleHeading 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.
     * @param report 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.
     * @param filterSectionType Specifies which of the section types is reported in the route response.
     *     &lt;br&gt;&lt;br&gt;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.
     * @param arriveAt 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.
     * @param departAt 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).
     * @param vehicleAxleWeight Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per
     *     axle are not considered.
     * @param vehicleLength Length of the vehicle in meters. A value of 0 means that length restrictions are not
     *     considered.
     * @param vehicleHeight Height of the vehicle in meters. A value of 0 means that height restrictions are not
     *     considered.
     * @param vehicleWidth Width of the vehicle in meters. A value of 0 means that width restrictions are not
     *     considered.
     * @param vehicleMaxSpeed 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.
     *     <p>* A value of 0 means that an appropriate value for the vehicle will be determined and applied during route
     *     planning.
     *     <p>* 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.
     * @param vehicleWeight Weight of the vehicle in kilograms.
     *     <p>* It is mandatory if any of the *Efficiency parameters are set.
     *     <p>* It must be strictly positive when used in the context of the Consumption Model. Weight restrictions are
     *     considered.
     *     <p>* If no detailed **Consumption Model** is specified and the value of **vehicleWeight** is non-zero, then
     *     weight restrictions are considered.
     *     <p>* In all other cases, this parameter is ignored.
     *     <p>Sensible Values : for **Combustion Model** : 1600, for **Electric Model** : 1900.
     * @param isCommercialVehicle Whether the vehicle is used for commercial purposes. Commercial vehicles may not be
     *     allowed to drive on some roads.
     * @param windingness Level of turns for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param inclineLevel Degree of hilliness for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param travelMode 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.
     * @param avoid Specifies something that the route calculation should try to avoid when determining the route. Can
     *     be specified multiple times in one request, for example,
     *     '&amp;avoid=motorways&amp;avoid=tollRoads&amp;avoid=ferries'. In calculateReachableRange requests, the value
     *     alreadyUsedRoads must not be used.
     * @param useTrafficData 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.
     * @param routeType The type of route requested.
     * @param vehicleLoadType 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.
     * @param vehicleEngineType Engine type of the vehicle. When a detailed Consumption Model is specified, it must be
     *     consistent with the value of **vehicleEngineType**.
     * @param constantSpeedConsumptionInLitersPerHundredKm Specifies the speed-dependent component of consumption.
     *     <p>Provided as an unordered list of colon-delimited speed &amp; consumption-rate pairs. The list defines
     *     points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
     *     <p>* by linear interpolation, if the given speed lies in between two speeds in the list
     *     <p>* by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest
     *     two points in the list
     *     <p>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.
     *     <p>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.
     *     <p>Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative
     *     consumption rate for any smaller speed.
     *     <p>The valid range for the consumption values(expressed in l/100km) is between 0.01 and 100000.0.
     *     <p>Sensible Values : 50,6.3:130,11.5
     *     <p>**Note** : This parameter is required for **The Combustion Consumption Model**.
     * @param currentFuelInLiters Specifies the current supply of fuel in liters.
     *     <p>Sensible Values : 55.
     * @param auxiliaryPowerInLitersPerHour Specifies the amount of fuel consumed for sustaining auxiliary systems of
     *     the vehicle, in liters per hour.
     *     <p>It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
     *     <p>Sensible Values : 0.2.
     * @param fuelEnergyDensityInMegajoulesPerLiter 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.
     *     <p>This parameter is required if any ***Efficiency** parameter is set.
     *     <p>Sensible Values : 34.2.
     * @param accelerationEfficiency 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**.
     *     <p>Must be paired with **decelerationEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**decelerationEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.33, for **Electric Model** : 0.66.
     * @param decelerationEfficiency 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**.
     *     <p>Must be paired with **accelerationEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**accelerationEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.83, for **Electric Model** : 0.91.
     * @param uphillEfficiency 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**.
     *     <p>Must be paired with **downhillEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**downhillEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.27, for **Electric Model** : 0.74.
     * @param downhillEfficiency 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**.
     *     <p>Must be paired with **uphillEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**uphillEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.51, for **Electric Model** : 0.73.
     * @param constantSpeedConsumptionInKwHPerHundredKm Specifies the speed-dependent component of consumption.
     *     <p>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:
     *     <p>* by linear interpolation, if the given speed lies in between two speeds in the list
     *     <p>* by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest
     *     two points in the list
     *     <p>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.
     *     <p>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.
     *     <p>Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative
     *     consumption rate for any smaller speed.
     *     <p>The valid range for the consumption values(expressed in kWh/100km) is between 0.01 and 100000.0.
     *     <p>Sensible Values : 50,8.2:130,21.3
     *     <p>This parameter is required for **Electric consumption model**.
     * @param currentChargeInKwH Specifies the current electric energy supply in kilowatt hours (kWh).
     *     <p>This parameter co-exists with **maxChargeInkWh** parameter.
     *     <p>The range of values allowed are 0.0 to **maxChargeInkWh**.
     *     <p>Sensible Values : 43.
     * @param maxChargeInKwH Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in
     *     the vehicle's battery.
     *     <p>This parameter co-exists with **currentChargeInkWh** parameter.
     *     <p>Minimum value has to be greater than or equal to **currentChargeInkWh**.
     *     <p>Sensible Values : 85.
     * @param auxiliaryPowerInKw Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts
     *     (kW).
     *     <p>It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
     *     <p>Sensible Values : 1.7.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Route Directions call on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<RouteDirections> getRouteDirectionsWithAdditionalParametersAsync(
            ResponseFormat format,
            String routePoints,
            RouteDirectionParametersPrivate routeDirectionParameters,
            Integer maxAlternatives,
            AlternativeRouteType alternativeType,
            Integer minDeviationDistance,
            Integer minDeviationTime,
            RouteInstructionsType instructionsType,
            String language,
            Boolean computeBestWaypointOrder,
            RouteRepresentationForBestOrder routeRepresentationForBestOrder,
            ComputeTravelTime computeTravelTime,
            Integer vehicleHeading,
            Report report,
            SectionType filterSectionType,
            OffsetDateTime arriveAt,
            OffsetDateTime departAt,
            Integer vehicleAxleWeight,
            Double vehicleLength,
            Double vehicleHeight,
            Double vehicleWidth,
            Integer vehicleMaxSpeed,
            Integer vehicleWeight,
            Boolean isCommercialVehicle,
            WindingnessLevel windingness,
            InclineLevel inclineLevel,
            TravelMode travelMode,
            List<RouteAvoidType> avoid,
            Boolean useTrafficData,
            RouteType routeType,
            VehicleLoadType vehicleLoadType,
            VehicleEngineType vehicleEngineType,
            String constantSpeedConsumptionInLitersPerHundredKm,
            Double currentFuelInLiters,
            Double auxiliaryPowerInLitersPerHour,
            Double fuelEnergyDensityInMegajoulesPerLiter,
            Double accelerationEfficiency,
            Double decelerationEfficiency,
            Double uphillEfficiency,
            Double downhillEfficiency,
            String constantSpeedConsumptionInKwHPerHundredKm,
            Double currentChargeInKwH,
            Double maxChargeInKwH,
            Double auxiliaryPowerInKw,
            Context context) {
        return getRouteDirectionsWithAdditionalParametersWithResponseAsync(
                        format,
                        routePoints,
                        routeDirectionParameters,
                        maxAlternatives,
                        alternativeType,
                        minDeviationDistance,
                        minDeviationTime,
                        instructionsType,
                        language,
                        computeBestWaypointOrder,
                        routeRepresentationForBestOrder,
                        computeTravelTime,
                        vehicleHeading,
                        report,
                        filterSectionType,
                        arriveAt,
                        departAt,
                        vehicleAxleWeight,
                        vehicleLength,
                        vehicleHeight,
                        vehicleWidth,
                        vehicleMaxSpeed,
                        vehicleWeight,
                        isCommercialVehicle,
                        windingness,
                        inclineLevel,
                        travelMode,
                        avoid,
                        useTrafficData,
                        routeType,
                        vehicleLoadType,
                        vehicleEngineType,
                        constantSpeedConsumptionInLitersPerHundredKm,
                        currentFuelInLiters,
                        auxiliaryPowerInLitersPerHour,
                        fuelEnergyDensityInMegajoulesPerLiter,
                        accelerationEfficiency,
                        decelerationEfficiency,
                        uphillEfficiency,
                        downhillEfficiency,
                        constantSpeedConsumptionInKwHPerHundredKm,
                        currentChargeInKwH,
                        maxChargeInKwH,
                        auxiliaryPowerInKw,
                        context)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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.
     *
     * <p>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.
     *
     * <p>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.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param routePoints 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.
     * @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.
     *     <p>Setting at least one of minDeviationDistance or minDeviationTime to a value greater than zero has the
     *     following consequences:
     *     <p>* 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 maxAlternatives Number of desired alternative routes to be calculated. Default: 0, minimum: 0 and maximum:
     *     5.
     * @param alternativeType Controls the optimality, with respect to the given planning criteria, of the calculated
     *     alternatives compared to the reference route.
     * @param minDeviationDistance 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.
     * @param minDeviationTime 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.
     * @param instructionsType If specified, guidance instructions will be returned. Note that the instructionsType
     *     parameter cannot be used in conjunction with routeRepresentation=none.
     * @param language 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.
     * @param computeBestWaypointOrder 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_.
     * @param routeRepresentationForBestOrder Specifies the representation of the set of routes provided as response.
     *     This parameter value can only be used in conjunction with computeBestOrder=true.
     * @param computeTravelTime 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.
     * @param vehicleHeading 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.
     * @param report 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.
     * @param filterSectionType Specifies which of the section types is reported in the route response.
     *     &lt;br&gt;&lt;br&gt;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.
     * @param arriveAt 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.
     * @param departAt 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).
     * @param vehicleAxleWeight Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per
     *     axle are not considered.
     * @param vehicleLength Length of the vehicle in meters. A value of 0 means that length restrictions are not
     *     considered.
     * @param vehicleHeight Height of the vehicle in meters. A value of 0 means that height restrictions are not
     *     considered.
     * @param vehicleWidth Width of the vehicle in meters. A value of 0 means that width restrictions are not
     *     considered.
     * @param vehicleMaxSpeed 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.
     *     <p>* A value of 0 means that an appropriate value for the vehicle will be determined and applied during route
     *     planning.
     *     <p>* 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.
     * @param vehicleWeight Weight of the vehicle in kilograms.
     *     <p>* It is mandatory if any of the *Efficiency parameters are set.
     *     <p>* It must be strictly positive when used in the context of the Consumption Model. Weight restrictions are
     *     considered.
     *     <p>* If no detailed **Consumption Model** is specified and the value of **vehicleWeight** is non-zero, then
     *     weight restrictions are considered.
     *     <p>* In all other cases, this parameter is ignored.
     *     <p>Sensible Values : for **Combustion Model** : 1600, for **Electric Model** : 1900.
     * @param isCommercialVehicle Whether the vehicle is used for commercial purposes. Commercial vehicles may not be
     *     allowed to drive on some roads.
     * @param windingness Level of turns for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param inclineLevel Degree of hilliness for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param travelMode 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.
     * @param avoid Specifies something that the route calculation should try to avoid when determining the route. Can
     *     be specified multiple times in one request, for example,
     *     '&amp;avoid=motorways&amp;avoid=tollRoads&amp;avoid=ferries'. In calculateReachableRange requests, the value
     *     alreadyUsedRoads must not be used.
     * @param useTrafficData 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.
     * @param routeType The type of route requested.
     * @param vehicleLoadType 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.
     * @param vehicleEngineType Engine type of the vehicle. When a detailed Consumption Model is specified, it must be
     *     consistent with the value of **vehicleEngineType**.
     * @param constantSpeedConsumptionInLitersPerHundredKm Specifies the speed-dependent component of consumption.
     *     <p>Provided as an unordered list of colon-delimited speed &amp; consumption-rate pairs. The list defines
     *     points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
     *     <p>* by linear interpolation, if the given speed lies in between two speeds in the list
     *     <p>* by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest
     *     two points in the list
     *     <p>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.
     *     <p>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.
     *     <p>Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative
     *     consumption rate for any smaller speed.
     *     <p>The valid range for the consumption values(expressed in l/100km) is between 0.01 and 100000.0.
     *     <p>Sensible Values : 50,6.3:130,11.5
     *     <p>**Note** : This parameter is required for **The Combustion Consumption Model**.
     * @param currentFuelInLiters Specifies the current supply of fuel in liters.
     *     <p>Sensible Values : 55.
     * @param auxiliaryPowerInLitersPerHour Specifies the amount of fuel consumed for sustaining auxiliary systems of
     *     the vehicle, in liters per hour.
     *     <p>It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
     *     <p>Sensible Values : 0.2.
     * @param fuelEnergyDensityInMegajoulesPerLiter 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.
     *     <p>This parameter is required if any ***Efficiency** parameter is set.
     *     <p>Sensible Values : 34.2.
     * @param accelerationEfficiency 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**.
     *     <p>Must be paired with **decelerationEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**decelerationEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.33, for **Electric Model** : 0.66.
     * @param decelerationEfficiency 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**.
     *     <p>Must be paired with **accelerationEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**accelerationEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.83, for **Electric Model** : 0.91.
     * @param uphillEfficiency 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**.
     *     <p>Must be paired with **downhillEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**downhillEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.27, for **Electric Model** : 0.74.
     * @param downhillEfficiency 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**.
     *     <p>Must be paired with **uphillEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**uphillEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.51, for **Electric Model** : 0.73.
     * @param constantSpeedConsumptionInKwHPerHundredKm Specifies the speed-dependent component of consumption.
     *     <p>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:
     *     <p>* by linear interpolation, if the given speed lies in between two speeds in the list
     *     <p>* by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest
     *     two points in the list
     *     <p>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.
     *     <p>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.
     *     <p>Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative
     *     consumption rate for any smaller speed.
     *     <p>The valid range for the consumption values(expressed in kWh/100km) is between 0.01 and 100000.0.
     *     <p>Sensible Values : 50,8.2:130,21.3
     *     <p>This parameter is required for **Electric consumption model**.
     * @param currentChargeInKwH Specifies the current electric energy supply in kilowatt hours (kWh).
     *     <p>This parameter co-exists with **maxChargeInkWh** parameter.
     *     <p>The range of values allowed are 0.0 to **maxChargeInkWh**.
     *     <p>Sensible Values : 43.
     * @param maxChargeInKwH Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in
     *     the vehicle's battery.
     *     <p>This parameter co-exists with **currentChargeInkWh** parameter.
     *     <p>Minimum value has to be greater than or equal to **currentChargeInkWh**.
     *     <p>Sensible Values : 85.
     * @param auxiliaryPowerInKw Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts
     *     (kW).
     *     <p>It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
     *     <p>Sensible Values : 1.7.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Route Directions call.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public RouteDirections getRouteDirectionsWithAdditionalParameters(
            ResponseFormat format,
            String routePoints,
            RouteDirectionParametersPrivate routeDirectionParameters,
            Integer maxAlternatives,
            AlternativeRouteType alternativeType,
            Integer minDeviationDistance,
            Integer minDeviationTime,
            RouteInstructionsType instructionsType,
            String language,
            Boolean computeBestWaypointOrder,
            RouteRepresentationForBestOrder routeRepresentationForBestOrder,
            ComputeTravelTime computeTravelTime,
            Integer vehicleHeading,
            Report report,
            SectionType filterSectionType,
            OffsetDateTime arriveAt,
            OffsetDateTime departAt,
            Integer vehicleAxleWeight,
            Double vehicleLength,
            Double vehicleHeight,
            Double vehicleWidth,
            Integer vehicleMaxSpeed,
            Integer vehicleWeight,
            Boolean isCommercialVehicle,
            WindingnessLevel windingness,
            InclineLevel inclineLevel,
            TravelMode travelMode,
            List<RouteAvoidType> avoid,
            Boolean useTrafficData,
            RouteType routeType,
            VehicleLoadType vehicleLoadType,
            VehicleEngineType vehicleEngineType,
            String constantSpeedConsumptionInLitersPerHundredKm,
            Double currentFuelInLiters,
            Double auxiliaryPowerInLitersPerHour,
            Double fuelEnergyDensityInMegajoulesPerLiter,
            Double accelerationEfficiency,
            Double decelerationEfficiency,
            Double uphillEfficiency,
            Double downhillEfficiency,
            String constantSpeedConsumptionInKwHPerHundredKm,
            Double currentChargeInKwH,
            Double maxChargeInKwH,
            Double auxiliaryPowerInKw) {
        return getRouteDirectionsWithAdditionalParametersAsync(
                        format,
                        routePoints,
                        routeDirectionParameters,
                        maxAlternatives,
                        alternativeType,
                        minDeviationDistance,
                        minDeviationTime,
                        instructionsType,
                        language,
                        computeBestWaypointOrder,
                        routeRepresentationForBestOrder,
                        computeTravelTime,
                        vehicleHeading,
                        report,
                        filterSectionType,
                        arriveAt,
                        departAt,
                        vehicleAxleWeight,
                        vehicleLength,
                        vehicleHeight,
                        vehicleWidth,
                        vehicleMaxSpeed,
                        vehicleWeight,
                        isCommercialVehicle,
                        windingness,
                        inclineLevel,
                        travelMode,
                        avoid,
                        useTrafficData,
                        routeType,
                        vehicleLoadType,
                        vehicleEngineType,
                        constantSpeedConsumptionInLitersPerHundredKm,
                        currentFuelInLiters,
                        auxiliaryPowerInLitersPerHour,
                        fuelEnergyDensityInMegajoulesPerLiter,
                        accelerationEfficiency,
                        decelerationEfficiency,
                        uphillEfficiency,
                        downhillEfficiency,
                        constantSpeedConsumptionInKwHPerHundredKm,
                        currentChargeInKwH,
                        maxChargeInKwH,
                        auxiliaryPowerInKw)
                .block();
    }

    /**
     * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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.
     *
     * <p>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.
     *
     * <p>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.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param routePoints 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.
     * @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.
     *     <p>Setting at least one of minDeviationDistance or minDeviationTime to a value greater than zero has the
     *     following consequences:
     *     <p>* 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 maxAlternatives Number of desired alternative routes to be calculated. Default: 0, minimum: 0 and maximum:
     *     5.
     * @param alternativeType Controls the optimality, with respect to the given planning criteria, of the calculated
     *     alternatives compared to the reference route.
     * @param minDeviationDistance 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.
     * @param minDeviationTime 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.
     * @param instructionsType If specified, guidance instructions will be returned. Note that the instructionsType
     *     parameter cannot be used in conjunction with routeRepresentation=none.
     * @param language 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.
     * @param computeBestWaypointOrder 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_.
     * @param routeRepresentationForBestOrder Specifies the representation of the set of routes provided as response.
     *     This parameter value can only be used in conjunction with computeBestOrder=true.
     * @param computeTravelTime 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.
     * @param vehicleHeading 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.
     * @param report 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.
     * @param filterSectionType Specifies which of the section types is reported in the route response.
     *     &lt;br&gt;&lt;br&gt;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.
     * @param arriveAt 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.
     * @param departAt 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).
     * @param vehicleAxleWeight Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per
     *     axle are not considered.
     * @param vehicleLength Length of the vehicle in meters. A value of 0 means that length restrictions are not
     *     considered.
     * @param vehicleHeight Height of the vehicle in meters. A value of 0 means that height restrictions are not
     *     considered.
     * @param vehicleWidth Width of the vehicle in meters. A value of 0 means that width restrictions are not
     *     considered.
     * @param vehicleMaxSpeed 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.
     *     <p>* A value of 0 means that an appropriate value for the vehicle will be determined and applied during route
     *     planning.
     *     <p>* 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.
     * @param vehicleWeight Weight of the vehicle in kilograms.
     *     <p>* It is mandatory if any of the *Efficiency parameters are set.
     *     <p>* It must be strictly positive when used in the context of the Consumption Model. Weight restrictions are
     *     considered.
     *     <p>* If no detailed **Consumption Model** is specified and the value of **vehicleWeight** is non-zero, then
     *     weight restrictions are considered.
     *     <p>* In all other cases, this parameter is ignored.
     *     <p>Sensible Values : for **Combustion Model** : 1600, for **Electric Model** : 1900.
     * @param isCommercialVehicle Whether the vehicle is used for commercial purposes. Commercial vehicles may not be
     *     allowed to drive on some roads.
     * @param windingness Level of turns for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param inclineLevel Degree of hilliness for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param travelMode 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.
     * @param avoid Specifies something that the route calculation should try to avoid when determining the route. Can
     *     be specified multiple times in one request, for example,
     *     '&amp;avoid=motorways&amp;avoid=tollRoads&amp;avoid=ferries'. In calculateReachableRange requests, the value
     *     alreadyUsedRoads must not be used.
     * @param useTrafficData 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.
     * @param routeType The type of route requested.
     * @param vehicleLoadType 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.
     * @param vehicleEngineType Engine type of the vehicle. When a detailed Consumption Model is specified, it must be
     *     consistent with the value of **vehicleEngineType**.
     * @param constantSpeedConsumptionInLitersPerHundredKm Specifies the speed-dependent component of consumption.
     *     <p>Provided as an unordered list of colon-delimited speed &amp; consumption-rate pairs. The list defines
     *     points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
     *     <p>* by linear interpolation, if the given speed lies in between two speeds in the list
     *     <p>* by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest
     *     two points in the list
     *     <p>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.
     *     <p>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.
     *     <p>Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative
     *     consumption rate for any smaller speed.
     *     <p>The valid range for the consumption values(expressed in l/100km) is between 0.01 and 100000.0.
     *     <p>Sensible Values : 50,6.3:130,11.5
     *     <p>**Note** : This parameter is required for **The Combustion Consumption Model**.
     * @param currentFuelInLiters Specifies the current supply of fuel in liters.
     *     <p>Sensible Values : 55.
     * @param auxiliaryPowerInLitersPerHour Specifies the amount of fuel consumed for sustaining auxiliary systems of
     *     the vehicle, in liters per hour.
     *     <p>It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
     *     <p>Sensible Values : 0.2.
     * @param fuelEnergyDensityInMegajoulesPerLiter 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.
     *     <p>This parameter is required if any ***Efficiency** parameter is set.
     *     <p>Sensible Values : 34.2.
     * @param accelerationEfficiency 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**.
     *     <p>Must be paired with **decelerationEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**decelerationEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.33, for **Electric Model** : 0.66.
     * @param decelerationEfficiency 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**.
     *     <p>Must be paired with **accelerationEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**accelerationEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.83, for **Electric Model** : 0.91.
     * @param uphillEfficiency 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**.
     *     <p>Must be paired with **downhillEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**downhillEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.27, for **Electric Model** : 0.74.
     * @param downhillEfficiency 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**.
     *     <p>Must be paired with **uphillEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**uphillEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.51, for **Electric Model** : 0.73.
     * @param constantSpeedConsumptionInKwHPerHundredKm Specifies the speed-dependent component of consumption.
     *     <p>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:
     *     <p>* by linear interpolation, if the given speed lies in between two speeds in the list
     *     <p>* by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest
     *     two points in the list
     *     <p>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.
     *     <p>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.
     *     <p>Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative
     *     consumption rate for any smaller speed.
     *     <p>The valid range for the consumption values(expressed in kWh/100km) is between 0.01 and 100000.0.
     *     <p>Sensible Values : 50,8.2:130,21.3
     *     <p>This parameter is required for **Electric consumption model**.
     * @param currentChargeInKwH Specifies the current electric energy supply in kilowatt hours (kWh).
     *     <p>This parameter co-exists with **maxChargeInkWh** parameter.
     *     <p>The range of values allowed are 0.0 to **maxChargeInkWh**.
     *     <p>Sensible Values : 43.
     * @param maxChargeInKwH Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in
     *     the vehicle's battery.
     *     <p>This parameter co-exists with **currentChargeInkWh** parameter.
     *     <p>Minimum value has to be greater than or equal to **currentChargeInkWh**.
     *     <p>Sensible Values : 85.
     * @param auxiliaryPowerInKw Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts
     *     (kW).
     *     <p>It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
     *     <p>Sensible Values : 1.7.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Route Directions call along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<RouteDirections> getRouteDirectionsWithAdditionalParametersWithResponse(
            ResponseFormat format,
            String routePoints,
            RouteDirectionParametersPrivate routeDirectionParameters,
            Integer maxAlternatives,
            AlternativeRouteType alternativeType,
            Integer minDeviationDistance,
            Integer minDeviationTime,
            RouteInstructionsType instructionsType,
            String language,
            Boolean computeBestWaypointOrder,
            RouteRepresentationForBestOrder routeRepresentationForBestOrder,
            ComputeTravelTime computeTravelTime,
            Integer vehicleHeading,
            Report report,
            SectionType filterSectionType,
            OffsetDateTime arriveAt,
            OffsetDateTime departAt,
            Integer vehicleAxleWeight,
            Double vehicleLength,
            Double vehicleHeight,
            Double vehicleWidth,
            Integer vehicleMaxSpeed,
            Integer vehicleWeight,
            Boolean isCommercialVehicle,
            WindingnessLevel windingness,
            InclineLevel inclineLevel,
            TravelMode travelMode,
            List<RouteAvoidType> avoid,
            Boolean useTrafficData,
            RouteType routeType,
            VehicleLoadType vehicleLoadType,
            VehicleEngineType vehicleEngineType,
            String constantSpeedConsumptionInLitersPerHundredKm,
            Double currentFuelInLiters,
            Double auxiliaryPowerInLitersPerHour,
            Double fuelEnergyDensityInMegajoulesPerLiter,
            Double accelerationEfficiency,
            Double decelerationEfficiency,
            Double uphillEfficiency,
            Double downhillEfficiency,
            String constantSpeedConsumptionInKwHPerHundredKm,
            Double currentChargeInKwH,
            Double maxChargeInKwH,
            Double auxiliaryPowerInKw,
            Context context) {
        return getRouteDirectionsWithAdditionalParametersWithResponseAsync(
                        format,
                        routePoints,
                        routeDirectionParameters,
                        maxAlternatives,
                        alternativeType,
                        minDeviationDistance,
                        minDeviationTime,
                        instructionsType,
                        language,
                        computeBestWaypointOrder,
                        routeRepresentationForBestOrder,
                        computeTravelTime,
                        vehicleHeading,
                        report,
                        filterSectionType,
                        arriveAt,
                        departAt,
                        vehicleAxleWeight,
                        vehicleLength,
                        vehicleHeight,
                        vehicleWidth,
                        vehicleMaxSpeed,
                        vehicleWeight,
                        isCommercialVehicle,
                        windingness,
                        inclineLevel,
                        travelMode,
                        avoid,
                        useTrafficData,
                        routeType,
                        vehicleLoadType,
                        vehicleEngineType,
                        constantSpeedConsumptionInLitersPerHundredKm,
                        currentFuelInLiters,
                        auxiliaryPowerInLitersPerHour,
                        fuelEnergyDensityInMegajoulesPerLiter,
                        accelerationEfficiency,
                        decelerationEfficiency,
                        uphillEfficiency,
                        downhillEfficiency,
                        constantSpeedConsumptionInKwHPerHundredKm,
                        currentChargeInKwH,
                        maxChargeInKwH,
                        auxiliaryPowerInKw,
                        context)
                .block();
    }

    /**
     * __Route Range (Isochrone) API__
     *
     * <p>**Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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.
     *
     * <p>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.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The Coordinate from which the range calculation should start.
     * @param fuelBudgetInLiters Fuel budget in liters that determines maximal range which can be travelled using the
     *     specified Combustion Consumption Model.&lt;br&gt; When fuelBudgetInLiters is used, it is mandatory to specify
     *     a detailed Combustion Consumption Model.&lt;br&gt; Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh,
     *     timeBudgetInSec, or distanceBudgetInMeters) must be used.
     * @param energyBudgetInKwH Electric energy budget in kilowatt hours (kWh) that determines maximal range which can
     *     be travelled using the specified Electric Consumption Model.&lt;br&gt; When energyBudgetInkWh is used, it is
     *     mandatory to specify a detailed Electric Consumption Model.&lt;br&gt; Exactly one budget (fuelBudgetInLiters,
     *     energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used.
     * @param timeBudgetInSec 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.&lt;br&gt; Exactly one budget
     *     (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used.
     * @param distanceBudgetInMeters 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.&lt;br&gt;
     *     Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must
     *     be used.
     * @param departAt 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).
     * @param routeType The type of route requested.
     * @param useTrafficData 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.
     * @param avoid Specifies something that the route calculation should try to avoid when determining the route. Can
     *     be specified multiple times in one request, for example,
     *     '&amp;avoid=motorways&amp;avoid=tollRoads&amp;avoid=ferries'. In calculateReachableRange requests, the value
     *     alreadyUsedRoads must not be used.
     * @param travelMode 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.
     * @param inclineLevel Degree of hilliness for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param windingness Level of turns for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param vehicleAxleWeight Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per
     *     axle are not considered.
     * @param vehicleWidth Width of the vehicle in meters. A value of 0 means that width restrictions are not
     *     considered.
     * @param vehicleHeight Height of the vehicle in meters. A value of 0 means that height restrictions are not
     *     considered.
     * @param vehicleLength Length of the vehicle in meters. A value of 0 means that length restrictions are not
     *     considered.
     * @param vehicleMaxSpeed 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.
     *     <p>* A value of 0 means that an appropriate value for the vehicle will be determined and applied during route
     *     planning.
     *     <p>* 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.
     * @param vehicleWeight Weight of the vehicle in kilograms.
     *     <p>* It is mandatory if any of the *Efficiency parameters are set.
     *     <p>* It must be strictly positive when used in the context of the Consumption Model. Weight restrictions are
     *     considered.
     *     <p>* If no detailed **Consumption Model** is specified and the value of **vehicleWeight** is non-zero, then
     *     weight restrictions are considered.
     *     <p>* In all other cases, this parameter is ignored.
     *     <p>Sensible Values : for **Combustion Model** : 1600, for **Electric Model** : 1900.
     * @param isCommercialVehicle Whether the vehicle is used for commercial purposes. Commercial vehicles may not be
     *     allowed to drive on some roads.
     * @param vehicleLoadType 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.
     * @param vehicleEngineType Engine type of the vehicle. When a detailed Consumption Model is specified, it must be
     *     consistent with the value of **vehicleEngineType**.
     * @param constantSpeedConsumptionInLitersPerHundredKm Specifies the speed-dependent component of consumption.
     *     <p>Provided as an unordered list of colon-delimited speed &amp; consumption-rate pairs. The list defines
     *     points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
     *     <p>* by linear interpolation, if the given speed lies in between two speeds in the list
     *     <p>* by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest
     *     two points in the list
     *     <p>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.
     *     <p>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.
     *     <p>Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative
     *     consumption rate for any smaller speed.
     *     <p>The valid range for the consumption values(expressed in l/100km) is between 0.01 and 100000.0.
     *     <p>Sensible Values : 50,6.3:130,11.5
     *     <p>**Note** : This parameter is required for **The Combustion Consumption Model**.
     * @param currentFuelInLiters Specifies the current supply of fuel in liters.
     *     <p>Sensible Values : 55.
     * @param auxiliaryPowerInLitersPerHour Specifies the amount of fuel consumed for sustaining auxiliary systems of
     *     the vehicle, in liters per hour.
     *     <p>It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
     *     <p>Sensible Values : 0.2.
     * @param fuelEnergyDensityInMegajoulesPerLiter 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.
     *     <p>This parameter is required if any ***Efficiency** parameter is set.
     *     <p>Sensible Values : 34.2.
     * @param accelerationEfficiency 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**.
     *     <p>Must be paired with **decelerationEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**decelerationEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.33, for **Electric Model** : 0.66.
     * @param decelerationEfficiency 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**.
     *     <p>Must be paired with **accelerationEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**accelerationEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.83, for **Electric Model** : 0.91.
     * @param uphillEfficiency 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**.
     *     <p>Must be paired with **downhillEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**downhillEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.27, for **Electric Model** : 0.74.
     * @param downhillEfficiency 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**.
     *     <p>Must be paired with **uphillEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**uphillEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.51, for **Electric Model** : 0.73.
     * @param constantSpeedConsumptionInKwHPerHundredKm Specifies the speed-dependent component of consumption.
     *     <p>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:
     *     <p>* by linear interpolation, if the given speed lies in between two speeds in the list
     *     <p>* by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest
     *     two points in the list
     *     <p>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.
     *     <p>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.
     *     <p>Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative
     *     consumption rate for any smaller speed.
     *     <p>The valid range for the consumption values(expressed in kWh/100km) is between 0.01 and 100000.0.
     *     <p>Sensible Values : 50,8.2:130,21.3
     *     <p>This parameter is required for **Electric consumption model**.
     * @param currentChargeInKwH Specifies the current electric energy supply in kilowatt hours (kWh).
     *     <p>This parameter co-exists with **maxChargeInkWh** parameter.
     *     <p>The range of values allowed are 0.0 to **maxChargeInkWh**.
     *     <p>Sensible Values : 43.
     * @param maxChargeInKwH Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in
     *     the vehicle's battery.
     *     <p>This parameter co-exists with **currentChargeInkWh** parameter.
     *     <p>Minimum value has to be greater than or equal to **currentChargeInkWh**.
     *     <p>Sensible Values : 85.
     * @param auxiliaryPowerInKw Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts
     *     (kW).
     *     <p>It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
     *     <p>Sensible Values : 1.7.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @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<Response<RouteRangeResult>> getRouteRangeWithResponseAsync(
            ResponseFormat format,
            List<Double> query,
            Double fuelBudgetInLiters,
            Double energyBudgetInKwH,
            Double timeBudgetInSec,
            Double distanceBudgetInMeters,
            OffsetDateTime departAt,
            RouteType routeType,
            Boolean useTrafficData,
            List<RouteAvoidType> avoid,
            TravelMode travelMode,
            InclineLevel inclineLevel,
            WindingnessLevel windingness,
            Integer vehicleAxleWeight,
            Double vehicleWidth,
            Double vehicleHeight,
            Double vehicleLength,
            Integer vehicleMaxSpeed,
            Integer vehicleWeight,
            Boolean isCommercialVehicle,
            VehicleLoadType vehicleLoadType,
            VehicleEngineType vehicleEngineType,
            String constantSpeedConsumptionInLitersPerHundredKm,
            Double currentFuelInLiters,
            Double auxiliaryPowerInLitersPerHour,
            Double fuelEnergyDensityInMegajoulesPerLiter,
            Double accelerationEfficiency,
            Double decelerationEfficiency,
            Double uphillEfficiency,
            Double downhillEfficiency,
            String constantSpeedConsumptionInKwHPerHundredKm,
            Double currentChargeInKwH,
            Double maxChargeInKwH,
            Double auxiliaryPowerInKw) {
        final String accept = "application/json";
        String queryConverted =
                JacksonAdapter.createDefaultSerializerAdapter().serializeList(query, CollectionFormat.CSV);
        List<String> avoidConverted =
                (avoid == null)
                        ? new ArrayList<>()
                        : avoid.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList());
        return FluxUtil.withContext(
                context ->
                        service.getRouteRange(
                                this.client.getHost(),
                                this.client.getClientId(),
                                this.client.getApiVersion(),
                                format,
                                queryConverted,
                                fuelBudgetInLiters,
                                energyBudgetInKwH,
                                timeBudgetInSec,
                                distanceBudgetInMeters,
                                departAt,
                                routeType,
                                useTrafficData,
                                avoidConverted,
                                travelMode,
                                inclineLevel,
                                windingness,
                                vehicleAxleWeight,
                                vehicleWidth,
                                vehicleHeight,
                                vehicleLength,
                                vehicleMaxSpeed,
                                vehicleWeight,
                                isCommercialVehicle,
                                vehicleLoadType,
                                vehicleEngineType,
                                constantSpeedConsumptionInLitersPerHundredKm,
                                currentFuelInLiters,
                                auxiliaryPowerInLitersPerHour,
                                fuelEnergyDensityInMegajoulesPerLiter,
                                accelerationEfficiency,
                                decelerationEfficiency,
                                uphillEfficiency,
                                downhillEfficiency,
                                constantSpeedConsumptionInKwHPerHundredKm,
                                currentChargeInKwH,
                                maxChargeInKwH,
                                auxiliaryPowerInKw,
                                accept,
                                context));
    }

    /**
     * __Route Range (Isochrone) API__
     *
     * <p>**Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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.
     *
     * <p>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.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The Coordinate from which the range calculation should start.
     * @param fuelBudgetInLiters Fuel budget in liters that determines maximal range which can be travelled using the
     *     specified Combustion Consumption Model.&lt;br&gt; When fuelBudgetInLiters is used, it is mandatory to specify
     *     a detailed Combustion Consumption Model.&lt;br&gt; Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh,
     *     timeBudgetInSec, or distanceBudgetInMeters) must be used.
     * @param energyBudgetInKwH Electric energy budget in kilowatt hours (kWh) that determines maximal range which can
     *     be travelled using the specified Electric Consumption Model.&lt;br&gt; When energyBudgetInkWh is used, it is
     *     mandatory to specify a detailed Electric Consumption Model.&lt;br&gt; Exactly one budget (fuelBudgetInLiters,
     *     energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used.
     * @param timeBudgetInSec 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.&lt;br&gt; Exactly one budget
     *     (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used.
     * @param distanceBudgetInMeters 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.&lt;br&gt;
     *     Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must
     *     be used.
     * @param departAt 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).
     * @param routeType The type of route requested.
     * @param useTrafficData 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.
     * @param avoid Specifies something that the route calculation should try to avoid when determining the route. Can
     *     be specified multiple times in one request, for example,
     *     '&amp;avoid=motorways&amp;avoid=tollRoads&amp;avoid=ferries'. In calculateReachableRange requests, the value
     *     alreadyUsedRoads must not be used.
     * @param travelMode 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.
     * @param inclineLevel Degree of hilliness for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param windingness Level of turns for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param vehicleAxleWeight Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per
     *     axle are not considered.
     * @param vehicleWidth Width of the vehicle in meters. A value of 0 means that width restrictions are not
     *     considered.
     * @param vehicleHeight Height of the vehicle in meters. A value of 0 means that height restrictions are not
     *     considered.
     * @param vehicleLength Length of the vehicle in meters. A value of 0 means that length restrictions are not
     *     considered.
     * @param vehicleMaxSpeed 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.
     *     <p>* A value of 0 means that an appropriate value for the vehicle will be determined and applied during route
     *     planning.
     *     <p>* 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.
     * @param vehicleWeight Weight of the vehicle in kilograms.
     *     <p>* It is mandatory if any of the *Efficiency parameters are set.
     *     <p>* It must be strictly positive when used in the context of the Consumption Model. Weight restrictions are
     *     considered.
     *     <p>* If no detailed **Consumption Model** is specified and the value of **vehicleWeight** is non-zero, then
     *     weight restrictions are considered.
     *     <p>* In all other cases, this parameter is ignored.
     *     <p>Sensible Values : for **Combustion Model** : 1600, for **Electric Model** : 1900.
     * @param isCommercialVehicle Whether the vehicle is used for commercial purposes. Commercial vehicles may not be
     *     allowed to drive on some roads.
     * @param vehicleLoadType 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.
     * @param vehicleEngineType Engine type of the vehicle. When a detailed Consumption Model is specified, it must be
     *     consistent with the value of **vehicleEngineType**.
     * @param constantSpeedConsumptionInLitersPerHundredKm Specifies the speed-dependent component of consumption.
     *     <p>Provided as an unordered list of colon-delimited speed &amp; consumption-rate pairs. The list defines
     *     points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
     *     <p>* by linear interpolation, if the given speed lies in between two speeds in the list
     *     <p>* by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest
     *     two points in the list
     *     <p>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.
     *     <p>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.
     *     <p>Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative
     *     consumption rate for any smaller speed.
     *     <p>The valid range for the consumption values(expressed in l/100km) is between 0.01 and 100000.0.
     *     <p>Sensible Values : 50,6.3:130,11.5
     *     <p>**Note** : This parameter is required for **The Combustion Consumption Model**.
     * @param currentFuelInLiters Specifies the current supply of fuel in liters.
     *     <p>Sensible Values : 55.
     * @param auxiliaryPowerInLitersPerHour Specifies the amount of fuel consumed for sustaining auxiliary systems of
     *     the vehicle, in liters per hour.
     *     <p>It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
     *     <p>Sensible Values : 0.2.
     * @param fuelEnergyDensityInMegajoulesPerLiter 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.
     *     <p>This parameter is required if any ***Efficiency** parameter is set.
     *     <p>Sensible Values : 34.2.
     * @param accelerationEfficiency 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**.
     *     <p>Must be paired with **decelerationEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**decelerationEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.33, for **Electric Model** : 0.66.
     * @param decelerationEfficiency 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**.
     *     <p>Must be paired with **accelerationEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**accelerationEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.83, for **Electric Model** : 0.91.
     * @param uphillEfficiency 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**.
     *     <p>Must be paired with **downhillEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**downhillEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.27, for **Electric Model** : 0.74.
     * @param downhillEfficiency 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**.
     *     <p>Must be paired with **uphillEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**uphillEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.51, for **Electric Model** : 0.73.
     * @param constantSpeedConsumptionInKwHPerHundredKm Specifies the speed-dependent component of consumption.
     *     <p>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:
     *     <p>* by linear interpolation, if the given speed lies in between two speeds in the list
     *     <p>* by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest
     *     two points in the list
     *     <p>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.
     *     <p>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.
     *     <p>Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative
     *     consumption rate for any smaller speed.
     *     <p>The valid range for the consumption values(expressed in kWh/100km) is between 0.01 and 100000.0.
     *     <p>Sensible Values : 50,8.2:130,21.3
     *     <p>This parameter is required for **Electric consumption model**.
     * @param currentChargeInKwH Specifies the current electric energy supply in kilowatt hours (kWh).
     *     <p>This parameter co-exists with **maxChargeInkWh** parameter.
     *     <p>The range of values allowed are 0.0 to **maxChargeInkWh**.
     *     <p>Sensible Values : 43.
     * @param maxChargeInKwH Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in
     *     the vehicle's battery.
     *     <p>This parameter co-exists with **currentChargeInkWh** parameter.
     *     <p>Minimum value has to be greater than or equal to **currentChargeInkWh**.
     *     <p>Sensible Values : 85.
     * @param auxiliaryPowerInKw Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts
     *     (kW).
     *     <p>It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
     *     <p>Sensible Values : 1.7.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @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<Response<RouteRangeResult>> getRouteRangeWithResponseAsync(
            ResponseFormat format,
            List<Double> query,
            Double fuelBudgetInLiters,
            Double energyBudgetInKwH,
            Double timeBudgetInSec,
            Double distanceBudgetInMeters,
            OffsetDateTime departAt,
            RouteType routeType,
            Boolean useTrafficData,
            List<RouteAvoidType> avoid,
            TravelMode travelMode,
            InclineLevel inclineLevel,
            WindingnessLevel windingness,
            Integer vehicleAxleWeight,
            Double vehicleWidth,
            Double vehicleHeight,
            Double vehicleLength,
            Integer vehicleMaxSpeed,
            Integer vehicleWeight,
            Boolean isCommercialVehicle,
            VehicleLoadType vehicleLoadType,
            VehicleEngineType vehicleEngineType,
            String constantSpeedConsumptionInLitersPerHundredKm,
            Double currentFuelInLiters,
            Double auxiliaryPowerInLitersPerHour,
            Double fuelEnergyDensityInMegajoulesPerLiter,
            Double accelerationEfficiency,
            Double decelerationEfficiency,
            Double uphillEfficiency,
            Double downhillEfficiency,
            String constantSpeedConsumptionInKwHPerHundredKm,
            Double currentChargeInKwH,
            Double maxChargeInKwH,
            Double auxiliaryPowerInKw,
            Context context) {
        final String accept = "application/json";
        String queryConverted =
                JacksonAdapter.createDefaultSerializerAdapter().serializeList(query, CollectionFormat.CSV);
        List<String> avoidConverted =
                (avoid == null)
                        ? new ArrayList<>()
                        : avoid.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList());
        return service.getRouteRange(
                this.client.getHost(),
                this.client.getClientId(),
                this.client.getApiVersion(),
                format,
                queryConverted,
                fuelBudgetInLiters,
                energyBudgetInKwH,
                timeBudgetInSec,
                distanceBudgetInMeters,
                departAt,
                routeType,
                useTrafficData,
                avoidConverted,
                travelMode,
                inclineLevel,
                windingness,
                vehicleAxleWeight,
                vehicleWidth,
                vehicleHeight,
                vehicleLength,
                vehicleMaxSpeed,
                vehicleWeight,
                isCommercialVehicle,
                vehicleLoadType,
                vehicleEngineType,
                constantSpeedConsumptionInLitersPerHundredKm,
                currentFuelInLiters,
                auxiliaryPowerInLitersPerHour,
                fuelEnergyDensityInMegajoulesPerLiter,
                accelerationEfficiency,
                decelerationEfficiency,
                uphillEfficiency,
                downhillEfficiency,
                constantSpeedConsumptionInKwHPerHundredKm,
                currentChargeInKwH,
                maxChargeInKwH,
                auxiliaryPowerInKw,
                accept,
                context);
    }

    /**
     * __Route Range (Isochrone) API__
     *
     * <p>**Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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.
     *
     * <p>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.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The Coordinate from which the range calculation should start.
     * @param fuelBudgetInLiters Fuel budget in liters that determines maximal range which can be travelled using the
     *     specified Combustion Consumption Model.&lt;br&gt; When fuelBudgetInLiters is used, it is mandatory to specify
     *     a detailed Combustion Consumption Model.&lt;br&gt; Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh,
     *     timeBudgetInSec, or distanceBudgetInMeters) must be used.
     * @param energyBudgetInKwH Electric energy budget in kilowatt hours (kWh) that determines maximal range which can
     *     be travelled using the specified Electric Consumption Model.&lt;br&gt; When energyBudgetInkWh is used, it is
     *     mandatory to specify a detailed Electric Consumption Model.&lt;br&gt; Exactly one budget (fuelBudgetInLiters,
     *     energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used.
     * @param timeBudgetInSec 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.&lt;br&gt; Exactly one budget
     *     (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used.
     * @param distanceBudgetInMeters 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.&lt;br&gt;
     *     Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must
     *     be used.
     * @param departAt 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).
     * @param routeType The type of route requested.
     * @param useTrafficData 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.
     * @param avoid Specifies something that the route calculation should try to avoid when determining the route. Can
     *     be specified multiple times in one request, for example,
     *     '&amp;avoid=motorways&amp;avoid=tollRoads&amp;avoid=ferries'. In calculateReachableRange requests, the value
     *     alreadyUsedRoads must not be used.
     * @param travelMode 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.
     * @param inclineLevel Degree of hilliness for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param windingness Level of turns for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param vehicleAxleWeight Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per
     *     axle are not considered.
     * @param vehicleWidth Width of the vehicle in meters. A value of 0 means that width restrictions are not
     *     considered.
     * @param vehicleHeight Height of the vehicle in meters. A value of 0 means that height restrictions are not
     *     considered.
     * @param vehicleLength Length of the vehicle in meters. A value of 0 means that length restrictions are not
     *     considered.
     * @param vehicleMaxSpeed 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.
     *     <p>* A value of 0 means that an appropriate value for the vehicle will be determined and applied during route
     *     planning.
     *     <p>* 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.
     * @param vehicleWeight Weight of the vehicle in kilograms.
     *     <p>* It is mandatory if any of the *Efficiency parameters are set.
     *     <p>* It must be strictly positive when used in the context of the Consumption Model. Weight restrictions are
     *     considered.
     *     <p>* If no detailed **Consumption Model** is specified and the value of **vehicleWeight** is non-zero, then
     *     weight restrictions are considered.
     *     <p>* In all other cases, this parameter is ignored.
     *     <p>Sensible Values : for **Combustion Model** : 1600, for **Electric Model** : 1900.
     * @param isCommercialVehicle Whether the vehicle is used for commercial purposes. Commercial vehicles may not be
     *     allowed to drive on some roads.
     * @param vehicleLoadType 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.
     * @param vehicleEngineType Engine type of the vehicle. When a detailed Consumption Model is specified, it must be
     *     consistent with the value of **vehicleEngineType**.
     * @param constantSpeedConsumptionInLitersPerHundredKm Specifies the speed-dependent component of consumption.
     *     <p>Provided as an unordered list of colon-delimited speed &amp; consumption-rate pairs. The list defines
     *     points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
     *     <p>* by linear interpolation, if the given speed lies in between two speeds in the list
     *     <p>* by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest
     *     two points in the list
     *     <p>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.
     *     <p>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.
     *     <p>Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative
     *     consumption rate for any smaller speed.
     *     <p>The valid range for the consumption values(expressed in l/100km) is between 0.01 and 100000.0.
     *     <p>Sensible Values : 50,6.3:130,11.5
     *     <p>**Note** : This parameter is required for **The Combustion Consumption Model**.
     * @param currentFuelInLiters Specifies the current supply of fuel in liters.
     *     <p>Sensible Values : 55.
     * @param auxiliaryPowerInLitersPerHour Specifies the amount of fuel consumed for sustaining auxiliary systems of
     *     the vehicle, in liters per hour.
     *     <p>It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
     *     <p>Sensible Values : 0.2.
     * @param fuelEnergyDensityInMegajoulesPerLiter 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.
     *     <p>This parameter is required if any ***Efficiency** parameter is set.
     *     <p>Sensible Values : 34.2.
     * @param accelerationEfficiency 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**.
     *     <p>Must be paired with **decelerationEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**decelerationEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.33, for **Electric Model** : 0.66.
     * @param decelerationEfficiency 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**.
     *     <p>Must be paired with **accelerationEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**accelerationEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.83, for **Electric Model** : 0.91.
     * @param uphillEfficiency 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**.
     *     <p>Must be paired with **downhillEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**downhillEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.27, for **Electric Model** : 0.74.
     * @param downhillEfficiency 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**.
     *     <p>Must be paired with **uphillEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**uphillEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.51, for **Electric Model** : 0.73.
     * @param constantSpeedConsumptionInKwHPerHundredKm Specifies the speed-dependent component of consumption.
     *     <p>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:
     *     <p>* by linear interpolation, if the given speed lies in between two speeds in the list
     *     <p>* by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest
     *     two points in the list
     *     <p>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.
     *     <p>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.
     *     <p>Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative
     *     consumption rate for any smaller speed.
     *     <p>The valid range for the consumption values(expressed in kWh/100km) is between 0.01 and 100000.0.
     *     <p>Sensible Values : 50,8.2:130,21.3
     *     <p>This parameter is required for **Electric consumption model**.
     * @param currentChargeInKwH Specifies the current electric energy supply in kilowatt hours (kWh).
     *     <p>This parameter co-exists with **maxChargeInkWh** parameter.
     *     <p>The range of values allowed are 0.0 to **maxChargeInkWh**.
     *     <p>Sensible Values : 43.
     * @param maxChargeInKwH Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in
     *     the vehicle's battery.
     *     <p>This parameter co-exists with **currentChargeInkWh** parameter.
     *     <p>Minimum value has to be greater than or equal to **currentChargeInkWh**.
     *     <p>Sensible Values : 85.
     * @param auxiliaryPowerInKw Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts
     *     (kW).
     *     <p>It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
     *     <p>Sensible Values : 1.7.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Route Reachable Range call on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<RouteRangeResult> getRouteRangeAsync(
            ResponseFormat format,
            List<Double> query,
            Double fuelBudgetInLiters,
            Double energyBudgetInKwH,
            Double timeBudgetInSec,
            Double distanceBudgetInMeters,
            OffsetDateTime departAt,
            RouteType routeType,
            Boolean useTrafficData,
            List<RouteAvoidType> avoid,
            TravelMode travelMode,
            InclineLevel inclineLevel,
            WindingnessLevel windingness,
            Integer vehicleAxleWeight,
            Double vehicleWidth,
            Double vehicleHeight,
            Double vehicleLength,
            Integer vehicleMaxSpeed,
            Integer vehicleWeight,
            Boolean isCommercialVehicle,
            VehicleLoadType vehicleLoadType,
            VehicleEngineType vehicleEngineType,
            String constantSpeedConsumptionInLitersPerHundredKm,
            Double currentFuelInLiters,
            Double auxiliaryPowerInLitersPerHour,
            Double fuelEnergyDensityInMegajoulesPerLiter,
            Double accelerationEfficiency,
            Double decelerationEfficiency,
            Double uphillEfficiency,
            Double downhillEfficiency,
            String constantSpeedConsumptionInKwHPerHundredKm,
            Double currentChargeInKwH,
            Double maxChargeInKwH,
            Double auxiliaryPowerInKw) {
        return getRouteRangeWithResponseAsync(
                        format,
                        query,
                        fuelBudgetInLiters,
                        energyBudgetInKwH,
                        timeBudgetInSec,
                        distanceBudgetInMeters,
                        departAt,
                        routeType,
                        useTrafficData,
                        avoid,
                        travelMode,
                        inclineLevel,
                        windingness,
                        vehicleAxleWeight,
                        vehicleWidth,
                        vehicleHeight,
                        vehicleLength,
                        vehicleMaxSpeed,
                        vehicleWeight,
                        isCommercialVehicle,
                        vehicleLoadType,
                        vehicleEngineType,
                        constantSpeedConsumptionInLitersPerHundredKm,
                        currentFuelInLiters,
                        auxiliaryPowerInLitersPerHour,
                        fuelEnergyDensityInMegajoulesPerLiter,
                        accelerationEfficiency,
                        decelerationEfficiency,
                        uphillEfficiency,
                        downhillEfficiency,
                        constantSpeedConsumptionInKwHPerHundredKm,
                        currentChargeInKwH,
                        maxChargeInKwH,
                        auxiliaryPowerInKw)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * __Route Range (Isochrone) API__
     *
     * <p>**Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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.
     *
     * <p>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.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The Coordinate from which the range calculation should start.
     * @param fuelBudgetInLiters Fuel budget in liters that determines maximal range which can be travelled using the
     *     specified Combustion Consumption Model.&lt;br&gt; When fuelBudgetInLiters is used, it is mandatory to specify
     *     a detailed Combustion Consumption Model.&lt;br&gt; Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh,
     *     timeBudgetInSec, or distanceBudgetInMeters) must be used.
     * @param energyBudgetInKwH Electric energy budget in kilowatt hours (kWh) that determines maximal range which can
     *     be travelled using the specified Electric Consumption Model.&lt;br&gt; When energyBudgetInkWh is used, it is
     *     mandatory to specify a detailed Electric Consumption Model.&lt;br&gt; Exactly one budget (fuelBudgetInLiters,
     *     energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used.
     * @param timeBudgetInSec 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.&lt;br&gt; Exactly one budget
     *     (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used.
     * @param distanceBudgetInMeters 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.&lt;br&gt;
     *     Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must
     *     be used.
     * @param departAt 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).
     * @param routeType The type of route requested.
     * @param useTrafficData 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.
     * @param avoid Specifies something that the route calculation should try to avoid when determining the route. Can
     *     be specified multiple times in one request, for example,
     *     '&amp;avoid=motorways&amp;avoid=tollRoads&amp;avoid=ferries'. In calculateReachableRange requests, the value
     *     alreadyUsedRoads must not be used.
     * @param travelMode 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.
     * @param inclineLevel Degree of hilliness for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param windingness Level of turns for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param vehicleAxleWeight Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per
     *     axle are not considered.
     * @param vehicleWidth Width of the vehicle in meters. A value of 0 means that width restrictions are not
     *     considered.
     * @param vehicleHeight Height of the vehicle in meters. A value of 0 means that height restrictions are not
     *     considered.
     * @param vehicleLength Length of the vehicle in meters. A value of 0 means that length restrictions are not
     *     considered.
     * @param vehicleMaxSpeed 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.
     *     <p>* A value of 0 means that an appropriate value for the vehicle will be determined and applied during route
     *     planning.
     *     <p>* 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.
     * @param vehicleWeight Weight of the vehicle in kilograms.
     *     <p>* It is mandatory if any of the *Efficiency parameters are set.
     *     <p>* It must be strictly positive when used in the context of the Consumption Model. Weight restrictions are
     *     considered.
     *     <p>* If no detailed **Consumption Model** is specified and the value of **vehicleWeight** is non-zero, then
     *     weight restrictions are considered.
     *     <p>* In all other cases, this parameter is ignored.
     *     <p>Sensible Values : for **Combustion Model** : 1600, for **Electric Model** : 1900.
     * @param isCommercialVehicle Whether the vehicle is used for commercial purposes. Commercial vehicles may not be
     *     allowed to drive on some roads.
     * @param vehicleLoadType 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.
     * @param vehicleEngineType Engine type of the vehicle. When a detailed Consumption Model is specified, it must be
     *     consistent with the value of **vehicleEngineType**.
     * @param constantSpeedConsumptionInLitersPerHundredKm Specifies the speed-dependent component of consumption.
     *     <p>Provided as an unordered list of colon-delimited speed &amp; consumption-rate pairs. The list defines
     *     points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
     *     <p>* by linear interpolation, if the given speed lies in between two speeds in the list
     *     <p>* by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest
     *     two points in the list
     *     <p>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.
     *     <p>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.
     *     <p>Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative
     *     consumption rate for any smaller speed.
     *     <p>The valid range for the consumption values(expressed in l/100km) is between 0.01 and 100000.0.
     *     <p>Sensible Values : 50,6.3:130,11.5
     *     <p>**Note** : This parameter is required for **The Combustion Consumption Model**.
     * @param currentFuelInLiters Specifies the current supply of fuel in liters.
     *     <p>Sensible Values : 55.
     * @param auxiliaryPowerInLitersPerHour Specifies the amount of fuel consumed for sustaining auxiliary systems of
     *     the vehicle, in liters per hour.
     *     <p>It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
     *     <p>Sensible Values : 0.2.
     * @param fuelEnergyDensityInMegajoulesPerLiter 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.
     *     <p>This parameter is required if any ***Efficiency** parameter is set.
     *     <p>Sensible Values : 34.2.
     * @param accelerationEfficiency 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**.
     *     <p>Must be paired with **decelerationEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**decelerationEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.33, for **Electric Model** : 0.66.
     * @param decelerationEfficiency 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**.
     *     <p>Must be paired with **accelerationEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**accelerationEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.83, for **Electric Model** : 0.91.
     * @param uphillEfficiency 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**.
     *     <p>Must be paired with **downhillEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**downhillEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.27, for **Electric Model** : 0.74.
     * @param downhillEfficiency 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**.
     *     <p>Must be paired with **uphillEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**uphillEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.51, for **Electric Model** : 0.73.
     * @param constantSpeedConsumptionInKwHPerHundredKm Specifies the speed-dependent component of consumption.
     *     <p>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:
     *     <p>* by linear interpolation, if the given speed lies in between two speeds in the list
     *     <p>* by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest
     *     two points in the list
     *     <p>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.
     *     <p>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.
     *     <p>Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative
     *     consumption rate for any smaller speed.
     *     <p>The valid range for the consumption values(expressed in kWh/100km) is between 0.01 and 100000.0.
     *     <p>Sensible Values : 50,8.2:130,21.3
     *     <p>This parameter is required for **Electric consumption model**.
     * @param currentChargeInKwH Specifies the current electric energy supply in kilowatt hours (kWh).
     *     <p>This parameter co-exists with **maxChargeInkWh** parameter.
     *     <p>The range of values allowed are 0.0 to **maxChargeInkWh**.
     *     <p>Sensible Values : 43.
     * @param maxChargeInKwH Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in
     *     the vehicle's battery.
     *     <p>This parameter co-exists with **currentChargeInkWh** parameter.
     *     <p>Minimum value has to be greater than or equal to **currentChargeInkWh**.
     *     <p>Sensible Values : 85.
     * @param auxiliaryPowerInKw Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts
     *     (kW).
     *     <p>It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
     *     <p>Sensible Values : 1.7.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Route Reachable Range call on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<RouteRangeResult> getRouteRangeAsync(
            ResponseFormat format,
            List<Double> query,
            Double fuelBudgetInLiters,
            Double energyBudgetInKwH,
            Double timeBudgetInSec,
            Double distanceBudgetInMeters,
            OffsetDateTime departAt,
            RouteType routeType,
            Boolean useTrafficData,
            List<RouteAvoidType> avoid,
            TravelMode travelMode,
            InclineLevel inclineLevel,
            WindingnessLevel windingness,
            Integer vehicleAxleWeight,
            Double vehicleWidth,
            Double vehicleHeight,
            Double vehicleLength,
            Integer vehicleMaxSpeed,
            Integer vehicleWeight,
            Boolean isCommercialVehicle,
            VehicleLoadType vehicleLoadType,
            VehicleEngineType vehicleEngineType,
            String constantSpeedConsumptionInLitersPerHundredKm,
            Double currentFuelInLiters,
            Double auxiliaryPowerInLitersPerHour,
            Double fuelEnergyDensityInMegajoulesPerLiter,
            Double accelerationEfficiency,
            Double decelerationEfficiency,
            Double uphillEfficiency,
            Double downhillEfficiency,
            String constantSpeedConsumptionInKwHPerHundredKm,
            Double currentChargeInKwH,
            Double maxChargeInKwH,
            Double auxiliaryPowerInKw,
            Context context) {
        return getRouteRangeWithResponseAsync(
                        format,
                        query,
                        fuelBudgetInLiters,
                        energyBudgetInKwH,
                        timeBudgetInSec,
                        distanceBudgetInMeters,
                        departAt,
                        routeType,
                        useTrafficData,
                        avoid,
                        travelMode,
                        inclineLevel,
                        windingness,
                        vehicleAxleWeight,
                        vehicleWidth,
                        vehicleHeight,
                        vehicleLength,
                        vehicleMaxSpeed,
                        vehicleWeight,
                        isCommercialVehicle,
                        vehicleLoadType,
                        vehicleEngineType,
                        constantSpeedConsumptionInLitersPerHundredKm,
                        currentFuelInLiters,
                        auxiliaryPowerInLitersPerHour,
                        fuelEnergyDensityInMegajoulesPerLiter,
                        accelerationEfficiency,
                        decelerationEfficiency,
                        uphillEfficiency,
                        downhillEfficiency,
                        constantSpeedConsumptionInKwHPerHundredKm,
                        currentChargeInKwH,
                        maxChargeInKwH,
                        auxiliaryPowerInKw,
                        context)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * __Route Range (Isochrone) API__
     *
     * <p>**Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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.
     *
     * <p>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.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The Coordinate from which the range calculation should start.
     * @param fuelBudgetInLiters Fuel budget in liters that determines maximal range which can be travelled using the
     *     specified Combustion Consumption Model.&lt;br&gt; When fuelBudgetInLiters is used, it is mandatory to specify
     *     a detailed Combustion Consumption Model.&lt;br&gt; Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh,
     *     timeBudgetInSec, or distanceBudgetInMeters) must be used.
     * @param energyBudgetInKwH Electric energy budget in kilowatt hours (kWh) that determines maximal range which can
     *     be travelled using the specified Electric Consumption Model.&lt;br&gt; When energyBudgetInkWh is used, it is
     *     mandatory to specify a detailed Electric Consumption Model.&lt;br&gt; Exactly one budget (fuelBudgetInLiters,
     *     energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used.
     * @param timeBudgetInSec 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.&lt;br&gt; Exactly one budget
     *     (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used.
     * @param distanceBudgetInMeters 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.&lt;br&gt;
     *     Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must
     *     be used.
     * @param departAt 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).
     * @param routeType The type of route requested.
     * @param useTrafficData 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.
     * @param avoid Specifies something that the route calculation should try to avoid when determining the route. Can
     *     be specified multiple times in one request, for example,
     *     '&amp;avoid=motorways&amp;avoid=tollRoads&amp;avoid=ferries'. In calculateReachableRange requests, the value
     *     alreadyUsedRoads must not be used.
     * @param travelMode 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.
     * @param inclineLevel Degree of hilliness for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param windingness Level of turns for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param vehicleAxleWeight Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per
     *     axle are not considered.
     * @param vehicleWidth Width of the vehicle in meters. A value of 0 means that width restrictions are not
     *     considered.
     * @param vehicleHeight Height of the vehicle in meters. A value of 0 means that height restrictions are not
     *     considered.
     * @param vehicleLength Length of the vehicle in meters. A value of 0 means that length restrictions are not
     *     considered.
     * @param vehicleMaxSpeed 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.
     *     <p>* A value of 0 means that an appropriate value for the vehicle will be determined and applied during route
     *     planning.
     *     <p>* 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.
     * @param vehicleWeight Weight of the vehicle in kilograms.
     *     <p>* It is mandatory if any of the *Efficiency parameters are set.
     *     <p>* It must be strictly positive when used in the context of the Consumption Model. Weight restrictions are
     *     considered.
     *     <p>* If no detailed **Consumption Model** is specified and the value of **vehicleWeight** is non-zero, then
     *     weight restrictions are considered.
     *     <p>* In all other cases, this parameter is ignored.
     *     <p>Sensible Values : for **Combustion Model** : 1600, for **Electric Model** : 1900.
     * @param isCommercialVehicle Whether the vehicle is used for commercial purposes. Commercial vehicles may not be
     *     allowed to drive on some roads.
     * @param vehicleLoadType 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.
     * @param vehicleEngineType Engine type of the vehicle. When a detailed Consumption Model is specified, it must be
     *     consistent with the value of **vehicleEngineType**.
     * @param constantSpeedConsumptionInLitersPerHundredKm Specifies the speed-dependent component of consumption.
     *     <p>Provided as an unordered list of colon-delimited speed &amp; consumption-rate pairs. The list defines
     *     points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
     *     <p>* by linear interpolation, if the given speed lies in between two speeds in the list
     *     <p>* by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest
     *     two points in the list
     *     <p>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.
     *     <p>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.
     *     <p>Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative
     *     consumption rate for any smaller speed.
     *     <p>The valid range for the consumption values(expressed in l/100km) is between 0.01 and 100000.0.
     *     <p>Sensible Values : 50,6.3:130,11.5
     *     <p>**Note** : This parameter is required for **The Combustion Consumption Model**.
     * @param currentFuelInLiters Specifies the current supply of fuel in liters.
     *     <p>Sensible Values : 55.
     * @param auxiliaryPowerInLitersPerHour Specifies the amount of fuel consumed for sustaining auxiliary systems of
     *     the vehicle, in liters per hour.
     *     <p>It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
     *     <p>Sensible Values : 0.2.
     * @param fuelEnergyDensityInMegajoulesPerLiter 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.
     *     <p>This parameter is required if any ***Efficiency** parameter is set.
     *     <p>Sensible Values : 34.2.
     * @param accelerationEfficiency 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**.
     *     <p>Must be paired with **decelerationEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**decelerationEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.33, for **Electric Model** : 0.66.
     * @param decelerationEfficiency 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**.
     *     <p>Must be paired with **accelerationEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**accelerationEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.83, for **Electric Model** : 0.91.
     * @param uphillEfficiency 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**.
     *     <p>Must be paired with **downhillEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**downhillEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.27, for **Electric Model** : 0.74.
     * @param downhillEfficiency 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**.
     *     <p>Must be paired with **uphillEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**uphillEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.51, for **Electric Model** : 0.73.
     * @param constantSpeedConsumptionInKwHPerHundredKm Specifies the speed-dependent component of consumption.
     *     <p>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:
     *     <p>* by linear interpolation, if the given speed lies in between two speeds in the list
     *     <p>* by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest
     *     two points in the list
     *     <p>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.
     *     <p>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.
     *     <p>Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative
     *     consumption rate for any smaller speed.
     *     <p>The valid range for the consumption values(expressed in kWh/100km) is between 0.01 and 100000.0.
     *     <p>Sensible Values : 50,8.2:130,21.3
     *     <p>This parameter is required for **Electric consumption model**.
     * @param currentChargeInKwH Specifies the current electric energy supply in kilowatt hours (kWh).
     *     <p>This parameter co-exists with **maxChargeInkWh** parameter.
     *     <p>The range of values allowed are 0.0 to **maxChargeInkWh**.
     *     <p>Sensible Values : 43.
     * @param maxChargeInKwH Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in
     *     the vehicle's battery.
     *     <p>This parameter co-exists with **currentChargeInkWh** parameter.
     *     <p>Minimum value has to be greater than or equal to **currentChargeInkWh**.
     *     <p>Sensible Values : 85.
     * @param auxiliaryPowerInKw Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts
     *     (kW).
     *     <p>It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
     *     <p>Sensible Values : 1.7.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Route Reachable Range call.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public RouteRangeResult getRouteRange(
            ResponseFormat format,
            List<Double> query,
            Double fuelBudgetInLiters,
            Double energyBudgetInKwH,
            Double timeBudgetInSec,
            Double distanceBudgetInMeters,
            OffsetDateTime departAt,
            RouteType routeType,
            Boolean useTrafficData,
            List<RouteAvoidType> avoid,
            TravelMode travelMode,
            InclineLevel inclineLevel,
            WindingnessLevel windingness,
            Integer vehicleAxleWeight,
            Double vehicleWidth,
            Double vehicleHeight,
            Double vehicleLength,
            Integer vehicleMaxSpeed,
            Integer vehicleWeight,
            Boolean isCommercialVehicle,
            VehicleLoadType vehicleLoadType,
            VehicleEngineType vehicleEngineType,
            String constantSpeedConsumptionInLitersPerHundredKm,
            Double currentFuelInLiters,
            Double auxiliaryPowerInLitersPerHour,
            Double fuelEnergyDensityInMegajoulesPerLiter,
            Double accelerationEfficiency,
            Double decelerationEfficiency,
            Double uphillEfficiency,
            Double downhillEfficiency,
            String constantSpeedConsumptionInKwHPerHundredKm,
            Double currentChargeInKwH,
            Double maxChargeInKwH,
            Double auxiliaryPowerInKw) {
        return getRouteRangeAsync(
                        format,
                        query,
                        fuelBudgetInLiters,
                        energyBudgetInKwH,
                        timeBudgetInSec,
                        distanceBudgetInMeters,
                        departAt,
                        routeType,
                        useTrafficData,
                        avoid,
                        travelMode,
                        inclineLevel,
                        windingness,
                        vehicleAxleWeight,
                        vehicleWidth,
                        vehicleHeight,
                        vehicleLength,
                        vehicleMaxSpeed,
                        vehicleWeight,
                        isCommercialVehicle,
                        vehicleLoadType,
                        vehicleEngineType,
                        constantSpeedConsumptionInLitersPerHundredKm,
                        currentFuelInLiters,
                        auxiliaryPowerInLitersPerHour,
                        fuelEnergyDensityInMegajoulesPerLiter,
                        accelerationEfficiency,
                        decelerationEfficiency,
                        uphillEfficiency,
                        downhillEfficiency,
                        constantSpeedConsumptionInKwHPerHundredKm,
                        currentChargeInKwH,
                        maxChargeInKwH,
                        auxiliaryPowerInKw)
                .block();
    }

    /**
     * __Route Range (Isochrone) API__
     *
     * <p>**Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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.
     *
     * <p>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.
     *
     * @param format Desired format of the response. Value can be either _json_ or _xml_.
     * @param query The Coordinate from which the range calculation should start.
     * @param fuelBudgetInLiters Fuel budget in liters that determines maximal range which can be travelled using the
     *     specified Combustion Consumption Model.&lt;br&gt; When fuelBudgetInLiters is used, it is mandatory to specify
     *     a detailed Combustion Consumption Model.&lt;br&gt; Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh,
     *     timeBudgetInSec, or distanceBudgetInMeters) must be used.
     * @param energyBudgetInKwH Electric energy budget in kilowatt hours (kWh) that determines maximal range which can
     *     be travelled using the specified Electric Consumption Model.&lt;br&gt; When energyBudgetInkWh is used, it is
     *     mandatory to specify a detailed Electric Consumption Model.&lt;br&gt; Exactly one budget (fuelBudgetInLiters,
     *     energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used.
     * @param timeBudgetInSec 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.&lt;br&gt; Exactly one budget
     *     (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used.
     * @param distanceBudgetInMeters 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.&lt;br&gt;
     *     Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must
     *     be used.
     * @param departAt 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).
     * @param routeType The type of route requested.
     * @param useTrafficData 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.
     * @param avoid Specifies something that the route calculation should try to avoid when determining the route. Can
     *     be specified multiple times in one request, for example,
     *     '&amp;avoid=motorways&amp;avoid=tollRoads&amp;avoid=ferries'. In calculateReachableRange requests, the value
     *     alreadyUsedRoads must not be used.
     * @param travelMode 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.
     * @param inclineLevel Degree of hilliness for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param windingness Level of turns for thrilling route. This parameter can only be used in conjunction with
     *     `routeType`=thrilling.
     * @param vehicleAxleWeight Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per
     *     axle are not considered.
     * @param vehicleWidth Width of the vehicle in meters. A value of 0 means that width restrictions are not
     *     considered.
     * @param vehicleHeight Height of the vehicle in meters. A value of 0 means that height restrictions are not
     *     considered.
     * @param vehicleLength Length of the vehicle in meters. A value of 0 means that length restrictions are not
     *     considered.
     * @param vehicleMaxSpeed 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.
     *     <p>* A value of 0 means that an appropriate value for the vehicle will be determined and applied during route
     *     planning.
     *     <p>* 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.
     * @param vehicleWeight Weight of the vehicle in kilograms.
     *     <p>* It is mandatory if any of the *Efficiency parameters are set.
     *     <p>* It must be strictly positive when used in the context of the Consumption Model. Weight restrictions are
     *     considered.
     *     <p>* If no detailed **Consumption Model** is specified and the value of **vehicleWeight** is non-zero, then
     *     weight restrictions are considered.
     *     <p>* In all other cases, this parameter is ignored.
     *     <p>Sensible Values : for **Combustion Model** : 1600, for **Electric Model** : 1900.
     * @param isCommercialVehicle Whether the vehicle is used for commercial purposes. Commercial vehicles may not be
     *     allowed to drive on some roads.
     * @param vehicleLoadType 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.
     * @param vehicleEngineType Engine type of the vehicle. When a detailed Consumption Model is specified, it must be
     *     consistent with the value of **vehicleEngineType**.
     * @param constantSpeedConsumptionInLitersPerHundredKm Specifies the speed-dependent component of consumption.
     *     <p>Provided as an unordered list of colon-delimited speed &amp; consumption-rate pairs. The list defines
     *     points on a consumption curve. Consumption rates for speeds not in the list are found as follows:
     *     <p>* by linear interpolation, if the given speed lies in between two speeds in the list
     *     <p>* by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest
     *     two points in the list
     *     <p>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.
     *     <p>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.
     *     <p>Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative
     *     consumption rate for any smaller speed.
     *     <p>The valid range for the consumption values(expressed in l/100km) is between 0.01 and 100000.0.
     *     <p>Sensible Values : 50,6.3:130,11.5
     *     <p>**Note** : This parameter is required for **The Combustion Consumption Model**.
     * @param currentFuelInLiters Specifies the current supply of fuel in liters.
     *     <p>Sensible Values : 55.
     * @param auxiliaryPowerInLitersPerHour Specifies the amount of fuel consumed for sustaining auxiliary systems of
     *     the vehicle, in liters per hour.
     *     <p>It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
     *     <p>Sensible Values : 0.2.
     * @param fuelEnergyDensityInMegajoulesPerLiter 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.
     *     <p>This parameter is required if any ***Efficiency** parameter is set.
     *     <p>Sensible Values : 34.2.
     * @param accelerationEfficiency 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**.
     *     <p>Must be paired with **decelerationEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**decelerationEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.33, for **Electric Model** : 0.66.
     * @param decelerationEfficiency 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**.
     *     <p>Must be paired with **accelerationEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**accelerationEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.83, for **Electric Model** : 0.91.
     * @param uphillEfficiency 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**.
     *     <p>Must be paired with **downhillEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**downhillEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.27, for **Electric Model** : 0.74.
     * @param downhillEfficiency 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**.
     *     <p>Must be paired with **uphillEfficiency**.
     *     <p>The range of values allowed are 0.0 to 1/**uphillEfficiency**.
     *     <p>Sensible Values : for **Combustion Model** : 0.51, for **Electric Model** : 0.73.
     * @param constantSpeedConsumptionInKwHPerHundredKm Specifies the speed-dependent component of consumption.
     *     <p>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:
     *     <p>* by linear interpolation, if the given speed lies in between two speeds in the list
     *     <p>* by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest
     *     two points in the list
     *     <p>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.
     *     <p>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.
     *     <p>Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative
     *     consumption rate for any smaller speed.
     *     <p>The valid range for the consumption values(expressed in kWh/100km) is between 0.01 and 100000.0.
     *     <p>Sensible Values : 50,8.2:130,21.3
     *     <p>This parameter is required for **Electric consumption model**.
     * @param currentChargeInKwH Specifies the current electric energy supply in kilowatt hours (kWh).
     *     <p>This parameter co-exists with **maxChargeInkWh** parameter.
     *     <p>The range of values allowed are 0.0 to **maxChargeInkWh**.
     *     <p>Sensible Values : 43.
     * @param maxChargeInKwH Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in
     *     the vehicle's battery.
     *     <p>This parameter co-exists with **currentChargeInkWh** parameter.
     *     <p>Minimum value has to be greater than or equal to **currentChargeInkWh**.
     *     <p>Sensible Values : 85.
     * @param auxiliaryPowerInKw Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts
     *     (kW).
     *     <p>It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.
     *     <p>Sensible Values : 1.7.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Route Reachable Range call along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<RouteRangeResult> getRouteRangeWithResponse(
            ResponseFormat format,
            List<Double> query,
            Double fuelBudgetInLiters,
            Double energyBudgetInKwH,
            Double timeBudgetInSec,
            Double distanceBudgetInMeters,
            OffsetDateTime departAt,
            RouteType routeType,
            Boolean useTrafficData,
            List<RouteAvoidType> avoid,
            TravelMode travelMode,
            InclineLevel inclineLevel,
            WindingnessLevel windingness,
            Integer vehicleAxleWeight,
            Double vehicleWidth,
            Double vehicleHeight,
            Double vehicleLength,
            Integer vehicleMaxSpeed,
            Integer vehicleWeight,
            Boolean isCommercialVehicle,
            VehicleLoadType vehicleLoadType,
            VehicleEngineType vehicleEngineType,
            String constantSpeedConsumptionInLitersPerHundredKm,
            Double currentFuelInLiters,
            Double auxiliaryPowerInLitersPerHour,
            Double fuelEnergyDensityInMegajoulesPerLiter,
            Double accelerationEfficiency,
            Double decelerationEfficiency,
            Double uphillEfficiency,
            Double downhillEfficiency,
            String constantSpeedConsumptionInKwHPerHundredKm,
            Double currentChargeInKwH,
            Double maxChargeInKwH,
            Double auxiliaryPowerInKw,
            Context context) {
        return getRouteRangeWithResponseAsync(
                        format,
                        query,
                        fuelBudgetInLiters,
                        energyBudgetInKwH,
                        timeBudgetInSec,
                        distanceBudgetInMeters,
                        departAt,
                        routeType,
                        useTrafficData,
                        avoid,
                        travelMode,
                        inclineLevel,
                        windingness,
                        vehicleAxleWeight,
                        vehicleWidth,
                        vehicleHeight,
                        vehicleLength,
                        vehicleMaxSpeed,
                        vehicleWeight,
                        isCommercialVehicle,
                        vehicleLoadType,
                        vehicleEngineType,
                        constantSpeedConsumptionInLitersPerHundredKm,
                        currentFuelInLiters,
                        auxiliaryPowerInLitersPerHour,
                        fuelEnergyDensityInMegajoulesPerLiter,
                        accelerationEfficiency,
                        decelerationEfficiency,
                        uphillEfficiency,
                        downhillEfficiency,
                        constantSpeedConsumptionInKwHPerHundredKm,
                        currentChargeInKwH,
                        maxChargeInKwH,
                        auxiliaryPowerInKw,
                        context)
                .block();
    }

    /**
     * **Route Directions Batch API**
     *
     * <p>**Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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.
     *
     * <p>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.
     *
     * <p>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:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>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:
     *
     * <p>``` 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. &lt;br&gt; 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to
     * download the batch results.
     *
     * <p>### 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:
     *
     * <p>```json { "batchItems": [ { "query":
     * "?query=47.620659,-122.348934:47.610101,-122.342015&amp;travelMode=bicycle&amp;routeType=eco&amp;traffic=false"
     * }, { "query": "?query=40.759856,-73.985108:40.771136,-73.973506&amp;travelMode=pedestrian&amp;routeType=shortest"
     * }, { "query": "?query=48.923159,-122.557362:32.621279,-116.840362" } ] } ```
     *
     * <p>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.
     *
     * <p>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.
     *
     * <p>### 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:
     *
     * <p>```
     * https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0&amp;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:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### 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:
     *
     * <p>- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
     * the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
     *
     * <p>```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." } } } ] } ```.
     *
     * @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.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Route Directions Batch service call on successful completion of
     *     {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<RoutesRequestRouteDirectionsBatchResponse> requestRouteDirectionsBatchWithResponseAsync(
            JsonFormat format, BatchRequest routeDirectionsBatchQueries) {
        final String accept = "application/json";
        return FluxUtil.withContext(
                context ->
                        service.requestRouteDirectionsBatch(
                                this.client.getHost(),
                                this.client.getClientId(),
                                this.client.getApiVersion(),
                                format,
                                routeDirectionsBatchQueries,
                                accept,
                                context));
    }

    /**
     * **Route Directions Batch API**
     *
     * <p>**Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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.
     *
     * <p>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.
     *
     * <p>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:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>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:
     *
     * <p>``` 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. &lt;br&gt; 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to
     * download the batch results.
     *
     * <p>### 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:
     *
     * <p>```json { "batchItems": [ { "query":
     * "?query=47.620659,-122.348934:47.610101,-122.342015&amp;travelMode=bicycle&amp;routeType=eco&amp;traffic=false"
     * }, { "query": "?query=40.759856,-73.985108:40.771136,-73.973506&amp;travelMode=pedestrian&amp;routeType=shortest"
     * }, { "query": "?query=48.923159,-122.557362:32.621279,-116.840362" } ] } ```
     *
     * <p>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.
     *
     * <p>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.
     *
     * <p>### 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:
     *
     * <p>```
     * https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0&amp;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:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### 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:
     *
     * <p>- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
     * the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
     *
     * <p>```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." } } } ] } ```.
     *
     * @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 context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Route Directions Batch service call on successful completion of
     *     {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<RoutesRequestRouteDirectionsBatchResponse> requestRouteDirectionsBatchWithResponseAsync(
            JsonFormat format, BatchRequest routeDirectionsBatchQueries, Context context) {
        final String accept = "application/json";
        return service.requestRouteDirectionsBatch(
                this.client.getHost(),
                this.client.getClientId(),
                this.client.getApiVersion(),
                format,
                routeDirectionsBatchQueries,
                accept,
                context);
    }

    /**
     * **Route Directions Batch API**
     *
     * <p>**Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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.
     *
     * <p>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.
     *
     * <p>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:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>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:
     *
     * <p>``` 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. &lt;br&gt; 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to
     * download the batch results.
     *
     * <p>### 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:
     *
     * <p>```json { "batchItems": [ { "query":
     * "?query=47.620659,-122.348934:47.610101,-122.342015&amp;travelMode=bicycle&amp;routeType=eco&amp;traffic=false"
     * }, { "query": "?query=40.759856,-73.985108:40.771136,-73.973506&amp;travelMode=pedestrian&amp;routeType=shortest"
     * }, { "query": "?query=48.923159,-122.557362:32.621279,-116.840362" } ] } ```
     *
     * <p>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.
     *
     * <p>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.
     *
     * <p>### 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:
     *
     * <p>```
     * https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0&amp;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:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### 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:
     *
     * <p>- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
     * the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
     *
     * <p>```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." } } } ] } ```.
     *
     * @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.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @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<RouteDirectionsBatchResultPrivate, RouteDirectionsBatchResultPrivate>
            beginRequestRouteDirectionsBatchAsync(JsonFormat format, BatchRequest routeDirectionsBatchQueries) {
        return PollerFlux.create(
                Duration.ofSeconds(1),
                () -> this.requestRouteDirectionsBatchWithResponseAsync(format, routeDirectionsBatchQueries),
                new DefaultPollingStrategy<>(this.client.getHttpPipeline(), null, Context.NONE),
                new TypeReferenceRouteDirectionsBatchResultPrivate(),
                new TypeReferenceRouteDirectionsBatchResultPrivate());
    }

    /**
     * **Route Directions Batch API**
     *
     * <p>**Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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.
     *
     * <p>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.
     *
     * <p>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:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>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:
     *
     * <p>``` 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. &lt;br&gt; 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to
     * download the batch results.
     *
     * <p>### 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:
     *
     * <p>```json { "batchItems": [ { "query":
     * "?query=47.620659,-122.348934:47.610101,-122.342015&amp;travelMode=bicycle&amp;routeType=eco&amp;traffic=false"
     * }, { "query": "?query=40.759856,-73.985108:40.771136,-73.973506&amp;travelMode=pedestrian&amp;routeType=shortest"
     * }, { "query": "?query=48.923159,-122.557362:32.621279,-116.840362" } ] } ```
     *
     * <p>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.
     *
     * <p>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.
     *
     * <p>### 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:
     *
     * <p>```
     * https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0&amp;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:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### 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:
     *
     * <p>- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
     * the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
     *
     * <p>```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." } } } ] } ```.
     *
     * @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 context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @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<RouteDirectionsBatchResultPrivate, RouteDirectionsBatchResultPrivate>
            beginRequestRouteDirectionsBatchAsync(
                    JsonFormat format, BatchRequest routeDirectionsBatchQueries, Context context) {
        return PollerFlux.create(
                Duration.ofSeconds(1),
                () -> this.requestRouteDirectionsBatchWithResponseAsync(format, routeDirectionsBatchQueries, context),
                new DefaultPollingStrategy<>(this.client.getHttpPipeline(), null, context),
                new TypeReferenceRouteDirectionsBatchResultPrivate(),
                new TypeReferenceRouteDirectionsBatchResultPrivate());
    }

    /**
     * **Route Directions Batch API**
     *
     * <p>**Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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.
     *
     * <p>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.
     *
     * <p>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:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>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:
     *
     * <p>``` 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. &lt;br&gt; 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to
     * download the batch results.
     *
     * <p>### 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:
     *
     * <p>```json { "batchItems": [ { "query":
     * "?query=47.620659,-122.348934:47.610101,-122.342015&amp;travelMode=bicycle&amp;routeType=eco&amp;traffic=false"
     * }, { "query": "?query=40.759856,-73.985108:40.771136,-73.973506&amp;travelMode=pedestrian&amp;routeType=shortest"
     * }, { "query": "?query=48.923159,-122.557362:32.621279,-116.840362" } ] } ```
     *
     * <p>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.
     *
     * <p>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.
     *
     * <p>### 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:
     *
     * <p>```
     * https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0&amp;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:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### 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:
     *
     * <p>- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
     * the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
     *
     * <p>```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." } } } ] } ```.
     *
     * @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.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @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<RouteDirectionsBatchResultPrivate, RouteDirectionsBatchResultPrivate>
            beginRequestRouteDirectionsBatch(JsonFormat format, BatchRequest routeDirectionsBatchQueries) {
        return this.beginRequestRouteDirectionsBatchAsync(format, routeDirectionsBatchQueries).getSyncPoller();
    }

    /**
     * **Route Directions Batch API**
     *
     * <p>**Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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.
     *
     * <p>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.
     *
     * <p>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:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request has been accepted.
     *
     * <p>&gt; HTTP `Error` - There was an error processing your Batch request. This could either be a `400 Bad Request`
     * or any other `Error` status code.
     *
     * <p>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:
     *
     * <p>``` 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. &lt;br&gt; 4. Client issues a `GET` request on the _download URL_ obtained in Step 3 to
     * download the batch results.
     *
     * <p>### 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:
     *
     * <p>```json { "batchItems": [ { "query":
     * "?query=47.620659,-122.348934:47.610101,-122.342015&amp;travelMode=bicycle&amp;routeType=eco&amp;traffic=false"
     * }, { "query": "?query=40.759856,-73.985108:40.771136,-73.973506&amp;travelMode=pedestrian&amp;routeType=shortest"
     * }, { "query": "?query=48.923159,-122.557362:32.621279,-116.840362" } ] } ```
     *
     * <p>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.
     *
     * <p>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.
     *
     * <p>### 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:
     *
     * <p>```
     * https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0&amp;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:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### 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:
     *
     * <p>- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
     * the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
     *
     * <p>```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." } } } ] } ```.
     *
     * @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 context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @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<RouteDirectionsBatchResultPrivate, RouteDirectionsBatchResultPrivate>
            beginRequestRouteDirectionsBatch(
                    JsonFormat format, BatchRequest routeDirectionsBatchQueries, Context context) {
        return this.beginRequestRouteDirectionsBatchAsync(format, routeDirectionsBatchQueries, context).getSyncPoller();
    }

    /**
     * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>### 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:
     *
     * <p>```
     * https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0&amp;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:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### 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:
     *
     * <p>- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
     * the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
     *
     * <p>```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." } } } ] } ```.
     *
     * @param batchId Batch id for querying the operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Route Directions Batch service call on successful completion of
     *     {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<RoutesGetRouteDirectionsBatchResponse> getRouteDirectionsBatchWithResponseAsync(String batchId) {
        final String accept = "application/json";
        return FluxUtil.withContext(
                context ->
                        service.getRouteDirectionsBatch(
                                this.client.getHost(),
                                this.client.getClientId(),
                                this.client.getApiVersion(),
                                batchId,
                                accept,
                                context));
    }

    /**
     * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>### 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:
     *
     * <p>```
     * https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0&amp;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:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### 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:
     *
     * <p>- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
     * the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
     *
     * <p>```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." } } } ] } ```.
     *
     * @param batchId Batch id for querying the operation.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Route Directions Batch service call on successful completion of
     *     {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<RoutesGetRouteDirectionsBatchResponse> getRouteDirectionsBatchWithResponseAsync(
            String batchId, Context context) {
        final String accept = "application/json";
        return service.getRouteDirectionsBatch(
                this.client.getHost(),
                this.client.getClientId(),
                this.client.getApiVersion(),
                batchId,
                accept,
                context);
    }

    /**
     * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>### 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:
     *
     * <p>```
     * https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0&amp;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:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### 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:
     *
     * <p>- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
     * the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
     *
     * <p>```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." } } } ] } ```.
     *
     * @param batchId Batch id for querying the operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @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<RouteDirectionsBatchResultPrivate, RouteDirectionsBatchResultPrivate>
            beginGetRouteDirectionsBatchAsync(String batchId) {
        return PollerFlux.create(
                Duration.ofSeconds(1),
                () -> this.getRouteDirectionsBatchWithResponseAsync(batchId),
                new DefaultPollingStrategy<>(this.client.getHttpPipeline(), null, Context.NONE),
                new TypeReferenceRouteDirectionsBatchResultPrivate(),
                new TypeReferenceRouteDirectionsBatchResultPrivate());
    }

    /**
     * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>### 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:
     *
     * <p>```
     * https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0&amp;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:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### 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:
     *
     * <p>- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
     * the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
     *
     * <p>```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." } } } ] } ```.
     *
     * @param batchId Batch id for querying the operation.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @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<RouteDirectionsBatchResultPrivate, RouteDirectionsBatchResultPrivate>
            beginGetRouteDirectionsBatchAsync(String batchId, Context context) {
        return PollerFlux.create(
                Duration.ofSeconds(1),
                () -> this.getRouteDirectionsBatchWithResponseAsync(batchId, context),
                new DefaultPollingStrategy<>(this.client.getHttpPipeline(), null, context),
                new TypeReferenceRouteDirectionsBatchResultPrivate(),
                new TypeReferenceRouteDirectionsBatchResultPrivate());
    }

    /**
     * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>### 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:
     *
     * <p>```
     * https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0&amp;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:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### 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:
     *
     * <p>- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
     * the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
     *
     * <p>```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." } } } ] } ```.
     *
     * @param batchId Batch id for querying the operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @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<RouteDirectionsBatchResultPrivate, RouteDirectionsBatchResultPrivate>
            beginGetRouteDirectionsBatch(String batchId) {
        return this.beginGetRouteDirectionsBatchAsync(batchId).getSyncPoller();
    }

    /**
     * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>### 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:
     *
     * <p>```
     * https://atlas.microsoft.com/route/directions/batch/{batch-id}?api-version=1.0&amp;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:
     *
     * <p>&gt; HTTP `202 Accepted` - Batch request was accepted but is still being processed. Please try again in some
     * time.
     *
     * <p>&gt; HTTP `200 OK` - Batch request successfully processed. The response body contains all the batch results.
     *
     * <p>### 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:
     *
     * <p>- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
     * the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
     *
     * <p>```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." } } } ] } ```.
     *
     * @param batchId Batch id for querying the operation.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @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<RouteDirectionsBatchResultPrivate, RouteDirectionsBatchResultPrivate>
            beginGetRouteDirectionsBatch(String batchId, Context context) {
        return this.beginGetRouteDirectionsBatchAsync(batchId, context).getSyncPoller();
    }

    /**
     * **Route Directions Batch API**
     *
     * <p>**Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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&amp;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:
     *
     * <p>- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
     * the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
     *
     * <p>```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." } } } ] } ```.
     *
     * @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.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws ErrorResponseException thrown if the request is rejected by server on status code 408.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @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<Response<RouteDirectionsBatchResultPrivate>> requestRouteDirectionsBatchSyncWithResponseAsync(
            JsonFormat format, BatchRequest routeDirectionsBatchQueries) {
        final String accept = "application/json";
        return FluxUtil.withContext(
                context ->
                        service.requestRouteDirectionsBatchSync(
                                this.client.getHost(),
                                this.client.getClientId(),
                                this.client.getApiVersion(),
                                format,
                                routeDirectionsBatchQueries,
                                accept,
                                context));
    }

    /**
     * **Route Directions Batch API**
     *
     * <p>**Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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&amp;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:
     *
     * <p>- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
     * the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
     *
     * <p>```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." } } } ] } ```.
     *
     * @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 context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws ErrorResponseException thrown if the request is rejected by server on status code 408.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @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<Response<RouteDirectionsBatchResultPrivate>> requestRouteDirectionsBatchSyncWithResponseAsync(
            JsonFormat format, BatchRequest routeDirectionsBatchQueries, Context context) {
        final String accept = "application/json";
        return service.requestRouteDirectionsBatchSync(
                this.client.getHost(),
                this.client.getClientId(),
                this.client.getApiVersion(),
                format,
                routeDirectionsBatchQueries,
                accept,
                context);
    }

    /**
     * **Route Directions Batch API**
     *
     * <p>**Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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&amp;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:
     *
     * <p>- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
     * the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
     *
     * <p>```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." } } } ] } ```.
     *
     * @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.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws ErrorResponseException thrown if the request is rejected by server on status code 408.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Route Directions Batch service call on successful completion of
     *     {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<RouteDirectionsBatchResultPrivate> requestRouteDirectionsBatchSyncAsync(
            JsonFormat format, BatchRequest routeDirectionsBatchQueries) {
        return requestRouteDirectionsBatchSyncWithResponseAsync(format, routeDirectionsBatchQueries)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * **Route Directions Batch API**
     *
     * <p>**Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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&amp;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:
     *
     * <p>- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
     * the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
     *
     * <p>```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." } } } ] } ```.
     *
     * @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 context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws ErrorResponseException thrown if the request is rejected by server on status code 408.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Route Directions Batch service call on successful completion of
     *     {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<RouteDirectionsBatchResultPrivate> requestRouteDirectionsBatchSyncAsync(
            JsonFormat format, BatchRequest routeDirectionsBatchQueries, Context context) {
        return requestRouteDirectionsBatchSyncWithResponseAsync(format, routeDirectionsBatchQueries, context)
                .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * **Route Directions Batch API**
     *
     * <p>**Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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&amp;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:
     *
     * <p>- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
     * the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
     *
     * <p>```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." } } } ] } ```.
     *
     * @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.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws ErrorResponseException thrown if the request is rejected by server on status code 408.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Route Directions Batch service call.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public RouteDirectionsBatchResultPrivate requestRouteDirectionsBatchSync(
            JsonFormat format, BatchRequest routeDirectionsBatchQueries) {
        return requestRouteDirectionsBatchSyncAsync(format, routeDirectionsBatchQueries).block();
    }

    /**
     * **Route Directions Batch API**
     *
     * <p>**Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).
     *
     * <p>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&amp;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:
     *
     * <p>- [`RouteDirections`](https://docs.microsoft.com/rest/api/maps/route/getroutedirections#routedirections) - If
     * the query completed successfully.
     *
     * <p>- `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
     *
     * <p>Here's a sample Batch Response with 1 _successful_ and 1 _failed_ result:
     *
     * <p>```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." } } } ] } ```.
     *
     * @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 context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ErrorResponseException thrown if the request is rejected by server.
     * @throws ErrorResponseException thrown if the request is rejected by server on status code 408.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return this object is returned from a successful Route Directions Batch service call along with {@link
     *     Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<RouteDirectionsBatchResultPrivate> requestRouteDirectionsBatchSyncWithResponse(
            JsonFormat format, BatchRequest routeDirectionsBatchQueries, Context context) {
        return requestRouteDirectionsBatchSyncWithResponseAsync(format, routeDirectionsBatchQueries, context).block();
    }

    private static final class TypeReferenceRouteMatrixResultPrivate extends TypeReference<RouteMatrixResultPrivate> {
        // empty
    }

    private static final class TypeReferenceRouteDirectionsBatchResultPrivate
            extends TypeReference<RouteDirectionsBatchResultPrivate> {
        // empty
    }
}
