Class SmithyIdlModelSerializer.Builder
java.lang.Object
software.amazon.smithy.model.shapes.SmithyIdlModelSerializer.Builder
- All Implemented Interfaces:
- SmithyBuilder<SmithyIdlModelSerializer>
- Enclosing class:
- SmithyIdlModelSerializer
public static final class SmithyIdlModelSerializer.Builder
extends Object
implements SmithyBuilder<SmithyIdlModelSerializer>
Builder used to create 
SmithyIdlModelSerializer.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionA base path to use for any created models.build()Creates an immutable object that is created from the properties that have been set on the builder.componentOrder(SmithyIdlComponentOrder componentOrder) Defines how components are sorted in the model, changing the default behavior of sorting alphabetically.inlineInputSuffix(String inlineInputSuffix) Defines what suffixes are checked on operation input shapes to determine whether inline syntax should be used.inlineOutputSuffix(String inlineOutputSuffix) Defines what suffixes are checked on operation output shapes to determine whether inline syntax should be used.metadataFilter(Predicate<String> metadataFilter) Predicate that determines if a metadata is serialized.Enables serializing shapes in the Smithy prelude.shapeFilter(Predicate<Shape> shapeFilter) Predicate that determines if a shape and its traits are serialized.shapePlacer(Function<Shape, Path> shapePlacer) Function that determines what output file a shape should go in.traitFilter(Predicate<Trait> traitFilter) Sets a predicate that can be used to filter trait values from appearing in the serialized model.
- 
Constructor Details- 
Builderpublic Builder()
 
- 
- 
Method Details- 
metadataFilterPredicate that determines if a metadata is serialized.- Parameters:
- metadataFilter- Predicate that accepts a metadata key.
- Returns:
- Returns the builder.
 
- 
shapeFilterPredicate that determines if a shape and its traits are serialized.- Parameters:
- shapeFilter- Predicate that accepts a shape.
- Returns:
- Returns the builder.
 
- 
traitFilterSets a predicate that can be used to filter trait values from appearing in the serialized model.Note that this does not filter out trait definitions. It only filters out instances of traits from being serialized on shapes. - Parameters:
- traitFilter- Predicate that filters out trait definitions.
- Returns:
- Returns the builder.
 
- 
shapePlacerFunction that determines what output file a shape should go in.The returned paths may be absolute or relative. NOTE: the Smithy IDL only supports one namespace per file. - Parameters:
- shapePlacer- Function that accepts a shape and returns file path.
- Returns:
- Returns the builder.
 
- 
basePathA base path to use for any created models.- Parameters:
- basePath- The base directory to assign models to.
- Returns:
- Returns the builder.
 
- 
serializePreludeEnables serializing shapes in the Smithy prelude. Defaults to false.- Returns:
- Returns the builder.
 
- 
componentOrderDefines how components are sorted in the model, changing the default behavior of sorting alphabetically.You can serialize metadata, shapes, and traits in the original order they were defined by setting this to SmithyIdlComponentOrder.SOURCE_LOCATION.- Parameters:
- componentOrder- Change how components are sorted.
- Returns:
- Returns the builder.
 
- 
inlineInputSuffixDefines what suffixes are checked on operation input shapes to determine whether inline syntax should be used.This will also set the "operationInputSuffix" control statement. - Parameters:
- inlineInputSuffix- The suffix to use for inline operation input.
- Returns:
- Returns the builder.
 
- 
inlineOutputSuffixDefines what suffixes are checked on operation output shapes to determine whether inline syntax should be used.This will also set the "operationOutputSuffix" control statement. - Parameters:
- inlineOutputSuffix- The suffix to use for inline operation output.
- Returns:
- Returns the builder.
 
- 
buildDescription copied from interface:SmithyBuilderCreates an immutable object that is created from the properties that have been set on the builder.- Specified by:
- buildin interface- SmithyBuilder<SmithyIdlModelSerializer>
- Returns:
- an instance of T
 
 
-