Class OperationShape
- All Implemented Interfaces:
Comparable<Shape>
,FromSourceLocation
,ToShapeId
,Tagged
,ToSmithyBuilder<OperationShape>
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescription<R> R
accept
(ShapeVisitor<R> visitor) Dispatches the shape to the appropriateShapeVisitor
method.static OperationShape.Builder
builder()
boolean
Gets a list of the error shape IDs bound directly to the operation that can be encountered.getErrors
(ServiceShape service) Gets a list of the error shape IDs the operation can encounter, including any common errors of a service.getInput()
Gets the optional shape ID of the input of the operation.Gets the input of the operation.Gets the errors introduced by the shape and not inherited from mixins.Gets the optional shape ID of the output of the operation.Gets the output of the operation.getType()
Gets the type of the shape.Take this object and create a builder that contains all of the current property values of this object.Methods inherited from class software.amazon.smithy.model.shapes.Shape
asBigDecimalShape, asBigIntegerShape, asBlobShape, asBooleanShape, asByteShape, asDocumentShape, asDoubleShape, asEnumShape, asFloatShape, asIntegerShape, asIntEnumShape, asListShape, asLongShape, asMapShape, asMemberShape, asResourceShape, asServiceShape, asSetShape, asShortShape, asStringShape, asStructureShape, asTimestampShape, asUnionShape, compareTo, expectTrait, findMemberTrait, findTrait, findTrait, getAllMembers, getAllTraits, getId, getIntroducedTraits, getMember, getMemberNames, getMemberTrait, getMixins, getRequiredMembers, getSourceLocation, getTags, getTrait, hashCode, hasTrait, hasTrait, hasTrait, isBigDecimalShape, isBigIntegerShape, isBlobShape, isBooleanShape, isByteShape, isDocumentShape, isDoubleShape, isEnumShape, isFloatShape, isIntegerShape, isIntEnumShape, isListShape, isLongShape, isMapShape, isMemberShape, isOperationShape, isResourceShape, isServiceShape, isSetShape, isShortShape, isStringShape, isStructureShape, isTimestampShape, isUnionShape, members, shapeToBuilder, toShapeId, toString, validateMemberShapeIds, validateMixins
-
Method Details
-
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 interfaceToSmithyBuilder<OperationShape>
- Returns:
- a builder for type T
-
accept
Description copied from class:Shape
Dispatches the shape to the appropriateShapeVisitor
method. -
asOperationShape
- Overrides:
asOperationShape
in classShape
- Returns:
- Optionally returns the shape as an
OperationShape
.
-
getType
Description copied from class:Shape
Gets the type of the shape. -
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.- Returns:
- Returns the optional shape ID.
-
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.- Returns:
- Returns the optional shape ID.
-
getInputShape
Gets the input of the operation.All operations have input, and they default to target
smithy.api#Unit
.- Returns:
- Returns the non-nullable input.
-
getOutputShape
Gets the output of the operation.All operations have output, and they default to target
smithy.api#Unit
.- Returns:
- Returns the non-nullable output.
-
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)
orOperationIndex.getErrors(ToShapeId, ToShapeId)
to get all of the errors an operation can encounter when used within a service.Each returned
ShapeId
must resolve to aStructureShape
that is targeted by an error trait; however, this is only guaranteed after a model is validated.- Returns:
- Returns the errors.
- See Also:
-
getIntroducedErrors
Gets the errors introduced by the shape and not inherited from mixins.- Returns:
- Returns the introduced errors.
-
getErrors
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.
- Returns:
- Returns the errors.
- See Also:
-
equals
-