public static final class SmithyIdlModelSerializer.Builder extends java.lang.Object implements SmithyBuilder<SmithyIdlModelSerializer>
SmithyIdlModelSerializer
.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
SmithyIdlModelSerializer.Builder |
basePath(java.nio.file.Path basePath)
A base path to use for any created models.
|
SmithyIdlModelSerializer |
build()
Creates an immutable object that is created from the properties
that have been set on the builder.
|
SmithyIdlModelSerializer.Builder |
metadataFilter(java.util.function.Predicate<java.lang.String> metadataFilter)
Predicate that determines if a metadata is serialized.
|
SmithyIdlModelSerializer.Builder |
shapeFilter(java.util.function.Predicate<Shape> shapeFilter)
Predicate that determines if a shape and its traits are serialized.
|
SmithyIdlModelSerializer.Builder |
shapePlacer(java.util.function.Function<Shape,java.nio.file.Path> shapePlacer)
Function that determines what output file a shape should go in.
|
SmithyIdlModelSerializer.Builder |
traitFilter(java.util.function.Predicate<Trait> traitFilter)
Sets a predicate that can be used to filter trait values from
appearing in the serialized model.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
requiredState
public SmithyIdlModelSerializer.Builder metadataFilter(java.util.function.Predicate<java.lang.String> metadataFilter)
metadataFilter
- Predicate that accepts a metadata key.public SmithyIdlModelSerializer.Builder shapeFilter(java.util.function.Predicate<Shape> shapeFilter)
shapeFilter
- Predicate that accepts a shape.public SmithyIdlModelSerializer.Builder traitFilter(java.util.function.Predicate<Trait> traitFilter)
Note that this does not filter out trait definitions. It only filters out instances of traits from being serialized on shapes.
traitFilter
- Predicate that filters out trait definitions.public SmithyIdlModelSerializer.Builder shapePlacer(java.util.function.Function<Shape,java.nio.file.Path> shapePlacer)
The returned paths may be absolute or relative.
NOTE: the Smithy IDL only supports one namespace per file.
shapePlacer
- Function that accepts a shape and returns file path.public SmithyIdlModelSerializer.Builder basePath(java.nio.file.Path basePath)
basePath
- The base directory to assign models to.public SmithyIdlModelSerializer build()
SmithyBuilder
build
in interface SmithyBuilder<SmithyIdlModelSerializer>