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 aresource
shape.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ResourceShape.Builder
Builder used to create aResourceShape
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <R> R
accept(ShapeVisitor<R> visitor)
Dispatches the shape to the appropriateShapeVisitor
method.java.util.Optional<ResourceShape>
asResourceShape()
static ResourceShape.Builder
builder()
boolean
equals(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.ShapeType
getType()
Gets the type of the shape.java.util.Optional<ShapeId>
getUpdate()
Gets the update lifecycle operation of the resource.boolean
hasIdentifiers()
boolean
hasProperties()
ResourceShape.Builder
toBuilder()
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:ToSmithyBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToSmithyBuilder<ResourceShape>
- Returns:
- a builder for type T
-
accept
public <R> R accept(ShapeVisitor<R> visitor)
Description copied from class:Shape
Dispatches the shape to the appropriateShapeVisitor
method.
-
asResourceShape
public java.util.Optional<ResourceShape> asResourceShape()
- Overrides:
asResourceShape
in classShape
- Returns:
- Optionally returns the shape as a
ResourceShape
.
-
getAllOperations
public java.util.Set<ShapeId> getAllOperations()
Description copied from class:EntityShape
Get 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:
getAllOperations
in 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:
equals
in classEntityShape
-
-