class WithQuery extends Node {

    private final String name;
    private final Query query;
    private final List<String> columnNames;

    public WithQuery(String name, Query query, List<String> columnNames) {
        this.name = name;
        this.query = Objects.requireNonNull(query, "query is null");
        this.columnNames = columnNames;
    }

    public String name() {
        return name;
    }

    public Query query() {
        return query;
    }

    public List<String> columnNames() {
        return columnNames;
    }

    @Override
    public <R, C> R accept(AstVisitor<R, C> visitor, C context) {
        return visitor.visitWithQuery(this, context);
    }

    @Override
    public String toString() {<FILL_FUNCTION_BODY>}

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        WithQuery withQuery = (WithQuery) o;
        return name.equals(withQuery.name)
            && query.equals(withQuery.query)
            && Objects.equals(columnNames, withQuery.columnNames);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, query, columnNames);
    }
}

        return "WithQuery{" +
            "name=" + name +
            ", query=" + query +
            ", columnNames=" + columnNames +
            '}';
    
<methods>public non-sealed void <init>() ,public R accept(AstVisitor<R,C>, C) ,public abstract boolean equals(java.lang.Object) ,public abstract int hashCode() ,public abstract java.lang.String toString() <variables>