@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Duration extends Object implements Serializable, Cloneable, StructuredPojo
An object that represents a duration of time.
| Constructor and Description |
|---|
Duration() |
| Modifier and Type | Method and Description |
|---|---|
Duration |
clone() |
boolean |
equals(Object obj) |
String |
getUnit()
A unit of time.
|
Long |
getValue()
A number of time units.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller. |
void |
setUnit(String unit)
A unit of time.
|
void |
setValue(Long value)
A number of time units.
|
String |
toString()
Returns a string representation of this object.
|
Duration |
withUnit(DurationUnit unit)
A unit of time.
|
Duration |
withUnit(String unit)
A unit of time.
|
Duration |
withValue(Long value)
A number of time units.
|
public void setUnit(String unit)
A unit of time.
unit - A unit of time.DurationUnitpublic String getUnit()
A unit of time.
DurationUnitpublic Duration withUnit(String unit)
A unit of time.
unit - A unit of time.DurationUnitpublic Duration withUnit(DurationUnit unit)
A unit of time.
unit - A unit of time.DurationUnitpublic void setValue(Long value)
A number of time units.
value - A number of time units.public Long getValue()
A number of time units.
public Duration withValue(Long value)
A number of time units.
value - A number of time units.public String toString()
toString in class ObjectObject.toString()public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojoProtocolMarshaller.marshall in interface StructuredPojoprotocolMarshaller - Implementation of ProtocolMarshaller used to marshall this object's data.