/* * Copyright 2010-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ package com.amazonaws.services.geo.model; import java.io.Serializable; /** *
* A summary of the calculated route. *
*/ public class CalculateRouteSummary implements Serializable { /** ** The data provider of traffic and road network data used to calculate the * route. Indicates one of the available providers: *
*
* Esri
*
* Grab
*
* Here
*
* For more information about data providers, see Amazon Location Service data providers. *
*/ private String dataSource; /** ** The total distance covered by the route. The sum of the distance * travelled between every stop on the route. *
*
* If Esri is the data source for the route calculator, the route distance
* can’t be greater than 400 km. If the route exceeds 400 km, the response
* is a 400 RoutesValidationException
error.
*
* Constraints:
* Range: 0.0 -
*/
private Double distance;
/**
*
* The unit of measurement for route distances. *
*
* Constraints:
* Allowed Values: Kilometers, Miles
*/
private String distanceUnit;
/**
*
* The total travel time for the route measured in seconds. The sum of the * travel time between every stop on the route. *
*
* Constraints:
* Range: 0.0 -
*/
private Double durationSeconds;
/**
*
* Specifies a geographical box surrounding a route. Used to zoom into a
* route when displaying it in a map. For example,
* [min x, min y, max x, max y]
.
*
* The first 2 bbox
parameters describe the lower southwest
* corner:
*
* The first bbox
position is the X coordinate or longitude of
* the lower southwest corner.
*
* The second bbox
position is the Y coordinate or latitude of
* the lower southwest corner.
*
* The next 2 bbox
parameters describe the upper northeast
* corner:
*
* The third bbox
position is the X coordinate, or longitude of
* the upper northeast corner.
*
* The fourth bbox
position is the Y coordinate, or latitude of
* the upper northeast corner.
*
* The data provider of traffic and road network data used to calculate the * route. Indicates one of the available providers: *
*
* Esri
*
* Grab
*
* Here
*
* For more information about data providers, see Amazon Location Service data providers. *
* * @return* The data provider of traffic and road network data used to * calculate the route. Indicates one of the available providers: *
*
* Esri
*
* Grab
*
* Here
*
* For more information about data providers, see Amazon Location Service data providers. *
*/ public String getDataSource() { return dataSource; } /** ** The data provider of traffic and road network data used to calculate the * route. Indicates one of the available providers: *
*
* Esri
*
* Grab
*
* Here
*
* For more information about data providers, see Amazon Location Service data providers. *
* * @param dataSource* The data provider of traffic and road network data used to * calculate the route. Indicates one of the available providers: *
*
* Esri
*
* Grab
*
* Here
*
* For more information about data providers, see Amazon Location Service data providers. *
*/ public void setDataSource(String dataSource) { this.dataSource = dataSource; } /** ** The data provider of traffic and road network data used to calculate the * route. Indicates one of the available providers: *
*
* Esri
*
* Grab
*
* Here
*
* For more information about data providers, see Amazon Location Service data providers. *
** Returns a reference to this object so that method calls can be chained * together. * * @param dataSource
* The data provider of traffic and road network data used to * calculate the route. Indicates one of the available providers: *
*
* Esri
*
* Grab
*
* Here
*
* For more information about data providers, see Amazon Location Service data providers. *
* @return A reference to this updated object so that method calls can be * chained together. */ public CalculateRouteSummary withDataSource(String dataSource) { this.dataSource = dataSource; return this; } /** ** The total distance covered by the route. The sum of the distance * travelled between every stop on the route. *
*
* If Esri is the data source for the route calculator, the route distance
* can’t be greater than 400 km. If the route exceeds 400 km, the response
* is a 400 RoutesValidationException
error.
*
* Constraints:
* Range: 0.0 -
*
* @return
* The total distance covered by the route. The sum of the distance * travelled between every stop on the route. *
*
* If Esri is the data source for the route calculator, the route
* distance can’t be greater than 400 km. If the route exceeds 400
* km, the response is a 400 RoutesValidationException
* error.
*
* The total distance covered by the route. The sum of the distance * travelled between every stop on the route. *
*
* If Esri is the data source for the route calculator, the route distance
* can’t be greater than 400 km. If the route exceeds 400 km, the response
* is a 400 RoutesValidationException
error.
*
* Constraints:
* Range: 0.0 -
*
* @param distance
* The total distance covered by the route. The sum of the * distance travelled between every stop on the route. *
*
* If Esri is the data source for the route calculator, the route
* distance can’t be greater than 400 km. If the route exceeds
* 400 km, the response is a
* 400 RoutesValidationException
error.
*
* The total distance covered by the route. The sum of the distance * travelled between every stop on the route. *
*
* If Esri is the data source for the route calculator, the route distance
* can’t be greater than 400 km. If the route exceeds 400 km, the response
* is a 400 RoutesValidationException
error.
*
* Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Range: 0.0 -
*
* @param distance
* The total distance covered by the route. The sum of the * distance travelled between every stop on the route. *
*
* If Esri is the data source for the route calculator, the route
* distance can’t be greater than 400 km. If the route exceeds
* 400 km, the response is a
* 400 RoutesValidationException
error.
*
* The unit of measurement for route distances. *
*
* Constraints:
* Allowed Values: Kilometers, Miles
*
* @return
* The unit of measurement for route distances. *
* @see DistanceUnit */ public String getDistanceUnit() { return distanceUnit; } /** ** The unit of measurement for route distances. *
*
* Constraints:
* Allowed Values: Kilometers, Miles
*
* @param distanceUnit
* The unit of measurement for route distances. *
* @see DistanceUnit */ public void setDistanceUnit(String distanceUnit) { this.distanceUnit = distanceUnit; } /** ** The unit of measurement for route distances. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: Kilometers, Miles
*
* @param distanceUnit
* The unit of measurement for route distances. *
* @return A reference to this updated object so that method calls can be * chained together. * @see DistanceUnit */ public CalculateRouteSummary withDistanceUnit(String distanceUnit) { this.distanceUnit = distanceUnit; return this; } /** ** The unit of measurement for route distances. *
*
* Constraints:
* Allowed Values: Kilometers, Miles
*
* @param distanceUnit
* The unit of measurement for route distances. *
* @see DistanceUnit */ public void setDistanceUnit(DistanceUnit distanceUnit) { this.distanceUnit = distanceUnit.toString(); } /** ** The unit of measurement for route distances. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: Kilometers, Miles
*
* @param distanceUnit
* The unit of measurement for route distances. *
* @return A reference to this updated object so that method calls can be * chained together. * @see DistanceUnit */ public CalculateRouteSummary withDistanceUnit(DistanceUnit distanceUnit) { this.distanceUnit = distanceUnit.toString(); return this; } /** ** The total travel time for the route measured in seconds. The sum of the * travel time between every stop on the route. *
*
* Constraints:
* Range: 0.0 -
*
* @return
* The total travel time for the route measured in seconds. The sum * of the travel time between every stop on the route. *
*/ public Double getDurationSeconds() { return durationSeconds; } /** ** The total travel time for the route measured in seconds. The sum of the * travel time between every stop on the route. *
*
* Constraints:
* Range: 0.0 -
*
* @param durationSeconds
* The total travel time for the route measured in seconds. The * sum of the travel time between every stop on the route. *
*/ public void setDurationSeconds(Double durationSeconds) { this.durationSeconds = durationSeconds; } /** ** The total travel time for the route measured in seconds. The sum of the * travel time between every stop on the route. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Range: 0.0 -
*
* @param durationSeconds
* The total travel time for the route measured in seconds. The * sum of the travel time between every stop on the route. *
* @return A reference to this updated object so that method calls can be * chained together. */ public CalculateRouteSummary withDurationSeconds(Double durationSeconds) { this.durationSeconds = durationSeconds; return this; } /** *
* Specifies a geographical box surrounding a route. Used to zoom into a
* route when displaying it in a map. For example,
* [min x, min y, max x, max y]
.
*
* The first 2 bbox
parameters describe the lower southwest
* corner:
*
* The first bbox
position is the X coordinate or longitude of
* the lower southwest corner.
*
* The second bbox
position is the Y coordinate or latitude of
* the lower southwest corner.
*
* The next 2 bbox
parameters describe the upper northeast
* corner:
*
* The third bbox
position is the X coordinate, or longitude of
* the upper northeast corner.
*
* The fourth bbox
position is the Y coordinate, or latitude of
* the upper northeast corner.
*
* Specifies a geographical box surrounding a route. Used to zoom
* into a route when displaying it in a map. For example,
* [min x, min y, max x, max y]
.
*
* The first 2 bbox
parameters describe the lower
* southwest corner:
*
* The first bbox
position is the X coordinate or
* longitude of the lower southwest corner.
*
* The second bbox
position is the Y coordinate or
* latitude of the lower southwest corner.
*
* The next 2 bbox
parameters describe the upper
* northeast corner:
*
* The third bbox
position is the X coordinate, or
* longitude of the upper northeast corner.
*
* The fourth bbox
position is the Y coordinate, or
* latitude of the upper northeast corner.
*
* Specifies a geographical box surrounding a route. Used to zoom into a
* route when displaying it in a map. For example,
* [min x, min y, max x, max y]
.
*
* The first 2 bbox
parameters describe the lower southwest
* corner:
*
* The first bbox
position is the X coordinate or longitude of
* the lower southwest corner.
*
* The second bbox
position is the Y coordinate or latitude of
* the lower southwest corner.
*
* The next 2 bbox
parameters describe the upper northeast
* corner:
*
* The third bbox
position is the X coordinate, or longitude of
* the upper northeast corner.
*
* The fourth bbox
position is the Y coordinate, or latitude of
* the upper northeast corner.
*
* Specifies a geographical box surrounding a route. Used to zoom
* into a route when displaying it in a map. For example,
* [min x, min y, max x, max y]
.
*
* The first 2 bbox
parameters describe the lower
* southwest corner:
*
* The first bbox
position is the X coordinate or
* longitude of the lower southwest corner.
*
* The second bbox
position is the Y coordinate or
* latitude of the lower southwest corner.
*
* The next 2 bbox
parameters describe the upper
* northeast corner:
*
* The third bbox
position is the X coordinate, or
* longitude of the upper northeast corner.
*
* The fourth bbox
position is the Y coordinate, or
* latitude of the upper northeast corner.
*
* Specifies a geographical box surrounding a route. Used to zoom into a
* route when displaying it in a map. For example,
* [min x, min y, max x, max y]
.
*
* The first 2 bbox
parameters describe the lower southwest
* corner:
*
* The first bbox
position is the X coordinate or longitude of
* the lower southwest corner.
*
* The second bbox
position is the Y coordinate or latitude of
* the lower southwest corner.
*
* The next 2 bbox
parameters describe the upper northeast
* corner:
*
* The third bbox
position is the X coordinate, or longitude of
* the upper northeast corner.
*
* The fourth bbox
position is the Y coordinate, or latitude of
* the upper northeast corner.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param routeBBox
* Specifies a geographical box surrounding a route. Used to zoom
* into a route when displaying it in a map. For example,
* [min x, min y, max x, max y]
.
*
* The first 2 bbox
parameters describe the lower
* southwest corner:
*
* The first bbox
position is the X coordinate or
* longitude of the lower southwest corner.
*
* The second bbox
position is the Y coordinate or
* latitude of the lower southwest corner.
*
* The next 2 bbox
parameters describe the upper
* northeast corner:
*
* The third bbox
position is the X coordinate, or
* longitude of the upper northeast corner.
*
* The fourth bbox
position is the Y coordinate, or
* latitude of the upper northeast corner.
*
* Specifies a geographical box surrounding a route. Used to zoom into a
* route when displaying it in a map. For example,
* [min x, min y, max x, max y]
.
*
* The first 2 bbox
parameters describe the lower southwest
* corner:
*
* The first bbox
position is the X coordinate or longitude of
* the lower southwest corner.
*
* The second bbox
position is the Y coordinate or latitude of
* the lower southwest corner.
*
* The next 2 bbox
parameters describe the upper northeast
* corner:
*
* The third bbox
position is the X coordinate, or longitude of
* the upper northeast corner.
*
* The fourth bbox
position is the Y coordinate, or latitude of
* the upper northeast corner.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param routeBBox
* Specifies a geographical box surrounding a route. Used to zoom
* into a route when displaying it in a map. For example,
* [min x, min y, max x, max y]
.
*
* The first 2 bbox
parameters describe the lower
* southwest corner:
*
* The first bbox
position is the X coordinate or
* longitude of the lower southwest corner.
*
* The second bbox
position is the Y coordinate or
* latitude of the lower southwest corner.
*
* The next 2 bbox
parameters describe the upper
* northeast corner:
*
* The third bbox
position is the X coordinate, or
* longitude of the upper northeast corner.
*
* The fourth bbox
position is the Y coordinate, or
* latitude of the upper northeast corner.
*