/* * 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 matrix. *
*/ public class CalculateRouteMatrixSummary implements Serializable { /** ** The data provider of traffic and road network data used to calculate the * routes. 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 unit of measurement for route distances. *
*
* Constraints:
* Allowed Values: Kilometers, Miles
*/
private String distanceUnit;
/**
*
* The count of error results in the route matrix. If this number is 0, all * routes were calculated successfully. *
*
* Constraints:
* Range: 1 - 160000
*/
private Integer errorCount;
/**
*
* The count of cells in the route matrix. Equal to the number of
* DeparturePositions
multiplied by the number of
* DestinationPositions
.
*
* Constraints:
* Range: 1 - 160000
*/
private Integer routeCount;
/**
*
* The data provider of traffic and road network data used to calculate the * routes. 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 routes. 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 * routes. 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 routes. 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 * routes. 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 routes. 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 CalculateRouteMatrixSummary withDataSource(String dataSource) { this.dataSource = dataSource; return this; } /** ** 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 CalculateRouteMatrixSummary 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 CalculateRouteMatrixSummary withDistanceUnit(DistanceUnit distanceUnit) { this.distanceUnit = distanceUnit.toString(); return this; } /** ** The count of error results in the route matrix. If this number is 0, all * routes were calculated successfully. *
*
* Constraints:
* Range: 1 - 160000
*
* @return
* The count of error results in the route matrix. If this number is * 0, all routes were calculated successfully. *
*/ public Integer getErrorCount() { return errorCount; } /** ** The count of error results in the route matrix. If this number is 0, all * routes were calculated successfully. *
*
* Constraints:
* Range: 1 - 160000
*
* @param errorCount
* The count of error results in the route matrix. If this number * is 0, all routes were calculated successfully. *
*/ public void setErrorCount(Integer errorCount) { this.errorCount = errorCount; } /** ** The count of error results in the route matrix. If this number is 0, all * routes were calculated successfully. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Range: 1 - 160000
*
* @param errorCount
* The count of error results in the route matrix. If this number * is 0, all routes were calculated successfully. *
* @return A reference to this updated object so that method calls can be * chained together. */ public CalculateRouteMatrixSummary withErrorCount(Integer errorCount) { this.errorCount = errorCount; return this; } /** *
* The count of cells in the route matrix. Equal to the number of
* DeparturePositions
multiplied by the number of
* DestinationPositions
.
*
* Constraints:
* Range: 1 - 160000
*
* @return
* The count of cells in the route matrix. Equal to the number of
* DeparturePositions
multiplied by the number of
* DestinationPositions
.
*
* The count of cells in the route matrix. Equal to the number of
* DeparturePositions
multiplied by the number of
* DestinationPositions
.
*
* Constraints:
* Range: 1 - 160000
*
* @param routeCount
* The count of cells in the route matrix. Equal to the number of
* DeparturePositions
multiplied by the number of
* DestinationPositions
.
*
* The count of cells in the route matrix. Equal to the number of
* DeparturePositions
multiplied by the number of
* DestinationPositions
.
*
* Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Range: 1 - 160000
*
* @param routeCount
* The count of cells in the route matrix. Equal to the number of
* DeparturePositions
multiplied by the number of
* DestinationPositions
.
*