import { Command as $Command } from "@smithy/smithy-client"; import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { LocationClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../LocationClient"; import { CalculateRouteRequest, CalculateRouteResponse } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link CalculateRouteCommand}. */ export interface CalculateRouteCommandInput extends CalculateRouteRequest { } /** * @public * * The output of {@link CalculateRouteCommand}. */ export interface CalculateRouteCommandOutput extends CalculateRouteResponse, __MetadataBearer { } declare const CalculateRouteCommand_base: { new (input: CalculateRouteCommandInput): import("@smithy/smithy-client").CommandImpl; new (input: CalculateRouteCommandInput): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

* Calculates a route given the following required parameters: * DeparturePosition and DestinationPosition. Requires that * you first create a * route calculator resource.

*

By default, a request that doesn't specify a departure time uses the best time of day * to travel with the best traffic conditions when calculating the route.

*

Additional options include:

* * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { LocationClient, CalculateRouteCommand } from "@aws-sdk/client-location"; // ES Modules import * // const { LocationClient, CalculateRouteCommand } = require("@aws-sdk/client-location"); // CommonJS import * const client = new LocationClient(config); * const input = { // CalculateRouteRequest * CalculatorName: "STRING_VALUE", // required * DeparturePosition: [ // Position // required * Number("double"), * ], * DestinationPosition: [ // required * Number("double"), * ], * WaypointPositions: [ // WaypointPositionList * [ * Number("double"), * ], * ], * TravelMode: "STRING_VALUE", * DepartureTime: new Date("TIMESTAMP"), * DepartNow: true || false, * DistanceUnit: "STRING_VALUE", * IncludeLegGeometry: true || false, * CarModeOptions: { // CalculateRouteCarModeOptions * AvoidFerries: true || false, * AvoidTolls: true || false, * }, * TruckModeOptions: { // CalculateRouteTruckModeOptions * AvoidFerries: true || false, * AvoidTolls: true || false, * Dimensions: { // TruckDimensions * Length: Number("double"), * Height: Number("double"), * Width: Number("double"), * Unit: "STRING_VALUE", * }, * Weight: { // TruckWeight * Total: Number("double"), * Unit: "STRING_VALUE", * }, * }, * ArrivalTime: new Date("TIMESTAMP"), * OptimizeFor: "STRING_VALUE", * Key: "STRING_VALUE", * }; * const command = new CalculateRouteCommand(input); * const response = await client.send(command); * // { // CalculateRouteResponse * // Legs: [ // LegList // required * // { // Leg * // StartPosition: [ // Position // required * // Number("double"), * // ], * // EndPosition: [ // required * // Number("double"), * // ], * // Distance: Number("double"), // required * // DurationSeconds: Number("double"), // required * // Geometry: { // LegGeometry * // LineString: [ // LineString * // [ * // Number("double"), * // ], * // ], * // }, * // Steps: [ // StepList // required * // { // Step * // StartPosition: [ // required * // Number("double"), * // ], * // EndPosition: [ // required * // Number("double"), * // ], * // Distance: Number("double"), // required * // DurationSeconds: Number("double"), // required * // GeometryOffset: Number("int"), * // }, * // ], * // }, * // ], * // Summary: { // CalculateRouteSummary * // RouteBBox: [ // BoundingBox // required * // Number("double"), * // ], * // DataSource: "STRING_VALUE", // required * // Distance: Number("double"), // required * // DurationSeconds: Number("double"), // required * // DistanceUnit: "STRING_VALUE", // required * // }, * // }; * * ``` * * @param CalculateRouteCommandInput - {@link CalculateRouteCommandInput} * @returns {@link CalculateRouteCommandOutput} * @see {@link CalculateRouteCommandInput} for command's `input` shape. * @see {@link CalculateRouteCommandOutput} for command's `response` shape. * @see {@link LocationClientResolvedConfig | config} for LocationClient's `config` shape. * * @throws {@link AccessDeniedException} (client fault) *

The request was denied because of insufficient access or permissions. Check with an * administrator to verify your permissions.

* * @throws {@link InternalServerException} (server fault) *

The request has failed to process because of an unknown server error, exception, or failure.

* * @throws {@link ResourceNotFoundException} (client fault) *

The resource that you've entered was not found in your AWS account.

* * @throws {@link ThrottlingException} (client fault) *

The request was denied because of request throttling.

* * @throws {@link ValidationException} (client fault) *

The input failed to meet the constraints specified by the AWS service.

* * @throws {@link LocationServiceException} *

Base exception class for all service exceptions from Location service.

* * * @public */ export declare class CalculateRouteCommand extends CalculateRouteCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: CalculateRouteRequest; output: CalculateRouteResponse; }; sdk: { input: CalculateRouteCommandInput; output: CalculateRouteCommandOutput; }; }; }