@SuppressWarnings("unchecked")
    public T trimTrailingSpaces(boolean trimTrailingSpaces) {
        currentState.trimTrailingSpaces = trimTrailingSpaces;
        return (T) this;
    }
Configures if trailing spaces on a line are removed.

@param trimTrailingSpaces Set to true to trim trailing spaces.
@return Returns self.
smithy-utils/src/main/java/software/amazon/smithy/utils/AbstractCodeWriter.java