public final class MemberShape extends Shape implements ToSmithyBuilder<MemberShape>
Modifier and Type | Class and Description |
---|---|
static class |
MemberShape.Builder
Builder used to create a
MemberShape . |
Modifier and Type | Method and Description |
---|---|
<R> R |
accept(ShapeVisitor<R> cases)
Dispatches the shape to the appropriate
ShapeVisitor method. |
java.util.Optional<MemberShape> |
asMemberShape() |
static MemberShape.Builder |
builder() |
boolean |
equals(java.lang.Object other) |
java.util.Optional<Trait> |
findMemberTrait(Model model,
java.lang.String traitName)
Gets a trait from the member shape or from the shape targeted by the
member.
|
ShapeId |
getContainer()
Gets the shape in which the member is contained.
|
java.lang.String |
getMemberName()
Get the member name of the member.
|
<T extends Trait> |
getMemberTrait(Model model,
java.lang.Class<T> trait)
Gets a trait from the member shape or from the shape targeted by the
member.
|
ShapeId |
getTarget()
Get the targeted member shape ID.
|
ShapeType |
getType()
Gets the type of the shape.
|
boolean |
isOptional() |
boolean |
isRequired() |
MemberShape.Builder |
toBuilder()
Take this object and create a builder that contains all of the
current property values of this object.
|
asBigDecimalShape, asBigIntegerShape, asBlobShape, asBooleanShape, asByteShape, asDocumentShape, asDoubleShape, asFloatShape, asIntegerShape, asListShape, asLongShape, asMapShape, asOperationShape, asResourceShape, asServiceShape, asSetShape, asShortShape, asStringShape, asStructureShape, asTimestampShape, asUnionShape, compareTo, expectTrait, findTrait, findTrait, getAllTraits, getId, getSourceLocation, getTags, getTrait, hashCode, hasTrait, hasTrait, hasTrait, isBigDecimalShape, isBigIntegerShape, isBlobShape, isBooleanShape, isByteShape, isDocumentShape, isDoubleShape, isFloatShape, isIntegerShape, isListShape, isLongShape, isMapShape, isMemberShape, isOperationShape, isResourceShape, isServiceShape, isSetShape, isShortShape, isStringShape, isStructureShape, isTimestampShape, isUnionShape, members, shapeToBuilder, toShapeId, toString
public static MemberShape.Builder builder()
public MemberShape.Builder toBuilder()
ToSmithyBuilder
toBuilder
in interface ToSmithyBuilder<MemberShape>
public ShapeId getContainer()
public <R> R accept(ShapeVisitor<R> cases)
Shape
ShapeVisitor
method.public java.util.Optional<MemberShape> asMemberShape()
asMemberShape
in class Shape
MemberShape
.public ShapeId getTarget()
public java.lang.String getMemberName()
public boolean isRequired()
public boolean isOptional()
public <T extends Trait> java.util.Optional<T> getMemberTrait(Model model, java.lang.Class<T> trait)
Shape
If the shape is not a member, then the method functions the same as
Shape.getTrait(Class)
.
getMemberTrait
in class Shape
T
- Trait type to get.model
- Model used to find member targets.trait
- Trait type to get.Shape.getTrait(Class)
public java.util.Optional<Trait> findMemberTrait(Model model, java.lang.String traitName)
Shape
If the shape is not a member, then the method functions the same as
Shape.findTrait(String)
.
findMemberTrait
in class Shape
model
- Model used to find member targets.traitName
- Trait name to get.Shape.findTrait(String)