@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.DurationUnit
public String getUnit()
A unit of time.
DurationUnit
public Duration withUnit(String unit)
A unit of time.
unit
- A unit of time.DurationUnit
public Duration withUnit(DurationUnit unit)
A unit of time.
unit
- A unit of time.DurationUnit
public 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 Object
Object.toString()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.