@Override
    public Node toNode() {
        ObjectNode.Builder builder = ObjectNode.builder();

        ArrayNode.Builder conditionsBuilder = ArrayNode.builder();
        for (Condition condition : conditions) {
            conditionsBuilder.withValue(condition.toNode());
        }
        builder.withMember(CONDITIONS, conditionsBuilder.build());

        if (documentation != null) {
            builder.withMember(DOCUMENTATION, documentation);
        }

        withValueNode(builder);
        return builder.build();
    }
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