class RemoteStat implements ComparableByContent<RemoteStat> {

    private long consumedTokens;

    public RemoteStat(long consumedTokens) {
        this.consumedTokens = consumedTokens;
    }

    public long getConsumedTokens() {
        return consumedTokens;
    }

    public void addConsumedTokens(long consumedTokens) {
        this.consumedTokens += consumedTokens;
    }

    public static final SerializationHandle<RemoteStat> SERIALIZATION_HANDLE = new SerializationHandle<RemoteStat>() {
        @Override
        public <S> RemoteStat deserialize(DeserializationAdapter<S> adapter, S input) throws IOException {<FILL_FUNCTION_BODY>}

        @Override
        public <O> void serialize(SerializationAdapter<O> adapter, O output, RemoteStat stat, Version backwardCompatibilityVersion, Scope scope) throws IOException {
            adapter.writeInt(output, v_7_0_0.getNumber());

            adapter.writeLong(output, stat.consumedTokens);
        }

        @Override
        public int getTypeId() {
            return 6;
        }

        @Override
        public Class<RemoteStat> getSerializedType() {
            return RemoteStat.class;
        }

        @Override
        public RemoteStat fromJsonCompatibleSnapshot(Map<String, Object> snapshot) throws IOException {
            int formatNumber = readIntValue(snapshot, "version");
            Versions.check(formatNumber, v_7_0_0, v_7_0_0);

            long consumedTokens = readLongValue(snapshot, "consumedTokens");
            return new RemoteStat(consumedTokens);
        }

        @Override
        public Map<String, Object> toJsonCompatibleSnapshot(RemoteStat stat, Version backwardCompatibilityVersion, Scope scope) throws IOException {
            Map<String, Object> result = new HashMap<>();
            result.put("version", v_7_0_0.getNumber());
            result.put("consumedTokens", stat.consumedTokens);
            return result;
        }

        @Override
        public String getTypeName() {
            return "RemoteStat";
        }

    };

    public RemoteStat copy() {
        return new RemoteStat(consumedTokens);
    }

    @Override
    public boolean equalsByContent(RemoteStat other) {
        return consumedTokens == other.consumedTokens;
    }

}

            int formatNumber = adapter.readInt(input);
            Versions.check(formatNumber, v_7_0_0, v_7_0_0);

            long consumedTokens = adapter.readLong(input);
            return new RemoteStat(consumedTokens);
        
<no_super_class>