Class ResourceShape.Builder
- java.lang.Object
-
- software.amazon.smithy.model.shapes.AbstractShapeBuilder<B,S>
-
- software.amazon.smithy.model.shapes.EntityShape.Builder<ResourceShape.Builder,ResourceShape>
-
- software.amazon.smithy.model.shapes.ResourceShape.Builder
-
- All Implemented Interfaces:
FromSourceLocation
,SmithyBuilder<ResourceShape>
- Enclosing class:
- ResourceShape
public static final class ResourceShape.Builder extends EntityShape.Builder<ResourceShape.Builder,ResourceShape>
Builder used to create aResourceShape
.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
Methods inherited from class software.amazon.smithy.model.shapes.EntityShape.Builder
addOperation, addOperation, addResource, addResource, clearOperations, clearResources, flattenMixins, operations, removeOperation, removeResource, resources
-
Methods inherited from class software.amazon.smithy.model.shapes.AbstractShapeBuilder
addMember, addMixin, addTrait, addTraits, clearMembers, clearMixins, clearTraits, getAllTraits, getId, getMember, getSourceLocation, id, id, mixins, removeMixin, removeTrait, removeTrait, source, source, traits
-
-
-
-
Method Detail
-
build
public ResourceShape build()
Description copied from interface:SmithyBuilder
Creates an immutable object that is created from the properties that have been set on the builder.- Returns:
- an instance of T
-
getShapeType
public ShapeType getShapeType()
Description copied from class:AbstractShapeBuilder
Gets the type of shape being built.- Specified by:
getShapeType
in classAbstractShapeBuilder<ResourceShape.Builder,ResourceShape>
- Returns:
- Returns the shape type.
-
identifiers
public ResourceShape.Builder identifiers(java.util.Map<java.lang.String,ShapeId> identifiers)
Sets the resource identifiers map of identifier name to shape ID.- Parameters:
identifiers
- The identifiers to set.- Returns:
- Returns the builder.
-
addIdentifier
public ResourceShape.Builder addIdentifier(java.lang.String name, ToShapeId identifier)
Adds an identifier to the resource.- Parameters:
name
- Name of the identifier.identifier
- Shape ID of the identifier.- Returns:
- Returns the builder.
-
addIdentifier
public ResourceShape.Builder addIdentifier(java.lang.String name, java.lang.String identifier)
-
properties
public ResourceShape.Builder properties(java.util.Map<java.lang.String,ShapeId> properties)
-
addProperty
public ResourceShape.Builder addProperty(java.lang.String name, ToShapeId targetShape)
-
addProperty
public ResourceShape.Builder addProperty(java.lang.String name, java.lang.String targetShape)
-
put
public ResourceShape.Builder put(ToShapeId put)
-
create
public ResourceShape.Builder create(ToShapeId create)
-
read
public ResourceShape.Builder read(ToShapeId read)
-
update
public ResourceShape.Builder update(ToShapeId update)
-
delete
public ResourceShape.Builder delete(ToShapeId delete)
-
list
public ResourceShape.Builder list(ToShapeId list)
-
collectionOperations
public ResourceShape.Builder collectionOperations(java.util.Collection<ShapeId> ids)
-
addCollectionOperation
public ResourceShape.Builder addCollectionOperation(ToShapeId id)
-
addCollectionOperation
public ResourceShape.Builder addCollectionOperation(java.lang.String id)
-
removeCollectionOperation
public ResourceShape.Builder removeCollectionOperation(ToShapeId id)
-
clearCollectionOperations
public ResourceShape.Builder clearCollectionOperations()
-
removeFromAllOperationBindings
public ResourceShape.Builder removeFromAllOperationBindings(ToShapeId toShapeId)
Removes an operation binding from lifecycles and the operations list.- Parameters:
toShapeId
- Operation ID to remove.- Returns:
- Returns the builder.
-
-