Class IntEnumShape.Builder
java.lang.Object
software.amazon.smithy.model.shapes.AbstractShapeBuilder<IntegerShape.Builder,IntegerShape>
 
software.amazon.smithy.model.shapes.IntegerShape.Builder
software.amazon.smithy.model.shapes.IntEnumShape.Builder
- All Implemented Interfaces:
- FromSourceLocation,- SmithyBuilder<IntegerShape>
- Enclosing class:
- IntEnumShape
Builder used to create a 
IntegerShape.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionAdds a member to the builder.addMember(String memberName, int enumValue, Consumer<MemberShape.Builder> memberUpdater) Adds a member to the builder.addMember(MemberShape member) Adds a member to the shape IFF the shape supports members.Adds a mixin to the shape.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 mixins from a shape and flattens them into the shape.Gets the type of shape being built.Sets the shape ID of the shape.Sets the shape ID of the shape.members(Collection<MemberShape> members) Replaces the members of the builder.removeMember(String member) Removes a member by name.removeMixin(ToShapeId shape) Removes a mixin from the shape by shape or ID.Methods inherited from class software.amazon.smithy.model.shapes.AbstractShapeBuilderaddTrait, addTraits, clearMixins, clearTraits, getAllTraits, getId, getMember, getSourceLocation, mixins, removeTrait, removeTrait, source, source, traits
- 
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<IntegerShape>
- Overrides:
- buildin class- IntegerShape.Builder
- Returns:
- an instance of T
 
- 
getShapeTypeDescription copied from class:AbstractShapeBuilderGets the type of shape being built.- Overrides:
- getShapeTypein class- IntegerShape.Builder
- Returns:
- Returns the shape type.
 
- 
idDescription copied from class:AbstractShapeBuilderSets the shape ID of the shape.- Overrides:
- idin class- AbstractShapeBuilder<IntegerShape.Builder,- IntegerShape> 
- Parameters:
- shapeId- Shape ID to set.
- Returns:
- Returns the builder.
 
- 
idDescription copied from class:AbstractShapeBuilderSets the shape ID of the shape.- Overrides:
- idin class- AbstractShapeBuilder<IntegerShape.Builder,- IntegerShape> 
- Parameters:
- shapeId- Absolute shape ID string to set.
- Returns:
- Returns the builder.
 
- 
membersReplaces the members of the builder.- Parameters:
- members- Members to add to the builder.
- Returns:
- Returns the builder.
 
- 
clearMembersDescription copied from class:AbstractShapeBuilderRemoves all members from the builder.- Overrides:
- clearMembersin class- AbstractShapeBuilder<IntegerShape.Builder,- IntegerShape> 
- Returns:
- Returns the builder.
 
- 
addMemberDescription copied from class:AbstractShapeBuilderAdds a member to the shape IFF the shape supports members.- Overrides:
- addMemberin class- AbstractShapeBuilder<IntegerShape.Builder,- IntegerShape> 
- Parameters:
- member- Member to add to the shape.
- Returns:
- Returns the builder.
 
- 
addMemberAdds a member to the builder.- Parameters:
- memberName- Member name to add.
- enumValue- The value of the enum.
- Returns:
- Returns the builder.
 
- 
addMemberpublic IntEnumShape.Builder addMember(String memberName, int enumValue, Consumer<MemberShape.Builder> memberUpdater) Adds a member to the builder.- Parameters:
- memberName- Member name to add.
- enumValue- The value of the enum.
- memberUpdater- Consumer that can update the created member shape.
- Returns:
- Returns the builder.
 
- 
removeMemberRemoves a member by name.Note that removing a member that was added by a mixin results in an inconsistent model. It's best to use ModelTransform to ensure that the model remains consistent when removing members. - Parameters:
- member- Member name to remove.
- Returns:
- Returns the builder.
 
- 
addMixinDescription copied from class:AbstractShapeBuilderAdds a mixin to the shape.- Overrides:
- addMixinin class- AbstractShapeBuilder<IntegerShape.Builder,- IntegerShape> 
- Parameters:
- shape- Mixin to add.
- Returns:
- Returns the builder.
 
- 
removeMixinDescription copied from class:AbstractShapeBuilderRemoves a mixin from the shape by shape or ID.- Overrides:
- removeMixinin class- AbstractShapeBuilder<IntegerShape.Builder,- IntegerShape> 
- Parameters:
- shape- Shape or shape ID to remove.
- Returns:
- Returns the builder.
 
- 
flattenMixinsDescription copied from class:AbstractShapeBuilderRemoves mixins from a shape and flattens them into the shape.Flattening a mixin into a shape copies the traits and members of a mixin onto the shape, effectively resulting in the same shape but with no trace of the mixin relationship. - Overrides:
- flattenMixinsin class- AbstractShapeBuilder<IntegerShape.Builder,- IntegerShape> 
- Returns:
- Returns the updated builder.
 
 
-