public Builder traitClass(Class<? extends Trait> traitClass) {
            this.traitClass = traitClass;
            return this;
        }
Sets the required trait being queried.

@param traitClass Trait to detect on shapes.
@return Returns the query object builder.
smithy-model/src/main/java/software/amazon/smithy/model/traits/EffectiveTraitQuery.java