Class EmitEachSelectorValidator.Config
- java.lang.Object
-
- software.amazon.smithy.model.validation.linters.EmitEachSelectorValidator.Config
-
- Enclosing class:
- EmitEachSelectorValidator
public static final class EmitEachSelectorValidator.Config extends java.lang.ObjectEmitEachSelector configuration settings.
-
-
Constructor Summary
Constructors Constructor Description Config()
-
Method Summary
Modifier and Type Method Description ShapeIdgetBindToTrait()Gets the optional trait that each emitted event is bound to.java.lang.StringgetMessageTemplate()Gets the optional message template that can reference selector variables.SelectorgetSelector()Gets the required selector that matches shapes.voidsetBindToTrait(ShapeId bindToTrait)voidsetMessageTemplate(java.lang.String messageTemplate)Sets the optional message template for each emitted event.voidsetSelector(Selector selector)
-
-
-
Method Detail
-
getSelector
public Selector getSelector()
Gets the required selector that matches shapes.Each shape that matches the given selector will emit a validation event.
- Returns:
- Selector to match on.
-
setSelector
public void setSelector(Selector selector)
-
getBindToTrait
public ShapeId getBindToTrait()
Gets the optional trait that each emitted event is bound to.An event is only emitted for shapes that have this trait.
- Returns:
- Returns the trait to bind each event to.
-
setBindToTrait
public void setBindToTrait(ShapeId bindToTrait)
-
getMessageTemplate
public java.lang.String getMessageTemplate()
Gets the optional message template that can reference selector variables.- Returns:
- Returns the message template.
-
setMessageTemplate
public void setMessageTemplate(java.lang.String messageTemplate)
Sets the optional message template for each emitted event.- Parameters:
messageTemplate- Message template to set.- Throws:
ModelSyntaxException- if the message template is invalid.
-
-