@JsonCreator
 public static PermissionType withName(String name) {
   for (PermissionType p : PermissionType.values()) {
     if (p.getName().equals(name)) return p;
   }
   throw new IllegalArgumentException("Invalid permission type: " + name);
 }