Class OperationShape

  • All Implemented Interfaces:
    java.lang.Comparable<Shape>, FromSourceLocation, ToShapeId, software.amazon.smithy.utils.Tagged, software.amazon.smithy.utils.ToSmithyBuilder<OperationShape>

    public final class OperationShape
    extends Shape
    implements software.amazon.smithy.utils.ToSmithyBuilder<OperationShape>
    Represents an API operation.
    • Method Detail

      • accept

        public <R> R accept​(ShapeVisitor<R> cases)
        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:
        cases - NeighborVisitor to use.
        Returns:
        Returns the result.
      • getInput

        public java.util.Optional<ShapeId> getInput()

        Gets the optional shape ID of the input of the operation.

        Returns:
        Returns the optional shape ID.
      • getOutput

        public java.util.Optional<ShapeId> getOutput()

        Gets the optional shape ID of the output of the operation.

        Returns:
        Returns the optional shape ID.
      • getErrors

        public java.util.List<ShapeId> getErrors()

        Gets a list of the error shape IDs that can be encountered.

        Each returned ShapeId must resolve to a StructureShape that is targeted by an error trait; however, this is only guaranteed after a model is validated.

        Returns:
        Returns the errors.
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class Shape