@Override
    public void deserialize(Buffer buf) {
        barType = buf.readByte();
        if (barType < 0)
            throw new RuntimeException("Forbidden value on barType = " + barType + ", it doesn't respect the following condition : barType < 0");
        firstSlot = buf.readInt();
        if (firstSlot < 0 || firstSlot > 99)
            throw new RuntimeException("Forbidden value on firstSlot = " + firstSlot + ", it doesn't respect the following condition : firstSlot < 0 || firstSlot > 99");
        secondSlot = buf.readInt();
        if (secondSlot < 0 || secondSlot > 99)
            throw new RuntimeException("Forbidden value on secondSlot = " + secondSlot + ", it doesn't respect the following condition : secondSlot < 0 || secondSlot > 99");
    }