public static final class Model.Builder extends java.lang.Object implements SmithyBuilder<Model>
Modifier and Type | Method and Description |
---|---|
Model.Builder |
addShape(Shape shape)
Add a shape to the builder.
|
<S extends Shape> |
addShapes(java.util.Collection<S> shapes)
Adds a collection of shapes to the builder.
|
Model.Builder |
addShapes(Model model)
Adds the shapes of another model to the builder.
|
Model.Builder |
addShapes(Shape... shapes)
Adds a variadic list of shapes.
|
Model |
build()
Creates an immutable object that is created from the properties
that have been set on the builder.
|
Model.Builder |
clearMetadata() |
Model.Builder |
metadata(java.util.Map<java.lang.String,Node> metadata) |
Model.Builder |
putMetadataProperty(java.lang.String key,
Node value) |
Model.Builder |
removeMetadataProperty(java.lang.String key) |
Model.Builder |
removeShape(ShapeId shapeId)
Removes a shape from the builder by ID.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
requiredState
public Model.Builder metadata(java.util.Map<java.lang.String,Node> metadata)
public Model.Builder putMetadataProperty(java.lang.String key, Node value)
public Model.Builder removeMetadataProperty(java.lang.String key)
public Model.Builder clearMetadata()
public Model.Builder addShape(Shape shape)
MemberShape
shapes are not added to the model directly.
They must be added by adding their containing shapes (e.g., to add a
list member, you must add the list shape that contains it). Any member
shape provided to any of the methods used to add shapes to the
model are ignored.
shape
- Shape to add.public Model.Builder addShapes(Model model)
model
- Model to add shapes from.public <S extends Shape> Model.Builder addShapes(java.util.Collection<S> shapes)
S
- Type of shape being added.shapes
- Collection of Shapes to add.public Model.Builder addShapes(Shape... shapes)
shapes
- Shapes to add.public Model.Builder removeShape(ShapeId shapeId)
Members of shapes are automatically removed when their containing shape is removed.
shapeId
- Shape to remove.public Model build()
SmithyBuilder
build
in interface SmithyBuilder<Model>