Class TimestampFormatTrait
- java.lang.Object
-
- software.amazon.smithy.model.traits.AbstractTrait
-
- software.amazon.smithy.model.traits.StringTrait
-
- software.amazon.smithy.model.traits.TimestampFormatTrait
-
- All Implemented Interfaces:
FromSourceLocation,ToNode,ToShapeId,Trait
public final class TimestampFormatTrait extends StringTrait
Defines a custom serialization format for a timestamp.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTimestampFormatTrait.FormatThe knowntimestampFormatvalues.static classTimestampFormatTrait.Provider
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDATE_TIMEstatic java.lang.StringEPOCH_SECONDSstatic java.lang.StringHTTP_DATEstatic ShapeIdID
-
Constructor Summary
Constructors Constructor Description TimestampFormatTrait(java.lang.String value)TimestampFormatTrait(java.lang.String value, SourceLocation sourceLocation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TimestampFormatTrait.FormatgetFormat()Gets thetimestampFormatvalue as aFormatenum.-
Methods inherited from class software.amazon.smithy.model.traits.StringTrait
createNode, getValue
-
Methods inherited from class software.amazon.smithy.model.traits.AbstractTrait
equals, getSourceLocation, hashCode, setNodeCache, toNode, toShapeId, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.smithy.model.traits.Trait
isSynthetic
-
-
-
-
Field Detail
-
EPOCH_SECONDS
public static final java.lang.String EPOCH_SECONDS
- See Also:
- Constant Field Values
-
DATE_TIME
public static final java.lang.String DATE_TIME
- See Also:
- Constant Field Values
-
HTTP_DATE
public static final java.lang.String HTTP_DATE
- See Also:
- Constant Field Values
-
ID
public static final ShapeId ID
-
-
Constructor Detail
-
TimestampFormatTrait
public TimestampFormatTrait(java.lang.String value, SourceLocation sourceLocation)
-
TimestampFormatTrait
public TimestampFormatTrait(java.lang.String value)
-
-
Method Detail
-
getFormat
public TimestampFormatTrait.Format getFormat()
Gets thetimestampFormatvalue as aFormatenum.- Returns:
- Returns the
Formatenum.
-
-