public static final class OperationShape.Builder extends AbstractShapeBuilder<OperationShape.Builder,OperationShape>
OperationShape
.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
OperationShape.Builder |
addError(java.lang.String errorShapeId)
Adds an error to the operation.
|
OperationShape.Builder |
addError(ToShapeId errorShapeId)
Adds an error to the operation.
|
OperationShape.Builder |
addErrors(java.util.Collection<ShapeId> errorShapeIds)
Adds an each of the errors to the operation.
|
OperationShape |
build()
Creates an immutable object that is created from the properties
that have been set on the builder.
|
OperationShape.Builder |
clearErrors()
Removes all errors.
|
OperationShape.Builder |
errors(java.util.Collection<ShapeId> errorShapeIds)
Sets and replaces the errors of the operation.
|
ShapeType |
getShapeType()
Gets the type of shape being built.
|
OperationShape.Builder |
input(ToShapeId inputShape)
Sets the input shape ID of the operation.
|
OperationShape.Builder |
output(ToShapeId outputShape)
Sets the output shape ID of the operation.
|
OperationShape.Builder |
removeError(ToShapeId errorShapeId)
Removes an error by Shape ID.
|
addMember, addTrait, addTraits, clearTraits, getId, getSourceLocation, id, id, removeTrait, removeTrait, source, source, traits
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
requiredState
public ShapeType getShapeType()
AbstractShapeBuilder
getShapeType
in class AbstractShapeBuilder<OperationShape.Builder,OperationShape>
public OperationShape.Builder input(ToShapeId inputShape)
inputShape
- Shape ID that MUST reference a structure.public OperationShape.Builder output(ToShapeId outputShape)
outputShape
- Shape ID that MUST reference a structure.public OperationShape.Builder errors(java.util.Collection<ShapeId> errorShapeIds)
errorShapeIds
- Error shape IDs to set.public OperationShape.Builder addError(ToShapeId errorShapeId)
errorShapeId
- Error shape ID to add.public OperationShape.Builder addError(java.lang.String errorShapeId)
errorShapeId
- Error shape ID to add.ShapeIdSyntaxException
- if the shape ID is invalid.public OperationShape.Builder addErrors(java.util.Collection<ShapeId> errorShapeIds)
errorShapeIds
- Error shape IDs to add.public OperationShape.Builder removeError(ToShapeId errorShapeId)
errorShapeId
- Error shape ID to remove.public OperationShape.Builder clearErrors()
public OperationShape build()
SmithyBuilder