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 a
ResourceShape
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddIdentifier
(String name, String identifier) addIdentifier
(String name, ToShapeId identifier) Adds an identifier to the resource.addProperty
(String name, String targetShape) addProperty
(String name, ToShapeId targetShape) build()
Creates an immutable object that is created from the properties that have been set on the builder.Gets the type of shape being built.identifiers
(Map<String, ShapeId> identifiers) Sets the resource identifiers map of identifier name to shape ID.properties
(Map<String, ShapeId> properties) removeFromAllOperationBindings
(ToShapeId toShapeId) Removes an operation binding from lifecycles and the operations list.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, getSourceLocation, id, id, mixins, removeMixin, removeTrait, removeTrait, source, source, traits
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
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
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
Sets the resource identifiers map of identifier name to shape ID.- Parameters:
identifiers
- The identifiers to set.- Returns:
- Returns the builder.
-
addIdentifier
Adds an identifier to the resource.- Parameters:
name
- Name of the identifier.identifier
- Shape ID of the identifier.- Returns:
- Returns the builder.
-
addIdentifier
-
properties
-
addProperty
-
addProperty
-
put
-
create
-
read
-
update
-
delete
-
list
-
collectionOperations
-
addCollectionOperation
-
addCollectionOperation
-
removeCollectionOperation
-
clearCollectionOperations
-
removeFromAllOperationBindings
Removes an operation binding from lifecycles and the operations list.- Parameters:
toShapeId
- Operation ID to remove.- Returns:
- Returns the builder.
-