public RouteMatrixEntry withError(RouteMatrixEntryError error) {
        setError(error);
        return this;
    }
<p>
An error corresponding to the calculation of a route between the <code>DeparturePosition</code> and
<code>DestinationPosition</code>.
</p>

@param error
       An error corresponding to the calculation of a route between the <code>DeparturePosition</code> and
       <code>DestinationPosition</code>.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-location/src/main/java/com/amazonaws/services/location/model/RouteMatrixEntry.java