All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.precisely.apis.RoutingServiceApi Maven / Gradle / Ivy

/*
 * Precisely APIs
 * Enhance & enrich your data, applications, business processes, and workflows with rich location, information, and identify APIs.
 *
 * The version of the OpenAPI document: 15.0.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package com.precisely.apis;

import com.precisely.ApiCallback;
import com.precisely.ApiClient;
import com.precisely.ApiException;
import com.precisely.ApiResponse;
import com.precisely.Configuration;
import com.precisely.Pair;
import com.precisely.ProgressRequestBody;
import com.precisely.ProgressResponseBody;

import com.google.gson.reflect.TypeToken;

import java.io.IOException;


import com.precisely.apis.model.ErrorInfo;
import com.precisely.apis.model.RouteResponse;
import com.precisely.apis.model.TravelCostMatrixResponse;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class RoutingServiceApi {
    private ApiClient localVarApiClient;
    private int localHostIndex;
    private String localCustomBaseUrl;

    public RoutingServiceApi() {
        this(Configuration.getDefaultApiClient());
    }

    public RoutingServiceApi(ApiClient apiClient) {
        this.localVarApiClient = apiClient;
    }

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

    public void setApiClient(ApiClient apiClient) {
        this.localVarApiClient = apiClient;
    }

    public int getHostIndex() {
        return localHostIndex;
    }

    public void setHostIndex(int hostIndex) {
        this.localHostIndex = hostIndex;
    }

    public String getCustomBaseUrl() {
        return localCustomBaseUrl;
    }

    public void setCustomBaseUrl(String customBaseUrl) {
        this.localCustomBaseUrl = customBaseUrl;
    }

    /**
     * Build call for getRouteByAddress
     * @param startAddress Starting address of the route. (optional)
     * @param endAddress Ending address of the route. (optional)
     * @param db Mode of commute. (optional, default to driving)
     * @param country Three digit ISO country code. (optional, default to USA)
     * @param intermediateAddresses List of intermediate points of the route. (optional)
     * @param returnIntermediatePoints return intermediate points (optional, default to false)
     * @param oip Specifies whether waypoints need to be optimized. (optional, default to false)
     * @param destinationSrs Specifies the desired coordinate system of the returned route. (optional)
     * @param optimizeBy Specifies whether the route should be optimized by time or distance. (optional, default to time)
     * @param returnDistance Specifies whether distance needs to be part of direction information in response. (optional, default to true)
     * @param distanceUnit Return Distance Unit such as ft(Foot), km(Kilometer), mi(Mile), m(Meter) or yd(Yard). (optional, default to m)
     * @param returnTime Specifies whether time needs to be part of direction information in response. (optional, default to true)
     * @param timeUnit Return time unit such as min(Minute), h(Hour), s(Second) or msec(Millisecond) (optional, default to min)
     * @param language Specifies the language of travel directions. (optional)
     * @param directionsStyle Specifies whether route directions text is to be returned in the response and in what detail (Normal or Terse). (optional, default to None)
     * @param segmentGeometryStyle Specifies whether the route geometry is to be returned in the response and in what detail (End or All). (optional, default to none)
     * @param primaryNameOnly If true then only the primary street name is returned otherwise all the names for a street. (optional, default to false)
     * @param majorRoads Whether to include all roads in route calculation or just major roads. (optional, default to false)
     * @param historicTrafficTimeBucket Specifies whether routing calculation uses the historic traffic speeds. (optional, default to None)
     * @param returnDirectionGeometry Whether to include geometry associated with each route instruction in response. (optional, default to false)
     * @param useCvr This parameter will enable/disable CVR (Commercial Vehicle Restrictions) capability in our APIs. (optional, default to N)
     * @param looseningBarrierRestrictions Specifies that barriers will be removed when determining the route. (optional, default to Y)
     * @param vehicleType vehicle type. (optional, default to ALL)
     * @param weight Specifies the maximum weight of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to )
     * @param weightUnit The unit of weight eg. kg(kilogram), lb(pound), mt(metric ton), t(ton). (optional, default to kg)
     * @param height Specifies the maximum height of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to )
     * @param heightUnit The unit of height e.g m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft)
     * @param length Specifies the maximum length of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to )
     * @param lengthUnit The unit of length eg. m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft)
     * @param width Specifies the maximum width of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to )
     * @param widthUnit The unit of width eg. m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     
Status Code Description Response Headers
200 OK -
400 Bad Request -
500 Internal Server Error -
*/ public okhttp3.Call getRouteByAddressCall(String startAddress, String endAddress, String db, String country, String intermediateAddresses, String returnIntermediatePoints, String oip, String destinationSrs, String optimizeBy, String returnDistance, String distanceUnit, String returnTime, String timeUnit, String language, String directionsStyle, String segmentGeometryStyle, String primaryNameOnly, String majorRoads, String historicTrafficTimeBucket, String returnDirectionGeometry, String useCvr, String looseningBarrierRestrictions, String vehicleType, String weight, String weightUnit, String height, String heightUnit, String length, String lengthUnit, String width, String widthUnit, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/routing/v1/route/byaddress"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (startAddress != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("startAddress", startAddress)); } if (endAddress != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("endAddress", endAddress)); } if (db != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("db", db)); } if (country != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("country", country)); } if (intermediateAddresses != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("intermediateAddresses", intermediateAddresses)); } if (returnIntermediatePoints != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("returnIntermediatePoints", returnIntermediatePoints)); } if (oip != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("oip", oip)); } if (destinationSrs != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("destinationSrs", destinationSrs)); } if (optimizeBy != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("optimizeBy", optimizeBy)); } if (returnDistance != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("returnDistance", returnDistance)); } if (distanceUnit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("distanceUnit", distanceUnit)); } if (returnTime != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("returnTime", returnTime)); } if (timeUnit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("timeUnit", timeUnit)); } if (language != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("language", language)); } if (directionsStyle != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("directionsStyle", directionsStyle)); } if (segmentGeometryStyle != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("segmentGeometryStyle", segmentGeometryStyle)); } if (primaryNameOnly != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("primaryNameOnly", primaryNameOnly)); } if (majorRoads != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("majorRoads", majorRoads)); } if (historicTrafficTimeBucket != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("historicTrafficTimeBucket", historicTrafficTimeBucket)); } if (returnDirectionGeometry != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("returnDirectionGeometry", returnDirectionGeometry)); } if (useCvr != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("useCvr", useCvr)); } if (looseningBarrierRestrictions != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("looseningBarrierRestrictions", looseningBarrierRestrictions)); } if (vehicleType != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("vehicleType", vehicleType)); } if (weight != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("weight", weight)); } if (weightUnit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("weightUnit", weightUnit)); } if (height != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("height", height)); } if (heightUnit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("heightUnit", heightUnit)); } if (length != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("length", length)); } if (lengthUnit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("lengthUnit", lengthUnit)); } if (width != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("width", width)); } if (widthUnit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("widthUnit", widthUnit)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "oAuth2Password" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getRouteByAddressValidateBeforeCall(String startAddress, String endAddress, String db, String country, String intermediateAddresses, String returnIntermediatePoints, String oip, String destinationSrs, String optimizeBy, String returnDistance, String distanceUnit, String returnTime, String timeUnit, String language, String directionsStyle, String segmentGeometryStyle, String primaryNameOnly, String majorRoads, String historicTrafficTimeBucket, String returnDirectionGeometry, String useCvr, String looseningBarrierRestrictions, String vehicleType, String weight, String weightUnit, String height, String heightUnit, String length, String lengthUnit, String width, String widthUnit, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getRouteByAddressCall(startAddress, endAddress, db, country, intermediateAddresses, returnIntermediatePoints, oip, destinationSrs, optimizeBy, returnDistance, distanceUnit, returnTime, timeUnit, language, directionsStyle, segmentGeometryStyle, primaryNameOnly, majorRoads, historicTrafficTimeBucket, returnDirectionGeometry, useCvr, looseningBarrierRestrictions, vehicleType, weight, weightUnit, height, heightUnit, length, lengthUnit, width, widthUnit, _callback); return localVarCall; } /** * Gets Route By Address. * Accepts addresses as input and Returns Point-to-Point and Multi-Point travel directions by various travel modes. * @param startAddress Starting address of the route. (optional) * @param endAddress Ending address of the route. (optional) * @param db Mode of commute. (optional, default to driving) * @param country Three digit ISO country code. (optional, default to USA) * @param intermediateAddresses List of intermediate points of the route. (optional) * @param returnIntermediatePoints return intermediate points (optional, default to false) * @param oip Specifies whether waypoints need to be optimized. (optional, default to false) * @param destinationSrs Specifies the desired coordinate system of the returned route. (optional) * @param optimizeBy Specifies whether the route should be optimized by time or distance. (optional, default to time) * @param returnDistance Specifies whether distance needs to be part of direction information in response. (optional, default to true) * @param distanceUnit Return Distance Unit such as ft(Foot), km(Kilometer), mi(Mile), m(Meter) or yd(Yard). (optional, default to m) * @param returnTime Specifies whether time needs to be part of direction information in response. (optional, default to true) * @param timeUnit Return time unit such as min(Minute), h(Hour), s(Second) or msec(Millisecond) (optional, default to min) * @param language Specifies the language of travel directions. (optional) * @param directionsStyle Specifies whether route directions text is to be returned in the response and in what detail (Normal or Terse). (optional, default to None) * @param segmentGeometryStyle Specifies whether the route geometry is to be returned in the response and in what detail (End or All). (optional, default to none) * @param primaryNameOnly If true then only the primary street name is returned otherwise all the names for a street. (optional, default to false) * @param majorRoads Whether to include all roads in route calculation or just major roads. (optional, default to false) * @param historicTrafficTimeBucket Specifies whether routing calculation uses the historic traffic speeds. (optional, default to None) * @param returnDirectionGeometry Whether to include geometry associated with each route instruction in response. (optional, default to false) * @param useCvr This parameter will enable/disable CVR (Commercial Vehicle Restrictions) capability in our APIs. (optional, default to N) * @param looseningBarrierRestrictions Specifies that barriers will be removed when determining the route. (optional, default to Y) * @param vehicleType vehicle type. (optional, default to ALL) * @param weight Specifies the maximum weight of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param weightUnit The unit of weight eg. kg(kilogram), lb(pound), mt(metric ton), t(ton). (optional, default to kg) * @param height Specifies the maximum height of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param heightUnit The unit of height e.g m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @param length Specifies the maximum length of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param lengthUnit The unit of length eg. m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @param width Specifies the maximum width of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param widthUnit The unit of width eg. m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @return RouteResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
400 Bad Request -
500 Internal Server Error -
*/ public RouteResponse getRouteByAddress(String startAddress, String endAddress, String db, String country, String intermediateAddresses, String returnIntermediatePoints, String oip, String destinationSrs, String optimizeBy, String returnDistance, String distanceUnit, String returnTime, String timeUnit, String language, String directionsStyle, String segmentGeometryStyle, String primaryNameOnly, String majorRoads, String historicTrafficTimeBucket, String returnDirectionGeometry, String useCvr, String looseningBarrierRestrictions, String vehicleType, String weight, String weightUnit, String height, String heightUnit, String length, String lengthUnit, String width, String widthUnit) throws ApiException { ApiResponse localVarResp = getRouteByAddressWithHttpInfo(startAddress, endAddress, db, country, intermediateAddresses, returnIntermediatePoints, oip, destinationSrs, optimizeBy, returnDistance, distanceUnit, returnTime, timeUnit, language, directionsStyle, segmentGeometryStyle, primaryNameOnly, majorRoads, historicTrafficTimeBucket, returnDirectionGeometry, useCvr, looseningBarrierRestrictions, vehicleType, weight, weightUnit, height, heightUnit, length, lengthUnit, width, widthUnit); return localVarResp.getData(); } /** * Gets Route By Address. * Accepts addresses as input and Returns Point-to-Point and Multi-Point travel directions by various travel modes. * @param startAddress Starting address of the route. (optional) * @param endAddress Ending address of the route. (optional) * @param db Mode of commute. (optional, default to driving) * @param country Three digit ISO country code. (optional, default to USA) * @param intermediateAddresses List of intermediate points of the route. (optional) * @param returnIntermediatePoints return intermediate points (optional, default to false) * @param oip Specifies whether waypoints need to be optimized. (optional, default to false) * @param destinationSrs Specifies the desired coordinate system of the returned route. (optional) * @param optimizeBy Specifies whether the route should be optimized by time or distance. (optional, default to time) * @param returnDistance Specifies whether distance needs to be part of direction information in response. (optional, default to true) * @param distanceUnit Return Distance Unit such as ft(Foot), km(Kilometer), mi(Mile), m(Meter) or yd(Yard). (optional, default to m) * @param returnTime Specifies whether time needs to be part of direction information in response. (optional, default to true) * @param timeUnit Return time unit such as min(Minute), h(Hour), s(Second) or msec(Millisecond) (optional, default to min) * @param language Specifies the language of travel directions. (optional) * @param directionsStyle Specifies whether route directions text is to be returned in the response and in what detail (Normal or Terse). (optional, default to None) * @param segmentGeometryStyle Specifies whether the route geometry is to be returned in the response and in what detail (End or All). (optional, default to none) * @param primaryNameOnly If true then only the primary street name is returned otherwise all the names for a street. (optional, default to false) * @param majorRoads Whether to include all roads in route calculation or just major roads. (optional, default to false) * @param historicTrafficTimeBucket Specifies whether routing calculation uses the historic traffic speeds. (optional, default to None) * @param returnDirectionGeometry Whether to include geometry associated with each route instruction in response. (optional, default to false) * @param useCvr This parameter will enable/disable CVR (Commercial Vehicle Restrictions) capability in our APIs. (optional, default to N) * @param looseningBarrierRestrictions Specifies that barriers will be removed when determining the route. (optional, default to Y) * @param vehicleType vehicle type. (optional, default to ALL) * @param weight Specifies the maximum weight of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param weightUnit The unit of weight eg. kg(kilogram), lb(pound), mt(metric ton), t(ton). (optional, default to kg) * @param height Specifies the maximum height of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param heightUnit The unit of height e.g m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @param length Specifies the maximum length of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param lengthUnit The unit of length eg. m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @param width Specifies the maximum width of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param widthUnit The unit of width eg. m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @return ApiResponse<RouteResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
400 Bad Request -
500 Internal Server Error -
*/ public ApiResponse getRouteByAddressWithHttpInfo(String startAddress, String endAddress, String db, String country, String intermediateAddresses, String returnIntermediatePoints, String oip, String destinationSrs, String optimizeBy, String returnDistance, String distanceUnit, String returnTime, String timeUnit, String language, String directionsStyle, String segmentGeometryStyle, String primaryNameOnly, String majorRoads, String historicTrafficTimeBucket, String returnDirectionGeometry, String useCvr, String looseningBarrierRestrictions, String vehicleType, String weight, String weightUnit, String height, String heightUnit, String length, String lengthUnit, String width, String widthUnit) throws ApiException { okhttp3.Call localVarCall = getRouteByAddressValidateBeforeCall(startAddress, endAddress, db, country, intermediateAddresses, returnIntermediatePoints, oip, destinationSrs, optimizeBy, returnDistance, distanceUnit, returnTime, timeUnit, language, directionsStyle, segmentGeometryStyle, primaryNameOnly, majorRoads, historicTrafficTimeBucket, returnDirectionGeometry, useCvr, looseningBarrierRestrictions, vehicleType, weight, weightUnit, height, heightUnit, length, lengthUnit, width, widthUnit, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Gets Route By Address. (asynchronously) * Accepts addresses as input and Returns Point-to-Point and Multi-Point travel directions by various travel modes. * @param startAddress Starting address of the route. (optional) * @param endAddress Ending address of the route. (optional) * @param db Mode of commute. (optional, default to driving) * @param country Three digit ISO country code. (optional, default to USA) * @param intermediateAddresses List of intermediate points of the route. (optional) * @param returnIntermediatePoints return intermediate points (optional, default to false) * @param oip Specifies whether waypoints need to be optimized. (optional, default to false) * @param destinationSrs Specifies the desired coordinate system of the returned route. (optional) * @param optimizeBy Specifies whether the route should be optimized by time or distance. (optional, default to time) * @param returnDistance Specifies whether distance needs to be part of direction information in response. (optional, default to true) * @param distanceUnit Return Distance Unit such as ft(Foot), km(Kilometer), mi(Mile), m(Meter) or yd(Yard). (optional, default to m) * @param returnTime Specifies whether time needs to be part of direction information in response. (optional, default to true) * @param timeUnit Return time unit such as min(Minute), h(Hour), s(Second) or msec(Millisecond) (optional, default to min) * @param language Specifies the language of travel directions. (optional) * @param directionsStyle Specifies whether route directions text is to be returned in the response and in what detail (Normal or Terse). (optional, default to None) * @param segmentGeometryStyle Specifies whether the route geometry is to be returned in the response and in what detail (End or All). (optional, default to none) * @param primaryNameOnly If true then only the primary street name is returned otherwise all the names for a street. (optional, default to false) * @param majorRoads Whether to include all roads in route calculation or just major roads. (optional, default to false) * @param historicTrafficTimeBucket Specifies whether routing calculation uses the historic traffic speeds. (optional, default to None) * @param returnDirectionGeometry Whether to include geometry associated with each route instruction in response. (optional, default to false) * @param useCvr This parameter will enable/disable CVR (Commercial Vehicle Restrictions) capability in our APIs. (optional, default to N) * @param looseningBarrierRestrictions Specifies that barriers will be removed when determining the route. (optional, default to Y) * @param vehicleType vehicle type. (optional, default to ALL) * @param weight Specifies the maximum weight of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param weightUnit The unit of weight eg. kg(kilogram), lb(pound), mt(metric ton), t(ton). (optional, default to kg) * @param height Specifies the maximum height of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param heightUnit The unit of height e.g m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @param length Specifies the maximum length of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param lengthUnit The unit of length eg. m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @param width Specifies the maximum width of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param widthUnit The unit of width eg. m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
400 Bad Request -
500 Internal Server Error -
*/ public okhttp3.Call getRouteByAddressAsync(String startAddress, String endAddress, String db, String country, String intermediateAddresses, String returnIntermediatePoints, String oip, String destinationSrs, String optimizeBy, String returnDistance, String distanceUnit, String returnTime, String timeUnit, String language, String directionsStyle, String segmentGeometryStyle, String primaryNameOnly, String majorRoads, String historicTrafficTimeBucket, String returnDirectionGeometry, String useCvr, String looseningBarrierRestrictions, String vehicleType, String weight, String weightUnit, String height, String heightUnit, String length, String lengthUnit, String width, String widthUnit, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getRouteByAddressValidateBeforeCall(startAddress, endAddress, db, country, intermediateAddresses, returnIntermediatePoints, oip, destinationSrs, optimizeBy, returnDistance, distanceUnit, returnTime, timeUnit, language, directionsStyle, segmentGeometryStyle, primaryNameOnly, majorRoads, historicTrafficTimeBucket, returnDirectionGeometry, useCvr, looseningBarrierRestrictions, vehicleType, weight, weightUnit, height, heightUnit, length, lengthUnit, width, widthUnit, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getRouteByLocation * @param startPoint Start Point in 'Lat,Long,coordsys' format. (optional) * @param endPoint End Point in 'Lat,Long,coordsys' format. (optional) * @param db Mode of commute. (optional, default to driving) * @param intermediatePoints List of intermediate points of the route. (optional) * @param returnIntermediatePoints returnIntermediatePoints route. (optional, default to false) * @param oip Specifies whether waypoints need to be optimized. (optional, default to false) * @param destinationSrs Specifies the desired coordinate system of the returned route. (optional) * @param optimizeBy Specifies whether the route should be optimized by time or distance. (optional, default to time) * @param returnDistance Specifies whether distance needs to be part of direction information in response. (optional, default to true) * @param distanceUnit Return Distance Unit such as ft(Foot), km(Kilometer), mi(Mile), m(Meter) or yd(Yard). (optional, default to m) * @param returnTime Specifies whether time needs to be part of direction information in response. (optional, default to true) * @param timeUnit Return time unit such as min(Minute), h(Hour), s(Second) or msec(Millisecond) (optional, default to min) * @param language Specifies the language of travel directions. (optional) * @param directionsStyle Specifies whether route directions text is to be returned in the response and in what detail (Normal or Terse). (optional, default to None) * @param segmentGeometryStyle Specifies whether the route geometry is to be returned in the response and in what detail (End or All). (optional, default to none) * @param primaryNameOnly If true then only the primary street name is returned otherwise all the names for a street. (optional, default to false) * @param majorRoads Whether to include all roads in route calculation or just major roads. (optional, default to false) * @param historicTrafficTimeBucket Specifies whether routing calculation uses the historic traffic speeds. (optional, default to None) * @param returnDirectionGeometry Whether to include geometry associated with each route instruction in response. (optional, default to false) * @param useCvr This parameter will enable/disable CVR (Commercial Vehicle Restrictions) capability in our APIs. (optional, default to N) * @param looseningBarrierRestrictions Specifies that barriers will be removed when determining the route. (optional, default to Y) * @param vehicleType vehicle type. (optional, default to ALL) * @param weight Specifies the maximum weight of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param weightUnit The unit of weight eg. kg(kilogram), lb(pound), mt(metric ton), t(ton). (optional, default to kg) * @param height Specifies the maximum height of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param heightUnit The unit of height e.g m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @param length Specifies the maximum length of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param lengthUnit The unit of length eg. m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @param width Specifies the maximum width of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param widthUnit The unit of width eg. m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
400 Bad Request -
500 Internal Server Error -
*/ public okhttp3.Call getRouteByLocationCall(String startPoint, String endPoint, String db, String intermediatePoints, String returnIntermediatePoints, String oip, String destinationSrs, String optimizeBy, String returnDistance, String distanceUnit, String returnTime, String timeUnit, String language, String directionsStyle, String segmentGeometryStyle, String primaryNameOnly, String majorRoads, String historicTrafficTimeBucket, String returnDirectionGeometry, String useCvr, String looseningBarrierRestrictions, String vehicleType, String weight, String weightUnit, String height, String heightUnit, String length, String lengthUnit, String width, String widthUnit, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/routing/v1/route/bylocation"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (startPoint != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("startPoint", startPoint)); } if (endPoint != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("endPoint", endPoint)); } if (db != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("db", db)); } if (intermediatePoints != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("intermediatePoints", intermediatePoints)); } if (returnIntermediatePoints != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("returnIntermediatePoints", returnIntermediatePoints)); } if (oip != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("oip", oip)); } if (destinationSrs != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("destinationSrs", destinationSrs)); } if (optimizeBy != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("optimizeBy", optimizeBy)); } if (returnDistance != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("returnDistance", returnDistance)); } if (distanceUnit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("distanceUnit", distanceUnit)); } if (returnTime != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("returnTime", returnTime)); } if (timeUnit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("timeUnit", timeUnit)); } if (language != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("language", language)); } if (directionsStyle != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("directionsStyle", directionsStyle)); } if (segmentGeometryStyle != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("segmentGeometryStyle", segmentGeometryStyle)); } if (primaryNameOnly != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("primaryNameOnly", primaryNameOnly)); } if (majorRoads != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("majorRoads", majorRoads)); } if (historicTrafficTimeBucket != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("historicTrafficTimeBucket", historicTrafficTimeBucket)); } if (returnDirectionGeometry != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("returnDirectionGeometry", returnDirectionGeometry)); } if (useCvr != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("useCvr", useCvr)); } if (looseningBarrierRestrictions != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("looseningBarrierRestrictions", looseningBarrierRestrictions)); } if (vehicleType != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("vehicleType", vehicleType)); } if (weight != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("weight", weight)); } if (weightUnit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("weightUnit", weightUnit)); } if (height != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("height", height)); } if (heightUnit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("heightUnit", heightUnit)); } if (length != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("length", length)); } if (lengthUnit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("lengthUnit", lengthUnit)); } if (width != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("width", width)); } if (widthUnit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("widthUnit", widthUnit)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "oAuth2Password" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getRouteByLocationValidateBeforeCall(String startPoint, String endPoint, String db, String intermediatePoints, String returnIntermediatePoints, String oip, String destinationSrs, String optimizeBy, String returnDistance, String distanceUnit, String returnTime, String timeUnit, String language, String directionsStyle, String segmentGeometryStyle, String primaryNameOnly, String majorRoads, String historicTrafficTimeBucket, String returnDirectionGeometry, String useCvr, String looseningBarrierRestrictions, String vehicleType, String weight, String weightUnit, String height, String heightUnit, String length, String lengthUnit, String width, String widthUnit, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getRouteByLocationCall(startPoint, endPoint, db, intermediatePoints, returnIntermediatePoints, oip, destinationSrs, optimizeBy, returnDistance, distanceUnit, returnTime, timeUnit, language, directionsStyle, segmentGeometryStyle, primaryNameOnly, majorRoads, historicTrafficTimeBucket, returnDirectionGeometry, useCvr, looseningBarrierRestrictions, vehicleType, weight, weightUnit, height, heightUnit, length, lengthUnit, width, widthUnit, _callback); return localVarCall; } /** * Gets Route By Location. * Accepts latitude & longitude as input and Returns Point-to-Point and Multi-Point travel directions by various travel modes. * @param startPoint Start Point in 'Lat,Long,coordsys' format. (optional) * @param endPoint End Point in 'Lat,Long,coordsys' format. (optional) * @param db Mode of commute. (optional, default to driving) * @param intermediatePoints List of intermediate points of the route. (optional) * @param returnIntermediatePoints returnIntermediatePoints route. (optional, default to false) * @param oip Specifies whether waypoints need to be optimized. (optional, default to false) * @param destinationSrs Specifies the desired coordinate system of the returned route. (optional) * @param optimizeBy Specifies whether the route should be optimized by time or distance. (optional, default to time) * @param returnDistance Specifies whether distance needs to be part of direction information in response. (optional, default to true) * @param distanceUnit Return Distance Unit such as ft(Foot), km(Kilometer), mi(Mile), m(Meter) or yd(Yard). (optional, default to m) * @param returnTime Specifies whether time needs to be part of direction information in response. (optional, default to true) * @param timeUnit Return time unit such as min(Minute), h(Hour), s(Second) or msec(Millisecond) (optional, default to min) * @param language Specifies the language of travel directions. (optional) * @param directionsStyle Specifies whether route directions text is to be returned in the response and in what detail (Normal or Terse). (optional, default to None) * @param segmentGeometryStyle Specifies whether the route geometry is to be returned in the response and in what detail (End or All). (optional, default to none) * @param primaryNameOnly If true then only the primary street name is returned otherwise all the names for a street. (optional, default to false) * @param majorRoads Whether to include all roads in route calculation or just major roads. (optional, default to false) * @param historicTrafficTimeBucket Specifies whether routing calculation uses the historic traffic speeds. (optional, default to None) * @param returnDirectionGeometry Whether to include geometry associated with each route instruction in response. (optional, default to false) * @param useCvr This parameter will enable/disable CVR (Commercial Vehicle Restrictions) capability in our APIs. (optional, default to N) * @param looseningBarrierRestrictions Specifies that barriers will be removed when determining the route. (optional, default to Y) * @param vehicleType vehicle type. (optional, default to ALL) * @param weight Specifies the maximum weight of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param weightUnit The unit of weight eg. kg(kilogram), lb(pound), mt(metric ton), t(ton). (optional, default to kg) * @param height Specifies the maximum height of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param heightUnit The unit of height e.g m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @param length Specifies the maximum length of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param lengthUnit The unit of length eg. m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @param width Specifies the maximum width of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param widthUnit The unit of width eg. m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @return RouteResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
400 Bad Request -
500 Internal Server Error -
*/ public RouteResponse getRouteByLocation(String startPoint, String endPoint, String db, String intermediatePoints, String returnIntermediatePoints, String oip, String destinationSrs, String optimizeBy, String returnDistance, String distanceUnit, String returnTime, String timeUnit, String language, String directionsStyle, String segmentGeometryStyle, String primaryNameOnly, String majorRoads, String historicTrafficTimeBucket, String returnDirectionGeometry, String useCvr, String looseningBarrierRestrictions, String vehicleType, String weight, String weightUnit, String height, String heightUnit, String length, String lengthUnit, String width, String widthUnit) throws ApiException { ApiResponse localVarResp = getRouteByLocationWithHttpInfo(startPoint, endPoint, db, intermediatePoints, returnIntermediatePoints, oip, destinationSrs, optimizeBy, returnDistance, distanceUnit, returnTime, timeUnit, language, directionsStyle, segmentGeometryStyle, primaryNameOnly, majorRoads, historicTrafficTimeBucket, returnDirectionGeometry, useCvr, looseningBarrierRestrictions, vehicleType, weight, weightUnit, height, heightUnit, length, lengthUnit, width, widthUnit); return localVarResp.getData(); } /** * Gets Route By Location. * Accepts latitude & longitude as input and Returns Point-to-Point and Multi-Point travel directions by various travel modes. * @param startPoint Start Point in 'Lat,Long,coordsys' format. (optional) * @param endPoint End Point in 'Lat,Long,coordsys' format. (optional) * @param db Mode of commute. (optional, default to driving) * @param intermediatePoints List of intermediate points of the route. (optional) * @param returnIntermediatePoints returnIntermediatePoints route. (optional, default to false) * @param oip Specifies whether waypoints need to be optimized. (optional, default to false) * @param destinationSrs Specifies the desired coordinate system of the returned route. (optional) * @param optimizeBy Specifies whether the route should be optimized by time or distance. (optional, default to time) * @param returnDistance Specifies whether distance needs to be part of direction information in response. (optional, default to true) * @param distanceUnit Return Distance Unit such as ft(Foot), km(Kilometer), mi(Mile), m(Meter) or yd(Yard). (optional, default to m) * @param returnTime Specifies whether time needs to be part of direction information in response. (optional, default to true) * @param timeUnit Return time unit such as min(Minute), h(Hour), s(Second) or msec(Millisecond) (optional, default to min) * @param language Specifies the language of travel directions. (optional) * @param directionsStyle Specifies whether route directions text is to be returned in the response and in what detail (Normal or Terse). (optional, default to None) * @param segmentGeometryStyle Specifies whether the route geometry is to be returned in the response and in what detail (End or All). (optional, default to none) * @param primaryNameOnly If true then only the primary street name is returned otherwise all the names for a street. (optional, default to false) * @param majorRoads Whether to include all roads in route calculation or just major roads. (optional, default to false) * @param historicTrafficTimeBucket Specifies whether routing calculation uses the historic traffic speeds. (optional, default to None) * @param returnDirectionGeometry Whether to include geometry associated with each route instruction in response. (optional, default to false) * @param useCvr This parameter will enable/disable CVR (Commercial Vehicle Restrictions) capability in our APIs. (optional, default to N) * @param looseningBarrierRestrictions Specifies that barriers will be removed when determining the route. (optional, default to Y) * @param vehicleType vehicle type. (optional, default to ALL) * @param weight Specifies the maximum weight of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param weightUnit The unit of weight eg. kg(kilogram), lb(pound), mt(metric ton), t(ton). (optional, default to kg) * @param height Specifies the maximum height of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param heightUnit The unit of height e.g m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @param length Specifies the maximum length of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param lengthUnit The unit of length eg. m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @param width Specifies the maximum width of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param widthUnit The unit of width eg. m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @return ApiResponse<RouteResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
400 Bad Request -
500 Internal Server Error -
*/ public ApiResponse getRouteByLocationWithHttpInfo(String startPoint, String endPoint, String db, String intermediatePoints, String returnIntermediatePoints, String oip, String destinationSrs, String optimizeBy, String returnDistance, String distanceUnit, String returnTime, String timeUnit, String language, String directionsStyle, String segmentGeometryStyle, String primaryNameOnly, String majorRoads, String historicTrafficTimeBucket, String returnDirectionGeometry, String useCvr, String looseningBarrierRestrictions, String vehicleType, String weight, String weightUnit, String height, String heightUnit, String length, String lengthUnit, String width, String widthUnit) throws ApiException { okhttp3.Call localVarCall = getRouteByLocationValidateBeforeCall(startPoint, endPoint, db, intermediatePoints, returnIntermediatePoints, oip, destinationSrs, optimizeBy, returnDistance, distanceUnit, returnTime, timeUnit, language, directionsStyle, segmentGeometryStyle, primaryNameOnly, majorRoads, historicTrafficTimeBucket, returnDirectionGeometry, useCvr, looseningBarrierRestrictions, vehicleType, weight, weightUnit, height, heightUnit, length, lengthUnit, width, widthUnit, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Gets Route By Location. (asynchronously) * Accepts latitude & longitude as input and Returns Point-to-Point and Multi-Point travel directions by various travel modes. * @param startPoint Start Point in 'Lat,Long,coordsys' format. (optional) * @param endPoint End Point in 'Lat,Long,coordsys' format. (optional) * @param db Mode of commute. (optional, default to driving) * @param intermediatePoints List of intermediate points of the route. (optional) * @param returnIntermediatePoints returnIntermediatePoints route. (optional, default to false) * @param oip Specifies whether waypoints need to be optimized. (optional, default to false) * @param destinationSrs Specifies the desired coordinate system of the returned route. (optional) * @param optimizeBy Specifies whether the route should be optimized by time or distance. (optional, default to time) * @param returnDistance Specifies whether distance needs to be part of direction information in response. (optional, default to true) * @param distanceUnit Return Distance Unit such as ft(Foot), km(Kilometer), mi(Mile), m(Meter) or yd(Yard). (optional, default to m) * @param returnTime Specifies whether time needs to be part of direction information in response. (optional, default to true) * @param timeUnit Return time unit such as min(Minute), h(Hour), s(Second) or msec(Millisecond) (optional, default to min) * @param language Specifies the language of travel directions. (optional) * @param directionsStyle Specifies whether route directions text is to be returned in the response and in what detail (Normal or Terse). (optional, default to None) * @param segmentGeometryStyle Specifies whether the route geometry is to be returned in the response and in what detail (End or All). (optional, default to none) * @param primaryNameOnly If true then only the primary street name is returned otherwise all the names for a street. (optional, default to false) * @param majorRoads Whether to include all roads in route calculation or just major roads. (optional, default to false) * @param historicTrafficTimeBucket Specifies whether routing calculation uses the historic traffic speeds. (optional, default to None) * @param returnDirectionGeometry Whether to include geometry associated with each route instruction in response. (optional, default to false) * @param useCvr This parameter will enable/disable CVR (Commercial Vehicle Restrictions) capability in our APIs. (optional, default to N) * @param looseningBarrierRestrictions Specifies that barriers will be removed when determining the route. (optional, default to Y) * @param vehicleType vehicle type. (optional, default to ALL) * @param weight Specifies the maximum weight of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param weightUnit The unit of weight eg. kg(kilogram), lb(pound), mt(metric ton), t(ton). (optional, default to kg) * @param height Specifies the maximum height of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param heightUnit The unit of height e.g m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @param length Specifies the maximum length of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param lengthUnit The unit of length eg. m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @param width Specifies the maximum width of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param widthUnit The unit of width eg. m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
400 Bad Request -
500 Internal Server Error -
*/ public okhttp3.Call getRouteByLocationAsync(String startPoint, String endPoint, String db, String intermediatePoints, String returnIntermediatePoints, String oip, String destinationSrs, String optimizeBy, String returnDistance, String distanceUnit, String returnTime, String timeUnit, String language, String directionsStyle, String segmentGeometryStyle, String primaryNameOnly, String majorRoads, String historicTrafficTimeBucket, String returnDirectionGeometry, String useCvr, String looseningBarrierRestrictions, String vehicleType, String weight, String weightUnit, String height, String heightUnit, String length, String lengthUnit, String width, String widthUnit, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getRouteByLocationValidateBeforeCall(startPoint, endPoint, db, intermediatePoints, returnIntermediatePoints, oip, destinationSrs, optimizeBy, returnDistance, distanceUnit, returnTime, timeUnit, language, directionsStyle, segmentGeometryStyle, primaryNameOnly, majorRoads, historicTrafficTimeBucket, returnDirectionGeometry, useCvr, looseningBarrierRestrictions, vehicleType, weight, weightUnit, height, heightUnit, length, lengthUnit, width, widthUnit, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getTravelCostMatrixByAddress * @param startAddresses Start locations in text based addresses. (optional) * @param endAddresses End locations in text based addresses. (optional) * @param country 3 Digit ISO country code. (optional, default to USA) * @param db Mode of commute. (optional, default to driving) * @param optimizeBy Specifies whether routes should be optimized by time or distance. (optional, default to time) * @param returnDistance Specifies whether distance needs to be returned in response. (optional, default to true) * @param destinationSrs Specifies the desired coordinate system of returned routes. (optional) * @param distanceUnit Return Distance Unit such as ft(Foot), km(Kilometer), mi(Mile), m(Meter) or yd(Yard). (optional, default to m) * @param returnTime Specifies whether time needs to be returned in response. (optional, default to true) * @param timeUnit Return time unit such as min(Minute), h(Hour), s(Second) or msec(Millisecond). (optional, default to min) * @param majorRoads Whether to include all roads in routes calculation or just major roads. (optional, default to false) * @param returnOptimalRoutesOnly Specifies whether to return only the optimized route for each start and end point combination. (optional, default to true) * @param historicTrafficTimeBucket Specifies whether routing calculation uses the historic traffic speeds. (optional, default to None) * @param useCvr This parameter will enable/disable CVR (Commercial Vehicle Restrictions) capability in our APIs. (optional, default to N) * @param looseningBarrierRestrictions Specifies that barriers will be removed when determining the route. (optional, default to Y) * @param vehicleType vehicle type. (optional, default to ALL) * @param weight Specifies the maximum weight of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param weightUnit The unit of weight eg. kg(kilogram), lb(pound), mt(metric ton), t(ton). (optional, default to kg) * @param height Specifies the maximum height of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param heightUnit The unit of height e.g m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @param length Specifies the maximum length of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param lengthUnit The unit of length eg. m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @param width Specifies the maximum width of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param widthUnit The unit of width eg. m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
400 Bad Request -
500 Internal Server Error -
*/ public okhttp3.Call getTravelCostMatrixByAddressCall(String startAddresses, String endAddresses, String country, String db, String optimizeBy, String returnDistance, String destinationSrs, String distanceUnit, String returnTime, String timeUnit, String majorRoads, String returnOptimalRoutesOnly, String historicTrafficTimeBucket, String useCvr, String looseningBarrierRestrictions, String vehicleType, String weight, String weightUnit, String height, String heightUnit, String length, String lengthUnit, String width, String widthUnit, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/routing/v1/travelcostmatrix/byaddress"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (startAddresses != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("startAddresses", startAddresses)); } if (endAddresses != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("endAddresses", endAddresses)); } if (country != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("country", country)); } if (db != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("db", db)); } if (optimizeBy != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("optimizeBy", optimizeBy)); } if (returnDistance != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("returnDistance", returnDistance)); } if (destinationSrs != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("destinationSrs", destinationSrs)); } if (distanceUnit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("distanceUnit", distanceUnit)); } if (returnTime != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("returnTime", returnTime)); } if (timeUnit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("timeUnit", timeUnit)); } if (majorRoads != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("majorRoads", majorRoads)); } if (returnOptimalRoutesOnly != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("returnOptimalRoutesOnly", returnOptimalRoutesOnly)); } if (historicTrafficTimeBucket != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("historicTrafficTimeBucket", historicTrafficTimeBucket)); } if (useCvr != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("useCvr", useCvr)); } if (looseningBarrierRestrictions != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("looseningBarrierRestrictions", looseningBarrierRestrictions)); } if (vehicleType != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("vehicleType", vehicleType)); } if (weight != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("weight", weight)); } if (weightUnit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("weightUnit", weightUnit)); } if (height != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("height", height)); } if (heightUnit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("heightUnit", heightUnit)); } if (length != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("length", length)); } if (lengthUnit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("lengthUnit", lengthUnit)); } if (width != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("width", width)); } if (widthUnit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("widthUnit", widthUnit)); } final String[] localVarAccepts = { "application/json", "application/xml" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "oAuth2Password" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getTravelCostMatrixByAddressValidateBeforeCall(String startAddresses, String endAddresses, String country, String db, String optimizeBy, String returnDistance, String destinationSrs, String distanceUnit, String returnTime, String timeUnit, String majorRoads, String returnOptimalRoutesOnly, String historicTrafficTimeBucket, String useCvr, String looseningBarrierRestrictions, String vehicleType, String weight, String weightUnit, String height, String heightUnit, String length, String lengthUnit, String width, String widthUnit, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getTravelCostMatrixByAddressCall(startAddresses, endAddresses, country, db, optimizeBy, returnDistance, destinationSrs, distanceUnit, returnTime, timeUnit, majorRoads, returnOptimalRoutesOnly, historicTrafficTimeBucket, useCvr, looseningBarrierRestrictions, vehicleType, weight, weightUnit, height, heightUnit, length, lengthUnit, width, widthUnit, _callback); return localVarCall; } /** * Get Cost Matrix By Address. * Accepts addresses as input and Returns travel distances and times for multiple origins to multiple destinations by various travel modes. * @param startAddresses Start locations in text based addresses. (optional) * @param endAddresses End locations in text based addresses. (optional) * @param country 3 Digit ISO country code. (optional, default to USA) * @param db Mode of commute. (optional, default to driving) * @param optimizeBy Specifies whether routes should be optimized by time or distance. (optional, default to time) * @param returnDistance Specifies whether distance needs to be returned in response. (optional, default to true) * @param destinationSrs Specifies the desired coordinate system of returned routes. (optional) * @param distanceUnit Return Distance Unit such as ft(Foot), km(Kilometer), mi(Mile), m(Meter) or yd(Yard). (optional, default to m) * @param returnTime Specifies whether time needs to be returned in response. (optional, default to true) * @param timeUnit Return time unit such as min(Minute), h(Hour), s(Second) or msec(Millisecond). (optional, default to min) * @param majorRoads Whether to include all roads in routes calculation or just major roads. (optional, default to false) * @param returnOptimalRoutesOnly Specifies whether to return only the optimized route for each start and end point combination. (optional, default to true) * @param historicTrafficTimeBucket Specifies whether routing calculation uses the historic traffic speeds. (optional, default to None) * @param useCvr This parameter will enable/disable CVR (Commercial Vehicle Restrictions) capability in our APIs. (optional, default to N) * @param looseningBarrierRestrictions Specifies that barriers will be removed when determining the route. (optional, default to Y) * @param vehicleType vehicle type. (optional, default to ALL) * @param weight Specifies the maximum weight of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param weightUnit The unit of weight eg. kg(kilogram), lb(pound), mt(metric ton), t(ton). (optional, default to kg) * @param height Specifies the maximum height of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param heightUnit The unit of height e.g m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @param length Specifies the maximum length of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param lengthUnit The unit of length eg. m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @param width Specifies the maximum width of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param widthUnit The unit of width eg. m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @return TravelCostMatrixResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
400 Bad Request -
500 Internal Server Error -
*/ public TravelCostMatrixResponse getTravelCostMatrixByAddress(String startAddresses, String endAddresses, String country, String db, String optimizeBy, String returnDistance, String destinationSrs, String distanceUnit, String returnTime, String timeUnit, String majorRoads, String returnOptimalRoutesOnly, String historicTrafficTimeBucket, String useCvr, String looseningBarrierRestrictions, String vehicleType, String weight, String weightUnit, String height, String heightUnit, String length, String lengthUnit, String width, String widthUnit) throws ApiException { ApiResponse localVarResp = getTravelCostMatrixByAddressWithHttpInfo(startAddresses, endAddresses, country, db, optimizeBy, returnDistance, destinationSrs, distanceUnit, returnTime, timeUnit, majorRoads, returnOptimalRoutesOnly, historicTrafficTimeBucket, useCvr, looseningBarrierRestrictions, vehicleType, weight, weightUnit, height, heightUnit, length, lengthUnit, width, widthUnit); return localVarResp.getData(); } /** * Get Cost Matrix By Address. * Accepts addresses as input and Returns travel distances and times for multiple origins to multiple destinations by various travel modes. * @param startAddresses Start locations in text based addresses. (optional) * @param endAddresses End locations in text based addresses. (optional) * @param country 3 Digit ISO country code. (optional, default to USA) * @param db Mode of commute. (optional, default to driving) * @param optimizeBy Specifies whether routes should be optimized by time or distance. (optional, default to time) * @param returnDistance Specifies whether distance needs to be returned in response. (optional, default to true) * @param destinationSrs Specifies the desired coordinate system of returned routes. (optional) * @param distanceUnit Return Distance Unit such as ft(Foot), km(Kilometer), mi(Mile), m(Meter) or yd(Yard). (optional, default to m) * @param returnTime Specifies whether time needs to be returned in response. (optional, default to true) * @param timeUnit Return time unit such as min(Minute), h(Hour), s(Second) or msec(Millisecond). (optional, default to min) * @param majorRoads Whether to include all roads in routes calculation or just major roads. (optional, default to false) * @param returnOptimalRoutesOnly Specifies whether to return only the optimized route for each start and end point combination. (optional, default to true) * @param historicTrafficTimeBucket Specifies whether routing calculation uses the historic traffic speeds. (optional, default to None) * @param useCvr This parameter will enable/disable CVR (Commercial Vehicle Restrictions) capability in our APIs. (optional, default to N) * @param looseningBarrierRestrictions Specifies that barriers will be removed when determining the route. (optional, default to Y) * @param vehicleType vehicle type. (optional, default to ALL) * @param weight Specifies the maximum weight of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param weightUnit The unit of weight eg. kg(kilogram), lb(pound), mt(metric ton), t(ton). (optional, default to kg) * @param height Specifies the maximum height of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param heightUnit The unit of height e.g m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @param length Specifies the maximum length of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param lengthUnit The unit of length eg. m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @param width Specifies the maximum width of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param widthUnit The unit of width eg. m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @return ApiResponse<TravelCostMatrixResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
400 Bad Request -
500 Internal Server Error -
*/ public ApiResponse getTravelCostMatrixByAddressWithHttpInfo(String startAddresses, String endAddresses, String country, String db, String optimizeBy, String returnDistance, String destinationSrs, String distanceUnit, String returnTime, String timeUnit, String majorRoads, String returnOptimalRoutesOnly, String historicTrafficTimeBucket, String useCvr, String looseningBarrierRestrictions, String vehicleType, String weight, String weightUnit, String height, String heightUnit, String length, String lengthUnit, String width, String widthUnit) throws ApiException { okhttp3.Call localVarCall = getTravelCostMatrixByAddressValidateBeforeCall(startAddresses, endAddresses, country, db, optimizeBy, returnDistance, destinationSrs, distanceUnit, returnTime, timeUnit, majorRoads, returnOptimalRoutesOnly, historicTrafficTimeBucket, useCvr, looseningBarrierRestrictions, vehicleType, weight, weightUnit, height, heightUnit, length, lengthUnit, width, widthUnit, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get Cost Matrix By Address. (asynchronously) * Accepts addresses as input and Returns travel distances and times for multiple origins to multiple destinations by various travel modes. * @param startAddresses Start locations in text based addresses. (optional) * @param endAddresses End locations in text based addresses. (optional) * @param country 3 Digit ISO country code. (optional, default to USA) * @param db Mode of commute. (optional, default to driving) * @param optimizeBy Specifies whether routes should be optimized by time or distance. (optional, default to time) * @param returnDistance Specifies whether distance needs to be returned in response. (optional, default to true) * @param destinationSrs Specifies the desired coordinate system of returned routes. (optional) * @param distanceUnit Return Distance Unit such as ft(Foot), km(Kilometer), mi(Mile), m(Meter) or yd(Yard). (optional, default to m) * @param returnTime Specifies whether time needs to be returned in response. (optional, default to true) * @param timeUnit Return time unit such as min(Minute), h(Hour), s(Second) or msec(Millisecond). (optional, default to min) * @param majorRoads Whether to include all roads in routes calculation or just major roads. (optional, default to false) * @param returnOptimalRoutesOnly Specifies whether to return only the optimized route for each start and end point combination. (optional, default to true) * @param historicTrafficTimeBucket Specifies whether routing calculation uses the historic traffic speeds. (optional, default to None) * @param useCvr This parameter will enable/disable CVR (Commercial Vehicle Restrictions) capability in our APIs. (optional, default to N) * @param looseningBarrierRestrictions Specifies that barriers will be removed when determining the route. (optional, default to Y) * @param vehicleType vehicle type. (optional, default to ALL) * @param weight Specifies the maximum weight of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param weightUnit The unit of weight eg. kg(kilogram), lb(pound), mt(metric ton), t(ton). (optional, default to kg) * @param height Specifies the maximum height of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param heightUnit The unit of height e.g m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @param length Specifies the maximum length of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param lengthUnit The unit of length eg. m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @param width Specifies the maximum width of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param widthUnit The unit of width eg. m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
400 Bad Request -
500 Internal Server Error -
*/ public okhttp3.Call getTravelCostMatrixByAddressAsync(String startAddresses, String endAddresses, String country, String db, String optimizeBy, String returnDistance, String destinationSrs, String distanceUnit, String returnTime, String timeUnit, String majorRoads, String returnOptimalRoutesOnly, String historicTrafficTimeBucket, String useCvr, String looseningBarrierRestrictions, String vehicleType, String weight, String weightUnit, String height, String heightUnit, String length, String lengthUnit, String width, String widthUnit, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getTravelCostMatrixByAddressValidateBeforeCall(startAddresses, endAddresses, country, db, optimizeBy, returnDistance, destinationSrs, distanceUnit, returnTime, timeUnit, majorRoads, returnOptimalRoutesOnly, historicTrafficTimeBucket, useCvr, looseningBarrierRestrictions, vehicleType, weight, weightUnit, height, heightUnit, length, lengthUnit, width, widthUnit, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getTravelCostMatrixByLocation * @param startPoints The address to be searched. (optional) * @param endPoints The address to be searched. (optional) * @param db Mode of commute. (optional, default to driving) * @param optimizeBy Specifies whether routes should be optimized by time or distance. (optional, default to time) * @param returnDistance Specifies whether distance needs to be returned in response. (optional, default to true) * @param destinationSrs Specifies the desired coordinate system of returned routes. (optional, default to epsg:4326) * @param distanceUnit Return Distance Unit such as ft(Foot), km(Kilometer), mi(Mile), m(Meter) or yd(Yard). (optional, default to m) * @param returnTime Specifies whether time needs to be returned in response. (optional, default to true) * @param timeUnit Return time unit such as min(Minute), h(Hour), s(Second) or msec(Millisecond). (optional, default to min) * @param majorRoads Whether to include all roads in routes calculation or just major roads. (optional, default to false) * @param returnOptimalRoutesOnly Specifies whether to return only the optimized route for each start and end point combination. (optional, default to true) * @param historicTrafficTimeBucket Specifies whether routing calculation uses the historic traffic speeds. (optional, default to None) * @param useCvr This parameter will enable/disable CVR (Commercial Vehicle Restrictions) capability in our APIs. (optional, default to N) * @param looseningBarrierRestrictions Specifies that barriers will be removed when determining the route. (optional, default to Y) * @param vehicleType vehicle type. (optional, default to ALL) * @param weight Specifies the maximum weight of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param weightUnit The unit of weight eg. kg(kilogram), lb(pound), mt(metric ton), t(ton). (optional, default to kg) * @param height Specifies the maximum height of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param heightUnit The unit of height e.g m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @param length Specifies the maximum length of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param lengthUnit The unit of length eg. m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @param width Specifies the maximum width of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param widthUnit The unit of width eg. m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
400 Bad Request -
500 Internal Server Error -
*/ public okhttp3.Call getTravelCostMatrixByLocationCall(String startPoints, String endPoints, String db, String optimizeBy, String returnDistance, String destinationSrs, String distanceUnit, String returnTime, String timeUnit, String majorRoads, String returnOptimalRoutesOnly, String historicTrafficTimeBucket, String useCvr, String looseningBarrierRestrictions, String vehicleType, String weight, String weightUnit, String height, String heightUnit, String length, String lengthUnit, String width, String widthUnit, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/routing/v1/travelcostmatrix/bylocation"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (startPoints != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("startPoints", startPoints)); } if (endPoints != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("endPoints", endPoints)); } if (db != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("db", db)); } if (optimizeBy != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("optimizeBy", optimizeBy)); } if (returnDistance != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("returnDistance", returnDistance)); } if (destinationSrs != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("destinationSrs", destinationSrs)); } if (distanceUnit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("distanceUnit", distanceUnit)); } if (returnTime != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("returnTime", returnTime)); } if (timeUnit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("timeUnit", timeUnit)); } if (majorRoads != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("majorRoads", majorRoads)); } if (returnOptimalRoutesOnly != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("returnOptimalRoutesOnly", returnOptimalRoutesOnly)); } if (historicTrafficTimeBucket != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("historicTrafficTimeBucket", historicTrafficTimeBucket)); } if (useCvr != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("useCvr", useCvr)); } if (looseningBarrierRestrictions != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("looseningBarrierRestrictions", looseningBarrierRestrictions)); } if (vehicleType != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("vehicleType", vehicleType)); } if (weight != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("weight", weight)); } if (weightUnit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("weightUnit", weightUnit)); } if (height != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("height", height)); } if (heightUnit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("heightUnit", heightUnit)); } if (length != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("length", length)); } if (lengthUnit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("lengthUnit", lengthUnit)); } if (width != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("width", width)); } if (widthUnit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("widthUnit", widthUnit)); } final String[] localVarAccepts = { "application/json", "application/xml" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "oAuth2Password" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getTravelCostMatrixByLocationValidateBeforeCall(String startPoints, String endPoints, String db, String optimizeBy, String returnDistance, String destinationSrs, String distanceUnit, String returnTime, String timeUnit, String majorRoads, String returnOptimalRoutesOnly, String historicTrafficTimeBucket, String useCvr, String looseningBarrierRestrictions, String vehicleType, String weight, String weightUnit, String height, String heightUnit, String length, String lengthUnit, String width, String widthUnit, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getTravelCostMatrixByLocationCall(startPoints, endPoints, db, optimizeBy, returnDistance, destinationSrs, distanceUnit, returnTime, timeUnit, majorRoads, returnOptimalRoutesOnly, historicTrafficTimeBucket, useCvr, looseningBarrierRestrictions, vehicleType, weight, weightUnit, height, heightUnit, length, lengthUnit, width, widthUnit, _callback); return localVarCall; } /** * Get Cost Matrix By Location. * Accepts latitude & longitude as input and Returns travel distances and times for multiple origins to multiple destinations by various travel modes. * @param startPoints The address to be searched. (optional) * @param endPoints The address to be searched. (optional) * @param db Mode of commute. (optional, default to driving) * @param optimizeBy Specifies whether routes should be optimized by time or distance. (optional, default to time) * @param returnDistance Specifies whether distance needs to be returned in response. (optional, default to true) * @param destinationSrs Specifies the desired coordinate system of returned routes. (optional, default to epsg:4326) * @param distanceUnit Return Distance Unit such as ft(Foot), km(Kilometer), mi(Mile), m(Meter) or yd(Yard). (optional, default to m) * @param returnTime Specifies whether time needs to be returned in response. (optional, default to true) * @param timeUnit Return time unit such as min(Minute), h(Hour), s(Second) or msec(Millisecond). (optional, default to min) * @param majorRoads Whether to include all roads in routes calculation or just major roads. (optional, default to false) * @param returnOptimalRoutesOnly Specifies whether to return only the optimized route for each start and end point combination. (optional, default to true) * @param historicTrafficTimeBucket Specifies whether routing calculation uses the historic traffic speeds. (optional, default to None) * @param useCvr This parameter will enable/disable CVR (Commercial Vehicle Restrictions) capability in our APIs. (optional, default to N) * @param looseningBarrierRestrictions Specifies that barriers will be removed when determining the route. (optional, default to Y) * @param vehicleType vehicle type. (optional, default to ALL) * @param weight Specifies the maximum weight of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param weightUnit The unit of weight eg. kg(kilogram), lb(pound), mt(metric ton), t(ton). (optional, default to kg) * @param height Specifies the maximum height of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param heightUnit The unit of height e.g m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @param length Specifies the maximum length of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param lengthUnit The unit of length eg. m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @param width Specifies the maximum width of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param widthUnit The unit of width eg. m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @return TravelCostMatrixResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
400 Bad Request -
500 Internal Server Error -
*/ public TravelCostMatrixResponse getTravelCostMatrixByLocation(String startPoints, String endPoints, String db, String optimizeBy, String returnDistance, String destinationSrs, String distanceUnit, String returnTime, String timeUnit, String majorRoads, String returnOptimalRoutesOnly, String historicTrafficTimeBucket, String useCvr, String looseningBarrierRestrictions, String vehicleType, String weight, String weightUnit, String height, String heightUnit, String length, String lengthUnit, String width, String widthUnit) throws ApiException { ApiResponse localVarResp = getTravelCostMatrixByLocationWithHttpInfo(startPoints, endPoints, db, optimizeBy, returnDistance, destinationSrs, distanceUnit, returnTime, timeUnit, majorRoads, returnOptimalRoutesOnly, historicTrafficTimeBucket, useCvr, looseningBarrierRestrictions, vehicleType, weight, weightUnit, height, heightUnit, length, lengthUnit, width, widthUnit); return localVarResp.getData(); } /** * Get Cost Matrix By Location. * Accepts latitude & longitude as input and Returns travel distances and times for multiple origins to multiple destinations by various travel modes. * @param startPoints The address to be searched. (optional) * @param endPoints The address to be searched. (optional) * @param db Mode of commute. (optional, default to driving) * @param optimizeBy Specifies whether routes should be optimized by time or distance. (optional, default to time) * @param returnDistance Specifies whether distance needs to be returned in response. (optional, default to true) * @param destinationSrs Specifies the desired coordinate system of returned routes. (optional, default to epsg:4326) * @param distanceUnit Return Distance Unit such as ft(Foot), km(Kilometer), mi(Mile), m(Meter) or yd(Yard). (optional, default to m) * @param returnTime Specifies whether time needs to be returned in response. (optional, default to true) * @param timeUnit Return time unit such as min(Minute), h(Hour), s(Second) or msec(Millisecond). (optional, default to min) * @param majorRoads Whether to include all roads in routes calculation or just major roads. (optional, default to false) * @param returnOptimalRoutesOnly Specifies whether to return only the optimized route for each start and end point combination. (optional, default to true) * @param historicTrafficTimeBucket Specifies whether routing calculation uses the historic traffic speeds. (optional, default to None) * @param useCvr This parameter will enable/disable CVR (Commercial Vehicle Restrictions) capability in our APIs. (optional, default to N) * @param looseningBarrierRestrictions Specifies that barriers will be removed when determining the route. (optional, default to Y) * @param vehicleType vehicle type. (optional, default to ALL) * @param weight Specifies the maximum weight of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param weightUnit The unit of weight eg. kg(kilogram), lb(pound), mt(metric ton), t(ton). (optional, default to kg) * @param height Specifies the maximum height of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param heightUnit The unit of height e.g m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @param length Specifies the maximum length of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param lengthUnit The unit of length eg. m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @param width Specifies the maximum width of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param widthUnit The unit of width eg. m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @return ApiResponse<TravelCostMatrixResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
400 Bad Request -
500 Internal Server Error -
*/ public ApiResponse getTravelCostMatrixByLocationWithHttpInfo(String startPoints, String endPoints, String db, String optimizeBy, String returnDistance, String destinationSrs, String distanceUnit, String returnTime, String timeUnit, String majorRoads, String returnOptimalRoutesOnly, String historicTrafficTimeBucket, String useCvr, String looseningBarrierRestrictions, String vehicleType, String weight, String weightUnit, String height, String heightUnit, String length, String lengthUnit, String width, String widthUnit) throws ApiException { okhttp3.Call localVarCall = getTravelCostMatrixByLocationValidateBeforeCall(startPoints, endPoints, db, optimizeBy, returnDistance, destinationSrs, distanceUnit, returnTime, timeUnit, majorRoads, returnOptimalRoutesOnly, historicTrafficTimeBucket, useCvr, looseningBarrierRestrictions, vehicleType, weight, weightUnit, height, heightUnit, length, lengthUnit, width, widthUnit, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get Cost Matrix By Location. (asynchronously) * Accepts latitude & longitude as input and Returns travel distances and times for multiple origins to multiple destinations by various travel modes. * @param startPoints The address to be searched. (optional) * @param endPoints The address to be searched. (optional) * @param db Mode of commute. (optional, default to driving) * @param optimizeBy Specifies whether routes should be optimized by time or distance. (optional, default to time) * @param returnDistance Specifies whether distance needs to be returned in response. (optional, default to true) * @param destinationSrs Specifies the desired coordinate system of returned routes. (optional, default to epsg:4326) * @param distanceUnit Return Distance Unit such as ft(Foot), km(Kilometer), mi(Mile), m(Meter) or yd(Yard). (optional, default to m) * @param returnTime Specifies whether time needs to be returned in response. (optional, default to true) * @param timeUnit Return time unit such as min(Minute), h(Hour), s(Second) or msec(Millisecond). (optional, default to min) * @param majorRoads Whether to include all roads in routes calculation or just major roads. (optional, default to false) * @param returnOptimalRoutesOnly Specifies whether to return only the optimized route for each start and end point combination. (optional, default to true) * @param historicTrafficTimeBucket Specifies whether routing calculation uses the historic traffic speeds. (optional, default to None) * @param useCvr This parameter will enable/disable CVR (Commercial Vehicle Restrictions) capability in our APIs. (optional, default to N) * @param looseningBarrierRestrictions Specifies that barriers will be removed when determining the route. (optional, default to Y) * @param vehicleType vehicle type. (optional, default to ALL) * @param weight Specifies the maximum weight of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param weightUnit The unit of weight eg. kg(kilogram), lb(pound), mt(metric ton), t(ton). (optional, default to kg) * @param height Specifies the maximum height of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param heightUnit The unit of height e.g m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @param length Specifies the maximum length of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param lengthUnit The unit of length eg. m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @param width Specifies the maximum width of a vehicle. Any vehicles over this value will be restricted when determining the route. (optional, default to ) * @param widthUnit The unit of width eg. m(meter), km(kilometer), yd(yard), ft(foot), mi(mile). (optional, default to ft) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
400 Bad Request -
500 Internal Server Error -
*/ public okhttp3.Call getTravelCostMatrixByLocationAsync(String startPoints, String endPoints, String db, String optimizeBy, String returnDistance, String destinationSrs, String distanceUnit, String returnTime, String timeUnit, String majorRoads, String returnOptimalRoutesOnly, String historicTrafficTimeBucket, String useCvr, String looseningBarrierRestrictions, String vehicleType, String weight, String weightUnit, String height, String heightUnit, String length, String lengthUnit, String width, String widthUnit, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getTravelCostMatrixByLocationValidateBeforeCall(startPoints, endPoints, db, optimizeBy, returnDistance, destinationSrs, distanceUnit, returnTime, timeUnit, majorRoads, returnOptimalRoutesOnly, historicTrafficTimeBucket, useCvr, looseningBarrierRestrictions, vehicleType, weight, weightUnit, height, heightUnit, length, lengthUnit, width, widthUnit, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy