@Deprecated public class EnumTrait extends AbstractTrait implements software.amazon.smithy.utils.ToSmithyBuilder<EnumTrait>
This trait is deprecated, use an EnumShape instead.
There is also the SyntheticEnumTrait, which is a synthetic variant of this
trait used exclusively to assist in making EnumShape as backwards compatible
as possible.
| Modifier and Type | Class and Description |
|---|---|
static class |
EnumTrait.Builder
Deprecated.
Builder used to create the enum trait.
|
static class |
EnumTrait.Provider
Deprecated.
|
| Modifier | Constructor and Description |
|---|---|
protected |
EnumTrait(ShapeId id,
EnumTrait.Builder builder)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
static EnumTrait.Builder |
builder()
Deprecated.
|
protected Node |
createNode()
Deprecated.
The result of toNode is used for hashCodes and equality.
|
java.util.List<java.lang.String> |
getEnumDefinitionValues()
Deprecated.
Gets the acceptable enum literal values.
|
java.util.List<EnumDefinition> |
getValues()
Deprecated.
Gets the enum value to body.
|
boolean |
hasNames()
Deprecated.
Checks if all of the constants of an enum define a name.
|
EnumTrait.Builder |
toBuilder()
Deprecated.
|
equals, getSourceLocation, hashCode, setNodeCache, toNode, toShapeId, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitflatMapStream, getIdiomaticTraitName, getIdiomaticTraitName, isSynthetic, makeAbsoluteName, makeAbsoluteNamecomparepublic static final ShapeId ID
protected EnumTrait(ShapeId id, EnumTrait.Builder builder)
public java.util.List<EnumDefinition> getValues()
public java.util.List<java.lang.String> getEnumDefinitionValues()
public boolean hasNames()
Note that either all constants must have a name or no constants can have a name.
protected Node createNode()
AbstractTraitcreateNode in class AbstractTraitpublic EnumTrait.Builder toBuilder()
toBuilder in interface software.amazon.smithy.utils.ToSmithyBuilder<EnumTrait>public static EnumTrait.Builder builder()