public Builder traitFilter(Predicate<Trait> traitFilter) {
            this.traitFilter = traitFilter;
            return this;
        }
Sets a predicate that can be used to filter trait values from
appearing in the serialized model.

<p>Note that this does not filter out trait definitions. It only filters
out instances of traits from being serialized on shapes.

@param traitFilter Predicate that filters out trait definitions.
@return Returns the builder.
smithy-model/src/main/java/software/amazon/smithy/model/shapes/ModelSerializer.java