public final class EnumValueTrait extends AbstractTrait implements software.amazon.smithy.utils.ToSmithyBuilder<EnumValueTrait>
| Modifier and Type | Class and Description |
|---|---|
static class |
EnumValueTrait.Builder |
static class |
EnumValueTrait.Provider |
| Modifier and Type | Method and Description |
|---|---|
static EnumValueTrait.Builder |
builder() |
protected Node |
createNode()
The result of toNode is used for hashCodes and equality.
|
int |
expectIntValue()
Gets the int value.
|
java.lang.String |
expectStringValue()
Gets the string value.
|
java.util.Optional<java.lang.Integer> |
getIntValue()
Gets the int value if an int value was set.
|
java.util.Optional<java.lang.String> |
getStringValue()
Gets the string value if a string value was set.
|
software.amazon.smithy.utils.SmithyBuilder<EnumValueTrait> |
toBuilder() |
equals, getSourceLocation, hashCode, setNodeCache, toNode, toShapeId, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitflatMapStream, getIdiomaticTraitName, getIdiomaticTraitName, isSynthetic, makeAbsoluteName, makeAbsoluteNamecomparepublic static final ShapeId ID
public java.util.Optional<java.lang.String> getStringValue()
public java.lang.String expectStringValue()
ExpectationNotMetException - if the string value was not set.public java.util.Optional<java.lang.Integer> getIntValue()
public int expectIntValue()
ExpectationNotMetException - if the int value was not set.protected Node createNode()
AbstractTraitcreateNode in class AbstractTraitpublic software.amazon.smithy.utils.SmithyBuilder<EnumValueTrait> toBuilder()
toBuilder in interface software.amazon.smithy.utils.ToSmithyBuilder<EnumValueTrait>public static EnumValueTrait.Builder builder()