Class ResourceShape
- java.lang.Object
-
- software.amazon.smithy.model.shapes.Shape
-
- software.amazon.smithy.model.shapes.EntityShape
-
- software.amazon.smithy.model.shapes.ResourceShape
-
- All Implemented Interfaces:
java.lang.Comparable<Shape>,FromSourceLocation,ToShapeId,Tagged,ToSmithyBuilder<ResourceShape>
public final class ResourceShape extends EntityShape implements ToSmithyBuilder<ResourceShape>
Represents aresourceshape.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classResourceShape.BuilderBuilder used to create aResourceShape.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <R> Raccept(ShapeVisitor<R> visitor)Dispatches the shape to the appropriateShapeVisitormethod.java.util.Optional<ResourceShape>asResourceShape()static ResourceShape.Builderbuilder()booleanequals(java.lang.Object other)java.util.Set<ShapeId>getAllOperations()Get all operations directly bound to this shape.java.util.Set<ShapeId>getCollectionOperations()Gets the operations bound through the "collectionOperations" property.java.util.Optional<ShapeId>getCreate()Gets the create lifecycle operation of the resource.java.util.Optional<ShapeId>getDelete()Gets the delete lifecycle operation of the resource.java.util.Map<java.lang.String,ShapeId>getIdentifiers()Gets the identifiers of the resource.java.util.Optional<ShapeId>getList()Gets the list lifecycle operation of the resource.java.util.Map<java.lang.String,ShapeId>getProperties()java.util.Optional<ShapeId>getPut()Gets the put lifecycle operation of the resource.java.util.Optional<ShapeId>getRead()Gets the read lifecycle operation of the resource.ShapeTypegetType()Gets the type of the shape.java.util.Optional<ShapeId>getUpdate()Gets the update lifecycle operation of the resource.booleanhasIdentifiers()booleanhasProperties()ResourceShape.BuildertoBuilder()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.EntityShape
getIntroducedOperations, getIntroducedResources, getOperations, getResources
-
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, asOperationShape, 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 Detail
-
builder
public static ResourceShape.Builder builder()
-
toBuilder
public ResourceShape.Builder toBuilder()
Description copied from interface:ToSmithyBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToSmithyBuilder<ResourceShape>- Returns:
- a builder for type T
-
accept
public <R> R accept(ShapeVisitor<R> visitor)
Description copied from class:ShapeDispatches the shape to the appropriateShapeVisitormethod.
-
asResourceShape
public java.util.Optional<ResourceShape> asResourceShape()
- Overrides:
asResourceShapein classShape- Returns:
- Optionally returns the shape as a
ResourceShape.
-
getAllOperations
public java.util.Set<ShapeId> getAllOperations()
Description copied from class:EntityShapeGet all operations directly bound to this shape.This will include operations bound directly to resources using a lifecycle operation binding. This will not include operations bound to this entity through sub-resources.
- Overrides:
getAllOperationsin classEntityShape- Returns:
- Returns all operations bound to the shape.
- See Also:
TopDownIndex.getContainedOperations(software.amazon.smithy.model.shapes.ToShapeId)
-
getCollectionOperations
public java.util.Set<ShapeId> getCollectionOperations()
Gets the operations bound through the "collectionOperations" property. This will not include operations bound to resources using a lifecycle operation binding.- Returns:
- Get the "collectionOperations" directly bound to this shape.
- See Also:
getAllOperations()
-
getIdentifiers
public java.util.Map<java.lang.String,ShapeId> getIdentifiers()
Gets the identifiers of the resource.- Returns:
- Returns the identifiers map of name to shape ID.
-
hasIdentifiers
public boolean hasIdentifiers()
- Returns:
- Returns true if this resource defines any identifiers.
-
getProperties
public java.util.Map<java.lang.String,ShapeId> getProperties()
-
hasProperties
public boolean hasProperties()
-
getPut
public java.util.Optional<ShapeId> getPut()
Gets the put lifecycle operation of the resource.- Returns:
- Returns the optionally found lifecycle.
-
getCreate
public java.util.Optional<ShapeId> getCreate()
Gets the create lifecycle operation of the resource.- Returns:
- Returns the optionally found lifecycle.
-
getRead
public java.util.Optional<ShapeId> getRead()
Gets the read lifecycle operation of the resource.- Returns:
- Returns the optionally found lifecycle.
-
getUpdate
public java.util.Optional<ShapeId> getUpdate()
Gets the update lifecycle operation of the resource.- Returns:
- Returns the optionally found lifecycle.
-
getDelete
public java.util.Optional<ShapeId> getDelete()
Gets the delete lifecycle operation of the resource.- Returns:
- Returns the optionally found lifecycle.
-
getList
public java.util.Optional<ShapeId> getList()
Gets the list lifecycle operation of the resource.- Returns:
- Returns the optionally found lifecycle.
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classEntityShape
-
-