Class MapShape

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

public final class MapShape extends Shape implements ToSmithyBuilder<MapShape>
Represents a map shape.
  • Method Details

    • builder

      public static MapShape.Builder builder()
    • toBuilder

      public MapShape.Builder toBuilder()
      Description copied from interface: ToSmithyBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToSmithyBuilder<MapShape>
      Returns:
      a builder for type T
    • 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.
    • asMapShape

      public Optional<MapShape> asMapShape()
      Overrides:
      asMapShape in class Shape
      Returns:
      Optionally returns the shape as a MapShape.
    • 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;
    • getValue

      public MemberShape getValue()
      Get the value member shape of the map.
      Returns:
      Returns the value member shape.
    • getKey

      public MemberShape getKey()
      Get the key member shape of the map.
      Returns:
      Returns the key member shape.
    • 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.