Class ServiceShape
java.lang.Object
software.amazon.smithy.model.shapes.Shape
software.amazon.smithy.model.shapes.EntityShape
software.amazon.smithy.model.shapes.ServiceShape
- All Implemented Interfaces:
Comparable<Shape>,FromSourceLocation,ToShapeId,software.amazon.smithy.utils.Tagged,software.amazon.smithy.utils.ToSmithyBuilder<ServiceShape>
public final class ServiceShape
extends EntityShape
implements software.amazon.smithy.utils.ToSmithyBuilder<ServiceShape>
Represents a
service shape.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescription<R> Raccept(ShapeVisitor<R> visitor) Dispatches the shape to the appropriateShapeVisitormethod.static ServiceShape.Builderbuilder()booleangetContextualName(ToShapeId shape) Gets the contextual name of a shape within the closure.Deprecated.Gets a list of the common errors that can be encountered by every operation in the service.Deprecated.Gets the list of common errors introduced by the shape and not inherited from mixins.Gets the rename map introduced by the shape and not inherited from mixins.Gets the version of the service introduced by the shape and not inherited from mixins.getType()Gets the type of the shape.Get the version of the service.Methods inherited from class software.amazon.smithy.model.shapes.EntityShape
getAllOperations, getIntroducedOperations, getIntroducedResources, getOperations, getResourcesMethods inherited from class software.amazon.smithy.model.shapes.Shape
asBigDecimalShape, asBigIntegerShape, asBlobShape, asBooleanShape, asByteShape, asDocumentShape, asDoubleShape, asEnumShape, asFloatShape, asIntegerShape, asIntEnumShape, asListShape, asLongShape, asMapShape, asMemberShape, asOperationShape, asResourceShape, 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, validateMixinsMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.smithy.utils.Tagged
hasTag
-
Method Details
-
builder
-
toBuilder
- Specified by:
toBuilderin interfacesoftware.amazon.smithy.utils.ToSmithyBuilder<ServiceShape>
-
accept
Description copied from class:ShapeDispatches the shape to the appropriateShapeVisitormethod. -
asServiceShape
- Overrides:
asServiceShapein classShape- Returns:
- Optionally returns the shape as a
ServiceShape.
-
equals
- Overrides:
equalsin classEntityShape
-
getType
Description copied from class:ShapeGets the type of the shape. -
getVersion
Get the version of the service. An empty string is returned if the version is undefined.- Returns:
- The version of the service.
-
getIntroducedVersion
Gets the version of the service introduced by the shape and not inherited from mixins. An empty string is returned if the version is undefined.- Returns:
- The introduced version of the service.
-
getRename
- Returns:
- The rename map of the service.
-
getIntroducedRename
Gets the rename map introduced by the shape and not inherited from mixins.- Returns:
- The introduced rename map of the service.
-
getErrors
Deprecated. -
getErrorsSet
Gets a list of the common errors that can be encountered by every operation in the service.
Each returned
ShapeIdmust resolve to aStructureShapethat is targeted by an error trait; however, this is only guaranteed after a model is validated.- Returns:
- Returns the errors.
-
getIntroducedErrors
Deprecated. -
getIntroducedErrorsSet
Gets the list of common errors introduced by the shape and not inherited from mixins. These errors can be encountered by every operation in the service. Each returnedShapeIdmust resolve to aStructureShapethat is targeted by an error trait; however, this is only guaranteed after a model is validated.- Returns:
- Returns the introduced service errors.
-
getContextualName
Gets the contextual name of a shape within the closure.If there is a rename property entry for the given shape ID, then the renamed shape name is returned. Otherwise, the name part of the given shape ID is returned, regardless of if the shape exists in the closure of the service.
This is a mirror of
ShapeId.getName(ServiceShape)that serves to make this functionality more discoverable.- Parameters:
shape- Shape to get the contextual name of.- Returns:
- Returns the contextual name of the shape within the service.
-