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, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
flatMapStream, getIdiomaticTraitName, getIdiomaticTraitName, isSynthetic, makeAbsoluteName, makeAbsoluteName
public static final ShapeId ID
public Selector getSelector()
public boolean failWhenMissing()
public java.util.Optional<java.lang.String> getErrorMessage()
public IdRefTrait.Builder toBuilder()
ToSmithyBuilder
toBuilder
in interface ToSmithyBuilder<IdRefTrait>
protected Node createNode()
AbstractTrait
createNode
in class AbstractTrait
public static IdRefTrait.Builder builder()