Class Differences.Builder
- All Implemented Interfaces:
SmithyBuilder<Differences>
- Enclosing class:
- Differences
Differences.
For most uses of Differences, it should be constructed with Differences.detect(software.amazon.smithy.model.Model, software.amazon.smithy.model.Model).
This is intended to be used for evaluating subsets of the models or synthetic differences between them. For example, two completely different shapes could be evaluated against each other to see what the differences are.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddedMetadata(Collection<Pair<String, Node>> addedMetadata) Sets the metadata that is considered to have been added.addedShapes(Collection<Shape> addedShapes) Sets what shapes have been added.build()Creates an immutable object that is created from the properties that have been set on the builder.changedMetadata(Collection<ChangedMetadata> changedMetadata) Sets the metadata that is considered to have been changed.changedShape(ChangedShape<Shape> changedShape) Adds a shape to the set of shapes that have been changed.changedShapes(Collection<ChangedShape<Shape>> changedShapes) Sets what shapes have been changed.Detects all metadata additions, removals, and changes.Detects all shape additions, removals, and changes.Sets the model to be used as the new model state.Sets the model to be used as the base model.removedMetadata(Collection<Pair<String, Node>> removedMetadata) Sets the metadata that is considered to have been removed.removedShapes(Collection<Shape> removedShapes) Sets what shapes have been removed.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
Description copied from interface:SmithyBuilderCreates an immutable object that is created from the properties that have been set on the builder.- Specified by:
buildin interfaceSmithyBuilder<Differences>- Returns:
- an instance of T
-
oldModel
Sets the model to be used as the base model.- Parameters:
oldModel- The model to base changes on.- Returns:
- Returns the builder.
-
newModel
Sets the model to be used as the new model state.- Parameters:
newModel- The model to use as the new state.- Returns:
- Returns the builder.
-
addedShapes
Sets what shapes have been added.For most uses,
detectShapeChanges()orDifferences.detect(Model, Model)should be used instead.- Parameters:
addedShapes- The shapes to consider as having been added.- Returns:
- Returns the builder.
-
removedShapes
Sets what shapes have been removed.For most uses,
detectShapeChanges()orDifferences.detect(Model, Model)should be used instead.- Parameters:
removedShapes- The shapes to consider as having been removed.- Returns:
- Returns the builder.
-
changedShapes
Sets what shapes have been changed.For most uses,
detectShapeChanges()orDifferences.detect(Model, Model)should be used instead.- Parameters:
changedShapes- The shapes to consider as having changed.- Returns:
- Returns the builder.
-
changedShape
Adds a shape to the set of shapes that have been changed.For most uses,
detectShapeChanges()orDifferences.detect(Model, Model)should be used instead.- Parameters:
changedShape- A shape to consider as having changed.- Returns:
- Returns the builder.
-
addedMetadata
Sets the metadata that is considered to have been added.For most uses,
detectMetadataChanges()orDifferences.detect(Model, Model)should be used instead.- Parameters:
addedMetadata- The metadata to consider as having been added.- Returns:
- Returns the builder.
-
removedMetadata
Sets the metadata that is considered to have been removed.For most uses,
detectMetadataChanges()orDifferences.detect(Model, Model)should be used instead.- Parameters:
removedMetadata- The metadata to consider as having been removed.- Returns:
- Returns the builder.
-
changedMetadata
Sets the metadata that is considered to have been changed.For most uses,
detectMetadataChanges()orDifferences.detect(Model, Model)should be used instead.- Parameters:
changedMetadata- The metadata to consider as having been changed.- Returns:
- Returns the builder.
-
detectShapeChanges
Detects all shape additions, removals, and changes.- Returns:
- Returns the builder.
-
detectMetadataChanges
Detects all metadata additions, removals, and changes.- Returns:
- Returns the builder.
-