public static class IntEnumShape.Builder extends IntegerShape.Builder
IntegerShape.| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
IntEnumShape.Builder |
addMember(MemberShape member)
Adds a member to the shape IFF the shape supports members.
|
IntEnumShape.Builder |
addMember(java.lang.String memberName,
int enumValue)
Adds a member to the builder.
|
IntEnumShape.Builder |
addMember(java.lang.String memberName,
int enumValue,
java.util.function.Consumer<MemberShape.Builder> memberUpdater)
Adds a member to the builder.
|
IntEnumShape.Builder |
addMixin(Shape shape)
Adds a mixin to the shape.
|
IntEnumShape |
build() |
IntEnumShape.Builder |
clearMembers()
Removes all members from the builder.
|
IntEnumShape.Builder |
flattenMixins()
Removes mixins from a shape and flattens them into the shape.
|
ShapeType |
getShapeType()
Gets the type of shape being built.
|
IntEnumShape.Builder |
id(ShapeId shapeId)
Sets the shape ID of the shape.
|
IntEnumShape.Builder |
id(java.lang.String shapeId)
Sets the shape ID of the shape.
|
IntEnumShape.Builder |
members(java.util.Collection<MemberShape> members)
Replaces the members of the builder.
|
IntEnumShape.Builder |
removeMember(java.lang.String member)
Removes a member by name.
|
IntEnumShape.Builder |
removeMixin(ToShapeId shape)
Removes a mixin from the shape by shape or ID.
|
addTrait, addTraits, clearMixins, clearTraits, getAllTraits, getId, getMember, getSourceLocation, mixins, removeTrait, removeTrait, source, source, traitsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomparepublic IntEnumShape build()
build in interface software.amazon.smithy.utils.SmithyBuilder<IntegerShape>build in class IntegerShape.Builderpublic ShapeType getShapeType()
AbstractShapeBuildergetShapeType in class IntegerShape.Builderpublic IntEnumShape.Builder id(ShapeId shapeId)
AbstractShapeBuilderid in class AbstractShapeBuilder<IntegerShape.Builder,IntegerShape>shapeId - Shape ID to set.public IntEnumShape.Builder id(java.lang.String shapeId)
AbstractShapeBuilderid in class AbstractShapeBuilder<IntegerShape.Builder,IntegerShape>shapeId - Absolute shape ID string to set.public IntEnumShape.Builder members(java.util.Collection<MemberShape> members)
members - Members to add to the builder.public IntEnumShape.Builder clearMembers()
AbstractShapeBuilderclearMembers in class AbstractShapeBuilder<IntegerShape.Builder,IntegerShape>public IntEnumShape.Builder addMember(MemberShape member)
AbstractShapeBuilderaddMember in class AbstractShapeBuilder<IntegerShape.Builder,IntegerShape>member - Member to add to the shape.public IntEnumShape.Builder addMember(java.lang.String memberName, int enumValue)
memberName - Member name to add.enumValue - The value of the enum.public IntEnumShape.Builder addMember(java.lang.String memberName, int enumValue, java.util.function.Consumer<MemberShape.Builder> memberUpdater)
memberName - Member name to add.enumValue - The value of the enum.memberUpdater - Consumer that can update the created member shape.public IntEnumShape.Builder removeMember(java.lang.String member)
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.
member - Member name to remove.public IntEnumShape.Builder addMixin(Shape shape)
AbstractShapeBuilderaddMixin in class AbstractShapeBuilder<IntegerShape.Builder,IntegerShape>shape - Mixin to add.public IntEnumShape.Builder removeMixin(ToShapeId shape)
AbstractShapeBuilderremoveMixin in class AbstractShapeBuilder<IntegerShape.Builder,IntegerShape>shape - Shape or shape ID to remove.public IntEnumShape.Builder flattenMixins()
AbstractShapeBuilderFlattening 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.
flattenMixins in class AbstractShapeBuilder<IntegerShape.Builder,IntegerShape>