public final class OperationShape extends Shape implements ToSmithyBuilder<OperationShape>
Modifier and Type | Class and Description |
---|---|
static class |
OperationShape.Builder
Builder used to create a
OperationShape . |
Modifier and Type | Method and Description |
---|---|
<R> R |
accept(ShapeVisitor<R> cases)
Dispatches the shape to the appropriate
ShapeVisitor method. |
java.util.Optional<OperationShape> |
asOperationShape() |
static OperationShape.Builder |
builder() |
boolean |
equals(java.lang.Object other) |
java.util.List<ShapeId> |
getErrors()
Gets a list of the error shape IDs bound directly to the operation
that can be encountered.
|
java.util.List<ShapeId> |
getErrors(ServiceShape service)
Gets a list of the error shape IDs the operation can encounter,
including any common errors of a service.
|
java.util.Optional<ShapeId> |
getInput()
Gets the optional shape ID of the input of the operation.
|
ShapeId |
getInputShape()
Gets the input of the operation.
|
java.util.Optional<ShapeId> |
getOutput()
Gets the optional shape ID of the output of the operation.
|
ShapeId |
getOutputShape()
Gets the output of the operation.
|
ShapeType |
getType()
Gets the type of the shape.
|
OperationShape.Builder |
toBuilder()
Take this object and create a builder that contains all of the
current property values of this object.
|
asBigDecimalShape, asBigIntegerShape, asBlobShape, asBooleanShape, asByteShape, asDocumentShape, asDoubleShape, asFloatShape, asIntegerShape, asListShape, asLongShape, asMapShape, asMemberShape, asResourceShape, asServiceShape, asSetShape, asShortShape, asStringShape, asStructureShape, asTimestampShape, asUnionShape, compareTo, expectTrait, findMemberTrait, findTrait, findTrait, getAllTraits, getId, getMemberTrait, getSourceLocation, getTags, getTrait, hashCode, hasTrait, hasTrait, hasTrait, isBigDecimalShape, isBigIntegerShape, isBlobShape, isBooleanShape, isByteShape, isDocumentShape, isDoubleShape, isFloatShape, isIntegerShape, isListShape, isLongShape, isMapShape, isMemberShape, isOperationShape, isResourceShape, isServiceShape, isSetShape, isShortShape, isStringShape, isStructureShape, isTimestampShape, isUnionShape, members, shapeToBuilder, toShapeId, toString
public static OperationShape.Builder builder()
public OperationShape.Builder toBuilder()
ToSmithyBuilder
toBuilder
in interface ToSmithyBuilder<OperationShape>
public <R> R accept(ShapeVisitor<R> cases)
Shape
ShapeVisitor
method.public java.util.Optional<OperationShape> asOperationShape()
asOperationShape
in class Shape
OperationShape
.public java.util.Optional<ShapeId> getInput()
Gets the optional shape ID of the input of the operation.
For backward compatibility, if the input targets smithy.api#Unit
,
then an empty optional is returned.
public java.util.Optional<ShapeId> getOutput()
Gets the optional shape ID of the output of the operation.
For backward compatibility, if the output targets smithy.api#Unit
,
then an empty optional is returned.
public ShapeId getInputShape()
All operations have input, and they default to target
smithy.api#Unit
.
public ShapeId getOutputShape()
All operations have output, and they default to target
smithy.api#Unit
.
public java.util.List<ShapeId> getErrors()
Gets a list of the error shape IDs bound directly to the operation that can be encountered.
This DOES NOT include errors that are common to a service. Operations
can be bound to multiple services, so common service errors cannot be
returned by this method. Use getErrors(ServiceShape)
or
OperationIndex.getErrors(ToShapeId, ToShapeId)
to get all of the
errors an operation can encounter when used within a service.
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.
getErrors(ServiceShape)
,
OperationIndex.getErrors(ToShapeId, ToShapeId)
public java.util.List<ShapeId> getErrors(ServiceShape service)
Gets a list of the error shape IDs the operation can encounter, including any common errors of a service.
No validation is performed here to ensure that the operation is actually bound to the given service shape.
OperationIndex.getErrors(ToShapeId, ToShapeId)