Class EffectiveTraitQuery.Builder
java.lang.Object
software.amazon.smithy.model.traits.EffectiveTraitQuery.Builder
- All Implemented Interfaces:
SmithyBuilder<EffectiveTraitQuery>
- Enclosing class:
- EffectiveTraitQuery
public static final class EffectiveTraitQuery.Builder
extends Object
implements SmithyBuilder<EffectiveTraitQuery>
Builds a reusable EffectiveTraitQuery.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Creates an immutable object that is created from the properties that have been set on the builder.inheritFromContainer
(boolean inheritFromContainer) When testing member shapes, also checks the container of the member for the presence of a trait.Sets the required model to query.traitClass
(Class<? extends Trait> traitClass) Sets the required trait being queried.
-
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.- Specified by:
build
in interfaceSmithyBuilder<EffectiveTraitQuery>
- Returns:
- an instance of T
-
model
Sets the required model to query.- Parameters:
model
- Model to query.- Returns:
- Returns the query object builder.
-
traitClass
Sets the required trait being queried.- Parameters:
traitClass
- Trait to detect on shapes.- Returns:
- Returns the query object builder.
-
inheritFromContainer
When testing member shapes, also checks the container of the member for the presence of a trait.By default, traits are not inherited from a member's parent container.
- Parameters:
inheritFromContainer
- Set to true to inherit traits from member containers.- Returns:
- Returns the query object builder.
-