public static final class MapShape.Builder extends AbstractShapeBuilder<MapShape.Builder,MapShape>
ListShape
.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
MapShape.Builder |
addMember(MemberShape member)
Adds a member to the shape IFF the shape supports members.
|
MapShape |
build()
Creates an immutable object that is created from the properties
that have been set on the builder.
|
ShapeType |
getShapeType()
Gets the type of shape being built.
|
MapShape.Builder |
id(ShapeId shapeId)
Sets the shape ID of the shape.
|
MapShape.Builder |
key(MemberShape member) |
MapShape.Builder |
key(ShapeId target)
Sets the key member of the map.
|
MapShape.Builder |
key(ShapeId target,
java.util.function.Consumer<MemberShape.Builder> memberUpdater)
Sets the key member of the map.
|
MapShape.Builder |
value(MemberShape member) |
MapShape.Builder |
value(ShapeId target)
Sets the value member of the map.
|
MapShape.Builder |
value(ShapeId target,
java.util.function.Consumer<MemberShape.Builder> memberUpdater)
Sets the value member of the map.
|
addTrait, addTraits, clearTraits, getId, getSourceLocation, id, removeTrait, removeTrait, source, source, traits
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
requiredState
public MapShape build()
SmithyBuilder
public ShapeType getShapeType()
AbstractShapeBuilder
getShapeType
in class AbstractShapeBuilder<MapShape.Builder,MapShape>
public MapShape.Builder id(ShapeId shapeId)
AbstractShapeBuilder
id
in class AbstractShapeBuilder<MapShape.Builder,MapShape>
shapeId
- Shape ID to set.public MapShape.Builder key(MemberShape member)
public MapShape.Builder value(MemberShape member)
public MapShape.Builder addMember(MemberShape member)
AbstractShapeBuilder
addMember
in class AbstractShapeBuilder<MapShape.Builder,MapShape>
member
- Member to add to the shape.public MapShape.Builder key(ShapeId target)
target
- Target of the member.public MapShape.Builder key(ShapeId target, java.util.function.Consumer<MemberShape.Builder> memberUpdater)
target
- Target of the member.memberUpdater
- Consumer that can update the created member shape.public MapShape.Builder value(ShapeId target)
target
- Target of the member.public MapShape.Builder value(ShapeId target, java.util.function.Consumer<MemberShape.Builder> memberUpdater)
target
- Target of the member.memberUpdater
- Consumer that can updated the created member shape.