Class ResourceShape

All Implemented Interfaces:
Comparable<Shape>, FromSourceLocation, ToShapeId, Tagged, ToSmithyBuilder<ResourceShape>

public final class ResourceShape extends EntityShape implements ToSmithyBuilder<ResourceShape>
Represents a resource shape.
  • Method Details

    • 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 interface ToSmithyBuilder<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 appropriate ShapeVisitor method.
      Specified by:
      accept in class Shape
      Type Parameters:
      R - Return type of the accept.
      Parameters:
      visitor - ShapeVisitor to use.
      Returns:
      Returns the result.
    • asResourceShape

      public Optional<ResourceShape> asResourceShape()
      Overrides:
      asResourceShape in class Shape
      Returns:
      Optionally returns the shape as a ResourceShape.
    • getAllOperations

      public 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 class EntityShape
      Returns:
      Returns all operations bound to the shape.
      See Also:
    • getType

      public ShapeType getType()
      Description copied from class: Shape
      Gets the type of the shape.
      Specified by:
      getType in class Shape
      Returns:
      Returns the type;
    • getCollectionOperations

      public 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:
    • getIdentifiers

      public Map<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 Map<String,ShapeId> getProperties()
    • hasProperties

      public boolean hasProperties()
    • getPut

      public Optional<ShapeId> getPut()
      Gets the put lifecycle operation of the resource.
      Returns:
      Returns the optionally found lifecycle.
    • getCreate

      public Optional<ShapeId> getCreate()
      Gets the create lifecycle operation of the resource.
      Returns:
      Returns the optionally found lifecycle.
    • getRead

      public Optional<ShapeId> getRead()
      Gets the read lifecycle operation of the resource.
      Returns:
      Returns the optionally found lifecycle.
    • getUpdate

      public Optional<ShapeId> getUpdate()
      Gets the update lifecycle operation of the resource.
      Returns:
      Returns the optionally found lifecycle.
    • getDelete

      public Optional<ShapeId> getDelete()
      Gets the delete lifecycle operation of the resource.
      Returns:
      Returns the optionally found lifecycle.
    • getList

      public Optional<ShapeId> getList()
      Gets the list lifecycle operation of the resource.
      Returns:
      Returns the optionally found lifecycle.
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class EntityShape