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 Details

    • Builder

      public Builder()
  • Method Details

    • build

      public EffectiveTraitQuery 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 interface SmithyBuilder<EffectiveTraitQuery>
      Returns:
      an instance of T
    • model

      public EffectiveTraitQuery.Builder model(Model model)
      Sets the required model to query.
      Parameters:
      model - Model to query.
      Returns:
      Returns the query object builder.
    • traitClass

      public EffectiveTraitQuery.Builder traitClass(Class<? extends Trait> traitClass)
      Sets the required trait being queried.
      Parameters:
      traitClass - Trait to detect on shapes.
      Returns:
      Returns the query object builder.
    • inheritFromContainer

      public EffectiveTraitQuery.Builder inheritFromContainer(boolean 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.