public static Label valueOf(int value) {
        switch (value) {
          case 1: return LABEL_OPTIONAL;
          case 2: return LABEL_REQUIRED;
          case 3: return LABEL_REPEATED;
          default: return null;
        }
      }