public final class SyntheticEnumTrait extends EnumTrait
EnumTrait for use in the EnumShape.
This exists only to bridge compatibility between IDL 1.0 and 2.0. This
synthetic trait will be applied to enum shapes so that code generators
can treat enum shapes as string shapes with the enum trait. We set synthetic
to true so that it won't get serialized. We change the shape id so that
it doesn't trip up selector validation for the enum trait, which does
not allow targeting enum shapes.| Modifier and Type | Class and Description |
|---|---|
static class |
SyntheticEnumTrait.Builder |
EnumTrait.Provider| Modifier and Type | Method and Description |
|---|---|
static SyntheticEnumTrait.Builder |
builder() |
boolean |
isSynthetic()
Checks if this trait is persisted with the shape, or if it is a
synthetic, or transient trait, only meant to temporarily aid in
some kind of in-memory model transformation.
|
SyntheticEnumTrait.Builder |
toBuilder() |
createNode, getEnumDefinitionValues, getValues, hasNamesequals, getSourceLocation, hashCode, setNodeCache, toNode, toShapeId, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitflatMapStream, getIdiomaticTraitName, getIdiomaticTraitName, makeAbsoluteName, makeAbsoluteNamecomparepublic static final ShapeId ID
public boolean isSynthetic()
TraitBecause synthetic traits are not persisted with shapes, they also do not need to be defined in Smithy's semantic model before they can be used in the model.
public SyntheticEnumTrait.Builder toBuilder()
public static SyntheticEnumTrait.Builder builder()