Class CollectionShape.Builder<B extends CollectionShape.Builder<?,?>,S extends CollectionShape>

java.lang.Object
software.amazon.smithy.model.shapes.AbstractShapeBuilder<B,S>
software.amazon.smithy.model.shapes.CollectionShape.Builder<B,S>
Type Parameters:
B - Concrete builder type.
S - Shape type being created.
All Implemented Interfaces:
FromSourceLocation, SmithyBuilder<S>
Direct Known Subclasses:
ListShape.Builder, SetShape.Builder
Enclosing class:
CollectionShape

public abstract static class CollectionShape.Builder<B extends CollectionShape.Builder<?,?>,S extends CollectionShape> extends AbstractShapeBuilder<B,S>
Builder used to create a List or Set shape.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • id

      public final B id(ShapeId shapeId)
      Description copied from class: AbstractShapeBuilder
      Sets the shape ID of the shape.
      Overrides:
      id in class AbstractShapeBuilder<B extends CollectionShape.Builder<?,?>,S extends CollectionShape>
      Parameters:
      shapeId - Shape ID to set.
      Returns:
      Returns the builder.
    • member

      public B member(MemberShape member)
      Sets the member of the collection.
      Parameters:
      member - Member of the collection to set.
      Returns:
      Returns the builder.
    • member

      public B member(ShapeId target)
      Sets the member of the collection.
      Parameters:
      target - Target of the member.
      Returns:
      Returns the builder.
    • member

      public B member(ShapeId target, Consumer<MemberShape.Builder> memberUpdater)
      Sets the member of the collection.
      Parameters:
      target - Target of the member.
      memberUpdater - Consumer that can update the created member shape.
      Returns:
      Returns the builder.
    • addMember

      public final B addMember(MemberShape member)
      Description copied from class: AbstractShapeBuilder
      Adds a member to the shape IFF the shape supports members.
      Overrides:
      addMember in class AbstractShapeBuilder<B extends CollectionShape.Builder<?,?>,S extends CollectionShape>
      Parameters:
      member - Member to add to the shape.
      Returns:
      Returns the model assembler.