@Override
    public void deserialize(Buffer buf) {
        super.deserialize(buf);
        partyType = buf.readByte();
        if (partyType < 0)
            throw new RuntimeException("Forbidden value on partyType = " + partyType + ", it doesn't respect the following condition : partyType < 0");
        maxParticipants = buf.readByte();
        if (maxParticipants < 0)
            throw new RuntimeException("Forbidden value on maxParticipants = " + maxParticipants + ", it doesn't respect the following condition : maxParticipants < 0");
        fromId = buf.readInt();
        if (fromId < 0)
            throw new RuntimeException("Forbidden value on fromId = " + fromId + ", it doesn't respect the following condition : fromId < 0");
        fromName = buf.readString();
        toId = buf.readInt();
        if (toId < 0)
            throw new RuntimeException("Forbidden value on toId = " + toId + ", it doesn't respect the following condition : toId < 0");
    }