@SuppressWarnings("unchecked")
    public B removeTrait(ShapeId traitId) {
        if (traits.hasValue()) {
            traits.get().remove(traitId);
        }
        return (B) this;
    }
Removes a trait from the shape builder.

@param traitId ID of the trait to remove.
@return Returns the builder.
smithy-model/src/main/java/software/amazon/smithy/model/shapes/AbstractShapeBuilder.java