static Cause? valueOf(String name) { for (Cause value in Cause.values) { if (value.name == name) return value; } return Cause.UNKNOWN; }