the way to make this an enum is to add a parsing member like this:

```
     enum IPProtocol {
      TCP, UDP, ICMP, UNKNOWN;
      public static Protocol fromValue(String value) {
         try {
            return valueOf(value.toUpperCase());
          } catch (IllegalArgumentException e) {
            return UNKNOWN;
         }
      }
}
```