Class TraitDefinition.Builder
- java.lang.Object
-
- software.amazon.smithy.model.traits.AbstractTraitBuilder<TraitDefinition,TraitDefinition.Builder>
-
- software.amazon.smithy.model.traits.TraitDefinition.Builder
-
- All Implemented Interfaces:
SmithyBuilder<TraitDefinition>
- Enclosing class:
- TraitDefinition
public static final class TraitDefinition.Builder extends AbstractTraitBuilder<TraitDefinition,TraitDefinition.Builder>
Builder to create a TraitDefinition.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TraitDefinition.Builder
addBreakingChange(TraitDefinition.BreakingChangeRule rule)
TraitDefinition.Builder
addConflict(java.lang.String trait)
TraitDefinition.Builder
addConflict(ShapeId id)
TraitDefinition.Builder
breakingChanges(java.util.List<TraitDefinition.BreakingChangeRule> diff)
TraitDefinition
build()
Creates an immutable object that is created from the properties that have been set on the builder.TraitDefinition.Builder
clearBreakingChanges()
TraitDefinition.Builder
removeConflict(ToShapeId id)
TraitDefinition.Builder
selector(Selector selector)
TraitDefinition.Builder
structurallyExclusive(TraitDefinition.StructurallyExclusive structurallyExclusive)
-
Methods inherited from class software.amazon.smithy.model.traits.AbstractTraitBuilder
getSourceLocation, sourceLocation
-
-
-
-
Method Detail
-
selector
public TraitDefinition.Builder selector(Selector selector)
-
addConflict
public TraitDefinition.Builder addConflict(java.lang.String trait)
-
addConflict
public TraitDefinition.Builder addConflict(ShapeId id)
-
removeConflict
public TraitDefinition.Builder removeConflict(ToShapeId id)
-
structurallyExclusive
public TraitDefinition.Builder structurallyExclusive(TraitDefinition.StructurallyExclusive structurallyExclusive)
-
breakingChanges
public TraitDefinition.Builder breakingChanges(java.util.List<TraitDefinition.BreakingChangeRule> diff)
-
clearBreakingChanges
public TraitDefinition.Builder clearBreakingChanges()
-
addBreakingChange
public TraitDefinition.Builder addBreakingChange(TraitDefinition.BreakingChangeRule rule)
-
build
public TraitDefinition 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
-
-