public final class IdRefTrait extends AbstractTrait implements ToSmithyBuilder<IdRefTrait>
failWhenMissing can be set to true to fail when the
shape ID contained in a string shape cannot be found in the result
set of the selector property. failWhenMissing defaults to
false when not set.
The selector property is used to query the model for all shapes
that match a shape selector. The value contained within the string shape
targeted by this trait MUST match one of the shapes returns by the shape
selector if failWhenMissing is set to true. selector
defaults to "*" when not set.
| Modifier and Type | Class and Description |
|---|---|
static class |
IdRefTrait.Builder |
static class |
IdRefTrait.Provider |
| Modifier and Type | Method and Description |
|---|---|
static IdRefTrait.Builder |
builder() |
protected Node |
createNode()
The result of toNode is used for hashCodes and equality.
|
boolean |
failWhenMissing() |
java.util.Optional<java.lang.String> |
getErrorMessage() |
Selector |
getSelector() |
IdRefTrait.Builder |
toBuilder()
Take this object and create a builder that contains all of the
current property values of this object.
|
equals, getSourceLocation, hashCode, setNodeCache, toNode, toShapeId, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitflatMapStream, getIdiomaticTraitName, getIdiomaticTraitName, isSynthetic, makeAbsoluteName, makeAbsoluteNamepublic static final ShapeId ID
public Selector getSelector()
public boolean failWhenMissing()
public java.util.Optional<java.lang.String> getErrorMessage()
public IdRefTrait.Builder toBuilder()
ToSmithyBuildertoBuilder in interface ToSmithyBuilder<IdRefTrait>protected Node createNode()
AbstractTraitcreateNode in class AbstractTraitpublic static IdRefTrait.Builder builder()