Class MemberShape.Builder
- java.lang.Object
-
- software.amazon.smithy.model.shapes.AbstractShapeBuilder<MemberShape.Builder,MemberShape>
-
- software.amazon.smithy.model.shapes.MemberShape.Builder
-
- All Implemented Interfaces:
FromSourceLocation
,SmithyBuilder<MemberShape>
- Enclosing class:
- MemberShape
public static class MemberShape.Builder extends AbstractShapeBuilder<MemberShape.Builder,MemberShape>
Builder used to create aMemberShape
.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MemberShape
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.ShapeId
getTarget()
MemberShape.Builder
target(java.lang.String shapeId)
Sets a member shape ID on the builder.MemberShape.Builder
target(ToShapeId shapeId)
Sets a member shape ID on the builder.-
Methods inherited from class software.amazon.smithy.model.shapes.AbstractShapeBuilder
addMember, addMixin, addTrait, addTraits, clearMembers, clearMixins, clearTraits, flattenMixins, getAllTraits, getId, getMember, getSourceLocation, id, id, mixins, removeMixin, removeTrait, removeTrait, source, source, traits
-
-
-
-
Method Detail
-
build
public MemberShape build()
Description copied from interface:SmithyBuilder
Creates an immutable object that is created from the properties that have been set on the builder.- Returns:
- an instance of T
-
getShapeType
public ShapeType getShapeType()
Description copied from class:AbstractShapeBuilder
Gets the type of shape being built.- Specified by:
getShapeType
in classAbstractShapeBuilder<MemberShape.Builder,MemberShape>
- Returns:
- Returns the shape type.
-
target
public MemberShape.Builder target(ToShapeId shapeId)
Sets a member shape ID on the builder.- Parameters:
shapeId
- MemberShape targeted shape ID.- Returns:
- Returns the builder.
-
target
public MemberShape.Builder target(java.lang.String shapeId)
Sets a member shape ID on the builder.- Parameters:
shapeId
- Targeted shape ID as an absolute member.- Returns:
- Returns the builder.
- Throws:
ShapeIdSyntaxException
- if the shape ID is invalid.
-
getTarget
public ShapeId getTarget()
- Returns:
- Returns the target currently set on the member.
-
-