Class SetShape.Builder
java.lang.Object
software.amazon.smithy.model.shapes.AbstractShapeBuilder<B,S>
 
software.amazon.smithy.model.shapes.CollectionShape.Builder<ListShape.Builder,ListShape>
 
software.amazon.smithy.model.shapes.ListShape.Builder
software.amazon.smithy.model.shapes.SetShape.Builder
- All Implemented Interfaces:
- FromSourceLocation,- SmithyBuilder<ListShape>
- Enclosing class:
- SetShape
Builder used to create a 
SetShape.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionaddMember(MemberShape member) Adds a member to the shape IFF the shape supports members.Adds a trait to the shape builder, replacing any conflicting traits.addTraits(Collection<? extends Trait> traitsToAdd) Adds traits from an iterator to the shape builder, replacing any conflicting traits.build()Creates an immutable object that is created from the properties that have been set on the builder.Removes all members from the builder.Removes all traits.Gets the type of shape being built.Sets the shape ID of the shape.Sets the shape ID of the shape.member(MemberShape member) Sets the member of the collection.Sets the member of the collection.member(ShapeId target, Consumer<MemberShape.Builder> memberUpdater) Sets the member of the collection.removeTrait(String traitId) Removes a trait from the shape builder.removeTrait(ShapeId traitId) Removes a trait from the shape builder.Sets the source location of the shape.source(SourceLocation sourceLocation) Sets the source location of the shape.traits(Collection<Trait> traitsToSet) Replace all traits in the builder.Methods inherited from class software.amazon.smithy.model.shapes.CollectionShape.BuilderflattenMixins, getMemberMethods inherited from class software.amazon.smithy.model.shapes.AbstractShapeBuilderaddMixin, clearMixins, getAllTraits, getId, getSourceLocation, mixins, removeMixin
- 
Constructor Details- 
Builderpublic Builder()
 
- 
- 
Method Details- 
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<ListShape>
- Overrides:
- buildin class- ListShape.Builder
- Returns:
- an instance of T
 
- 
getShapeTypeDescription copied from class:AbstractShapeBuilderGets the type of shape being built.- Overrides:
- getShapeTypein class- ListShape.Builder
- Returns:
- Returns the shape type.
 
- 
memberDescription copied from class:CollectionShape.BuilderSets the member of the collection.- Overrides:
- memberin class- CollectionShape.Builder<ListShape.Builder,- ListShape> 
- Parameters:
- member- Member of the collection to set.
- Returns:
- Returns the builder.
 
- 
memberDescription copied from class:CollectionShape.BuilderSets the member of the collection.- Overrides:
- memberin class- CollectionShape.Builder<ListShape.Builder,- ListShape> 
- Parameters:
- target- Target of the member.
- Returns:
- Returns the builder.
 
- 
memberDescription copied from class:CollectionShape.BuilderSets the member of the collection.- Overrides:
- memberin class- CollectionShape.Builder<ListShape.Builder,- ListShape> 
- Parameters:
- target- Target of the member.
- memberUpdater- Consumer that can update the created member shape.
- Returns:
- Returns the builder.
 
- 
idDescription copied from class:AbstractShapeBuilderSets the shape ID of the shape.- Overrides:
- idin class- CollectionShape.Builder<ListShape.Builder,- ListShape> 
- Parameters:
- shapeId- Shape ID to set.
- Returns:
- Returns the builder.
 
- 
addMemberDescription copied from class:AbstractShapeBuilderAdds a member to the shape IFF the shape supports members.- Overrides:
- addMemberin class- CollectionShape.Builder<ListShape.Builder,- ListShape> 
- Parameters:
- member- Member to add to the shape.
- Returns:
- Returns the builder.
 
- 
clearMembersDescription copied from class:AbstractShapeBuilderRemoves all members from the builder.- Overrides:
- clearMembersin class- CollectionShape.Builder<ListShape.Builder,- ListShape> 
- Returns:
- Returns the builder.
 
- 
idDescription copied from class:AbstractShapeBuilderSets the shape ID of the shape.- Overrides:
- idin class- AbstractShapeBuilder<ListShape.Builder,- ListShape> 
- Parameters:
- shapeId- Absolute shape ID string to set.
- Returns:
- Returns the builder.
 
- 
sourceDescription copied from class:AbstractShapeBuilderSets the source location of the shape.- Overrides:
- sourcein class- AbstractShapeBuilder<ListShape.Builder,- ListShape> 
- Parameters:
- sourceLocation- Source location to set.
- Returns:
- Returns the builder.
 
- 
sourceDescription copied from class:AbstractShapeBuilderSets the source location of the shape.- Overrides:
- sourcein class- AbstractShapeBuilder<ListShape.Builder,- ListShape> 
- Parameters:
- 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.
- Returns:
- Returns the builder.
 
- 
traitsDescription copied from class:AbstractShapeBuilderReplace all traits in the builder.- Overrides:
- traitsin class- AbstractShapeBuilder<ListShape.Builder,- ListShape> 
- Parameters:
- traitsToSet- Sequence of traits to set on the builder.
- Returns:
- Returns the builder.
 
- 
addTraitsDescription copied from class:AbstractShapeBuilderAdds traits from an iterator to the shape builder, replacing any conflicting traits.- Overrides:
- addTraitsin class- AbstractShapeBuilder<ListShape.Builder,- ListShape> 
- Parameters:
- traitsToAdd- Sequence of traits to add to the builder.
- Returns:
- Returns the builder.
 
- 
addTraitDescription copied from class:AbstractShapeBuilderAdds a trait to the shape builder, replacing any conflicting traits.- Overrides:
- addTraitin class- AbstractShapeBuilder<ListShape.Builder,- ListShape> 
- Parameters:
- trait- Trait instance to add.
- Returns:
- Returns the builder.
 
- 
removeTraitDescription copied from class:AbstractShapeBuilderRemoves a trait from the shape builder.A relative trait name will attempt to remove a prelude trait with the given name. - Overrides:
- removeTraitin class- AbstractShapeBuilder<ListShape.Builder,- ListShape> 
- Parameters:
- traitId- Absolute or relative ID of the trait to remove.
- Returns:
- Returns the builder.
 
- 
removeTraitDescription copied from class:AbstractShapeBuilderRemoves a trait from the shape builder.- Overrides:
- removeTraitin class- AbstractShapeBuilder<ListShape.Builder,- ListShape> 
- Parameters:
- traitId- ID of the trait to remove.
- Returns:
- Returns the builder.
 
- 
clearTraitsDescription copied from class:AbstractShapeBuilderRemoves all traits.- Overrides:
- clearTraitsin class- AbstractShapeBuilder<ListShape.Builder,- ListShape> 
- Returns:
- Returns the builder.
 
 
-