@Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        if (documentation != null) {
            sb.append("# ").append(documentation).append("\n");
        }
        if (conditions.isEmpty()) {
            sb.append("always:\n");
        } else {
            sb.append("when:\n");
            for (Condition condition : conditions) {
                sb.append(StringUtils.indent(condition.toString(), 2));
            }
            sb.append("then:\n");
        }
        return sb.toString();
    }
Invoke the {@link RuleValueVisitor} functions for this Rule.

@param visitor the visitor to be invoked.
@param <T>     the visitor return type.
@return the return value of the visitor.
smithy-rules-engine/src/main/java/software/amazon/smithy/rulesengine/language/syntax/rule/Rule.java