Class ValidationEvent.Builder
java.lang.Object
software.amazon.smithy.model.validation.ValidationEvent.Builder
- All Implemented Interfaces:
software.amazon.smithy.utils.SmithyBuilder<ValidationEvent>
- Enclosing class:
- ValidationEvent
public static final class ValidationEvent.Builder
extends Object
implements software.amazon.smithy.utils.SmithyBuilder<ValidationEvent>
Builds ValidationEvent values.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Deprecated.Sets an optional hint adding more detail about how to fix a specific issue.Sets the required event ID of the event.Sets the required message of the event.Sets the required severity of the event.Sets the shape ID and source location based on a shape.<T extends ToShapeId>
ValidationEvent.BuildershapeId
(T toShapeId) Sets the shape ID related to the event.sourceLocation
(FromSourceLocation sourceLocation) Sets the source location of where the event occurred.suppressionReason
(String eventSuppressionReason) Sets a reason for suppressing the event.
-
Method Details
-
message
Sets the required message of the event.- Parameters:
eventMessage
- Message to set.- Returns:
- Returns the builder.
-
message
-
severity
Sets the required severity of the event.- Parameters:
severity
- Event severity.- Returns:
- Returns the builder.
-
eventId
Deprecated.Use theid(String eventId)
setter to match the node format.Sets the required event ID of the event.- Parameters:
eventId
- Event ID.- Returns:
- Returns the builder.
-
id
Sets the required event ID of the event.- Parameters:
eventId
- Event ID.- Returns:
- Returns the builder.
-
sourceLocation
Sets the source location of where the event occurred.- Parameters:
sourceLocation
- Event source location.- Returns:
- Returns the builder.
-
shapeId
Sets the shape ID related to the event.- Type Parameters:
T
- Value to convert to a shape ID.- Parameters:
toShapeId
- Shape ID.- Returns:
- Returns the builder.
-
shape
Sets the shape ID and source location based on a shape.- Parameters:
encounteredShape
- Shape.- Returns:
- Returns the builder.
-
suppressionReason
Sets a reason for suppressing the event.This is only relevant if the severity is SUPPRESSED.
- Parameters:
eventSuppressionReason
- Event suppression reason.- Returns:
- Returns the builder.
-
hint
Sets an optional hint adding more detail about how to fix a specific issue.- Parameters:
hint
- Hint to set- Returns:
- Returns the builder.
-
build
- Specified by:
build
in interfacesoftware.amazon.smithy.utils.SmithyBuilder<ValidationEvent>
-
id(String eventId)
setter to match the node format.