static EventType parse(String eventType) {

        switch (eventType) {
            case "user":
                return User;
            case "query":
                return Query;
            case "member-join":
                return MemberJoin;
            case "member-leave":
                return MemberLeave;
            case "member-failed":
                return MemberFailed;
            case "member-update":
                return MemberUpdate;
            case "member-reap":
                return MemberReap;
            default:
                throw new IllegalArgumentException("Event type " + eventType + " is not supported.");
        }
    }