public static Type forNumber(int value) {
        switch (value) {
          case 1: return REQUEST;
          case 2: return RESPONSE;
          case 3: return FAILURE;
          default: return null;
        }
      }
public static Type forNumber(int value)