class PublishResponse implements Writeable {

    private final long term;
    private final long version;

    public PublishResponse(long term, long version) {
        assert term >= 0;
        assert version >= 0;

        this.term = term;
        this.version = version;
    }

    public PublishResponse(StreamInput in) throws IOException {
        this(in.readLong(), in.readLong());
    }

    @Override
    public void writeTo(StreamOutput out) throws IOException {
        out.writeLong(term);
        out.writeLong(version);
    }

    public long getTerm() {
        return term;
    }

    public long getVersion() {
        return version;
    }

    @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;

        PublishResponse response = (PublishResponse) o;

        if (term != response.term) return false;
        return version == response.version;
    }

    @Override
    public int hashCode() {
        int result = (int) (term ^ (term >>> 32));
        result = 31 * result + (int) (version ^ (version >>> 32));
        return result;
    }
}

        return "PublishResponse{" +
            "term=" + term +
            ", version=" + version +
            '}';
    
<no_super_class>