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

com.amazonaws.services.location.model.TruckDimensions 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;

/**
 * 

* Contains details about the truck dimensions in the unit of measurement that you specify. Used to filter out roads * that can't support or allow the specified dimensions for requests that specify TravelMode as * Truck. *

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

* The length of the truck. *

*
    *
  • *

    * For example, 15.5. *

    *
  • *
* *

* For routes calculated with a HERE resource, this value must be between 0 and 300 meters. *

*
*/ private Double length; /** *

* The height of the truck. *

*
    *
  • *

    * For example, 4.5. *

    *
  • *
* *

* For routes calculated with a HERE resource, this value must be between 0 and 50 meters. *

*
*/ private Double height; /** *

* The width of the truck. *

*
    *
  • *

    * For example, 4.5. *

    *
  • *
* *

* For routes calculated with a HERE resource, this value must be between 0 and 50 meters. *

*
*/ private Double width; /** *

* Specifies the unit of measurement for the truck dimensions. *

*

* Default Value: Meters *

*/ private String unit; /** *

* The length of the truck. *

*
    *
  • *

    * For example, 15.5. *

    *
  • *
* *

* For routes calculated with a HERE resource, this value must be between 0 and 300 meters. *

*
* * @param length * The length of the truck.

*
    *
  • *

    * For example, 15.5. *

    *
  • *
* *

* For routes calculated with a HERE resource, this value must be between 0 and 300 meters. *

*/ public void setLength(Double length) { this.length = length; } /** *

* The length of the truck. *

*
    *
  • *

    * For example, 15.5. *

    *
  • *
* *

* For routes calculated with a HERE resource, this value must be between 0 and 300 meters. *

*
* * @return The length of the truck.

*
    *
  • *

    * For example, 15.5. *

    *
  • *
* *

* For routes calculated with a HERE resource, this value must be between 0 and 300 meters. *

*/ public Double getLength() { return this.length; } /** *

* The length of the truck. *

*
    *
  • *

    * For example, 15.5. *

    *
  • *
* *

* For routes calculated with a HERE resource, this value must be between 0 and 300 meters. *

*
* * @param length * The length of the truck.

*
    *
  • *

    * For example, 15.5. *

    *
  • *
* *

* For routes calculated with a HERE resource, this value must be between 0 and 300 meters. *

* @return Returns a reference to this object so that method calls can be chained together. */ public TruckDimensions withLength(Double length) { setLength(length); return this; } /** *

* The height of the truck. *

*
    *
  • *

    * For example, 4.5. *

    *
  • *
* *

* For routes calculated with a HERE resource, this value must be between 0 and 50 meters. *

*
* * @param height * The height of the truck.

*
    *
  • *

    * For example, 4.5. *

    *
  • *
* *

* For routes calculated with a HERE resource, this value must be between 0 and 50 meters. *

*/ public void setHeight(Double height) { this.height = height; } /** *

* The height of the truck. *

*
    *
  • *

    * For example, 4.5. *

    *
  • *
* *

* For routes calculated with a HERE resource, this value must be between 0 and 50 meters. *

*
* * @return The height of the truck.

*
    *
  • *

    * For example, 4.5. *

    *
  • *
* *

* For routes calculated with a HERE resource, this value must be between 0 and 50 meters. *

*/ public Double getHeight() { return this.height; } /** *

* The height of the truck. *

*
    *
  • *

    * For example, 4.5. *

    *
  • *
* *

* For routes calculated with a HERE resource, this value must be between 0 and 50 meters. *

*
* * @param height * The height of the truck.

*
    *
  • *

    * For example, 4.5. *

    *
  • *
* *

* For routes calculated with a HERE resource, this value must be between 0 and 50 meters. *

* @return Returns a reference to this object so that method calls can be chained together. */ public TruckDimensions withHeight(Double height) { setHeight(height); return this; } /** *

* The width of the truck. *

*
    *
  • *

    * For example, 4.5. *

    *
  • *
* *

* For routes calculated with a HERE resource, this value must be between 0 and 50 meters. *

*
* * @param width * The width of the truck.

*
    *
  • *

    * For example, 4.5. *

    *
  • *
* *

* For routes calculated with a HERE resource, this value must be between 0 and 50 meters. *

*/ public void setWidth(Double width) { this.width = width; } /** *

* The width of the truck. *

*
    *
  • *

    * For example, 4.5. *

    *
  • *
* *

* For routes calculated with a HERE resource, this value must be between 0 and 50 meters. *

*
* * @return The width of the truck.

*
    *
  • *

    * For example, 4.5. *

    *
  • *
* *

* For routes calculated with a HERE resource, this value must be between 0 and 50 meters. *

*/ public Double getWidth() { return this.width; } /** *

* The width of the truck. *

*
    *
  • *

    * For example, 4.5. *

    *
  • *
* *

* For routes calculated with a HERE resource, this value must be between 0 and 50 meters. *

*
* * @param width * The width of the truck.

*
    *
  • *

    * For example, 4.5. *

    *
  • *
* *

* For routes calculated with a HERE resource, this value must be between 0 and 50 meters. *

* @return Returns a reference to this object so that method calls can be chained together. */ public TruckDimensions withWidth(Double width) { setWidth(width); return this; } /** *

* Specifies the unit of measurement for the truck dimensions. *

*

* Default Value: Meters *

* * @param unit * Specifies the unit of measurement for the truck dimensions.

*

* Default Value: Meters * @see DimensionUnit */ public void setUnit(String unit) { this.unit = unit; } /** *

* Specifies the unit of measurement for the truck dimensions. *

*

* Default Value: Meters *

* * @return Specifies the unit of measurement for the truck dimensions.

*

* Default Value: Meters * @see DimensionUnit */ public String getUnit() { return this.unit; } /** *

* Specifies the unit of measurement for the truck dimensions. *

*

* Default Value: Meters *

* * @param unit * Specifies the unit of measurement for the truck dimensions.

*

* Default Value: Meters * @return Returns a reference to this object so that method calls can be chained together. * @see DimensionUnit */ public TruckDimensions withUnit(String unit) { setUnit(unit); return this; } /** *

* Specifies the unit of measurement for the truck dimensions. *

*

* Default Value: Meters *

* * @param unit * Specifies the unit of measurement for the truck dimensions.

*

* Default Value: Meters * @return Returns a reference to this object so that method calls can be chained together. * @see DimensionUnit */ public TruckDimensions withUnit(DimensionUnit unit) { this.unit = unit.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 (getLength() != null) sb.append("Length: ").append(getLength()).append(","); if (getHeight() != null) sb.append("Height: ").append(getHeight()).append(","); if (getWidth() != null) sb.append("Width: ").append(getWidth()).append(","); if (getUnit() != null) sb.append("Unit: ").append(getUnit()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof TruckDimensions == false) return false; TruckDimensions other = (TruckDimensions) obj; if (other.getLength() == null ^ this.getLength() == null) return false; if (other.getLength() != null && other.getLength().equals(this.getLength()) == false) return false; if (other.getHeight() == null ^ this.getHeight() == null) return false; if (other.getHeight() != null && other.getHeight().equals(this.getHeight()) == false) return false; if (other.getWidth() == null ^ this.getWidth() == null) return false; if (other.getWidth() != null && other.getWidth().equals(this.getWidth()) == false) return false; if (other.getUnit() == null ^ this.getUnit() == null) return false; if (other.getUnit() != null && other.getUnit().equals(this.getUnit()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getLength() == null) ? 0 : getLength().hashCode()); hashCode = prime * hashCode + ((getHeight() == null) ? 0 : getHeight().hashCode()); hashCode = prime * hashCode + ((getWidth() == null) ? 0 : getWidth().hashCode()); hashCode = prime * hashCode + ((getUnit() == null) ? 0 : getUnit().hashCode()); return hashCode; } @Override public TruckDimensions clone() { try { return (TruckDimensions) 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.TruckDimensionsMarshaller.getInstance().marshall(this, protocolMarshaller); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy