code: private static void addField(DescriptorProto.Builder builder, String name, int fieldId, Type type) {
      FieldDescriptorProto.Builder fdBuilder = FieldDescriptorProto.newBuilder()
        .setName(name)
        .setNumber(fieldId)
        .setType(type);
      builder.addField(fdBuilder.build());
    }
docs: Add a field to a protobuf builder