@Override
    public void deserialize(Buffer buf) {
        messageId = buf.readShort();
        if (messageId < 0)
            throw new RuntimeException("Forbidden value on messageId = " + messageId + ", it doesn't respect the following condition : messageId < 0");
        int limit = buf.readUShort();
        dialogParams = new String[limit];
        for (int i = 0; i < limit; i++) {
            dialogParams[i] = buf.readString();
        }
        limit = buf.readUShort();
        visibleReplies = new short[limit];
        for (int i = 0; i < limit; i++) {
            visibleReplies[i] = buf.readShort();
        }
    }