public Duration withUnit(String unit) {
        setUnit(unit);
        return this;
    }
<p>
A unit of time.
</p>

@param unit
       A unit of time.
@return Returns a reference to this object so that method calls can be chained together.
@see DurationUnit
aws-java-sdk-appmesh/src/main/java/com/amazonaws/services/appmesh/model/Duration.java