All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.location.model.CalculateRouteSummary Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Location module holds the client classes that are used for communicating with Amazon Location Service

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2019-2024 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;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* A summary of the calculated route. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CalculateRouteSummary implements Serializable, Cloneable, StructuredPojo { /** *

* 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. *

    *
  • *
*/ private java.util.List routeBBox; /** *

* 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. *

*
*/ private Double distance; /** *

* The total travel time for the route measured in seconds. The sum of the travel time between every stop on the * route. *

*/ private Double durationSeconds; /** *

* The unit of measurement for route distances. *

*/ private String distanceUnit; /** *

* 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. *

    *
  • *
* * @return 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. *

    *
  • */ public java.util.List getRouteBBox() { return 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. *

      *
    • *
    * * @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. *

      *
    • */ public void setRouteBBox(java.util.Collection routeBBox) { if (routeBBox == null) { this.routeBBox = null; return; } this.routeBBox = new java.util.ArrayList(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. *

        *
      • *
      *

      * NOTE: This method appends the values to the existing list (if any). Use * {@link #setRouteBBox(java.util.Collection)} or {@link #withRouteBBox(java.util.Collection)} if you want to * override the existing values. *

      * * @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. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. */ public CalculateRouteSummary withRouteBBox(Double... routeBBox) { if (this.routeBBox == null) { setRouteBBox(new java.util.ArrayList(routeBBox.length)); } for (Double ele : routeBBox) { this.routeBBox.add(ele); } 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. *

          *
        • *
        * * @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. *

          *
        • * @return Returns a reference to this object so that method calls can be chained together. */ public CalculateRouteSummary withRouteBBox(java.util.Collection routeBBox) { setRouteBBox(routeBBox); return this; } /** *

          * 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. *

          * * @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 this.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. * @return Returns a reference to this object so that method calls can be chained together. */ public CalculateRouteSummary withDataSource(String dataSource) { setDataSource(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. *

          *
          * * @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. *

          */ public void setDistance(Double distance) { this.distance = 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. *

          *
          * * @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. *

          */ public Double getDistance() { return this.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. *

          *
          * * @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. *

          * @return Returns a reference to this object so that method calls can be chained together. */ public CalculateRouteSummary withDistance(Double distance) { setDistance(distance); return this; } /** *

          * The total travel time for the route measured in seconds. The sum of the travel time between every stop on the * route. *

          * * @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. *

          * * @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 this.durationSeconds; } /** *

          * The total travel time for the route measured in seconds. The sum of the travel time between every stop on the * route. *

          * * @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 Returns a reference to this object so that method calls can be chained together. */ public CalculateRouteSummary withDurationSeconds(Double durationSeconds) { setDurationSeconds(durationSeconds); return this; } /** *

          * The unit of measurement for route distances. *

          * * @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. *

          * * @return The unit of measurement for route distances. * @see DistanceUnit */ public String getDistanceUnit() { return this.distanceUnit; } /** *

          * The unit of measurement for route distances. *

          * * @param distanceUnit * The unit of measurement for route distances. * @return Returns a reference to this object so that method calls can be chained together. * @see DistanceUnit */ public CalculateRouteSummary withDistanceUnit(String distanceUnit) { setDistanceUnit(distanceUnit); return this; } /** *

          * The unit of measurement for route distances. *

          * * @param distanceUnit * The unit of measurement for route distances. * @return Returns a reference to this object so that method calls can be chained together. * @see DistanceUnit */ public CalculateRouteSummary withDistanceUnit(DistanceUnit distanceUnit) { this.distanceUnit = distanceUnit.toString(); 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 (getRouteBBox() != null) sb.append("RouteBBox: ").append("***Sensitive Data Redacted***").append(","); if (getDataSource() != null) sb.append("DataSource: ").append(getDataSource()).append(","); if (getDistance() != null) sb.append("Distance: ").append(getDistance()).append(","); if (getDurationSeconds() != null) sb.append("DurationSeconds: ").append(getDurationSeconds()).append(","); if (getDistanceUnit() != null) sb.append("DistanceUnit: ").append(getDistanceUnit()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CalculateRouteSummary == false) return false; CalculateRouteSummary other = (CalculateRouteSummary) obj; if (other.getRouteBBox() == null ^ this.getRouteBBox() == null) return false; if (other.getRouteBBox() != null && other.getRouteBBox().equals(this.getRouteBBox()) == false) return false; if (other.getDataSource() == null ^ this.getDataSource() == null) return false; if (other.getDataSource() != null && other.getDataSource().equals(this.getDataSource()) == false) return false; if (other.getDistance() == null ^ this.getDistance() == null) return false; if (other.getDistance() != null && other.getDistance().equals(this.getDistance()) == false) return false; if (other.getDurationSeconds() == null ^ this.getDurationSeconds() == null) return false; if (other.getDurationSeconds() != null && other.getDurationSeconds().equals(this.getDurationSeconds()) == false) return false; if (other.getDistanceUnit() == null ^ this.getDistanceUnit() == null) return false; if (other.getDistanceUnit() != null && other.getDistanceUnit().equals(this.getDistanceUnit()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getRouteBBox() == null) ? 0 : getRouteBBox().hashCode()); hashCode = prime * hashCode + ((getDataSource() == null) ? 0 : getDataSource().hashCode()); hashCode = prime * hashCode + ((getDistance() == null) ? 0 : getDistance().hashCode()); hashCode = prime * hashCode + ((getDurationSeconds() == null) ? 0 : getDurationSeconds().hashCode()); hashCode = prime * hashCode + ((getDistanceUnit() == null) ? 0 : getDistanceUnit().hashCode()); return hashCode; } @Override public CalculateRouteSummary clone() { try { return (CalculateRouteSummary) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.location.model.transform.CalculateRouteSummaryMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy