static EventType? tryParse(int value) { for (EventType event in EventType.values) { if (event.value == value) { return event; } } return null; }