Class StructureShape

java.lang.Object
software.amazon.smithy.model.shapes.Shape
software.amazon.smithy.model.shapes.StructureShape
All Implemented Interfaces:
Comparable<Shape>, FromSourceLocation, ToShapeId, software.amazon.smithy.utils.Tagged, software.amazon.smithy.utils.ToSmithyBuilder<StructureShape>

public final class StructureShape extends Shape implements software.amazon.smithy.utils.ToSmithyBuilder<StructureShape>
Structure shape that maps shape names to members.
  • Method Details

    • builder

      public static StructureShape.Builder builder()
      Returns:
      Creates a new StructureShape builder.
    • toBuilder

      public StructureShape.Builder toBuilder()
      Specified by:
      toBuilder in interface software.amazon.smithy.utils.ToSmithyBuilder<StructureShape>
    • accept

      public <R> R accept(ShapeVisitor<R> visitor)
      Description copied from class: Shape
      Dispatches the shape to the appropriate ShapeVisitor method.
      Specified by:
      accept in class Shape
      Type Parameters:
      R - Return type of the accept.
      Parameters:
      visitor - ShapeVisitor to use.
      Returns:
      Returns the result.
    • asStructureShape

      public Optional<StructureShape> asStructureShape()
      Overrides:
      asStructureShape in class Shape
      Returns:
      Optionally returns the shape as a StructureShape.
    • getType

      public ShapeType getType()
      Description copied from class: Shape
      Gets the type of the shape.
      Specified by:
      getType in class Shape
      Returns:
      Returns the type;
    • getAllMembers

      public Map<String,MemberShape> getAllMembers()
      Description copied from class: Shape
      Gets the members of the shape, including mixin members.
      Overrides:
      getAllMembers in class Shape
      Returns:
      Returns the immutable member map.