/* * Copyright 2018-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.location.model; import java.io.Serializable; import javax.annotation.Generated; /** *
* Returns the result of the route matrix calculation. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CalculateRouteMatrixResult extends com.amazonaws.AmazonWebServiceResult
* The calculated route matrix containing the results for all pairs of DeparturePositions
to
* DestinationPositions
. Each row corresponds to one entry in DeparturePositions
. Each
* entry in the row corresponds to the route from that entry in DeparturePositions
to an entry in
* DestinationPositions
.
*
* For routes calculated using an Esri route calculator resource, departure positions are snapped to the closest
* road. For Esri route calculator resources, this returns the list of departure/origin positions used for
* calculation of the RouteMatrix
.
*
* The list of destination positions for the route matrix used for calculation of the RouteMatrix
.
*
* Contains information about the route matrix, DataSource
, DistanceUnit
,
* RouteCount
and ErrorCount
.
*
* The calculated route matrix containing the results for all pairs of DeparturePositions
to
* DestinationPositions
. Each row corresponds to one entry in DeparturePositions
. Each
* entry in the row corresponds to the route from that entry in DeparturePositions
to an entry in
* DestinationPositions
.
*
DeparturePositions
to
* DestinationPositions
. Each row corresponds to one entry in DeparturePositions
.
* Each entry in the row corresponds to the route from that entry in DeparturePositions
to an
* entry in DestinationPositions
.
*/
public java.util.List
* The calculated route matrix containing the results for all pairs of DeparturePositions
to
* DestinationPositions
. Each row corresponds to one entry in DeparturePositions
. Each
* entry in the row corresponds to the route from that entry in DeparturePositions
to an entry in
* DestinationPositions
.
*
DeparturePositions
to
* DestinationPositions
. Each row corresponds to one entry in DeparturePositions
.
* Each entry in the row corresponds to the route from that entry in DeparturePositions
to an
* entry in DestinationPositions
.
*/
public void setRouteMatrix(java.util.Collection
* The calculated route matrix containing the results for all pairs of DeparturePositions
to
* DestinationPositions
. Each row corresponds to one entry in DeparturePositions
. Each
* entry in the row corresponds to the route from that entry in DeparturePositions
to an entry in
* DestinationPositions
.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setRouteMatrix(java.util.Collection)} or {@link #withRouteMatrix(java.util.Collection)} if you want to * override the existing values. *
* * @param routeMatrix * The calculated route matrix containing the results for all pairs ofDeparturePositions
to
* DestinationPositions
. Each row corresponds to one entry in DeparturePositions
.
* Each entry in the row corresponds to the route from that entry in DeparturePositions
to an
* entry in DestinationPositions
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CalculateRouteMatrixResult withRouteMatrix(java.util.List
* The calculated route matrix containing the results for all pairs of DeparturePositions
to
* DestinationPositions
. Each row corresponds to one entry in DeparturePositions
. Each
* entry in the row corresponds to the route from that entry in DeparturePositions
to an entry in
* DestinationPositions
.
*
DeparturePositions
to
* DestinationPositions
. Each row corresponds to one entry in DeparturePositions
.
* Each entry in the row corresponds to the route from that entry in DeparturePositions
to an
* entry in DestinationPositions
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CalculateRouteMatrixResult withRouteMatrix(java.util.Collection
* For routes calculated using an Esri route calculator resource, departure positions are snapped to the closest
* road. For Esri route calculator resources, this returns the list of departure/origin positions used for
* calculation of the RouteMatrix
.
*
RouteMatrix
.
*/
public java.util.List
* For routes calculated using an Esri route calculator resource, departure positions are snapped to the closest
* road. For Esri route calculator resources, this returns the list of departure/origin positions used for
* calculation of the RouteMatrix
.
*
RouteMatrix
.
*/
public void setSnappedDeparturePositions(java.util.Collection
* For routes calculated using an Esri route calculator resource, departure positions are snapped to the closest
* road. For Esri route calculator resources, this returns the list of departure/origin positions used for
* calculation of the RouteMatrix
.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setSnappedDeparturePositions(java.util.Collection)} or * {@link #withSnappedDeparturePositions(java.util.Collection)} if you want to override the existing values. *
* * @param snappedDeparturePositions * For routes calculated using an Esri route calculator resource, departure positions are snapped to the * closest road. For Esri route calculator resources, this returns the list of departure/origin positions * used for calculation of theRouteMatrix
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CalculateRouteMatrixResult withSnappedDeparturePositions(java.util.List
* For routes calculated using an Esri route calculator resource, departure positions are snapped to the closest
* road. For Esri route calculator resources, this returns the list of departure/origin positions used for
* calculation of the RouteMatrix
.
*
RouteMatrix
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CalculateRouteMatrixResult withSnappedDeparturePositions(java.util.Collection
* The list of destination positions for the route matrix used for calculation of the RouteMatrix
.
*
RouteMatrix
.
*/
public java.util.List
* The list of destination positions for the route matrix used for calculation of the RouteMatrix
.
*
RouteMatrix
.
*/
public void setSnappedDestinationPositions(java.util.Collection
* The list of destination positions for the route matrix used for calculation of the RouteMatrix
.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setSnappedDestinationPositions(java.util.Collection)} or * {@link #withSnappedDestinationPositions(java.util.Collection)} if you want to override the existing values. *
* * @param snappedDestinationPositions * The list of destination positions for the route matrix used for calculation of the *RouteMatrix
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CalculateRouteMatrixResult withSnappedDestinationPositions(java.util.List
* The list of destination positions for the route matrix used for calculation of the RouteMatrix
.
*
RouteMatrix
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CalculateRouteMatrixResult withSnappedDestinationPositions(java.util.Collection
* Contains information about the route matrix, DataSource
, DistanceUnit
,
* RouteCount
and ErrorCount
.
*
DataSource
, DistanceUnit
,
* RouteCount
and ErrorCount
.
*/
public void setSummary(CalculateRouteMatrixSummary summary) {
this.summary = summary;
}
/**
*
* Contains information about the route matrix, DataSource
, DistanceUnit
,
* RouteCount
and ErrorCount
.
*
DataSource
, DistanceUnit
,
* RouteCount
and ErrorCount
.
*/
public CalculateRouteMatrixSummary getSummary() {
return this.summary;
}
/**
*
* Contains information about the route matrix, DataSource
, DistanceUnit
,
* RouteCount
and ErrorCount
.
*
DataSource
, DistanceUnit
,
* RouteCount
and ErrorCount
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CalculateRouteMatrixResult withSummary(CalculateRouteMatrixSummary summary) {
setSummary(summary);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getRouteMatrix() != null)
sb.append("RouteMatrix: ").append(getRouteMatrix()).append(",");
if (getSnappedDeparturePositions() != null)
sb.append("SnappedDeparturePositions: ").append("***Sensitive Data Redacted***").append(",");
if (getSnappedDestinationPositions() != null)
sb.append("SnappedDestinationPositions: ").append("***Sensitive Data Redacted***").append(",");
if (getSummary() != null)
sb.append("Summary: ").append(getSummary());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CalculateRouteMatrixResult == false)
return false;
CalculateRouteMatrixResult other = (CalculateRouteMatrixResult) obj;
if (other.getRouteMatrix() == null ^ this.getRouteMatrix() == null)
return false;
if (other.getRouteMatrix() != null && other.getRouteMatrix().equals(this.getRouteMatrix()) == false)
return false;
if (other.getSnappedDeparturePositions() == null ^ this.getSnappedDeparturePositions() == null)
return false;
if (other.getSnappedDeparturePositions() != null && other.getSnappedDeparturePositions().equals(this.getSnappedDeparturePositions()) == false)
return false;
if (other.getSnappedDestinationPositions() == null ^ this.getSnappedDestinationPositions() == null)
return false;
if (other.getSnappedDestinationPositions() != null && other.getSnappedDestinationPositions().equals(this.getSnappedDestinationPositions()) == false)
return false;
if (other.getSummary() == null ^ this.getSummary() == null)
return false;
if (other.getSummary() != null && other.getSummary().equals(this.getSummary()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getRouteMatrix() == null) ? 0 : getRouteMatrix().hashCode());
hashCode = prime * hashCode + ((getSnappedDeparturePositions() == null) ? 0 : getSnappedDeparturePositions().hashCode());
hashCode = prime * hashCode + ((getSnappedDestinationPositions() == null) ? 0 : getSnappedDestinationPositions().hashCode());
hashCode = prime * hashCode + ((getSummary() == null) ? 0 : getSummary().hashCode());
return hashCode;
}
@Override
public CalculateRouteMatrixResult clone() {
try {
return (CalculateRouteMatrixResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}