code: public static String toStringPart(Field field) {
          String getterName;
          if (field.isMap()) {
              getterName = getMapGetterName(field);
          } else if (field.isRepeated()) {
              getterName = getRepeatedFieldGetterName(field);
          } else {
              getterName = getFieldGetterName(field);
          }
          if (field.getType().isEnum() && !field.isRepeated()) {
              return "\"" + getFieldName(field) + "=\" + " + getterName + "() + '(' + " + getEnumFieldValueGetterName(field) + "() + ')'";
          }
          return "\"" + getFieldName(field) + "=\" + " + getterName + "()";
      }
docs: Generate part of toString method for a single field.