public static final class ValidationEvent.Builder extends java.lang.Object implements SmithyBuilder<ValidationEvent>
Modifier and Type | Method and Description |
---|---|
ValidationEvent |
build()
Creates an immutable object that is created from the properties
that have been set on the builder.
|
ValidationEvent.Builder |
eventId(java.lang.String eventId)
Deprecated.
Use the
id(String eventId) setter to match the node format. |
ValidationEvent.Builder |
id(java.lang.String eventId)
Sets the required event ID of the event.
|
ValidationEvent.Builder |
message(java.lang.String eventMessage)
Sets the required message of the event.
|
ValidationEvent.Builder |
message(java.lang.String eventMessage,
java.lang.Object... placeholders) |
ValidationEvent.Builder |
severity(Severity severity)
Sets the required severity of the event.
|
ValidationEvent.Builder |
shape(Shape encounteredShape)
Sets the shape ID and source location based on a shape.
|
<T extends ToShapeId> |
shapeId(T toShapeId)
Sets the shape ID related to the event.
|
ValidationEvent.Builder |
sourceLocation(FromSourceLocation sourceLocation)
Sets the source location of where the event occurred.
|
ValidationEvent.Builder |
suppressionReason(java.lang.String eventSuppressionReason)
Sets a reason for suppressing the event.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
requiredState
public ValidationEvent.Builder message(java.lang.String eventMessage)
eventMessage
- Message to set.public ValidationEvent.Builder message(java.lang.String eventMessage, java.lang.Object... placeholders)
public ValidationEvent.Builder severity(Severity severity)
severity
- Event severity.public ValidationEvent.Builder eventId(java.lang.String eventId)
id(String eventId)
setter to match the node format.eventId
- Event ID.public ValidationEvent.Builder id(java.lang.String eventId)
eventId
- Event ID.public ValidationEvent.Builder sourceLocation(FromSourceLocation sourceLocation)
sourceLocation
- Event source location.public <T extends ToShapeId> ValidationEvent.Builder shapeId(T toShapeId)
T
- Value to convert to a shape ID.toShapeId
- Shape ID.public ValidationEvent.Builder shape(Shape encounteredShape)
encounteredShape
- Shape.public ValidationEvent.Builder suppressionReason(java.lang.String eventSuppressionReason)
This is only relevant if the severity is SUPPRESSED.
eventSuppressionReason
- Event suppression reason.public ValidationEvent build()
SmithyBuilder
build
in interface SmithyBuilder<ValidationEvent>