Class NodeValidationVisitor.Builder
- java.lang.Object
-
- software.amazon.smithy.model.validation.NodeValidationVisitor.Builder
-
- All Implemented Interfaces:
SmithyBuilder<NodeValidationVisitor>
- Enclosing class:
- NodeValidationVisitor
public static final class NodeValidationVisitor.Builder extends java.lang.Object implements SmithyBuilder<NodeValidationVisitor>
Builds aNodeValidationVisitor
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description NodeValidationVisitor.Builder
addFeature(NodeValidationVisitor.Feature feature)
Adds a feature flag to the validator.NodeValidationVisitor.Builder
allowBoxedNull(boolean allowBoxedNull)
Deprecated.NodeValidationVisitor.Builder
allowOptionalNull(boolean allowOptionalNull)
Deprecated.NodeValidationVisitor
build()
Creates an immutable object that is created from the properties that have been set on the builder.NodeValidationVisitor.Builder
eventId(java.lang.String id)
Sets an optional custom event ID to use for created validation events.NodeValidationVisitor.Builder
eventShapeId(ShapeId eventShapeId)
Sets an optional shape ID that is used as the shape ID in each validation event emitted by the validator.NodeValidationVisitor.Builder
model(Model model)
Sets the required model to use when traversing walking shapes during validation.NodeValidationVisitor.Builder
startingContext(java.lang.String contextText)
Sets an optional starting context of the validator that is prepended to each emitted validation event message.NodeValidationVisitor.Builder
timestampValidationStrategy(TimestampValidationStrategy timestampValidationStrategy)
Sets the strategy used to validate timestamps.NodeValidationVisitor.Builder
value(Node value)
Sets the required node value to validate.
-
-
-
Method Detail
-
model
public NodeValidationVisitor.Builder model(Model model)
Sets the required model to use when traversing walking shapes during validation.- Parameters:
model
- Model that contains shapes to validate.- Returns:
- Returns the builder.
-
value
public NodeValidationVisitor.Builder value(Node value)
Sets the required node value to validate.- Parameters:
value
- Value to validate.- Returns:
- Returns the builder.
-
eventId
public NodeValidationVisitor.Builder eventId(java.lang.String id)
Sets an optional custom event ID to use for created validation events.- Parameters:
id
- Custom event ID.- Returns:
- Returns the builder.
-
startingContext
public NodeValidationVisitor.Builder startingContext(java.lang.String contextText)
Sets an optional starting context of the validator that is prepended to each emitted validation event message.- Parameters:
contextText
- Starting event message content.- Returns:
- Returns the builder.
-
eventShapeId
public NodeValidationVisitor.Builder eventShapeId(ShapeId eventShapeId)
Sets an optional shape ID that is used as the shape ID in each validation event emitted by the validator.- Parameters:
eventShapeId
- Shape ID to set on every validation event.- Returns:
- Returns the builder.
-
timestampValidationStrategy
public NodeValidationVisitor.Builder timestampValidationStrategy(TimestampValidationStrategy timestampValidationStrategy)
Sets the strategy used to validate timestamps.By default, timestamps are validated using
TimestampValidationStrategy.FORMAT
.- Parameters:
timestampValidationStrategy
- Timestamp validation strategy.- Returns:
- Returns the builder.
-
allowBoxedNull
@Deprecated public NodeValidationVisitor.Builder allowBoxedNull(boolean allowBoxedNull)
Deprecated.
-
allowOptionalNull
@Deprecated public NodeValidationVisitor.Builder allowOptionalNull(boolean allowOptionalNull)
Deprecated.
-
addFeature
public NodeValidationVisitor.Builder addFeature(NodeValidationVisitor.Feature feature)
Adds a feature flag to the validator.- Parameters:
feature
- Feature to set.- Returns:
- Returns the builder.
-
build
public NodeValidationVisitor build()
Description copied from interface:SmithyBuilder
Creates an immutable object that is created from the properties that have been set on the builder.- Specified by:
build
in interfaceSmithyBuilder<NodeValidationVisitor>
- Returns:
- an instance of T
-
-