public static final class SetShape.Builder extends ListShape.Builder
SetShape.| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
SetShape.Builder |
addMember(MemberShape member)
Adds a member to the shape IFF the shape supports members.
|
SetShape.Builder |
addTrait(Trait trait)
Adds a trait to the shape builder, replacing any conflicting traits.
|
SetShape.Builder |
addTraits(java.util.Collection<? extends Trait> traitsToAdd)
Adds traits from an iterator to the shape builder, replacing any
conflicting traits.
|
SetShape |
build() |
SetShape.Builder |
clearMembers()
Removes all members from the builder.
|
SetShape.Builder |
clearTraits()
Removes all traits.
|
ShapeType |
getShapeType()
Gets the type of shape being built.
|
SetShape.Builder |
id(ShapeId shapeId)
Sets the shape ID of the shape.
|
SetShape.Builder |
id(java.lang.String shapeId)
Sets the shape ID of the shape.
|
SetShape.Builder |
member(MemberShape member)
Sets the member of the collection.
|
SetShape.Builder |
member(ShapeId target)
Sets the member of the collection.
|
SetShape.Builder |
member(ShapeId target,
java.util.function.Consumer<MemberShape.Builder> memberUpdater)
Sets the member of the collection.
|
SetShape.Builder |
removeTrait(ShapeId traitId)
Removes a trait from the shape builder.
|
SetShape.Builder |
removeTrait(java.lang.String traitId)
Removes a trait from the shape builder.
|
SetShape.Builder |
source(SourceLocation sourceLocation)
Sets the source location of the shape.
|
SetShape.Builder |
source(java.lang.String filename,
int line,
int column)
Sets the source location of the shape.
|
SetShape.Builder |
traits(java.util.Collection<Trait> traitsToSet)
Replace all traits in the builder.
|
flattenMixins, getMemberaddMixin, clearMixins, getAllTraits, getId, getSourceLocation, mixins, removeMixinclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomparepublic SetShape build()
build in interface software.amazon.smithy.utils.SmithyBuilder<ListShape>build in class ListShape.Builderpublic ShapeType getShapeType()
AbstractShapeBuildergetShapeType in class ListShape.Builderpublic SetShape.Builder member(MemberShape member)
CollectionShape.Buildermember in class CollectionShape.Builder<ListShape.Builder,ListShape>member - Member of the collection to set.public SetShape.Builder member(ShapeId target)
CollectionShape.Buildermember in class CollectionShape.Builder<ListShape.Builder,ListShape>target - Target of the member.public SetShape.Builder member(ShapeId target, java.util.function.Consumer<MemberShape.Builder> memberUpdater)
CollectionShape.Buildermember in class CollectionShape.Builder<ListShape.Builder,ListShape>target - Target of the member.memberUpdater - Consumer that can update the created member shape.public SetShape.Builder id(ShapeId shapeId)
AbstractShapeBuilderid in class CollectionShape.Builder<ListShape.Builder,ListShape>shapeId - Shape ID to set.public SetShape.Builder addMember(MemberShape member)
AbstractShapeBuilderaddMember in class CollectionShape.Builder<ListShape.Builder,ListShape>member - Member to add to the shape.public SetShape.Builder clearMembers()
AbstractShapeBuilderclearMembers in class CollectionShape.Builder<ListShape.Builder,ListShape>public SetShape.Builder id(java.lang.String shapeId)
AbstractShapeBuilderid in class AbstractShapeBuilder<ListShape.Builder,ListShape>shapeId - Absolute shape ID string to set.public SetShape.Builder source(SourceLocation sourceLocation)
AbstractShapeBuildersource in class AbstractShapeBuilder<ListShape.Builder,ListShape>sourceLocation - Source location to set.public SetShape.Builder source(java.lang.String filename, int line, int column)
AbstractShapeBuildersource in class AbstractShapeBuilder<ListShape.Builder,ListShape>filename - Name of the file in which the shape was defined.line - Line number in the file where the shape was defined.column - Column number of the line where the shape was defined.public SetShape.Builder traits(java.util.Collection<Trait> traitsToSet)
AbstractShapeBuildertraits in class AbstractShapeBuilder<ListShape.Builder,ListShape>traitsToSet - Sequence of traits to set on the builder.public SetShape.Builder addTraits(java.util.Collection<? extends Trait> traitsToAdd)
AbstractShapeBuilderaddTraits in class AbstractShapeBuilder<ListShape.Builder,ListShape>traitsToAdd - Sequence of traits to add to the builder.public SetShape.Builder addTrait(Trait trait)
AbstractShapeBuilderaddTrait in class AbstractShapeBuilder<ListShape.Builder,ListShape>trait - Trait instance to add.public SetShape.Builder removeTrait(java.lang.String traitId)
AbstractShapeBuilderA relative trait name will attempt to remove a prelude trait with the given name.
removeTrait in class AbstractShapeBuilder<ListShape.Builder,ListShape>traitId - Absolute or relative ID of the trait to remove.public SetShape.Builder removeTrait(ShapeId traitId)
AbstractShapeBuilderremoveTrait in class AbstractShapeBuilder<ListShape.Builder,ListShape>traitId - ID of the trait to remove.public SetShape.Builder clearTraits()
AbstractShapeBuilderclearTraits in class AbstractShapeBuilder<ListShape.Builder,ListShape>