public static PbShapeType valueOf(int value) {
      switch (value) {
        case 1: return CIRCLE;
        case 2: return POLYGON;
        case 3: return EDGE;
        case 4: return LOOP;
        default: return null;
      }
    }