Class OperationShape.Builder

All Implemented Interfaces:
FromSourceLocation, SmithyBuilder<OperationShape>
Enclosing class:
OperationShape

public static final class OperationShape.Builder extends AbstractShapeBuilder<OperationShape.Builder,OperationShape>
Builder used to create a OperationShape.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • getShapeType

      public ShapeType getShapeType()
      Description copied from class: AbstractShapeBuilder
      Gets the type of shape being built.
      Specified by:
      getShapeType in class AbstractShapeBuilder<OperationShape.Builder,OperationShape>
      Returns:
      Returns the shape type.
    • input

      public OperationShape.Builder input(ToShapeId inputShape)
      Sets the input shape ID of the operation.
      Parameters:
      inputShape - Shape ID that MUST reference a structure.
      Returns:
      Returns the builder.
    • output

      public OperationShape.Builder output(ToShapeId outputShape)
      Sets the output shape ID of the operation.
      Parameters:
      outputShape - Shape ID that MUST reference a structure.
      Returns:
      Returns the builder.
    • errors

      public OperationShape.Builder errors(Collection<ShapeId> errorShapeIds)
      Sets and replaces the errors of the operation.
      Parameters:
      errorShapeIds - Error shape IDs to set.
      Returns:
      Returns the builder.
    • addError

      public OperationShape.Builder addError(ToShapeId errorShapeId)
      Adds an error to the operation.
      Parameters:
      errorShapeId - Error shape ID to add.
      Returns:
      Returns the builder.
    • addError

      public OperationShape.Builder addError(String errorShapeId)
      Adds an error to the operation.
      Parameters:
      errorShapeId - Error shape ID to add.
      Returns:
      Returns the builder.
      Throws:
      ShapeIdSyntaxException - if the shape ID is invalid.
    • addErrors

      public OperationShape.Builder addErrors(Collection<ShapeId> errorShapeIds)
      Adds an each of the errors to the operation.
      Parameters:
      errorShapeIds - Error shape IDs to add.
      Returns:
      Returns the builder.
    • removeError

      public OperationShape.Builder removeError(ToShapeId errorShapeId)
      Removes an error by Shape ID.
      Parameters:
      errorShapeId - Error shape ID to remove.
      Returns:
      Returns the builder.
    • clearErrors

      public OperationShape.Builder clearErrors()
      Removes all errors.
      Returns:
      Returns the builder.
    • build

      public OperationShape 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