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 class
TimestampFormatTrait.Format
The knowntimestampFormat
values.static class
TimestampFormatTrait.Provider
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DATE_TIME
static java.lang.String
EPOCH_SECONDS
static java.lang.String
HTTP_DATE
static ShapeId
ID
-
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.Format
getFormat()
Gets thetimestampFormat
value as aFormat
enum.-
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 thetimestampFormat
value as aFormat
enum.- Returns:
- Returns the
Format
enum.
-
-